πŸ¦†
BlockDuck
  • BlockDuck
    • Introduce
    • Why BlockDuck
  • Getting Started
    • Quickstart
    • How to build
    • Try your first query
    • Supported Blockchains
  • Functionality
    • Basic EVM structure table function
      • Blocks
      • Transactions
      • Logs
      • Traces
      • Traces v2
      • Latest Block Number
    • Customized EVM contact table function
      • Contract Events
      • Contract view function
    • Bitcoin table function
      • Blocks
      • Transactions
      • Outputs
      • Inputs
    • Parameter Setting
      • Verbose logging
      • Configs setting
  • Types
    • Types Mapping between DuckDB and EVM
  • Examples
    • Python examples
      • Hourly ERC20 transfer volumn monitor page
Powered by GitBook
On this page
  • Table function
  • Procedure
  • Inputs
  • Outputs
  • Example
  • Dependent RPC Method
  1. Functionality
  2. Basic EVM structure table function

Traces

Table function

The eth_traces_rpc table contains EVM transaction traces, including both main and internal transactions. These traces help in debugging and understanding transaction execution. Also known as internal transactions, they provide insights into the transaction processes.

Procedure

To utilize the eth_traces_rpc function, follow these steps:

  1. Establish a Connection: Connect to your Ethereum node using the URL provided in the inputs.

  2. Set Block Range: Determine the block range by specifying fromBlock and toBlock. These arguments represent the starting and ending block numbers for scanning.

  3. Execute RPC Call: Invoke the eth_traces_rpc function, passing the required arguments (fromBlock, toBlock, and url).

  4. Retrieve and Analyze Data: Collect the output data, which includes detailed transaction traces. Use this data to gain insights into transaction processes and perform any necessary debugging or analysis.

Inputs

Args
Types
Info

fromBlock

BigInt

Block number to start scanning from.

toBlock

BigInt

Block number to stop scanning at.

url

VARCHAR

URL of the Ethereum node.

Outputs

Column names
Types
Info

blockHash

VARCHAR

Hash of the block.

blockNumber

BIGINT

The block number.

callType

VARCHAR

callType: call type, "call", "delegatecall", "staticcall", "create".

from

VARCHAR

address of the sender

to

VARCHAR

address of the receiver

value

VARCHAR

Amount of ETH sent from sender to recipient (if any), measured in wei (1 ETH = 10^18 wei)

input

VARCHAR

call data provided to this trace, often containing function signatures and parameters

gas

BIGINT

gas provided by the caller

error

VARCHAR

Error message or code if the trace execution failed

output

VARCHAR

output data from the call.

gasUsed

BIGINT

Actual amount of gas consumed by this trace's execution

subtraces

BIGINT

Number of subtraces created by this trace

traceAddress

LIST(BIGINT)

Array indicating the exact position of this trace within the trace tree of the transaction

type

VARCHAR

Type of trace (e.g., call, create, suicide) indicating the nature of the operation

transactionHash

VARCHAR

hash of the parent transaction

transactionPosition

INTEGER

Position of the parent transaction within its containing block

Example

