Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added blockoverride field in geth tracing call options #2603

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 24 additions & 1 deletion ethers-core/src/types/trace/geth.rs
Expand Up @@ -199,6 +199,28 @@ pub struct GethDebugTracingOptions {
pub timeout: Option<String>,
}

/// Bindings for block overrides in `debug_traceCall` options
///
/// See <https://github.com/ethereum/go-ethereum/pull/24871>
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
#[serde(rename_all = "camelCase")]
pub struct BlockOverrides {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub number: Option<U64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub difficulty: Option<U256>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub time: Option<U64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub gas_limit: Option<U64>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coinbase: Option<Address>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub random: Option<H256>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub base_fee: Option<U256>,
}

/// Bindings for additional `debug_traceCall` options
///
/// See <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall>
Expand All @@ -209,7 +231,8 @@ pub struct GethDebugTracingCallOptions {
pub tracing_options: GethDebugTracingOptions,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub state_overrides: Option<spoof::State>,
// TODO: Add blockoverrides options
#[serde(default, skip_serializing_if = "Option::is_none")]
pub block_overrides: Option<BlockOverrides>,
}

/// Provides types and methods for constructing an `eth_call`
Expand Down