Trait common::prelude::AssetInfoProvider
source · pub trait AssetInfoProvider<AssetId, AccountId, AssetSymbol, AssetName, BalancePrecision, ContentSource, Description> {
// Required methods
fn asset_exists(asset_id: &AssetId) -> bool;
fn ensure_asset_exists(asset_id: &AssetId) -> DispatchResult;
fn is_asset_owner(asset_id: &AssetId, account_id: &AccountId) -> bool;
fn get_asset_info(
asset_id: &AssetId
) -> (AssetSymbol, AssetName, BalancePrecision, bool, Option<ContentSource>, Option<Description>);
fn is_non_divisible(asset_id: &AssetId) -> bool;
fn get_asset_content_src(asset_id: &AssetId) -> Option<ContentSource>;
fn get_asset_description(asset_id: &AssetId) -> Option<Description>;
fn total_issuance(asset_id: &AssetId) -> Result<Balance, DispatchError>;
fn total_balance(
asset_id: &AssetId,
who: &AccountId
) -> Result<Balance, DispatchError>;
fn free_balance(
asset_id: &AssetId,
who: &AccountId
) -> Result<Balance, DispatchError>;
fn ensure_can_withdraw(
asset_id: &AssetId,
who: &AccountId,
amount: Balance
) -> DispatchResult;
}
Expand description
Trait to provide info about assets