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.
Please note that if your token contract does not provide an owner with EIP-173, it must provide
administration methods on the contract itself to interact with the registry otherwise the subscription
will be locked to the options set during construction.
OperatorNotAllowed
error OperatorNotAllowed(address operator)
Emitted when an operator is not allowed.
OPERATOR_FILTER_REGISTRY
contract IOperatorFilterRegistry OPERATOR_FILTER_REGISTRY
constructor
constructor(address subscriptionOrRegistrantToCopy, bool subscribe) internal
The constructor that is called when the contract is being deployed.
onlyAllowedOperator
modifier onlyAllowedOperator(address from)
A helper function to check if an operator is allowed.
onlyAllowedOperatorApproval
modifier onlyAllowedOperatorApproval(address operator)
A helper function to check if an operator approval is allowed.
_checkFilterOperator
function _checkFilterOperator(address operator) internal view virtual
A helper function to check if an operator is allowed.
_msgSender
function _msgSender() internal view virtual returns (address sender)