Skip to main content

GID resolver abi doc

ExecuteMsg


1. Set text data

ExecuteMsg::SetTextDatas

Json Parameters

nametypedata typedescription
noderequiredbytesnode
valuesrequiredarray/tuple(string, string)text datas. (key, value)

Example call

 gotabitd tx wasm execute $RESOLVER_CONTRACT $NODE "{"set_text_datas":{"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],"values": [["KEY_1","VALUE_1"]]}}" --from wallet $TXFLAG -y

2. Set node content hash

ExecuteMsg::SetContentHash

Json Parameters

nametypedata typedescription
noderequiredbytesnode
hashrequiredbytesnode hash

Example call

 gotabitd tx wasm execute $RESOLVER_CONTRACT $NODE "{"set_content_hash":{"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],"hash": [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]}}" --from wallet $TXFLAG -y

3. Set config(owner only)

ExecuteMsg::SetConfig

Json Parameters

nametypedata typedescription
interface_idrequiredintegerinterface id
registry_addressrequiredbytesregistry contract address
ownerrequiredstringowner address

Example call

 gotabitd tx wasm execute $RESOLVER_CONTRACT $NODE "{"set_config":{"interface_id":2,"registry_address":"REGISTRY_ADDRESS","owner":"OWNER_ADDRESS" }}" --from wallet $TXFLAG -y

4. Delete text data by keys

ExecuteMsg::DeleteTextDatas

Json Parameters

nametypedata typedescription
noderequiredbytesnode
keysrequiredarray/stringdelete text data keys

Example call

 gotabitd tx wasm execute $RESOLVER_CONTRACT $NODE "{"delete_text_datas":{"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],"keys":["KEYS1"] }}" --from wallet $TXFLAG -y

QueryMsg


1. Get text datas by the keys

QueryMsg::GetTextDatas

Json Parameters

nametypedata typedescription
noderequiredbytesnode
keysrequiredarray/stringtext data keys

Binary Reponse

namedata typedescription
dataarray/tuple(string,string)text datas. (key, value)

Example call

 gotabitd tx wasm query $RESOLVER_CONTRACT$NODE "{"delete_text_datas":{"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],"keys":["KEYS1"] }}" --from wallet $TXFLAG -y

2. Get keys by the node

QueryMsg::GetKeys

Json Parameters

nametypedata typedescription
noderequiredbytesnode
pagerequiredintegerpagination page
limitrequiredintegerpagination limit

Binary Reponse

namedata typedescription
keysarray/stringtext data keys
totalintegerkeys number

Example call

 gotabitd tx wasm query $RESOLVER_CONTRACT$NODE "{"get_keys":{"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],"page":0, "limit": 10}}" --from wallet $TXFLAG -y

3. Get content hash by the node

QueryMsg::GetContentHash

Json Parameters

nametypedata typedescription
noderequiredbytesnode

Binary Reponse

namedata typedescription
hashbytescontent hash

Example call

 gotabitd tx wasm query $RESOLVER_CONTRACT$NODE "{"get_content_hash":{"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]}}" --from wallet $TXFLAG -y

4. Get contract config

QueryMsg::GetConfig

Json Parameters

None

Binary Reponse

namedata typedescription
interface_idintegercontract interface id
registry_addressstringregistry contract address
ownerstringowner address

Example call

 gotabitd tx wasm query $RESOLVER_CONTRACT$NODE "{"get_config":{}}" --from wallet $TXFLAG -y