Base
Base
Base
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_gasPrice returns the node's suggested legacy gas price in wei — a single number that summarizes current Base fee conditions. Base is Coinbase's OP Stack rollup that uses ETH for gas, and L2 fees here are typically a small fraction of Ethereum L1's. Call it at https://base.therpc.io/YOUR_API_KEY (chain ID 8453) when you want a fast read of what a transaction is likely to cost, or to fill the gasPrice field of a legacy (type-0) transaction. It takes no parameters and costs a single CU.
gasPrice field when you build a legacy type-0 transaction for a tool that does not yet support Base's EIP-1559 fields.eth_feeHistory percentiles for a more robust Base fee estimate.此方法不需要任何参数,传入空数组 [] 即可。
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded gas price in wei (e.g. "0x4a817c800" = 20 gwei). |
Try it live in the Base playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32603 | Internal error | Node could not estimate current gas price. |
eth_maxPriorityFeePerGas plus eth_feeHistory when you build type-2 transactions.