# Modules: trace

## trace\_block

Block returns the structured logs created during the execution of\
EVM and returns them as a JSON object.\
The correct name will be TraceBlockByNumber, though we want to be compatible with Parity trace module.

**Params (2)**

Parameters must be given *by position*.

**1:**\
number `rpc.BlockNumber`

* Required: ✓ Yes

#### === "Schema"

```scheme
- oneOf: 

		- description: `The block height description`
		- enum: earliest, latest, pending
		- title: `blockNumberTag`
		- type: string


		- description: `Hex representation of a uint64`
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `uint64`
		- type: string


- title: `blockNumberIdentifier`
```

#### === "Raw"

```
{
    "oneOf": [
        {
            "description": "The block height description",
            "enum": [
                "earliest",
                "latest",
                "pending"
            ],
            "title": "blockNumberTag",
            "type": [
                "string"
            ]
        },
        {
            "description": "Hex representation of a uint64",
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": [
                "string"
            ]
        }
    ],
    "title": "blockNumberIdentifier"
}
```

**2:**\
config `*TraceConfig`

* Required: ✓ Yes

#### === "Schema"

```scheme
- additionalProperties: `false`
- properties: 
	- Debug: 
		- type: `boolean`

	- DisableStack: 
		- type: `boolean`

	- DisableStorage: 
		- type: `boolean`

	- EnableMemory: 
		- type: `boolean`

	- EnableReturnData: 
		- type: `boolean`

	- Limit: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- NestedTraceOutput: 
		- type: `boolean`

	- Reexec: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- Timeout: 
		- type: `string`

	- Tracer: 
		- type: `string`

	- TracerConfig: 
		- media: 
			- binaryEncoding: `base64`

		- type: `string`

	- overrides: 
		- additionalProperties: `true`


- type: object
```

#### === "Raw"

```json
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "TracerConfig": {
            "media": {
                "binaryEncoding": "base64"
            },
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}
```

**Result**

interface `[]interface{}`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- items: 

		- additionalProperties: `true`


- type: array


