Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Metadata in pallet-assets cannot be accessed by other pallet #9877

@mclyk

Description

@mclyk

Hi, I have a question about pallet-assets.
we are developing a DeFi project that need to use asset's decimal when calculating, however when we import pallet-assets in our project, the storage Metadata can not be accessed by other pallets.

#[pallet::storage]
/// Metadata of an asset.
pub(super) type Metadata<T: Config<I>, I: 'static = ()> = StorageMap<
        _,
        Blake2_128Concat,
        T::AssetId,
        AssetMetadata<DepositBalanceOf<T, I>, BoundedVec<u8, T::StringLimit>>,
        ValueQuery,
        GetDefault,
        ConstU32<300_000>,
>;

I wonder can we make it public or abstract a trait, so the other pallet can access its decimal?

Metadata

Metadata

Assignees

No one assigned

    Labels

    J2-unconfirmedIssue might be valid, but it’s not yet known.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions