eth_estimateL1Fee - Estimate L1 Data Fee
Optimism compatibility note for eth_estimateL1Fee. Dwellir's public Optimism endpoints do not expose the L1 fee oracle on the shared archive surface.
Dwellir's public Optimism endpoints do not expose the L1 fee oracle on the shared archive surface. A live call to eth_estimateL1Fee returns -32601.
When to Use This Method
Use this page to confirm that a public Dwellir Optimism endpoint does not currently expose the L1 fee oracle. For standard transaction pricing, use eth_estimateGas and eth_gasPrice.
Live Response
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32601,
"message": "the method eth_estimateL1Fee does not exist/is not available"
}
}Fallback Check
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://api-optimism-mainnet-archive.n.dwellir.com/YOUR_API_KEY');
async function supportsL1FeeOracle(txObject) {
try {
await provider.send('eth_estimateL1Fee', [txObject]);
return true;
} catch (error) {
if (error?.code === -32601) {
return false;
}
throw error;
}
}
console.log('L1 fee oracle available:', await supportsL1FeeOracle({
to: '0x0000000000000000000000000000000000000000',
data: '0x'
}));Supported Alternatives
- Use
eth_estimateGasfor execution cost. - Use
eth_gasPricefor current gas pricing. - Use the Optimism documentation if you need a separate L1 data fee oracle.
Need help? Contact our support team or check the Optimism documentation.
eth_coinbase
Check the legacy eth_coinbase compatibility method on Optimism. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.
rollup_gasPrices - Get Rollup Gas Prices
Optimism compatibility note for rollup_gasPrices. Dwellir's public Optimism endpoints do not expose this rollup gas helper.