Struct ContractCallWithRewa

Source
pub struct ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static,
{ pub basic: ContractCallNoPayment<SA, OriginalResult>, pub rewa_payment: BigUint<SA>, }
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Expand description

Holds data for calling another contract, with REWA payment only.

Gets created when chaining method with_rewa_transfer.

If the payment is zero, it bevahes exactly like ContractCallNoPayment.

It also represents the normalized form of any contract call, since DCDT transfers (the only payment not available here) get converted to builtin function calls in normalized form.

Fields§

§basic: ContractCallNoPayment<SA, OriginalResult>
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
§rewa_payment: BigUint<SA>
👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.

Implementations§

Source§

impl<SA, OriginalResult> ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static,

Source

pub fn convert_to_dcdt_transfer_call( self, payments: ManagedVec<SA, DcdtTokenPayment<SA>>, ) -> ContractCallWithRewa<SA, OriginalResult>

If this is an DCDT call, it converts it to a regular call to DCDTTransfer. Async calls require this step, but not transfer_dcdt_execute.

Source§

impl<SA, OriginalResult> ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static,

Source§

impl<SA, OriginalResult> ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static,

Source

pub fn new<N>( to: ManagedAddress<SA>, endpoint_name: N, rewa_payment: BigUint<SA>, ) -> ContractCallWithRewa<SA, OriginalResult>
where N: Into<ManagedBuffer<SA>>,

Creates a new instance directly.

The constructor is mostly for hand-written proxies, the usual way of constructing this object is via the builder methods of other contract call types, especially with_rewa_transfer.

Trait Implementations§

Source§

impl<SA, OriginalResult> ContractCall<SA> for ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static, OriginalResult: TopEncodeMulti,

Source§

fn transfer_execute(self)

Immediately launches a transfer-execute call. Read more
Source§

fn argument<T>(self, arg: &T) -> Self
where T: TopEncodeMulti,

Serializes and pushes a value to the arguments buffer. Read more
Source§

fn push_raw_argument<RawArg>(&mut self, raw_arg: RawArg)
where RawArg: Into<ManagedBuffer<SA>>,

For cases where we build the contract call by hand. Read more
Source§

fn with_raw_arguments(self, raw_argument_buffer: ManagedArgBuffer<SA>) -> Self

For cases where we build the contract call by hand.
Source§

fn with_gas_limit(self, gas_limit: u64) -> Self

Sets an explicit gas limit to the call.
Source§

fn into_call_data_string(self) -> ManagedBuffer<SA>

Source§

fn async_call( self, ) -> Tx<TxScEnv<SA>, (), ManagedAddress<SA>, Rewa<BigUint<SA>>, (), FunctionCall<SA>, Option<CallbackClosure<SA>>>

Converts to a legacy async call.
Source§

fn async_call_promise(self) -> AsyncCallPromises<SA>

Converts to an async promise.
Source§

fn execute_on_dest_context<RequestedResult>(self) -> RequestedResult
where RequestedResult: TopDecodeMulti,

Executes immediately, synchronously, and returns contract call result. Only works if the target contract is in the same shard.
Source§

fn execute_on_dest_context_with_back_transfers<RequestedResult>( self, ) -> (RequestedResult, BackTransfers<SA>)
where RequestedResult: TopDecodeMulti,

Executes immediately, synchronously, and returns contract call result. Only works if the target contract is in the same shard.
Source§

fn execute_on_dest_context_ignore_result(self)

👎Deprecated since 0.36.1: Redundant method, use let _: IgnoreValue = contract_call.execute_on_dest_context(...) instead
Executes immediately, synchronously. Read more
Source§

fn execute_on_dest_context_readonly<RequestedResult>(self) -> RequestedResult
where RequestedResult: TopDecodeMulti,

Executes immediately, synchronously, and returns contract call result. Read more
Source§

fn execute_on_same_context<RequestedResult>(self) -> RequestedResult
where RequestedResult: TopDecodeMulti,

Executes immediately, synchronously, and returns contract call result. Read more
Source§

impl<SA, OriginalResult> ContractCallBase<SA> for ContractCallWithRewa<SA, OriginalResult>
where SA: CallTypeApi + 'static, OriginalResult: TopEncodeMulti,

Source§

type OriginalResult = OriginalResult

👎Deprecated since 0.49.0: Please use the unified transaction syntax instead.
Source§

impl<OriginalResult> IntoBlockchainCall for ContractCallWithRewa<VMHooksApi<StaticApiBackend>, OriginalResult>
where OriginalResult: TopEncodeMulti,

Source§

type BlockchainCall = TypedScCall<OriginalResult>

👎Deprecated since 0.42.0: The recommended syntax is a variation of sc_call or sc_deploy with a scenario step built from the ContractCall.
Source§

fn into_blockchain_call( self, ) -> <ContractCallWithRewa<VMHooksApi<StaticApiBackend>, OriginalResult> as IntoBlockchainCall>::BlockchainCall

👎Deprecated since 0.42.0: The recommended syntax is a variation of sc_call or sc_deploy with a scenario step built from the ContractCall.

Auto Trait Implementations§

§

impl<SA, OriginalResult> Freeze for ContractCallWithRewa<SA, OriginalResult>

§

impl<SA, OriginalResult> RefUnwindSafe for ContractCallWithRewa<SA, OriginalResult>

§

impl<SA, OriginalResult> Send for ContractCallWithRewa<SA, OriginalResult>
where SA: Send, OriginalResult: Send, <SA as HandleTypeInfo>::BigIntHandle: Send, <SA as HandleTypeInfo>::ManagedBufferHandle: Send,

§

impl<SA, OriginalResult> Sync for ContractCallWithRewa<SA, OriginalResult>
where SA: Sync, OriginalResult: Sync, <SA as HandleTypeInfo>::BigIntHandle: Sync, <SA as HandleTypeInfo>::ManagedBufferHandle: Sync,

§

impl<SA, OriginalResult> Unpin for ContractCallWithRewa<SA, OriginalResult>
where SA: Unpin, OriginalResult: Unpin, <SA as HandleTypeInfo>::BigIntHandle: Unpin, <SA as HandleTypeInfo>::ManagedBufferHandle: Unpin,

§

impl<SA, OriginalResult> UnwindSafe for ContractCallWithRewa<SA, OriginalResult>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> InterpretableFrom<T> for T

Source§

fn interpret_from(from: T, _context: &InterpreterContext) -> T

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<CC> IntoVMQuery for CC
where CC: ContractCall<VMHooksApi<StaticApiBackend>>,

Source§

impl<T> ReconstructableFrom<T> for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T