Skip to content

Commit

Permalink
Revert "remove when possible explicit declaration of pallets in const…
Browse files Browse the repository at this point in the history
…ruct_runtime macro"

This reverts commit 33a6067.
  • Loading branch information
gianfra-t committed Jul 29, 2024
1 parent 3345c90 commit 17f8100
Show file tree
Hide file tree
Showing 11 changed files with 103 additions and 103 deletions.
4 changes: 2 additions & 2 deletions pallets/clients-info/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
// Configure a mock runtime to test the pallet.
frame_support::construct_runtime!(
pub enum Test {
System: frame_system,
ClientsInfo: clients_info
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
ClientsInfo: clients_info::{Pallet, Call, Storage, Event<T>}
}
);

Expand Down
18 changes: 9 additions & 9 deletions pallets/oracle/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ frame_support::construct_runtime!(
pub enum Test
{
// substrate pallets
System: frame_system,
Timestamp: pallet_timestamp,
Balances: pallet_balances,
Tokens: orml_tokens,
Currencies: orml_currencies,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Tokens: orml_tokens::{Pallet, Storage, Config<T>, Event<T>},
Currencies: orml_currencies::{Pallet, Call},

// Operational
Security: security,
Oracle: oracle,
Staking: staking,
Currency: currency,
Security: security::{Pallet, Call, Storage, Event<T>},
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>},
Staking: staking::{Pallet, Storage, Event<T>},
Currency: currency::{Pallet},
}
);

Expand Down
4 changes: 2 additions & 2 deletions pallets/pooled-rewards/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
Reward: pooled_rewards,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Reward: pooled_rewards::{Pallet, Call, Storage, Event<T>},
}
);

Expand Down
32 changes: 16 additions & 16 deletions pallets/replace/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,27 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
Timestamp: pallet_timestamp,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},

// Tokens & Balances
Balances: pallet_balances,
Tokens: orml_tokens,
Currencies: orml_currencies,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Tokens: orml_tokens::{Pallet, Storage, Config<T>, Event<T>},
Currencies: orml_currencies::{Pallet, Call},

Rewards: pooled_rewards,
RewardDistribution: reward_distribution,
Rewards: pooled_rewards::{Pallet, Call, Storage, Event<T>},
RewardDistribution: reward_distribution::{Pallet, Storage, Event<T>},

// Operational
StellarRelay: stellar_relay,
Security: security,
VaultRegistry: vault_registry,
Oracle: oracle,
Replace: replace,
Fee: fee,
Nomination: nomination,
Staking: staking,
Currency: currency,
StellarRelay: stellar_relay::{Pallet, Call, Config<T>, Storage, Event<T>},
Security: security::{Pallet, Call, Storage, Event<T>},
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>},
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>},
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>},
Fee: fee::{Pallet, Call, Config<T>, Storage},
Nomination: nomination::{Pallet, Call, Config<T>, Storage, Event<T>},
Staking: staking::{Pallet, Storage, Event<T>},
Currency: currency::{Pallet},
}
);

Expand Down
16 changes: 8 additions & 8 deletions pallets/reward-distribution/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ pub use currency::testing_constants::{DEFAULT_COLLATERAL_CURRENCY, DEFAULT_NATIV
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},

//Tokens and Balances
Balances: pallet_balances,
Tokens: orml_tokens,
Currencies: orml_currencies,
RewardDistribution: reward_distribution,
Rewards: pooled_rewards,
Staking: staking,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Tokens: orml_tokens::{Pallet, Storage, Config<T>, Event<T>},
Currencies: orml_currencies::{Pallet, Call},
RewardDistribution: reward_distribution::{Pallet, Call, Storage, Event<T>},
Rewards: pooled_rewards::{Pallet, Call, Storage, Event<T>},
Staking: staking::{Pallet, Storage, Event<T>},

//Operational
Security: security,
Security: security::{Pallet, Call, Storage, Event<T>},

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

Expand Down
6 changes: 3 additions & 3 deletions pallets/staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
Staking: staking,
Tokens: orml_tokens,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Staking: staking::{Pallet, Call, Storage, Event<T>},
Tokens: orml_tokens::{Pallet, Call, Storage, Event<T>},
}
);

Expand Down
4 changes: 2 additions & 2 deletions pallets/stellar-relay/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
SpacewalkRelay: pallet_spacewalk_relay,
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
SpacewalkRelay: pallet_spacewalk_relay::{Pallet, Call, Storage, Event<T>},
}
);

