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 pay as you go 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:
CREATESUICIDE- 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
SUICIDEis captured when a smart contract is destroyed. That is when the selfdestruct function of Solidity is used.SUICIDEtransfers the contract’s balance to theaddressspecified in theselfdestructfunction 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
CALLis used for transferring ETH between externally owned accounts (EOAs).- Also used to
CALLa 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:
