Why I have this Error?
Tokens: orml_tokens::{Pallet, Storage, Event<T>, Config<T>} = 50,
this error originates in the macro construct_runtime
(in Nightly builds, run with -Z macro-backtrace for more info)
this error originates in the macro orml_tokens::__substrate_genesis_config_check::is_std_enabled_for_genesis
(in Nightly builds, run with -Z macro-backtrace for more info)
Tokens
does not have the std feature enabled, this will cause the orml_tokens::GenesisConfig
type to be undefined
use codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
#[derive(
Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen,
)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum CurrencyId {
Native,
KSM,
AUSD,
/// A foreign asset
ForeignAsset(ForeignAssetId),
}
pub type ForeignAssetId = u32;
impl Default for CurrencyId {
fn default() -> Self {
CurrencyId::Native
}
}
parameter_type_with_key! {
pub ExistentialDeposits: |currency_id: CurrencyId| -> Balance {
match currency_id {
CurrencyId::Native => ExistentialDeposit::get(),
_ => 0,
}
};
}
pub type IBalance = i128;
impl orml_tokens::Config for Runtime {
type Event = Event;
type Balance = Balance;
type Amount = IBalance;
type CurrencyId = CurrencyId;
type WeightInfo = ();
type ExistentialDeposits = ExistentialDeposits;
type OnDust = ();
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type ReserveIdentifier = [u8; 8];
type DustRemovalWhitelist = frame_support::traits::Nothing;
type OnNewTokenAccount = ();
type OnKilledTokenAccount = ();
}