VM query endpoints
| Method | Path | Returns |
|---|---|---|
| POST | /vm-values/query | Full VM response (all return data, gasUsed, returnCode) |
| POST | /vm-values/hex | First return value as hex string |
| POST | /vm-values/string | First return value as UTF-8 string |
| POST | /vm-values/int | First return value as decimal big-integer string |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
scAddress | string | yes | Bech32 address of the smart contract |
funcName | string | yes | View function name |
args | string[] | no | Hex-encoded arguments |
caller | string | no | Simulated caller address |
value | string | no | Simulated EGLD value sent |
100, encode it as "64" (hex representation of 100).
Choose the right endpoint
/vm-values/query: returns the full response (multiple return values, gas used, return code)./vm-values/hex: returns raw bytes (e.g., reading a storage mapper)./vm-values/string: returns string data (e.g., token names)./vm-values/int: returns numeric values (e.g., balances, counters).
Read a token balance from a smart contract
- cURL
- TypeScript
- Python
- Rust
Historical queries
Add?blockNonce=12345678 or ?blockHash=abcdef... to query VM state at a specific block.

