multiversx_sc::types::system_proxy

Struct ESDTSystemSCProxyMethods

Source
pub struct ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: TxEnv, From: TxFrom<Env>, To: TxTo<Env>, Gas: TxGas<Env>,
{ /* private fields */ }
Expand description

Method container of the ESDT system smart contract proxy.

Implementations§

Source§

impl<Env, From, To, Gas> ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: TxEnv, From: TxFrom<Env>, To: TxTo<Env>, Gas: TxGas<Env>,

Source

pub fn issue_fungible<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>, Arg2: ProxyArg<BigUint<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, initial_supply: Arg2, properties: FungibleTokenProperties, ) -> IssueCall<Env, From, To, Gas>

Produces a contract call to the ESDT system SC, which causes it to issue a new fungible ESDT token.

Source

pub fn issue_non_fungible<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: NonFungibleTokenProperties, ) -> IssueCall<Env, From, To, Gas>

Produces a contract call to the ESDT system SC, which causes it to issue a new non-fungible ESDT token.

Source

pub fn issue_semi_fungible<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: SemiFungibleTokenProperties, ) -> IssueCall<Env, From, To, Gas>

Produces a contract call to the ESDT system SC, which causes it to issue a new semi-fungible ESDT token.

Source

pub fn register_meta_esdt<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: MetaTokenProperties, ) -> IssueCall<Env, From, To, Gas>

Produces a contract call to the ESDT system SC, which causes it to register a new Meta ESDT token.

Source

pub fn issue_and_set_all_roles<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, token_type: EsdtTokenType, num_decimals: usize, ) -> IssueCall<Env, From, To, Gas>

Source

pub fn issue_dynamic<Arg0: ProxyArg<ManagedBuffer<Env::Api>>, Arg1: ProxyArg<ManagedBuffer<Env::Api>>>( self, issue_cost: BigUint<Env::Api>, token_display_name: Arg0, token_ticker: Arg1, token_type: EsdtTokenType, num_decimals: usize, ) -> IssueCall<Env, From, To, Gas>

Issues dynamic ESDT tokens

Source

pub fn mint<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<BigUint<Env::Api>>>( self, token_identifier: Arg0, amount: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Produces a contract call to the ESDT system SC, which causes it to mint more fungible ESDT tokens. It will fail if the SC is not the owner of the token.

Source

pub fn burn<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<BigUint<Env::Api>>>( self, token_identifier: Arg0, amount: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Produces a contract call to the ESDT system SC, which causes it to burn fungible ESDT tokens owned by the SC.

Source

pub fn pause<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_identifier: Arg0, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The manager of an ESDT token may choose to suspend all transactions of the token, except minting, freezing/unfreezing and wiping.

Source

pub fn unpause<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_identifier: Arg0, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The reverse operation of pause.

Source

pub fn freeze<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The manager of an ESDT token may freeze the tokens held by a specific account. As a consequence, no tokens may be transferred to or from the frozen account. Freezing and unfreezing the tokens of an account are operations designed to help token managers to comply with regulations.

Source

pub fn unfreeze<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The reverse operation of freeze, unfreezing, will allow further transfers to and from the account.

Source

pub fn wipe<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The manager of an ESDT token may wipe out all the tokens held by a frozen account. This operation is similar to burning the tokens, but the account must have been frozen beforehand, and it must be done by the token manager. Wiping the tokens of an account is an operation designed to help token managers to comply with regulations.

Source

pub fn freeze_nft<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The manager of an ESDT token may freeze the NFT held by a specific Account. As a consequence, no NFT can be transferred to or from the frozen Account. Freezing and unfreezing a single NFT of an Account are operations designed to help token managers to comply with regulations.

Source

pub fn unfreeze_nft<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The reverse operation of freeze, unfreezing, will allow further transfers to and from the account.

Source

pub fn wipe_nft<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

The manager of an ESDT token may wipe out a single NFT held by a frozen Account. This operation is similar to burning the quantity, but the Account must have been frozen beforehand, and it must be done by the token manager. Wiping the tokens of an Account is an operation designed to help token managers to comply with regulations.

Source

pub fn change_sft_to_meta_esdt<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_identifier: Arg0, num_decimals: usize, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

This function converts an SFT to a metaESDT by adding decimals to its structure in the metachain ESDT System SC. This function as almost all in case of ESDT can be called only by the owner.

Source

pub fn set_special_roles<RoleIter: Iterator<Item = EsdtLocalRole>, Arg0: ProxyArg<ManagedAddress<Env::Api>>, Arg1: ProxyArg<TokenIdentifier<Env::Api>>>( self, address: Arg0, token_identifier: Arg1, roles_iter: RoleIter, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

This function can be called only if canSetSpecialRoles was set to true. The metachain system SC will evaluate the arguments and call “ESDTSetRole@tokenId@listOfRoles” for the given address. This will be actually a cross shard call. This function as almost all in case of ESDT can be called only by the owner.

Source

pub fn unset_special_roles<RoleIter: Iterator<Item = EsdtLocalRole>, Arg0: ProxyArg<ManagedAddress<Env::Api>>, Arg1: ProxyArg<TokenIdentifier<Env::Api>>>( self, address: Arg0, token_identifier: Arg1, roles_iter: RoleIter, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

This function can be called only if canSetSpecialRoles was set to true. The metachain system SC will evaluate the arguments and call “ESDTUnsetRole@tokenId@listOfRoles” for the given address. This will be actually a cross shard call. This function as almost all in case of ESDT can be called only by the owner.

Source

pub fn transfer_ownership<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, new_owner: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Source

pub fn transfer_nft_create_role<Arg0: ProxyArg<TokenIdentifier<Env::Api>>, Arg1: ProxyArg<ManagedAddress<Env::Api>>>( self, token_identifier: Arg0, old_creator: Arg1, new_creator: Arg1, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Source

pub fn control_changes<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_identifier: Arg0, property_arguments: &TokenPropertyArguments, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Source

pub fn change_to_dynamic<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_id: Arg0, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Changes token to dynamic. Does not work for: FungibleESDT, NonFungibleESDT, NonFungibleESDTv2.

Source

pub fn update_token<Arg0: ProxyArg<TokenIdentifier<Env::Api>>>( self, token_id: Arg0, ) -> TxTypedCall<Env, From, To, NotPayable, Gas, ()>

Updates a specific token to the newest version.

Auto Trait Implementations§

§

impl<Env, From, To, Gas> Freeze for ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: Freeze, From: Freeze, To: Freeze, Gas: Freeze,

§

impl<Env, From, To, Gas> RefUnwindSafe for ESDTSystemSCProxyMethods<Env, From, To, Gas>

§

impl<Env, From, To, Gas> Send for ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: Send, From: Send, To: Send, Gas: Send,

§

impl<Env, From, To, Gas> Sync for ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: Sync, From: Sync, To: Sync, Gas: Sync,

§

impl<Env, From, To, Gas> Unpin for ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: Unpin, From: Unpin, To: Unpin, Gas: Unpin,

§

impl<Env, From, To, Gas> UnwindSafe for ESDTSystemSCProxyMethods<Env, From, To, Gas>
where Env: UnwindSafe, From: UnwindSafe, To: UnwindSafe, Gas: UnwindSafe,

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, 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, 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.