【问题标题】:NFT not revealed on opensea mainnent but revealed on testnetNFT 未在 opensea mainnent 上公开,但在 testnet 上公开
【发布时间】:2022-12-03 10:17:48
【问题描述】:

我在测试网上测试了我的合约,它显示了 NFT,但没有在主网上显示。

我在合约中设置了一些变量来打开和关闭 NFT。

bool public revealed = true;

此外,tokenURI 具有以下功能:

function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
    require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
    require(tokenId < _tokenIdCounter.current(), "Token ID must be less than the total supply");
    if(!revealed) {
        return notRevealedUri;
    }
    string memory currentBaseURI = _baseURI();
    return bytes(currentBaseURI).length > 0 
        ? string(
            abi.encodePacked(
                currentBaseURI, 
                tokenId.toString(), 
                baseExtension))
                : "";
}

这是测试网 rinkeby 链接: https://rinkeby.etherscan.io/address/0x8b631a5528df6d9383a636af81fc1233ed8736f4 https://testnets.opensea.io/assets/0x8B631a5528dF6d9383a636Af81FC1233eD8736F4/0

主网未在 opensea 上显示: https://opensea.io/collection/sacc

我将相同的合约部署到 rinkeby 和主网上,所以很惊讶 NFT 在测试网上显示时没有在主网上显示。

如果有人能在这里帮助我,我会很高兴。

【问题讨论】:

    标签: blockchain solidity smartcontracts nft opensea


    【解决方案1】:

    我看到你解决了这个问题。你做了什么?我现在面临同样的问题

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-11-24
      • 1970-01-01
      • 1970-01-01
      • 2022-01-17
      • 2019-08-08
      • 1970-01-01
      • 2021-11-16
      • 2021-10-07
      相关资源
      最近更新 更多