Docs

rollup_gasPrices - Get Rollup Gas Prices

Optimism compatibility note for rollup_gasPrices. Dwellir's public Optimism endpoints do not expose this rollup gas helper.

Dwellir's public Optimism endpoints do not expose rollup_gasPrices. A live call returns -32601 Method not found.

Live Response

JSON
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": -32601,
    "message": "Method not found"
  }
}

Fallback Check

JavaScript
import { JsonRpcProvider } from 'ethers';

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

async function supportsRollupGasPrices() {
  try {
    await provider.send('rollup_gasPrices', []);
    return true;
  } catch (error) {
    if (error?.code === -32601) {
      return false;
    }
    throw error;
  }
}

console.log('Rollup gas prices available:', await supportsRollupGasPrices());

Supported Alternatives

  • Use eth_gasPrice for current gas pricing.
  • Use eth_estimateGas for execution cost.
  • Use Optimism's own documentation if you need rollup-level pricing fields.

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