cairo-contracts
cairo-contracts copied to clipboard
Add AccessControlDefaultAdminRules extension.
🧐 Motivation
AccessControl includes a special role, called DEFAULT_ADMIN_ROLE
, which acts as the default admin role for all roles. An account with this role will be able to manage any other role, unless _set_role_admin
is used to select a new admin role.
Since it is the admin for all roles by default, and in fact it is also its own admin, this role carries significant risk. To mitigate this risk we have in our Solidity library AccessControlDefaultAdminRules, a recommended extension of AccessControl that adds a number of enforced security measures for this role: the admin is restricted to a single account, with a 2-step transfer procedure with a delay in between steps.