trace_rawTransaction
JSON-RPC method executes a raw transaction and returns trace information. This method simulates the execution of a raw transaction and provides detailed execution traces, making it useful for analyzing pre-signed transactions and testing transaction execution without broadcasting.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
- Raw transaction data (string, required): Raw transaction in hexadecimal format
- Trace types (array, required): Array of trace types to include in response
Trace types
"trace"
: Basic execution trace information"vmTrace"
: Virtual machine execution trace"stateDiff"
: State differences caused by the transaction
Response
The method returns an array of trace objects containing detailed execution information.Response structure
Trace objects:action
— Details about the call actionresult
— Execution resulttraceAddress
— Address path within call hierarchytype
— Type of trace (call, create, suicide, etc.)
Usage example
Basic implementation
Example request
Shell
Use cases
Thetrace_rawTransaction
method is essential for applications that need to:
- Pre-signed transaction analysis: Analyze transactions before broadcasting
- Offline transaction testing: Test transaction execution offline
- Transaction debugging: Debug transaction execution issues
- Security analysis: Analyze transaction security and potential vulnerabilities
- Gas estimation: Get accurate gas estimates for raw transactions
- Development tools: Build transaction analysis and debugging tools
- Wallet applications: Provide transaction previews in wallet interfaces
- Compliance checking: Verify regulatory compliance before broadcasting
- Educational tools: Create educational content about transaction execution
- Research platforms: Support academic and commercial blockchain research
Body
application/json
JSON-RPC version
Available options:
2.0
The RPC method name
Available options:
trace_rawTransaction
Parameters: [raw transaction data, trace types array]
Request identifier