Docs
Supported ChainsMantleJSON-RPC APITransaction Methods

eth_estimateGas - Mantle RPC Method

Estimate gas required for transactions on Mantle. Essential for optimizing transaction costs for liquid staking (mETH $1.87B TVL), institutional DeFi via Bybit, and yield optimization strategies.

Estimates the gas necessary to execute a transaction on Mantle.

Why Mantle? Build on the world's largest ZK rollup by TVL with $2.5B+ secured and deep Bybit integration with near-instant ZK finality via OP Succinct, $6.2B treasury backing, mETH liquid staking, and 25% Bybit trading fee discounts.

Use Cases

The eth_estimateGas method is essential for:

  • Transaction preparation - Set appropriate gas limits
  • Cost estimation - Calculate transaction costs before sending
  • Error detection - Identify reverts before spending gas
  • DeFi operations - Estimate costs for liquid staking (mETH $1.87B TVL), institutional DeFi via Bybit, and yield optimization strategies

Request Parameters

Request
fromDATA

Sender address

toDATA

Recipient address

gasQUANTITY

Gas limit

gasPriceQUANTITY

Gas price

valueQUANTITY

Value in wei

dataDATA

Transaction data

Response Body

Response
resultQUANTITY

Estimated gas amount in hexadecimal

Code Examples

Bash
curl -X POST https://api-mantle-mainnet.n.dwellir.com/YOUR_API_KEY \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [{
      "from": "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
      "to": "0x78c1b0C915c4FAA5FffA6CAbf0219DA63d7f4cb8",
      "value": "0x1"
    }],
    "id": 1
  }'

Error Handling

Error CodeMessageDescription
-32000Execution revertedTransaction would fail
-32602Invalid paramsInvalid transaction parameters

Tip: If estimation fails, the transaction would likely revert if sent.