Developer Resources

Two json files below will show the example and how to design NFT schema and also how to create metadata on chain.

Create meta is kind of mint data layer of Original NFT

First resource that we need is NFT Schema:

What is NFT schema

For NFT schema most of attributes and format based on Opensea Marketplace as ERC721( CW721 on cosmos ecosystem) for more understanding please take a look core module on Modules's section.

Below here are the examples for NFT schema and NFT data. You can design your own NFT but base on the example below!!!! and also

We need to replace code,name of NFT_Schema

NFT_Shema
{
    "code": "<string_of_organization.schemacode>__example::six.rocket_ticket",
    "name": "<string_of_name>__example::sixlauncher001",
    "owner": "0xNFTOWNER",
    "origin_data": {
        "origin_base_uri": "",
        "uri_retrieval_method": "BASE",
        "origin_chain": "GOERLI",
        "origin_contract_address": "0x9EC14dfF0049F8De41FE106f3221a50313F941aB",
        "attribute_overriding": "CHAIN",
        "metadata_format": "opensea",
        "origin_attributes": [
            {
                "name": "background",
                "data_type": "string",
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Background"
                    }
                }
            },
            {
                "name": "moon",
                "data_type": "string",
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Moon"
                    }
                }
            },
            {
                "name": "plate",
                "data_type": "string",
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Plate"
                    }
                }
            },
            {
                "name": "tail",
                "data_type": "string",
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Tail"
                    }
                }
            },
            {
                "name": "whale",
                "data_type": "string",
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Whale"
                    }
                }
            }
        ]
    },
    "onchain_data": {
        "reveal_required": true,
        "reveal_secret": "",
        "nft_attributes": [],
        "token_attributes": [
            {
                "name": "points",
                "default_mint_value": {
                    "number_attribute_value": {
                        "value": 0
                    }
                },
                "data_type": "number",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Points"
                    }
                }
            },
            {
                "name": "missions_accomplished",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "All Mission is done"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "started",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "Started"
                    }
                },
                "hidden_to_marketplace": false
            },
            {
                "name": "missions_passed",
                "default_mint_value": {
                    "number_attribute_value": {
                        "value": 1
                    }
                },
                "data_type": "number",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Missions Passed",
                        "max_value": 12
                    }
                },
                "hidden_to_marketplace": false
            },
            {
                "name": "jan_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "January Claim"
                    }
                },
                "hidden_to_marketplace": false
            },
            {
                "name": "feb_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "February Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "mar_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "March Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "apr_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "April Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "may_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "May Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "jun_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "June Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "jul_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "July Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "aug_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "August Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "sep_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "September Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "oct_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "October Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "nov_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "November Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "dec_claim",
                "default_mint_value": {
                    "boolean_attribute_value": {
                        "value": false
                    }
                },
                "data_type": "boolean",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "bool_true_value": "Yes",
                    "bool_false_value": "No",
                    "opensea": {
                        "trait_type": "December Claim"
                    }
                },
                "hidden_to_marketplace": true
            },
            {
                "name": "start_time",
                "default_mint_value": {
                    "string_attribute_value": {
                        "value": ""
                    }
                },
                "data_type": "string",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Start Time"
                    }
                }
            },
            {
                "name": "start_time_bangkok",
                "default_mint_value": {
                    "string_attribute_value": {
                        "value": ""
                    }
                },
                "data_type": "string",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Start Bangkok Time"
                    }
                }
            },
            {
                "name": "start_block",
                "default_mint_value": {
                    "string_attribute_value": {
                        "value": ""
                    }
                },
                "data_type": "string",
                "required": true,
                "display_value_field": "value",
                "display_option": {
                    "opensea": {
                        "trait_type": "Start Time"
                    }
                }
            }
        ],
        "actions": [
            {
                "name": "start_mission",
                "desc": "Start Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('started') == false",
                "then": [
                    "meta.SetBoolean('started', true)",
                    "meta.SetNumber('missions_passed', meta.GetNumber('missions_passed') + 1)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 300)",
                    "meta.SetString('start_block',meta.GetBlockHeight())",
                    "meta.SetString('start_time',meta.GetUTCBlockTimestamp('2006-01-02T15:04:05Z07:00'))",
                    "meta.SetString('start_time_bangkok',meta.GetBlockTimestampByZone('Asia/Bangkok','2006-01-02T15:04:05Z07:00'))"
                ]
            },
            {
                "name": "claim_jan",
                "desc": "Claim Jan Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('jan_claim') == false && meta.BlockTimeUTCBefore('2022-02-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-01-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('jan_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_feb",
                "desc": "Claim Feb Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('feb_claim') == false && meta.BlockTimeUTCBefore('2022-03-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-02-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('feb_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_mar",
                "desc": "Claim Mar Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('mar_claim') == false && meta.BlockTimeUTCBefore('2022-04-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-03-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('mar_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_apr",
                "desc": "Claim Apr Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('apr_claim') == false && meta.BlockTimeUTCBefore('2022-05-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-04-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('apr_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_may",
                "desc": "Claim May Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('may_claim') == false && meta.BlockTimeUTCBefore('2022-06-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-05-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('may_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_jun",
                "desc": "Claim Jun Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('jun_claim') == false && meta.BlockTimeUTCBefore('2022-07-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-06-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('jun_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_jul",
                "desc": "Claim Jul Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('jul_claim') == false && meta.BlockTimeUTCBefore('2022-08-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-07-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('jul_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_aug",
                "desc": "Claim Aug Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('aug_claim') == false && meta.BlockTimeUTCBefore('2022-09-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-08-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('aug_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_sep",
                "desc": "Claim Sep Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('sep_claim') == false && meta.BlockTimeUTCBefore('2022-10-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-09-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('sep_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_oct",
                "desc": "Claim Oct Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('oct_claim') == false && meta.BlockTimeUTCBefore('2022-11-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-10-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('oct_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_nov",
                "desc": "Claim Nov Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('nov_claim') == false && meta.BlockTimeUTCBefore('2022-12-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-11-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('nov_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "claim_dec",
                "desc": "Claim Dec Mission",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('dec_claim') == false && meta.BlockTimeUTCBefore('2023-01-17T00:00:01Z','2006-01-02T15:04:05Z07:00') && meta.BlockTimeUTCAfter('2022-12-01T00:01:00Z','2006-01-02T15:04:05Z07:00')",
                "then": [
                    "meta.SetBoolean('dec_claim', true)",
                    "meta.SetNumber('points', meta.GetNumber('points') + 100)"
                ]
            },
            {
                "name": "transform",
                "desc": "Transform",
                "disable":false,
                "params":[],
                "when": "meta.GetBoolean('missions_accomplished') == false && meta.GetNumber('missions_passed') == 12",
                "then": [
                    "meta.SetBoolean('missions_accomplished', true)",
                    "meta.SetImage(meta.ReplaceAllString(meta.GetImage(),'.jpeg','-t.jpeg'))"
                ]
            },
            {
                "name": "burn",
                "desc": "Burn Points",
                "disable":false,
                "params" : [
                    {
                        "name": "points",
                        "desc": "Points",
                        "data_type": "number",
                        "required" : true,
                        "default_value": "10"
                    },
                    {
                        "name": "minimum_balance",
                        "desc": "Minimum balance before redeem",
                        "data_type": "number",
                        "required" : false,
                        "default_value": "10"
                    }
                ],
                "when": "meta.GetBoolean('started') == true",
                "then": [
                    "meta.SetNumber('points', meta.GetNumber('points') - params['points'].GetNumber())"
                ]
            },
            {
                "name": "hide_attribute",
                "desc": "Test Dyamic hidden to marketplace",
                "disable":false,
                "params" : [
                    {
                        "name": "attribute_name",
                        "desc": "Attribute name",
                        "data_type": "string",
                        "required" : true
                    },
                    {
                        "name": "hide",
                        "desc": "value",
                        "data_type": "string",
                        "required" : true
                    }
                ],
                "when": "meta.GetBoolean('started') == true || meta.GetBoolean('started') == false",
                "then": [
                    "meta.SetDisplayArribute(params['attribute_name'].GetString(), params['hide'].GetString())"
                ]
            },
            {
                "name": "transfer",
                "desc": "Test Transfer",
                "disable":false,
                "params" : [
                    {
                        "name": "points",
                        "desc": "Points",
                        "data_type": "number",
                        "required" : true,
                        "default_value": "10"
                    },
                    {
                        "name": "token_id",
                        "desc": "Token Id",
                        "data_type": "string",
                        "required" : true,
                        "default_value": ""
                    }
                ],
                "when": "meta.GetNumber('points') > 0 && params['points'].GetNumber() > 0 ",
                "then": [
                    "meta.TransferNumber('points',params['token_id'].GetString(),params['points'].GetNumber())"
                ]
            }
        ],
        "nft_attributes_value": []
    },
    "mint_authorization": "system"
}

