pub struct SendRawWrapper<A>where
A: CallTypeApi,{ /* private fields */ }
Implementations§
Source§impl<A> SendRawWrapper<A>where
A: CallTypeApi,
impl<A> SendRawWrapper<A>where
A: CallTypeApi,
pub fn new() -> Self
pub fn direct_egld<D>(
&self,
to: &ManagedAddress<A>,
egld_value: &BigUint<A>,
data: D,
)where
D: Into<ManagedBuffer<A>>,
pub fn direct_egld_execute( &self, to: &ManagedAddress<A>, egld_value: &BigUint<A>, gas_limit: u64, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> Result<(), &'static [u8]>
pub fn transfer_esdt_execute( &self, to: &ManagedAddress<A>, token: &TokenIdentifier<A>, value: &BigUint<A>, gas_limit: u64, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> Result<(), &'static [u8]>
pub fn transfer_esdt_nft_execute( &self, to: &ManagedAddress<A>, token: &TokenIdentifier<A>, nonce: u64, egld_value: &BigUint<A>, gas_limit: u64, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> Result<(), &'static [u8]>
pub fn multi_esdt_transfer_execute( &self, to: &ManagedAddress<A>, payments: &ManagedVec<A, EsdtTokenPayment<A>>, gas_limit: u64, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> Result<(), &'static [u8]>
pub fn multi_egld_or_esdt_transfer_execute( &self, to: &ManagedAddress<A>, payments: &ManagedVec<A, EgldOrEsdtTokenPayment<A>>, gas_limit: u64, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> Result<(), &'static [u8]>
pub fn async_call_raw( &self, to: &ManagedAddress<A>, egld_value: &BigUint<A>, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> !
pub fn create_async_call_raw( &self, to: &ManagedAddress<A>, egld_value: &BigUint<A>, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, success_callback: &'static str, error_callback: &'static str, gas: u64, extra_gas_for_callback: u64, serialized_callback_closure_args: &ManagedBuffer<A>, )
Sourcepub fn deploy_contract(
&self,
gas: u64,
egld_value: &BigUint<A>,
code: &ManagedBuffer<A>,
code_metadata: CodeMetadata,
arg_buffer: &ManagedArgBuffer<A>,
) -> (ManagedAddress<A>, ManagedVec<A, ManagedBuffer<A>>)
pub fn deploy_contract( &self, gas: u64, egld_value: &BigUint<A>, code: &ManagedBuffer<A>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<A>, ) -> (ManagedAddress<A>, ManagedVec<A, ManagedBuffer<A>>)
Deploys a new contract in the same shard.
Unlike async_call_raw
, the deployment is synchronous and tx execution continues afterwards.
Also unlike async_call_raw
, it uses an argument buffer to pass arguments
If the deployment fails, Option::None is returned
Sourcepub fn deploy_from_source_contract(
&self,
gas: u64,
egld_value: &BigUint<A>,
source_contract_address: &ManagedAddress<A>,
code_metadata: CodeMetadata,
arg_buffer: &ManagedArgBuffer<A>,
) -> (ManagedAddress<A>, ManagedVec<A, ManagedBuffer<A>>)
pub fn deploy_from_source_contract( &self, gas: u64, egld_value: &BigUint<A>, source_contract_address: &ManagedAddress<A>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<A>, ) -> (ManagedAddress<A>, ManagedVec<A, ManagedBuffer<A>>)
Deploys a new contract in the same shard by re-using the code of an already deployed source contract. The deployment is done synchronously and the new contract’s address is returned. If the deployment fails, Option::None is returned
pub fn upgrade_from_source_contract( &self, sc_address: &ManagedAddress<A>, gas: u64, egld_value: &BigUint<A>, source_contract_address: &ManagedAddress<A>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<A>, )
Sourcepub fn upgrade_contract(
&self,
sc_address: &ManagedAddress<A>,
gas: u64,
egld_value: &BigUint<A>,
code: &ManagedBuffer<A>,
code_metadata: CodeMetadata,
arg_buffer: &ManagedArgBuffer<A>,
)
pub fn upgrade_contract( &self, sc_address: &ManagedAddress<A>, gas: u64, egld_value: &BigUint<A>, code: &ManagedBuffer<A>, code_metadata: CodeMetadata, arg_buffer: &ManagedArgBuffer<A>, )
Upgrades a child contract of the currently executing contract. The upgrade is synchronous, and the current transaction will fail if the upgrade fails. The child contract’s new init function will be called with the provided arguments
Sourcepub fn execute_on_dest_context_raw(
&self,
gas: u64,
address: &ManagedAddress<A>,
value: &BigUint<A>,
endpoint_name: &ManagedBuffer<A>,
arg_buffer: &ManagedArgBuffer<A>,
) -> ManagedVec<A, ManagedBuffer<A>>
pub fn execute_on_dest_context_raw( &self, gas: u64, address: &ManagedAddress<A>, value: &BigUint<A>, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> ManagedVec<A, ManagedBuffer<A>>
Same shard, in-line execution of another contract.
pub fn execute_on_same_context_raw( &self, gas: u64, address: &ManagedAddress<A>, value: &BigUint<A>, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> ManagedVec<A, ManagedBuffer<A>>
Sourcepub fn execute_on_dest_context_readonly_raw(
&self,
gas: u64,
address: &ManagedAddress<A>,
endpoint_name: &ManagedBuffer<A>,
arg_buffer: &ManagedArgBuffer<A>,
) -> ManagedVec<A, ManagedBuffer<A>>
pub fn execute_on_dest_context_readonly_raw( &self, gas: u64, address: &ManagedAddress<A>, endpoint_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> ManagedVec<A, ManagedBuffer<A>>
Same shard, in-line execution of another contract.
Sourcepub fn call_local_esdt_built_in_function(
&self,
gas: u64,
function_name: &ManagedBuffer<A>,
arg_buffer: &ManagedArgBuffer<A>,
) -> ManagedVec<A, ManagedBuffer<A>>
pub fn call_local_esdt_built_in_function( &self, gas: u64, function_name: &ManagedBuffer<A>, arg_buffer: &ManagedArgBuffer<A>, ) -> ManagedVec<A, ManagedBuffer<A>>
Allows synchronously calling a local function by name. Execution is resumed afterwards.