Skip to content

Instantly share code, notes, and snippets.

@0xN1
Last active February 8, 2023 20:17
Show Gist options
  • Save 0xN1/3e3dcef485fb9893c6e9168b8ed4433e to your computer and use it in GitHub Desktop.
Save 0xN1/3e3dcef485fb9893c6e9168b8ed4433e to your computer and use it in GitHub Desktop.
force update OS metadata snippet. ref: https://docs.opensea.io/docs/metadata-standards
const totalSupply = 1000
const contractAddress = "0x000000000000000000000000000000000000"
for (let i = 0; i < totalSupply ; i++){
try {
await fetch(`https://api.opensea.io/api/v1/asset/${contractAddress}/${i}/?force_update=true`)
console.log(`token id ${i} done`)
} catch (error) {
console.log(error)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment