From af482e05e619d12e0e264a45eeb75ed003c438bd Mon Sep 17 00:00:00 2001 From: ciaranmcveigh5 Date: Mon, 2 Dec 2024 15:05:43 +0000 Subject: [PATCH] block_number_index added to callBundle reference type (#1705) * block_number_index added to callBundle reference type * update to transaction_index * update import * rustfmt * fix features --------- Co-authored-by: Matthias Seitz --- crates/rpc-types-mev/Cargo.toml | 1 + crates/rpc-types-mev/src/eth_calls.rs | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/crates/rpc-types-mev/Cargo.toml b/crates/rpc-types-mev/Cargo.toml index 0466d7da357..476461fa51e 100644 --- a/crates/rpc-types-mev/Cargo.toml +++ b/crates/rpc-types-mev/Cargo.toml @@ -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 diff --git a/crates/rpc-types-mev/src/eth_calls.rs b/crates/rpc-types-mev/src/eth_calls.rs index 1a666770fe9..e05de931e47 100644 --- a/crates/rpc-types-mev/src/eth_calls.rs +++ b/crates/rpc-types-mev/src/eth_calls.rs @@ -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` @@ -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, /// the coinbase to use for this bundle simulation #[serde(default, skip_serializing_if = "Option::is_none")] pub coinbase: Option
,