frame_support_test_compile_pass/
lib.rs
1#![cfg_attr(not(feature = "std"), no_std)]
22
23extern crate alloc;
24
25use frame_support::{
26 construct_runtime, derive_impl, parameter_types,
27 traits::{ConstU16, ConstU32, ConstU64, Everything},
28};
29use sp_core::{sr25519, H256};
30use sp_runtime::{
31 generic,
32 traits::{BlakeTwo256, IdentityLookup, Verify},
33};
34use sp_version::RuntimeVersion;
35
36pub const VERSION: RuntimeVersion = RuntimeVersion {
37 spec_name: alloc::borrow::Cow::Borrowed("frame-support-test-compile-pass"),
38 impl_name: alloc::borrow::Cow::Borrowed("substrate-frame-support-test-compile-pass-runtime"),
39 authoring_version: 0,
40 spec_version: 0,
41 impl_version: 0,
42 apis: sp_version::create_apis_vec!([]),
43 transaction_version: 0,
44 system_version: 0,
45};
46
47pub type Signature = sr25519::Signature;
48pub type AccountId = <Signature as Verify>::Signer;
49pub type BlockNumber = u64;
50
51parameter_types! {
52 pub const Version: RuntimeVersion = VERSION;
53}
54
55#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
56impl frame_system::Config for Runtime {
57 type BaseCallFilter = Everything;
58 type BlockWeights = ();
59 type BlockLength = ();
60 type Nonce = u128;
61 type Hash = H256;
62 type Hashing = BlakeTwo256;
63 type Block = Block;
64 type Lookup = IdentityLookup<Self::AccountId>;
65 type BlockHashCount = ConstU64<2400>;
66 type Version = Version;
67 type AccountData = ();
68 type RuntimeOrigin = RuntimeOrigin;
69 type AccountId = AccountId;
70 type RuntimeEvent = RuntimeEvent;
71 type PalletInfo = PalletInfo;
72 type RuntimeCall = RuntimeCall;
73 type DbWeight = ();
74 type OnNewAccount = ();
75 type OnKilledAccount = ();
76 type OnSetCode = ();
77 type MaxConsumers = ConstU32<16>;
78 type SystemWeightInfo = ();
79 type SS58Prefix = ConstU16<0>;
80}
81
82pub type Header = generic::Header<BlockNumber, BlakeTwo256>;
83pub type Block = generic::Block<Header, UncheckedExtrinsic>;
84pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
85
86construct_runtime!(
87 pub enum Runtime {
88 System: frame_system,
89 }
90);