relevant tag icon
StandardAccessControl
copy icon
DirtyCajunRice
• version 1.0.0
Utility
Security
Upgradeable
Inheritable
Preset

StandardAccessControl

Upgradeable Drop-in replacement for AccessControlEnumerable with pre-defined roles to speed up dev time

*Visit desktop site to download or deploy

Version

1.0.0

Last Publish

12/12/2022
Any contract you deploy is yours.
Fully owned and controlled by your wallet.
Documentation
Source Code
__StandardAccessControl_init() :
This function is used to initialize the StandardAccessControl contract. It grants the default admin role, admin role, contract role, minter role, private role, and bridge role to the sender of the message. This is done by calling the _grantRole() function for each of the roles. (autogenerated documentation)
_hasDefaultAdminRole(address) :
This function checks if the given address has the default admin role. It does this by calling the hasRole() function, which checks if the given address has the specified role. If the address has the role, the function returns true, otherwise it returns false. (autogenerated documentation)
_hasAdminRole(address) :
This function checks if the given address has the admin role. It does this by calling the hasRole() function, which checks if the given address has the specified role. If the address has the role, the function returns true, otherwise it returns false. (autogenerated documentation)
_hasContractRole(address) :
This function checks if a given address has the "CONTRACT_ROLE" role. It does this by calling the hasRole() function, which checks if the given address is present in the mapping of roles and addresses. If the address is present, the function returns true, otherwise it returns false. (autogenerated documentation)
_hasMinterRole(address) :
This function checks if a given address has the MINTER_ROLE. It does this by calling the hasRole() function, which checks if the given address has the specified role. If the address has the role, the function returns true, otherwise it returns false. (autogenerated documentation)
_hasPrivateRole(address) :
This function checks if a given address has the private role. It does this by calling the hasRole() function, which checks if the given address has the specified role. If the address has the role, the function returns true, otherwise it returns false. (autogenerated documentation)
_hasBridgeRole(address) :
This function checks if a given address has the role of a bridge. It does this by calling the hasRole() function, which checks if the given address has the specified role. The function returns a boolean value indicating whether the address has the role or not. (autogenerated documentation)
_checkRoles(bytes32[]) :
This function is an internal view function that checks the roles of a given sender. It takes an array of bytes32 as an argument, which contains the roles of the sender. It then calls the _checkRoles function, passing in the roles array and the sender address as arguments. This function will check if the sender has the necessary roles to perform the action. (autogenerated documentation)
_checkRoles(bytes32[],address) :
This function is used to check if an account has all the roles specified in the roles array. It does this by looping through the roles array and checking if the account has each role using the hasRole() function. If the account does not have all the roles, the function will revert with an error message. (autogenerated documentation)

Get Cookin'
share iconShare

copy iconDownload Source
copy iconnpx cookbookdev i StandardAccessControl
copy icon

Last Publish

12/12/2022

Version

1.0.0

Cookbook is free.
Any contract you deploy is yours.
Your contract is owned and controlled by you.