opensea-creatures
opensea-creatures copied to clipboard
Customising collection page when using CreatureFactory
I've created a contract based on this repo, using the factory method where the creature contract is owned by the factory contract. I want to customize the collection page as described here, but no edit button appears.
I assume this is because my metamask account isn't the owner of the contract itself, but instead the factory contract. How can I edit the collection page?
It should editable via contract-level metadata https://docs.opensea.io/docs/contract-level-metadata but unfortunately, they didn't provide any key to set banner URL and profile URL so my solution is to be an owner of the creature contract and send creature address as a parameter when deploying factory instead of creating creature contract inside factory contract.
Learnt this the hard way
Hi, having the same issue myself, surprised the sample hasn't been updated to resolve it as this is surely what everyone wants to do. Please could someone show the steps involved to fix this as @akantora mentioned above for us newbies? Thanks!
Here's an easy solution that generally works. When you deploy your contract, just deploy the NFT contract first, like this:
DEPLOY_CREATURES=1 yarn truffle deploy --network live
Then you need to mint at least one NFT, like this:
node scripts/mint.js
Then go on to opensea and update your template and make all the changes you need to make.
Once you have everything the way you want, make a copy of migrations/2_deploy_contracts.js and call it 3_deploy_factory.js.
Then run migrations again, but this time like this:
DEPLOY_CREATURES_SALE=1 yarn truffle deploy --network live
This will create your factory contract and transfer ownership of your NFT contract to the factory. Once you run this migration, you will no longer be able to update the collection metadata, so make sure you have updated your collection before you do this.
It's important that you follow the steps in this order.