DEFAULT_ADMIN_ROLE functionality in Cairo

Hello dear all,

In the Cairo documentation related to Access Control https://docs.openzeppelin.com/contracts-cairo/0.15.0/access it states that the DEFAULT_ADMIN_ROLE 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.

My question is that when we use the _set_role_admin to select a new admin role, if the DEFAULT_ADMIN_ROLE is still active there. If yes, I dont know if there are security recommendations on how to handle it because this controls all the roles and be dangerous.

Thanks in advance,

1 Like

Yes.

I think no.
There is a test case about this, you can have a look:

There is a solidity version that manages the DEFAULT_ADMIN_ROLE holder, maybe you can have a look:

@Skyge Thanks a lot for your help!

1 Like