Skip to content

Commit

Permalink
refactor: use explicit index for pallets
Browse files Browse the repository at this point in the history
  • Loading branch information
sander2 committed Feb 1, 2022
1 parent 3a96a14 commit 82c949c
Show file tree
Hide file tree
Showing 4 changed files with 172 additions and 172 deletions.
92 changes: 46 additions & 46 deletions parachain/runtime/interlay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,68 +1228,68 @@ construct_runtime! {
NodeBlock = primitives::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},
Utility: pallet_utility::{Pallet, Call, Event},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>},
MultiSig: pallet_multisig::{Pallet, Call, Storage, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 0,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1,
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 2,
Utility: pallet_utility::{Pallet, Call, Event} = 3,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 4,
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 5,
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 6,
MultiSig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 7,

// Tokens & Balances
Currency: currency::{Pallet},
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>},
Escrow: escrow::{Pallet, Call, Storage, Event<T>},
Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>},
Currency: currency::{Pallet} = 8,
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>} = 9,
Escrow: escrow::{Pallet, Call, Storage, Event<T>} = 10,
Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 11,

EscrowAnnuity: annuity::<Instance1>::{Pallet, Call, Storage, Event<T>},
EscrowRewards: reward::<Instance1>::{Pallet, Storage, Event<T>},
EscrowAnnuity: annuity::<Instance1>::{Pallet, Call, Storage, Event<T>} = 12,
EscrowRewards: reward::<Instance1>::{Pallet, Storage, Event<T>} = 13,

VaultAnnuity: annuity::<Instance2>::{Pallet, Storage, Event<T>},
VaultRewards: reward::<Instance2>::{Pallet, Storage, Event<T>},
VaultStaking: staking::{Pallet, Storage, Event<T>},
VaultAnnuity: annuity::<Instance2>::{Pallet, Storage, Event<T>} = 14,
VaultRewards: reward::<Instance2>::{Pallet, Storage, Event<T>} = 15,
VaultStaking: staking::{Pallet, Storage, Event<T>} = 16,

Supply: supply::{Pallet, Storage, Call, Event<T>, Config<T>},
Supply: supply::{Pallet, Storage, Call, Event<T>, Config<T>} = 17,

// Bitcoin SPV
BTCRelay: btc_relay::{Pallet, Call, Config<T>, Storage, Event<T>},
Relay: relay::{Pallet, Call, Storage, Event<T>},
BTCRelay: btc_relay::{Pallet, Call, Config<T>, Storage, Event<T>} = 18,
Relay: relay::{Pallet, Call, Storage, Event<T>} = 19,

// Operational
Security: security::{Pallet, Call, Config, Storage, Event<T>},
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned},
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>},
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>},
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>},
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>},
Fee: fee::{Pallet, Call, Config<T>, Storage},
Refund: refund::{Pallet, Call, Config<T>, Storage, Event<T>},
Nomination: nomination::{Pallet, Call, Config, Storage, Event<T>},
Security: security::{Pallet, Call, Config, Storage, Event<T>} = 20,
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned} = 21,
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 22,
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>} = 23,
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>} = 24,
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>} = 25,
Fee: fee::{Pallet, Call, Config<T>, Storage} = 26,
Refund: refund::{Pallet, Call, Config<T>, Storage, Event<T>} = 27,
Nomination: nomination::{Pallet, Call, Config, Storage, Event<T>} = 28,

// Governance
Democracy: democracy::{Pallet, Call, Storage, Config<T>, Event<T>},
TechnicalCommittee: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>},
TechnicalMembership: pallet_membership::{Pallet, Call, Storage, Event<T>, Config<T>},
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>},
Democracy: democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 29,
TechnicalCommittee: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 30,
TechnicalMembership: pallet_membership::{Pallet, Call, Storage, Event<T>, Config<T>} = 31,
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 32,

ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>},
ParachainInfo: parachain_info::{Pallet, Storage, Config},
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>} = 33,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 34,

Authorship: pallet_authorship::{Pallet, Call, Storage},
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>},
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
Aura: pallet_aura::{Pallet, Storage, Config<T>},
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config},
Authorship: pallet_authorship::{Pallet, Call, Storage} = 35,
CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 36,
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 37,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 38,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 39,

// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>},
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin},
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin},
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>},
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 40,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 41,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 42,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 43,

XTokens: orml_xtokens::{Pallet, Storage, Call, Event<T>},
UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event},
XTokens: orml_xtokens::{Pallet, Storage, Call, Event<T>} = 44,
UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event} = 45,
}
}

