0

Pardon me if I sound lame.

I have read tutorials about creating NFT in Solidity but those examples were for a single item. How sites like Openseas create NFT contracts on the fly, especially when you have to mention JSON files and other things. Do they literally create a new `.sol file for each uploaded item?

Thanks

1

What they may be implementing is called a contract factory pattern. One would have a deployed contract, the "factory", responsible for calling the constructor of the new contracts and then keeping track of their addresses.

Helpful (and short) article:

https://research.csiro.au/blockchainpatterns/general-patterns/contract-structural-patterns/factory-contract/

Youtube video:

https://www.youtube.com/watch?v=Es0AfhcyXx0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.