Struct BatchCall
pub struct BatchCall<'a, W> { /* private fields */ }Expand description
A batch of interactions aggregated into a single transaction.
Merges multiple ExecutionPayloads into one, preserving all calls,
auth witnesses, capsules, and extra hashed args from each payload.
The fee payer is taken from the last payload that specifies one.
Implementations§
§impl<'a, W> BatchCall<'a, W>where
W: Wallet,
impl<'a, W> BatchCall<'a, W>where
W: Wallet,
pub const fn new(
wallet: &'a W,
payloads: Vec<ExecutionPayload>,
) -> BatchCall<'a, W>
pub const fn new( wallet: &'a W, payloads: Vec<ExecutionPayload>, ) -> BatchCall<'a, W>
Create a new batch from a list of execution payloads.
pub fn request(&self) -> Result<ExecutionPayload, Error>
pub fn request(&self) -> Result<ExecutionPayload, Error>
Merge all payloads into a single ExecutionPayload.
pub async fn simulate(
&self,
opts: SimulateOptions,
) -> Result<TxSimulationResult, Error>
pub async fn simulate( &self, opts: SimulateOptions, ) -> Result<TxSimulationResult, Error>
Simulate the batch without sending.
pub async fn profile(
&self,
opts: ProfileOptions,
) -> Result<TxProfileResult, Error>
pub async fn profile( &self, opts: ProfileOptions, ) -> Result<TxProfileResult, Error>
Profile the batch as a single transaction.
pub async fn send(&self, opts: SendOptions) -> Result<SendResult, Error>
pub async fn send(&self, opts: SendOptions) -> Result<SendResult, Error>
Send the batch as a single transaction.
Trait Implementations§
Auto Trait Implementations§
impl<'a, W> Freeze for BatchCall<'a, W>
impl<'a, W> RefUnwindSafe for BatchCall<'a, W>where
W: RefUnwindSafe,
impl<'a, W> Send for BatchCall<'a, W>where
W: Sync,
impl<'a, W> Sync for BatchCall<'a, W>where
W: Sync,
impl<'a, W> Unpin for BatchCall<'a, W>
impl<'a, W> UnwindSafe for BatchCall<'a, W>where
W: RefUnwindSafe,
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
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more