Base
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Base
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_call executes a read-only message call against the Base EVM without broadcasting a transaction or spending any ETH on gas — the node runs your calldata against current state and hands back the return value. Base is Coinbase's OP Stack rollup that settles to Ethereum L1 and uses ETH as its gas token, so this is the method you reach for whenever you need to read contract state rather than mutate it. Send the request to https://base.therpc.io/YOUR_API_KEY (chain ID 8453); because nothing is mined, it costs no gas and never appears on-chain.
balanceOf, decimals, symbol, or totalSupply for the many USDC and token contracts deployed on Base.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transaction | object | نعم | Transaction object. Required fields: `to` (target contract). Optional: `from` (msg.sender), `gas` (hex), `gasPrice` (hex), `value` (hex wei), `data` (ABI-encoded calldata). |
| 2 | blockTag | string | object | نعم | Block at which to execute the call. Use hex block number or a named tag.الافتراضي: latest |
| 3 | stateOverrides | object | لا | Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers. |
| النوع | الوصف |
|---|---|
| string | Hex-encoded return data from the executed function. Decode with the contract ABI. If the call reverts, an error with code -32000 or 3 is returned instead. |
Try it live in the Base playground.
| الكود | الرسالة | السبب |
|---|---|---|
3 | execution reverted | The EVM reverted the call. Error data contains the revert reason. |
-32602 | invalid argument | Malformed transaction object or missing required `to` field. |
-32000 | execution reverted | Node-level revert without revert data (e.g. out-of-gas within the call, or require with no message). |
latest can shift before your transaction is actually included — with ~2s Base blocks the gap is short, but a price or reserve read is still a snapshot, not a guarantee.3 or -32000), not as a special success field — always handle the error path and decode the revert reason from the error data.المعاملات
Transaction object. Required fields: `to` (target contract). Optional: `from` (msg.sender), `gas` (hex), `gasPrice` (hex), `value` (hex wei), `data` (ABI-encoded calldata).
"latest" | "safe" | "finalized" | "earliest" | "pending" | hex block number
Optional map of address → { balance, nonce, code, state, stateDiff } overrides applied only for this call. Not supported by all providers.