Second resource is NFT Metadata

To make it easy to deploy please DO NOT replace SCHEMA_CODE, TOKENID of NFT_Metadata

NFT_Metadata
{
  "nft_schema_code": "SCHEMA_CODE",
  "token_id": "TOKENID",
  "token_owner": "0xb7c2468b9481CbDfD029998d6bA98c55072d932e",
  "owner_address_type": "ORIGIN_ADDRESS",
  "origin_image": "https://ipfs.io/ipfs/QmUd5xBxZucHQyUkqkCCtfZ3iktSSmEEyhuX1u48bP4WE7/whale.jpeg",
  "onchain_image": "",
  "token_uri": "",
  "origin_attributes": [
    {
      "name": "background",
      "string_attribute_value": {
        "value": "Blue"
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "moon",
      "string_attribute_value": {
        "value": "White"
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "plate",
      "string_attribute_value": {
        "value": "Red"
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "tail",
      "string_attribute_value": {
        "value": "Red"
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "whale",
      "string_attribute_value": {
        "value": "Whale"
      },
      "hidden_to_marketplace": false
    }
  ],
  "onchain_attributes": [
    {
      "name": "missions_passed",
      "number_attribute_value": { 
        "value": "0" 
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "consequent_disable",
      "number_attribute_value": { 
        "value": "0" 
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "jan_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "feb_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "mar_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "apr_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "may_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "jun_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "jul_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "aug_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "sep_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "oct_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "nov_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "dec_claim",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "started",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    },
    {
      "name": "missions_completed",
      "boolean_attribute_value": {
        "value": false
      },
      "hidden_to_marketplace": false
    }
  ]
}

Last updated