Docs

eth_estimateL1Fee - Cronos Compatibility Note

Cronos JSON-RPC compatibility note for eth_estimateL1Fee. Cronos shared RPC endpoints do not expose Optimism-style L1 fee oracles.

Cronos shared RPC endpoints do not expose Optimism-style L1 fee estimation. If you call eth_estimateL1Fee on Cronos, the endpoint responds with -32601 because the method is not available.

When to Use This Page

Use this page when you are checking whether an endpoint exposes rollup-specific fee helpers. On Cronos, standard fee estimation comes from eth_estimateGas and eth_gasPrice.

Cronos Response

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32601,
    "message": "the method eth_estimateL1Fee does not exist/is not available"
  }
}

Practical Fallback

JavaScript
import { JsonRpcProvider } from 'ethers';

const provider = new JsonRpcProvider('https://api-cronos-mainnet-archive.n.dwellir.com/YOUR_API_KEY');

async function estimateCronosFee(tx) {
  const [gasEstimate, gasPriceHex] = await Promise.all([
    provider.estimateGas(tx),
    provider.send('eth_gasPrice', []),
  ]);

  return {
    gasEstimate,
    gasPriceWei: BigInt(gasPriceHex),
    estimatedCostWei: gasEstimate * BigInt(gasPriceHex),
  };
}

Supported Alternatives

  • Use eth_estimateGas for execution cost.
  • Use eth_gasPrice for 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 Cronos documentation.