pub struct DCDTSystemSmartContractProxy<SA>where
SA: SendApi + 'static,{ /* private fields */ }
DCDTSystemSCProxy
, which uses the new proxy model.Expand description
Proxy for the DCDT 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> DCDTSystemSmartContractProxy<SA>where
SA: SendApi + 'static,
impl<SA> DCDTSystemSmartContractProxy<SA>where
SA: SendApi + 'static,
Sourcepub fn new_proxy_obj() -> DCDTSystemSmartContractProxy<SA>
pub fn new_proxy_obj() -> DCDTSystemSmartContractProxy<SA>
Constructor. TODO: consider moving this to a new Proxy contructor trait (bonus: better proxy constructor syntax).
Source§impl<SA> DCDTSystemSmartContractProxy<SA>where
SA: CallTypeApi + 'static,
impl<SA> DCDTSystemSmartContractProxy<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,
) -> ContractCallWithRewa<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, ) -> ContractCallWithRewa<SA, ()>
Produces a contract call to the DCDT system SC, which causes it to issue a new fungible DCDT token.
Sourcepub fn issue_non_fungible(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: NonFungibleTokenProperties,
) -> ContractCallWithRewa<SA, ()>
pub fn issue_non_fungible( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: NonFungibleTokenProperties, ) -> ContractCallWithRewa<SA, ()>
Produces a contract call to the DCDT system SC, which causes it to issue a new non-fungible DCDT token.
Sourcepub fn issue_semi_fungible(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: SemiFungibleTokenProperties,
) -> ContractCallWithRewa<SA, ()>
pub fn issue_semi_fungible( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: SemiFungibleTokenProperties, ) -> ContractCallWithRewa<SA, ()>
Produces a contract call to the DCDT system SC, which causes it to issue a new semi-fungible DCDT token.
Sourcepub fn register_meta_dcdt(
self,
issue_cost: BigUint<SA>,
token_display_name: &ManagedBuffer<SA>,
token_ticker: &ManagedBuffer<SA>,
properties: MetaTokenProperties,
) -> ContractCallWithRewa<SA, ()>
pub fn register_meta_dcdt( self, issue_cost: BigUint<SA>, token_display_name: &ManagedBuffer<SA>, token_ticker: &ManagedBuffer<SA>, properties: MetaTokenProperties, ) -> ContractCallWithRewa<SA, ()>
Produces a contract call to the DCDT system SC, which causes it to register a new Meta DCDT token.
pub fn issue_and_set_all_roles( self, issue_cost: BigUint<SA>, token_display_name: ManagedBuffer<SA>, token_ticker: ManagedBuffer<SA>, token_type: DcdtTokenType, num_decimals: usize, ) -> ContractCallWithRewa<SA, ()>
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 DCDT system SC, which causes it to mint more fungible DCDT 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 DCDT system SC, which causes it to burn fungible DCDT 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 DCDT 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 DCDT 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 DCDT 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 DCDT 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 DCDT 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_dcdt(
self,
token_identifier: &TokenIdentifier<SA>,
num_decimals: usize,
) -> ContractCallNoPayment<SA, ()>
pub fn change_sft_to_meta_dcdt( self, token_identifier: &TokenIdentifier<SA>, num_decimals: usize, ) -> ContractCallNoPayment<SA, ()>
This function converts an SFT to a metaDCDT by adding decimals to its structure in the metachain DCDT System SC. This function as almost all in case of DCDT 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 = DcdtLocalRole>,
pub fn set_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = DcdtLocalRole>,
This function can be called only if canSetSpecialRoles was set to true. The metachain system SC will evaluate the arguments and call “DCDTSetRole@tokenId@listOfRoles” for the given address. This will be actually a cross shard call. This function as almost all in case of DCDT 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 = DcdtLocalRole>,
pub fn unset_special_roles<RoleIter>(
self,
address: &ManagedAddress<SA>,
token_identifier: &TokenIdentifier<SA>,
roles_iter: RoleIter,
) -> ContractCallNoPayment<SA, ()>where
RoleIter: Iterator<Item = DcdtLocalRole>,
This function can be called only if canSetSpecialRoles was set to true. The metachain system SC will evaluate the arguments and call “DCDTUnsetRole@tokenId@listOfRoles” for the given address. This will be actually a cross shard call. This function as almost all in case of DCDT 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 dcdt_system_sc_address(&self) -> ManagedAddress<SA>
Auto Trait Implementations§
impl<SA> Freeze for DCDTSystemSmartContractProxy<SA>
impl<SA> RefUnwindSafe for DCDTSystemSmartContractProxy<SA>where
SA: RefUnwindSafe,
impl<SA> Send for DCDTSystemSmartContractProxy<SA>where
SA: Send,
impl<SA> Sync for DCDTSystemSmartContractProxy<SA>where
SA: Sync,
impl<SA> Unpin for DCDTSystemSmartContractProxy<SA>where
SA: Unpin,
impl<SA> UnwindSafe for DCDTSystemSmartContractProxy<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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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