trace_filter-polygon

Returns traces matching given filter

🚧

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

  • fromBlock: quantity|tag - (optional) From this block.
  • toBlock: quantity|tag - (optional) To this block.
  • fromAddress: data, 20 bytes - (optional) An array addresses of the senders.
  • toAddress: data, 20 bytes - (optional) An array addresses of the receivers.
  • after: quantity - (optional) The offset trace number
  • count: quantity - (optional) Integer number of traces to display in a batch.
curl https://polygon-mainnet-archive.allthatnode.com:8545/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "trace_filter",
    "params": [
        {
            "fromBlock": "0x2B9BB83",
            "toBlock": "0x2B9BB85",
            "fromAddress": [
                "0xe2f651480ddd91109d8feb087abd82722fe58ff8"
            ]
        }
    ]
}'

Returns

  • An array of traces matching given filter
    • 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
    • transactionHash - The hash of the transaction
    • transactionPosition - The transaction position
    • type - The value of the method such as call or create
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
        {
            "action": {
                "from": "0xe2f651480ddd91109d8feb087abd82722fe58ff8",
                "callType": "call",
                "gas": "0x5b5e0",
                "input": "0x47153f8200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000964617b2d933c6e5c6c1b30681dcaee23baa9836000000000000000000000000f65b6396df6b7e2d8a6270e3ab6c7bb08baef22e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000000000000000000000000000000000000000002b8500000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000012423287f24000000000000000000000000e2f651480ddd91109d8feb087abd82722fe58ff800000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000064eec61e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000413bb6e25febf71751c7032e63a23479030533c9358c4c2888e9e02a1ab5cee2495ff02782efd12885f839e3e063fc7a3fb2caa4b01c1531a776b6913ae8b12e251c00000000000000000000000000000000000000000000000000000000000000",
                "to": "0x8419f704cd6520e2c3ef477ef9bfa3159ea1aca7",
                "value": "0x0"
            },
            "blockHash": "0x7ed725696f12503201879dda5598649a1e62776f74370042d9631444fe9930c7",
            "blockNumber": 45726595,
            "result": {
                "gasUsed": "0x45123",
                "output": "0x000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000"
            },
            "subtraces": 1,
            "traceAddress": [],
            "transactionHash": "0xe243d48534c005787d92de91351ec6dd7fbbcff2187c0ed5c5280f252c24ded9",
            "transactionPosition": 35,
            "type": "call"
        }
    ]
}

Try Yourself

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