New answers tagged

0

I was returning a result that i assumed was 0 by default. Changed the function to; function getNFTBalance(address _owner) public view returns (uint256){ return nft.balanceOf(_owner); } Getting the right balance now


0

Set your _baseURI as "ipfs://" and put the content hash into _tokenURI. The relevant code is at https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/ERC721.sol#L141-L144 The result is your tokenURI(tokenID) will be the full IPFS URI.


1

Just create a JSON file following the "ERC721 Metadata JSON Schema" specified at https://eips.ethereum.org/EIPS/eip-721 Here is one simple example that meets the specification: { "name": "Square #00050", "description": "CoinGecko", "image": "https://tenthousandsu.com/erc721/00050....


1

Is it possible to somehow update an existing ERC-721 Token's MetaData after it was already minted? Yes. This is not disallowed by the standard and so you are free to do this. The official implementation of ERC-721 is maintained by 0xcert. It is free/open source and you can use the Metadata Mock contract as a starting point. You will simply add a public ...


Top 50 recent answers are included