Why I have this Error?

Tokens: orml_tokens::{Pallet, Storage, Event<T>, Config<T>} = 50,

enter image description here

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;

    Clone, Copy, PartialOrd, Ord, PartialEq, Eq, Debug, Encode, Decode, TypeInfo, MaxEncodedLen,
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub enum CurrencyId {


    /// A foreign asset

pub type ForeignAssetId = u32;

impl Default for CurrencyId {
    fn default() -> Self {

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 = ();
  • 1
    Could you link your repo?Or Cargo.toml,I think there is an error in it.
    – Guantong
    Oct 1, 2022 at 0:03
  • 1
    Please paste the output here. Don't use a screenshot. Oct 1, 2022 at 0:48

1 Answer 1


Any pallets that are added to the runtime needs to be no_std enabled

Have a look at how we(or any other chain) implemented it

Check your Cargo file and make sure you configured it correctly

  • yes!!! finally after adding "orml-tokens/std" to cargo toml it works!!!
    – rust.dev
    Oct 1, 2022 at 11:14

Your Answer

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

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