arbtrace_transaction
Retrieve detailed trace information for a specific transaction on Arbitrum networks using the trace API. Input transaction hash and optional RPC URL or chain name to analyze transaction execution steps and internal calls.
Instructions
Get trace information for a specific transaction (requires trace API)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | No | Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL | |
| rpcUrl | No | The RPC URL of the Arbitrum node (optional if default is set) | |
| txHash | Yes | Transaction hash to trace |
Implementation Reference
- src/index.ts:542-558 (handler)MCP tool handler for 'arbtrace_transaction': resolves RPC URL or chain name to RPC, creates NitroNodeClient instance, calls traceTransaction with txHash, formats and returns the trace result as JSON text content.case "arbtrace_transaction": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const nodeClient = new NitroNodeClient(rpcUrl); const result = await nodeClient.traceTransaction( args.txHash as string ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:1297-1321 (schema)Tool schema definition in getAvailableTools(): specifies name, description, and inputSchema with required txHash and optional rpcUrl/chainName for the arbtrace_transaction tool.{ name: "arbtrace_transaction", description: "Get trace information for a specific transaction (requires trace API)", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum node (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL", }, txHash: { type: "string", description: "Transaction hash to trace", }, }, required: ["txHash"], }, },
- NitroNodeClient helper method traceTransaction: performs the RPC call to 'arbtrace_transaction' with txHash parameter and returns TraceResult or error.async traceTransaction(txHash: string): Promise<TraceResult> { try { const traces = await this.makeRpcCall("arbtrace_transaction", [txHash]); return { traces }; } catch (error) { return { traces: null, error: `Trace transaction not supported on this RPC endpoint: ${ (error as Error).message }`, }; } }