chains

Call a view function on a contract by Hname

Changed on

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

post/v1/chains/{chainID}/callview

Request

  • Base URL
    / (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1/chains/{chainID}/callview
  • Auth
    none declared

Path parameters

chainIDstring string required

ChainID (Bech32)

Request body

blockstring string
contractHNamestring string required

The contract name as HName (Hex)

contractNamestring string required

The contract name

functionHNamestring string required

The function name as HName (Hex)

functionNamestring string required

The function name

Example request

{
  "contractHName": "contractHName",
  "functionName": "functionName",
  "functionHName": "functionHName",
  "arguments": {
    "Items": [
      {
        "value": "value",
        "key": "key"
      },
      {
        "value": "value",
        "key": "key"
      }
    ]
  },
  "block": "block",
  "contractName": "contractName"
}

Response

Result

Example response

{
  "Items": [
    {
      "value": 130160803538225,
      "key": 1801812273
    },
    {
      "value": 130160803538225,
      "key": 1801812273
    }
  ]
}

Changes