mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 02:21:04 +00:00
Companion: Handle construct_runtime breaking change. (#1692)
* use construct_runtime index * fix * "Update Substrate" Co-authored-by: parity-processbot <>
This commit is contained in:
committed by
GitHub
parent
1934a74cc7
commit
944e192532
Generated
+135
-135
File diff suppressed because it is too large
Load Diff
@@ -1,40 +0,0 @@
|
|||||||
// Copyright 2020 Parity Technologies (UK) Ltd.
|
|
||||||
// This file is part of Polkadot.
|
|
||||||
|
|
||||||
// Polkadot is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
|
|
||||||
// Polkadot is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
//! A dummy module for holding place of modules in a runtime.
|
|
||||||
|
|
||||||
use frame_support::{decl_module, decl_storage, decl_event};
|
|
||||||
|
|
||||||
pub trait Trait<I: Instance = DefaultInstance>: frame_system::Trait {
|
|
||||||
type Event: Into<<Self as frame_system::Trait>::Event>;
|
|
||||||
}
|
|
||||||
|
|
||||||
decl_module! {
|
|
||||||
pub struct Module<T: Trait<I>, I: Instance = DefaultInstance> for enum Call where origin: T::Origin {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
decl_storage! {
|
|
||||||
trait Store for Module<T: Trait<I>, I: Instance = DefaultInstance> as Dummy { }
|
|
||||||
}
|
|
||||||
|
|
||||||
decl_event!{
|
|
||||||
pub enum Event<T, I: Instance = DefaultInstance> where
|
|
||||||
<T as frame_system::Trait>::AccountId
|
|
||||||
{
|
|
||||||
Dummy(AccountId),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,8 +26,6 @@ pub mod purchase;
|
|||||||
pub mod impls;
|
pub mod impls;
|
||||||
pub mod paras_sudo_wrapper;
|
pub mod paras_sudo_wrapper;
|
||||||
|
|
||||||
pub mod dummy;
|
|
||||||
|
|
||||||
use primitives::v1::{BlockNumber, ValidatorId};
|
use primitives::v1::{BlockNumber, ValidatorId};
|
||||||
use sp_runtime::{Perquintill, Perbill, FixedPointNumber, traits::Saturating};
|
use sp_runtime::{Perquintill, Perbill, FixedPointNumber, traits::Saturating};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ use primitives::v1::{
|
|||||||
CommittedCandidateReceipt, PersistedValidationData, GroupRotationInfo, ValidationCode,
|
CommittedCandidateReceipt, PersistedValidationData, GroupRotationInfo, ValidationCode,
|
||||||
};
|
};
|
||||||
use runtime_common::{
|
use runtime_common::{
|
||||||
dummy, claims, SlowAdjustingFeeUpdate,
|
claims, SlowAdjustingFeeUpdate,
|
||||||
impls::{CurrencyToVoteHandler, ToAuthor},
|
impls::{CurrencyToVoteHandler, ToAuthor},
|
||||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||||
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
||||||
@@ -786,10 +786,6 @@ parameter_types! {
|
|||||||
pub const MaxPending: u16 = 32;
|
pub const MaxPending: u16 = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: frame_support::traits::Instance> dummy::Trait<I> for Runtime {
|
|
||||||
type Event = Event;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The type used to represent the kinds of proxying allowed.
|
/// The type used to represent the kinds of proxying allowed.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)]
|
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)]
|
||||||
pub enum ProxyType {
|
pub enum ProxyType {
|
||||||
@@ -828,10 +824,6 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::TechnicalMembership(..) |
|
Call::TechnicalMembership(..) |
|
||||||
Call::Treasury(..) |
|
Call::Treasury(..) |
|
||||||
Call::Claims(..) |
|
Call::Claims(..) |
|
||||||
Call::DummyParachains(..) |
|
|
||||||
Call::DummyAttestations(..) |
|
|
||||||
Call::DummySlots(..) |
|
|
||||||
Call::DummyRegistrar(..) |
|
|
||||||
Call::Utility(..) |
|
Call::Utility(..) |
|
||||||
Call::Identity(..) |
|
Call::Identity(..) |
|
||||||
Call::Society(..) |
|
Call::Society(..) |
|
||||||
@@ -891,11 +883,34 @@ impl pallet_proxy::Trait for Runtime {
|
|||||||
pub struct CustomOnRuntimeUpgrade;
|
pub struct CustomOnRuntimeUpgrade;
|
||||||
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
|
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||||
if pallet_scheduler::Module::<Runtime>::migrate_v1_to_t2() {
|
// Update scheduler origin usage
|
||||||
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
|
#[derive(Encode, Decode)]
|
||||||
} else {
|
#[allow(non_camel_case_types)]
|
||||||
<Runtime as frame_system::Trait>::DbWeight::get().reads(1) + 500_000_000
|
pub enum OldOriginCaller {
|
||||||
|
system(frame_system::Origin<Runtime>),
|
||||||
|
pallet_collective_Instance1(
|
||||||
|
pallet_collective::Origin<Runtime, pallet_collective::Instance1>
|
||||||
|
),
|
||||||
|
pallet_collective_Instance2(
|
||||||
|
pallet_collective::Origin<Runtime, pallet_collective::Instance2>
|
||||||
|
),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Into<OriginCaller> for OldOriginCaller {
|
||||||
|
fn into(self) -> OriginCaller {
|
||||||
|
match self {
|
||||||
|
OldOriginCaller::system(o) => OriginCaller::system(o),
|
||||||
|
OldOriginCaller::pallet_collective_Instance1(o) =>
|
||||||
|
OriginCaller::pallet_collective_Instance1(o),
|
||||||
|
OldOriginCaller::pallet_collective_Instance2(o) =>
|
||||||
|
OriginCaller::pallet_collective_Instance2(o),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pallet_scheduler::Module::<Runtime>::migrate_origin::<OldOriginCaller>();
|
||||||
|
|
||||||
|
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -906,68 +921,62 @@ construct_runtime! {
|
|||||||
UncheckedExtrinsic = UncheckedExtrinsic
|
UncheckedExtrinsic = UncheckedExtrinsic
|
||||||
{
|
{
|
||||||
// Basic stuff; balances is uncallable initially.
|
// Basic stuff; balances is uncallable initially.
|
||||||
System: frame_system::{Module, Call, Storage, Config, Event<T>},
|
System: frame_system::{Module, Call, Storage, Config, Event<T>} = 0,
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage} = 32,
|
||||||
|
|
||||||
// Must be before session.
|
// Must be before session.
|
||||||
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
|
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned} = 1,
|
||||||
|
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 2,
|
||||||
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
|
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>} = 3,
|
||||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>} = 4,
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage} = 33,
|
||||||
|
|
||||||
// Consensus support.
|
// Consensus support.
|
||||||
Authorship: pallet_authorship::{Module, Call, Storage},
|
Authorship: pallet_authorship::{Module, Call, Storage} = 5,
|
||||||
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned},
|
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned} = 6,
|
||||||
Offences: pallet_offences::{Module, Call, Storage, Event},
|
Offences: pallet_offences::{Module, Call, Storage, Event} = 7,
|
||||||
Historical: session_historical::{Module},
|
Historical: session_historical::{Module} = 34,
|
||||||
Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
|
Session: pallet_session::{Module, Call, Storage, Event, Config<T>} = 8,
|
||||||
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent},
|
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent} = 9,
|
||||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
|
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned} = 10,
|
||||||
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
|
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 11,
|
||||||
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
|
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config} = 12,
|
||||||
|
|
||||||
// Governance stuff; uncallable initially.
|
// Governance stuff; uncallable initially.
|
||||||
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event<T>},
|
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event<T>} = 13,
|
||||||
Council: pallet_collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
|
Council: pallet_collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>} = 14,
|
||||||
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
|
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>} = 15,
|
||||||
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>},
|
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>} = 16,
|
||||||
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>},
|
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>} = 17,
|
||||||
Treasury: pallet_treasury::{Module, Call, Storage, Event<T>},
|
Treasury: pallet_treasury::{Module, Call, Storage, Event<T>} = 18,
|
||||||
|
|
||||||
// Claims. Usable initially.
|
// Claims. Usable initially.
|
||||||
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned},
|
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 19,
|
||||||
|
|
||||||
// Old parachains stuff. All dummies to avoid messing up the transaction indices.
|
|
||||||
DummyParachains: dummy::<Instance0>::{Module, Call},
|
|
||||||
DummyAttestations: dummy::<Instance1>::{Module, Call},
|
|
||||||
DummySlots: dummy::<Instance2>::{Module, Call, Event<T>},
|
|
||||||
DummyRegistrar: dummy::<Instance3>::{Module, Call, Event<T>},
|
|
||||||
|
|
||||||
// Utility module.
|
// Utility module.
|
||||||
Utility: pallet_utility::{Module, Call, Event},
|
Utility: pallet_utility::{Module, Call, Event} = 24,
|
||||||
|
|
||||||
// Less simple identity module.
|
// Less simple identity module.
|
||||||
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
|
Identity: pallet_identity::{Module, Call, Storage, Event<T>} = 25,
|
||||||
|
|
||||||
// Society module.
|
// Society module.
|
||||||
Society: pallet_society::{Module, Call, Storage, Event<T>},
|
Society: pallet_society::{Module, Call, Storage, Event<T>} = 26,
|
||||||
|
|
||||||
// Social recovery module.
|
// Social recovery module.
|
||||||
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>},
|
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>} = 27,
|
||||||
|
|
||||||
// Vesting. Usable initially, but removed once all vesting is finished.
|
// Vesting. Usable initially, but removed once all vesting is finished.
|
||||||
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>},
|
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>} = 28,
|
||||||
|
|
||||||
// System scheduler.
|
// System scheduler.
|
||||||
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>},
|
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>} = 29,
|
||||||
|
|
||||||
// Proxy module. Late addition.
|
// Proxy module. Late addition.
|
||||||
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>},
|
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>} = 30,
|
||||||
|
|
||||||
// Multisig module. Late addition.
|
// Multisig module. Late addition.
|
||||||
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>},
|
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>} = 31,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
#![recursion_limit="256"]
|
#![recursion_limit="256"]
|
||||||
|
|
||||||
use runtime_common::{
|
use runtime_common::{
|
||||||
dummy, claims, SlowAdjustingFeeUpdate,
|
claims, SlowAdjustingFeeUpdate,
|
||||||
impls::{CurrencyToVoteHandler, ToAuthor},
|
impls::{CurrencyToVoteHandler, ToAuthor},
|
||||||
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
NegativeImbalance, BlockHashCount, MaximumBlockWeight, AvailableBlockRatio,
|
||||||
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
MaximumBlockLength, BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight,
|
||||||
@@ -112,11 +112,6 @@ pub struct BaseFilter;
|
|||||||
impl Filter<Call> for BaseFilter {
|
impl Filter<Call> for BaseFilter {
|
||||||
fn filter(call: &Call) -> bool {
|
fn filter(call: &Call) -> bool {
|
||||||
match call {
|
match call {
|
||||||
// Parachains stuff
|
|
||||||
Call::DummyParachains(_) | Call::DummyAttestations(_) | Call::DummySlots(_) | Call::DummyRegistrar(_) |
|
|
||||||
Call::DummyPurchase(_) =>
|
|
||||||
false,
|
|
||||||
|
|
||||||
// These modules are all allowed to be called by transactions:
|
// These modules are all allowed to be called by transactions:
|
||||||
Call::Democracy(_) | Call::Council(_) | Call::TechnicalCommittee(_) |
|
Call::Democracy(_) | Call::Council(_) | Call::TechnicalCommittee(_) |
|
||||||
Call::TechnicalMembership(_) | Call::Treasury(_) | Call::ElectionsPhragmen(_) |
|
Call::TechnicalMembership(_) | Call::Treasury(_) | Call::ElectionsPhragmen(_) |
|
||||||
@@ -778,10 +773,6 @@ parameter_types! {
|
|||||||
pub const MaxPending: u16 = 32;
|
pub const MaxPending: u16 = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: frame_support::traits::Instance> dummy::Trait<I> for Runtime {
|
|
||||||
type Event = Event;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// The type used to represent the kinds of proxying allowed.
|
/// The type used to represent the kinds of proxying allowed.
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)]
|
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug)]
|
||||||
pub enum ProxyType {
|
pub enum ProxyType {
|
||||||
@@ -851,10 +842,6 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::ElectionsPhragmen(..) |
|
Call::ElectionsPhragmen(..) |
|
||||||
Call::TechnicalMembership(..) |
|
Call::TechnicalMembership(..) |
|
||||||
Call::Treasury(..) |
|
Call::Treasury(..) |
|
||||||
Call::DummyParachains(..) |
|
|
||||||
Call::DummyAttestations(..) |
|
|
||||||
Call::DummySlots(..) |
|
|
||||||
Call::DummyRegistrar(..) |
|
|
||||||
Call::Claims(..) |
|
Call::Claims(..) |
|
||||||
Call::Vesting(pallet_vesting::Call::vest(..)) |
|
Call::Vesting(pallet_vesting::Call::vest(..)) |
|
||||||
Call::Vesting(pallet_vesting::Call::vest_other(..)) |
|
Call::Vesting(pallet_vesting::Call::vest_other(..)) |
|
||||||
@@ -906,7 +893,36 @@ impl pallet_proxy::Trait for Runtime {
|
|||||||
pub struct CustomOnRuntimeUpgrade;
|
pub struct CustomOnRuntimeUpgrade;
|
||||||
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
|
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
|
||||||
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
fn on_runtime_upgrade() -> frame_support::weights::Weight {
|
||||||
purchase::remove_pallet::<Runtime>()
|
purchase::remove_pallet::<Runtime>();
|
||||||
|
|
||||||
|
// Update scheduler origin usage
|
||||||
|
#[derive(Encode, Decode)]
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
|
pub enum OldOriginCaller {
|
||||||
|
system(frame_system::Origin<Runtime>),
|
||||||
|
pallet_collective_Instance1(
|
||||||
|
pallet_collective::Origin<Runtime, pallet_collective::Instance1>
|
||||||
|
),
|
||||||
|
pallet_collective_Instance2(
|
||||||
|
pallet_collective::Origin<Runtime, pallet_collective::Instance2>
|
||||||
|
),
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Into<OriginCaller> for OldOriginCaller {
|
||||||
|
fn into(self) -> OriginCaller {
|
||||||
|
match self {
|
||||||
|
OldOriginCaller::system(o) => OriginCaller::system(o),
|
||||||
|
OldOriginCaller::pallet_collective_Instance1(o) =>
|
||||||
|
OriginCaller::pallet_collective_Instance1(o),
|
||||||
|
OldOriginCaller::pallet_collective_Instance2(o) =>
|
||||||
|
OriginCaller::pallet_collective_Instance2(o),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pallet_scheduler::Module::<Runtime>::migrate_origin::<OldOriginCaller>();
|
||||||
|
|
||||||
|
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -917,61 +933,52 @@ construct_runtime! {
|
|||||||
UncheckedExtrinsic = UncheckedExtrinsic
|
UncheckedExtrinsic = UncheckedExtrinsic
|
||||||
{
|
{
|
||||||
// Basic stuff; balances is uncallable initially.
|
// Basic stuff; balances is uncallable initially.
|
||||||
System: frame_system::{Module, Call, Storage, Config, Event<T>},
|
System: frame_system::{Module, Call, Storage, Config, Event<T>} = 0,
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage} = 31,
|
||||||
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>},
|
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>} = 1,
|
||||||
|
|
||||||
// Must be before session.
|
// Must be before session.
|
||||||
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
|
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned} = 2,
|
||||||
|
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 3,
|
||||||
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
|
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>} = 4,
|
||||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>} = 5,
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage} = 32,
|
||||||
|
|
||||||
// Consensus support.
|
// Consensus support.
|
||||||
Authorship: pallet_authorship::{Module, Call, Storage},
|
Authorship: pallet_authorship::{Module, Call, Storage} = 6,
|
||||||
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned},
|
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned} = 7,
|
||||||
Offences: pallet_offences::{Module, Call, Storage, Event},
|
Offences: pallet_offences::{Module, Call, Storage, Event} = 8,
|
||||||
Historical: session_historical::{Module},
|
Historical: session_historical::{Module} = 33,
|
||||||
Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
|
Session: pallet_session::{Module, Call, Storage, Event, Config<T>} = 9,
|
||||||
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent},
|
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent} = 10,
|
||||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
|
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned} = 11,
|
||||||
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
|
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 12,
|
||||||
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
|
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config} = 13,
|
||||||
|
|
||||||
// Governance stuff.
|
// Governance stuff.
|
||||||
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event<T>},
|
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event<T>} = 14,
|
||||||
Council: pallet_collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
|
Council: pallet_collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>} = 15,
|
||||||
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
|
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>} = 16,
|
||||||
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>},
|
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>} = 17,
|
||||||
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>},
|
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>} = 18,
|
||||||
Treasury: pallet_treasury::{Module, Call, Storage, Event<T>},
|
Treasury: pallet_treasury::{Module, Call, Storage, Event<T>} = 19,
|
||||||
|
|
||||||
// Old parachains stuff. All dummies to avoid messing up the transaction indices.
|
|
||||||
DummyParachains: dummy::<Instance0>::{Module, Call},
|
|
||||||
DummyAttestations: dummy::<Instance1>::{Module, Call},
|
|
||||||
DummySlots: dummy::<Instance2>::{Module, Call, Event<T>},
|
|
||||||
DummyRegistrar: dummy::<Instance3>::{Module, Call, Event<T>},
|
|
||||||
|
|
||||||
// Claims. Usable initially.
|
// Claims. Usable initially.
|
||||||
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned},
|
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned} = 24,
|
||||||
// Vesting. Usable initially, but removed once all vesting is finished.
|
// Vesting. Usable initially, but removed once all vesting is finished.
|
||||||
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>},
|
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>} = 25,
|
||||||
// Cunning utilities. Usable initially.
|
// Cunning utilities. Usable initially.
|
||||||
Utility: pallet_utility::{Module, Call, Event},
|
Utility: pallet_utility::{Module, Call, Event} = 26,
|
||||||
|
|
||||||
// Old spot for the purchase pallet. Can be replaced later by a new pallet.
|
|
||||||
DummyPurchase: dummy::<Instance4>::{Module, Call, Event<T>},
|
|
||||||
|
|
||||||
// Identity. Late addition.
|
// Identity. Late addition.
|
||||||
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
|
Identity: pallet_identity::{Module, Call, Storage, Event<T>} = 28,
|
||||||
|
|
||||||
// Proxy module. Late addition.
|
// Proxy module. Late addition.
|
||||||
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>},
|
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>} = 29,
|
||||||
|
|
||||||
// Multisig dispatch. Late addition.
|
// Multisig dispatch. Late addition.
|
||||||
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>},
|
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>} = 30,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ use primitives::v1::{
|
|||||||
CommittedCandidateReceipt, PersistedValidationData, GroupRotationInfo, ValidationCode,
|
CommittedCandidateReceipt, PersistedValidationData, GroupRotationInfo, ValidationCode,
|
||||||
};
|
};
|
||||||
use runtime_common::{
|
use runtime_common::{
|
||||||
dummy, purchase, SlowAdjustingFeeUpdate,
|
purchase, SlowAdjustingFeeUpdate,
|
||||||
impls::{CurrencyToVoteHandler, ToAuthor},
|
impls::{CurrencyToVoteHandler, ToAuthor},
|
||||||
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio, MaximumBlockLength,
|
BlockHashCount, MaximumBlockWeight, AvailableBlockRatio, MaximumBlockLength,
|
||||||
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, MaximumExtrinsicWeight,
|
BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, MaximumExtrinsicWeight,
|
||||||
@@ -590,9 +590,6 @@ impl InstanceFilter<Call> for ProxyType {
|
|||||||
Call::Grandpa(..) |
|
Call::Grandpa(..) |
|
||||||
Call::ImOnline(..) |
|
Call::ImOnline(..) |
|
||||||
Call::AuthorityDiscovery(..) |
|
Call::AuthorityDiscovery(..) |
|
||||||
Call::DummyParachains(..) |
|
|
||||||
Call::DummyAttestations(..) |
|
|
||||||
Call::DummyRegistrar(..) |
|
|
||||||
Call::Utility(..) |
|
Call::Utility(..) |
|
||||||
Call::Identity(..) |
|
Call::Identity(..) |
|
||||||
Call::Recovery(pallet_recovery::Call::as_recovered(..)) |
|
Call::Recovery(pallet_recovery::Call::as_recovered(..)) |
|
||||||
@@ -650,10 +647,6 @@ impl pallet_proxy::Trait for Runtime {
|
|||||||
type AnnouncementDepositFactor = AnnouncementDepositFactor;
|
type AnnouncementDepositFactor = AnnouncementDepositFactor;
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<I: frame_support::traits::Instance> dummy::Trait<I> for Runtime {
|
|
||||||
type Event = Event;
|
|
||||||
}
|
|
||||||
|
|
||||||
construct_runtime! {
|
construct_runtime! {
|
||||||
pub enum Runtime where
|
pub enum Runtime where
|
||||||
Block = Block,
|
Block = Block,
|
||||||
@@ -661,56 +654,51 @@ construct_runtime! {
|
|||||||
UncheckedExtrinsic = UncheckedExtrinsic
|
UncheckedExtrinsic = UncheckedExtrinsic
|
||||||
{
|
{
|
||||||
// Basic stuff; balances is uncallable initially.
|
// Basic stuff; balances is uncallable initially.
|
||||||
System: frame_system::{Module, Call, Storage, Config, Event<T>},
|
System: frame_system::{Module, Call, Storage, Config, Event<T>} = 0,
|
||||||
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage},
|
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage} = 25,
|
||||||
|
|
||||||
// Must be before session.
|
// Must be before session.
|
||||||
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
|
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned} = 1,
|
||||||
|
|
||||||
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
|
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent} = 2,
|
||||||
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
|
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>} = 3,
|
||||||
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
|
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>} = 4,
|
||||||
TransactionPayment: pallet_transaction_payment::{Module, Storage},
|
TransactionPayment: pallet_transaction_payment::{Module, Storage} = 26,
|
||||||
|
|
||||||
// Consensus support.
|
// Consensus support.
|
||||||
Authorship: pallet_authorship::{Module, Call, Storage},
|
Authorship: pallet_authorship::{Module, Call, Storage} = 5,
|
||||||
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned},
|
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned} = 6,
|
||||||
Offences: pallet_offences::{Module, Call, Storage, Event},
|
Offences: pallet_offences::{Module, Call, Storage, Event} = 7,
|
||||||
Historical: session_historical::{Module},
|
Historical: session_historical::{Module} = 27,
|
||||||
Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
|
Session: pallet_session::{Module, Call, Storage, Event, Config<T>} = 8,
|
||||||
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent},
|
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent} = 9,
|
||||||
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
|
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned} = 10,
|
||||||
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
|
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>} = 11,
|
||||||
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
|
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config} = 12,
|
||||||
|
|
||||||
// Old Parachains stuff. All dummies to avoid messing up the transaction indices.
|
|
||||||
DummyParachains: dummy::<Instance0>::{Module, Call},
|
|
||||||
DummyAttestations: dummy::<Instance1>::{Module, Call},
|
|
||||||
DummyRegistrar: dummy::<Instance2>::{Module, Call, Event<T>},
|
|
||||||
|
|
||||||
// Utility module.
|
// Utility module.
|
||||||
Utility: pallet_utility::{Module, Call, Event},
|
Utility: pallet_utility::{Module, Call, Event} = 16,
|
||||||
|
|
||||||
// Less simple identity module.
|
// Less simple identity module.
|
||||||
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
|
Identity: pallet_identity::{Module, Call, Storage, Event<T>} = 17,
|
||||||
|
|
||||||
// Social recovery module.
|
// Social recovery module.
|
||||||
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>},
|
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>} = 18,
|
||||||
|
|
||||||
// Vesting. Usable initially, but removed once all vesting is finished.
|
// Vesting. Usable initially, but removed once all vesting is finished.
|
||||||
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>},
|
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>} = 19,
|
||||||
|
|
||||||
// System scheduler.
|
// System scheduler.
|
||||||
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>},
|
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>} = 20,
|
||||||
|
|
||||||
// Sudo.
|
// Sudo.
|
||||||
Sudo: pallet_sudo::{Module, Call, Storage, Event<T>, Config<T>},
|
Sudo: pallet_sudo::{Module, Call, Storage, Event<T>, Config<T>} = 21,
|
||||||
|
|
||||||
// Proxy module. Late addition.
|
// Proxy module. Late addition.
|
||||||
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>},
|
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>} = 22,
|
||||||
|
|
||||||
// Multisig module. Late addition.
|
// Multisig module. Late addition.
|
||||||
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>},
|
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>} = 23,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user