Skip to content
Prev Previous commit
Next Next commit
update mock
  • Loading branch information
Aideepakchaudhary committed Oct 10, 2024
commit 7f55e0863f48d71e8548a0934cae93d92dcc093a
13 changes: 10 additions & 3 deletions pallets/ddc-clusters-gov/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ use ddc_primitives::{
use frame_support::{
parameter_types,
traits::{
ConstBool, ConstU32, ConstU64, EnsureOriginWithArg, EqualPrivilegeOnly, Everything, Nothing,
fungible::HoldConsideration, ConstBool, ConstU32, ConstU64, EnsureOriginWithArg,
EqualPrivilegeOnly, Everything, LinearStoragePrice, Nothing,
},
weights::constants::RocksDbWeight,
PalletId,
Expand Down Expand Up @@ -58,7 +59,7 @@ frame_support::construct_runtime!(
{
System: frame_system::{Pallet, Call, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>},
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>, HoldReason},
Referenda: pallet_referenda::{Pallet, Call, Storage, Event<T>},
ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event<T>},
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
Expand Down Expand Up @@ -142,14 +143,20 @@ parameter_types! {
pub const PreimageMaxSize: u32 = 4096 * 1024;
pub const PreimageBaseDeposit: Balance = 0;
pub const PreimageByteDeposit: Balance = 0;
pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
}

impl pallet_preimage::Config for Test {
type WeightInfo = ();
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type ManagerOrigin = EnsureRoot<AccountId>;
type Consideration = ();
type Consideration = HoldConsideration<
AccountId,
Balances,
PreimageHoldReason,
LinearStoragePrice<PreimageBaseDeposit, PreimageByteDeposit, Balance>,
>;
}

parameter_types! {
Expand Down