Skip to main content

OperatorFilterer

OperatorFilterer

Abstract contract whose constructor automatically registers and optionally subscribes to or copies another registrant's entries in the OperatorFilterRegistry.

This smart contract is meant to be inherited by token contracts so they can use the following: - onlyAllowedOperator modifier for transferFrom and safeTransferFrom methods. - onlyAllowedOperatorApproval modifier for approve and setApprovalForAll methods.

Methods​

OPERATOR_FILTER_REGISTRY​

function OPERATOR_FILTER_REGISTRY() external view returns (contract IOperatorFilterRegistry)

Returns​

NameTypeDescription
_0contract IOperatorFilterRegistryundefined

operatorRestriction​

function operatorRestriction() external view returns (bool)

Returns​

NameTypeDescription
_0boolundefined

setOperatorRestriction​

function setOperatorRestriction(bool _restriction) external nonpayable

Parameters​

NameTypeDescription
_restrictionboolundefined

Events​

OperatorRestriction​

event OperatorRestriction(bool restriction)

Parameters​

NameTypeDescription
restrictionboolundefined

Errors​

OperatorNotAllowed​

error OperatorNotAllowed(address operator)

Parameters​

NameTypeDescription
operatoraddressundefined