Motivation
Wallet auto-fills gas naively (eth_gasPrice / eth_maxPriorityFeePerGas). Real senders want percentile-based EIP-1559 suggestions, and L2 users need the L1 data fee (OP Stack GasPriceOracle, Arbitrum ArbGasInfo) or their cost estimates are simply wrong.
Scope
New src/fee_oracle.zig:
suggestFees(provider, speed: enum{slow, standard, fast}) !{max_fee, max_priority} from eth_feeHistory reward percentiles + next-base-fee projection
- OP Stack:
getL1Fee(tx_bytes) via the predeploy at 0x420...0F
- Arbitrum:
ArbGasInfo.getPricesInWei at 0x6c
- Wire into
Wallet as an opt-in
Pointers
provider.feeHistory already exists; chain registry (chains/) knows which L2 is which; predeploy calls go through contract.zig.
Motivation
Walletauto-fills gas naively (eth_gasPrice/eth_maxPriorityFeePerGas). Real senders want percentile-based EIP-1559 suggestions, and L2 users need the L1 data fee (OP StackGasPriceOracle, ArbitrumArbGasInfo) or their cost estimates are simply wrong.Scope
New
src/fee_oracle.zig:suggestFees(provider, speed: enum{slow, standard, fast}) !{max_fee, max_priority}frometh_feeHistoryreward percentiles + next-base-fee projectiongetL1Fee(tx_bytes)via the predeploy at 0x420...0FArbGasInfo.getPricesInWeiat 0x6cWalletas an opt-inPointers
provider.feeHistoryalready exists; chain registry (chains/) knows which L2 is which; predeploy calls go throughcontract.zig.