mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 14:37:57 +00:00
Rename pallet trait Trait to Config (#7599)
* rename Trait to Config * add test asserting using Trait is still valid. * fix ui tests
This commit is contained in:
committed by
GitHub
parent
dd3c84c362
commit
1cbfc9257f
@@ -156,7 +156,7 @@ parameter_types! {
|
||||
|
||||
const_assert!(AvailableBlockRatio::get().deconstruct() >= AVERAGE_ON_INITIALIZE_WEIGHT.deconstruct());
|
||||
|
||||
impl frame_system::Trait for Runtime {
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = ();
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
@@ -184,7 +184,7 @@ impl frame_system::Trait for Runtime {
|
||||
type SystemWeightInfo = frame_system::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_utility::Trait for Runtime {
|
||||
impl pallet_utility::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type WeightInfo = pallet_utility::weights::SubstrateWeight<Runtime>;
|
||||
@@ -198,7 +198,7 @@ parameter_types! {
|
||||
pub const MaxSignatories: u16 = 100;
|
||||
}
|
||||
|
||||
impl pallet_multisig::Trait for Runtime {
|
||||
impl pallet_multisig::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type Currency = Balances;
|
||||
@@ -261,7 +261,7 @@ impl InstanceFilter<Call> for ProxyType {
|
||||
}
|
||||
}
|
||||
|
||||
impl pallet_proxy::Trait for Runtime {
|
||||
impl pallet_proxy::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type Currency = Balances;
|
||||
@@ -281,7 +281,7 @@ parameter_types! {
|
||||
pub const MaxScheduledPerBlock: u32 = 50;
|
||||
}
|
||||
|
||||
impl pallet_scheduler::Trait for Runtime {
|
||||
impl pallet_scheduler::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Origin = Origin;
|
||||
type PalletsOrigin = OriginCaller;
|
||||
@@ -297,7 +297,7 @@ parameter_types! {
|
||||
pub const ExpectedBlockTime: Moment = MILLISECS_PER_BLOCK;
|
||||
}
|
||||
|
||||
impl pallet_babe::Trait for Runtime {
|
||||
impl pallet_babe::Config for Runtime {
|
||||
type EpochDuration = EpochDuration;
|
||||
type ExpectedBlockTime = ExpectedBlockTime;
|
||||
type EpochChangeTrigger = pallet_babe::ExternalTrigger;
|
||||
@@ -324,7 +324,7 @@ parameter_types! {
|
||||
pub const IndexDeposit: Balance = 1 * DOLLARS;
|
||||
}
|
||||
|
||||
impl pallet_indices::Trait for Runtime {
|
||||
impl pallet_indices::Config for Runtime {
|
||||
type AccountIndex = AccountIndex;
|
||||
type Currency = Balances;
|
||||
type Deposit = IndexDeposit;
|
||||
@@ -339,7 +339,7 @@ parameter_types! {
|
||||
pub const MaxLocks: u32 = 50;
|
||||
}
|
||||
|
||||
impl pallet_balances::Trait for Runtime {
|
||||
impl pallet_balances::Config for Runtime {
|
||||
type MaxLocks = MaxLocks;
|
||||
type Balance = Balance;
|
||||
type DustRemoval = ();
|
||||
@@ -356,7 +356,7 @@ parameter_types! {
|
||||
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 1_000_000_000u128);
|
||||
}
|
||||
|
||||
impl pallet_transaction_payment::Trait for Runtime {
|
||||
impl pallet_transaction_payment::Config for Runtime {
|
||||
type OnChargeTransaction = CurrencyAdapter<Balances, DealWithFees>;
|
||||
type TransactionByteFee = TransactionByteFee;
|
||||
type WeightToFee = IdentityFee<Balance>;
|
||||
@@ -368,7 +368,7 @@ parameter_types! {
|
||||
pub const MinimumPeriod: Moment = SLOT_DURATION / 2;
|
||||
}
|
||||
|
||||
impl pallet_timestamp::Trait for Runtime {
|
||||
impl pallet_timestamp::Config for Runtime {
|
||||
type Moment = Moment;
|
||||
type OnTimestampSet = Babe;
|
||||
type MinimumPeriod = MinimumPeriod;
|
||||
@@ -379,7 +379,7 @@ parameter_types! {
|
||||
pub const UncleGenerations: BlockNumber = 5;
|
||||
}
|
||||
|
||||
impl pallet_authorship::Trait for Runtime {
|
||||
impl pallet_authorship::Config for Runtime {
|
||||
type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Babe>;
|
||||
type UncleGenerations = UncleGenerations;
|
||||
type FilterUncle = ();
|
||||
@@ -399,9 +399,9 @@ parameter_types! {
|
||||
pub const DisabledValidatorsThreshold: Perbill = Perbill::from_percent(17);
|
||||
}
|
||||
|
||||
impl pallet_session::Trait for Runtime {
|
||||
impl pallet_session::Config for Runtime {
|
||||
type Event = Event;
|
||||
type ValidatorId = <Self as frame_system::Trait>::AccountId;
|
||||
type ValidatorId = <Self as frame_system::Config>::AccountId;
|
||||
type ValidatorIdOf = pallet_staking::StashOf<Self>;
|
||||
type ShouldEndSession = Babe;
|
||||
type NextSessionRotation = Babe;
|
||||
@@ -412,7 +412,7 @@ impl pallet_session::Trait for Runtime {
|
||||
type WeightInfo = pallet_session::weights::SubstrateWeight<Runtime>;
|
||||
}
|
||||
|
||||
impl pallet_session::historical::Trait for Runtime {
|
||||
impl pallet_session::historical::Config for Runtime {
|
||||
type FullIdentification = pallet_staking::Exposure<AccountId, Balance>;
|
||||
type FullIdentificationOf = pallet_staking::ExposureOf<Runtime>;
|
||||
}
|
||||
@@ -443,7 +443,7 @@ parameter_types! {
|
||||
.saturating_sub(ExtrinsicBaseWeight::get());
|
||||
}
|
||||
|
||||
impl pallet_staking::Trait for Runtime {
|
||||
impl pallet_staking::Config for Runtime {
|
||||
type Currency = Balances;
|
||||
type UnixTime = Timestamp;
|
||||
type CurrencyToVote = U128CurrencyToVote;
|
||||
@@ -489,7 +489,7 @@ parameter_types! {
|
||||
pub const MaxProposals: u32 = 100;
|
||||
}
|
||||
|
||||
impl pallet_democracy::Trait for Runtime {
|
||||
impl pallet_democracy::Config for Runtime {
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
@@ -541,7 +541,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type CouncilCollective = pallet_collective::Instance1;
|
||||
impl pallet_collective::Trait<CouncilCollective> for Runtime {
|
||||
impl pallet_collective::Config<CouncilCollective> for Runtime {
|
||||
type Origin = Origin;
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
@@ -564,7 +564,7 @@ parameter_types! {
|
||||
// Make sure that there are no more than `MaxMembers` members elected via elections-phragmen.
|
||||
const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get());
|
||||
|
||||
impl pallet_elections_phragmen::Trait for Runtime {
|
||||
impl pallet_elections_phragmen::Config for Runtime {
|
||||
type Event = Event;
|
||||
type ModuleId = ElectionsPhragmenModuleId;
|
||||
type Currency = Balances;
|
||||
@@ -591,7 +591,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
type TechnicalCollective = pallet_collective::Instance2;
|
||||
impl pallet_collective::Trait<TechnicalCollective> for Runtime {
|
||||
impl pallet_collective::Config<TechnicalCollective> for Runtime {
|
||||
type Origin = Origin;
|
||||
type Proposal = Call;
|
||||
type Event = Event;
|
||||
@@ -607,7 +607,7 @@ type EnsureRootOrHalfCouncil = EnsureOneOf<
|
||||
EnsureRoot<AccountId>,
|
||||
pallet_collective::EnsureProportionMoreThan<_1, _2, AccountId, CouncilCollective>
|
||||
>;
|
||||
impl pallet_membership::Trait<pallet_membership::Instance1> for Runtime {
|
||||
impl pallet_membership::Config<pallet_membership::Instance1> for Runtime {
|
||||
type Event = Event;
|
||||
type AddOrigin = EnsureRootOrHalfCouncil;
|
||||
type RemoveOrigin = EnsureRootOrHalfCouncil;
|
||||
@@ -636,7 +636,7 @@ parameter_types! {
|
||||
pub const BountyValueMinimum: Balance = 5 * DOLLARS;
|
||||
}
|
||||
|
||||
impl pallet_treasury::Trait for Runtime {
|
||||
impl pallet_treasury::Config for Runtime {
|
||||
type ModuleId = TreasuryModuleId;
|
||||
type Currency = Balances;
|
||||
type ApproveOrigin = EnsureOneOf<
|
||||
@@ -681,7 +681,7 @@ parameter_types! {
|
||||
pub const MaxValueSize: u32 = 16 * 1024;
|
||||
}
|
||||
|
||||
impl pallet_contracts::Trait for Runtime {
|
||||
impl pallet_contracts::Config for Runtime {
|
||||
type Time = Timestamp;
|
||||
type Randomness = RandomnessCollectiveFlip;
|
||||
type Currency = Balances;
|
||||
@@ -699,7 +699,7 @@ impl pallet_contracts::Trait for Runtime {
|
||||
type WeightInfo = pallet_contracts::weights::SubstrateWeight<Self>;
|
||||
}
|
||||
|
||||
impl pallet_sudo::Trait for Runtime {
|
||||
impl pallet_sudo::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
}
|
||||
@@ -769,7 +769,7 @@ impl<C> frame_system::offchain::SendTransactionTypes<C> for Runtime where
|
||||
type OverarchingCall = Call;
|
||||
}
|
||||
|
||||
impl pallet_im_online::Trait for Runtime {
|
||||
impl pallet_im_online::Config for Runtime {
|
||||
type AuthorityId = ImOnlineId;
|
||||
type Event = Event;
|
||||
type SessionDuration = SessionDuration;
|
||||
@@ -782,16 +782,16 @@ parameter_types! {
|
||||
pub OffencesWeightSoftLimit: Weight = Perbill::from_percent(60) * MaximumBlockWeight::get();
|
||||
}
|
||||
|
||||
impl pallet_offences::Trait for Runtime {
|
||||
impl pallet_offences::Config for Runtime {
|
||||
type Event = Event;
|
||||
type IdentificationTuple = pallet_session::historical::IdentificationTuple<Self>;
|
||||
type OnOffenceHandler = Staking;
|
||||
type WeightSoftLimit = OffencesWeightSoftLimit;
|
||||
}
|
||||
|
||||
impl pallet_authority_discovery::Trait for Runtime {}
|
||||
impl pallet_authority_discovery::Config for Runtime {}
|
||||
|
||||
impl pallet_grandpa::Trait for Runtime {
|
||||
impl pallet_grandpa::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
|
||||
@@ -820,7 +820,7 @@ parameter_types! {
|
||||
pub const MaxRegistrars: u32 = 20;
|
||||
}
|
||||
|
||||
impl pallet_identity::Trait for Runtime {
|
||||
impl pallet_identity::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type BasicDeposit = BasicDeposit;
|
||||
@@ -842,7 +842,7 @@ parameter_types! {
|
||||
pub const RecoveryDeposit: Balance = 5 * DOLLARS;
|
||||
}
|
||||
|
||||
impl pallet_recovery::Trait for Runtime {
|
||||
impl pallet_recovery::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Call = Call;
|
||||
type Currency = Balances;
|
||||
@@ -863,7 +863,7 @@ parameter_types! {
|
||||
pub const SocietyModuleId: ModuleId = ModuleId(*b"py/socie");
|
||||
}
|
||||
|
||||
impl pallet_society::Trait for Runtime {
|
||||
impl pallet_society::Config for Runtime {
|
||||
type Event = Event;
|
||||
type ModuleId = SocietyModuleId;
|
||||
type Currency = Balances;
|
||||
@@ -884,7 +884,7 @@ parameter_types! {
|
||||
pub const MinVestedTransfer: Balance = 100 * DOLLARS;
|
||||
}
|
||||
|
||||
impl pallet_vesting::Trait for Runtime {
|
||||
impl pallet_vesting::Config for Runtime {
|
||||
type Event = Event;
|
||||
type Currency = Balances;
|
||||
type BlockNumberToBalance = ConvertInto;
|
||||
@@ -1173,9 +1173,9 @@ impl_runtime_apis! {
|
||||
use pallet_offences_benchmarking::Module as OffencesBench;
|
||||
use frame_system_benchmarking::Module as SystemBench;
|
||||
|
||||
impl pallet_session_benchmarking::Trait for Runtime {}
|
||||
impl pallet_offences_benchmarking::Trait for Runtime {}
|
||||
impl frame_system_benchmarking::Trait for Runtime {}
|
||||
impl pallet_session_benchmarking::Config for Runtime {}
|
||||
impl pallet_offences_benchmarking::Config for Runtime {}
|
||||
impl frame_system_benchmarking::Config for Runtime {}
|
||||
|
||||
let whitelist: Vec<TrackedStorageKey> = vec![
|
||||
// Block Number
|
||||
|
||||
Reference in New Issue
Block a user