โAAccessControlled
This abstract contract outlines basic functionality, declares functions that need to be implemented to provide a deterministic connection to ZNSAccessController
module.
In order to connect an arbitrary module to ZNSAccessController
and it's functionality, this contract needs to be inherited by the module.
AccessControllerSet
Emitted when the access controller contract address is set.
accessController
Address of the ZNSAccessController contract.
onlyAdmin
Modifier to make a function callable only when caller is an admin. Implemented here to avoid declaring this in every single contract that uses it.
onlyRegistrar
Revert if msg.sender
is not the ZNSRootRegistrar.sol
contract or an address holding REGISTRAR_ROLE.
getAccessController
Universal getter for accessController
address on any contract that inherits from AAccessControlled
.
setAccessController
Universal setter for accessController
address on any contract that inherits from AAccessControlled
. Only ADMIN can call this function. Fires AccessControllerSet
event.
Parameters
_setAccessController
Internal function to set the access controller address.