> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.galleon8.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.galleon8.com/_mcp/server.

# trace_block

POST https://node-api-docs-proxy.galleon8.workers.dev
Content-Type: application/json

Returns execution traces for all transactions in a block.

Reference: https://docs.galleon8.com/api-reference/node-api/ethereum/api-endpoints/trace-api/trace-block

## Request

### Body (application/json)

This endpoint expects an object.

- `block` (BlockNumberOrTag, required) — Block number or tag to trace.

## Response

### 200

Execution traces for all transactions in the block.

- `list of Trace`

## Types

### BlockNumberOrTag

Block number encoded as a quantity, or a named block tag.

### Trace

Execution trace item.

- `action` (TraceAction, required) — Common fields describing a trace action.
- `blockHash` (string, required) — 32-byte block hash.
- `blockNumber` (string, required) — Hex-encoded integer quantity.
- `result` (TraceResult, required, nullable) — Common fields returned by a trace action.
- `subtraces` (integer, required) — Number of child traces.
- `traceAddress` (list of integer, required) — Path to the trace within the transaction execution tree.
- `transactionHash` (string, required, nullable) — 32-byte transaction hash.
- `transactionPosition` (string, required, nullable) — Hex-encoded integer quantity.
- `type` (enum, required) — Trace action category returned in trace results. This is not a traceTypes request value.
  - Allowed values: `call`, `create`, `reward`, `suicide`
- `error` (string, optional) — Error returned for the trace, when execution failed.

### TraceAction

Common fields describing a trace action.

- `callType` (string, optional) — Call opcode type for call traces.
- `from` (string, optional) — 20-byte EVM address.
- `to` (string, optional) — 20-byte EVM address.
- `gas` (string, optional) — Hex-encoded integer quantity.
- `input` (string, optional) — Hex-encoded byte data.
- `value` (string, optional) — Hex-encoded integer quantity.
- `init` (string, optional) — Hex-encoded byte data.
- `address` (string, optional) — 20-byte EVM address.
- `refundAddress` (string, optional) — 20-byte EVM address.
- `balance` (string, optional) — Hex-encoded integer quantity.
- `author` (string, optional) — 20-byte EVM address.
- `rewardType` (string, optional) — Reward category for reward traces.

### TraceResult

Common fields returned by a trace action.

- `gasUsed` (string, optional) — Hex-encoded integer quantity.
- `output` (string, optional) — Hex-encoded byte data.
- `address` (string, optional) — 20-byte EVM address.
- `code` (string, optional) — Hex-encoded byte data.

## Examples

**Request**

```json
[
  "0x10d4f"
]
```

**Response**

```json
{
  "jsonrpc": "2.0",
  "id": "1",
  "result": [
    {
      "action": {
        "callType": "call",
        "from": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
        "to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
        "gas": "0xc350",
        "input": "0x",
        "value": "0x0"
      },
      "blockHash": "0x9f1409b7d65c3d4d9e2df8b4c6f52f8f91a4e1b9a6fdb0f1aa8e6d43f63c1f55",
      "blockNumber": "0x10d4f",
      "result": {
        "gasUsed": "0x5208",
        "output": "0x"
      },
      "subtraces": 0,
      "traceAddress": [],
      "transactionHash": "0x8fc90a6c3ee3001cdcbbb685b4fbe67b1fa2bec575b15b0395fea5540d0901ae",
      "transactionPosition": "0x0",
      "type": "call"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://node-api-docs-proxy.galleon8.workers.dev/"

payload = ["0x10d4f"]
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: '["0x10d4f"]'
};

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  \"0x10d4f\"\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  \"0x10d4f\"\n]"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://node-api-docs-proxy.galleon8.workers.dev/")
  .header("Content-Type", "application/json")
  .body("[\n  \"0x10d4f\"\n]")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://node-api-docs-proxy.galleon8.workers.dev/', [
  'body' => '[
  "0x10d4f"
]',
  '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  \"0x10d4f\"\n]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = ["0x10d4f"] 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()
```