opensea-erc1155
opensea-erc1155 copied to clipboard
What is the purpose of having MyFactory.sol?
As I understood everything corretly, the final NFT contract is called MyCollectible
.
But this example contains also a contract called MyFactory.sol
which seems to be something like a Proxy as it also provides functions like balanceOf
and safeTransferFrom
, which are delegated to the MyCollectible
-implementation.
What is the purpose of this class? Can we get some more documentation about this pls? Has it something to do with OpenSea-compatibility?
Thanks everybody in advance for any explanation!
I was also asking myself this question while reading the code.
My thoughts:
- The choice of the word "factory" is a bit confusing, as no additional contracts are actually deployed here. The "new" keyword isn't to be found anywhere.
- The "MyFactory.sol" contract is simply a separation of concerns providing application logic outside of the actual "MyCollectible.sol" ERC1155 contract.
I hope that this helps!