Unalias Substrate Imports (#1530)

* cargo.toml updates

* session and system

* more

* more

* more

* more

* more

* fix

* compiles

* fix tests

* fix more tests

* fix mock

* fix deleted space

* Update validation/Cargo.toml

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Update Cargo.lock

* update rococo

* remove unused warning

* update add benchmarks

* rename weight file

* forgot a file

* Update chain_spec.rs

* Revert "remove unused warning"

This reverts commit 4227cd0d1525286fb466dccb817564c9b37f8645.

* fix merge

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Shawn Tabrizi
2020-08-04 15:23:33 +02:00
committed by GitHub
parent c01aa8bae8
commit 73f09e5154
54 changed files with 1680 additions and 1690 deletions
+80 -80
View File
@@ -26,44 +26,44 @@ sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master
sp-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
version = { package = "sp-version", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-version = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
tx-pool-api = { package = "sp-transaction-pool", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
block-builder-api = { package = "sp-block-builder", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
authority-discovery = { package = "pallet-authority-discovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
authorship = { package = "pallet-authorship", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
babe = { package = "pallet-babe", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
balances = { package = "pallet-balances", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
transaction-payment = { package = "pallet-transaction-payment", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
transaction-payment-rpc-runtime-api = { package = "pallet-transaction-payment-rpc-runtime-api", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
collective = { package = "pallet-collective", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
democracy = { package = "pallet-democracy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
executive = { package = "frame-executive", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
finality-tracker = { package = "pallet-finality-tracker", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
grandpa = { package = "pallet-grandpa", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
identity = { package = "pallet-identity", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
im-online = { package = "pallet-im-online", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
indices = { package = "pallet-indices", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
membership = { package = "pallet-membership", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
multisig = { package = "pallet-multisig", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
nicks = { package = "pallet-nicks", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
offences = { package = "pallet-offences", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
proxy = { package = "pallet-proxy", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
randomness-collective-flip = { package = "pallet-randomness-collective-flip", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
recovery = { package = "pallet-recovery", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
scheduler = { package = "pallet-scheduler", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
session = { package = "pallet-session", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
society = { package = "pallet-society", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-authority-discovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-babe = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-collective = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-democracy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-elections-phragmen = { package = "pallet-elections-phragmen", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-executive = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-finality-tracker = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-grandpa = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-identity = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-im-online = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-indices = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-membership = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-multisig = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-nicks = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-offences = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-proxy = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-recovery = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-scheduler = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-session = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-society = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
staking = { package = "pallet-staking", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-staking-reward-curve = { package = "pallet-staking-reward-curve", git = "https://github.com/paritytech/substrate", branch = "master" }
system = { package = "frame-system", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
system_rpc_runtime_api = { package = "frame-system-rpc-runtime-api", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
timestamp = { package = "pallet-timestamp", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
treasury = { package = "pallet-treasury", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
utility = { package = "pallet-utility", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
vesting = { package = "pallet-vesting", git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-system = {git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-utility = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
pallet-vesting = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
pallet-offences-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false, optional = true }
@@ -91,7 +91,7 @@ no_std = []
only-staking = []
std = [
"authority-discovery-primitives/std",
"authority-discovery/std",
"pallet-authority-discovery/std",
"bitvec/std",
"primitives/std",
"rustc-hex/std",
@@ -105,45 +105,45 @@ std = [
"sp-std/std",
"sp-io/std",
"frame-support/std",
"authorship/std",
"balances/std",
"transaction-payment/std",
"transaction-payment-rpc-runtime-api/std",
"collective/std",
"elections-phragmen/std",
"democracy/std",
"executive/std",
"finality-tracker/std",
"grandpa/std",
"identity/std",
"im-online/std",
"indices/std",
"membership/std",
"multisig/std",
"nicks/std",
"offences/std",
"proxy/std",
"recovery/std",
"pallet-authorship/std",
"pallet-balances/std",
"pallet-transaction-payment/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-collective/std",
"pallet-elections-phragmen/std",
"pallet-democracy/std",
"frame-executive/std",
"pallet-finality-tracker/std",
"pallet-grandpa/std",
"pallet-identity/std",
"pallet-im-online/std",
"pallet-indices/std",
"pallet-membership/std",
"pallet-multisig/std",
"pallet-nicks/std",
"pallet-offences/std",
"pallet-proxy/std",
"pallet-recovery/std",
"sp-runtime/std",
"sp-staking/std",
"scheduler/std",
"session/std",
"society/std",
"staking/std",
"system/std",
"system_rpc_runtime_api/std",
"timestamp/std",
"treasury/std",
"version/std",
"utility/std",
"vesting/std",
"pallet-scheduler/std",
"pallet-session/std",
"pallet-society/std",
"pallet-staking/std",
"frame-system/std",
"frame-system-rpc-runtime-api/std",
"pallet-timestamp/std",
"pallet-treasury/std",
"sp-version/std",
"pallet-utility/std",
"pallet-vesting/std",
"serde_derive",
"serde/std",
"log",
"babe/std",
"pallet-babe/std",
"babe-primitives/std",
"sp-session/std",
"randomness-collective-flip/std",
"pallet-randomness-collective-flip/std",
"runtime-common/std",
]
runtime-benchmarks = [
@@ -151,21 +151,21 @@ runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system-benchmarking",
"system/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"balances/runtime-benchmarks",
"collective/runtime-benchmarks",
"democracy/runtime-benchmarks",
"elections-phragmen/runtime-benchmarks",
"identity/runtime-benchmarks",
"im-online/runtime-benchmarks",
"scheduler/runtime-benchmarks",
"society/runtime-benchmarks",
"staking/runtime-benchmarks",
"timestamp/runtime-benchmarks",
"treasury/runtime-benchmarks",
"utility/runtime-benchmarks",
"vesting/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-collective/runtime-benchmarks",
"pallet-democracy/runtime-benchmarks",
"pallet-elections-phragmen/runtime-benchmarks",
"pallet-identity/runtime-benchmarks",
"pallet-im-online/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-society/runtime-benchmarks",
"pallet-staking/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
"pallet-treasury/runtime-benchmarks",
"pallet-utility/runtime-benchmarks",
"pallet-vesting/runtime-benchmarks",
"pallet-offences-benchmarking",
"pallet-session-benchmarking",
"hex-literal",
+1 -1
View File
@@ -69,7 +69,7 @@ pub mod fee {
/// node's balance type.
///
/// This should typically create a mapping between the following ranges:
/// - [0, system::MaximumBlockWeight]
/// - [0, frame_system::MaximumBlockWeight]
/// - [Balance::min, Balance::max]
///
/// Yet, it can be used for any other sort of change to weight-fee. Some examples being:
+158 -158
View File
@@ -47,10 +47,10 @@ use sp_runtime::{
};
#[cfg(feature = "runtime-benchmarks")]
use sp_runtime::RuntimeString;
use version::RuntimeVersion;
use grandpa::{AuthorityId as GrandpaId, fg_primitives};
use sp_version::RuntimeVersion;
use pallet_grandpa::{AuthorityId as GrandpaId, fg_primitives};
#[cfg(any(feature = "std", test))]
use version::NativeVersion;
use sp_version::NativeVersion;
use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
@@ -58,19 +58,19 @@ use frame_support::{
traits::{KeyOwnerProofSystem, SplitTwoWays, Randomness, LockIdentifier, Filter, InstanceFilter},
weights::Weight,
};
use system::{EnsureRoot, EnsureOneOf};
use im_online::sr25519::AuthorityId as ImOnlineId;
use frame_system::{EnsureRoot, EnsureOneOf};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId;
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
use session::{historical as session_historical};
use pallet_transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
use pallet_session::{historical as session_historical};
use static_assertions::const_assert;
#[cfg(feature = "std")]
pub use staking::StakerStatus;
pub use pallet_staking::StakerStatus;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
pub use timestamp::Call as TimestampCall;
pub use balances::Call as BalancesCall;
pub use pallet_timestamp::Call as TimestampCall;
pub use pallet_balances::Call as BalancesCall;
pub use attestations::{Call as AttestationsCall, MORE_ATTESTATIONS_IDENTIFIER};
pub use parachains::Call as ParachainsCall;
@@ -95,7 +95,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
#[cfg(not(feature = "disable-runtime-api"))]
apis: RUNTIME_API_VERSIONS,
#[cfg(feature = "disable-runtime-api")]
apis: version::create_apis_vec![[]],
apis: sp_version::create_apis_vec![[]],
transaction_version: 2,
};
@@ -119,14 +119,14 @@ impl Filter<Call> for BaseFilter {
type MoreThanHalfCouncil = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
>;
parameter_types! {
pub const Version: RuntimeVersion = VERSION;
}
impl system::Trait for Runtime {
impl frame_system::Trait for Runtime {
type BaseCallFilter = BaseFilter;
type Origin = Origin;
type Call = Call;
@@ -148,13 +148,13 @@ impl system::Trait for Runtime {
type AvailableBlockRatio = AvailableBlockRatio;
type Version = Version;
type ModuleToIndex = ModuleToIndex;
type AccountData = balances::AccountData<Balance>;
type AccountData = pallet_balances::AccountData<Balance>;
type OnNewAccount = ();
type OnKilledAccount = ();
type SystemWeightInfo = ();
}
impl scheduler::Trait for Runtime {
impl pallet_scheduler::Trait for Runtime {
type Event = Event;
type Origin = Origin;
type PalletsOrigin = OriginCaller;
@@ -169,34 +169,34 @@ parameter_types! {
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
}
impl babe::Trait for Runtime {
impl pallet_babe::Trait for Runtime {
type EpochDuration = EpochDuration;
type ExpectedBlockTime = ExpectedBlockTime;
// session module is the trigger
type EpochChangeTrigger = babe::ExternalTrigger;
type EpochChangeTrigger = pallet_babe::ExternalTrigger;
type KeyOwnerProofSystem = Historical;
type KeyOwnerProof = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
babe::AuthorityId,
pallet_babe::AuthorityId,
)>>::Proof;
type KeyOwnerIdentification = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(
KeyTypeId,
babe::AuthorityId,
pallet_babe::AuthorityId,
)>>::IdentificationTuple;
type HandleEquivocation =
babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
pallet_babe::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
}
parameter_types! {
pub const IndexDeposit: Balance = 1 * DOLLARS;
}
impl indices::Trait for Runtime {
impl pallet_indices::Trait for Runtime {
type AccountIndex = AccountIndex;
type Currency = Balances;
type Deposit = IndexDeposit;
@@ -216,20 +216,20 @@ pub type DealWithFees = SplitTwoWays<
_1, ToAuthor<Runtime>, // 1 part (20%) goes to the block author.
>;
impl balances::Trait for Runtime {
impl pallet_balances::Trait for Runtime {
type Balance = Balance;
type DustRemoval = ();
type Event = Event;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type WeightInfo = weights::balances::WeightInfo;
type WeightInfo = weights::pallet_balances::WeightInfo;
}
parameter_types! {
pub const TransactionByteFee: Balance = 10 * MILLICENTS;
}
impl transaction_payment::Trait for Runtime {
impl pallet_transaction_payment::Trait for Runtime {
type Currency = Balances;
type OnTransactionPayment = DealWithFees;
type TransactionByteFee = TransactionByteFee;
@@ -240,7 +240,7 @@ impl transaction_payment::Trait for Runtime {
parameter_types! {
pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
}
impl timestamp::Trait for Runtime {
impl pallet_timestamp::Trait for Runtime {
type Moment = u64;
type OnTimestampSet = Babe;
type MinimumPeriod = MinimumPeriod;
@@ -252,8 +252,8 @@ parameter_types! {
}
// TODO: substrate#2986 implement this properly
impl authorship::Trait for Runtime {
type FindAuthor = session::FindAccountFromAuthorIndex<Self, Babe>;
impl pallet_authorship::Trait for Runtime {
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
type UncleGenerations = UncleGenerations;
type FilterUncle = ();
type EventHandler = (Staking, ImOnline);
@@ -278,22 +278,22 @@ parameter_types! {
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
}
impl session::Trait for Runtime {
impl pallet_session::Trait for Runtime {
type Event = Event;
type ValidatorId = AccountId;
type ValidatorIdOf = staking::StashOf<Self>;
type ValidatorIdOf = pallet_staking::StashOf<Self>;
type ShouldEndSession = Babe;
type NextSessionRotation = Babe;
type SessionManager = session::historical::NoteHistoricalRoot<Self, Staking>;
type SessionManager = pallet_session::historical::NoteHistoricalRoot<Self, Staking>;
type SessionHandler = <SessionKeys as OpaqueKeys>::KeyTypeIdProviders;
type Keys = SessionKeys;
type DisabledValidatorsThreshold = DisabledValidatorsThreshold;
type WeightInfo = ();
}
impl session::historical::Trait for Runtime {
type FullIdentification = staking::Exposure<AccountId, Balance>;
type FullIdentificationOf = staking::ExposureOf<Runtime>;
impl pallet_session::historical::Trait for Runtime {
type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
type FullIdentificationOf = pallet_staking::ExposureOf<Runtime>;
}
// TODO #6469: This shouldn't be static, but a lazily cached value, not built unless needed, and
@@ -316,9 +316,9 @@ parameter_types! {
// Six sessions in an era (6 hours).
pub const SessionsPerEra: SessionIndex = 6;
// 28 eras for unbonding (7 days).
pub const BondingDuration: staking::EraIndex = 28;
pub const BondingDuration: pallet_staking::EraIndex = 28;
// 27 eras in which slashes can be cancelled (slightly less than 7 days).
pub const SlashDeferDuration: staking::EraIndex = 27;
pub const SlashDeferDuration: pallet_staking::EraIndex = 27;
pub const RewardCurve: &'static PiecewiseLinear<'static> = &REWARD_CURVE;
pub const MaxNominatorRewardedPerValidator: u32 = 64;
// quarter of the last session will be for election.
@@ -330,10 +330,10 @@ parameter_types! {
type SlashCancelOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>
pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>
>;
impl staking::Trait for Runtime {
impl pallet_staking::Trait for Runtime {
type Currency = Balances;
type UnixTime = Timestamp;
type CurrencyToVote = CurrencyToVoteHandler<Self>;
@@ -371,7 +371,7 @@ parameter_types! {
pub const MaxVotes: u32 = 100;
}
impl democracy::Trait for Runtime {
impl pallet_democracy::Trait for Runtime {
type Proposal = Call;
type Event = Event;
type Currency = Balances;
@@ -380,30 +380,30 @@ impl democracy::Trait for Runtime {
type VotingPeriod = VotingPeriod;
type MinimumDeposit = MinimumDeposit;
/// A straight majority of the council can decide what their next motion is.
type ExternalOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
type ExternalOrigin = pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
/// A majority can have the next scheduled referendum be a straight majority-carries vote.
type ExternalMajorityOrigin = collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
type ExternalMajorityOrigin = pallet_collective::EnsureProportionAtLeast<_1, _2, AccountId, CouncilCollective>;
/// A unanimous council can have the next scheduled referendum be a straight default-carries
/// (NTB) vote.
type ExternalDefaultOrigin = collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>;
type ExternalDefaultOrigin = pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, CouncilCollective>;
/// Two thirds of the technical committee can have an ExternalMajority/ExternalDefault vote
/// be tabled immediately and with a shorter voting/enactment period.
type FastTrackOrigin = collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCollective>;
type InstantOrigin = collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>;
type FastTrackOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, TechnicalCollective>;
type InstantOrigin = pallet_collective::EnsureProportionAtLeast<_1, _1, AccountId, TechnicalCollective>;
type InstantAllowed = InstantAllowed;
type FastTrackVotingPeriod = FastTrackVotingPeriod;
// To cancel a proposal which has been passed, 2/3 of the council must agree to it.
type CancellationOrigin = collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>;
type CancellationOrigin = pallet_collective::EnsureProportionAtLeast<_2, _3, AccountId, CouncilCollective>;
// Any single technical committee member may veto a coming council proposal, however they can
// only do it once and it lasts only for the cooloff period.
type VetoOrigin = collective::EnsureMember<AccountId, TechnicalCollective>;
type VetoOrigin = pallet_collective::EnsureMember<AccountId, TechnicalCollective>;
type CooloffPeriod = CooloffPeriod;
type PreimageByteDeposit = PreimageByteDeposit;
type Slash = Treasury;
type Scheduler = Scheduler;
type PalletsOrigin = OriginCaller;
type MaxVotes = MaxVotes;
type OperationalPreimageOrigin = collective::EnsureMember<AccountId, CouncilCollective>;
type OperationalPreimageOrigin = pallet_collective::EnsureMember<AccountId, CouncilCollective>;
type WeightInfo = ();
}
@@ -412,8 +412,8 @@ parameter_types! {
pub const CouncilMaxProposals: u32 = 100;
}
type CouncilCollective = collective::Instance1;
impl collective::Trait<CouncilCollective> for Runtime {
type CouncilCollective = pallet_collective::Instance1;
impl pallet_collective::Trait<CouncilCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
@@ -432,9 +432,9 @@ parameter_types! {
pub const ElectionsPhragmenModuleId: LockIdentifier = *b"phrelect";
}
// Make sure that there are no more than MAX_MEMBERS members elected via phragmen.
const_assert!(DesiredMembers::get() <= collective::MAX_MEMBERS);
const_assert!(DesiredMembers::get() <= pallet_collective::MAX_MEMBERS);
impl elections_phragmen::Trait for Runtime {
impl pallet_elections_phragmen::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type ChangeMembers = Council;
@@ -457,8 +457,8 @@ parameter_types! {
pub const TechnicalMaxProposals: u32 = 100;
}
type TechnicalCollective = collective::Instance2;
impl collective::Trait<TechnicalCollective> for Runtime {
type TechnicalCollective = pallet_collective::Instance2;
impl pallet_collective::Trait<TechnicalCollective> for Runtime {
type Origin = Origin;
type Proposal = Call;
type Event = Event;
@@ -467,7 +467,7 @@ impl collective::Trait<TechnicalCollective> for Runtime {
type WeightInfo = ();
}
impl membership::Trait<membership::Instance1> for Runtime {
impl pallet_membership::Trait<pallet_membership::Instance1> for Runtime {
type Event = Event;
type AddOrigin = MoreThanHalfCouncil;
type RemoveOrigin = MoreThanHalfCouncil;
@@ -494,10 +494,10 @@ parameter_types! {
type ApproveOrigin = EnsureOneOf<
AccountId,
EnsureRoot<AccountId>,
collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>
pallet_collective::EnsureProportionAtLeast<_3, _5, AccountId, CouncilCollective>
>;
impl treasury::Trait for Runtime {
impl pallet_treasury::Trait for Runtime {
type Currency = Balances;
type ApproveOrigin = ApproveOrigin;
type RejectOrigin = MoreThanHalfCouncil;
@@ -521,15 +521,15 @@ parameter_types! {
pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
}
impl offences::Trait for Runtime {
impl pallet_offences::Trait for Runtime {
type Event = Event;
type IdentificationTuple = session::historical::IdentificationTuple<Self>;
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
type OnOffenceHandler = Staking;
type WeightSoftLimit = OffencesWeightSoftLimit;
type WeightInfo = ();
}
impl authority_discovery::Trait for Runtime {}
impl pallet_authority_discovery::Trait for Runtime {}
parameter_types! {
pub const SessionDuration: BlockNumber = EPOCH_DURATION_IN_BLOCKS as _;
@@ -540,7 +540,7 @@ parameter_types! {
pub const ImOnlineUnsignedPriority: TransactionPriority = TransactionPriority::max_value();
}
impl im_online::Trait for Runtime {
impl pallet_im_online::Trait for Runtime {
type AuthorityId = ImOnlineId;
type Event = Event;
type ReportUnresponsiveness = Offences;
@@ -549,7 +549,7 @@ impl im_online::Trait for Runtime {
type WeightInfo = ();
}
impl grandpa::Trait for Runtime {
impl pallet_grandpa::Trait for Runtime {
type Event = Event;
type Call = Call;
@@ -563,15 +563,15 @@ impl grandpa::Trait for Runtime {
GrandpaId,
)>>::IdentificationTuple;
type HandleEquivocation = grandpa::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
type HandleEquivocation = pallet_grandpa::EquivocationHandler<Self::KeyOwnerIdentification, Offences>;
}
parameter_types! {
pub WindowSize: BlockNumber = finality_tracker::DEFAULT_WINDOW_SIZE.into();
pub ReportLatency: BlockNumber = finality_tracker::DEFAULT_REPORT_LATENCY.into();
pub WindowSize: BlockNumber = pallet_finality_tracker::DEFAULT_WINDOW_SIZE.into();
pub ReportLatency: BlockNumber = pallet_finality_tracker::DEFAULT_REPORT_LATENCY.into();
}
impl finality_tracker::Trait for Runtime {
impl pallet_finality_tracker::Trait for Runtime {
type OnFinalizationStalled = ();
type WindowSize = WindowSize;
type ReportLatency = ReportLatency;
@@ -612,7 +612,7 @@ impl parachains::Trait for Runtime {
type SlashPeriod = SlashPeriod;
type Proof = sp_session::MembershipProof;
type KeyOwnerProofSystem = session::historical::Module<Self>;
type KeyOwnerProofSystem = pallet_session::historical::Module<Self>;
type IdentificationTuple = <Self::KeyOwnerProofSystem as KeyOwnerProofSystem<(KeyTypeId, Vec<u8>)>>::IdentificationTuple;
type ReportOffence = Offences;
type BlockHashConversion = sp_runtime::traits::Identity;
@@ -620,14 +620,14 @@ impl parachains::Trait for Runtime {
/// Submits transaction with the node's public and signature type. Adheres to the signed extension
/// format of the chain.
impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime where
impl<LocalCall> frame_system::offchain::CreateSignedTransaction<LocalCall> for Runtime where
Call: From<LocalCall>,
{
fn create_transaction<C: system::offchain::AppCrypto<Self::Public, Self::Signature>>(
fn create_transaction<C: frame_system::offchain::AppCrypto<Self::Public, Self::Signature>>(
call: Call,
public: <Signature as Verify>::Signer,
account: AccountId,
nonce: <Runtime as system::Trait>::Index,
nonce: <Runtime as frame_system::Trait>::Index,
) -> Option<(Call, <UncheckedExtrinsic as ExtrinsicT>::SignaturePayload)> {
// take the biggest period possible.
let period = BlockHashCount::get()
@@ -642,13 +642,13 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
.saturating_sub(1);
let tip = 0;
let extra: SignedExtra = (
system::CheckSpecVersion::<Runtime>::new(),
system::CheckTxVersion::<Runtime>::new(),
system::CheckGenesis::<Runtime>::new(),
system::CheckMortality::<Runtime>::from(generic::Era::mortal(period, current_block)),
system::CheckNonce::<Runtime>::from(nonce),
system::CheckWeight::<Runtime>::new(),
transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
frame_system::CheckSpecVersion::<Runtime>::new(),
frame_system::CheckTxVersion::<Runtime>::new(),
frame_system::CheckGenesis::<Runtime>::new(),
frame_system::CheckMortality::<Runtime>::from(generic::Era::mortal(period, current_block)),
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
registrar::LimitParathreadCommits::<Runtime>::new(),
parachains::ValidateDoubleVoteReports::<Runtime>::new(),
);
@@ -663,12 +663,12 @@ impl<LocalCall> system::offchain::CreateSignedTransaction<LocalCall> for Runtime
}
}
impl system::offchain::SigningTypes for Runtime {
impl frame_system::offchain::SigningTypes for Runtime {
type Public = <Signature as Verify>::Signer;
type Signature = Signature;
}
impl<C> system::offchain::SendTransactionTypes<C> for Runtime where
impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where
Call: From<C>,
{
type OverarchingCall = Call;
@@ -713,7 +713,7 @@ impl claims::Trait for Runtime {
type Event = Event;
type VestingSchedule = Vesting;
type Prefix = Prefix;
type MoveClaimOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type MoveClaimOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
}
parameter_types! {
@@ -726,7 +726,7 @@ parameter_types! {
pub const MaxRegistrars: u32 = 20;
}
impl identity::Trait for Runtime {
impl pallet_identity::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type Slashed = Treasury;
@@ -741,7 +741,7 @@ impl identity::Trait for Runtime {
type WeightInfo = ();
}
impl utility::Trait for Runtime {
impl pallet_utility::Trait for Runtime {
type Event = Event;
type Call = Call;
type WeightInfo = ();
@@ -755,7 +755,7 @@ parameter_types! {
pub const MaxSignatories: u16 = 100;
}
impl multisig::Trait for Runtime {
impl pallet_multisig::Trait for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -772,7 +772,7 @@ parameter_types! {
pub const RecoveryDeposit: Balance = 5 * DOLLARS;
}
impl recovery::Trait for Runtime {
impl pallet_recovery::Trait for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -793,7 +793,7 @@ parameter_types! {
pub const SocietyModuleId: ModuleId = ModuleId(*b"py/socie");
}
impl society::Trait for Runtime {
impl pallet_society::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type Randomness = RandomnessCollectiveFlip;
@@ -804,8 +804,8 @@ impl society::Trait for Runtime {
type MembershipChanged = ();
type RotationPeriod = RotationPeriod;
type MaxLockDuration = MaxLockDuration;
type FounderSetOrigin = collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type SuspensionJudgementOrigin = society::EnsureFounder<Runtime>;
type FounderSetOrigin = pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>;
type SuspensionJudgementOrigin = pallet_society::EnsureFounder<Runtime>;
type ChallengePeriod = ChallengePeriod;
type ModuleId = SocietyModuleId;
}
@@ -814,7 +814,7 @@ parameter_types! {
pub const MinVestedTransfer: Balance = 100 * DOLLARS;
}
impl vesting::Trait for Runtime {
impl pallet_vesting::Trait for Runtime {
type Event = Event;
type Currency = Balances;
type BlockNumberToBalance = ConvertInto;
@@ -848,9 +848,9 @@ impl InstanceFilter<Call> for ProxyType {
Call::System(..) |
Call::Babe(..) |
Call::Timestamp(..) |
Call::Indices(indices::Call::claim(..)) |
Call::Indices(indices::Call::free(..)) |
Call::Indices(indices::Call::freeze(..)) |
Call::Indices(pallet_indices::Call::claim(..)) |
Call::Indices(pallet_indices::Call::free(..)) |
Call::Indices(pallet_indices::Call::freeze(..)) |
// Specifically omitting Indices `transfer`, `force_transfer`
// Specifically omitting the entire Balances pallet
Call::Authorship(..) |
@@ -875,15 +875,15 @@ impl InstanceFilter<Call> for ProxyType {
Call::Utility(..) |
Call::Identity(..) |
Call::Society(..) |
Call::Recovery(recovery::Call::as_recovered(..)) |
Call::Recovery(recovery::Call::vouch_recovery(..)) |
Call::Recovery(recovery::Call::claim_recovery(..)) |
Call::Recovery(recovery::Call::close_recovery(..)) |
Call::Recovery(recovery::Call::remove_recovery(..)) |
Call::Recovery(recovery::Call::cancel_recovered(..)) |
Call::Recovery(pallet_recovery::Call::as_recovered(..)) |
Call::Recovery(pallet_recovery::Call::vouch_recovery(..)) |
Call::Recovery(pallet_recovery::Call::claim_recovery(..)) |
Call::Recovery(pallet_recovery::Call::close_recovery(..)) |
Call::Recovery(pallet_recovery::Call::remove_recovery(..)) |
Call::Recovery(pallet_recovery::Call::cancel_recovered(..)) |
// Specifically omitting Recovery `create_recovery`, `initiate_recovery`
Call::Vesting(vesting::Call::vest(..)) |
Call::Vesting(vesting::Call::vest_other(..)) |
Call::Vesting(pallet_vesting::Call::vest(..)) |
Call::Vesting(pallet_vesting::Call::vest_other(..)) |
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
Call::Scheduler(..) |
Call::Proxy(..) |
@@ -897,8 +897,8 @@ impl InstanceFilter<Call> for ProxyType {
Call::Staking(..) | Call::Utility(..)
),
ProxyType::IdentityJudgement => matches!(c,
Call::Identity(identity::Call::provide_judgement(..))
| Call::Utility(utility::Call::batch(..))
Call::Identity(pallet_identity::Call::provide_judgement(..))
| Call::Utility(pallet_utility::Call::batch(..))
)
}
}
@@ -913,7 +913,7 @@ impl InstanceFilter<Call> for ProxyType {
}
}
impl proxy::Trait for Runtime {
impl pallet_proxy::Trait for Runtime {
type Event = Event;
type Call = Call;
type Currency = Balances;
@@ -927,10 +927,10 @@ impl proxy::Trait for Runtime {
pub struct CustomOnRuntimeUpgrade;
impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
fn on_runtime_upgrade() -> frame_support::weights::Weight {
if scheduler::Module::<Runtime>::migrate_v1_to_t2() {
<Runtime as system::Trait>::MaximumBlockWeight::get()
if pallet_scheduler::Module::<Runtime>::migrate_v1_to_t2() {
<Runtime as frame_system::Trait>::MaximumBlockWeight::get()
} else {
<Runtime as system::Trait>::DbWeight::get().reads(1) + 500_000_000
<Runtime as frame_system::Trait>::DbWeight::get().reads(1) + 500_000_000
}
}
}
@@ -942,35 +942,35 @@ construct_runtime! {
UncheckedExtrinsic = UncheckedExtrinsic
{
// Basic stuff; balances is uncallable initially.
System: system::{Module, Call, Storage, Config, Event<T>},
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Storage},
System: frame_system::{Module, Call, Storage, Config, Event<T>},
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Storage},
// Must be before session.
Babe: babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
Babe: pallet_babe::{Module, Call, Storage, Config, Inherent, ValidateUnsigned},
Timestamp: timestamp::{Module, Call, Storage, Inherent},
Indices: indices::{Module, Call, Storage, Config<T>, Event<T>},
Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: transaction_payment::{Module, Storage},
Timestamp: pallet_timestamp::{Module, Call, Storage, Inherent},
Indices: pallet_indices::{Module, Call, Storage, Config<T>, Event<T>},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Module, Storage},
// Consensus support.
Authorship: authorship::{Module, Call, Storage},
Staking: staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned},
Offences: offences::{Module, Call, Storage, Event},
Authorship: pallet_authorship::{Module, Call, Storage},
Staking: pallet_staking::{Module, Call, Storage, Config<T>, Event<T>, ValidateUnsigned},
Offences: pallet_offences::{Module, Call, Storage, Event},
Historical: session_historical::{Module},
Session: session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: finality_tracker::{Module, Call, Storage, Inherent},
Grandpa: grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
ImOnline: im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: authority_discovery::{Module, Call, Config},
Session: pallet_session::{Module, Call, Storage, Event, Config<T>},
FinalityTracker: pallet_finality_tracker::{Module, Call, Storage, Inherent},
Grandpa: pallet_grandpa::{Module, Call, Storage, Config, Event, ValidateUnsigned},
ImOnline: pallet_im_online::{Module, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
AuthorityDiscovery: pallet_authority_discovery::{Module, Call, Config},
// Governance stuff; uncallable initially.
Democracy: democracy::{Module, Call, Storage, Config, Event<T>},
Council: collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
TechnicalCommittee: collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
ElectionsPhragmen: elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>},
TechnicalMembership: membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>},
Treasury: treasury::{Module, Call, Storage, Event<T>},
Democracy: pallet_democracy::{Module, Call, Storage, Config, Event<T>},
Council: pallet_collective::<Instance1>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
TechnicalCommittee: pallet_collective::<Instance2>::{Module, Call, Storage, Origin<T>, Event<T>, Config<T>},
ElectionsPhragmen: pallet_elections_phragmen::{Module, Call, Storage, Event<T>, Config<T>},
TechnicalMembership: pallet_membership::<Instance1>::{Module, Call, Storage, Event<T>, Config<T>},
Treasury: pallet_treasury::{Module, Call, Storage, Event<T>},
// Claims. Usable initially.
Claims: claims::{Module, Call, Storage, Event<T>, Config<T>, ValidateUnsigned},
@@ -983,28 +983,28 @@ construct_runtime! {
Registrar: registrar::{Module, Call, Storage, Event, Config<T>},
// Utility module.
Utility: utility::{Module, Call, Event},
Utility: pallet_utility::{Module, Call, Event},
// Less simple identity module.
Identity: identity::{Module, Call, Storage, Event<T>},
Identity: pallet_identity::{Module, Call, Storage, Event<T>},
// Society module.
Society: society::{Module, Call, Storage, Event<T>},
Society: pallet_society::{Module, Call, Storage, Event<T>},
// Social recovery module.
Recovery: recovery::{Module, Call, Storage, Event<T>},
Recovery: pallet_recovery::{Module, Call, Storage, Event<T>},
// Vesting. Usable initially, but removed once all vesting is finished.
Vesting: vesting::{Module, Call, Storage, Event<T>, Config<T>},
Vesting: pallet_vesting::{Module, Call, Storage, Event<T>, Config<T>},
// System scheduler.
Scheduler: scheduler::{Module, Call, Storage, Event<T>},
Scheduler: pallet_scheduler::{Module, Call, Storage, Event<T>},
// Proxy module. Late addition.
Proxy: proxy::{Module, Call, Storage, Event<T>},
Proxy: pallet_proxy::{Module, Call, Storage, Event<T>},
// Multisig module. Late addition.
Multisig: multisig::{Module, Call, Storage, Event<T>},
Multisig: pallet_multisig::{Module, Call, Storage, Event<T>},
}
}
@@ -1020,13 +1020,13 @@ pub type SignedBlock = generic::SignedBlock<Block>;
pub type BlockId = generic::BlockId<Block>;
/// The SignedExtension to the basic transaction logic.
pub type SignedExtra = (
system::CheckSpecVersion<Runtime>,
system::CheckTxVersion<Runtime>,
system::CheckGenesis<Runtime>,
system::CheckMortality<Runtime>,
system::CheckNonce<Runtime>,
system::CheckWeight<Runtime>,
transaction_payment::ChargeTransactionPayment<Runtime>,
frame_system::CheckSpecVersion<Runtime>,
frame_system::CheckTxVersion<Runtime>,
frame_system::CheckGenesis<Runtime>,
frame_system::CheckMortality<Runtime>,
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
registrar::LimitParathreadCommits<Runtime>,
parachains::ValidateDoubleVoteReports<Runtime>,
);
@@ -1035,10 +1035,10 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signatu
/// Extrinsic type that has already been checked.
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, Nonce, Call>;
/// Executive: handles dispatch to the various modules.
pub type Executive = executive::Executive<
pub type Executive = frame_executive::Executive<
Runtime,
Block,
system::ChainContext<Runtime>,
frame_system::ChainContext<Runtime>,
Runtime,
AllModules,
CustomOnRuntimeUpgrade
@@ -1245,13 +1245,13 @@ sp_api::impl_runtime_apis! {
}
}
impl system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
impl frame_system_rpc_runtime_api::AccountNonceApi<Block, AccountId, Nonce> for Runtime {
fn account_nonce(account: AccountId) -> Nonce {
System::account_nonce(account)
}
}
impl transaction_payment_rpc_runtime_api::TransactionPaymentApi<
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi<
Block,
Balance,
> for Runtime {
@@ -1315,21 +1315,21 @@ sp_api::impl_runtime_apis! {
// Polkadot
add_benchmark!(params, batches, claims, Claims);
// Substrate
add_benchmark!(params, batches, balances, Balances);
add_benchmark!(params, batches, collective, Council);
add_benchmark!(params, batches, democracy, Democracy);
add_benchmark!(params, batches, elections_phragmen, ElectionsPhragmen);
add_benchmark!(params, batches, identity, Identity);
add_benchmark!(params, batches, im_online, ImOnline);
add_benchmark!(params, batches, offences, OffencesBench::<Runtime>);
add_benchmark!(params, batches, scheduler, Scheduler);
add_benchmark!(params, batches, session, SessionBench::<Runtime>);
add_benchmark!(params, batches, staking, Staking);
add_benchmark!(params, batches, system, SystemBench::<Runtime>);
add_benchmark!(params, batches, timestamp, Timestamp);
add_benchmark!(params, batches, treasury, Treasury);
add_benchmark!(params, batches, utility, Utility);
add_benchmark!(params, batches, vesting, Vesting);
add_benchmark!(params, batches, pallet_balances, Balances);
add_benchmark!(params, batches, pallet_collective, Council);
add_benchmark!(params, batches, pallet_democracy, Democracy);
add_benchmark!(params, batches, pallet_elections_phragmen, ElectionsPhragmen);
add_benchmark!(params, batches, pallet_identity, Identity);
add_benchmark!(params, batches, pallet_im_online, ImOnline);
add_benchmark!(params, batches, pallet_offences, OffencesBench::<Runtime>);
add_benchmark!(params, batches, pallet_scheduler, Scheduler);
add_benchmark!(params, batches, pallet_session, SessionBench::<Runtime>);
add_benchmark!(params, batches, pallet_staking, Staking);
add_benchmark!(params, batches, frame_system, SystemBench::<Runtime>);
add_benchmark!(params, batches, pallet_timestamp, Timestamp);
add_benchmark!(params, batches, pallet_treasury, Treasury);
add_benchmark!(params, batches, pallet_utility, Utility);
add_benchmark!(params, batches, pallet_vesting, Vesting);
if batches.is_empty() { return Err("Benchmark not found for this pallet.".into()) }
Ok(batches)
+1 -1
View File
@@ -16,4 +16,4 @@
/// A collection of weight modules used for pallets in the runtime.
pub mod balances;
pub mod pallet_balances;
@@ -18,7 +18,7 @@
use frame_support::weights::{Weight, constants::RocksDbWeight as DbWeight};
pub struct WeightInfo;
impl balances::WeightInfo for WeightInfo {
impl pallet_balances::WeightInfo for WeightInfo {
fn transfer() -> Weight {
(65949000 as Weight)
.saturating_add(DbWeight::get().reads(1 as Weight))