Skip to content

Commit

Permalink
substrate
Browse files Browse the repository at this point in the history
  • Loading branch information
joepetrowski committed Jan 18, 2024
1 parent dd72049 commit fa3ebd3
Show file tree
Hide file tree
Showing 79 changed files with 248 additions and 262 deletions.
8 changes: 4 additions & 4 deletions substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2099,11 +2099,11 @@ construct_runtime!(
AssetConversionTxPayment: pallet_asset_conversion_tx_payment,
ElectionProviderMultiPhase: pallet_election_provider_multi_phase,
Staking: pallet_staking,
Beefy: pallet_beefy::{Pallet, Call, Storage, Config<T>, ValidateUnsigned},
Beefy: pallet_beefy,
// MMR leaf construction must be before session in order to have leaf contents
// refer to block<N-1> consistently. see substrate issue #11797 for details.
Mmr: pallet_mmr::{Pallet, Storage},
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage},
Mmr: pallet_mmr,
MmrLeaf: pallet_beefy_mmr,
Session: pallet_session,
Democracy: pallet_democracy,
Council: pallet_collective::<Instance1>,
Expand All @@ -2118,7 +2118,7 @@ construct_runtime!(
ImOnline: pallet_im_online,
AuthorityDiscovery: pallet_authority_discovery,
Offences: pallet_offences,
Historical: pallet_session_historical::{Pallet},
Historical: pallet_session_historical,
RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip,
Identity: pallet_identity,
Society: pallet_society,
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/assets/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
Assets: pallet_assets,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/atomic-swap/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
AtomicSwap: pallet_atomic_swap::{Pallet, Call, Event<T>},
System: frame_system,
Balances: pallet_balances,
AtomicSwap: pallet_atomic_swap,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/aura/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ const SLOT_DURATION: u64 = 2;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Aura: pallet_aura::{Pallet, Storage, Config<T>},
System: frame_system,
Timestamp: pallet_timestamp,
Aura: pallet_aura,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/authority-discovery/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ mod tests {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config<T>},
System: frame_system,
Session: pallet_session,
AuthorityDiscovery: pallet_authority_discovery,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/authorship/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ mod tests {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Authorship: pallet_authorship::{Pallet, Storage},
System: frame_system,
Authorship: pallet_authorship,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/bags-list/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ type Block = frame_system::mocking::MockBlock<Runtime>;
frame_support::construct_runtime!(
pub struct Runtime
{
System: frame_system::{Pallet, Call, Storage, Event<T>, Config<T>},
BagsList: bags_list::{Pallet, Call, Storage, Event<T>},
System: frame_system,
BagsList: bags_list,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/balances/src/tests/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ impl VariantCount for TestId {
frame_support::construct_runtime!(
pub struct Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
TransactionPayment: pallet_transaction_payment,
}
);

Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/beefy-mmr/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ type Block = frame_system::mocking::MockBlock<Test>;
construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
Mmr: pallet_mmr::{Pallet, Storage},
Beefy: pallet_beefy::{Pallet, Config<T>, Storage},
BeefyMmr: pallet_beefy_mmr::{Pallet, Storage},
System: frame_system,
Session: pallet_session,
Mmr: pallet_mmr,
Beefy: pallet_beefy,
BeefyMmr: pallet_beefy_mmr,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/benchmarking/pov/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ mod mock {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Baseline: crate::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Baseline: crate,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/benchmarking/pov/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ mod mock {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Baseline: crate::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Baseline: crate,
}
);

Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/benchmarking/src/baseline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ pub mod mock {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
System: frame_system,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/benchmarking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
TestPallet: pallet_test::{Pallet, Call, Storage},
System: frame_system,
TestPallet: pallet_test,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/benchmarking/src/tests_instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
TestPallet: pallet_test::{Pallet, Call, Storage, Event<T>},
System: frame_system,
TestPallet: pallet_test,
}
);

Expand Down
12 changes: 6 additions & 6 deletions substrate/frame/bounties/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>},
Bounties1: pallet_bounties::<Instance1>::{Pallet, Call, Storage, Event<T>},
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
Treasury1: pallet_treasury::<Instance1>::{Pallet, Call, Storage, Config<T>, Event<T>},
System: frame_system,
Balances: pallet_balances,
Bounties: pallet_bounties,
Bounties1: pallet_bounties::<Instance1>,
Treasury: pallet_treasury,
Treasury1: pallet_treasury::<Instance1>,
}
);

Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/child-bounties/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ type BountiesError = pallet_bounties::Error<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>},
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
Bounties: pallet_bounties,
Treasury: pallet_treasury,
ChildBounties: pallet_child_bounties,
}
);

Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/collective/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u32, u64,
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Event<T>},
Collective: pallet_collective::<Instance1>::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
CollectiveMajority: pallet_collective::<Instance2>::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
DefaultCollective: pallet_collective::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
Democracy: mock_democracy::{Pallet, Call, Event<T>},
System: frame_system,
Collective: pallet_collective::<Instance1>,
CollectiveMajority: pallet_collective::<Instance2>,
DefaultCollective: pallet_collective,
Democracy: mock_democracy,
}
);

