Skip to main content

Call a view function on a contract by Hname

POST 

//v1/chains/:chainID/callview

Execute a view call. Either use HName or Name properties. If both are supplied, HName are used.

Request

Path Parameters

    chainID stringrequired

    ChainID (Bech32)

Body

required

Parameters

    arguments JSONDictrequired
    Items Item[]
  • Array [
  • key stringrequired

    key (hex-encoded)

    value stringrequired

    value (hex-encoded)

  • ]
  • block string
    contractHName stringrequired

    The contract name as HName (Hex)

    contractName stringrequired

    The contract name

    functionHName stringrequired

    The function name as HName (Hex)

    functionName stringrequired

    The function name

Responses

Result

Schema
    Items Item[]
  • Array [
  • key stringrequired

    key (hex-encoded)

    value stringrequired

    value (hex-encoded)

  • ]
curl -L -X POST '/v1/chains/:chainID/callview' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
--data-raw '{
"contractHName": "contractHName",
"functionName": "functionName",
"functionHName": "functionHName",
"arguments": {
"Items": [
{
"value": "value",
"key": "key"
},
{
"value": "value",
"key": "key"
}
]
},
"block": "block",
"contractName": "contractName"
}'
Request Collapse all
Base URL
Parameters
— pathrequired
Body required
{
  "contractHName": "contractHName",
  "functionName": "functionName",
  "functionHName": "functionHName",
  "arguments": {
    "Items": [
      {
        "value": "value",
        "key": "key"
      },
      {
        "value": "value",
        "key": "key"
      }
    ]
  },
  "block": "block",
  "contractName": "contractName"
}
ResponseClear

Click the Send API Request button above and see the response here!