Arbitrum One
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Arbitrum One
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
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.
| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | transaction | object | Sí | Transaction object. `to` is required for calls; omit `to` for contract deployments. Optional: `from`, `gas`, `gasPrice`/`maxFeePerGas`/`maxPriorityFeePerGas`, `value`, `data`. |
| 2 | blockTag | string | No | Block state to simulate against. Defaults to `latest`.Predeterminado: latest |
| Tipo | Descripción |
|---|---|
| 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.
| Código | Mensaje | Causa |
|---|---|---|
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. |
Parámetros
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