Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import CreditCost from '@site/src/components/CreditCost/CreditCostPrice.js';

Returns traces matching the specified filter. The response is limited to 10000 traces per response. <CreditCost network="evm_trace" method="trace_filter" />
Returns traces matching the specified filter. The block range is limited to 100 blocks per query (the difference between `fromBlock` and `toBlock`). <CreditCost network="evm_trace" method="trace_filter" />
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,24 @@ description: Ethereum trace methods

# Ethereum trace methods

Infura provides access to the following trace API methods to allow users to gain insights into the execution of smart contracts and transactions:
:::info

Trace API is an open beta feature, available to paying Infura customers.
:::

Infura provides access to the following trace API methods that provide insights into the execution of smart contracts and transactions.

- [`trace_block`](trace_block.mdx)
- [`trace_call`](trace_call.mdx)
- [`trace_callMany`](trace_callmany.mdx)
- [`trace_transaction`](trace_transaction.mdx)
- [`trace_filter`](trace_filter.mdx)

:::info

Trace API is currently an open beta feature, available to paying Infura customers.

:::

When tracing transactions, the trace diagnostic options are [`trace`](#trace) and [`stateDiff`](#statediff).

:::info

`trace_block, trace_filter`, and `trace_transaction` returns `trace` information, whereas `trace_call` and `trace_callMany`
allow you to use the `trace` or `stateDiff` diagnostic options when tracing calls or transactions.
Comment on lines 23 to -29
Copy link
Contributor

@alexandratran alexandratran Nov 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this info block seems to provide the needed information. Can replace lines 23-29 with:

`trace_block`, `trace_filter`, and `trace_transaction` return [`trace`](#trace) information, while
`trace_call` and `trace_callMany`
allow you to use the [`trace`](#trace) or [`stateDiff`](#statediff) diagnostic options when tracing calls or transactions.


:::caution
Trace responses are handled generically to enable support of additional fields beyond
those documented here. This requires graceful handling.
:::

## `trace`
Expand Down Expand Up @@ -61,28 +58,33 @@ smart contract transaction. Excludes precompiled contracts.
| Key | Value |
|-----------------------|-----------------------------------------------------------------------------------------------------------------|
| `action` | Transaction details. |
| `callType` | Whether the transaction is `call` or `create`. |
| `from` | Address of the transaction sender. |
| `gas` | Gas provided by sender. |
| `input` | Transaction data. |
| `to` | Target of the transaction. |
| `value` | Value transferred in the transaction. |
| &nbsp;&nbsp;- `creationMethod` | Opcode used during contract creation: `create` or `create2`. Returned for `create` operations. |
| &nbsp;&nbsp;- `callType` | Whether the transaction is `call`, `staticcall`, or `delegatecall`. Returned for `call` operations. |
| &nbsp;&nbsp;- `from` | Address of the transaction sender. |
| &nbsp;&nbsp;- `gas` | Gas provided by sender. |
| &nbsp;&nbsp;- `input` | Transaction data. Returned for `call` operations. |
| &nbsp;&nbsp;- `init` | Contract initialization code. Returned for `create` operations. |
| &nbsp;&nbsp;- `to` | Target of the transaction. Returned for `call` operations. |
| &nbsp;&nbsp;- `value` | Value transferred in the transaction. |
| `blockHash` | Hash of the block containing this trace. |
| `blockNumber` | Block number containing this trace. |
| `result` | Transaction result. |
| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
| `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. |
| `subTraces` | Traces of contract calls made by the transaction. |
| &nbsp;&nbsp;- `address` | Address of the newly created contract. Returned for `create` operations. |
| &nbsp;&nbsp;- `code` | Bytecode of the newly created contract. Returned for `create` operations. |
| &nbsp;&nbsp;- `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
| &nbsp;&nbsp;- `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. Returned for `call` operations. |
| `subtraces` | Number of sub-traces (nested contract calls) made by the transaction. |
| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. |
| `transactionHash` | Hash of the transaction. |
| `transactionPosition` | Transaction position. |
| `type` | Whether the transaction is a `CALL` or `CREATE` series operation. |

| `transactionHash` | Hash of the transaction. |
| `transactionPosition` | Transaction position within the block. |
| `type` | Whether the transaction is a `call` or `create` operation. |

## `stateDiff`

Displays state changes in the requested block for each transaction, represented as a map of accounts to an object. Lists
the balance, code, nonce, and storage changes from immediately before the transaction to after the transaction. For the `key:value` pairs:

- `+` indicates the field didnt exist before and now has the specified value.
- `+` indicates the field didn't exist before and now has the specified value.
- `-` indicates a deleted value.
- `*` has a `from` and a `to` value.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ smart contract transaction. Excludes precompiled contracts.
| `result` | Transaction result. |
| `gasUsed` | Gas used by the transaction. Includes any refunds of unused gas. |
| `output` | Return value of the contract call. Contains only the actual value sent by a `RETURN` operation. If a `RETURN` was not executed, the output is empty bytes. |
| `subTraces` | Traces of contract calls made by the transaction. |
| `subtraces` | Traces of contract calls made by the transaction. |
| `traceAddress` | Tree list address of where the call occurred, address of the parents, and order of the current sub call. |
| `transactionHash` | Hash of the transaction. |
| `transactionPosition`| Transaction position. |
Expand Down
Loading