Ethereum Rpc Client
Simple Ethereum JSON-RPC client for EVM-compatible chains.
Supports Ethereum, Base, and other EVM chains via configurable RPC URL.
Functions
Estimate gas for a transaction.
Estimate L1 data fee for a transaction (Base/OP Stack L2s). Returns null if the RPC does not support eth_estimateL1Fee (e.g. L1 chains). Prefer getL1FeeFromGasPriceOracle when EvmFeatures.opStackL1Fee is true.
Get the balance of an address in wei.
Get block by number.
Get the current block number.
Get fee history for EIP-1559 fee estimation.
Get the current gas price.
Get L1 data fee from OP Stack GasPriceOracle predeploy (getL1Fee(bytes)). Uses the RLP-encoded unsigned transaction bytes as input; the oracle computes the L1 portion of the fee based on calldata size. Returns null on any failure.
Get transaction by hash.
Get the transaction count (nonce) for an address.
Get transaction receipt by hash.
Send a signed raw transaction.