Skip to content

Commit

Permalink
chore: reuse BlockOverrides in SimBundleOverrides (#1917)
Browse files Browse the repository at this point in the history
* chore: reuse BlockOverrides in SimBundleOverrides

* fmt
  • Loading branch information
klkvr authored Jan 15, 2025
1 parent 3527ecc commit 45f3fad
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions crates/rpc-types-mev/src/mev_calls.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use crate::common::{Privacy, ProtocolVersion, Validity};

use alloy_eips::BlockId;
use alloy_primitives::{Address, Bytes, Log, TxHash, U256};
use alloy_primitives::{Bytes, Log, TxHash, U256};
use alloy_rpc_types_eth::BlockOverrides;
use serde::{Deserialize, Serialize};

/// A bundle of transactions to send to the matchmaker.
Expand Down Expand Up @@ -111,21 +112,9 @@ pub struct SimBundleOverrides {
/// Specify other params to override the default values.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub parent_block: Option<BlockId>,
/// Block number used for simulation, defaults to parentBlock.number + 1
#[serde(default, with = "alloy_serde::quantity::opt")]
pub block_number: Option<u64>,
/// Coinbase used for simulation, defaults to parentBlock.coinbase
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coinbase: Option<Address>,
/// Timestamp used for simulation, defaults to parentBlock.timestamp + 12
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")]
pub timestamp: Option<u64>,
/// Gas limit used for simulation, defaults to parentBlock.gasLimit
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")]
pub gas_limit: Option<u64>,
/// Base fee used for simulation, defaults to parentBlock.baseFeePerGas
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")]
pub base_fee: Option<u64>,
/// Overrides for block environment values.
#[serde(flatten)]
pub block_overrides: BlockOverrides,
/// Timeout in seconds, defaults to 5
#[serde(default, with = "alloy_serde::quantity::opt", skip_serializing_if = "Option::is_none")]
pub timeout: Option<u64>,
Expand Down

0 comments on commit 45f3fad

Please sign in to comment.