AccessControlled
The contract stores an admin address which is checked against msg.sender
in the onlyAdmin
modifier.
Additionally, a specific msg.sender
can be verified with the onlyCaller
modifier.
SetAdmin
logs new admin
of this
By emitting this data, an indexer will be able to keep track of what address is the admin of this contract.
Parameters
admin
address
The new admin.
_admin
The admin address.
constructor
AccessControlled
's constructor
Parameters
admin_
address
The address of the admin that can access privileged functions and also allowed to change the admin. Cannot be address(0)
.
onlyAdmin
This modifier verifies that msg.sender
is the admin.
onlyCaller
This modifier verifies that msg.sender
is the caller.
Parameters
caller
address
The address of the caller that can access the modified function.
adminOrCaller
This modifier verifies that msg.sender
is either caller or the admin
Parameters
caller
address
The address of a caller that can access the modified function.
admin
Retrieves the current admin.
Return Values
current
address
admin.
setAdmin
This sets the admin. Only the current admin can change the admin.
Parameters
admin_
address
The new admin. Cannot be address(0)
.