TZIP-16
{
"name": "Temple Key",
"description": "Temple Key is the loyalty token for Temple Wallet users. Temple Wallet is an open-source, decentralized, and secure cryptocurrency wallet for the Tezos blockchain.",
"version": "1.0.0",
"source": {
"tools": [
"Ligo",
"Flextesa",
"Taqueria"
],
"location": "https://github.com/madfish-solutions/key-token/blob/v1.0.0/contracts/main/fa2.ligo"
},
"interfaces": [
"TZIP-012 git 1728fcfe",
"TZIP-016",
"TZIP-21"
],
"authors": [
"Madfish.Solutions <https://www.madfish.solutions>"
],
"errors": [
{
"error": {
"string": "FA2_TOKEN_UNDEFINED"
},
"expansion": {
"string": "Token with current tokenID does not exist"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_INSUFFICIENT_BALANCE"
},
"expansion": {
"string": "Token owner does not have enough tokens"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_TX_DENIED"
},
"expansion": {
"string": "Transaction is denied by Transfer Permission Policies"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_NOT_OWNER"
},
"expansion": {
"string": "Sender is not owner"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_NOT_OPERATOR"
},
"expansion": {
"string": "Sender is not operator of requested tokens"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_OPERATORS_UNSUPPORTED"
},
"expansion": {
"string": "Updating operators is not supported by Transfer Permission Policies"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_RECEIVER_HOOK_FAILED"
},
"expansion": {
"string": "The receiver hook failed"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_SENDER_HOOK_FAILED"
},
"expansion": {
"string": "The sender hook failed"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_RECEIVER_HOOK_UNDEFINED"
},
"expansion": {
"string": "Receiver hook is required by the permission behavior, but is not implemented by a receiver contract"
},
"languages": [
"en"
]
},
{
"error": {
"string": "FA2_SENDER_HOOK_UNDEFINED"
},
"expansion": {
"string": "Sender hook is required by the permission behavior, but is not implemented by a sender contract"
},
"languages": [
"en"
]
},
{
"error": {
"string": "SENDER_NOT_ADMIN"
},
"expansion": {
"string": "Sender is not Admin of contract"
},
"languages": [
"en"
]
},
{
"error": {
"string": "NO_METADATA_PROVIDED"
},
"expansion": {
"string": "Metadata does not exist in token metadata big map for requested token"
},
"languages": [
"en"
]
}
],
"views": [
{
"name": "token_metadata",
"implementations": [
{
"michelsonStorageView": {
"parameter": {
"prim": "nat",
"annots": [
"%token_id"
]
},
"returnType": {
"prim": "pair",
"args": [
{
"prim": "nat",
"annots": [
"%token_id"
]
},
{
"prim": "map",
"args": [
{
"prim": "string"
},
{
"prim": "bytes"
}
],
"annots": [
"%token_info"
]
}
]
},
"code": [
{
"prim": "UNPAIR"
},
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
},
{
"prim": "DUP",
"args": [
{
"int": "2"
}
]
},
{
"prim": "COMPARE"
},
{
"prim": "EQ"
},
{
"prim": "IF",
"args": [
[
],
[
{
"prim": "PUSH",
"args": [
{
"prim": "string"
},
{
"string": "FA2_TOKEN_UNDEFINED"
}
]
},
{
"prim": "FAILWITH"
}
]
]
},
{
"prim": "SWAP"
},
{
"prim": "GET",
"args": [
{
"int": "9"
}
]
},
{
"prim": "SWAP"
},
{
"prim": "GET"
},
{
"prim": "IF_NONE",
"args": [
[
{
"prim": "PUSH",
"args": [
{
"prim": "string"
},
{
"string": "NO_METADATA_PROVIDED"
}
]
},
{
"prim": "FAILWITH"
}
],
[
]
]
}
],
"annotations": [
{
"name": "%token_id",
"description": "Token ID for requesting metadata"
}
]
}
}
]
},
{
"name": "is_operator",
"implementations": [
{
"michelsonStorageView": {
"parameter": {
"prim": "pair",
"args": [
{
"prim": "address",
"annots": [
"%owner"
]
},
{
"prim": "pair",
"args": [
{
"prim": "address",
"annots": [
"%operator"
]
},
{
"prim": "nat",
"annots": [
"%token_id"
]
}
]
}
]
},
"returnType": {
"prim": "bool"
},
"code": [
{
"prim": "UNPAIR"
},
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
},
{
"prim": "DUP",
"args": [
{
"int": "2"
}
]
},
{
"prim": "GET",
"args": [
{
"int": "4"
}
]
},
{
"prim": "COMPARE"
},
{
"prim": "EQ"
},
{
"prim": "IF",
"args": [
[
],
[
{
"prim": "PUSH",
"args": [
{
"prim": "string"
},
{
"string": "FA2_TOKEN_UNDEFINED"
}
]
},
{
"prim": "FAILWITH"
}
]
]
},
{
"prim": "SWAP"
},
{
"prim": "GET",
"args": [
{
"int": "3"
}
]
},
{
"prim": "DUP",
"args": [
{
"int": "2"
}
]
},
{
"prim": "CAR"
},
{
"prim": "GET"
},
{
"prim": "IF_NONE",
"args": [
[
{
"prim": "EMPTY_SET",
"args": [
{
"prim": "address"
}
]
}
],
[
]
]
},
{
"prim": "SWAP"
},
{
"prim": "GET",
"args": [
{
"int": "3"
}
]
},
{
"prim": "MEM"
}
],
"annotations": [
{
"name": "%owner",
"description": "Owner address of requested tokens"
},
{
"name": "%operator",
"description": "Operator address of requested tokens"
},
{
"name": "%token_id",
"description": "Token ID for requesting"
}
]
}
}
]
},
{
"name": "all_tokens",
"implementations": [
{
"michelsonStorageView": {
"returnType": {
"prim": "list",
"args": [
{
"prim": "nat"
}
]
},
"code": [
{
"prim": "DROP"
},
{
"prim": "NIL",
"args": [
{
"prim": "nat"
}
]
},
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
},
{
"prim": "CONS"
}
]
}
}
]
},
{
"name": "total_supply",
"implementations": [
{
"michelsonStorageView": {
"parameter": {
"prim": "nat",
"annots": [
"%token_id"
]
},
"returnType": {
"prim": "nat"
},
"code": [
{
"prim": "UNPAIR"
},
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
},
{
"prim": "SWAP"
},
{
"prim": "COMPARE"
},
{
"prim": "EQ"
},
{
"prim": "IF",
"args": [
[
],
[
{
"prim": "PUSH",
"args": [
{
"prim": "string"
},
{
"string": "FA2_TOKEN_UNDEFINED"
}
]
},
{
"prim": "FAILWITH"
}
]
]
},
{
"prim": "GET",
"args": [
{
"int": "5"
}
]
}
],
"annotations": [
{
"name": "%token_id",
"description": "Token ID for requesting"
}
]
}
}
]
},
{
"name": "get_balance",
"implementations": [
{
"michelsonStorageView": {
"parameter": {
"prim": "pair",
"args": [
{
"prim": "address",
"annots": [
"%owner"
]
},
{
"prim": "nat",
"annots": [
"%token_id"
]
}
]
},
"returnType": {
"prim": "nat"
},
"code": [
{
"prim": "UNPAIR"
},
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
},
{
"prim": "DUP",
"args": [
{
"int": "2"
}
]
},
{
"prim": "CDR"
},
{
"prim": "COMPARE"
},
{
"prim": "EQ"
},
{
"prim": "IF",
"args": [
[
],
[
{
"prim": "PUSH",
"args": [
{
"prim": "string"
},
{
"string": "FA2_TOKEN_UNDEFINED"
}
]
},
{
"prim": "FAILWITH"
}
]
]
},
{
"prim": "SWAP"
},
{
"prim": "CAR"
},
{
"prim": "SWAP"
},
{
"prim": "CAR"
},
{
"prim": "GET"
},
{
"prim": "IF_NONE",
"args": [
[
{
"prim": "PUSH",
"args": [
{
"prim": "nat"
},
{
"int": "0"
}
]
}
],
[
]
]
}
],
"annotations": [
{
"name": "%owner",
"description": "Owner address of requested tokens"
},
{
"name": "%token_id",
"description": "Token ID for requesting"
}
]
}
}
]
}
]
}