trace_filter

Returns traces matching given filter.

To learn more about more about trace_filter and how it works, check out What is trace_filter?.

Parameters

  1. Object - The filter object
    • fromBlock: Quantity or Tag - (optional) From this block.
    • toBlock: Quantity or Tag - (optional) To this block.
    • fromAddress: Array - (optional) Sent from these addresses.
    • toAddress: Address - (optional) Sent to these addresses.
    • after: Quantity - (optional) The offset trace number
    • count: Quantity - (optional) Integer number of traces to display in a batch.
params: [{
  "fromBlock": "0xc26f54",
  "toBlock": "0xc26f54", 
}]

Returns

  • Array - Traces matching given filter

Example

Request

curl https://eth-mainnet.g.alchemy.com/v2/your-api-key \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"trace_filter","params":[{"fromBlock":"0xc26f54","toBlock":"0xc26f54"}],"id":1,"jsonrpc":"2.0"}'
URL: https://eth-mainnet.g.alchemy.com/v2/your-api-key
RequestType: POST
Body: 
{
    "jsonrpc":"2.0",
    "method":"trace_filter",
    "params":[{"fromBlock":"0xc26f54","toBlock":"0xc26f54"}],
    "id":1
}

Response

{
    "jsonrpc": "2.0", 
    "result": 
        [{"action": {
            "callType": "call", 
            "from": "0x15dce17509846b420b1f5c158fe3d7518204abb6",
            "gas": "0xed2a4", 
            "input": "0x00000000000000000000000000abc3136b63363200000000000000000000000000708a100000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000001f0000000016128acb08000000cb0c5d9d92f4f2f80cce7aa271a1e148c226e19d00000000000000000000000000000000000000000000000000000000000000000000000000000000000000008ae720a71622e824f576b4a8c03031066548a3b1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075cf0c1848f9db946ab000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000e000000000c128acb0800000060594a405d53811d3bc4766596efd80fd545a2700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000cb0c5d9d92f4f2f80cce7aa271a1e148c226e19d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e41dbb290f7bc000000000000000000000000000fffd8963efd1fc6a506488495d951d5263988d2500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000002a9059cbb000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060594a405d53811d3bc4766596efd80fd545a270000000000000000000000000000000000000000000000000e41dbb290f7bc0000000000005022c0d9f0000008ae720a71622e824f576b4a8c03031066548a3b100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e4f726c005981e87000000000000000000000000000000000000abe945c436595ce765a8a261317b00000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000", 
            "to": "0x000000000000abe945c436595ce765a8a261317b", 
            "value": "0x0"
            }, 
        "blockHash": "0xe0583a364c20fa67748ca92e276df63919c67e12fdc9bdbc17deae8cf730cf35", 
        "blockNumber": 12742484, 
        "result": {
            "gasUsed": "0x4551d", 
            "output": "0x00000000000000000000000000000000000000000000000000d96b96f61c5e87"}, 
            "subtraces": 12, 
            "traceAddress": [], 
            "transactionHash": "0x87951d0547018db2c4817282a53e2015d91934b42d1b8d8bba1bef7cb480f263", 
            "transactionPosition": 0, 
            "type": "call"},
...
}
Language
URL
Click Try It! to start a request and see the response here!
ReadMe