Skip to main content

trace_callMany

Traces multiple calls in sequence on Gnosis, where each call can depend on the state changes of the previous one.

Archive Node Required

This method requires an archive node. It is not available on full nodes.

Use Cases#

  • Multi-step simulation - Simulate a sequence of dependent transactions
  • Arbitrage analysis - Test multi-hop swap paths
  • Batch operations - Preview multiple contract interactions for prediction markets (largest by market cap), Safe wallet infrastructure, CoW Protocol DEX, and Gnosis Pay card integration

Parameters#

ParameterTypeRequiredDescription
callsArrayYesArray of [callObject, traceTypes] pairs
blockNumberQUANTITY|TAGNoBlock number or tag (default: latest)

Each element in calls is a tuple of:

  • callObject - Transaction call object (from, to, gas, value, data)
  • traceTypes - Array of trace types: ["trace"], ["vmTrace"], ["stateDiff"]

Request#

{
"jsonrpc": "2.0",
"method": "trace_callMany",
"params": [
[
[{"to": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", "data": "0x70a08231000000000000000000000000e91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}, ["trace"]],
[{"to": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", "data": "0x18160ddd"}, ["trace"]]
],
"latest"
],
"id": 1
}

Code Examples#

curl -X POST https://api-gnosis-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "trace_callMany",
"params": [
[
[{"to": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", "data": "0x70a08231000000000000000000000000e91D153E0b41518A2Ce8Dd3D7944Fa863463a97d"}, ["trace"]],
[{"to": "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d", "data": "0x18160ddd"}, ["trace"]]
],
"latest"
],
"id": 1
}'