pub struct EthCallBundle {
pub txs: Vec<Bytes>,
pub block_number: u64,
pub state_block_number: BlockNumberOrTag,
pub timestamp: Option<u64>,
pub gas_limit: Option<u64>,
pub difficulty: Option<U256>,
pub base_fee: Option<u128>,
}
Expand description
Fields§
§txs: Vec<Bytes>
A list of hex-encoded signed transactions
block_number: u64
hex encoded block number for which this bundle is valid on
state_block_number: BlockNumberOrTag
Either a hex encoded number or a block tag for which state to base this simulation on
timestamp: Option<u64>
the timestamp to use for this bundle simulation, in seconds since the unix epoch
gas_limit: Option<u64>
gas limit of the block to use for this simulation
difficulty: Option<U256>
difficulty of the block to use for this simulation
base_fee: Option<u128>
basefee of the block to use for this simulation
Implementations§
Source§impl EthCallBundle
impl EthCallBundle
Sourcepub fn from_2718<I, T>(txs: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Encodable2718,
pub fn from_2718<I, T>(txs: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Encodable2718,
Creates a new bundle from the given Encodable2718
transactions.
Sourcepub fn from_raw_txs<I, T>(txs: I) -> Self
pub fn from_raw_txs<I, T>(txs: I) -> Self
Creates a new bundle with the given transactions.
Sourcepub fn append_2718_tx(self, tx: impl Encodable2718) -> Self
pub fn append_2718_tx(self, tx: impl Encodable2718) -> Self
Adds an Encodable2718
transaction to the bundle.
Sourcepub fn append_raw_tx(self, tx: impl Into<Bytes>) -> Self
pub fn append_raw_tx(self, tx: impl Into<Bytes>) -> Self
Adds an EIP-2718 envelope to the bundle.
Sourcepub fn extend_2718_txs<I, T>(self, tx: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Encodable2718,
pub fn extend_2718_txs<I, T>(self, tx: I) -> Selfwhere
I: IntoIterator<Item = T>,
T: Encodable2718,
Adds multiple Encodable2718
transactions to the bundle.
Sourcepub fn extend_raw_txs<I, T>(self, txs: I) -> Self
pub fn extend_raw_txs<I, T>(self, txs: I) -> Self
Adds multiple calls to the block.
Sourcepub const fn with_block_number(self, block_number: u64) -> Self
pub const fn with_block_number(self, block_number: u64) -> Self
Sets the block number for the bundle.
Sourcepub fn with_state_block_number(
self,
state_block_number: impl Into<BlockNumberOrTag>,
) -> Self
pub fn with_state_block_number( self, state_block_number: impl Into<BlockNumberOrTag>, ) -> Self
Sets the state block number for the bundle.
Sourcepub const fn with_timestamp(self, timestamp: u64) -> Self
pub const fn with_timestamp(self, timestamp: u64) -> Self
Sets the timestamp for the bundle.
Sourcepub const fn with_gas_limit(self, gas_limit: u64) -> Self
pub const fn with_gas_limit(self, gas_limit: u64) -> Self
Sets the gas limit for the bundle.
Sourcepub const fn with_difficulty(self, difficulty: U256) -> Self
pub const fn with_difficulty(self, difficulty: U256) -> Self
Sets the difficulty for the bundle.
Sourcepub const fn with_base_fee(self, base_fee: u128) -> Self
pub const fn with_base_fee(self, base_fee: u128) -> Self
Sets the base fee for the bundle.
Trait Implementations§
Source§impl Clone for EthCallBundle
impl Clone for EthCallBundle
Source§fn clone(&self) -> EthCallBundle
fn clone(&self) -> EthCallBundle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for EthCallBundle
impl Debug for EthCallBundle
Source§impl Default for EthCallBundle
impl Default for EthCallBundle
Source§fn default() -> EthCallBundle
fn default() -> EthCallBundle
Source§impl<'de> Deserialize<'de> for EthCallBundle
impl<'de> Deserialize<'de> for EthCallBundle
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EthCallBundle
impl PartialEq for EthCallBundle
Source§impl Serialize for EthCallBundle
impl Serialize for EthCallBundle
impl Eq for EthCallBundle
impl StructuralPartialEq for EthCallBundle
Auto Trait Implementations§
impl Freeze for EthCallBundle
impl RefUnwindSafe for EthCallBundle
impl Send for EthCallBundle
impl Sync for EthCallBundle
impl Unpin for EthCallBundle
impl UnwindSafe for EthCallBundle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)