pub struct TxWithCtx<'a> {
pub tx_info: &'a TransactionInfo,
pub scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>,
pub collateral_strategy: &'a CollateralStrategy,
pub change_strategy: &'a ChangeStrategy,
pub metadata: Option<&'a TransactionMetadata>,
pub ex_units_map: Option<&'a BTreeMap<(RedeemerTag, BigNum), ExUnits>>,
}
Expand description
TransactionInfo with additional context required to build a valid transaction
Fields§
§tx_info: &'a TransactionInfo
§scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>
§collateral_strategy: &'a CollateralStrategy
§change_strategy: &'a ChangeStrategy
§metadata: Option<&'a TransactionMetadata>
§ex_units_map: Option<&'a BTreeMap<(RedeemerTag, BigNum), ExUnits>>
Implementations§
source§impl<'a> TxWithCtx<'a>
impl<'a> TxWithCtx<'a>
pub fn new( tx_info: &'a TransactionInfo, scripts: &'a BTreeMap<ScriptHash, ScriptOrRef>, collateral_strategy: &'a CollateralStrategy, change_strategy: &'a ChangeStrategy ) -> Self
sourcepub fn with_metadata(self, metadata: &'a TransactionMetadata) -> Self
pub fn with_metadata(self, metadata: &'a TransactionMetadata) -> Self
Attach transaction metadata to the context
sourcepub fn with_ex_units(
self,
ex_units_map: &'a BTreeMap<(RedeemerTag, BigNum), ExUnits>
) -> Self
pub fn with_ex_units( self, ex_units_map: &'a BTreeMap<(RedeemerTag, BigNum), ExUnits> ) -> Self
Explicitly add execution units instead of running the ChainQuery evaluation
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for TxWithCtx<'a>
impl<'a> RefUnwindSafe for TxWithCtx<'a>
impl<'a> Send for TxWithCtx<'a>
impl<'a> Sync for TxWithCtx<'a>
impl<'a> Unpin for TxWithCtx<'a>
impl<'a> UnwindSafe for TxWithCtx<'a>
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