GID registrar abi doc
ExecuteMsg
1. Register new token(controller only)
ExecuteMsg::Register
Json Parameters
name type data type description token_info required oehect/TokenInfo regist token info name required string token name duration optional integer expires duration
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"set_record":{"node":[116,159,43,71,155,69,229,218,142,76,190,205,146,110,233,166,247,141,181,66,79,166,153,59,110,202,186,186,93,115,107,18],"owner":"GIO_OWNER_ADDRESS","resolver":"resolver_address","ttl":1}}" --from wallet $TXFLAG -y
2. Add new controller(admin only)
ExecuteMsg::AddController
3. Remove controller(admin only)
ExecuteMsg::RemoveController
4.Set config(admin only)
ExecuteMsg::SetConfig
Json Parameters
name type data type description grace_period required integer grace period for expires check registry_address required string registry contract address owner required string contract owner address
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"remove_controller":{"address": "CONTROLLER_ADDRESS"}}" --from wallet $TXFLAG -y
5.Renew token duration by id(controller only)
ExecuteMsg::Renew
6. Transfer token to another account
ExecuteMsg::TransferNft
7. Send token to contract
ExecuteMsg::SendNft
Json Parameters
name type data type description contract required string recipient contract addresss token_id required string transfer token id msg required binanry raw msg
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"send_nft":{"token_id": "TOKEN_ID", "contract": "RECIPIENT_CONTRACT_ADDRESS", "msg": "0x01"}}" --from wallet $TXFLAG -y
8. Approve(Allows operator to transfer / send the token from the owner's account)
ExecuteMsg::Approve
Json Parameters
name type data type description spender required string approve spender token_id required string token id expires optional object/expiration approve duration, at_height(integer)/at_time(integer)/never{}
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"approve":{"spender": "SPENDER_ADDRESS", "token_id": "APPROVE_TOKEN_ID","expires": {"never":{}}}}" --from wallet $TXFLAG -y
9. Revoke(remove approve spender)
ExecuteMsg::Approve
10. Approve all (Add operator from the owner's account)
ExecuteMsg::ApproveAll
Json Parameters
name type data type description operator required string approve spender expires optional object/expiration approve duration, at_height(integer)/at_time(integer)/never{}
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"approve_all":{"operator": "SPENDER_ADDRESS","expires": "never"}}}" --from wallet $TXFLAG -y
11. Revoke all (remove operator from the owner's account)
ExecuteMsg::RevokeAll
12. Burn token
ExecuteMsg::Burn
13. Mint token(admin only)
ExecuteMsg::Mint
Json Parameters
name type data type description mint required object/mint mint token infomation
Example call
gotabitd tx wasm execute $REGISTRAR_CONTRACT $NODE "{"mint":{"token_id":"TOKEN_ID","owner":"OWNER_ADDRESS","token_uri":"Allows the owner to petrify anyone looking at him or her","extension":"token_extra_infomation"}}" --from wallet $TXFLAG -y
QueryMsg
1. Query config
QueryMsg::GetConfig
Json Parameters
None
Binary Reponse
name data type description grace_period integer grace period registry_address string registry contract address owner string owner address base_node bytes base node base_name string base node name
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"get_config":{}}" --from wallet $TXFLAG -y
2. Query registry contract address
QueryMsg::GetRegistry
3. Query grace period
QueryMsg::GetGracePeriod
4. Query base node
QueryMsg::GetBaseNode
5. Query token id
QueryMsg::IsAvailable
6. Query expires by given id
QueryMsg::GetExpires
7. Query owner of the given token
QueryMsg::OwnerOf
Json Parameters
name type data type description token_id required string token id include_expired optional bool filter expired
Binary Reponse
name type data type description owner string token owner approvals array/object approval approvals
approval object
name type data type description spender string spender address expires object expires enum. at_height{u64)/at_time(integer)/never{}
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"owner_of":{"token_id": "TOKEN_ID", "include_expired": true}}" --from wallet $TXFLAG -y
8. Query approval of the given token
QueryMsg::Approval
Json Parameters
name type data type description token_id required string token id spender required string spender address include_expired optional bool filter expired
Binary Reponse
name type data type description approvals object approval approvals
approval object
name type data type description spender string spender address expires object expires enum. at_height{u64)/at_time(integer)/never{}
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"approval":{"token_id": "TOKEN_ID", "include_expired": true, "spender": "SPENDER_ADDRESS"}}" --from wallet $TXFLAG -y
9. Query approvals of the given token
QueryMsg::Approvals
Json Parameters
name type data type description token_id required string token id include_expired optional bool filter expired
Binary Reponse
name type data type description approvals array/object approval approvals
approval object
name type data type description spender string spender address expires object expires enum. at_height{u64)/at_time(integer)/never{}
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"approvals":{"token_id": "TOKEN_ID", "include_expired": true, "spender": "SPENDER_ADDRESS"}}" --from wallet $TXFLAG -y
10. Query all operators for given owner
QueryMsg::AllOperators
Json Parameters
name type data type description owner required string owner address include_expired optional bool filter expired start_after optional string filter key limit optional integer pagination limit
Binary Reponse
name type data type description operators array/object approval approvals
approval object
name type data type description spender string spender address expires object expires enum. at_height{u64)/at_time(integer)/never{}
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"all_operators":{"owner": "OWNER_ADDRESS", "include_expired": true, "start_after": None, "limit": 10}}" --from wallet $TXFLAG -y
11. Query numbers of token
QueryMsg::NumTokens
12. Query contract infomation
QueryMsg::ContractInfo
13. Query nft infomation
QueryMsg::NftInfo
Json Parameters
name type data type description token_id required string token id
Binary Reponse
name type data type description token_uri string token uri extension string extension raw msg
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"nft_info":{"token_id": "TOKEN_ID"}}" --from wallet $TXFLAG -y
14. Query all nft infomation
QueryMsg::AllNftInfo
Json Parameters
name type data type description token_id required string token id expires optional object expires enum. at_height{u64)/at_time(integer)/never{}
Binary Reponse
name type data type description access object access infomation info object nft info
access object
name type data type description owner string token owner approvals array/object approval approvals
info object
name type data type description token_uri string token uri extension string extension raw msg
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"nft_info":{"token_id": "TOKEN_ID"}}" --from wallet $TXFLAG -y
15. Query all tokens owned by the given address
QueryMsg::Tokens
Json Parameters
name type data type description owner required string token id start_after optional string filter key limit optional integer pagination limit
Binary Reponse
name type data type description tokens array/string tokens id
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"tokens":{"owner": "OWNER_ADDRESS", "start_after": None, "limit": 20}}" --from wallet $TXFLAG -y
16. Query all tokens
QueryMsg::AllTokens
Json Parameters
name type data type description start_after optional string filter key limit optional integer pagination limit
Binary Reponse
name type data type description tokens array/string tokens id
Example call
gotabitd tx wasm query $REGISTRAR_CONTRACT $NODE "{"all_tokens":{"start_after": None, "limit": 20}}" --from wallet $TXFLAG -y