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": [
"0x38f92e54c90766253656beaa11f91102e8ad5bd6e6dad0f526c9998900caadf0",
{
"tracer": "bigramTracer"
}
],
"id": 1,
"jsonrpc": "2.0"
}'
Sample Response
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"ADD-CALLDATALOAD": 1,
"ADD-PUSH2": 1,
"ADD-SWAP1": 2,
"ADDRESS-EQ": 1,
"AND-ADDRESS": 1,
"AND-CALLER": 1,
"AND-DUP2": 2,
"AND-DUP5": 1,
"AND-EQ": 1,
"AND-ISZERO": 1,
"AND-PUSH1": 2,
"AND-PUSH2": 2,
"AND-PUSH32": 1,
"AND-SWAP2": 2,
"CALLDATACOPY-PUSH1": 1,
"CALLDATALOAD-PUSH1": 3,
"CALLDATALOAD-SWAP4": 1,
"CALLDATASIZE-LT": 2,
"CALLDATASIZE-PUSH1": 3,
"CALLER-DUP5": 1,
"CALLER-PUSH1": 2,
"CALLVALUE-DUP1": 1,
"DUP1-CALLDATACOPY": 1,
"DUP1-CALLDATALOAD": 1,
"DUP1-CALLDATASIZE": 1,
"DUP1-DUP1": 1,
"DUP1-DUP3": 1,
"DUP1-DUP6": 1,
"DUP1-ISZERO": 2,
"DUP1-PUSH1": 1,
"DUP1-PUSH4": 10,
"DUP1-RETURNDATACOPY": 1,
"DUP1-SLOAD": 1,
"DUP1-SWAP2": 2,
"DUP2-AND": 1,
"DUP2-DUP2": 1,
"DUP2-EQ": 1,
"DUP2-KECCAK256": 2,
"DUP2-LT": 1,
"DUP2-MSTORE": 6,
"DUP2-SWAP1": 1,
"DUP3-AND": 1,
"DUP3-GT": 1,
"DUP3-KECCAK256": 1,
"DUP3-NOT": 1,
"DUP3-PUSH1": 1,
"DUP4-AND": 3,
"DUP4-DUP4": 1,
"DUP4-DUP6": 1,
"DUP4-PUSH2": 2,
"DUP5-DUP5": 1,
"DUP5-GAS": 1,
"DUP5-PUSH1": 2,
"DUP5-PUSH2": 1,
"DUP5-SWAP1": 1,
"DUP5-SWAP3": 1,
"DUP6-AND": 2,
"DUP6-DUP6": 1,
"DUP6-SUB": 2,
"EQ-ISZERO": 2,
"EQ-PUSH2": 8,
"GAS-DELEGATECALL": 1,
"GT-ISZERO": 1,
"GT-PUSH2": 3,
"ISZERO-DUP2": 1,
"ISZERO-ISZERO": 1,
"ISZERO-PUSH2": 8,
"JUMP-JUMPDEST": 27,
"JUMPDEST-CALLDATASIZE": 1,
"JUMPDEST-CALLER": 1,
"JUMPDEST-DUP1": 2,
"JUMPDEST-JUMP": 1,
"JUMPDEST-POP": 4,
"JUMPDEST-PUSH1": 15,
"JUMPDEST-PUSH2": 9,
"JUMPDEST-SLOAD": 2,
"JUMPDEST-SWAP1": 1,
"JUMPDEST-SWAP2": 1,
"JUMPDEST-SWAP3": 1,
"JUMPDEST-SWAP4": 1,
"JUMPDEST-SWAP5": 1,
"JUMPI-DUP1": 7,
"JUMPI-JUMPDEST": 12,
"JUMPI-PUSH1": 2,
"JUMPI-PUSH2": 1,
"JUMPI-RETURNDATASIZE": 1,
"KECCAK256-DUP1": 1,
"KECCAK256-DUP6": 1,
"KECCAK256-SLOAD": 2,
"LOG3-PUSH2": 1,
"LT-ISZERO": 1,
"LT-PUSH2": 2,
"MLOAD-DUP1": 2,
"MLOAD-PUSH2": 1,
"MLOAD-SWAP1": 1,
"MSTORE-CALLVALUE": 1,
"MSTORE-PUSH1": 9,
"MSTORE-SWAP1": 1,
"NOT-DUP3": 1,
"POP-ADD": 1,
"POP-DUP2": 1,
"POP-DUP3": 1,
"POP-JUMP": 7,
"POP-POP": 9,
"POP-PUSH1": 2,
"POP-SWAP1": 1,
"PUSH1-ADD": 2,
"PUSH1-AND": 1,
"PUSH1-CALLDATALOAD": 2,
"PUSH1-CALLDATASIZE": 2,
"PUSH1-DUP1": 5,
"PUSH1-DUP2": 1,
"PUSH1-DUP3": 1,
"PUSH1-DUP4": 1,
"PUSH1-DUP5": 1,
"PUSH1-MLOAD": 4,
"PUSH1-MSTORE": 5,
"PUSH1-PUSH1": 29,
"PUSH1-PUSH2": 3,
"PUSH1-PUSH32": 2,
"PUSH1-RETURN": 1,
"PUSH1-SHL": 12,
"PUSH1-SHR": 2,
"PUSH1-SWAP1": 4,
"PUSH1-SWAP3": 1,
"PUSH1-SWAP4": 1,
"PUSH2-CALLDATASIZE": 1,
"PUSH2-CALLER": 1,
"PUSH2-DUP4": 2,
"PUSH2-JUMP": 16,
"PUSH2-JUMPI": 23,
"PUSH2-PUSH2": 7,
"PUSH2-SWAP1": 1,
"PUSH2-SWAP2": 1,
"PUSH32-DUP5": 1,
"PUSH32-JUMPDEST": 1,
"PUSH32-PUSH2": 1,
"PUSH4-EQ": 7,
"PUSH4-GT": 3,
"RETURNDATACOPY-DUP1": 1,
"RETURNDATASIZE-PUSH1": 2,
"SHL-SUB": 12,
"SHR-DUP1": 2,
"SLOAD-DUP2": 1,
"SLOAD-DUP5": 1,
"SLOAD-PUSH1": 3,
"SLT-ISZERO": 1,
"SSTORE-POP": 1,
"SSTORE-SWAP2": 1,
"SUB-AND": 6,
"SUB-DUP1": 1,
"SUB-DUP2": 1,
"SUB-DUP3": 1,
"SUB-DUP4": 3,
"SUB-SLT": 1,
"SUB-SWAP1": 3,
"SWAP1-DUP2": 4,
"SWAP1-DUP5": 1,
"SWAP1-ISZERO": 1,
"SWAP1-JUMP": 3,
"SWAP1-KECCAK256": 1,
"SWAP1-LOG3": 1,
"SWAP1-POP": 4,
"SWAP1-PUSH2": 2,
"SWAP1-RETURN": 1,
"SWAP1-SSTORE": 2,
"SWAP1-SWAP4": 1,
"SWAP2-DUP2": 1,
"SWAP2-DUP6": 1,
"SWAP2-POP": 1,
"SWAP2-SUB": 2,
"SWAP2-SWAP1": 3,
"SWAP3-POP": 2,
"SWAP3-SWAP1": 1,
"SWAP3-SWAP2": 1,
"SWAP4-ADD": 1,
"SWAP4-POP": 1,
"SWAP4-SWAP1": 1,
"SWAP4-SWAP3": 1,
"SWAP5-PUSH1": 1
}
}
Last updated