Skip to content

Commit

Permalink
enable freezes and holds
Browse files Browse the repository at this point in the history
  • Loading branch information
liamaharon committed Oct 16, 2023
1 parent bf6da3c commit 44357f6
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 24 deletions.
11 changes: 5 additions & 6 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,7 @@ impl pallet_indices::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -304,14 +303,14 @@ impl pallet_balances::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type MaxLocks = ConstU32<50>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type FreezeIdentifier = ();
type MaxFreezes = ();
type MaxFreezes = ConstU32<50>;
type RuntimeHoldReason = RuntimeHoldReason;
type MaxHolds = ConstU32<1>;
type MaxHolds = MaxHolds;
}

parameter_types! {
Expand Down
11 changes: 5 additions & 6 deletions relay/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,7 @@ impl pallet_indices::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxLocks: u32 = 50;
pub const MaxReserves: u32 = 50;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -296,14 +295,14 @@ impl pallet_balances::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ExistentialDeposit = ExistentialDeposit;
type AccountStore = System;
type MaxLocks = MaxLocks;
type MaxReserves = MaxReserves;
type MaxLocks = ConstU32<50>;
type MaxReserves = ConstU32<50>;
type ReserveIdentifier = [u8; 8];
type WeightInfo = weights::pallet_balances::WeightInfo<Runtime>;
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down
7 changes: 3 additions & 4 deletions system-parachains/asset-hubs/asset-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ impl pallet_authorship::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -216,10 +217,8 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
// We allow each account to have holds on it from:
// - `NftFractionalization`: 1
type MaxHolds = ConstU32<1>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down
5 changes: 3 additions & 2 deletions system-parachains/asset-hubs/asset-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ impl pallet_authorship::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -234,8 +235,8 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down
5 changes: 3 additions & 2 deletions system-parachains/bridge-hubs/bridge-hub-kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ impl pallet_authorship::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -252,8 +253,8 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down
5 changes: 3 additions & 2 deletions system-parachains/bridge-hubs/bridge-hub-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ impl pallet_authorship::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -252,8 +253,8 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down
5 changes: 3 additions & 2 deletions system-parachains/collectives/collectives-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ impl pallet_authorship::Config for Runtime {

parameter_types! {
pub const ExistentialDeposit: Balance = EXISTENTIAL_DEPOSIT;
pub const MaxHolds: u32 = u32::MAX;
}

impl pallet_balances::Config for Runtime {
Expand All @@ -210,8 +211,8 @@ impl pallet_balances::Config for Runtime {
type ReserveIdentifier = [u8; 8];
type RuntimeHoldReason = RuntimeHoldReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<0>;
type MaxFreezes = ConstU32<0>;
type MaxHolds = MaxHolds;
type MaxFreezes = ConstU32<50>;
}

parameter_types! {
Expand Down

0 comments on commit 44357f6

Please sign in to comment.