chiru-labs / ERC721A

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

Failed to import ERC721A(v4.1.0) contract on OpenSea #354

Open jovijovi opened 2 years ago

jovijovi commented 2 years ago

ERC721A(v4.1.0) contract deployed on Polygon(mumbai), but encountered some problems.

Thank you :D

Vectorized commented 2 years ago

Try the following:

If all else fails, just use the last configuration that works for you.

jovijovi commented 2 years ago

Try the following:

  • Publish on Rinkeby.
  • Choose a different RPC provider (Infura, Alchemy).
  • Mint several tokens in multiple transactions.
  • npx hardhat clean; npm clean-install

If all else fails, just use the last configuration that works for you.

Test ERC721A v4.0.0 & v4.1.0:

roderik commented 2 years ago

I have the same, including on the mainnet for polygon

alvinlubetkin commented 2 years ago

Im having the same issue with mumbai, rinkeby, eth mainnet and polygon. Downgrading to 0.4.0 didnt seem to help either Anybody know how to get around this?

softmuneeb commented 2 years ago

You should create this issue also on opensea repo.

halversonmd commented 2 years ago

I had this same problem. The solution for me wasn't with Opensea, it was the updated ERC721A API. One step Opensea takes to validate a contract is calling supportsInterface for ERC721. The old way to support this function is broken with v4.x. The breaking change and solution is documented here and here.

Make sure to test this method yourself with something like this:


const nftContract = new web3.eth.Contract(contract.abi, contractAddress)

// - IERC165: 0x01ffc9a7
// - IERC721: 0x80ac58cd
// - IERC721Metadata: 0x5b5e139f
// - IERC2981: 0x2a55205a
nftContract.methods.supportsInterface('0x80ac58cd').call(
    {}, 
    function(error, response) {
        // Opensea requires response to be true for an ERC721 / ERC721A contract
        console.log('supportsInterface response: ', response);
        console.log('error: ', error);
    }
)