[SOLVED] Image are not laoding up on the opensea testnet

Hi i recently, deployed a smart contract from remix ide to opensea, but encountred a problem.

Problem:
Images are not loading on opensea testnet.

contract adress:
(https://mumbai.polygonscan.com/address/0x39F817A5C50C1A0616efCc00CAb152FA0EbbEF0A#readContract)

opensea testnet:

https://testnets.opensea.io/assets/mumbai/0x39f817a5c50c1a0616efcc00cab152fa0ebbef0a/2

Hi @Thayalan

You have a typo on your token URI prefix. It says IPFSS instead of IPFS

Thanks man.

Still unable to upload despite changed.

opensea testnet:

contract:

Your token Uri should be like below. The path for json is missing in the URI

ipfs://bafybeihnvw42eulx3cf6ibwnxk7eibycmwp5gdlr22juhtli6gm3uxucjy/0000000000000000000000000000000000000000000000000000000000000002.json

thanks man,
This is the original code:

pragma solidity >=0.4.22 <0.9.0;

import ‘@openzeppelin/contracts/token/ERC1155/ERC1155.sol’;

import ‘@openzeppelin/contracts/access/Ownable.sol’;

contract AI is Ownable, ERC1155 {

// Base URI

string private baseURI;

string public name;

constructor()

    ERC1155(

        'ipfs://bafybeihnvw42eulx3cf6ibwnxk7eibycmwp5gdlr22juhtli6gm3uxucjy/{id}.json'

    )

{

    setName('GF');

}

function setURI(string memory _newuri) public onlyOwner {

    _setURI(_newuri);

}



function setName(string memory _name) public onlyOwner {

    name = _name;

}

function mintBatch(uint256[] memory ids, uint256[] memory amounts)

    public

    onlyOwner

{

    _mintBatch(msg.sender, ids, amounts, '');

}

function mint(uint256 id, uint256 amount) public onlyOwner {

    _mint(msg.sender, id, amount, '');

}

}

can you help me to show the change, in order to come up with the esired token URI

Your new constructor looks correct. So it should return the correct token at opensea.

thanks for promp reply bro.

i tried the same code with different image and metadata, still same problem

testnet ad:

opensea:

code:
// SPDX-License-Identifier: MIT

pragma solidity >=0.4.22 <0.9.0;

import ‘@openzeppelin/contracts/token/ERC1155/ERC1155.sol’;

import ‘@openzeppelin/contracts/access/Ownable.sol’;

contract M is Ownable, ERC1155 {

// Base URI

string private baseURI;

string public name;

constructor()

    ERC1155(

        'ipfs://bafybeihyodx2kqngk6oxe4gq22sihzw3bvou2ntbenmw2s76xsohuvsrvq/{id}.json'

    )

{

    setName('Mouse');

}

function setURI(string memory _newuri) public onlyOwner {

    _setURI(_newuri);

}



function setName(string memory _name) public onlyOwner {

    name = _name;

}

function mintBatch(uint256[] memory ids, uint256[] memory amounts)

    public

    onlyOwner

{

    _mintBatch(msg.sender, ids, amounts, '');

}

function mint(uint256 id, uint256 amount) public onlyOwner {

    _mint(msg.sender, id, amount, '');

}

}

When i use the constructor my uri returns:
ipfs://bafybeihyodx2kqngk6oxe4gq22sihzw3bvou2ntbenmw2s76xsohuvsrvq/{id}.json

The id adress is not filled up, just says id.
BTW i used nft up for ipfs creation.

my image url:https://bafybeiageoamk4rl3aazb456xtremsl3y6ij7gaeraurghsijedyuk637m.ipfs.nftstorage.link/
my json url: https://bafybeihyodx2kqngk6oxe4gq22sihzw3bvou2ntbenmw2s76xsohuvsrvq.ipfs.nftstorage.link/

thanks

Hi @Thayalan

There is nothing wrong with your contract code. It could also be an issue from the opensea.

thanks bro, my first image has loaded up the other not yet.

I have emailed OpenSea for support lets see what happens.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.