trace_callMany

Performs multiple call traces on top of the same block. i.e. transaction n will be executed on top of a pending block with all n-1 transactions applied (traced) first. Allows to trace dependent transactions.

🚧

Note for trace_ methods

  1. trace_ namespace methods are only available on paid plans.
    1. developer plan, team plan, enterprise plan, custom plans. dedicated nodes
  2. trace_ namespace methods are only available on erigon client.

Parameters

  • array - An array of call object and trace option
    • Object - The transaction call object
      • from: DATA, 20 Bytes - (optional) The address the transaction is sent from.
      • to: DATA, 20 Bytes - (optional when creating new contract) The address the transaction is directed to.
      • gas: QUANTITY - (optional, default: 90000) Integer of the gas provided for the transaction execution. It will return unused gas.
      • gasPrice: QUANTITY - (optional, default: To-Be-Determined) Integer of the gasPrice used for each paid gas.
      • value: QUANTITY - (optional) Integer of the value sent with this transaction.
      • data: DATA - (Optional)The compiled code of a contract OR the hash of the invoked method signature and encoded parameters.
      • nonce: QUANTITY - (Optional) Integer of a nonce. This allows to overwrite your own pending transactions that use the same nonce.
    • Array - Type of trace, one or more of:
      • "trace" - To get a full trace of the virtual machine's state during the execution of the given of given transaction, including for any subcells.
      • "stateDiff" - To get the basic trace of the given transaction
      • "vmTrace" - To get information on altered Ethereum state due to execution of the given transaction
  • quantity|tag - (Optional) Hex encoded integer block number, or the string "latest", "earliest" or "pending", see the default block parameter.
curl https://ethereum-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "trace_callMany",
    "params": [
        [
            [
                {
                    "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
                    "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
                    "value": "0x186a0"
                },
                [
                    "trace"
                ]
            ],
            [
                {
                    "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
                    "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
                    "value": "0x186a0"
                },
                [
                    "trace"
                ]
            ]
        ],
        "latest"
    ]
}'

Returns

  • array - An array of trace objects
    • output - The data which is returned as an output encoded in hexadecimal format
    • stateDiff - It returns the information on altered Ethereum state due to execution of the given transaction
    • block trace: A list of calls to other contracts containing one object per call, in transaction execution order.
      • action - The ParityTrace object, which has the following fields:
        • from - The address of the sender
        • callType - The type of method such as call, delegatecall
        • gas - The gas provided by the sender, encoded as hexadecimal
        • input - The data sent along with the transaction
        • to - The address of the receiver
        • value - The integer of the value sent with this transaction, encoded as hexadecimal
      • blockHash - The hash of the block where this transaction was in
      • blockNumber - An integer value representing the block number where this transaction was in
      • error - The error message, if any
      • result - The ParityTraceResult object which has the following fields:
        • gasUsed - The amount of gas used by this specific transaction alone
        • output - The value returned by the contract call, and it only contains the actual value sent by the RETURN method. If the RETURN method was not executed, the output is empty bytes
      • subtraces - The traces of contract calls made by the transaction
      • traceAddress - The list of addresses where the call executed, the address of the parents and the order of the current sub call
      • type - The value of the method such as call or create
    • vmTrace - It is used to get a full trace of the virtual machine's state during the execution of the given transaction, including for any sub-calls
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "output": "0x",
            "stateDiff": null,
            "trace": [
                {
                    "action": {
                        "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
                        "callType": "call",
                        "gas": "0x2fa9e78",
                        "input": "0x",
                        "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
                        "value": "0x186a0"
                    },
                    "result": {
                        "gasUsed": "0x0",
                        "output": "0x"
                    },
                    "subtraces": 0,
                    "traceAddress": [],
                    "type": "call"
                }
            ],
            "vmTrace": null
        },
        {
            "output": "0x",
            "stateDiff": null,
            "trace": [
                {
                    "action": {
                        "from": "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
                        "callType": "call",
                        "gas": "0x2fa9e78",
                        "input": "0x",
                        "to": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
                        "value": "0x186a0"
                    },
                    "result": {
                        "gasUsed": "0x0",
                        "output": "0x"
                    },
                    "subtraces": 0,
                    "traceAddress": [],
                    "type": "call"
                }
            ],
            "vmTrace": null
        }
    ]
}

Try Yourself

Language
Click Try It! to start a request and see the response here!