Skip to content

Commit

Permalink
Remove Old Construct Runtime Syntax (polkadot-fellows#152)
Browse files Browse the repository at this point in the history
Test

- [x] Does not require a CHANGELOG entry

---------

Co-authored-by: Bastian Köcher <git@kchr.de>
  • Loading branch information
joepetrowski and bkchr authored Jan 31, 2024
1 parent b09faa0 commit 16635f6
Show file tree
Hide file tree
Showing 12 changed files with 296 additions and 294 deletions.
5 changes: 5 additions & 0 deletions chain-spec-generator/src/relay_chain_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ pub fn polkadot_testnet_genesis(
paras: Default::default(),
xcm_pallet: Default::default(),
nomination_pools: Default::default(),
registrar: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -367,6 +369,9 @@ pub fn kusama_testnet_genesis(
xcm_pallet: Default::default(),
nomination_pools: Default::default(),
nis_counterpart_balances: Default::default(),
registrar: Default::default(),
transaction_payment: Default::default(),
society: Default::default(),
}
}

Expand Down
14 changes: 14 additions & 0 deletions chain-spec-generator/src/system_parachains_specs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,9 @@ fn asset_hub_polkadot_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
assets: Default::default(),
foreign_assets: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -267,6 +270,10 @@ fn asset_hub_kusama_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
assets: Default::default(),
foreign_assets: Default::default(),
pool_assets: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -358,6 +365,8 @@ fn collectives_polkadot_genesis(
},
alliance: Default::default(),
alliance_motion: Default::default(),
fellowship_treasury: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -449,6 +458,8 @@ fn bridge_hub_polkadot_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
bridge_kusama_parachains: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -540,6 +551,8 @@ fn bridge_hub_kusama_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
bridge_polkadot_parachains: Default::default(),
transaction_payment: Default::default(),
}
}

Expand Down Expand Up @@ -670,6 +683,7 @@ fn encointer_kusama_genesis(
safe_xcm_version: Some(SAFE_XCM_VERSION),
..Default::default()
},
transaction_payment: Default::default(),
}
}

Expand Down
122 changes: 59 additions & 63 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1508,131 +1508,127 @@ impl pallet_asset_rate::Config for Runtime {
construct_runtime! {
pub enum Runtime
{
// Basic stuff; balances is uncallable initially.
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0,
// Basic stuff.
System: frame_system = 0,

// Babe must be before session.
Babe: pallet_babe::{Pallet, Call, Storage, Config<T>, ValidateUnsigned} = 1,
Babe: pallet_babe = 1,

Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2,
Indices: pallet_indices::{Pallet, Call, Storage, Config<T>, Event<T>} = 3,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 4,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 33,
Timestamp: pallet_timestamp = 2,
Indices: pallet_indices = 3,
Balances: pallet_balances = 4,
TransactionPayment: pallet_transaction_payment = 33,

// Consensus support.
// Authorship must be before session in order to note author in the correct session and era
// for im-online and staking.
Authorship: pallet_authorship::{Pallet, Storage} = 5,
Staking: pallet_staking::{Pallet, Call, Storage, Config<T>, Event<T>} = 6,
Offences: pallet_offences::{Pallet, Storage, Event} = 7,
Historical: session_historical::{Pallet} = 34,
Authorship: pallet_authorship = 5,
Staking: pallet_staking = 6,
Offences: pallet_offences = 7,
Historical: session_historical = 34,

Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 8,
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event, ValidateUnsigned} = 10,
ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 11,
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config<T>} = 12,
Session: pallet_session = 8,
Grandpa: pallet_grandpa = 10,
ImOnline: pallet_im_online = 11,
AuthorityDiscovery: pallet_authority_discovery = 12,

// Governance stuff.
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>} = 18,
ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event<T>} = 20,
Referenda: pallet_referenda::{Pallet, Call, Storage, Event<T>} = 21,
Treasury: pallet_treasury = 18,
ConvictionVoting: pallet_conviction_voting = 20,
Referenda: pallet_referenda = 21,
// pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1;
FellowshipCollective: pallet_ranked_collective::<Instance1>::{
Pallet, Call, Storage, Event<T>
} = 22,
FellowshipCollective: pallet_ranked_collective::<Instance1> = 22,
// pub type FellowshipReferendaInstance = pallet_referenda::Instance2;
FellowshipReferenda: pallet_referenda::<Instance2>::{
Pallet, Call, Storage, Event<T>
} = 23,
Origins: pallet_custom_origins::{Origin} = 43,
Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event<T>} = 44,
FellowshipReferenda: pallet_referenda::<Instance2> = 23,
Origins: pallet_custom_origins = 43,
Whitelist: pallet_whitelist = 44,

