Galler NFT Metadata Standard

Galler NFT Metadata Standard

Metadata format

Implementing token URI

For off-chain metadata for BEP721/ERC721 assets, contract need to implement BEP721Metadata/ERC721Metadata interfaces. You should implement the 'tokenURI' function in the Contract:


    /// @notice A distinct Uniform Resource Identifier (URI) for a given asset.
    /// @dev Throws if `_tokenId` is not a valid NFT. URIs are defined in RFC
    ///  3986. The URI may point to a JSON file that conforms to the "ERC721
    ///  Metadata JSON Schema".
    function tokenURI(uint256 _tokenId) external view returns (string);

The tokenURI function in your Contract should return an HTTP or IPFS URL. When queried, this URL should in turn return a JSON blob of data with the metadata for your token.

Metadata format

{
    "name":"NFT Name",
    "description":"NFT Description, MAX LENGTH 500 char",
    "image":"https://somedomain.com/pic/xxxx.jpg",
    "attributes":[
        {
            "trait_type":"Trait Type 1",
            "value":"Trait Value"
        },
        {
            "trait_type":"Trait Type 2",
            "value":"Trait Value"
        }
    ]
}
Data
nameNFT nameMax 200 characters
descriptionNFT description textMax 500 characters
ImageURL of image
attributesNFT attributesAll should be placed as a JSON array in the “attributes” object. attribute name keep in “trait_type”, and value keep in “value”.
trait_type and value Max 128 characters
Max attributes number 20

Attributes specification

trait_type is the name of trait, should be a readable text;

value is the value of trait, should be readable text, number is also supported;

Metadata example

{
    "name":"#2",
    "description":"BladeRunner Punks are the new generation of punk avatars. 10,000 futuristic dystopian PFPs newly constructed from scratch from over 100 traits, to a defined punk DNA rarity system. With a cool clean confident look, always forward facing and drawing eye-to-eye contact, they emanate strong identity and status.",
    "image":"https://bladerunner-punks.cryptohelper.io/2.png",
    "attributes":[
        {
            "trait_type":"Rarity Class",
            "value":"Normal"
        },
        {
            "trait_type":"Type",
            "value":"Male"
        },
        {
            "trait_type":"Face",
            "value":"Mole"
        },
        {
            "trait_type":"Beard",
            "value":"Chinstrap"
        },
        {
            "trait_type":"Hair",
            "value":"Frumpy Hair"
        },
        {
            "trait_type":"Eyes",
            "value":"VR"
        }
    ]
}