Skip to content

Commit

Permalink
fix: eth_simulateV1 (alloy-rs#1289)
Browse files Browse the repository at this point in the history
* fix

* add aliases

* cfg_attr
  • Loading branch information
klkvr authored and lwedge99 committed Oct 8, 2024
1 parent 3441445 commit bbf81f6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 12 additions & 3 deletions crates/rpc-types-eth/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -347,13 +347,22 @@ pub struct BlockOverrides {
)]
pub gas_limit: Option<u64>,
/// Overrides the coinbase address of the block.
#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))]
#[cfg_attr(
feature = "serde",
serde(default, skip_serializing_if = "Option::is_none", alias = "feeRecipient")
)]
pub coinbase: Option<Address>,
/// Overrides the prevrandao of the block.
#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))]
#[cfg_attr(
feature = "serde",
serde(default, skip_serializing_if = "Option::is_none", alias = "prevRandao")
)]
pub random: Option<B256>,
/// Overrides the basefee of the block.
#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))]
#[cfg_attr(
feature = "serde",
serde(default, skip_serializing_if = "Option::is_none", alias = "baseFeePerGas")
)]
pub base_fee: Option<U256>,
/// A dictionary that maps blockNumber to a user-defined hash. It could be queried from the
/// solidity opcode BLOCKHASH.
Expand Down
1 change: 1 addition & 0 deletions crates/rpc-types-eth/src/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ pub struct SimulatePayload {
#[cfg_attr(feature = "serde", serde(default))]
pub validation: bool,
/// Flag to decide if full transactions should be returned instead of just their hashes.
#[cfg_attr(feature = "serde", serde(default))]
pub return_full_transactions: bool,
}

Expand Down

0 comments on commit bbf81f6

Please sign in to comment.