debug_traceTransaction
Provides a detailed record of how the transaction interacts with smart contracts, accounts, and other elements on the blockchain, helping developers understand what happened and troubleshoot issues.
Parameters
Transaction Hash
.Tracer
- choose from one of these options:4byteTracer
- Solidity contract functions are addressed using the first four byte of the Keccak-256 hash of their signature. Thistracer
monitors and analyzes the usage of specific function signatures within smart contracts by capturing their unique first four bytes.callTracer
- collects data about all call frames executed within a transaction, creating a hierarchical list of call frames structured mirroring the EVM's operations. This is useful for debugging and analytical purposes.prestateTracer
- captures and analyzes the state of the blockchain before the execution of a specific transaction. It helps in understanding the state changes and effects that a transaction will have on the blockchain's data and accounts before the transaction is actually executed.noopTracer
- returns empty results. This is used for testing purpose.opcountTracer
- count and track the number of operations (or opcodes) executed during a specific transaction.unigramTracer
- counts the frequency of occurrence of each opcode.bigramTracer
- a bigram refers to a sequence of two bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these two-byte sequences as they appear within the data of executed transactions.trigramTracer
- a trigram refers to a sequence of three bytes or characters. This tracer is designed to observe and provide insights into the patterns and occurrences of these three-byte sequences as they appear within the data of executed transactions.evmdisTracer
- generates the bytecode disassembly of executed transactions, providing developers with insights into how smart contracts operate at a low-level bytecode level for debugging, security audits, and performance optimization purposes.
Sample Request
curl https://lb.nodies.app/v1/<INSERT URL> \
-H "x-api-key: <API-KEY>" \
-X POST \
-H "Content-Type: application/json" \
-d '{
"method": "debug_traceTransaction",
"params": [
"0x8b09ab69bd6a03a3bf0784334a6489f52e6308b843ce42b7373952e96455e68e",
{
"tracer": "callTracer"
}
],
"id": 1,
"jsonrpc": "2.0"
}'
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"from": "0xfa0b641678f5115ad8a8de5752016bd1359681b9",
"gas": "0x502d4",
"gasUsed": "0xfff4",
"to": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"input": "0xa9059cbb00000000000000000000000082e03ccf3d9416725f9d4ca1f2626330068b50e100000000000000000000000000000000000000000000000000000000008c6180",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"calls": [
{
"from": "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
"gas": "0x4d342",
"gasUsed": "0x8f78",
"to": "0x7e14ea29ea374d6f4ff669326c30d1fad9826026",
"input": "0xa9059cbb00000000000000000000000082e03ccf3d9416725f9d4ca1f2626330068b50e100000000000000000000000000000000000000000000000000000000008c6180",
"output": "0x0000000000000000000000000000000000000000000000000000000000000001",
"type": "DELEGATECALL"
}
],
"value": "0x0",
"type": "CALL"
}
}
Last updated