solidity – How Opensea Picks Up Base URIs and What Happens When Updated

erc-721nftopenseasolidity

I was trying to create an ERC721 contract with an upgradeable URI method (to help the inclusion of extra NFTs in the future). I created the contract and minted an NFT. After that, I updated the baseURI, but Opensea fails to pick up the new URI and put changes to the already minted NFT (like the name or image).

Any idea why is this happening, or how can I achieve my goal here?

function _baseURI() internal view override returns (string memory) {
        return baseURI_;
    }

    function updateBaseURI(string memory newURI) public onlyOwner {
        baseURI_ = newURI;
    }

Best Answer

I believe they index the token uri and image at time of mint, but you should be able to update the metadata of each token on opensea. You can also try an endpoint refresh like alchemy has here: https://docs.alchemy.com/reference/reingestcontract

enter image description here

Related Topic