```
````

\=== "Raw"

````
``` Raw
{
    "items": [
        {
            "additionalProperties": true
        }
    ],
    "type": [
        "array"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_block", "params": [<number>, <config>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_block", "params": [<number>, <config>]}'
```
````

\=== "Javascript Console"

````
``` js
trace.block(number,config);
```
````

***

#### trace\_call

Call lets you trace a given eth\_call. It collects the structured logs created during the execution of EVM\
if the given transaction was added on top of the provided block and returns them as a JSON object.\
You can provide -2 as a block number to trace on top of the pending block.

**Params (3)**

Parameters must be given *by position*.

**1:**\
args `ethapi.TransactionArgs`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- accessList: 
		- items: 
			- additionalProperties: `false`
			- properties: 
				- address: 
					- pattern: `^0x[a-fA-F\d]{64}$`
					- title: `keccak`
					- type: `string`

				- storageKeys: 
					- items: 
						- description: `Hex representation of a Keccak 256 hash`
						- pattern: `^0x[a-fA-F\d]{64}$`
						- title: `keccak`
						- type: `string`

					- type: `array`


			- type: `object`

		- type: `array`

	- chainId: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- data: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `dataWord`
		- type: `string`

	- from: 
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: `string`

	- gas: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `uint64`
		- type: `string`

	- gasPrice: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- input: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `dataWord`
		- type: `string`

	- maxFeePerGas: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- maxPriorityFeePerGas: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- nonce: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `uint64`
		- type: `string`

	- to: 
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: `string`

	- value: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "accessList": {
            "items": {
                "additionalProperties": false,
                "properties": {
                    "address": {
                        "pattern": "^0x[a-fA-F\\d]{64}$",
                        "title": "keccak",
                        "type": "string"
                    },
                    "storageKeys": {
                        "items": {
                            "description": "Hex representation of a Keccak 256 hash",
                            "pattern": "^0x[a-fA-F\\d]{64}$",
                            "title": "keccak",
                            "type": "string"
                        },
                        "type": "array"
                    }
                },
                "type": "object"
            },
            "type": "array"
        },
        "chainId": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "data": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "dataWord",
            "type": "string"
        },
        "from": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "gas": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "gasPrice": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "input": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "dataWord",
            "type": "string"
        },
        "maxFeePerGas": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "maxPriorityFeePerGas": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "nonce": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "to": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "value": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        }
    },
    "type": [
        "object"
    ]
}
```
````

**2:**\
blockNrOrHash `rpc.BlockNumberOrHash`

* Required: ✓ Yes

**3:**\
config `*TraceCallConfig`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- BlockOverrides: 
		- additionalProperties: `false`
		- properties: 
			- BaseFee: 
				- pattern: `^0x[a-fA-F0-9]+$`
				- title: `integer`
				- type: `string`

			- Coinbase: 
				- pattern: `^0x[a-fA-F\d]{64}$`
				- title: `keccak`
				- type: `string`

			- Difficulty: 
				- pattern: `^0x[a-fA-F0-9]+$`
				- title: `integer`
				- type: `string`

			- GasLimit: 
				- pattern: `^0x([a-fA-F\d])+$`
				- title: `uint64`
				- type: `string`

			- Number: 
				- pattern: `^0x[a-fA-F0-9]+$`
				- title: `integer`
				- type: `string`

			- Random: 
				- pattern: `^0x[a-fA-F\d]{64}$`
				- title: `keccak`
				- type: `string`

			- Time: 
				- pattern: `^0x([a-fA-F\d])+$`
				- title: `uint64`
				- type: `string`


		- type: `object`

	- Debug: 
		- type: `boolean`

	- DisableStack: 
		- type: `boolean`

	- DisableStorage: 
		- type: `boolean`

	- EnableMemory: 
		- type: `boolean`

	- EnableReturnData: 
		- type: `boolean`

	- Limit: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- NestedTraceOutput: 
		- type: `boolean`

	- Reexec: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- StateOverrides: 
		- patternProperties: 
			- .*: 
				- additionalProperties: `false`
				- properties: 
					- balance: 
						- pattern: `^0x[a-fA-F0-9]+$`
						- title: `integer`
						- type: `string`

					- code: 
						- pattern: `^0x([a-fA-F\d])+$`
						- title: `dataWord`
						- type: `string`

					- nonce: 
						- pattern: `^0x([a-fA-F\d])+$`
						- title: `uint64`
						- type: `string`

					- state: 
						- patternProperties: 
							- .*: 
								- description: `Hex representation of a Keccak 256 hash`
								- pattern: `^0x[a-fA-F\d]{64}$`
								- title: `keccak`
								- type: `string`


						- type: `object`

					- stateDiff: 
						- patternProperties: 
							- .*: 
								- description: `Hex representation of a Keccak 256 hash`
								- pattern: `^0x[a-fA-F\d]{64}$`
								- title: `keccak`
								- type: `string`


						- type: `object`


				- type: `object`


		- type: `object`

	- Timeout: 
		- type: `string`

	- Tracer: 
		- type: `string`

	- TracerConfig: 
		- media: 
			- binaryEncoding: `base64`

		- type: `string`

	- overrides: 
		- additionalProperties: `true`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "BlockOverrides": {
            "additionalProperties": false,
            "properties": {
                "BaseFee": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "Coinbase": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Difficulty": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "GasLimit": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                },
                "Number": {
                    "pattern": "^0x[a-fA-F0-9]+$",
                    "title": "integer",
                    "type": "string"
                },
                "Random": {
                    "pattern": "^0x[a-fA-F\\d]{64}$",
                    "title": "keccak",
                    "type": "string"
                },
                "Time": {
                    "pattern": "^0x([a-fA-F\\d])+$",
                    "title": "uint64",
                    "type": "string"
                }
            },
            "type": "object"
        },
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "StateOverrides": {
            "patternProperties": {
                ".*": {
                    "additionalProperties": false,
                    "properties": {
                        "balance": {
                            "pattern": "^0x[a-fA-F0-9]+$",
                            "title": "integer",
                            "type": "string"
                        },
                        "code": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "dataWord",
                            "type": "string"
                        },
                        "nonce": {
                            "pattern": "^0x([a-fA-F\\d])+$",
                            "title": "uint64",
                            "type": "string"
                        },
                        "state": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "stateDiff": {
                            "patternProperties": {
                                ".*": {
                                    "description": "Hex representation of a Keccak 256 hash",
                                    "pattern": "^0x[a-fA-F\\d]{64}$",
                                    "title": "keccak",
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        }
                    },
                    "type": "object"
                }
            },
            "type": "object"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "TracerConfig": {
            "media": {
                "binaryEncoding": "base64"
            },
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}
```
````

**Result**

interface `interface{}`

* Required: ✓ Yes

**Client Method Invocation Examples**

\=== "Shell HTTP"

````
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_call", "params": [<args>, <blockNrOrHash>, <config>]}'
```
````

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_call", "params": [<args>, <blockNrOrHash>, <config>]}'
```
````

\=== "Javascript Console"

````
``` js
trace.call(args,blockNrOrHash,config);
```
````

***

#### trace\_filter

Filter configures a new tracer according to the provided configuration, and\
executes all the transactions contained within. The return value will be one item\
per transaction, dependent on the requested tracer.

**Params (2)**

Parameters must be given *by position*.

**1:**\
args `TraceFilterArgs`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- after: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- count: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- fromAddress: 
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: `string`

	- fromBlock: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `uint64`
		- type: `string`

	- toAddress: 
		- pattern: `^0x[a-fA-F\d]{64}$`
		- title: `keccak`
		- type: `string`

	- toBlock: 
		- pattern: `^0x([a-fA-F\d])+$`
		- title: `uint64`
		- type: `string`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "after": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "count": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "fromAddress": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "fromBlock": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        },
        "toAddress": {
            "pattern": "^0x[a-fA-F\\d]{64}$",
            "title": "keccak",
            "type": "string"
        },
        "toBlock": {
            "pattern": "^0x([a-fA-F\\d])+$",
            "title": "uint64",
            "type": "string"
        }
    },
    "type": [
        "object"
    ]
}
```
````

**2:**\
config `*TraceConfig`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- Debug: 
		- type: `boolean`

	- DisableStack: 
		- type: `boolean`

	- DisableStorage: 
		- type: `boolean`

	- EnableMemory: 
		- type: `boolean`

	- EnableReturnData: 
		- type: `boolean`

	- Limit: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- NestedTraceOutput: 
		- type: `boolean`

	- Reexec: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- Timeout: 
		- type: `string`

	- Tracer: 
		- type: `string`

	- TracerConfig: 
		- media: 
			- binaryEncoding: `base64`

		- type: `string`

	- overrides: 
		- additionalProperties: `true`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "TracerConfig": {
            "media": {
                "binaryEncoding": "base64"
            },
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}
```
````

**Result**

`*rpc.Subscription`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Subscription identifier`
- title: `subscriptionID`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Subscription identifier",
    "title": "subscriptionID",
    "type": [
        "string"
    ]
}
```
````

**Client Method Invocation Examples**

\=== "Shell WebSocket"

````
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_subscribe", "params": ["filter", <args>, <config>]}'
```
````

***

#### trace\_transaction

Transaction returns the structured logs created during the execution of EVM\
and returns them as a JSON object.

**Params (2)**

Parameters must be given *by position*.

**1:**\
hash `common.Hash`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- description: `Hex representation of a Keccak 256 hash`
- pattern: `^0x[a-fA-F\d]{64}$`
- title: `keccak`
- type: string


```
````

\=== "Raw"

````
``` Raw
{
    "description": "Hex representation of a Keccak 256 hash",
    "pattern": "^0x[a-fA-F\\d]{64}$",
    "title": "keccak",
    "type": [
        "string"
    ]
}
```
````

**2:**\
config `*TraceConfig`

* Required: ✓ Yes

\=== "Schema"

````
``` Schema

- additionalProperties: `false`
- properties: 
	- Debug: 
		- type: `boolean`

	- DisableStack: 
		- type: `boolean`

	- DisableStorage: 
		- type: `boolean`

	- EnableMemory: 
		- type: `boolean`

	- EnableReturnData: 
		- type: `boolean`

	- Limit: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- NestedTraceOutput: 
		- type: `boolean`

	- Reexec: 
		- pattern: `^0x[a-fA-F0-9]+$`
		- title: `integer`
		- type: `string`

	- Timeout: 
		- type: `string`

	- Tracer: 
		- type: `string`

	- TracerConfig: 
		- media: 
			- binaryEncoding: `base64`

		- type: `string`

	- overrides: 
		- additionalProperties: `true`


- type: object


```
````

\=== "Raw"

````
``` Raw
{
    "additionalProperties": false,
    "properties": {
        "Debug": {
            "type": "boolean"
        },
        "DisableStack": {
            "type": "boolean"
        },
        "DisableStorage": {
            "type": "boolean"
        },
        "EnableMemory": {
            "type": "boolean"
        },
        "EnableReturnData": {
            "type": "boolean"
        },
        "Limit": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "NestedTraceOutput": {
            "type": "boolean"
        },
        "Reexec": {
            "pattern": "^0x[a-fA-F0-9]+$",
            "title": "integer",
            "type": "string"
        },
        "Timeout": {
            "type": "string"
        },
        "Tracer": {
            "type": "string"
        },
        "TracerConfig": {
            "media": {
                "binaryEncoding": "base64"
            },
            "type": "string"
        },
        "overrides": {
            "additionalProperties": true
        }
    },
    "type": [
        "object"
    ]
}
```
````

**Result**

interface `interface{}`

* Required: ✓ Yes

**Client Method Invocation Examples**

#### === "Shell HTTP"

````sh
``` shell
curl -X POST -H "Content-Type: application/json" http://localhost:8545 --data '{"jsonrpc": "2.0", "id": 42, "method": "trace_transaction", "params": [<hash>, <config>]}'
```
````

#### === "Shell WebSocket"

````sh
``` shell
wscat -c ws://localhost:8546 -x '{"jsonrpc": "2.0", "id": 1, "method": "trace_transaction", "params": [<hash>, <config>]}'
```
````

#### === "Javascript Console"

````javascript
``` js
trace.transaction(hash,config);
```
````
