opensea-erc1155 icon indicating copy to clipboard operation
opensea-erc1155 copied to clipboard

What is the purpose of having MyFactory.sol?

Open MrsBookik opened this issue 3 years ago • 1 comments

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!

MrsBookik avatar Oct 16 '21 12:10 MrsBookik

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!

fhouser avatar Feb 20 '22 16:02 fhouser