eth_simulateV1
JSON-RPC method provides transaction simulation capabilities on the Hyperliquid EVM blockchain. This method allows developers to execute transactions in a controlled environment without actually submitting them to the blockchain, enabling testing, gas estimation, and outcome prediction.
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
The method accepts a single parameter object containing simulation configuration:Simulation parameters
blockStateCalls
(array, required) — Array of block state call objectscalls
(array, required) — Array of transaction calls to simulatefrom
(string, optional) — Transaction sender addressto
(string, optional) — Transaction recipient addressgas
(string, optional) — Gas limit as hexadecimal stringgasPrice
(string, optional) — Gas price as hexadecimal stringvalue
(string, optional) — Transaction value as hexadecimal stringdata
(string, optional) — Transaction data as hexadecimal string
blockOverride
(object, optional) — Block state override optionsnumber
(string) — Block number to simulate against (e.g., “latest”)
traceTransfers
(boolean, optional) — Whether to trace token transfers during simulationvalidation
(boolean, optional) — Whether to perform validation during simulation
Response
The method returns detailed simulation results including transaction outcomes, gas usage, and state changes.Response structure
Simulation results:result
— Object containing simulation outcome data including gas estimates, transaction success status, and any error messages
- Gas consumption estimates and limits
- Transaction success or failure status
- State changes and side effects
- Error messages if simulation fails
- Transfer traces if enabled
Usage example
Basic transaction simulation
Example request
Shell
Use cases
Theeth_simulateV1
method is essential for applications that need to:
- Transaction testing: Test transactions before submitting them to avoid failed transactions and wasted gas
- Gas estimation: Accurately estimate gas requirements for complex transactions and smart contract interactions
- Smart contract debugging: Debug smart contract calls and identify potential issues before deployment
- DeFi protocol integration: Test complex DeFi transactions involving multiple protocols and token swaps
- Transaction optimization: Optimize transaction parameters and gas settings for better execution
- Risk management: Assess transaction risks and potential failures in trading and financial applications
- MEV protection: Simulate transactions to detect and prevent MEV (Maximum Extractable Value) attacks
- Batch transaction planning: Plan and validate batch transactions before execution
- State change prediction: Predict state changes and side effects of complex transactions
- Cross-protocol interactions: Test interactions between different protocols and smart contracts
- Governance proposals: Simulate governance proposals and their effects before voting
- Arbitrage strategies: Test arbitrage opportunities and validate profitability before execution
- Liquidation simulations: Test liquidation scenarios and validate liquidation bot strategies
- Oracle integration: Test oracle data integration and price feed reliability
- Bridge operations: Simulate cross-chain bridge operations and validate transfer logic
- Staking mechanisms: Test staking and unstaking operations with various parameters
- Token distribution: Simulate token distribution scenarios and validate allocation logic
- Flash loan strategies: Test flash loan strategies and validate repayment scenarios
- AMM interactions: Simulate automated market maker interactions and liquidity provision
- NFT marketplace: Test NFT trading scenarios and marketplace integrations
Body
application/json
JSON-RPC version
Available options:
2.0
The RPC method name
Available options:
eth_simulateV1
Simulation parameters
Required array length:
1
elementRequest identifier