For the complete documentation index, see llms.txt. This page is also available as Markdown.

eth_call - Tempo

Example code for the eth_call JSON-RPC method. Complete guide on how to use eth_call JSON-RPC in GetBlock Web3 documentation.

Executes a read-only call against contract state without committing a transaction. Use it to query TIP-20 balances, allowances, and DEX prices, or simulate state-changing calls without paying fees.

Parameters

Parameter
Type
Required
Description

callObject

object

Yes

Transaction-shaped object with to, data, and optional from, gas, gasPrice, value

blockParameter

string

Yes

Block number in hex, or block tag

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "to": "0x4242424242424242424242424242424242424242",
            "data": "0x70a08231000000000000000000000000d85498dbeaeb1df24be52eed4f52eac2fbd56245"
        },
        "latest"
    ],
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result

string

ABI-encoded return value of the called function (hex)

Use Cases

  • Reading TIP-20 stablecoin balances (the primary way to query Tempo balances)

  • Querying Tempo stablecoin DEX prices and liquidity

  • Simulating swaps and payment flows before broadcast

  • Reading TIP-403 policy state for restricted assets

Error Handling

Status Code
Error Message
Cause

403

Forbidden

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

-32000

Execution reverted

The contract call reverted; check the data field for the revert reason

SDK Integration

Last updated

Was this helpful?