eth_call
OptimismC1Runs a call against the current (or historic) state without broadcasting or spending gas. The standard way to read contract view/pure functions. Historic calls resolve on archive nodes.
Endpoint
POST https://api.1st-node.com/v1/optimism/rpcParameters
| Name | Type | Description |
|---|---|---|
| callObject | Object | The call: to, data, and optionally from/gas/value. |
| block | QUANTITY | TAG | State to execute against. |
Returns
DATA — the return value of the executed call.
Request
curl https://api.1st-node.com/v1/optimism/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_call",
"params": [{ "to": "0xdac17f…", "data": "0x70a08231000000…" }, "latest"]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_call",
"params": [{ "to": "0xdac17f…", "data": "0x70a08231000000…" }, "latest"]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x0000000000000000000000000000000000000000000000000000000005f5e100"
}More transactions methods on Optimism
常见问题
Does eth_call cost gas?
No — it executes against state without a transaction, so nothing is spent on-chain.
充值、拿密钥、上线。
自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。
获取 API 密钥