Skip to content

Commit

Permalink
block_number_index added to callBundle reference type (#1705)
Browse files Browse the repository at this point in the history
* block_number_index added to callBundle reference type

* update to transaction_index

* update import

* rustfmt

* fix features

---------

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
  • Loading branch information
ciaranmcveigh5 and mattsse authored Dec 2, 2024
1 parent 01e0081 commit af482e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/rpc-types-mev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ rustdoc-args = ["--cfg", "docsrs"]
alloy-eips = { workspace = true, features = ["serde"] }
alloy-primitives.workspace = true
alloy-serde.workspace = true
alloy-rpc-types-eth = { workspace = true, features = ["serde"] }

serde.workspace = true
serde_json.workspace = true
Expand Down
4 changes: 4 additions & 0 deletions crates/rpc-types-mev/src/eth_calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use crate::{u256_numeric_string, Privacy, Validity};

use alloy_eips::{eip2718::Encodable2718, BlockNumberOrTag};
use alloy_primitives::{keccak256, Address, Bytes, Keccak256, B256, U256};
use alloy_rpc_types_eth::TransactionIndex;
use serde::{Deserialize, Serialize};

/// Bundle of transactions for `eth_callBundle`
Expand All @@ -18,6 +19,9 @@ pub struct EthCallBundle {
pub block_number: u64,
/// Either a hex encoded number or a block tag for which state to base this simulation on
pub state_block_number: BlockNumberOrTag,
/// Inclusive number of tx to replay in block. -1 means replay all
#[serde(default, skip_serializing_if = "Option::is_none")]
pub transaction_index: Option<TransactionIndex>,
/// the coinbase to use for this bundle simulation
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coinbase: Option<Address>,
Expand Down

0 comments on commit af482e0

Please sign in to comment.