Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

What is the purpose of having MyFactory.sol? #58

Open
MrsBookik opened this issue Oct 16, 2021 · 1 comment
Open

What is the purpose of having MyFactory.sol? #58

MrsBookik opened this issue Oct 16, 2021 · 1 comment

Comments

@MrsBookik
Copy link

MrsBookik commented Oct 16, 2021

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!

@fhouser
Copy link

fhouser commented Feb 20, 2022

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants