trace_call

Traces the execution of eth_call and provides detailed information about each step of the execution. This is similar to debug_traceCall.

Parameters

  1. Object - The transaction call object with the following:

    • from(optional): the address the transaction is sent from.

    • to(optional): the address the transaction is sent to.

    • gas(optional): Integer of the gas provided for the transaction execution. eth_call consumes zero gas, but this parameter may be needed by some executions.

    • gasPrice(optional): Integer of the gasPrice used for each paid gas.

    • value(optional): Integer of the value sent with this transaction.

    • data(optional): Hash of the method signature and encoded parameters. For details see Ethereum Contract ABI in the Solidity documentation.

  2. Quantity or tag - choose 1 of the following options:

    • A hexadecimal block number.

    • "earliest" - the earliest/genesis block.

    • "latest" - the latest mined block.

    • "finalized" - the latest finalized block.

    • "pending" - the pending state/transactions.

  3. Type of trace - choose 1 of the following options:

    • "trace" - Provides an ordered trace of the instructions.

    • "stateDiff" - Provides information detailing all altered portions of the Ethereum state made due to the execution of the transaction.

    • "vmTrace" - Provides a full trace of the VM’s state throughout the execution of the transaction, including for any subcalls.

Sample Request

curl https://lb.nodies.app/v1/<INSERT URL> \
   -H "x-api-key: <API-KEY>" \
   -X POST \
   -H "Content-Type: application/json" \
   -d '{ 
  "jsonrpc": "2.0",
  "method": "trace_call",
  "params": [
    {
      "from": "0xfa0b641678F5115ad8a8De5752016bD1359681b9",
      "to": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
      "data": "0x70a082310000000000000000000000006E0d01A76C3Cf4288372a29124A26D4353EE51BE"
    },
    [
      "trace"
    ],
    "latest"
  ],
  "id": 1
}'

Sample Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "output": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "stateDiff": null,
    "trace": [
      {
        "action": {
          "from": "0xfa0b641678f5115ad8a8de5752016bd1359681b9",
          "callType": "call",
          "gas": "0x800000004012df09",
          "input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
          "to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x25fe",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
        },
        "subtraces": 1,
        "traceAddress": [],
        "type": "call"
      },
      {
        "action": {
          "from": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
          "callType": "delegatecall",
          "gas": "0x800000003f89ad9d",
          "input": "0x70a082310000000000000000000000006e0d01a76c3cf4288372a29124a26d4353ee51be",
          "to": "0x7e14ea29ea374d6f4ff669326c30d1fad9826026",
          "value": "0x0"
        },
        "result": {
          "gasUsed": "0x9e1",
          "output": "0x0000000000000000000000000000000000000000000000000000000000000000"
        },
        "subtraces": 0,
        "traceAddress": [
          0
        ],
        "type": "call"
      }
    ],
    "vmTrace": null
  }
}

Last updated