I have deployed a basic ERC1155 importing the Openzeppelin libraries.
Here is my smart contract.
// SPDX-License-Identifier: MIT // Compatible with OpenZeppelin Contracts ^5.0.0 pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; contract MyToken is ERC1155 { address public platformOwner; modifier onlyOwner() { require(msg.sender == platformOwner, "Not an owner"); _; } constructor() ERC1155( "https://beige-top-pelican-586.mypinata.cloud/ipfs/QmQP6RzFRCqm8PeJoZSPgM8mohyAgrtuWdy2ZqyAcKUNtx/{id}.json" ) { platformOwner = msg.sender; } function setURI(string memory newuri) public onlyOwner { _setURI(newuri); } function mint( address account, uint256 id, uint256 amount, bytes memory data ) public onlyOwner { _mint(account, id, amount, data); } function mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public onlyOwner { _mintBatch(to, ids, amounts, data); } } And, here is the metadata json file :
{ "name": "Sun Heavens", "description": "Lorem ipsum...", "image": "https://lufinadevtest.oss-ap-south-1.aliyuncs.com/1715515909885-ss.png", "properties": { "simple_property": "example value", "rich_property": { "name": "Name", "value": "123", "display_value": "123 Example Value", "class": "emphasis", "css": { "color": "#ffffff", "font-weight": "bold", "text-decoration": "underline" } }, "array_property": { "name": "Name", "value": [ 1, 2, 3, 4 ], "class": "emphasis" } } } Please have a look at this ERC1155 smart contract NFT, it's name and image is visible on Etherscan.
So, I want make visible my ERC1155 NFT same like above.
Please provide me some reference or solution for it.
Let me know if anything else is required from my side.
I have taken the metadata format from here -> https://eips.ethereum.org/EIPS/eip-1155