ProjectOpenSea / operator-filter-registry

MIT License
312 stars 93 forks source link

Update Operator not working? #59

Closed bilaljawed closed 1 year ago

bilaljawed commented 1 year ago

According to the Default operator registry code, the current owner of the smart contract or the smart contract itself can send request to update operators as shown in code below:

modifier onlyAddressOrOwner(address addr) { if (msg.sender != addr) { try Ownable(addr).owner() returns (address owner) { if (msg.sender != owner) { revert OnlyAddressOrOwner(); } } catch (bytes memory reason) { if (reason.length == 0) { revert NotOwnable(); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } _; }

The Ownable(addr) checks for the current owner, however, when I call the updateOperator with me being the owner, it throws an error. Am I missing something?

operatorfilterer commented 1 year ago

If your contract has an active subscription (eg, to OpenSea's registrant) you cannot make updates to the entry. You unsubscribe to curate your own list of filtered operators, optionally copying the existing ones in the process: https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/IOperatorFilterRegistry.sol#L15

Note that this means new filtered operators added to the default subscription will not be reflected by your contract, and if OpenSea detects sales by those operators, your collection will no longer be eligible for creator fee enforcement.