> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.galleon8.com/api-reference/node-api/ethereum/api-endpoints/debug-api/debug-trace-call/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.galleon8.com/_mcp/server. # debug_traceCall POST https://node-api-docs-proxy.galleon8.workers.dev Content-Type: application/json Runs a read-only eth_call-style transaction in the selected block context and returns debug output for the selected tracer. Reference: https://docs.galleon8.com/api-reference/node-api/ethereum/api-endpoints/debug-api/debug-trace-call ## Request ### Body (application/json) This endpoint expects an object. - `transaction` (TransactionCallObject, required) — Read-only transaction call object to simulate. - `block` (BlockNumberOrTag, required) — Block number or supported block tag used as the execution context. - `traceConfig` (TraceConfig, optional) — Optional trace configuration. Omit it or pass an empty object to use the default struct logger. ## Response ### 200 Debug trace result for the simulated call. - `DebugTraceResult` ## Types ### TransactionCallObject Read-only transaction call object used by debug_traceCall. - `from` (string, optional) — 20-byte EVM address. - `to` (string, optional, nullable) — 20-byte EVM address. - `gas` (string, optional) — Hex-encoded integer quantity. - `gasPrice` (string, optional) — Hex-encoded integer quantity. - `maxFeePerGas` (string, optional) — Hex-encoded integer quantity. - `maxPriorityFeePerGas` (string, optional) — Hex-encoded integer quantity. - `value` (string, optional) — Hex-encoded integer quantity. - `data` (string, optional) — Hex-encoded byte data. - `input` (string, optional) — Hex-encoded byte data. - `accessList` (list of AccessListItems, optional) — EIP-2930 access list. ### BlockNumberOrTag Block number encoded as a quantity, or a named block tag. ### TraceConfig Optional debug trace configuration. When tracer is omitted or empty, the default opcode struct logger is used. Named tracer support and tracerConfig fields depend on the backing Ethereum client. - `tracer` (string, optional) — Built-in tracer name such as callTracer or prestateTracer, or a client-supported custom tracer expression. - `tracerConfig` (map from string to any, optional) — Tracer-specific configuration object. Accepted fields depend on the selected tracer and Ethereum client. - `timeout` (string, optional) — Optional trace execution timeout, usually a Go duration string such as 5s or 300ms. - `reexec` (integer, optional) — Number of historical blocks the client may re-execute to reconstruct state. - `disableStorage` (boolean, optional) — Opcode logger option that omits storage capture from structLogs when true. - `disableStack` (boolean, optional) — Opcode logger option that omits stack capture from structLogs when true. - `enableMemory` (boolean, optional) — Opcode logger option that includes memory capture in structLogs when true. - `enableReturnData` (boolean, optional) — Opcode logger option that includes return data capture in structLogs when true. - `limit` (integer, optional) — Opcode logger limit for captured opcode steps. Zero means unlimited where supported. - `debug` (boolean, optional) — Opcode logger option that lets clients emit trace output to internal logs. ### StructLoggerResult Default opcode-level struct logger result. - `gas` (integer, required) — Total gas used by execution. - `failed` (boolean, required) — Whether execution failed. - `returnValue` (string, required) — Return value as hex data without the 0x prefix in common Geth responses. - `structLogs` (list of StructLogEntry, required) ### AccessListItems - `address` (string, required) — 20-byte EVM address. - `storageKeys` (list of string, required) ### StructLogEntry Single opcode-level struct logger entry. - `pc` (integer, optional) — Program counter before executing the opcode. - `op` (string, optional) — Opcode name. - `gas` (integer, optional) — Gas available before executing the opcode. - `gasCost` (integer, optional) — Gas cost of the opcode. - `depth` (integer, optional) — Call depth. - `error` (string, optional) — Opcode execution error, when present. - `stack` (list of string, optional) - `memory` (list of string, optional) - `storage` (map from string to string, optional) — Storage values keyed by slot. - `refund` (integer, optional) — Gas refund counter after executing the opcode. - `returnData` (string, optional) — Hex-encoded byte data. ## Examples **Request** ```json [ { "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "data": "0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e" }, "latest", { "tracer": "callTracer", "timeout": "5s", "tracerConfig": { "onlyTopCall": false } } ] ``` **Response** ```json { "jsonrpc": "2.0", "id": "1", "result": { "type": "CALL", "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e", "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "value": "0x0", "gas": "0xc350", "gasUsed": "0x5208", "input": "0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e", "output": "0x" } } ``` **SDK Code** ```python import requests url = "https://node-api-docs-proxy.galleon8.workers.dev/" payload = [ { "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "data": "0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e" }, "latest", { "tracer": "callTracer", "timeout": "5s", "tracerConfig": { "onlyTopCall": False } } ] headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://node-api-docs-proxy.galleon8.workers.dev/'; const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '[{"to":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","data":"0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e"},"latest",{"tracer":"callTracer","timeout":"5s","tracerConfig":{"onlyTopCall":false}}]' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://node-api-docs-proxy.galleon8.workers.dev/" payload := strings.NewReader("[\n {\n \"to\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"data\": \"0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e\"\n },\n \"latest\",\n {\n \"tracer\": \"callTracer\",\n \"timeout\": \"5s\",\n \"tracerConfig\": {\n \"onlyTopCall\": false\n }\n }\n]") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://node-api-docs-proxy.galleon8.workers.dev/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "[\n {\n \"to\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"data\": \"0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e\"\n },\n \"latest\",\n {\n \"tracer\": \"callTracer\",\n \"timeout\": \"5s\",\n \"tracerConfig\": {\n \"onlyTopCall\": false\n }\n }\n]" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://node-api-docs-proxy.galleon8.workers.dev/") .header("Content-Type", "application/json") .body("[\n {\n \"to\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"data\": \"0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e\"\n },\n \"latest\",\n {\n \"tracer\": \"callTracer\",\n \"timeout\": \"5s\",\n \"tracerConfig\": {\n \"onlyTopCall\": false\n }\n }\n]") .asString(); ``` ```php request('POST', 'https://node-api-docs-proxy.galleon8.workers.dev/', [ 'body' => '[ { "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "data": "0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e" }, "latest", { "tracer": "callTracer", "timeout": "5s", "tracerConfig": { "onlyTopCall": false } } ]', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://node-api-docs-proxy.galleon8.workers.dev/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "[\n {\n \"to\": \"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\",\n \"data\": \"0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e\"\n },\n \"latest\",\n {\n \"tracer\": \"callTracer\",\n \"timeout\": \"5s\",\n \"tracerConfig\": {\n \"onlyTopCall\": false\n }\n }\n]", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [ [ "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "data": "0x70a08231000000000000000000000000742d35cc6634c0532925a3b844bc454e4438f44e" ], "latest", [ "tracer": "callTracer", "timeout": "5s", "tracerConfig": ["onlyTopCall": false] ] ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://node-api-docs-proxy.galleon8.workers.dev/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```