D set variable eth_url = 'https://capable-winter-film.quiknode.pro/{API_KEY}';
D select * from eth_traces_rpc(21104078, 21104078, getvariable('eth_url'));
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚      blockHash       β”‚ blockNumber β”‚   callType   β”‚         from         β”‚          to          β”‚ … β”‚ subtraces β”‚ traceAddress β”‚  type   β”‚   transactionHash    β”‚ transactionPosition β”‚
β”‚       varchar        β”‚    int64    β”‚   varchar    β”‚       varchar        β”‚       varchar        β”‚   β”‚   int64   β”‚   int64[]    β”‚ varchar β”‚       varchar        β”‚        int32        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xae2fc483527b8ef9…  β”‚ 0x1f2f10d1c40777ae…  β”‚ … β”‚         2 β”‚ []           β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x1f2f10d1c40777ae…  β”‚ 0xabd055069a6b04db…  β”‚ … β”‚         4 β”‚ [0]          β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xabd055069a6b04db…  β”‚ 0xabec00542d141bdd…  β”‚ … β”‚         0 β”‚ [0, 0]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0xabd055069a6b04db…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [0, 1]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xabd055069a6b04db…  β”‚ 0x1f2f10d1c40777ae…  β”‚ … β”‚         1 β”‚ [0, 2]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x1f2f10d1c40777ae…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [0, 2, 0]    β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0xabd055069a6b04db…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [0, 3]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x1f2f10d1c40777ae…  β”‚ 0x60a8ea6005f7db58…  β”‚ … β”‚         3 β”‚ [1]          β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x60a8ea6005f7db58…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [1, 0]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x60a8ea6005f7db58…  β”‚ 0xabec00542d141bdd…  β”‚ … β”‚         0 β”‚ [1, 1]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x60a8ea6005f7db58…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [1, 2]       β”‚ call    β”‚ 0x15b539fdf722615a…  β”‚                   0 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x08903a3be1e0c263…  β”‚ 0x3fc91a3afd70395c…  β”‚ … β”‚        12 β”‚ []           β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x3fc91a3afd70395c…  β”‚ 0x000000000022d473…  β”‚ … β”‚         0 β”‚ [0]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x3fc91a3afd70395c…  β”‚ 0x000000000022d473…  β”‚ … β”‚         1 β”‚ [1]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x000000000022d473…  β”‚ 0xabec00542d141bdd…  β”‚ … β”‚         0 β”‚ [1, 0]       β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x3fc91a3afd70395c…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [2]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x3fc91a3afd70395c…  β”‚ 0x60a8ea6005f7db58…  β”‚ … β”‚         0 β”‚ [3]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x3fc91a3afd70395c…  β”‚ 0xabec00542d141bdd…  β”‚ … β”‚         0 β”‚ [4]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x3fc91a3afd70395c…  β”‚ 0x60a8ea6005f7db58…  β”‚ … β”‚         3 β”‚ [5]          β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x60a8ea6005f7db58…  β”‚ 0xc02aaa39b223fe8d…  β”‚ … β”‚         0 β”‚ [5, 0]       β”‚ call    β”‚ 0x1bd4d5006a6b321c…  β”‚                   1 β”‚
β”‚          Β·           β”‚        Β·    β”‚  Β·           β”‚          Β·           β”‚          Β·           β”‚ Β· β”‚         Β· β”‚   Β·          β”‚  Β·      β”‚          Β·           β”‚                   Β· β”‚
β”‚          Β·           β”‚        Β·    β”‚  Β·           β”‚          Β·           β”‚          Β·           β”‚ Β· β”‚         Β· β”‚   Β·          β”‚  Β·      β”‚          Β·           β”‚                   Β· β”‚
β”‚          Β·           β”‚        Β·    β”‚  Β·           β”‚          Β·           β”‚          Β·           β”‚ Β· β”‚         Β· β”‚   Β·          β”‚  Β·      β”‚          Β·           β”‚                   Β· β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0xc1994a7efddd1a42…  β”‚ 0xec53bf9167f50cde…  β”‚ … β”‚         1 β”‚ [0, 0]       β”‚ call    β”‚ 0x3434012fef72cf68…  β”‚                 220 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ delegatecall β”‚ 0xec53bf9167f50cde…  β”‚ 0x17f56e911c279bad…  β”‚ … β”‚         0 β”‚ [0, 0, 0]    β”‚ call    β”‚ 0x3434012fef72cf68…  β”‚                 220 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0xc1994a7efddd1a42…  β”‚ 0xc76b81d835a6ef88…  β”‚ … β”‚         0 β”‚ [0, 1]       β”‚ call    β”‚ 0x3434012fef72cf68…  β”‚                 220 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xc1994a7efddd1a42…  β”‚ 0xec53bf9167f50cde…  β”‚ … β”‚         1 β”‚ [0, 2]       β”‚ call    β”‚ 0x3434012fef72cf68…  β”‚                 220 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ delegatecall β”‚ 0xec53bf9167f50cde…  β”‚ 0x17f56e911c279bad…  β”‚ … β”‚         0 β”‚ [0, 2, 0]    β”‚ call    β”‚ 0x3434012fef72cf68…  β”‚                 220 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x1651a65f3f5e3141…  β”‚ 0x6801763c790abe6c…  β”‚ … β”‚         0 β”‚ []           β”‚ call    β”‚ 0x2191c99ee4e6deb4…  β”‚                 221 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xcbd6832ebc203e49…  β”‚ 0x20c7e0f6822a0664…  β”‚ … β”‚         0 β”‚ []           β”‚ call    β”‚ 0x563ead3eca191083…  β”‚                 222 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0xa06ee26610f2a230…  β”‚ 0x2bfbdc1d8985a1ae…  β”‚ … β”‚         0 β”‚ []           β”‚ call    β”‚ 0x4933adb2f4d95b7e…  β”‚                 223 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x38fc712418276b5d…  β”‚ 0x018a220d9d6a3c25…  β”‚ … β”‚         0 β”‚ []           β”‚ call    β”‚ 0xfda2256c3f3d7541…  β”‚                 224 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x93793bd1f3e35a0e…  β”‚ 0x68d3a973e7272eb3…  β”‚ … β”‚         1 β”‚ []           β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x68d3a973e7272eb3…  β”‚ 0x62e0d3fd804dfbf0…  β”‚ … β”‚         4 β”‚ [0]          β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x62e0d3fd804dfbf0…  β”‚ 0xb528edbef013aff8…  β”‚ … β”‚         0 β”‚ [0, 0]       β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x62e0d3fd804dfbf0…  β”‚ 0xa0b86991c6218b36…  β”‚ … β”‚         1 β”‚ [0, 1]       β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ delegatecall β”‚ 0xa0b86991c6218b36…  β”‚ 0x43506849d7c04f91…  β”‚ … β”‚         0 β”‚ [0, 1, 0]    β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x62e0d3fd804dfbf0…  β”‚ 0x68d3a973e7272eb3…  β”‚ … β”‚         1 β”‚ [0, 2]       β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x68d3a973e7272eb3…  β”‚ 0xa0b86991c6218b36…  β”‚ … β”‚         1 β”‚ [0, 2, 0]    β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ delegatecall β”‚ 0xa0b86991c6218b36…  β”‚ 0x43506849d7c04f91…  β”‚ … β”‚         0 β”‚ [0, 2, 0, 0] β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ staticcall   β”‚ 0x62e0d3fd804dfbf0…  β”‚ 0xa0b86991c6218b36…  β”‚ … β”‚         1 β”‚ [0, 3]       β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ delegatecall β”‚ 0xa0b86991c6218b36…  β”‚ 0x43506849d7c04f91…  β”‚ … β”‚         0 β”‚ [0, 3, 0]    β”‚ call    β”‚ 0xa514abcac47226ca…  β”‚                 225 β”‚
β”‚ 0x8e8d1d95a717a152…  β”‚    21104078 β”‚ call         β”‚ 0x95222290dd7278aa…  β”‚ 0x388c818ca8b9251b…  β”‚ … β”‚         0 β”‚ []           β”‚ call    β”‚ 0xc2df1664c2a440b5…  β”‚                 226 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1370 rows (40 shown)                                                                                                                                            16 columns (10 shown) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Dependent RPC Method

  • trace_block

PreviousLogsNextTraces v2

Last updated 3 months ago