multiversx_sc_scenario::imports

Struct ContractDeploy

Source
pub struct ContractDeploy<SA, OriginalResult>
where SA: CallTypeApi + 'static,
{ pub to: ManagedOption<SA, ManagedAddress<SA>>, pub egld_payment: BigUint<SA>, pub explicit_gas_limit: u64, pub arg_buffer: ManagedArgBuffer<SA>, /* private fields */ }
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.

Fieldsยง

ยงto: ManagedOption<SA, ManagedAddress<SA>>
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.
ยงegld_payment: BigUint<SA>
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.
ยงexplicit_gas_limit: u64
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.
ยงarg_buffer: ManagedArgBuffer<SA>
๐Ÿ‘ŽDeprecated since 0.49.0: Please use the unified transaction syntax instead.

Implementationsยง

Sourceยง

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

Source

pub fn new() -> ContractDeploy<SA, OriginalResult>

Source

pub fn with_egld_transfer( self, payment_amount: BigUint<SA>, ) -> ContractDeploy<SA, OriginalResult>

Source

pub fn with_gas_limit( self, gas_limit: u64, ) -> ContractDeploy<SA, OriginalResult>

Source

pub fn push_endpoint_arg<T>(&mut self, endpoint_arg: &T)
where T: TopEncodeMulti,

Sourceยง

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

Source

pub fn deploy_contract<RequestedResult>( self, code: &ManagedBuffer<SA>, code_metadata: CodeMetadata, ) -> (ManagedAddress<SA>, RequestedResult)
where RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,

Executes immediately, synchronously, and returns Some(Address) of the deployed contract.
Will return None if the deploy fails.

Source

pub fn deploy_from_source<RequestedResult>( self, source_address: &ManagedAddress<SA>, code_metadata: CodeMetadata, ) -> (ManagedAddress<SA>, RequestedResult)
where RequestedResult: TopDecodeMulti + TypeAbiFrom<OriginalResult>,

Source

pub fn upgrade_from_source( self, source_address: &ManagedAddress<SA>, code_metadata: CodeMetadata, )

Source

pub fn upgrade_contract( self, code: &ManagedBuffer<SA>, code_metadata: CodeMetadata, )

Trait Implementationsยง

Sourceยง

impl<SA, OriginalResult> Default for ContractDeploy<SA, OriginalResult>
where SA: CallTypeApi + 'static,

Sourceยง

fn default() -> ContractDeploy<SA, OriginalResult>

Returns the โ€œdefault valueโ€ for a type. Read more
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,

Sourceยง

fn from( value: Tx<TxScEnv<Api>, (), To, Payment, (), DeployCall<TxScEnv<Api>, ()>, OriginalResultMarker<OriginalResult>>, ) -> ContractDeploy<Api, OriginalResult>

Converts to this type from the input type.
Sourceยง

impl<OriginalResult> IntoBlockchainCall for ContractDeploy<StaticApi, OriginalResult>

Sourceยง

type BlockchainCall = TypedScDeploy<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) -> Self::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 ContractDeploy<SA, OriginalResult>

ยง

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

ยง

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

ยง

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

ยง

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

ยง

impl<SA, OriginalResult> UnwindSafe for ContractDeploy<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> 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<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