From 1c131938236339db154dc9f2547132e3e675a24b Mon Sep 17 00:00:00 2001 From: m4sterbunny Date: Thu, 11 Dec 2025 15:45:31 +0000 Subject: [PATCH 1/2] adds state overrides to debug_traceCall --- docs/public-networks/reference/api/index.md | 13 +++++++++---- docs/public-networks/reference/api/objects.md | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/public-networks/reference/api/index.md b/docs/public-networks/reference/api/index.md index 80774596f0..1f6d17d19f 100644 --- a/docs/public-networks/reference/api/index.md +++ b/docs/public-networks/reference/api/index.md @@ -2022,13 +2022,18 @@ Performs an [`eth_call`](#eth_call) within the execution environment of a given `pending` returns the same value as `latest`. ::: -- `options`: _object_ - request options object with the following fields (all optional and default to `false`): +- `options`: _object_ - request options object with the following fields (all booleans default to `false`): - - `disableStorage`: _boolean_ - `true` disables storage capture. + - `disableStorage`: _boolean_ - (optional) `true` disables storage capture. - - `disableMemory`: _boolean_ - `true` disables memory capture. + - `disableMemory`: _boolean_ - (optional) `true` disables memory capture. - - `disableStack` : _boolean_ - `true` disables stack capture. + - `disableStack` : _boolean_ - (optional) `true` disables stack capture. + + - `stateOverrides`: _object_ - (optional) [address-to-state mapping](./objects.md#state-override-object). + Each entry specifies a state that will be temporarily overridden before executing the call. + This allows you to test, analyze, and debug smart contracts more efficiently by allowing + temporary state changes without affecting the actual blockchain state. #### Returns diff --git a/docs/public-networks/reference/api/objects.md b/docs/public-networks/reference/api/objects.md index 84b3212812..9610e10cbf 100644 --- a/docs/public-networks/reference/api/objects.md +++ b/docs/public-networks/reference/api/objects.md @@ -152,7 +152,7 @@ Returned by [`debug_storageRangeAt`](index.md#debug_storagerangeat). ## State override object -Parameter for [`eth_call`](./index.md#eth_call), [`eth_estimateGas`](./index.md#eth_estimategas), and [`eth_simulateV1`](index.md#eth_simulatev1). +Parameter for [`eth_call`](./index.md#eth_call), [`eth_estimateGas`](./index.md#eth_estimategas), [`eth_simulateV1`](index.md#eth_simulatev1), and [`debug_traceCall`](./index.md#debug_traceCall). Override an account with the following state values temporarily before making the call. This allows you to make ephemeral state changes, for the purposes of transaction simulation, without affecting the actual blockchain state. @@ -177,7 +177,7 @@ Log information returned as part of the [Trace object](#trace-object). | `gas` | Integer | Gas remaining. | | `gasCost` | Integer | Cost in wei of each gas unit. | | `depth` | Integer | Execution depth. | -| `exceptionalHaltReasons` | Array | One or more strings representing an error condition causing the EVM execution to terminate. These strings suggest that EVM execution terminated for reasons such as running out of gas or attempting to execute an unknown instruction. Generally a single exceptional halt reason returns but it's possible for more than one to occur at once. | +| `exceptionalHaltReasons` | Array | One or more strings representing an error condition causing the EVM execution to terminate. These strings suggest that EVM execution terminated for reasons such as running out of gas or attempting to execute an unknown instruction. Generally, a single exceptional halt reason returns but it's possible for more than one to occur at once. | | `stack` | Array of 32 byte arrays | EVM execution stack before executing current operation. | | `memory` | Array of 32 byte arrays | Memory space of the contract before executing current operation. | | `storage` | Object | Storage entries changed by the current transaction. | From 1a4c95dc8ab7e52575f66b40997e82978394de6d Mon Sep 17 00:00:00 2001 From: m4sterbunny Date: Thu, 11 Dec 2025 15:45:31 +0000 Subject: [PATCH 2/2] adds state overrides to debug_traceCall Signed-off-by: m4sterbunny --- docs/public-networks/reference/api/index.md | 13 +++++++++---- docs/public-networks/reference/api/objects.md | 4 ++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/public-networks/reference/api/index.md b/docs/public-networks/reference/api/index.md index 80774596f0..1f6d17d19f 100644 --- a/docs/public-networks/reference/api/index.md +++ b/docs/public-networks/reference/api/index.md @@ -2022,13 +2022,18 @@ Performs an [`eth_call`](#eth_call) within the execution environment of a given `pending` returns the same value as `latest`. ::: -- `options`: _object_ - request options object with the following fields (all optional and default to `false`): +- `options`: _object_ - request options object with the following fields (all booleans default to `false`): - - `disableStorage`: _boolean_ - `true` disables storage capture. + - `disableStorage`: _boolean_ - (optional) `true` disables storage capture. - - `disableMemory`: _boolean_ - `true` disables memory capture. + - `disableMemory`: _boolean_ - (optional) `true` disables memory capture. - - `disableStack` : _boolean_ - `true` disables stack capture. + - `disableStack` : _boolean_ - (optional) `true` disables stack capture. + + - `stateOverrides`: _object_ - (optional) [address-to-state mapping](./objects.md#state-override-object). + Each entry specifies a state that will be temporarily overridden before executing the call. + This allows you to test, analyze, and debug smart contracts more efficiently by allowing + temporary state changes without affecting the actual blockchain state. #### Returns diff --git a/docs/public-networks/reference/api/objects.md b/docs/public-networks/reference/api/objects.md index 84b3212812..9610e10cbf 100644 --- a/docs/public-networks/reference/api/objects.md +++ b/docs/public-networks/reference/api/objects.md @@ -152,7 +152,7 @@ Returned by [`debug_storageRangeAt`](index.md#debug_storagerangeat). ## State override object -Parameter for [`eth_call`](./index.md#eth_call), [`eth_estimateGas`](./index.md#eth_estimategas), and [`eth_simulateV1`](index.md#eth_simulatev1). +Parameter for [`eth_call`](./index.md#eth_call), [`eth_estimateGas`](./index.md#eth_estimategas), [`eth_simulateV1`](index.md#eth_simulatev1), and [`debug_traceCall`](./index.md#debug_traceCall). Override an account with the following state values temporarily before making the call. This allows you to make ephemeral state changes, for the purposes of transaction simulation, without affecting the actual blockchain state. @@ -177,7 +177,7 @@ Log information returned as part of the [Trace object](#trace-object). | `gas` | Integer | Gas remaining. | | `gasCost` | Integer | Cost in wei of each gas unit. | | `depth` | Integer | Execution depth. | -| `exceptionalHaltReasons` | Array | One or more strings representing an error condition causing the EVM execution to terminate. These strings suggest that EVM execution terminated for reasons such as running out of gas or attempting to execute an unknown instruction. Generally a single exceptional halt reason returns but it's possible for more than one to occur at once. | +| `exceptionalHaltReasons` | Array | One or more strings representing an error condition causing the EVM execution to terminate. These strings suggest that EVM execution terminated for reasons such as running out of gas or attempting to execute an unknown instruction. Generally, a single exceptional halt reason returns but it's possible for more than one to occur at once. | | `stack` | Array of 32 byte arrays | EVM execution stack before executing current operation. | | `memory` | Array of 32 byte arrays | Memory space of the contract before executing current operation. | | `storage` | Object | Storage entries changed by the current transaction. |