Skip to content

Instantly share code, notes, and snippets.

@rcaloras
rcaloras / opensea-refresh-metadata.js
Created January 6, 2023 20:42
Opensea metadata refresh script. For chains that aren't supported via API.
// Paste this script into the console on a specfic NFT detail page for your collection.
// e.g. https://opensea.io/assets/ethereum/0x1485297e942ce64e0870ece60179dfda34b4c625/3723
// Adjust i on the for loop for the range of nfts you wish to refresh
// Should work for all chains including Polygon and testnets.
// Returns a Promise that resolves after "ms" Milliseconds
const timer = ms => new Promise(res => setTimeout(res, ms))
async function refresh_metadata() { // We need to wrap the loop into an async function for this to work
for (var i = 1; i <= 1326; i++) {