⚙️ eth_call
RPC Method (Base Chain)
The eth_call
method lets you run a smart contract function locally without broadcasting a transaction or spending gas.
It's read-only — great for checking token balances, estimating results, or debugging your contracts before sending a real tx.
🔁 Returns
"data" — the return value of the function you called (encoded as hex)"
Need RPC API keys?
Get 12.5M archival requests for free today.
🔧 Parameters
1. Transaction Call Object (Required)
An object that defines the simulated transaction:
Field | Description |
---|---|
from (optional) | Address you're simulating the call from. |
to | Contract address you're calling. |
gas (optional) | Max gas limit to use for execution. Required in some edge cases. |
gasPrice (optional) | Gas price to simulate with. |
value (optional) | ETH to send with the call. |
data (optional) | Encoded method signature and parameters. ABI docs (opens in a new tab) |
2. Block Parameter (Required)
Tells the node at what block state to simulate the call. Acceptable values:
"latest"
— the most recent block (default)"earliest"
— block0
"pending"
— includes pending txs"safe"
or"finalized"
— available on Ethereum & Arbitrum
More on block tags → (opens in a new tab)
🛰️ Request
POST https://base-mainnet.chainnodes.org/YOUR-API-KEY
💡 Example
💡
Still have questions? Ask in our Chainnodes Telegram Chat (opens in a new tab)
- HTTPS POST Request
- Replace
YOUR-API-KEY
with your CHAINNODES Dashboard (opens in a new tab) key - Use
base-mainnet
or any supported Base network
curl https://base-mainnet.chainnodes.org/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"from": "0x47ac0Fb4F2D84898e4D9E7b4DaB3C24507a6D503","to": "0xdAC17F958D2ee523a2206206994597C13D831ec7","gas": "0x92c0","gasPrice": "0x7896e72a000","value": "0x0","data": "0x70a0823100000000000000000000000047ac0fb4f2d84898e4d9e7b4dab3c24507a6d503"}, "latest"],"id":1}'
📦 Response Body
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x000000000000000000000000000000000000000000000000000470de54da7138"
}