Skip to content

Commit ba912a4

Browse files
author
Ayush
committed
Fix test-cases compilation issue in pallets
1 parent a9c02c6 commit ba912a4

File tree

27 files changed

+261
-105
lines changed

27 files changed

+261
-105
lines changed

pallets/exchange-rate/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
impl roaming_operators::Config for Test {
9197
type Currency = Balances;
9298
type Event = ();

pallets/mining/claims/hardware/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/claims/token/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/eligibility/hardware/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/eligibility/token/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/rates/hardware/src/mock.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,10 +65,12 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
7172
}
73+
7274
impl pallet_balances::Config for Test {
7375
type AccountStore = System;
7476
type Balance = u64;
@@ -77,6 +79,8 @@ impl pallet_balances::Config for Test {
7779
type ExistentialDeposit = ExistentialDeposit;
7880
type MaxLocks = ();
7981
type WeightInfo = ();
82+
type MaxReserves = ();
83+
type ReserveIdentifier = [u8; 8];
8084
}
8185
parameter_types! {
8286
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +91,9 @@ impl pallet_transaction_payment::Config for Test {
8791
type TransactionByteFee = TransactionByteFee;
8892
type WeightToFee = IdentityFee<u64>;
8993
}
94+
95+
impl pallet_randomness_collective_flip::Config for Test {}
96+
9097
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9198
impl roaming_operators::Config for Test {
9299
type Currency = Balances;

pallets/mining/rates/token/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/sampling/hardware/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

pallets/mining/sampling/token/src/mock.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ frame_support::construct_runtime!(
3232
NodeBlock = Block,
3333
UncheckedExtrinsic = UncheckedExtrinsic,
3434
{
35-
System: frame_system::{Module, Call, Config, Storage, Event<T>},
36-
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
37-
TransactionPayment: pallet_transaction_payment::{Module, Storage},
38-
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Module, Call, Storage},
35+
System: frame_system::{Pallet, Call, Config, Storage, Event<T>},
36+
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
37+
TransactionPayment: pallet_transaction_payment::{Pallet, Storage},
38+
RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage},
3939
}
4040
);
4141

@@ -65,6 +65,7 @@ impl frame_system::Config for Test {
6565
type SS58Prefix = ();
6666
type SystemWeightInfo = ();
6767
type Version = ();
68+
type OnSetCode = ();
6869
}
6970
parameter_types! {
7071
pub const ExistentialDeposit: u64 = 1;
@@ -77,6 +78,8 @@ impl pallet_balances::Config for Test {
7778
type ExistentialDeposit = ExistentialDeposit;
7879
type MaxLocks = ();
7980
type WeightInfo = ();
81+
type MaxReserves = ();
82+
type ReserveIdentifier = [u8; 8];
8083
}
8184
parameter_types! {
8285
pub const TransactionByteFee: u64 = 1;
@@ -87,6 +90,9 @@ impl pallet_transaction_payment::Config for Test {
8790
type TransactionByteFee = TransactionByteFee;
8891
type WeightToFee = IdentityFee<u64>;
8992
}
93+
94+
impl pallet_randomness_collective_flip::Config for Test {}
95+
9096
// FIXME - remove this when figure out how to use these types within mining-speed-boost runtime module itself
9197
impl roaming_operators::Config for Test {
9298
type Currency = Balances;

0 commit comments

Comments
 (0)