multiversx_sc_snippets::imports::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, Arg1, Arg2>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, initial_supply: Arg2, properties: FungibleTokenProperties, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg2: ProxyArg<BigUint<<Env as TxEnv>::Api>>,

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, Arg1>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: NonFungibleTokenProperties, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>,

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, Arg1>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: SemiFungibleTokenProperties, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>,

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, Arg1>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, properties: MetaTokenProperties, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>,

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, Arg1>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, token_type: EsdtTokenType, num_decimals: usize, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>,

Source

pub fn issue_dynamic<Arg0, Arg1>( self, issue_cost: BigUint<<Env as TxEnv>::Api>, token_display_name: Arg0, token_ticker: Arg1, token_type: EsdtTokenType, num_decimals: usize, ) -> Tx<Env, From, To, Egld<BigUint<<Env as TxEnv>::Api>>, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<TokenIdentifier<<Env as TxEnv>::Api>>>
where Arg0: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedBuffer<<Env as TxEnv>::Api>>,

Issues dynamic ESDT tokens

Source

pub fn mint<Arg0, Arg1>( self, token_identifier: Arg0, amount: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<BigUint<<Env as TxEnv>::Api>>,

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, Arg1>( self, token_identifier: Arg0, amount: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<BigUint<<Env as TxEnv>::Api>>,

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>( self, token_identifier: Arg0, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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>( self, token_identifier: Arg0, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

The reverse operation of pause.

Source

pub fn freeze<Arg0, Arg1>( self, token_identifier: Arg0, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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, Arg1>( self, token_identifier: Arg0, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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

Source

pub fn wipe<Arg0, Arg1>( self, token_identifier: Arg0, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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, Arg1>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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, Arg1>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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

Source

pub fn wipe_nft<Arg0, Arg1>( self, token_identifier: Arg0, nft_nonce: u64, address: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

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>( self, token_identifier: Arg0, num_decimals: usize, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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, Arg0, Arg1>( self, address: Arg0, token_identifier: Arg1, roles_iter: RoleIter, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where RoleIter: Iterator<Item = EsdtLocalRole>, Arg0: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>, Arg1: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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, Arg0, Arg1>( self, address: Arg0, token_identifier: Arg1, roles_iter: RoleIter, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where RoleIter: Iterator<Item = EsdtLocalRole>, Arg0: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>, Arg1: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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, Arg1>( self, token_identifier: Arg0, new_owner: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

Source

pub fn transfer_nft_create_role<Arg0, Arg1>( self, token_identifier: Arg0, old_creator: Arg1, new_creator: Arg1, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>, Arg1: ProxyArg<ManagedAddress<<Env as TxEnv>::Api>>,

Source

pub fn control_changes<Arg0>( self, token_identifier: Arg0, property_arguments: &TokenPropertyArguments, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

Source

pub fn change_to_dynamic<Arg0>( self, token_id: Arg0, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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

Source

pub fn update_token<Arg0>( self, token_id: Arg0, ) -> Tx<Env, From, To, NotPayable, Gas, FunctionCall<<Env as TxEnv>::Api>, OriginalResultMarker<()>>
where Arg0: ProxyArg<TokenIdentifier<<Env as TxEnv>::Api>>,

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> 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<T> ReconstructableFrom<T> for T

Source§

fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> 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