Docs

eth_call - MegaETH RPC Method

Execute smart contract calls without creating transactions on MegaETH. Essential for reading contract state for high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications.

Executes a new message call immediately without creating a transaction on MegaETH. Used for reading smart contract state.

Why MegaETH? Build on the first real-time blockchain with sub-millisecond latency and 100,000+ TPS with sub-millisecond transaction streaming with 100,000+ sustained TPS and full EVM compatibility.

Use Cases

The eth_call method is essential for:

  • Reading contract state - Query view/pure functions
  • Simulating transactions - Test execution without gas costs
  • DeFi integrations - Check prices, balances, allowances for high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications
  • Complex queries - Execute multi-step contract logic

Gas Limit Restriction

Gas Limit on MegaETH

On MegaETH, eth_call requests are subject to a maximum gas limit of 10,000,000. This limit ensures optimal real-time performance across the network.

If your contract call requires more gas, consider:

  • Breaking the operation into smaller calls
  • Optimizing your smart contract logic
  • Using view functions that return aggregated data

Code Examples

Error Handling

Error CodeMessageDescription
-32000Execution revertedContract function reverted
-32602Invalid parametersInvalid data encoding
-32015VM execution errorContract logic error