Expand Down
10 changes: 5 additions & 5 deletions substrate/frame/contracts/mock-network/src/relay_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ impl pallet_message_queue::Config for Runtime {

construct_runtime!(
pub enum Runtime {
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
ParasOrigin: origin::{Pallet, Origin},
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin},
MessageQueue: pallet_message_queue::{Pallet, Event<T>},
System: frame_system,
Balances: pallet_balances,
ParasOrigin: origin,
XcmPallet: pallet_xcm,
MessageQueue: pallet_message_queue,
}
);
14 changes: 7 additions & 7 deletions substrate/frame/contracts/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Randomness: pallet_insecure_randomness_collective_flip::{Pallet, Storage},
Utility: pallet_utility::{Pallet, Call, Storage, Event},
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>, HoldReason},
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
Timestamp: pallet_timestamp,
Randomness: pallet_insecure_randomness_collective_flip,
Utility: pallet_utility,
Contracts: pallet_contracts,
Proxy: pallet_proxy,
Dummy: pallet_dummy
}
);
Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/conviction-voting/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Voting: pallet_conviction_voting::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
Voting: pallet_conviction_voting,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/core-fellowship/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
CoreFellowship: pallet_core_fellowship::{Pallet, Call, Storage, Event<T>},
System: frame_system,
CoreFellowship: pallet_core_fellowship,
}
);

Expand Down
8 changes: 4 additions & 4 deletions substrate/frame/democracy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
System: frame_system,
Balances: pallet_balances,
Preimage: pallet_preimage,
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>},
Scheduler: pallet_scheduler,
Democracy: pallet_democracy,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/election-provider-multi-phase/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ pub type UncheckedExtrinsic =
frame_support::construct_runtime!(
pub struct Runtime
{
System: frame_system::{Pallet, Call, Event<T>, Config<T>},
Balances: pallet_balances::{Pallet, Call, Event<T>, Config<T>},
MultiPhase: multi_phase::{Pallet, Call, Event<T>},
System: frame_system,
Balances: pallet_balances,
MultiPhase: multi_phase,
}
);

Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/election-provider-support/src/onchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ mod tests {
frame_support::construct_runtime!(
pub struct Runtime
{
System: frame_system::{Pallet, Call, Event<T>},
System: frame_system,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/elections-phragmen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1454,9 +1454,9 @@ mod tests {
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Event<T>},
Balances: pallet_balances::{Pallet, Call, Event<T>, Config<T>},
Elections: elections_phragmen::{Pallet, Call, Event<T>, Config<T>},
System: frame_system,
Balances: pallet_balances,
Elections: elections_phragmen,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/examples/basic/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Example: pallet_example_basic::{Pallet, Call, Storage, Config<T>, Event<T>},
System: frame_system,
Balances: pallet_balances,
Example: pallet_example_basic,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/examples/dev-mode/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Example: pallet_dev_mode::{Pallet, Call, Storage, Event<T>},
System: frame_system,
Balances: pallet_balances,
Example: pallet_dev_mode,
}
);

Expand Down
6 changes: 3 additions & 3 deletions substrate/frame/examples/kitchensink/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Kitchensink: pallet_example_kitchensink::{Pallet, Call, Storage, Config<T>, Event<T>},
System: frame_system,
Balances: pallet_balances,
Kitchensink: pallet_example_kitchensink,
}
);

Expand Down
4 changes: 2 additions & 2 deletions substrate/frame/examples/offchain-worker/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Example: example_offchain_worker::{Pallet, Call, Storage, Event<T>, ValidateUnsigned},
System: frame_system,
Example: example_offchain_worker,
}
);

Expand Down
Loading

0 comments on commit fa3ebd3

Please sign in to comment.