Doesn't show data on OpenSea

I tried to run your solidity code with my server url and it seems to be working and the images are loading at opensea.

But, when I try the same code with your server url the images are not loading at the opensea. :sweat_smile:

Here is the code that I used with my server url. and my metadata0, metadata1

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0; 
contract TestContract {
// Some logic
}

//Import ERC 1155 token contract from OpenZeppelin//

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol";

contract NFTContractTest2 is ERC1155, Ownable {

    uint256 public constant APICTURE1 = 0;
    uint256 public constant PICTURE2 = 1;

    constructor() ERC1155 ("https://0g4wexcx5qtg.usemoralis.com/{id}.json") {
        _mint(msg.sender, APICTURE1, 1, "");
        _mint(msg.sender, PICTURE2, 2, "");
    }

    function mint(address account,uint256 id,uint256 amount) public onlyOwner {
        _mint(account, id, amount, "");
    }

    function burn(address account, uint256 id, uint256 amount) public {
        require(msg.sender == account);
        _burn(account, id, amount);
    }

}
1 Like

Maybe try another server. Everything looks fine now using your new contract for tokens 1 and 2. Keep in mind that the JSON link for token 3 is still broken.

1 Like

Hi guys, the server was replaced, everything was rebuilt, the contract was generated, the result was not given. The meta data is not displayed.

https://rinkeby.etherscan.io/tx/0x9212ee14db8fd3dc41f0b8f5fc27848fbf57367a54dd9f973647e9ede64e7c0a

Any other ideas?

I get this metadata uri for token id 1:

https://iuql5ikmnexm.usemoralis.com/{id}.json

that points to this:

https://iuql5ikmnexm.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000001.json

that has this metadata:

{
     "image": "https://fmsamz8ufy99.usemoralis.com/picture2.png",
     "description": "Direct interaction of music on the appearance of a person and on his inner world",
     "name": "musical hairstyle",
     "external_url": "http://feed-product.com"
}

and this link doesn’t work: https://fmsamz8ufy99.usemoralis.com/picture2.png

1 Like

I replaced the server as your colleague recommended. And now it works:
https://iwwqp0mjkfzw.usemoralis.com/

https://iwwqp0mjkfzw.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000000.json

And this didn’t work:
https://iwwqp0mjkfzw.usemoralis.com/apicture1.png

Replaced only the link of the server.
Any thoughts?

You have to upload that image on that server. Using moralis-admin-cli. Or you can use ipfs urls and upload the image to IPFS.

1 Like

The link to the image file is working, the service is sensitive to CapsLock: https://iwwqp0mjkfzw.usemoralis.com/APICTURE1.png

1 Like

Links to the pictures work, the server is new, the code is checked, I created a new contract, but the metadata was not loaded on Opensea) it would not be as funny as it is insulting)!
What else to check?


https://rinkeby.etherscan.io/address/0x9ff2d7937812996faba87f0c13a72c1d6377ae14

Please post a link to instructions on how to download IPFS.

You also have to wait some time until opensea indexed that data.

For ipfs: https://docs.moralis.io/moralis-dapp/files/ipfs#saving-files

this one it looks like still has problems with not found

https://rinkeby.etherscan.io/address/0x9ff2d7937812996faba87f0c13a72c1d6377ae14

token_id 1 - image is broken

{
    "image": "https://iwwqp0mjkfzw.usemoralis.com/picture2.png",
    "description": "Direct interaction of music on the appearance of a person and on his inner world",
    "name": "musical hairstyle",
    "external_url": "http://feed-product.com"
}

token_id 2 - image is broken

{
    "image": "https://iwwqp0mjkfzw.usemoralis.com/picture3.png",
    "description": "New vision for the future",
    "name": "Toughness in the shell"
}

token_id 3 - token_uri doesn’t load

I’ve noticed that https://iwwqp0mjkfzw.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000000.json works which I assume is meant to be for token_id 1.

You need to correct all of these before things will work.

I rechecked everything, I used new pictures, everything works but is not displayed on Opensea

https://rinkeby.etherscan.io/tx/0x85f19af9ec7e20ead00575192452f20db3fe6bc73b8d3340c4270cc212f0e45f
Token_id 1 works:
https://iwwqp0mjkfzw.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000001.json
Picture displayed: https://iwwqp0mjkfzw.usemoralis.com/picture1.jpg

Token_id 2 works:
https://iwwqp0mjkfzw.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000002.json
Picture displayed: https://iwwqp0mjkfzw.usemoralis.com/picture2.jpg

Token_id 3 works:
https://iwwqp0mjkfzw.usemoralis.com/0000000000000000000000000000000000000000000000000000000000000003.json
Picture displayed: https://iwwqp0mjkfzw.usemoralis.com/picture3.jpg

Not displayed on Opensea:

If I understand correctly, then Opensea does not collect meta data on the test domain. Correctly? And why?
If it updates the data in time: 1) at what time? 2) how many times a day?

Guys, take a look, tell me, thanks!

I have a rinkeby test contract on opensea an it displays fine.but I have found that it only works if I name the json files 1.json, 2.json, etc. They appear almost instantly.See below:

I don’t understand why it works this way, and it doesn’t work with 64 chars

Me neither but I tried it with 64 chars originally and it doesn’t display on OpenSea!

what were the steps that you did for this last deploy that works on opensea?

I see that you also used ipfs in this case.

I renamed 1 json file, removed 63 characters and left 1, looks like this:https://iwwqp0mjkfzw.usemoralis.com/1.json
Deploy new contract.

Result: 1) title and description appeared; 2) the picture did not appear!

Guys, throw the typed code for IPFS, for files: index.html and main.js I’ll try to quickly make an experiment.

Did you check the image url to work? that particular image url from https://iwwqp0mjkfzw.usemoralis.com/1.json doesn’t work

I am creating a website that does all of the necessary steps itself:

  1. Add any number of images.
  2. Upload them into an IPFS folder.
  3. Upload the metadata to IPFS.
  4. Internally create a sol and compile it using solcjs.
  5. Deploy the contract using an ethers Contract Factory.

This will probably never go live as facebook have announced that they will be doing this but it keeps an old man occupied :grinning:

1 Like