Skip to main content

Execute contract view function (vecpak)

POST 

/api/contract/view

Call a contract function read-only against the current tip; nothing is written. The body is a VecPak-encoded map. The SDK builds it in sdk.contract.view().

For a deployed (RISC-V) contract the reply carries the function's return value and logs. For a built-in contract name the node dry-runs the call and rolls it back: result is ok or the error code (invalid_bic_action for an unknown function). Read built-in state with /api/contract/get, /api/contract/get_prefix or /api/wallet/* instead.

Request​

Responses​

Call result