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 ChainsPlasmaJSON-RPC APINetwork Methods

eth_protocolVersion - Plasma RPC Method

Get the current Ethereum protocol version on Plasma. Useful for client compatibility checks and identifying version-gated features.

Plasma RPC endpoint: endpoint URLs, plans and pricing.

Returns the current Ethereum protocol version used by the Plasma node.

Why Plasma? Build on an EVM Layer 1 for stablecoin payments with PlasmaBFT consensus and Reth execution with 1 second blocks, XPL gas, full EVM JSON-RPC, and debug plus txpool on Dwellir.

When to Use This Method

eth_protocolVersion is useful for payment app developers, wallet teams, and teams shipping Solidity contracts for dollar transfers:

  • Client Compatibility - Verify that a node supports the protocol version your application requires
  • Version-Gated Features - Enable or disable features based on the protocol version (e.g., EIP-1559 support)
  • Multi-Client Environments - Ensure consistent protocol versions across a fleet of nodes
  • Debugging - Diagnose issues caused by protocol version mismatches between clients

Best Practices

  • Modern clients often return a static value; do not rely on this method for feature detection
  • This method is not used for transaction signing; use eth_chainId for network identification
  • Many post-Merge clients no longer support this method; handle unsupported-method errors gracefully
JSON-RPC request
{
  "jsonrpc": "2.0",
  "method": "eth_protocolVersion",
  "params": [],
  "id": 1
}

Code Examples

Common Use Cases

1. Node Compatibility Check

Verify protocol version before enabling features:

JavaScript
async function checkCompatibility(provider, minVersion) {
  const result = await provider.send('eth_protocolVersion', []);
  const version = parseInt(result, 16);

  if (version >= minVersion) {
    console.log(`Node supports required protocol version ${minVersion}`);
    return true;
  } else {
    console.warn(`Node protocol version ${version} is below required ${minVersion}`);
    return false;
  }
}

2. Multi-Node Version Audit

Check protocol consistency across a fleet of Plasma nodes:

JavaScript
async function auditNodeVersions(endpoints) {
  const results = await Promise.all(
    endpoints.map(async (endpoint) => {
      const provider = new JsonRpcProvider(endpoint);
      const [protocolVersion, clientVersion] = await Promise.all([
        provider.send('eth_protocolVersion', []),
        provider.send('web3_clientVersion', [])
      ]);
      return {
        endpoint,
        protocolVersion: parseInt(protocolVersion, 16),
        clientVersion
      };
    })
  );

  const versions = new Set(results.map(r => r.protocolVersion));
  if (versions.size > 1) {
    console.warn('Protocol version mismatch detected across nodes');
  }

  return results;
}

3. Feature Detection

Enable features based on the protocol version:

JavaScript
async function getNodeCapabilities(provider) {
  try {
    const version = parseInt(await provider.send('eth_protocolVersion', []), 16);

    return {
      protocolVersion: version,
      supportsEIP1559: version >= 65,
      supportsSnapSync: version >= 66
    };
  } catch {
    // Some clients (e.g., post-Merge) may not support this method
    return { protocolVersion: null, supportsEIP1559: true, supportsSnapSync: true };
  }
}

Error Handling

Common errors and solutions:

Error CodeDescriptionSolution
-32601Method not foundSome post-Merge clients no longer support this method
-32603Internal errorNode may be initializing - retry after delay
-32005Rate limit exceededReduce request frequency

Related Methods

  • web3_clientVersion - Get the client software version string
  • net_version - Get the network ID
  • eth_chainId - Get the chain ID (EIP-155)

web3_sha3

Compute the Keccak-256 hash of given data on Plasma. Useful for hash verification, smart contract development, and data integrity checks.

txpool_status

Inspect pending and queued transaction counts in the Plasma transaction pool. Useful for mempool monitoring, congestion analysis, and node health checks.

On this page

When to Use This MethodBest PracticesCode ExamplesCommon Use Cases1. Node Compatibility Check2. Multi-Node Version Audit3. Feature DetectionError HandlingRelated Methods