pub struct ReceiptBuilder { /* private fields */ }
Expand description
A builder for creating test EVM transaction receipts with default values.
Implementations§
Source§impl ReceiptBuilder
impl ReceiptBuilder
Sourcepub fn transaction_hash(self, transaction_hash: B256) -> Self
pub fn transaction_hash(self, transaction_hash: B256) -> Self
Sets the transaction hash of the receipt.
Sourcepub fn status(self, status: bool) -> Self
pub fn status(self, status: bool) -> Self
Sets the status of the transaction. Default is success.
Sourcepub fn transaction_index(self, transaction_index: usize) -> Self
pub fn transaction_index(self, transaction_index: usize) -> Self
Sets the transaction index in the block.
Sourcepub fn logs(self, logs: Vec<EVMReceiptLog>) -> Self
pub fn logs(self, logs: Vec<EVMReceiptLog>) -> Self
Sets the logs associated with the transaction.
Sourcepub fn contract_address(self, contract_address: Address) -> Self
pub fn contract_address(self, contract_address: Address) -> Self
Sets the contract address for contract creation transactions
Sourcepub fn build(self) -> EVMTransactionReceipt
pub fn build(self) -> EVMTransactionReceipt
Builds the TransactionReceipt instance.
Trait Implementations§
Source§impl Debug for ReceiptBuilder
impl Debug for ReceiptBuilder
Source§impl Default for ReceiptBuilder
impl Default for ReceiptBuilder
Source§fn default() -> ReceiptBuilder
fn default() -> ReceiptBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReceiptBuilder
impl RefUnwindSafe for ReceiptBuilder
impl Send for ReceiptBuilder
impl Sync for ReceiptBuilder
impl Unpin for ReceiptBuilder
impl UnwindSafe for ReceiptBuilder
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> Chain<T> for T
impl<T> Chain<T> for T
§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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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