chiru-labs / ERC721A

https://ERC721A.org
MIT License
2.51k stars 841 forks source link

Metadata Missing on OpenSea after Very Large Batch Mint #345

Closed jim380 closed 2 years ago

jim380 commented 2 years ago

Context

I've been testing out batch minting with ERC721A and the result, particularly gas saving, has been amazing. One tiny issue, if the batch size is "too big", metadata starts to go missing on OpenSea despite accessible on-chain.

Test Case

Here I did a batch mint of 10,000. tokenId 3000 shows up just fine but tokenId 5000 doesn't. The metadata does exist on-chain however when queried:

$ npx hardhat token-uri --token-id 5000
Metadata URL: https://s3.eu-west-1.amazonaws.com/demo.hypermint.com/nfts/1?/5000
Metadata fetch response: {
  "description": "I always sleep with my bedroom lights on. They help me dream of bright ideas",
  "external_url": "https://hypermint.com",
  "image": "https://s3.eu-west-1.amazonaws.com/demo.hypermint.com/nfts/images/1.jpg",
  "name": "Bright Idea"
}

Not sure if this is a OpenSea specific issue but I thought I'd bring it up. The contract code can be found here. Thanks!

Vectorized commented 2 years ago

Oh dang! 5000 was still fine just last week!

We did the same tests too and the tokens started to go missing after the 6000th+ token.

I’ve contacted the OpenSea guys (through various means, cuz I know they are sometimes slow to reply to their helpdesk) and am awaiting a response.

For now, don’t mint too big a batch. Transferring the missing tokens or tokens after the missing tokens may help.

kabaluyot commented 2 years ago

I think its clearly stated in the docs, https://chiru-labs.github.io/ERC721A/#/tips?id=batch-size, to limit it in a reasonable number (around 20-30 qty per _mint or _safeMint).

If you wan to pass a large qty in your mint external function, you can split it to multiples of 20-30 in a loop.

jim380 commented 2 years ago

OpenSea has confirmed to us that this limit for them is 5000 per batch before metadata starts to go missing. ERC721A can do a lot of more than 5000 per batch during my testing. This issue was about OpenSea's limit on rendering/indexing metadata than the ERC721A code itself.