Expand Down
26 changes: 13 additions & 13 deletions pallets/vault-registry/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,24 +37,24 @@ type Block = frame_system::mocking::MockBlock<Test>;
frame_support::construct_runtime!(
pub enum Test
{
System: frame_system,
Timestamp: pallet_timestamp,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},

// Tokens & Balances
Balances: pallet_balances,
Tokens: orml_tokens,
Currencies: orml_currencies,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Tokens: orml_tokens::{Pallet, Storage, Config<T>, Event<T>},
Currencies: orml_currencies::{Pallet, Call},

Rewards: pooled_rewards,
RewardDistribution: reward_distribution,
Rewards: pooled_rewards::{Pallet, Call, Storage, Event<T>},
RewardDistribution: reward_distribution::{Pallet, Storage, Event<T>},

// Operational
Security: security,
VaultRegistry: vault_registry,
Oracle: oracle,
Staking: staking,
Fee: fee,
Currency: currency,
Security: security::{Pallet, Call, Storage, Event<T>},
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned},
Oracle: oracle::{Pallet, Call, Storage, Event<T>},
Staking: staking::{Pallet, Storage, Event<T>},
Fee: fee::{Pallet, Call, Config<T>, Storage},
Currency: currency::{Pallet},

}
);
Expand Down
46 changes: 23 additions & 23 deletions testchain/runtime/mainnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,34 +623,34 @@ impl pooled_rewards::Config for Runtime {
construct_runtime! {
pub enum Runtime
{
System: frame_system = 0,
Timestamp: pallet_timestamp = 1,
Aura: pallet_aura = 2,
Grandpa: pallet_grandpa = 3,
Sudo: pallet_sudo = 4,
Tokens: orml_tokens = 5,
Currencies: orml_currencies = 7,
Balances: pallet_balances = 8,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1,
Aura: pallet_aura::{Pallet, Config<T>} = 2,
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event} = 3,
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 4,
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>} = 5,
Currencies: orml_currencies::{Pallet, Call, Storage} = 7,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 8,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 9,

StellarRelay: stellar_relay = 10,
StellarRelay: stellar_relay::{Pallet, Call, Config<T>, Storage, Event<T>} = 10,

VaultRewards: pooled_rewards = 15,
VaultStaking: staking = 16,
VaultRewards: pooled_rewards::{Pallet, Storage, Event<T>} = 15,
VaultStaking: staking::{Pallet, Storage, Event<T>} = 16,

Currency: currency = 17,
Currency: currency::{Pallet} = 17,

Security: security = 19,
VaultRegistry: vault_registry = 21,
Oracle: oracle = 22,
Issue: issue = 23,
Redeem: redeem = 24,
Replace: replace = 25,
Fee: fee = 26,
Nomination: nomination = 28,
DiaOracleModule: dia_oracle = 29,
ClientsInfo: clients_info = 30,
RewardDistribution: reward_distribution = 31,
Security: security::{Pallet, Call, Config<T>, Storage, Event<T>} = 19,
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned} = 21,
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 22,
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>} = 23,
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>} = 24,
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>} = 25,
Fee: fee::{Pallet, Call, Config<T>, Storage} = 26,
Nomination: nomination::{Pallet, Call, Config<T>, Storage, Event<T>} = 28,
DiaOracleModule: dia_oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 29,
ClientsInfo: clients_info::{Pallet, Call, Storage, Event<T>} = 30,
RewardDistribution: reward_distribution::{Pallet, Call, Storage, Event<T>} = 31,
}
}

Expand Down
46 changes: 23 additions & 23 deletions testchain/runtime/testnet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -614,34 +614,34 @@ impl pooled_rewards::Config for Runtime {
construct_runtime! {
pub enum Runtime
{
System: frame_system = 0,
Timestamp: pallet_timestamp = 1,
Aura: pallet_aura = 2,
Grandpa: pallet_grandpa = 3,
Sudo: pallet_sudo = 4,
Tokens: orml_tokens = 5,
Currencies: orml_currencies = 7,
Balances: pallet_balances = 8,
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0,
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 1,
Aura: pallet_aura::{Pallet, Config<T>} = 2,
Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config<T>, Event} = 3,
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 4,
Tokens: orml_tokens::{Pallet, Call, Storage, Config<T>, Event<T>} = 5,
Currencies: orml_currencies::{Pallet, Call, Storage} = 7,
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 8,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 9,

StellarRelay: stellar_relay = 10,
StellarRelay: stellar_relay::{Pallet, Call, Config<T>, Storage, Event<T>} = 10,

VaultRewards: pooled_rewards = 15,
VaultStaking: staking = 16,
VaultRewards: pooled_rewards::{Pallet, Storage, Event<T>} = 15,
VaultStaking: staking::{Pallet, Storage, Event<T>} = 16,

Currency: currency = 17,
Currency: currency::{Pallet} = 17,

Security: security = 19,
VaultRegistry: vault_registry = 21,
Oracle: oracle = 22,
Issue: issue = 23,
Redeem: redeem = 24,
Replace: replace = 25,
Fee: fee = 26,
Nomination: nomination = 28,
DiaOracleModule: dia_oracle = 29,
ClientsInfo: clients_info = 30,
RewardDistribution: reward_distribution = 31,
Security: security::{Pallet, Call, Config<T>, Storage, Event<T>} = 19,
VaultRegistry: vault_registry::{Pallet, Call, Config<T>, Storage, Event<T>, ValidateUnsigned} = 21,
Oracle: oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 22,
Issue: issue::{Pallet, Call, Config<T>, Storage, Event<T>} = 23,
Redeem: redeem::{Pallet, Call, Config<T>, Storage, Event<T>} = 24,
Replace: replace::{Pallet, Call, Config<T>, Storage, Event<T>} = 25,
Fee: fee::{Pallet, Call, Config<T>, Storage} = 26,
Nomination: nomination::{Pallet, Call, Config<T>, Storage, Event<T>} = 28,
DiaOracleModule: dia_oracle::{Pallet, Call, Config<T>, Storage, Event<T>} = 29,
ClientsInfo: clients_info::{Pallet, Call, Storage, Event<T>} = 30,
RewardDistribution: reward_distribution::{Pallet, Call, Storage, Event<T>} = 31,
}
}

Expand Down

0 comments on commit 17f8100

Please sign in to comment.