use pezframe::{ deps::{pezframe_support::weights::constants::RocksDbWeight, pezframe_system::GenesisConfig}, prelude::*, runtime::prelude::*, testing_prelude::*, }; // Configure a mock runtime to test the pezpallet. #[frame_construct_runtime] mod test_runtime { #[runtime::runtime] #[runtime::derive( RuntimeCall, RuntimeEvent, RuntimeError, RuntimeOrigin, RuntimeFreezeReason, RuntimeHoldReason, RuntimeSlashReason, RuntimeLockId, RuntimeTask, RuntimeViewFunction )] pub struct Test; #[runtime::pezpallet_index(0)] pub type System = pezframe_system; #[runtime::pezpallet_index(1)] pub type Template = crate; } #[derive_impl(pezframe_system::config_preludes::TestDefaultConfig)] impl pezframe_system::Config for Test { type Nonce = u64; type Block = MockBlock; type BlockHashCount = ConstU64<250>; type DbWeight = RocksDbWeight; } impl crate::Config for Test { type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } // Build genesis storage according to the mock runtime. pub fn new_test_ext() -> TestState { GenesisConfig::::default().build_storage().unwrap().into() }