Trait framenode_runtime::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) -> Result<(), DispatchError>;
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<u128, DispatchError>;
fn total_balance(
asset_id: &AssetId,
who: &AccountId
) -> Result<u128, DispatchError>;
fn free_balance(
asset_id: &AssetId,
who: &AccountId
) -> Result<u128, DispatchError>;
fn ensure_can_withdraw(
asset_id: &AssetId,
who: &AccountId,
amount: u128
) -> Result<(), DispatchError>;
}
Expand description
Trait to provide info about assets