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
)