Docs
Docs
Home
Getting Started
Agent Tooling
CLI
Supported Chains
Acala
Aptos
Arbitrum
Arc
Asset Hub
Astar
Avalanche
Base
Berachain
Bifrost
Binance Smart Chain
Bittensor
Blast
Boba Network
Bridge Hub
Celo
Centrifuge
Chiliz
Cronos
Enjin
Ethereum
Etherlink
Flow EVM Gateway
Gnosis
Hydration
Hyperliquid
Immutable
Ink
IoTeX
Kusama
Linea
LISK
Manta Atlantic
Manta Pacific
Mantle
MegaETH
Monad
Movement
Neuroweb
opBNB
Optimism
Plasma
Polkadot
Polygon
Pulsechain
Robinhood
Ronin
Scroll
Sonic
Starknet
Taiko
Tempo
Sui
TRON
Unichain
Viction
World Chain
XDC Network
XX Network
Zetachain
zkSync Era
Zora
Supported ChainsMantleJSON-RPC APIMining Methods

eth_mining - Mantle RPC Method

Check the legacy eth_mining compatibility method on Mantle. Public endpoints often return a client-specific unsupported-method response instead of a boolean.

Mantle RPC endpoint: endpoint URLs, plans and pricing.

Checks the legacy eth_mining compatibility method on Mantle. Depending on the client behind the endpoint, this call may return a boolean, unimplemented, or a method-not-found style error.

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.

Note: eth_mining is best treated as a node-local diagnostic and compatibility probe. Public endpoints often return false, unimplemented, or a method-not-found error, so it is not a reliable chain-health signal.

When to Use This Method

eth_mining is relevant for DeFi developers, liquid staking builders, and teams seeking institutional exchange integration:

  • Node Capability Checks - Verify whether the connected client still exposes this legacy method
  • Migration Audits - Remove assumptions that Ethereum-era mining RPCs always return a boolean
  • Fallback Design - Switch dashboards and health probes to eth_syncing, eth_blockNumber, or net_version

Best Practices

  • Returns false on proof-of-stake chains (post-Merge) and most modern chains
  • Not relevant for provider-managed nodes; do not depend on this for production monitoring
  • Use eth_syncing for general node health checks instead
  • Treat unsupported-method and unimplemented responses as a normal condition
JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "eth_mining",
  "params": [],
  "id": 1
}

Code Examples

Common Use Cases

1. Capability-Aware Health Check

Combine eth_mining with other status RPCs, but treat unsupported responses as normal:

JavaScript
async function getNodeStatus(provider) {
  const [syncing, blockNumber] = await Promise.all([
    provider.send('eth_syncing', []),
    provider.getBlockNumber()
  ]);

  let miningStatus = { supported: false };
  try {
    miningStatus = {
      supported: true,
      result: await provider.send('eth_mining', [])
    };
  } catch {}

  return {
    miningStatus,
    isSynced: syncing === false,
    currentBlock: blockNumber
  };
}

2. Client Compatibility Check

Check whether the connected client still implements the legacy method:

JavaScript
async function checkEthMiningSupport(provider) {
  try {
    const mining = await provider.send('eth_mining', []);
    return { supported: true, mining };
  } catch (error) {
    return { supported: false, message: error.message };
  }
}

const status = await checkEthMiningSupport(provider);
console.log(status);

3. Recommended Alternatives

For production dashboards and health checks, prefer:

  • eth_blockNumber for liveness
  • eth_syncing for sync state
  • net_version or eth_chainId for endpoint identity

Error Handling

Common errors and solutions:

Error CodeDescriptionSolution
-32603Internal errorSome clients report unsupported legacy methods through the generic internal-error path
-32601Method not foundThe connected client does not expose this legacy method
-32005Rate limit exceededReduce polling frequency

Related Methods

  • eth_hashrate - Get the mining hash rate
  • eth_coinbase - Get the coinbase/block producer address
  • eth_blockNumber - Get the current block height

txpool_content

Inspect the full pending and queued transaction pool on Mantle. Useful for mempool analytics, transaction replacement debugging, and operational monitoring.

eth_hashrate

Get the legacy eth_hashrate compatibility value on Mantle. Public endpoints may return `0x0` or an unsupported-method error depending on the client.

On this page

When to Use This MethodBest PracticesCode ExamplesCommon Use Cases1. Capability-Aware Health Check2. Client Compatibility Check3. Recommended AlternativesError HandlingRelated Methods