POST
/
evm
eth_protocolVersion
curl --request POST \
  --url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_protocolVersion",
  "params": [],
  "id": 1
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x41"
}
The eth_protocolVersion JSON-RPC method returns the current Ethereum protocol version supported by the Hyperliquid EVM node. This method is essential for ensuring compatibility between client applications and the blockchain network, helping developers verify protocol support and maintain version compatibility.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

This method takes no parameters. The params field should be an empty array.

Response

The method returns the current protocol version as a hexadecimal string.

Response structure

Protocol information:
  • result — The current protocol version as a hexadecimal string representing the supported Ethereum protocol version

Protocol version interpretation

Hexadecimal format:
  • Protocol versions are returned in hexadecimal format with “0x” prefix
  • Convert to decimal for human-readable version numbers
  • Higher numbers indicate more recent protocol versions
Compatibility checking:
  • Use this method to verify client-server protocol compatibility
  • Ensure your application supports the returned protocol version
  • Check for protocol updates and compatibility requirements

Usage example

Basic implementation

// Get current protocol version
const getProtocolVersion = async () => {
  const response = await fetch('https://hyperliquid-mainnet.core.chainstack.com/YOUR_ENDPOINT/evm', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      jsonrpc: '2.0',
      method: 'eth_protocolVersion',
      params: [],
      id: 1
    })
  });
  
  const data = await response.json();
  const versionHex = data.result;
  const versionDecimal = parseInt(versionHex, 16);
  
  return {
    hex: versionHex,
    decimal: versionDecimal
  };
};

// Check protocol compatibility
const checkCompatibility = async (requiredVersion) => {
  try {
    const { decimal: currentVersion } = await getProtocolVersion();
    
    if (currentVersion >= requiredVersion) {
      console.log(`Compatible: Node supports protocol version ${currentVersion}`);
      return true;
    } else {
      console.warn(`Incompatible: Node version ${currentVersion} < required ${requiredVersion}`);
      return false;
    }
  } catch (error) {
    console.error('Error checking protocol version:', error);
    return false;
  }
};

// Usage
checkCompatibility(65).then(isCompatible => {
  if (isCompatible) {
    console.log('Proceeding with application initialization');
  } else {
    console.log('Application may not function properly');
  }
});

Example request

Shell
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":1}' \
  https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm

Use cases

The eth_protocolVersion method is essential for applications that need to:
  • Compatibility verification: Ensure client applications are compatible with the node’s protocol version
  • Version management: Track protocol versions across different environments and deployments
  • Network diagnostics: Diagnose network connectivity and protocol support issues
  • Development tools: Build development tools that adapt to different protocol versions
  • Client initialization: Initialize client applications with appropriate protocol settings
  • Migration planning: Plan migrations and upgrades based on protocol version support
  • Integration testing: Test applications against different protocol versions
  • API validation: Validate API compatibility and feature support across versions
  • Multi-network support: Build applications that work across different EVM networks
  • Protocol monitoring: Monitor protocol version changes and network updates
  • Smart contract deployment: Ensure smart contracts are compatible with the network protocol
  • DApp compatibility: Verify DApp compatibility with the underlying protocol version
  • Wallet integration: Ensure wallet applications support the network’s protocol version
  • Bridge operations: Validate protocol compatibility for cross-chain bridge operations
  • Node management: Monitor and manage node protocol versions in infrastructure
  • Debugging tools: Build debugging tools that account for protocol version differences
  • Analytics platforms: Track protocol adoption and version distribution across networks
  • Testing frameworks: Create testing frameworks that validate protocol compatibility
  • Development environments: Set up development environments with appropriate protocol support
  • Quality assurance: Implement QA processes that verify protocol version compatibility
  • Documentation systems: Generate documentation that accounts for protocol version differences
  • Monitoring dashboards: Build monitoring dashboards that track protocol version metrics
  • Automated deployments: Implement deployment scripts that verify protocol compatibility
  • Security audits: Conduct security audits that account for protocol version vulnerabilities
This method provides fundamental protocol information, enabling robust version management and compatibility validation for applications on the Hyperliquid EVM platform.

Body

application/json

Response

200 - application/json

Successful response with the current protocol version

The response is of type object.