ProjectOpenSea / operator-filter-registry

MIT License
312 stars 89 forks source link

It is necessary to add support for upgradeable smart contracts #9

Closed BedrosovaYulia closed 2 years ago

BedrosovaYulia commented 2 years ago

It is necessary to add support for upgradeable smart contracts

mwakkiy commented 2 years ago

I too think we need to support upgradeable smart contracts.

operatorfilterer commented 2 years ago

Thanks for creating an issue! What problems are you encountering with integrating OperatorFilterer or DefaultOperatorFilterer into an upgradeable smart contract? It's true that ExampleERC721 and ExampleERC1155 are not upgradeable, but they are intended only as examples of how to integrate the project into a new smart contract.

BedrosovaYulia commented 2 years ago

when i try to use DefaultOperatorFilterer in UUPS proxy implementation, Hardhat shows error:

Error: Contract ... is not upgrade safe

contracts/DefaultOperatorFilterer.sol:9: Contract DefaultOperatorFilterer has a constructor Define an initializer instead https://zpl.in/upgrades/error-001

contracts/OperatorFilterer.sol:12: Contract OperatorFilterer has a constructor Define an initializer instead https://zpl.in/upgrades/error-001

mwakkiy commented 2 years ago

I want to use openzeppelin-upgrades. There are some restrictions to do so.

https://github.com/OpenZeppelin/openzeppelin-upgrades

operatorfilterer commented 2 years ago

Thank you - we will be adding contracts that follow OpenZeppelin's upgradeable pattern sometime today.

operatorfilterer commented 2 years ago

This should be addressed with PR #13. Please reopen if you run into more issues.