---
title: "Call a view function on a contract by Hname"
method: POST
path: "/v1/chains/{chainID}/callview"
tags: ["chains"]
---

# 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.

## Path parameters

- `chainID` string, string, required

## Request body

- ContractCallViewRequest
  - `arguments` JSONDict, required
    - `Items` Item[]
      - `key` string, string, required — key (hex-encoded)
      - `value` string, string, required — value (hex-encoded)
  - `block` string, string
  - `contractHName` string, string, required — The contract name as HName (Hex)
  - `contractName` string, string, required — The contract name
  - `functionHName` string, string, required — The function name as HName (Hex)
  - `functionName` string, string, required — The function name

## Response `200`

Result

- JSONDict
  - `Items` Item[]
    - `key` string, string, required — key (hex-encoded)
    - `value` string, string, required — value (hex-encoded)

---

[API](https://skmtc.net/iotaledger/apis/wasp-api.md) · [All operations](https://skmtc.net/iotaledger/apis/wasp-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/iotaledger/wasp-api/versions/994a6c93b890/schema)
