Files
pezkuwi-sdk/templates/teyrchain/pezpallets/template/src/mock.rs
T
pezkuwichain cf463fe8ee FAZ 1 Complete: Workspace compile fixes, warning cleanup, version bumps
- Fixed is_using_frame_crate() macro to check for pezframe/pezkuwi_sdk
- Removed disable_pezframe_system_supertrait_check temporary bypasses
- Feature-gated storage-benchmark and teyrchain-benchmarks code
- Fixed dead_code warnings with underscore prefix (_Header)
- Removed unused imports and shadowing use statements
- Version bumps: procedural-tools 10.0.1, benchmarking-cli 32.0.1,
  docs 0.0.2, minimal-runtime 0.0.1, yet-another-teyrchain 0.6.1, umbrella 0.1.2
- Updated MAINNET_ROADMAP.md with FAZ 1 completion status
2026-01-02 11:41:09 +03:00

49 lines
1.1 KiB
Rust

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<Test>;
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::<Test>::default().build_storage().unwrap().into()
}