trace_callMany
JSON-RPC method executes multiple calls and returns trace information for each call. This method allows batch simulation of multiple transactions with detailed execution traces, making it ideal for complex scenario testing, batch analysis, and multi-step transaction planning.
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
- Call/trace pairs array (array, required): Array of [call_object, trace_types] pairs
- Block parameter (string, required): Block number, hash, or “latest”/“earliest”/“pending”
Call/trace pair structure
Each element in the array contains:- Call object with transaction details (from, to, gas, gasPrice, value, data)
- Array of trace types (e.g., [“trace”])
Response
The method returns an array of trace results, one for each call in the input array.Response structure
Trace results array:- Array of trace result arrays, one per input call
- Each trace result contains execution details, gas usage, and call hierarchy
Usage example
Basic implementation
Example request
Shell
Use cases
Thetrace_callMany
method is essential for applications that need to:
- Batch simulation: Simulate multiple transactions in a single request
- Multi-step transaction planning: Plan complex multi-transaction operations
- Performance comparison: Compare gas usage across different transaction approaches
- Scenario testing: Test multiple scenarios efficiently in batch
- DeFi strategy testing: Test complex DeFi strategies with multiple steps
- Arbitrage analysis: Analyze multi-step arbitrage opportunities
- MEV research: Research Maximum Extractable Value across multiple transactions
- Protocol testing: Test protocol interactions across multiple calls
- Integration testing: Test smart contract integrations comprehensively
- Risk assessment: Assess risks across multiple related transactions
- Development workflows: Integrate batch simulation into development pipelines
- Educational tools: Create educational content about complex transaction flows
- Research platforms: Support blockchain research requiring multiple simulations
- Trading strategy testing: Test complex trading strategies before execution
- Compliance verification: Verify regulatory compliance across transaction batches
Body
application/json
JSON-RPC version
Available options:
2.0
The RPC method name
Available options:
trace_callMany
Parameters: [array of call/trace pairs, block parameter]
Request identifier