pub trait MultiTokenForcedCore: MultiTokenCore + AccessControllable {
// Required methods
fn mt_force_transfer(
&mut self,
owner_id: AccountId,
receiver_id: AccountId,
token_id: TokenId,
amount: U128,
approval: Option<(AccountId, u64)>,
memo: Option<String>,
);
fn mt_force_batch_transfer(
&mut self,
owner_id: AccountId,
receiver_id: AccountId,
token_ids: Vec<TokenId>,
amounts: Vec<U128>,
approvals: Option<Vec<Option<(AccountId, u64)>>>,
memo: Option<String>,
);
fn mt_force_transfer_call(
&mut self,
owner_id: AccountId,
receiver_id: AccountId,
token_id: TokenId,
amount: U128,
approval: Option<(AccountId, u64)>,
memo: Option<String>,
msg: String,
) -> PromiseOrValue<Vec<U128>>;
fn mt_force_batch_transfer_call(
&mut self,
owner_id: AccountId,
receiver_id: AccountId,
token_ids: Vec<TokenId>,
amounts: Vec<U128>,
approvals: Option<Vec<Option<(AccountId, u64)>>>,
memo: Option<String>,
msg: String,
) -> PromiseOrValue<Vec<U128>>;
}
Expand description
Same as [MultiTokenCore
], but allows permissioned accounts to transfer
from any owner_id
bypassing locked checks.
Required Methods§
fn mt_force_transfer( &mut self, owner_id: AccountId, receiver_id: AccountId, token_id: TokenId, amount: U128, approval: Option<(AccountId, u64)>, memo: Option<String>, )
fn mt_force_batch_transfer( &mut self, owner_id: AccountId, receiver_id: AccountId, token_ids: Vec<TokenId>, amounts: Vec<U128>, approvals: Option<Vec<Option<(AccountId, u64)>>>, memo: Option<String>, )
fn mt_force_transfer_call( &mut self, owner_id: AccountId, receiver_id: AccountId, token_id: TokenId, amount: U128, approval: Option<(AccountId, u64)>, memo: Option<String>, msg: String, ) -> PromiseOrValue<Vec<U128>>
fn mt_force_batch_transfer_call( &mut self, owner_id: AccountId, receiver_id: AccountId, token_ids: Vec<TokenId>, amounts: Vec<U128>, approvals: Option<Vec<Option<(AccountId, u64)>>>, memo: Option<String>, msg: String, ) -> PromiseOrValue<Vec<U128>>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.