To Factory or not to Factory
that is the question This repo also includes a factory which is just another smart contract - the only purpose of which is to mint tokens. Deploying using a factory contract generally has higher upfront fees but costs less per-token to mint.
It also allows you to lazy mint, which means gas is due when each token is minted rather than upfront. The downside of lazy minting is users can't pick their token, they just get given the next available one. Using a factory contract doesn't mean you have to lazy mint - you could mint 50% and lazy mint the remainder, for example.
Personally I'd recommend using one, so that's what we're going to do in this tutorial, but I'll include a note on the alternative commands as we go.
I came across the above in the link.(https://stonk.industries/how-to-create-your-own-nft-using-the-opensea-creatures-template/)
It is said that gas cost is cheaper if function "mint" is executed through the factory.
But there is nothing about the reason and principle.
Can someone please explain..?
++ Looking at the factory smart contract code Opensea CreatureAccessoryFactory.sol, If you look at the "mint" function on line 113, it seems that the Mint function is just called with the ERC721 contract address.
Could this be the reason?