// Claims. Usable initially.
Claims: claims::{Pallet, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 19,
Claims: claims = 19,

// Utility module.
Utility: pallet_utility::{Pallet, Call, Event} = 24,
Utility: pallet_utility = 24,

// Less simple identity module.
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 25,
Identity: pallet_identity = 25,

// Society module.
Society: pallet_society::{Pallet, Call, Storage, Event<T>} = 26,
Society: pallet_society = 26,

// Social recovery module.
Recovery: pallet_recovery::{Pallet, Call, Storage, Event<T>} = 27,
Recovery: pallet_recovery = 27,

// Vesting. Usable initially, but removed once all vesting is finished.
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>} = 28,
Vesting: pallet_vesting = 28,

// System scheduler.
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 29,
Scheduler: pallet_scheduler = 29,

// Proxy module. Late addition.
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>} = 30,
Proxy: pallet_proxy = 30,

// Multisig module. Late addition.
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 31,
Multisig: pallet_multisig = 31,

// Preimage registrar.
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>, HoldReason} = 32,
Preimage: pallet_preimage = 32,

// Bounties modules.
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 35,
Bounties: pallet_bounties = 35,
ChildBounties: pallet_child_bounties = 40,

// Election pallet. Only works with staking, but placed here to maintain indices.
ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event<T>, ValidateUnsigned} = 37,
ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 37,

// NIS pallet.
Nis: pallet_nis::{Pallet, Call, Storage, Event<T>, HoldReason} = 38,
Nis: pallet_nis = 38,
NisCounterpartBalances: pallet_balances::<Instance2> = 45,

// Provides a semi-sorted list of nominators for staking.
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>} = 39,
VoterList: pallet_bags_list::<Instance1> = 39,

// nomination pools: extension to staking.
NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, Config<T>, FreezeReason} = 41,
NominationPools: pallet_nomination_pools = 41,

// Fast unstake pallet: extension to staking.
FastUnstake: pallet_fast_unstake = 42,

// Parachains pallets. Start indices at 50 to leave room.
ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50,
Configuration: parachains_configuration::{Pallet, Call, Storage, Config<T>} = 51,
ParasShared: parachains_shared::{Pallet, Call, Storage} = 52,
ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event<T>} = 53,
ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54,
ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55,
Paras: parachains_paras::{Pallet, Call, Storage, Event, Config<T>, ValidateUnsigned} = 56,
Initializer: parachains_initializer::{Pallet, Call, Storage} = 57,
Dmp: parachains_dmp::{Pallet, Storage} = 58,
Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event<T>, Config<T>} = 60,
ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61,
ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event<T>} = 62,
ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63,
ParaAssignmentProvider: parachains_assigner_parachains::{Pallet, Storage} = 64,
ParachainsOrigin: parachains_origin = 50,
Configuration: parachains_configuration = 51,
ParasShared: parachains_shared = 52,
ParaInclusion: parachains_inclusion = 53,
ParaInherent: parachains_paras_inherent = 54,
ParaScheduler: parachains_scheduler = 55,
Paras: parachains_paras = 56,
Initializer: parachains_initializer = 57,
Dmp: parachains_dmp = 58,
Hrmp: parachains_hrmp = 60,
ParaSessionInfo: parachains_session_info = 61,
ParasDisputes: parachains_disputes = 62,
ParasSlashing: parachains_slashing = 63,
ParaAssignmentProvider: parachains_assigner_parachains = 64,

// Parachain Onboarding Pallets. Start indices at 70 to leave room.
Registrar: paras_registrar::{Pallet, Call, Storage, Event<T>} = 70,
Slots: slots::{Pallet, Call, Storage, Event<T>} = 71,
Auctions: auctions::{Pallet, Call, Storage, Event<T>} = 72,
Crowdloan: crowdloan::{Pallet, Call, Storage, Event<T>} = 73,
Registrar: paras_registrar = 70,
Slots: slots = 71,
Auctions: auctions = 72,
Crowdloan: crowdloan = 73,

// State trie migration pallet, only temporary.
StateTrieMigration: pallet_state_trie_migration = 98,

// Pallet for sending XCM.
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin, Config<T>} = 99,
XcmPallet: pallet_xcm = 99,

// Generalized message queue
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>} = 100,
MessageQueue: pallet_message_queue = 100,

// Asset rate.
AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event<T>} = 101,
AssetRate: pallet_asset_rate = 101,

// BEEFY Bridges support.
Beefy: pallet_beefy::{Pallet, Call, Storage, Config<T>, ValidateUnsigned} = 200,
Beefy: pallet_beefy = 200,
// MMR leaf construction must be after session in order to have a leaf's next_auth_set
// refer to block<N>. See issue #160 for details.
Mmr: pallet_mmr = 201,
Expand Down
Loading

0 comments on commit 16635f6

Please sign in to comment.