I am trying to implement contract level metadata so "description", "image", external_link": etc show up on marketplaces, particularly OpenSea.
I have done an extensive search of the forums and nothing has addressed this already, so hoping this thread will shed some light.
I have added the following lines in Remix:
string _contractURI = "https://MY-CONTRACTURI-METADATA.com
function contractURI() public view returns (string memory) {
return _contractURI;
}
This actually successfully allows contract level metadata to shows up on OpenSea!
However, OpenSea doesn’t refresh from the JSON URI after the first time – it seems to be set once and cannot be changed.
Is this correct?
OpenSea documentation and forums do not offer any advice.
Next, the code compiles and deploys correctly to testnets, but it doesn’t load the ABI interface for read and write contract like the example code given in Contracts Wizard etc.
If I remove that string and function and recompile and redeploy the contract to testnets, the ABI interface for read and write contract LOADS.
What am I doing incorrectly here?
I used a basic http-server instance and expose it with a basic routing in my house modem to serve the metadata.json
other thing that I seen, Opensea applies the metadata only when you deploy, it means that after deployment, if you decide to update the contract level metadata opensea will not refresh the collection.. <-- this behavior is at the time of writing
– Casareafer Jul 18 '22 at 02:19I know for sure these work: name description, image, external_link, seller_fee_basis_points, fee_recipient which are taken directly from https://docs.opensea.io/docs/contract-level-metadata
Interesting image works but image_url is the suggested field name through the link (https://docs.opensea.io/reference/collection-model) you found.
Likewise with seller_fee_basis_points works but dev_seller_fee_basis_points is the suggested field name.
And too, fee_recipient works but payout_address is the suggested field name.
– Nerrosa Jul 19 '22 at 15:10