trace_callMany
Performs multiple call-traces on top of the same block. You can analyze the interactions between different transactions and contracts.
Parameters
- trace call parameters: [Required] Array of trace call parameters. Each trace call parameter itself is an array containing the following:- transaction call object: [Required] Transaction call object containing the same data as in the- trace_callparameter.
- options:[Optional] An array of tracing options. Tracing options are- traceand- stateDiff. Specify both options or none.
 
- block parameter: [Required] The hexadecimal block number, or the string- latest,- earliest, or- pending. See the default block parameter. The block parameter is applied uniformly to all trace calls in the- trace call parametersarray.
Returns
Example
Replace <YOUR-API-KEY> with an API key from your MetaMask Developer dashboard.
Request
- curl
- WSS
curl https://mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "trace_callMany", "params": [[[{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]], [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]]], "latest"], "id": 1}
wscat -c wss://mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "trace_callMany", "params": [[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]], [{"from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", "value": "0x186a0"}, ["trace"]]], "latest"], "id": 1}'
Response
- JSON
{
  "jsonrpc": "2.0",
  "result": [
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "action": {
            "callType": "call",
            "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
            "gas": "0x1dcd12f8",
            "input": "0x",
            "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
            "value": "0x186a0"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": [],
          "type": "call"
        }
      ],
      "vmTrace": null
    },
    {
      "output": "0x",
      "stateDiff": null,
      "trace": [
        {
          "action": {
            "callType": "call",
            "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
            "gas": "0x1dcd12f8",
            "input": "0x",
            "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
            "value": "0x186a0"
          },
          "result": {
            "gasUsed": "0x0",
            "output": "0x"
          },
          "subtraces": 0,
          "traceAddress": [],
          "type": "call"
        }
      ],
      "vmTrace": null
    }
  ],
  "id": 1
}