Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update mock
  • Loading branch information
Aideepakchaudhary committed Oct 10, 2024
commit b0577a6e887964af16e6474f61949f9ff2da4f53
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::{
derive_impl, 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 @@ -135,14 +136,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