Skip to content

Query and Test Interface

POST chain_queryTransaction (Query and Test Interface)

APIpurpose:

Test transactions are executed locally first. Use the returned result to decide whether to submit the transaction to the network.

Query-result operations use the trial interface uniformly, returning results immediately without gas fees.

Example Code
Request
{
"jsonrpc": "3.0",
"method": "chain_queryTransaction",
"params": [
  {
    "from": "0xc3b6472d6370eaf4eb58fff19ce1724c9d61892c",
    "to": "0x6268af5542c4b0ccbb650a0aaccbfcdfbabf6b52",
    "value": "0x2E90EDD00",
    "sliceno": "0x2"
  },
  "",
  "encryp=none"
],
"id": "d2c8fe196f9f8d8ace952e9e"
}
Response
{
"jsonrpc":  "3.0",
 "id":  "055169b80c4e2ef96c2b2cbb",
 "result": {
  "ret":  "0",
   "err":  "",
   "content": {
    "ret_data":  "",
     //transactionexecutereturn value hexencoded "err":  "" //transactionexecutereturnerror
  }
}
}

On this page