Trace API Quickstart
The Trace API provides insights into transaction processing and on-chain activity.
To use the Trace API your Alchemy plan must be set to the Growth or Enterprise tiers. Upgrade your plan for access.
Don’t have an API key?
Sign up or upgrade your plan for access. Get started for free
Introduction
The Trace API methods provide full externality trace functions on transactions executed in the Ethereum chain. Filtering is simple by using just the address
information. The returned information includes the execution of the following:
CREATE
SUICIDE
- Variants of the
CALL
- Input data
- Output data
- Gas usage
- Amount transferred
- Success status of individual actions
Trace use cases
Common use cases for the Trace API come in all flavors. Below are popular ones:
Trace types
Trace actions types
CREATE
- Used to create a smart contract.
Example response
Create parameter definitions
SUICIDE
SUICIDE
is captured when a smart contract is destroyed. That is when the selfdestruct function of Solidity is used.SUICIDE
transfers the contract’s balance to theaddress
specified in theselfdestruct
function clearing on-chain memory.- The cleared memory is processed as a refund of the total gas cost to complete the transaction.
Example response
SUICIDE parameter definitions
CALL
CALL
is used for transferring ETH between externally owned accounts (EOAs).- Also used to
CALL
a smart contract function.
Example response
CALL
parameter definitions
How to read a traceAddress
Traces are structured in a tree format. The traceAddress
field represents the position of the trace in the tree. Below is a diagram of the traceAddress
set of tree results:
Trace tree diagram