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(
T::MyAssetId::get(),
&accountId,
amount)?;
but I get error
Token(
UnknownAsset,
),
How can I mint assets configured in the GenesisConfig? I was convinced that I did not need to create
it first.