IAuthorizable
Functions
authorizedAccounts
Checks whether an account is authorized on the contract
function authorizedAccounts(address _account) external view returns (bool _authorized);
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account to check |
Returns
Name | Type | Description |
---|---|---|
_authorized | bool | Whether the account is authorized or not |
authorizedAccounts
Getter for the authorized accounts
function authorizedAccounts() external view returns (address[] memory _accounts);
Returns
Name | Type | Description |
---|---|---|
_accounts | address[] | Array of authorized accounts |
addAuthorization
Add authorization to an account
Method will revert if the account is already authorized
function addAuthorization(address _account) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account to add authorization to |
removeAuthorization
Remove authorization from an account
Method will revert if the account is not authorized
function removeAuthorization(address _account) external;
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account to remove authorization from |
Events
AddAuthorization
Emitted when an account is authorized
event AddAuthorization(address _account);
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account that is authorized |
RemoveAuthorization
Emitted when an account is unauthorized
event RemoveAuthorization(address _account);
Parameters
Name | Type | Description |
---|---|---|
_account | address | Account that is unauthorized |
Errors
AlreadyAuthorized
Throws if the account is already authorized on addAuthorization
error AlreadyAuthorized();
NotAuthorized
Throws if the account is not authorized on removeAuthorization
error NotAuthorized();
Unauthorized
Throws if the account is not authorized and tries to call an onlyAuthorized
method
error Unauthorized();