AccessControlDefaultAdminRulesComponent
AccessControlDefaultAdminRules Component
Extension of AccessControl that allows specifying special rules to manage
the DEFAULT_ADMIN_ROLE holder, which is a sensitive role with special permissions
over other roles that may potentially have privileged rights in the system.
If a specific role doesn’t have an admin role assigned, the holder of the
DEFAULT_ADMIN_ROLE will have the ability to grant it and revoke it.
This contract implements the following risk mitigations on top of {AccessControl}:
- Only one account holds the
DEFAULT_ADMIN_ROLEsince deployment until it’s potentially renounced. - Enforces a 2-step process to transfer the
DEFAULT_ADMIN_ROLEto another account. - Enforces a configurable delay between the two steps, with the ability to cancel before the transfer is accepted.
- The delay can be changed by scheduling, see
change_default_admin_delay. - It is not possible to use another role to manage the
DEFAULT_ADMIN_ROLE.
Fully qualified path: openzeppelin_access::accesscontrol::extensions::accesscontrol_default_admin_rules::AccessControlDefaultAdminRulesComponent
Modules
Constants
Free functions
Structs
| Storage | — |
| DefaultAdminTransferScheduled | Emitted when a default_admin transfer is started. Sets new_admin as the next address to become the default_admin by calling accept_default_admin_transfer only after accept_schedule `… |
| DefaultAdminTransferCanceled | Emitted when a pending_default_admin is reset if it was never accepted, regardless of its schedule. |
| DefaultAdminDelayChangeScheduled | Emitted when a default_admin_delay change is started. Sets new_delay as the next delay to be applied between default admins transfers after effect_schedule has passed. |
| DefaultAdminDelayChangeCanceled | Emitted when a pending_default_admin_delay is reset if its schedule didn’t pass. |
| ComponentState | — |
Enums
Traits
| ImmutableConfig | Constants expected to be defined at the contract level used to configure the component behavior…. |
| HasComponent | — |
| InternalTrait | — |
| UnsafeNewContractStateTraitForAccessControlDefaultAdminRulesImpl | — |
| UnsafeNewContractStateTraitForAccessControlImpl | — |
| UnsafeNewContractStateTraitForAccessControlCamelImpl | — |
| UnsafeNewContractStateTraitForAccessControlWithDelayImpl | — |
| UnsafeNewContractStateTraitForAccessControlMixinImpl | — |