Docs

rollup_gasPrices - Cronos Compatibility Note

Cronos JSON-RPC compatibility note for rollup_gasPrices. Cronos shared RPC endpoints do not expose Optimism-style rollup gas oracles.

Cronos shared RPC endpoints do not expose Optimism-style rollup gas pricing. If you call rollup_gasPrices 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 pricing. For Cronos, use standard Ethereum JSON-RPC pricing methods instead.

What to Use on Cronos Instead

  • eth_gasPrice for the current gas price.
  • eth_estimateGas for transaction execution cost.
  • eth_feeHistory if you need historical gas trend data and the client supports it.

Fallback Example

JavaScript
import { JsonRpcProvider } from 'ethers';

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

async function getCronosFeeData() {
  const [gasPriceHex, feeData] = await Promise.all([
    provider.send('eth_gasPrice', []),
    provider.getFeeData(),
  ]);

  return {
    gasPriceWei: BigInt(gasPriceHex),
    maxFeePerGas: feeData.maxFeePerGas,
    maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
  };
}

Need help? Contact our support team or check the Cronos documentation.