IAuthorizable

Git Source

Functions

authorizedAccounts

Checks whether an account is authorized on the contract

function authorizedAccounts(address _account) external view returns (bool _authorized);

Parameters

NameTypeDescription
_accountaddressAccount to check

Returns

NameTypeDescription
_authorizedboolWhether the account is authorized or not

authorizedAccounts

Getter for the authorized accounts

function authorizedAccounts() external view returns (address[] memory _accounts);

Returns

NameTypeDescription
_accountsaddress[]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

NameTypeDescription
_accountaddressAccount 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

NameTypeDescription
_accountaddressAccount to remove authorization from

Events

AddAuthorization

Emitted when an account is authorized

event AddAuthorization(address _account);

Parameters

NameTypeDescription
_accountaddressAccount that is authorized

RemoveAuthorization

Emitted when an account is unauthorized

event RemoveAuthorization(address _account);

Parameters

NameTypeDescription
_accountaddressAccount 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();