I have configured an asset in the GenesisConfig of my node's chain_spec as following:

        assets: AssetsConfig {
            assets: vec![(1000, root_key.clone(), true, 1)], // Genesis assets: id, owner, is_sufficient, min_balance
            metadata: vec![(1000, "Asset name".into(), "ASSET_NAME".into(), 0)], // Genesis metadata: id, name, symbol, decimals
            accounts: vec![], // Genesis accounts: id, account_id, balance

I would like to mint this asset using pallet-assets and I am doing this:

<pallet_assets::Pallet<T> as Mutate<T::AccountId>>::mint_into(

but I get error


How can I mint assets configured in the GenesisConfig? I was convinced that I did not need to create it first.

1 Answer 1


After looking how PolkadotJS app was managing to mint the asset, I figured that I was trying to call the wrong function. I actually do need to call

        pub fn mint(
            origin: OriginFor<T>,
            #[pallet::compact] id: T::AssetId,
            beneficiary: AccountIdLookupOf<T>,
            #[pallet::compact] amount: T::Balance,
        ) -> DispatchResult {

which inside calls do_mint which eventually does the check that I was expecting (i.e. check if the asset already exists - created from GenesisConfig)

Asset::<T, I>::get(id)
  • Hi, could you share your source code?
    – MinhK
    Commented Jan 6 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.