curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "trace_callMany",
"params": [
[
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0xde0b6b3a7640000",
"data": "0x"
},
[
"trace"
]
],
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
"gas": "0x5208",
"gasPrice": "0x9184e72a000",
"value": "0x1bc16d674ec80000",
"data": "0x"
},
[
"trace"
]
]
],
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
[
{
"action": {
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5",
"value": "0xde0b6b3a7640000",
"gas": "0x76c0",
"input": "0x",
"callType": "call"
},
"result": {
"gasUsed": "0x5208",
"output": "0x"
},
"traceAddress": [],
"type": "call"
}
]
]
}
Executes multiple calls and returns trace information for each call. This method allows batch simulation of multiple transactions with detailed execution traces.
curl --request POST \
--url https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
"method": "trace_callMany",
"params": [
[
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0xde0b6b3a7640000",
"data": "0x"
},
[
"trace"
]
],
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
"gas": "0x5208",
"gasPrice": "0x9184e72a000",
"value": "0x1bc16d674ec80000",
"data": "0x"
},
[
"trace"
]
]
],
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": [
[
{
"action": {
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5",
"value": "0xde0b6b3a7640000",
"gas": "0x76c0",
"input": "0x",
"callType": "call"
},
"result": {
"gasUsed": "0x5208",
"output": "0x"
},
"traceAddress": [],
"type": "call"
}
]
]
}
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.
// Execute multiple traced calls
const traceCallMany = async (callTracePairs, blockParam = 'latest') => {
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: 'trace_callMany',
params: [callTracePairs, blockParam],
id: 1
})
});
const data = await response.json();
return data.result;
};
// Test multiple transaction scenarios
const testMultipleScenarios = async () => {
const scenarios = [
[
{
from: '0x69835D480110e4919B7899f465aAB101e21c8A87',
to: '0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5',
gas: '0x76c0',
gasPrice: '0x9184e72a000',
value: '0xde0b6b3a7640000',
data: '0x'
},
['trace']
],
[
{
from: '0x69835D480110e4919B7899f465aAB101e21c8A87',
to: '0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c',
gas: '0x5208',
gasPrice: '0x9184e72a000',
value: '0x1bc16d674ec80000',
data: '0x'
},
['trace']
]
];
const results = await traceCallMany(scenarios);
console.log('Multi-call simulation results:');
results.forEach((result, index) => {
console.log(`Call ${index + 1}:`);
result.forEach(trace => {
console.log(` Gas used: ${parseInt(trace.result.gasUsed, 16)}`);
console.log(` Success: ${trace.result.output !== '0x'}`);
});
});
return results;
};
// Usage
testMultipleScenarios().then(results => {
console.log('Batch simulation completed');
});
curl -X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_callMany",
"params": [
[
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xB7C609cFfa0e47DB2467ea03fF3e598bf59361A5",
"gas": "0x76c0",
"gasPrice": "0x9184e72a000",
"value": "0xde0b6b3a7640000",
"data": "0x"
},
["trace"]
],
[
{
"from": "0x69835D480110e4919B7899f465aAB101e21c8A87",
"to": "0xb4DcFE4590adBd275aC3Ef1A3dd10e819d11648c",
"gas": "0x5208",
"gasPrice": "0x9184e72a000",
"value": "0x1bc16d674ec80000",
"data": "0x"
},
["trace"]
]
],
"latest"
],
"id": 1
}' \
https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm
trace_callMany
method is essential for applications that need to:
Successful response with trace data for all calls
The response is of type object
.
Was this page helpful?