Interface for an access control mechanism where operators have exclusive permissions to execute functions.
error NotOperator()
error InvalidOperator()
error OperatorAlreadyAdded()
error NotAnOperator()
error ExecutionFailed()
event OperatorAdded(address operator)
event OperatorRemoved(address operator)
function isOperator(address account) external view returns (bool)
Check if an account is an operator.
Name | Type | Description |
---|---|---|
account | address | Address of the account to check |
Name | Type | Description |
---|---|---|
[0] | bool | bool True if the account is an operator, false otherwise |
function addOperator(address operator) external
Adds an operator.
Name | Type | Description |
---|---|---|
operator | address | The address to add as an operator |
function removeOperator(address operator) external
Removes an operator.
Name | Type | Description |
---|---|---|
operator | address | The address of the operator to remove |
function executeContract(address target, bytes callData, uint256 nativeValue) external payable returns (bytes)
Executes an external contract call.
Execution logic is left up to the implementation.
Name | Type | Description |
---|---|---|
target | address | The contract to call |
callData | bytes | The data to call the target contract with |
nativeValue | uint256 | The amount of native asset to send with the call |
Name | Type | Description |
---|---|---|
[0] | bytes | bytes The data returned from the contract call |