Expand Down
86 changes: 43 additions & 43 deletions parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1252,65 +1252,65 @@ construct_runtime! {
NodeBlock = primitives::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: frame_system::{Pallet, Call, Storage, Config, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Utility: pallet_utility::{Pallet, Call, Event},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>},
MultiSig: pallet_multisig::{Pallet, Call, Storage, Event<T>},
System: frame_system::{Pallet, Call, Storage, Config, Event<T>} = 0,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1,
Utility: pallet_utility::{Pallet, Call, Event} = 2,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage} = 3,
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>} = 4,
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 5,
MultiSig: pallet_multisig::{Pallet, Call, Storage, Event<T>} = 6,

// Tokens & Balances
Currency: currency::{Pallet},
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>},
Escrow: escrow::{Pallet, Call, Storage, Event<T>},
Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>},
Currency: currency::{Pallet} = 7,
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>} = 8,
Escrow: escrow::{Pallet, Call, Storage, Event<T>} = 9,
Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 10,

EscrowAnnuity: annuity::<Instance1>::{Pallet, Call, Storage, Event<T>},
EscrowRewards: reward::<Instance1>::{Pallet, Storage, Event<T>},
EscrowAnnuity: annuity::<Instance1>::{Pallet, Call, Storage, Event<T>} = 11,
EscrowRewards: reward::<Instance1>::{Pallet, Storage, Event<T>} = 12,

VaultAnnuity: annuity::<Instance2>::{Pallet, Storage, Event<T>},
VaultRewards: reward::<Instance2>::{Pallet, Storage, Event<T>},
VaultStaking: staking::{Pallet, Storage, Event<T>},
VaultAnnuity: annuity::<Instance2>::{Pallet, Storage, Event<T>} = 13,
VaultRewards: reward::<Instance2>::{Pallet, Storage, Event<T>} = 14,
VaultStaking: staking::{Pallet, Storage, Event<T>} = 15,

Supply: supply::{Pallet, Storage, Call, Event<T>, Config<T>},
Supply: supply::{Pallet, Storage, Call, Event<T>, Config<T>} = 16,

// Bitcoin SPV
BTCRelay: btc_relay::{Pallet, Call, Config<T>, Storage, Event<T>},
Relay: relay::{Pallet, Call, Storage, Event<T>},
BTCRelay: btc_relay::{Pallet, Call, Config<T>, Storage, Event<T>} = 17,
Relay: relay::{Pallet, Call, Storage, Event<T>} = 18,

// Operational
Security: security::{Pallet, Call, Config, Storage, Event<T>},
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned},
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>},
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>},
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>},
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>},
Fee: fee::{Pallet, Call, Config<T>, Storage},
Refund: refund::{Pallet, Call, Config<T>, Storage, Event<T>},
Nomination: nomination::{Pallet, Call, Config, Storage, Event<T>},
Security: security::{Pallet, Call, Config, Storage, Event<T>} = 19,
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned} = 20,
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 21,
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>} = 22,
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>} = 23,
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>} = 24,
Fee: fee::{Pallet, Call, Config<T>, Storage} = 25,
Refund: refund::{Pallet, Call, Config<T>, Storage, Event<T>} = 26,
Nomination: nomination::{Pallet, Call, Config, Storage, Event<T>} = 27,

// Governance
Democracy: democracy::{Pallet, Call, Storage, Config<T>, Event<T>},
TechnicalCommittee: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>},
TechnicalMembership: pallet_membership::{Pallet, Call, Storage, Event<T>, Config<T>},
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>},
Democracy: democracy::{Pallet, Call, Storage, Config<T>, Event<T>} = 28,
TechnicalCommittee: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 29,
TechnicalMembership: pallet_membership::{Pallet, Call, Storage, Event<T>, Config<T>} = 30,
Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 31,

ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>},
ParachainInfo: parachain_info::{Pallet, Storage, Config},
ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>} = 32,
ParachainInfo: parachain_info::{Pallet, Storage, Config} = 33,

Authorship: pallet_authorship::{Pallet, Call, Storage},
Aura: pallet_aura::{Pallet, Storage, Config<T>},
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config},
Authorship: pallet_authorship::{Pallet, Call, Storage} = 34,
Aura: pallet_aura::{Pallet, Storage, Config<T>} = 35,
AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 36,

// XCM helpers.
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>},
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin},
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin},
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>},
XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 37,
PolkadotXcm: pallet_xcm::{Pallet, Call, Event<T>, Origin} = 38,
CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 39,
DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 40,

XTokens: orml_xtokens::{Pallet, Storage, Call, Event<T>},
UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event},
XTokens: orml_xtokens::{Pallet, Storage, Call, Event<T>} = 41,
UnknownTokens: orml_unknown_tokens::{Pallet, Storage, Event} = 42,
}
}

Expand Down
Loading

0 comments on commit 82c949c

Please sign in to comment.