Arbitrum One
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Arbitrum One
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_estimateGas simulates a transaction on Arbitrum One and returns the amount of gas it would need to execute on-chain, denominated in the units that ultimately cost ETH. On this Nitro-based Optimistic Rollup the figure reflects the combined cost model: L2 execution plus the L1 calldata the rollup must post to Ethereum, which ArbOS folds into the gas accounting. Send the simulation to https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161) to size a transaction's gas limit before you sign it.
| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | transaction | object | نعم | Transaction object. `to` is required for calls; omit `to` for contract deployments. Optional: `from`, `gas`, `gasPrice`/`maxFeePerGas`/`maxPriorityFeePerGas`, `value`, `data`. |
| 2 | blockTag | string | لا | Block state to simulate against. Defaults to `latest`.الافتراضي: latest |
| النوع | الوصف |
|---|---|
| string | Hex-encoded gas estimate. The node typically adds a small safety buffer above the raw simulation result. |
Try it live in the Arbitrum One playground.
| الكود | الرسالة | السبب |
|---|---|---|
3 | execution reverted | The simulated transaction reverted; the estimate cannot be produced. |
-32000 | gas required exceeds allowance | Estimated gas exceeded the block gas limit or the supplied gas cap. |
-32602 | invalid argument | Malformed transaction object. |
المعاملات
Transaction object. `to` is required for calls; omit `to` for contract deployments. Optional: `from`, `gas`, `gasPrice`/`maxFeePerGas`/`maxPriorityFeePerGas`, `value`, `data`.
"latest" | "pending" | hex block number