Alchemy Documentation
Website
Roadmap
Dashboard
Search…
👋
Welcome to Alchemy
🚀
Introduction
Why Use Alchemy?
Getting Started
Core Products
Contributing to these Docs
Referral Program
Web3 University
Road To Web3
SDK
Alchemy SDK QuickStart
✨
Enhanced APIs
Enhanced APIs Overview
NFT API
Transfers API (Tx History)
Transaction Receipts API
Token API
Notify API
Debug API
Trace API
trace_call
trace_callMany
trace_rawTransaction
trace_replayBlockTransactions
trace_replayTransaction
trace_block
trace_filter
trace_get
trace_transaction
Subscription API (WebSockets)
Unstoppable Domains APIs
⛓
Chain APIs
Ethereum API
Polygon API
Arbitrum API
Optimism API
Solana API
Flow Docs
Crypto.org Docs
Feature Support By Chain
📖
Documentation
Best Practices When Using Alchemy
Changelog
Alchemy Web3.js
Error Reference
Compute Units (CUs)
Throughput (Rate Limits)
Gas Limits for eth_call and eth_estimateGas
Batch Requests
🎓
Road to Web3
Welcome to the Road to Web3
Important Info
Weekly Hackathons
Weekly Learning Challenges
💻
Tutorials
Hello World Smart Contract
How to Code and Deploy a Polygon Smart Contract
How to Create an NFT Tutorial
How to Build an NFT Marketplace in 2 hours
NFT Minter Tutorial: How to Create a Full Stack DApp
How to Create an ERC-20 Token (4 Steps)
Integrating Historical Transaction Data into your dApp
How to Track Mined and Pending Ethereum Transactions
Arbitrum NFTs: Creating and Deploying ERC-721
How to Send a Private Transaction on Ethereum
📜
Guides
The Merge
How to Fork Ethereum Mainnet
How to Set Up Core Web3 Developer Tools
EIP-1559 Resource and Tutorial Hub
Dashboard Walkthrough
Understanding Ethereum Logs
Deep Dive into eth_getLogs
How to Add Alchemy RPC Endpoints to Metamask
Alchemy Set-up for Macs
Choosing a Web3 Network
Running an Eth2.0 Staking Node or Validator with Alchemy
Internal Playbook: Upgrading Ethereum Nodes
Debugging CORS problems for end-users
How to interpret binaries in Solidity
How to Verify a Message Signature on Ethereum
Ethereum Transactions - Pending, Mined, Dropped & Replaced
How to Enable Compression to Speed Up JSON-RPC Blockchain Requests
📚
Resources
FAQ
Support
Blockchain 101
Web3 Glossary
Powered By
GitBook
trace_replayTransaction
Replays a transaction, returning the traces.
Parameters
1.
Hash
- Transaction hash.
2.
Array
- Type of trace, one or more of:
"vmTrace"
,
"trace"
,
"stateDiff"
.
1
params:
[
2
"0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f"
,
3
[
"trace"
]
4
]
Copied!
Returns
Object
- Block traces.
Example
Request
Curl
Postman
1
curl
https://eth-mainnet.alchemyapi.io/v2/your-api-key
\
2
-X POST
\
3
-H
"Content-Type: application/json"
\
4
-d
'{"method":"trace_replayTransaction","params":["0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",["trace"]],"id":1,"jsonrpc":"2.0"}'
Copied!
1
URL
:
https://eth-mainnet.alchemyapi.io/v2/your-api-key
2
RequestType
:
POST
3
Body
:
4
{
5
"jsonrpc":"2.0",
6
"method":"trace_replayTransaction",
7
"params":["0x02d4a872e096445e80d05276ee756cefef7f3b376bcec14246469c0cd97dad8f",["trace"]],
8
"id":1
9
}
Copied!
Response
1
{
2
"jsonrpc"
:
"2.0"
,
3
"result"
:
{
4
"output"
:
"0x"
,
5
"stateDiff"
:
null
,
6
"trace"
:
[
7
{
8
"action"
:
{
9
"callType"
:
"call"
,
10
"from"
:
"0x00a63d34051602b2cb268ea344d4b8bc4767f2d4"
,
11
"gas"
:
"0x0"
,
12
"input"
:
"0x"
,
13
"to"
:
"0x87cc0d78ee64a9f11b5affdd9ea523872eae14e4"
,
14
"value"
:
"0x810e988a393f2000"
15
},
16
"result"
:
{
17
"gasUsed"
:
"0x0"
,
18
"output"
:
"0x"
19
},
20
"subtraces"
:
0
,
21
"traceAddress"
:
[],
22
"type"
:
"call"
23
}
24
],
25
"vmTrace"
:
null
26
},
27
"id"
:
0
28
}
Copied!
Previous
trace_replayBlockTransactions
Next
trace_block
Last modified
2mo ago
Copy link
Contents
Parameters
Returns
Example
Request
Response