TZIP-16
{
"name": "SmartPy FA1.2 Token Template",
"description": "Example Template for an FA1.2 Contract from SmartPy",
"authors": [
"SmartPy Dev Team "
],
"homepage": "https://smartpy.io",
"interfaces": [
"TZIP-007-2021-04-16"
],
"views": [
{
"name": "token_metadata",
"pure": true,
"description": " This method will become an offchain view if the contract uses TZIP-016 metadata and the config `use_token_metadata_offchain_view` is set to TRUE. Return the token-metadata URI for the given token. (token_id must be 0) For a reference implementation, dynamic-views seem to be the most flexible choice. ",
"implementations": [
{
"michelsonStorageView": {
"parameter": {
"prim": "nat"
},
"returnType": {
"prim": "pair",
"args": [
{
"prim": "int"
},
{
"prim": "map",
"args": [
{
"prim": "string"
},
{
"prim": "bytes"
}
]
}
]
},
"code": [
{
"prim": "UNPAIR"
},
{
"prim": "SWAP"
},
{
"prim": "GET",
"args": [
{
"int": "5"
}
]
},
{
"prim": "SWAP"
},
{
"prim": "GET"
},
{
"prim": "IF_NONE",
"args": [
[
{
"prim": "PUSH",
"args": [
{
"prim": "int"
},
{
"int": "185"
}
]
},
{
"prim": "FAILWITH"
}
],
[
]
]
}
]
}
}
]
}
]
}