multiversx_sc::types::system_proxy

Struct ESDTSystemSmartContractProxy

Source
pub struct ESDTSystemSmartContractProxy<SA>
where SA: SendApi + 'static,
{ /* private fields */ }
👎Deprecated since 0.49.0: There is a new ESDTSystemSCProxy, which uses the new proxy model.
Expand description

Proxy for the ESDT system smart contract. Unlike other contract proxies, this one has a fixed address, so the proxy object doesn’t really contain any data, it is more of a placeholder.

Implementations§

Source§

impl<SA> ESDTSystemSmartContractProxy<SA>
where SA: SendApi + 'static,

Source

pub fn new_proxy_obj() -> Self

Constructor. TODO: consider moving this to a new Proxy contructor trait (bonus: better proxy constructor syntax).

Source§

impl<SA> ESDTSystemSmartContractProxy<SA>
where SA: CallTypeApi + 'static,

Source

pub fn issue_fungible( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, initial_supply: &BigUint<SA>, properties: FungibleTokenProperties, ) -> ContractCallWithEgld<SA, ()>

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( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: NonFungibleTokenProperties, ) -> ContractCallWithEgld<SA, ()>

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( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: SemiFungibleTokenProperties, ) -> ContractCallWithEgld<SA, ()>

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( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: MetaTokenProperties, ) -> ContractCallWithEgld<SA, ()>

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( self, issue_cost: BigUint<SA>, token_display_name: ManagedBuffer<SA>, token_ticker: ManagedBuffer<SA>, token_type: EsdtTokenType, num_decimals: usize, ) -> ContractCallWithEgld<SA, ()>

Source

pub fn issue_dynamic( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, token_type: EsdtTokenType, num_decimals: usize, ) -> ContractCallWithEgld<SA, ()>

Issues dynamic ESDT tokens

Source

pub fn mint( self, token_identifier: &TokenIdentifier<SA>, amount: &BigUint<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, amount: &BigUint<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, ) -> ContractCallNoPayment<SA, ()>

The reverse operation of pause.

Source

pub fn freeze( self, token_identifier: &TokenIdentifier<SA>, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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

Source

pub fn wipe( self, token_identifier: &TokenIdentifier<SA>, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, nft_nonce: u64, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, nft_nonce: u64, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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

Source

pub fn wipe_nft( self, token_identifier: &TokenIdentifier<SA>, nft_nonce: u64, address: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, num_decimals: usize, ) -> ContractCallNoPayment<SA, ()>

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>>( self, address: &ManagedAddress<SA>, token_identifier: &TokenIdentifier<SA>, roles_iter: RoleIter, ) -> ContractCallNoPayment<SA, ()>

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>>( self, address: &ManagedAddress<SA>, token_identifier: &TokenIdentifier<SA>, roles_iter: RoleIter, ) -> ContractCallNoPayment<SA, ()>

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( self, token_identifier: &TokenIdentifier<SA>, new_owner: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

Source

pub fn transfer_nft_create_role( self, token_identifier: &TokenIdentifier<SA>, old_creator: &ManagedAddress<SA>, new_creator: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>

Source

pub fn control_changes( self, token_identifier: &TokenIdentifier<SA>, property_arguments: &TokenPropertyArguments, ) -> ContractCallNoPayment<SA, ()>

Source

pub fn esdt_system_sc_address(&self) -> ManagedAddress<SA>

Auto Trait Implementations§

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.