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

fix: eth_simulateV1 serde #1345

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/rpc-types-eth/src/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ pub struct SimBlock {
#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))]
pub state_overrides: Option<StateOverride>,
/// A vector of transactions to be simulated.
#[cfg_attr(feature = "serde", serde(default))]
pub calls: Vec<TransactionRequest>,
}

Expand All @@ -43,7 +44,7 @@ pub struct SimulatedBlock<B = Block> {
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct SimCallResult {
/// The raw bytes returned by the transaction.
pub return_value: Bytes,
pub return_data: Bytes,
/// Logs generated during the execution of the transaction.
#[cfg_attr(feature = "serde", serde(default))]
pub logs: Vec<Log>,
Expand All @@ -67,6 +68,7 @@ pub struct SimCallResult {
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct SimulatePayload {
/// Array of block state calls to be executed at specific, optional block/state.
#[cfg_attr(feature = "serde", serde(default))]
pub block_state_calls: Vec<SimBlock>,
/// Flag to determine whether to trace ERC20/ERC721 token transfers within transactions.
#[cfg_attr(feature = "serde", serde(default))]
Expand Down