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

block_number_index added to callBundle reference type #1705

Merged
merged 8 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
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
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