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 Code | Message | Description |
|---|---|---|
| -32000 | Execution reverted | Contract function reverted |
| -32602 | Invalid parameters | Invalid data encoding |
| -32015 | VM execution error | Contract logic error |
Related Methods
eth_estimateGas- Estimate gas for transactioneth_sendRawTransaction- Send actual transaction
eth_sendTransaction
Send a transaction from an unlocked account on MegaETH. Requires the node to hold the sender's private key — intended for development and testing only.
eth_getLogs
Query event logs on MegaETH. Essential for indexing high-frequency trading, real-time gaming, instant payments, and latency-sensitive applications on the first real-time blockchain with sub-millisecond latency and 100,000+ TPS.