π Read-only contract call (eth_call)
Code samples
POST /api/v1/eth/account/call
Executes a read-only call to a contract using eth_call without creating a transaction.
Body parameter
{
"transaction": {
"from": "string",
"to": "string",
"gas": "string",
"gasPrice": "string",
"maxFeePerGas": "string",
"maxPriorityFeePerGas": "string",
"value": "string",
"data": "string",
"nonce": "string"
},
"block": "latest"
}
π οΈ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | object | true | none |
| Β» transaction | body | EthTransactionRequest | true | Ethereum transaction parameters used with eth_call, eth_estimateGas and eth_sendTransaction. |
| »» from | body | string | false | Sender address. |
| »» to | body | string¦null | false | Recipient address, or null for contract creation. |
| »» gas | body | string | false | Gas limit as hex QUANTITY. |
| »» gasPrice | body | string | false | Legacy gas price as hex QUANTITY. |
| »» maxFeePerGas | body | string | false | EIP-1559 max fee per gas as hex QUANTITY. |
| »» maxPriorityFeePerGas | body | string | false | EIP-1559 priority fee per gas as hex QUANTITY. |
| »» value | body | string | false | Amount of wei to send as hex QUANTITY. |
| »» data | body | string | false | Call data or contract deployment bytecode. |
| »» nonce | body | string | false | Nonce as hex QUANTITY. |
| Β» block | body | string | false | Optional block number or tag; defaults to latest. |
Example responses
200 Response
{
"result": "0x0000000000000000000000000000000000000000000000000000000000000001"
}
π Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Raw return data from contract | Inline |
| 422 | Unprocessable Entity | Invalid request body (missing or invalid transaction) | None |
| 500 | Internal Server Error | Could not connect to ETH node | None |
π Response Schema
Status Code 200
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| Β» result | string | false | none | Hex-encoded return data from eth_call. |