Opensea not picking up metadata for ERC-1155 contract

458 views Asked by At

I have an ERC-1155 smart contract deployed to the Goerli testnet. My contract inherits from the OpenZeppelin ERC1155 contract and uses its uri function. The URI I initiated the contract with is of the format https://token-cdn-domain/{id}.json as explained here. I have one minted item with id=1 and the metadata file for this item is served from https://token-cdn-domain/0000000000000000000000000000000000000000000000000000000000000001.json.

Opensea does not pick up the metadata.

When I call the opensea validate endpoint I get the following:

{
    "valid": true,
    "token_uri": null,
    "errors": []
}
1

There are 1 answers

0
0xED0 On BEST ANSWER

The problem was apparently using an Infura URL for my metadata (https://...infura.io/ipfs/...). When I changed my metadata to have the ipfs link directly (https://ipfs.io/ipfs/...) it solved the problem.

I'm guessing the reason it wasn't working was the Infura URL redirects the request and Opensea apparently doesn't know how to handle this redirect.