pub struct Tx<Env, From, To, Payment, Gas, Data, RH>{
pub env: Env,
pub from: From,
pub to: To,
pub payment: Payment,
pub gas: Gas,
pub data: Data,
pub result_handler: RH,
}
Expand description
Universal representation of a blockchain transaction.
Uses 7 generic type arguments to encode all aspects of the transaction.
It is future-like, does nothing by itself, it needs a specialized method call to actually run or send it.
Rationale: https://twitter.com/andreimmarinica/status/1777157322155966601
Fields§
§env: Env
§from: From
§to: To
§payment: Payment
§gas: Gas
§data: Data
§result_handler: RH
Implementations§
Source§impl<Api> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Egld<BigUint<Api>>, (), FunctionCall<Api>, Option<CallbackClosure<Api>>>where
Api: CallTypeApi,
impl<Api> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Egld<BigUint<Api>>, (), FunctionCall<Api>, Option<CallbackClosure<Api>>>where
Api: CallTypeApi,
pub fn with_callback( self, callback_call: CallbackClosure<Api>, ) -> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Egld<BigUint<Api>>, (), FunctionCall<Api>, Option<CallbackClosure<Api>>>
Source§impl<Api> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Egld<BigUint<Api>>, (), FunctionCall<Api>, Option<CallbackClosure<Api>>>where
Api: CallTypeApi + StorageWriteApi,
impl<Api> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Egld<BigUint<Api>>, (), FunctionCall<Api>, Option<CallbackClosure<Api>>>where
Api: CallTypeApi + StorageWriteApi,
pub fn call_and_exit_ignore_callback(self) -> !
Source§impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
Data: TxDataFunctionCall<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
Data: TxDataFunctionCall<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn to_call_data_string(&self) -> ManagedBuffer<<Env as TxEnv>::Api>
pub fn to_call_data_string(&self) -> ManagedBuffer<<Env as TxEnv>::Api>
Converts object to a MultiversX transaction data field string.
Source§impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, (), Gas, Data, RH>
impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, (), Gas, Data, RH>
Sourcepub fn payment<Payment>(
self,
payment: Payment,
) -> Tx<Env, From, To, Payment, Gas, Data, RH>where
Payment: TxPayment<Env>,
pub fn payment<Payment>(
self,
payment: Payment,
) -> Tx<Env, From, To, Payment, Gas, Data, RH>where
Payment: TxPayment<Env>,
Adds any payment to a transaction, if no payment has been added before.
Sourcepub fn egld<EgldValue>(
self,
egld_value: EgldValue,
) -> Tx<Env, From, To, Egld<EgldValue>, Gas, Data, RH>where
EgldValue: TxEgldValue<Env>,
pub fn egld<EgldValue>(
self,
egld_value: EgldValue,
) -> Tx<Env, From, To, Egld<EgldValue>, Gas, Data, RH>where
EgldValue: TxEgldValue<Env>,
Adds EGLD value to a transaction.
Accepts any type that can represent and EGLD amount: BigUint, &BigUint, etc.
Sourcepub fn with_egld_transfer(
self,
egld_amount: BigUint<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn with_egld_transfer( self, egld_amount: BigUint<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, Data, RH>
Backwards compatibility. Use method egld
instead.
Sourcepub fn esdt<P>(
self,
payment: P,
) -> Tx<Env, From, To, EsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
pub fn esdt<P>( self, payment: P, ) -> Tx<Env, From, To, EsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
Adds the first single, owned ESDT token payment to a transaction.
Since this is the first ESDT payment, a single payment tx is produced.
Can subsequently be called again for multiple payments.
Sourcepub fn single_esdt<'a>(
self,
token_identifier: &'a TokenIdentifier<<Env as TxEnv>::Api>,
token_nonce: u64,
amount: &'a BigUint<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, EsdtTokenPaymentRefs<'a, <Env as TxEnv>::Api>, Gas, Data, RH>
pub fn single_esdt<'a>( self, token_identifier: &'a TokenIdentifier<<Env as TxEnv>::Api>, token_nonce: u64, amount: &'a BigUint<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, EsdtTokenPaymentRefs<'a, <Env as TxEnv>::Api>, Gas, Data, RH>
Sets a single token payment, with the token identifier and amount kept as references.
This is handy whem we only want one ESDT transfer and we want to avoid unnecessary object clones.
Sourcepub fn egld_or_single_esdt<'a>(
self,
token_identifier: &'a EgldOrEsdtTokenIdentifier<<Env as TxEnv>::Api>,
token_nonce: u64,
amount: &'a BigUint<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, EgldOrEsdtTokenPaymentRefs<'a, <Env as TxEnv>::Api>, Gas, Data, RH>
pub fn egld_or_single_esdt<'a>( self, token_identifier: &'a EgldOrEsdtTokenIdentifier<<Env as TxEnv>::Api>, token_nonce: u64, amount: &'a BigUint<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, EgldOrEsdtTokenPaymentRefs<'a, <Env as TxEnv>::Api>, Gas, Data, RH>
Syntactic sugar for self.payment(EgldOrEsdtTokenPaymentRefs::new(...)
. Takes references.
Sourcepub fn multi_esdt<IntoMulti>(
self,
payments: IntoMulti,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn multi_esdt<IntoMulti>( self, payments: IntoMulti, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Sets a collection of ESDT transfers as the payment of the transaction.
Can be formed from single ESDT payments, but the result will always be a collection.
Always converts the argument into an owned collection of ESDT payments. For work with references, use .payment(&p)
instead.
Sourcepub fn with_esdt_transfer<P>(
self,
payment: P,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn with_esdt_transfer<P>( self, payment: P, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Backwards compatibility.
Sourcepub fn with_multi_token_transfer(
self,
payments: ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn with_multi_token_transfer( self, payments: ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Backwards compatibility.
Sourcepub fn with_egld_or_single_esdt_transfer<P>(
self,
payment: P,
) -> Tx<Env, From, To, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
pub fn with_egld_or_single_esdt_transfer<P>( self, payment: P, ) -> Tx<Env, From, To, EgldOrEsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
Backwards compatibility.
Sourcepub fn egld_or_multi_esdt<P>(
self,
payment: P,
) -> Tx<Env, From, To, EgldOrMultiEsdtPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
pub fn egld_or_multi_esdt<P>( self, payment: P, ) -> Tx<Env, From, To, EgldOrMultiEsdtPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
Converts argument to EgldOrMultiEsdtPayment
, then sets it as payment.
In most cases, payment
should be used instead.
Source§impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, EsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, EsdtTokenPayment<<Env as TxEnv>::Api>, Gas, Data, RH>
Sourcepub fn esdt<P>(
self,
payment: P,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn esdt<P>( self, payment: P, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Adds the second ESDT token transfer to a contract call.
Can be called multiple times on the same call.
When the Tx already contains a single (owned) ESDT payment, adding the second one will convert it to a list.
Source§impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
impl<Env, From, To, Gas, Data, RH> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Sourcepub fn esdt<P>(
self,
payment: P,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn esdt<P>( self, payment: P, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Adds a single ESDT token transfer to a contract call.
Can be called multiple times on the same call.
Sourcepub fn multi_esdt<P>(
self,
payment: P,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn multi_esdt<P>( self, payment: P, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
When the Tx already contains an owned collection of ESDT payments,
calling multi_esdt
is equivalent to esdt
, it just adds another payment to the list.
Can be called multiple times.
Sourcepub fn with_esdt_transfer<P>(
self,
payment: P,
) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
pub fn with_esdt_transfer<P>( self, payment: P, ) -> Tx<Env, From, To, ManagedVec<<Env as TxEnv>::Api, EsdtTokenPayment<<Env as TxEnv>::Api>>, Gas, Data, RH>
Backwards compatibility.
Source§impl<Env, From, To, Payment, Data, RH> Tx<Env, From, To, Payment, (), Data, RH>
impl<Env, From, To, Payment, Data, RH> Tx<Env, From, To, Payment, (), Data, RH>
Sourcepub fn gas<GasValue>(
self,
gas_value: GasValue,
) -> Tx<Env, From, To, Payment, ExplicitGas<GasValue>, Data, RH>where
GasValue: TxGasValue<Env>,
pub fn gas<GasValue>(
self,
gas_value: GasValue,
) -> Tx<Env, From, To, Payment, ExplicitGas<GasValue>, Data, RH>where
GasValue: TxGasValue<Env>,
Sets an explicit gas limit to the call.
Sourcepub fn with_gas_limit(
self,
gas_limit: u64,
) -> Tx<Env, From, To, Payment, ExplicitGas<u64>, Data, RH>
pub fn with_gas_limit( self, gas_limit: u64, ) -> Tx<Env, From, To, Payment, ExplicitGas<u64>, Data, RH>
Backwards compatibility.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
Sourcepub fn into_function_call(self) -> FunctionCall<<Env as TxEnv>::Api>
pub fn into_function_call(self) -> FunctionCall<<Env as TxEnv>::Api>
Converts tx to a simple FunctionCall, to be used as argument or data in contracts.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn normalize(
self,
) -> Tx<Env, From, ManagedAddress<<Env as TxEnv>::Api>, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
pub fn normalize( self, ) -> Tx<Env, From, ManagedAddress<<Env as TxEnv>::Api>, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
Produces the normalized function call, i.e. with builtin function calls for ESDT transfers.
The resulting transaction can differ from the input in several ways:
- the recipient is changed (some builtin functions are called with recipient = sender),
- the function call becomes a builtin function call.
§Important
Do not call this before sending transactions! Normalization is don automatically whenever necessary. Only use when you need the normalized data, e.g. for a multisig.
§Warning
To produce owned values, some clones are performed. It is not optimized for contracts, but can be used nonetheless.
Source§impl<Env, From, Payment, Gas> Tx<Env, From, (), Payment, Gas, (), ()>
impl<Env, From, Payment, Gas> Tx<Env, From, (), Payment, Gas, (), ()>
Sourcepub fn legacy_proxy_call<Env2, To, O>(
self,
call: Tx<Env2, (), To, (), (), FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<O>>,
) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<O>>
pub fn legacy_proxy_call<Env2, To, O>( self, call: Tx<Env2, (), To, (), (), FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<O>>, ) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<O>>
Merges the argument data into the current tx. Used for function calls originating in legacy proxies.
Different environment in the argument allowed because of compatibility with old proxies.
Method still subject to considerable change.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
Sourcepub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>where
T: TopEncodeMulti,
pub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>where
T: TopEncodeMulti,
Adds argument to function call.
Whenever possible, use proxies instead.
It serializes the value, but does not enforce type safety.
Sourcepub fn arguments_raw(
self,
raw: ManagedArgBuffer<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
pub fn arguments_raw( self, raw: ManagedArgBuffer<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, Payment, Gas, FunctionCall<<Env as TxEnv>::Api>, RH>
Adds serialized argument to function call.
Whenever possible, use proxies instead.
Doesa not serialize, does not enforce type safety.
Source§impl<Env, From, To, Payment, Gas, Data> Tx<Env, From, To, Payment, Gas, Data, ()>
impl<Env, From, To, Payment, Gas, Data> Tx<Env, From, To, Payment, Gas, Data, ()>
Sourcepub fn original_result<OriginalResult>(
self,
) -> Tx<Env, From, To, Payment, Gas, Data, OriginalResultMarker<OriginalResult>>
pub fn original_result<OriginalResult>( self, ) -> Tx<Env, From, To, Payment, Gas, Data, OriginalResultMarker<OriginalResult>>
Type marker to set the original contract or VM function return type.
Only the compile-time type annotation is given.
Source§impl<Env, From, To, Gas> Tx<Env, From, To, (), Gas, (), ()>
impl<Env, From, To, Gas> Tx<Env, From, To, (), Gas, (), ()>
Sourcepub fn typed<Proxy>(
self,
proxy: Proxy,
) -> <Proxy as TxProxyTrait<Env, From, To, Gas>>::TxProxyMethodswhere
Proxy: TxProxyTrait<Env, From, To, Gas>,
pub fn typed<Proxy>(
self,
proxy: Proxy,
) -> <Proxy as TxProxyTrait<Env, From, To, Gas>>::TxProxyMethodswhere
Proxy: TxProxyTrait<Env, From, To, Gas>,
Starts a proxy call, deploy, or upgrade.
The proxy object will be given, the subsequent call will be from a proxy context, containing all the contract endpoint names.
Source§impl<Env, From, To, Payment, Gas, Data, ResultList> Tx<Env, From, To, Payment, Gas, Data, ResultList>
impl<Env, From, To, Payment, Gas, Data, ResultList> Tx<Env, From, To, Payment, Gas, Data, ResultList>
Sourcepub fn with_result<ResultHandler>(
self,
result_handler: ResultHandler,
) -> Tx<Env, From, To, Payment, Gas, Data, <ResultList as RHListAppendNoRet<Env, ResultHandler>>::NoRetOutput>where
ResultHandler: RHListItem<Env, <ResultList as TxResultHandler<Env>>::OriginalResult, Returns = ()>,
ResultList: RHListAppendNoRet<Env, ResultHandler>,
pub fn with_result<ResultHandler>(
self,
result_handler: ResultHandler,
) -> Tx<Env, From, To, Payment, Gas, Data, <ResultList as RHListAppendNoRet<Env, ResultHandler>>::NoRetOutput>where
ResultHandler: RHListItem<Env, <ResultList as TxResultHandler<Env>>::OriginalResult, Returns = ()>,
ResultList: RHListAppendNoRet<Env, ResultHandler>,
Adds a result handler that doesn’t return anything.
Sourcepub fn returns<RH>(
self,
item: RH,
) -> Tx<Env, From, To, Payment, Gas, Data, <ResultList as RHListAppendRet<Env, RH>>::RetOutput>where
RH: RHListItem<Env, <ResultList as TxResultHandler<Env>>::OriginalResult>,
ResultList: RHListAppendRet<Env, RH>,
pub fn returns<RH>(
self,
item: RH,
) -> Tx<Env, From, To, Payment, Gas, Data, <ResultList as RHListAppendRet<Env, RH>>::RetOutput>where
RH: RHListItem<Env, <ResultList as TxResultHandler<Env>>::OriginalResult>,
ResultList: RHListAppendRet<Env, RH>,
Adds a result handler that can also return processed data.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn raw_deploy(
self,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, ()>, RH>
pub fn raw_deploy( self, ) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, ()>, RH>
Starts a contract deploy call, serialized by hand.
Whenever possible, should use proxies instead, since manual serialization is not type-safe.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, ()>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, ()>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn code<CodeValue>(
self,
code: CodeValue,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, Code<CodeValue>>, RH>where
CodeValue: TxCodeValue<Env>,
pub fn code<CodeValue>(
self,
code: CodeValue,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, Code<CodeValue>>, RH>where
CodeValue: TxCodeValue<Env>,
Sets upgrade code source as explicit code bytes.
Sourcepub fn from_source<FromSourceValue>(
self,
source_address: FromSourceValue,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, FromSource<FromSourceValue>>, RH>where
FromSourceValue: TxFromSourceValue<Env>,
pub fn from_source<FromSourceValue>(
self,
source_address: FromSourceValue,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, FromSource<FromSourceValue>>, RH>where
FromSourceValue: TxFromSourceValue<Env>,
Sets upgrade code source as another deployed contract code.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, ()>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, ()>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn code<CodeValue>(
self,
code: CodeValue,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, Code<CodeValue>>, RH>where
CodeValue: TxCodeValue<Env>,
pub fn code<CodeValue>(
self,
code: CodeValue,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, Code<CodeValue>>, RH>where
CodeValue: TxCodeValue<Env>,
Sets deploy code source as explicit code bytes.
Sourcepub fn from_source<FromSourceValue>(
self,
source_address: FromSourceValue,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, FromSource<FromSourceValue>>, RH>where
FromSourceValue: TxFromSourceValue<Env>,
pub fn from_source<FromSourceValue>(
self,
source_address: FromSourceValue,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, FromSource<FromSourceValue>>, RH>where
FromSourceValue: TxFromSourceValue<Env>,
Sets deploy code source as another deployed contract code.
Source§impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn code_metadata(
self,
code_metadata: CodeMetadata,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
pub fn code_metadata( self, code_metadata: CodeMetadata, ) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
Sets code metadata to deploy.
Sourcepub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
T: TopEncodeMulti,
pub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
T: TopEncodeMulti,
Adds argument to a contract deploy.
Whenever possible, use proxies instead.
It serializes the value, but does not enforce type safety.
Sourcepub fn arguments_raw(
self,
raw: ManagedArgBuffer<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
pub fn arguments_raw( self, raw: ManagedArgBuffer<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
Adds serialized argument to a contract deploy.
Whenever possible, use proxies instead.
Does not serialize, does not enforce type safety.
Source§impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
Env: TxEnvMockDeployAddress,
From: TxFromSpecified<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>where
Env: TxEnvMockDeployAddress,
From: TxFromSpecified<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn new_address<NA>(
self,
new_address: NA,
) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
pub fn new_address<NA>( self, new_address: NA, ) -> Tx<Env, From, To, Payment, Gas, DeployCall<Env, CodeSource>, RH>
Sets the new mock address to be used for the newly deployed contract.
Only allowed in tests.
Source§impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, RH> Tx<Env, From, To, Payment, Gas, (), RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
RH: TxResultHandler<Env>,
Sourcepub fn raw_upgrade(
self,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, ()>, RH>
pub fn raw_upgrade( self, ) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, ()>, RH>
Starts a contract deploy upgrade, serialized by hand.
Whenever possible, should use proxies instead, since manual serialization is not type-safe.
Source§impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, CodeSource, RH> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>where
Env: TxEnv,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPaymentEgldOnly<Env>,
Gas: TxGas<Env>,
CodeSource: TxCodeSource<Env>,
RH: TxResultHandler<Env>,
pub fn code_metadata( self, code_metadata: CodeMetadata, ) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>
Sourcepub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>where
T: TopEncodeMulti,
pub fn argument<T>(
self,
arg: &T,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>where
T: TopEncodeMulti,
Adds argument to upgrade call.
Whenever possible, use proxies instead.
It serializes the value, but does not enforce type safety.
Sourcepub fn arguments_raw(
self,
raw: ManagedArgBuffer<<Env as TxEnv>::Api>,
) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>
pub fn arguments_raw( self, raw: ManagedArgBuffer<<Env as TxEnv>::Api>, ) -> Tx<Env, From, To, Payment, Gas, UpgradeCall<Env, CodeSource>, RH>
Adds serialized argument to an upgrade call.
Whenever possible, use proxies instead.
Doesa not serialize, does not enforce type safety.
Source§impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: TxEnvWithTxHash,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
Data: TxData<Env>,
RH: TxResultHandler<Env>,
impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: TxEnvWithTxHash,
From: TxFrom<Env>,
To: TxTo<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
Data: TxData<Env>,
RH: TxResultHandler<Env>,
Source§impl<Api, To, Payment, Gas, Data, EmptyRH> Tx<TxScEnv<Api>, (), To, Payment, Gas, Data, EmptyRH>
impl<Api, To, Payment, Gas, Data, EmptyRH> Tx<TxScEnv<Api>, (), To, Payment, Gas, Data, EmptyRH>
Source§impl<Api, To, Payment, Gas, FC, EmptyRH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, EmptyRH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
EmptyRH: TxEmptyResultHandler<TxScEnv<Api>>,
impl<Api, To, Payment, Gas, FC, EmptyRH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, EmptyRH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
EmptyRH: TxEmptyResultHandler<TxScEnv<Api>>,
Sourcepub fn with_callback<RH>(
self,
callback: RH,
) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
RH: TxAsyncCallCallback<Api>,
pub fn with_callback<RH>(
self,
callback: RH,
) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
RH: TxAsyncCallCallback<Api>,
Backwards compatibility.
Source§impl<Api, To, Payment, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, (), FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: TxAsyncCallCallback<Api>,
impl<Api, To, Payment, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, (), FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: TxAsyncCallCallback<Api>,
pub fn async_call_and_exit(self) -> !
pub fn call_and_exit(self) -> !
Source§impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>
impl<Env, From, To, Payment, Gas, Data, RH> Tx<Env, From, To, Payment, Gas, Data, RH>
Sourcepub fn async_call(self) -> Tx<Env, From, To, Payment, Gas, Data, RH>
👎Deprecated since 0.50.2: Backwards compatibility only, does nothing. Just delete. Use async_call_and_exit
to launch asynchronous calls.
pub fn async_call(self) -> Tx<Env, From, To, Payment, Gas, Data, RH>
async_call_and_exit
to launch asynchronous calls.Backwards compatibility only.
Source§impl<Api, To, Payment, Gas> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, CallbackClosure<Api>>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
impl<Api, To, Payment, Gas> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, CallbackClosure<Api>>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
pub fn gas_for_callback( self, gas: u64, ) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, CallbackClosureWithGas<Api>>
Sourcepub fn with_extra_gas_for_callback(
self,
gas: u64,
) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, CallbackClosureWithGas<Api>>
pub fn with_extra_gas_for_callback( self, gas: u64, ) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, CallbackClosureWithGas<Api>>
Backwards compatibility.
Source§impl<Api, To, Payment, GasValue, Callback> Tx<TxScEnv<Api>, (), To, Payment, ExplicitGas<GasValue>, FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
GasValue: TxGasValue<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
impl<Api, To, Payment, GasValue, Callback> Tx<TxScEnv<Api>, (), To, Payment, ExplicitGas<GasValue>, FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
GasValue: TxGasValue<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
Sourcepub fn register_promise(self)
pub fn register_promise(self)
Launches a transaction as an asynchronous promise (async v2 mechanism).
Several such transactions can be launched from a single transaction.
Must set:
- to
- gas
- a function call, ideally via a proxy.
Value-only promises are not supported.
Optionally, can add:
- any payment
- a promise callback, which also needs explicit gas for callback.
Source§impl<Api, To, Payment, GasValue, Callback> Tx<TxScEnv<Api>, (), To, Payment, ExplicitGas<GasValue>, (), Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
GasValue: TxGasValue<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
impl<Api, To, Payment, GasValue, Callback> Tx<TxScEnv<Api>, (), To, Payment, ExplicitGas<GasValue>, (), Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
GasValue: TxGasValue<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
Sourcepub fn register_promise(self)
pub fn register_promise(self)
Launches a transaction as an asynchronous promise (async v2 mechanism), but without calling any function on the destination.
Such calls are useful for appending callbacks to simple transfers, mitigating edge cases such as non-payable SCs and frozen assets.
Source§impl<Api, To, Payment, Callback> Tx<TxScEnv<Api>, (), To, Payment, (), FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
impl<Api, To, Payment, Callback> Tx<TxScEnv<Api>, (), To, Payment, (), FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
Sourcepub unsafe fn register_promise(self)
pub unsafe fn register_promise(self)
Source§impl<Api, To, Payment, Callback> Tx<TxScEnv<Api>, (), To, Payment, (), (), Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
impl<Api, To, Payment, Callback> Tx<TxScEnv<Api>, (), To, Payment, (), (), Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
Sourcepub unsafe fn register_promise(self)
pub unsafe fn register_promise(self)
Source§impl<Api, To, Payment, Gas, Callback> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
impl<Api, To, Payment, Gas, Callback> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, Callback>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
Callback: TxPromisesCallback<Api>,
Sourcepub fn async_call_promise(
self,
) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, Callback>
👎Deprecated since 0.50.2: Backwards compatibility only, does nothing. Just delete. Use register_promise
to launch asynchronous calls.
pub fn async_call_promise( self, ) -> Tx<TxScEnv<Api>, (), To, Payment, Gas, FunctionCall<Api>, Callback>
register_promise
to launch asynchronous calls.Backwards compatibility only.
Source§impl<Api, Payment, Gas, CodeValue, RH> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, Code<CodeValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
CodeValue: TxCodeValue<TxScEnv<Api>>,
RH: RHListExec<DeployRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
impl<Api, Payment, Gas, CodeValue, RH> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, Code<CodeValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
CodeValue: TxCodeValue<TxScEnv<Api>>,
RH: RHListExec<DeployRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
Sourcepub fn sync_call(
self,
) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
pub fn sync_call( self, ) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
Synchronously deploys a contract.
Source§impl<Api, Payment, Gas, FromSourceValue, RH> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, FromSource<FromSourceValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FromSourceValue: TxFromSourceValue<TxScEnv<Api>>,
RH: RHListExec<DeployRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
impl<Api, Payment, Gas, FromSourceValue, RH> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, FromSource<FromSourceValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FromSourceValue: TxFromSourceValue<TxScEnv<Api>>,
RH: RHListExec<DeployRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
Sourcepub fn sync_call(
self,
) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
pub fn sync_call( self, ) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
Synchronously deploys a contract from source.
Source§impl<Api, Payment, Gas, OriginalResult> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
impl<Api, Payment, Gas, OriginalResult> Tx<TxScEnv<Api>, (), (), Payment, Gas, DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
Sourcepub fn deploy_contract<RequestedResult>(
self,
code: &ManagedBuffer<Api>,
code_metadata: CodeMetadata,
) -> (ManagedAddress<Api>, RequestedResult)where
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
pub fn deploy_contract<RequestedResult>(
self,
code: &ManagedBuffer<Api>,
code_metadata: CodeMetadata,
) -> (ManagedAddress<Api>, RequestedResult)where
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
Backwards compatibility, immitates the old API.
Note that the data type (the DeployCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Sourcepub fn deploy_from_source<RequestedResult>(
self,
source_address: &ManagedAddress<Api>,
code_metadata: CodeMetadata,
) -> (ManagedAddress<Api>, RequestedResult)where
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
pub fn deploy_from_source<RequestedResult>(
self,
source_address: &ManagedAddress<Api>,
code_metadata: CodeMetadata,
) -> (ManagedAddress<Api>, RequestedResult)where
RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,
Backwards compatibility, immitates the old API.
Note that the data type (the DeployCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Source§impl<Api, Payment, Gas, OriginalResult> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
impl<Api, Payment, Gas, OriginalResult> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
Sourcepub fn upgrade_contract(
self,
code: &ManagedBuffer<Api>,
code_metadata: CodeMetadata,
)
👎Deprecated since 0.49.0: The legacy upgrade method does not correctly take the upgrade constructor into account. Please switch to the new syntax.
pub fn upgrade_contract( self, code: &ManagedBuffer<Api>, code_metadata: CodeMetadata, )
Backwards compatibility, immitates the old API.
Should no longer be used, which is why unlike all the rest of the old syntax, was deprecated.
Uses a DeployCall
instead of the correct UpgradeCall
, because the old syntax did not know about upgrades.
Note that the data type (the DeployCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Sourcepub fn upgrade_from_source(
self,
source_address: &ManagedAddress<Api>,
code_metadata: CodeMetadata,
)
👎Deprecated since 0.49.0: The legacy upgrade method does not correctly take the upgrade constructor into account. Please switch to the new syntax.
pub fn upgrade_from_source( self, source_address: &ManagedAddress<Api>, code_metadata: CodeMetadata, )
Backwards compatibility, immitates the old API.
Should no longer be used, which is why unlike all the rest of the old syntax, was deprecated.
Uses a DeployCall
instead of the correct UpgradeCall
, because the old syntax did not know about upgrades.
Note that the data type (the DeployCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Source§impl<Api, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: RHListExec<SyncCallRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
impl<Api, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: RHListExec<SyncCallRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
Sourcepub fn sync_call(
self,
) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
pub fn sync_call( self, ) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
Executes transaction synchronously.
Only works with contracts from the same shard.
Sourcepub fn sync_call_same_context(
self,
) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
pub fn sync_call_same_context( self, ) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
Executes transaction synchronously, in the same context (performed in the name of the caller).
Only works with contracts from the same shard.
Source§impl<Api, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxNoPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: RHListExec<SyncCallRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
impl<Api, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxNoPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
RH: RHListExec<SyncCallRawResult<Api>, TxScEnv<Api>>,
<RH as RHList<TxScEnv<Api>>>::ListReturns: NestedTupleFlatten,
Sourcepub fn sync_call_readonly(
self,
) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
pub fn sync_call_readonly( self, ) -> <<RH as RHList<TxScEnv<Api>>>::ListReturns as NestedTupleFlatten>::Unpacked
Executes transaction synchronously, in readonly mode (target contract cannot have its state altered).
Only works with contracts from the same shard.
Source§impl<Api, To, Payment, Gas, FC, OriginalResult> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
impl<Api, To, Payment, Gas, FC, OriginalResult> Tx<TxScEnv<Api>, (), To, Payment, Gas, FC, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxDataFunctionCall<TxScEnv<Api>>,
Sourcepub fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
pub fn execute_on_dest_context<RequestedResult>(self) -> RequestedResultwhere
RequestedResult: TopDecodeMulti,
Backwards compatibility.
Sourcepub fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self,
) -> (RequestedResult, BackTransfers<Api>)where
RequestedResult: TopDecodeMulti,
pub fn execute_on_dest_context_with_back_transfers<RequestedResult>(
self,
) -> (RequestedResult, BackTransfers<Api>)where
RequestedResult: TopDecodeMulti,
Backwards compatibility.
Source§impl<Api, From, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, From, To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
From: TxFrom<TxScEnv<Api>>,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxData<TxScEnv<Api>> + Into<FunctionCall<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
impl<Api, From, To, Payment, Gas, FC, RH> Tx<TxScEnv<Api>, From, To, Payment, Gas, FC, RH>where
Api: CallTypeApi,
From: TxFrom<TxScEnv<Api>>,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FC: TxData<TxScEnv<Api>> + Into<FunctionCall<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
Sourcepub fn transfer_execute(self)
pub fn transfer_execute(self)
Sends transaction asynchronously, and doesn’t wait for callback (“fire and forget”.)
Source§impl<Api, From, To, Payment> Tx<TxScEnv<Api>, From, To, Payment, (), (), ()>where
Api: CallTypeApi,
From: TxFrom<TxScEnv<Api>>,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
impl<Api, From, To, Payment> Tx<TxScEnv<Api>, From, To, Payment, (), (), ()>where
Api: CallTypeApi,
From: TxFrom<TxScEnv<Api>>,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
Sourcepub fn transfer_if_not_empty(self)
pub fn transfer_if_not_empty(self)
Transfers funds, if amount is greater than zero. Does nothing otherwise.
Can only used for simple transfers.
Source§impl<Api, Payment, Gas, CodeValue, RH> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, UpgradeCall<TxScEnv<Api>, Code<CodeValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
CodeValue: TxCodeValue<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
impl<Api, Payment, Gas, CodeValue, RH> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, UpgradeCall<TxScEnv<Api>, Code<CodeValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
CodeValue: TxCodeValue<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
Sourcepub fn upgrade_async_call_and_exit(self)
pub fn upgrade_async_call_and_exit(self)
Launches the upgrade async call.
TODO: change return type to !
.
Source§impl<Api, Payment, Gas, FromSourceValue, RH> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, UpgradeCall<TxScEnv<Api>, FromSource<FromSourceValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FromSourceValue: TxFromSourceValue<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
impl<Api, Payment, Gas, FromSourceValue, RH> Tx<TxScEnv<Api>, (), ManagedAddress<Api>, Payment, Gas, UpgradeCall<TxScEnv<Api>, FromSource<FromSourceValue>>, RH>where
Api: CallTypeApi,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
FromSourceValue: TxFromSourceValue<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
Sourcepub fn upgrade_async_call_and_exit(self)
pub fn upgrade_async_call_and_exit(self)
Launches the upgrade from source async call.
TODO: change return type to !
.
Source§impl<Api, To, Payment, Gas, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, UpgradeCall<TxScEnv<Api>, ()>, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
impl<Api, To, Payment, Gas, RH> Tx<TxScEnv<Api>, (), To, Payment, Gas, UpgradeCall<TxScEnv<Api>, ()>, RH>where
Api: CallTypeApi,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
Gas: TxGas<TxScEnv<Api>>,
RH: TxEmptyResultHandler<TxScEnv<Api>>,
Sourcepub fn upgrade_contract(
self,
code: &ManagedBuffer<Api>,
code_metadata: CodeMetadata,
)
👎Deprecated since 0.49.0: This is a transition syntax, it would not have been reachable before 0.49.0. Use [upgrade_async_call_and_exit] instead.
pub fn upgrade_contract( self, code: &ManagedBuffer<Api>, code_metadata: CodeMetadata, )
Transition syntax, immitates the old API.
Note that the data type (the UpgradeCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Sourcepub fn upgrade_from_source(
self,
source_address: &ManagedAddress<Api>,
code_metadata: CodeMetadata,
)
👎Deprecated since 0.49.0: This is a transition syntax, it would not have been reachable before 0.49.0. Use [upgrade_async_call_and_exit] instead.
pub fn upgrade_from_source( self, source_address: &ManagedAddress<Api>, code_metadata: CodeMetadata, )
Transition syntax, immitates the old API.
Note that the data type (the UpgradeCall
) doesn’t have the code set.
This is because the old API was passing it as paramter, so we use it from the code
argument.
Also note that the code metadata is taken from the code_metadata
argument.
If another one was previously set in the Tx
object, that one will be ignored.
Trait Implementations§
Source§impl<Api, To, Payment, OriginalResult> ContractCallBase<Api> for Tx<TxScEnv<Api>, (), To, Payment, (), FunctionCall<Api>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi + 'static,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
impl<Api, To, Payment, OriginalResult> ContractCallBase<Api> for Tx<TxScEnv<Api>, (), To, Payment, (), FunctionCall<Api>, OriginalResultMarker<OriginalResult>>where
Api: CallTypeApi + 'static,
To: TxToSpecified<TxScEnv<Api>>,
Payment: TxPayment<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
Source§type OriginalResult = OriginalResult
type OriginalResult = OriginalResult
Source§impl<Api, To, Payment, OriginalResult> From<Tx<TxScEnv<Api>, (), To, Payment, (), DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>> for ContractDeploy<Api, OriginalResult>where
Api: CallTypeApi + 'static,
To: TxTo<TxScEnv<Api>>,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
impl<Api, To, Payment, OriginalResult> From<Tx<TxScEnv<Api>, (), To, Payment, (), DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>> for ContractDeploy<Api, OriginalResult>where
Api: CallTypeApi + 'static,
To: TxTo<TxScEnv<Api>>,
Payment: TxPaymentEgldOnly<TxScEnv<Api>>,
OriginalResult: TopEncodeMulti,
Source§fn from(
value: Tx<TxScEnv<Api>, (), To, Payment, (), DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>,
) -> ContractDeploy<Api, OriginalResult>
fn from( value: Tx<TxScEnv<Api>, (), To, Payment, (), DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>, ) -> ContractDeploy<Api, OriginalResult>
Source§impl<'w, From, Payment, Gas, CodeValue, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, (), Payment, Gas, DeployCall<ScenarioEnvExec<'w>, Code<CodeValue>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
Gas: TxGas<ScenarioEnvExec<'w>>,
CodeValue: TxCodeValue<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, Payment, Gas, CodeValue, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, (), Payment, Gas, DeployCall<ScenarioEnvExec<'w>, Code<CodeValue>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
Gas: TxGas<ScenarioEnvExec<'w>>,
CodeValue: TxCodeValue<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
fn run(self) -> Self::Returns
Source§impl<'w, From, To, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, To, NotPayable, (), UpgradeCall<ScenarioEnvExec<'w>, Code<MxscPath<'w>>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, To, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, To, NotPayable, (), UpgradeCall<ScenarioEnvExec<'w>, Code<MxscPath<'w>>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
fn run(self) -> Self::Returns
Source§impl<'w, From, To, Payment, Gas, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, To, Payment, Gas, FunctionCall<StaticApi>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
Gas: TxGas<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, To, Payment, Gas, RH> ScenarioTxRun for Tx<ScenarioEnvExec<'w>, From, To, Payment, Gas, FunctionCall<StaticApi>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
Gas: TxGas<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
fn run(self) -> Self::Returns
Source§impl<'w, To, Payment, RH> ScenarioTxRun for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), FunctionCall<StaticApi>, RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, To, Payment, RH> ScenarioTxRun for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), FunctionCall<StaticApi>, RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvQuery<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
fn run(self) -> Self::Returns
Source§impl<'w, From, Payment, CodeValue, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, (), Payment, (), DeployCall<ScenarioEnvExec<'w>, Code<CodeValue>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
Payment: TxNoPayment<ScenarioEnvExec<'w>>,
CodeValue: TxCodeValue<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, Payment, CodeValue, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, (), Payment, (), DeployCall<ScenarioEnvExec<'w>, Code<CodeValue>>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
Payment: TxNoPayment<ScenarioEnvExec<'w>>,
CodeValue: TxCodeValue<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
Source§impl<'w, From, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, To, Payment, (), (), RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, To, Payment, (), (), RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
Source§impl<'w, From, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, To, Payment, (), FunctionCall<StaticApi>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, From, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvExec<'w>, From, To, Payment, (), FunctionCall<StaticApi>, RH>where
From: TxFromSpecified<ScenarioEnvExec<'w>>,
To: TxToSpecified<ScenarioEnvExec<'w>>,
Payment: TxPayment<ScenarioEnvExec<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvExec<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvExec<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
Source§impl<'w, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), (), RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), (), RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvQuery<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
Source§impl<'w, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), FunctionCall<StaticApi>, RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
impl<'w, To, Payment, RH> ScenarioTxWhitebox for Tx<ScenarioEnvQuery<'w>, (), To, Payment, (), FunctionCall<StaticApi>, RH>where
To: TxToSpecified<ScenarioEnvQuery<'w>>,
Payment: TxNoPayment<ScenarioEnvQuery<'w>>,
RH: RHListExec<TxResponse, ScenarioEnvQuery<'w>>,
RH::ListReturns: NestedTupleFlatten,
type Returns = <<RH as RHList<ScenarioEnvQuery<'w>>>::ListReturns as NestedTupleFlatten>::Unpacked
Source§impl<Env, To, Payment, RH> TxToQueryStep<Env, RH> for Tx<Env, (), To, Payment, (), FunctionCall<Env::Api>, RH>where
Env: TxEnv<RHExpect = TxExpect>,
To: TxToSpecified<Env>,
Payment: TxNoPayment<Env>,
RH: RHListExec<TxResponse, Env>,
impl<Env, To, Payment, RH> TxToQueryStep<Env, RH> for Tx<Env, (), To, Payment, (), FunctionCall<Env::Api>, RH>where
Env: TxEnv<RHExpect = TxExpect>,
To: TxToSpecified<Env>,
Payment: TxNoPayment<Env>,
RH: RHListExec<TxResponse, Env>,
type Step = ScQueryStep
fn tx_to_query_step(self) -> StepWrapper<Env, Self::Step, RH>
Source§impl<Env, From, To, Payment, Gas> TxToStep<Env, ()> for Tx<Env, From, To, Payment, Gas, (), ()>where
Env: TxEnv,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
impl<Env, From, To, Payment, Gas> TxToStep<Env, ()> for Tx<Env, From, To, Payment, Gas, (), ()>where
Env: TxEnv,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
type Step = TransferStep
fn tx_to_step(self) -> StepWrapper<Env, Self::Step, ()>
Source§impl<Env, From, Payment, Gas, CodeValue, RH> TxToStep<Env, RH> for Tx<Env, From, (), Payment, Gas, DeployCall<Env, Code<CodeValue>>, RH>where
Env: TxEnvWithTxHash<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
CodeValue: TxCodeValue<Env>,
RH: RHListExec<TxResponse, Env>,
impl<Env, From, Payment, Gas, CodeValue, RH> TxToStep<Env, RH> for Tx<Env, From, (), Payment, Gas, DeployCall<Env, Code<CodeValue>>, RH>where
Env: TxEnvWithTxHash<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
CodeValue: TxCodeValue<Env>,
RH: RHListExec<TxResponse, Env>,
type Step = ScDeployStep
fn tx_to_step(self) -> StepWrapper<Env, Self::Step, RH>
Source§impl<Env, From, To, Gas, RH, CodeValue> TxToStep<Env, RH> for Tx<Env, From, To, NotPayable, Gas, UpgradeCall<Env, Code<CodeValue>>, RH>where
Env: TxEnv<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Gas: TxGas<Env>,
CodeValue: TxCodeValue<Env>,
RH: RHListExec<TxResponse, Env>,
impl<Env, From, To, Gas, RH, CodeValue> TxToStep<Env, RH> for Tx<Env, From, To, NotPayable, Gas, UpgradeCall<Env, Code<CodeValue>>, RH>where
Env: TxEnv<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Gas: TxGas<Env>,
CodeValue: TxCodeValue<Env>,
RH: RHListExec<TxResponse, Env>,
type Step = ScCallStep
fn tx_to_step(self) -> StepWrapper<Env, Self::Step, RH>
Source§impl<Env, From, To, Payment, Gas, RH> TxToStep<Env, RH> for Tx<Env, From, To, Payment, Gas, FunctionCall<Env::Api>, RH>where
Env: TxEnvWithTxHash<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
RH: RHListExec<TxResponse, Env>,
impl<Env, From, To, Payment, Gas, RH> TxToStep<Env, RH> for Tx<Env, From, To, Payment, Gas, FunctionCall<Env::Api>, RH>where
Env: TxEnvWithTxHash<RHExpect = TxExpect>,
From: TxFromSpecified<Env>,
To: TxToSpecified<Env>,
Payment: TxPayment<Env>,
Gas: TxGas<Env>,
RH: RHListExec<TxResponse, Env>,
type Step = ScCallStep
fn tx_to_step(self) -> StepWrapper<Env, Self::Step, RH>
Auto Trait Implementations§
impl<Env, From, To, Payment, Gas, Data, RH> Freeze for Tx<Env, From, To, Payment, Gas, Data, RH>
impl<Env, From, To, Payment, Gas, Data, RH> RefUnwindSafe for Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: RefUnwindSafe,
From: RefUnwindSafe,
To: RefUnwindSafe,
Payment: RefUnwindSafe,
Gas: RefUnwindSafe,
Data: RefUnwindSafe,
RH: RefUnwindSafe,
impl<Env, From, To, Payment, Gas, Data, RH> Send for Tx<Env, From, To, Payment, Gas, Data, RH>
impl<Env, From, To, Payment, Gas, Data, RH> Sync for Tx<Env, From, To, Payment, Gas, Data, RH>
impl<Env, From, To, Payment, Gas, Data, RH> Unpin for Tx<Env, From, To, Payment, Gas, Data, RH>
impl<Env, From, To, Payment, Gas, Data, RH> UnwindSafe for Tx<Env, From, To, Payment, Gas, Data, RH>where
Env: UnwindSafe,
From: UnwindSafe,
To: UnwindSafe,
Payment: UnwindSafe,
Gas: UnwindSafe,
Data: UnwindSafe,
RH: UnwindSafe,
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> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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>
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>
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