difftreelog
refactor use derive_impl for frame_system::Config
in: master
1 file changed
runtime/common/config/substrate.rsdiffbeforeafterboth25 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},25 constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight},26 ConstantMultiplier,26 ConstantMultiplier,27 },27 },28 PalletId,28 PalletId, derive_impl,29};29};30use frame_system::{30use frame_system::{31 limits::{BlockLength, BlockWeights},31 limits::{BlockLength, BlockWeights},43use crate::{43use crate::{44 runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,44 runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,45 RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System,45 RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System,46 Treasury, Version,46 Treasury, Version, RuntimeTask,47};47};484849parameter_types! {49parameter_types! {72 .build_or_panic();72 .build_or_panic();73}73}747475#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]75impl frame_system::Config for Runtime {76impl frame_system::Config for Runtime {76 /// The data to be stored in an account.77 /// The data to be stored in an account.77 type AccountData = pallet_balances::AccountData<Balance>;78 type AccountData = pallet_balances::AccountData<Balance>;78 /// The identifier used to distinguish between accounts.79 /// The identifier used to distinguish between accounts.79 type AccountId = AccountId;80 type AccountId = AccountId;80 /// The basic call filter to use in dispatchable.81 type BaseCallFilter = Everything;82 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).81 /// Maximum number of block number to block hash mappings to keep (oldest pruned first).83 type BlockHashCount = BlockHashCount;82 type BlockHashCount = BlockHashCount;84 /// The block type.83 /// The block type.87 type BlockLength = RuntimeBlockLength;86 type BlockLength = RuntimeBlockLength;88 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.87 /// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.89 type BlockWeights = RuntimeBlockWeights;88 type BlockWeights = RuntimeBlockWeights;90 /// The aggregated dispatch type that is available for extrinsics.91 type RuntimeCall = RuntimeCall;92 /// The weight of database operations that the runtime can invoke.89 /// The weight of database operations that the runtime can invoke.93 type DbWeight = RocksDbWeight;90 type DbWeight = RocksDbWeight;94 /// The ubiquitous event type.95 type RuntimeEvent = RuntimeEvent;96 /// The type for hashing blocks and tries.91 /// The type for hashing blocks and tries.97 type Hash = Hash;92 type Hash = Hash;98 /// The hashing algorithm used.93 /// The hashing algorithm used.101 type Nonce = Nonce;96 type Nonce = Nonce;102 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.97 /// The lookup mechanism to get account ID from whatever is passed in dispatchers.103 type Lookup = AccountIdLookup<AccountId, ()>;98 type Lookup = AccountIdLookup<AccountId, ()>;104 /// What to do if an account is fully reaped from the system.105 type OnKilledAccount = ();106 /// What to do if a new account is created.107 type OnNewAccount = ();108 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;99 type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;109 /// The ubiquitous origin type.100 /// The ubiquitous origin type.110 type RuntimeOrigin = RuntimeOrigin;101 type RuntimeOrigin = RuntimeOrigin;118 type Version = Version;109 type Version = Version;119 type MaxConsumers = ConstU32<16>;110 type MaxConsumers = ConstU32<16>;120121 type RuntimeTask = ();122123 type SingleBlockMigrations = ();124 type MultiBlockMigrator = ();125 type PreInherents = ();126 type PostInherents = ();127 type PostTransactions = ();128}111}129112130parameter_types! {113parameter_types! {