pub struct ESDTSystemSmartContractProxy<SA>where
SA: SendApi + 'static,{ /* private fields */ }
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,
impl<SA> ESDTSystemSmartContractProxy<SA>where
SA: SendApi + 'static,
Sourcepub fn new_proxy_obj() -> ESDTSystemSmartContractProxy<SA>
pub fn new_proxy_obj() -> ESDTSystemSmartContractProxy<SA>
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,
impl<SA> ESDTSystemSmartContractProxy<SA>where
SA: CallTypeApi + 'static,
Sourcepub 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, ()>
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.
Sourcepub fn issue_non_fungible(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: NonFungibleTokenProperties,
) -> ContractCallWithEgld<SA, ()>
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.
Sourcepub fn issue_semi_fungible(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: SemiFungibleTokenProperties,
) -> ContractCallWithEgld<SA, ()>
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.
Sourcepub fn register_meta_esdt(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: MetaTokenProperties,
) -> ContractCallWithEgld<SA, ()>
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.
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, ()>
Sourcepub 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, ()>
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
Sourcepub fn mint(
self,
token_identifier: &TokenIdentifier<SA>,
amount: &BigUint<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn burn(
self,
token_identifier: &TokenIdentifier<SA>,
amount: &BigUint<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn pause(
self,
token_identifier: &TokenIdentifier<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn unpause(
self,
token_identifier: &TokenIdentifier<SA>,
) -> ContractCallNoPayment<SA, ()>
pub fn unpause( self, token_identifier: &TokenIdentifier<SA>, ) -> ContractCallNoPayment<SA, ()>
The reverse operation of pause
.
Sourcepub fn freeze(
self,
token_identifier: &TokenIdentifier<SA>,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn unfreeze(
self,
token_identifier: &TokenIdentifier<SA>,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn wipe(
self,
token_identifier: &TokenIdentifier<SA>,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn freeze_nft(
self,
token_identifier: &TokenIdentifier<SA>,
nft_nonce: u64,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn unfreeze_nft(
self,
token_identifier: &TokenIdentifier<SA>,
nft_nonce: u64,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn wipe_nft(
self,
token_identifier: &TokenIdentifier<SA>,
nft_nonce: u64,
address: &ManagedAddress<SA>,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn change_sft_to_meta_esdt(
self,
token_identifier: &TokenIdentifier<SA>,
num_decimals: usize,
) -> ContractCallNoPayment<SA, ()>
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.
Sourcepub fn set_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = EsdtLocalRole>,
pub fn set_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = EsdtLocalRole>,
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.
Sourcepub fn unset_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = EsdtLocalRole>,
pub fn unset_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = EsdtLocalRole>,
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.
pub fn transfer_ownership( self, token_identifier: &TokenIdentifier<SA>, new_owner: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>
pub fn transfer_nft_create_role( self, token_identifier: &TokenIdentifier<SA>, old_creator: &ManagedAddress<SA>, new_creator: &ManagedAddress<SA>, ) -> ContractCallNoPayment<SA, ()>
pub fn control_changes( self, token_identifier: &TokenIdentifier<SA>, property_arguments: &TokenPropertyArguments, ) -> ContractCallNoPayment<SA, ()>
pub fn esdt_system_sc_address(&self) -> ManagedAddress<SA>
Auto Trait Implementations§
impl<SA> Freeze for ESDTSystemSmartContractProxy<SA>
impl<SA> RefUnwindSafe for ESDTSystemSmartContractProxy<SA>where
SA: RefUnwindSafe,
impl<SA> Send for ESDTSystemSmartContractProxy<SA>where
SA: Send,
impl<SA> Sync for ESDTSystemSmartContractProxy<SA>where
SA: Sync,
impl<SA> Unpin for ESDTSystemSmartContractProxy<SA>where
SA: Unpin,
impl<SA> UnwindSafe for ESDTSystemSmartContractProxy<SA>where
SA: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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