Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

IERC7540Operator

Interface of the base operator logic of ERC7540, as defined in https://eips.ethereum.org/EIPS/eip-7540

Functions

setOperator

Sets or removes an operator for the caller.

function setOperator(address operator, bool approved) external returns (bool);

Parameters

NameTypeDescription
operatoraddressThe address of the operator.
approvedboolThe approval status.

Returns

NameTypeDescription
<none>boolWhether the call was executed successfully or not

isOperator

Returns true if the operator is approved as an operator for an controller.

function isOperator(address controller, address operator) external view returns (bool status);

Parameters

NameTypeDescription
controlleraddressThe address of the controller.
operatoraddressThe address of the operator.

Returns

NameTypeDescription
statusboolThe approval status

Events

OperatorSet

The event emitted when an operator is set.

event OperatorSet(address indexed controller, address indexed operator, bool approved);

Parameters

NameTypeDescription
controlleraddressThe address of the controller.
operatoraddressThe address of the operator.
approvedboolThe approval status.