Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
AurevoirXavier committed Jun 20, 2024
1 parent b86f455 commit 48bb6c7
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 10 deletions.
2 changes: 1 addition & 1 deletion runtime/crab/src/pallets/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = pallet_config::ExistentialDeposit;
type FreezeIdentifier = ();
type MaxFreezes = ();
type MaxHolds = ();
type MaxHolds = ConstU32<1>;
type MaxLocks = ConstU32<50>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
Expand Down
14 changes: 12 additions & 2 deletions runtime/crab/src/pallets/preimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
pub const PreimageByteDeposit: Balance = deposit(0, 1);
pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
}

impl pallet_preimage::Config for Runtime {
type BaseDeposit = ConstU128<{ 500 * UNIT }>;
type ByteDeposit = ConstU128<{ darwinia_deposit(0, 1) }>;
type Consideration = HoldConsideration<
AccountId,
Balances,
PreimageHoldReason,
LinearStoragePrice<PreimageBaseDeposit, PreimageByteDeposit, Balance>,
>;
type Currency = Balances;
type ManagerOrigin = Root;
type RuntimeEvent = RuntimeEvent;
Expand Down
2 changes: 1 addition & 1 deletion runtime/darwinia/src/pallets/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = pallet_config::ExistentialDeposit;
type FreezeIdentifier = ();
type MaxFreezes = ();
type MaxHolds = ();
type MaxHolds = ConstU32<1>;
type MaxLocks = ConstU32<50>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
Expand Down
14 changes: 12 additions & 2 deletions runtime/darwinia/src/pallets/preimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,19 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
pub const PreimageByteDeposit: Balance = deposit(0, 1);
pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
}

impl pallet_preimage::Config for Runtime {
type BaseDeposit = ConstU128<{ 500 * UNIT }>;
type ByteDeposit = ConstU128<{ darwinia_deposit(0, 1) }>;
type Consideration = HoldConsideration<
AccountId,
Balances,
PreimageHoldReason,
LinearStoragePrice<PreimageBaseDeposit, PreimageByteDeposit, Balance>,
>;
type Currency = Balances;
type ManagerOrigin = Root;
type RuntimeEvent = RuntimeEvent;
Expand Down
2 changes: 1 addition & 1 deletion runtime/koi/src/pallets/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl pallet_balances::Config for Runtime {
type ExistentialDeposit = pallet_config::ExistentialDeposit;
type FreezeIdentifier = ();
type MaxFreezes = ();
type MaxHolds = ();
type MaxHolds = ConstU32<1>;
type MaxLocks = ConstU32<50>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
Expand Down
16 changes: 13 additions & 3 deletions runtime/koi/src/pallets/preimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,21 @@
// darwinia
use crate::*;

frame_support::parameter_types! {
pub const PreimageBaseDeposit: Balance = deposit(2, 64);
pub const PreimageByteDeposit: Balance = deposit(0, 1);
pub const PreimageHoldReason: RuntimeHoldReason = RuntimeHoldReason::Preimage(pallet_preimage::HoldReason::Preimage);
}

impl pallet_preimage::Config for Runtime {
type BaseDeposit = ConstU128<{ 500 * UNIT }>;
type ByteDeposit = ConstU128<{ darwinia_deposit(0, 1) }>;
type Consideration = HoldConsideration<
AccountId,
Balances,
PreimageHoldReason,
LinearStoragePrice<PreimageBaseDeposit, PreimageByteDeposit, Balance>,
>;
type Currency = Balances;
type ManagerOrigin = RootOr<GeneralAdmin>;
type ManagerOrigin = Root;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = weights::pallet_preimage::WeightInfo<Self>;
}

0 comments on commit 48bb6c7

Please sign in to comment.