@@ -1039,8 +1039,8 @@ impl pallet_tx_pause::Config for Runtime {
10391039}
10401040
10411041parameter_types ! {
1042- pub const BasicDeposit : Balance = deposit( 0 , 100 ) ;
1043- pub const ByteDeposit : Balance = deposit( 0 , 100 ) ;
1042+ pub const BasicDeposit : Balance = deposit( 0 , 10 ) ;
1043+ pub const ByteDeposit : Balance = deposit( 0 , 10 ) ;
10441044 pub const SubAccountDeposit : Balance = deposit( 1 , 1 ) ;
10451045 pub const MaxSubAccounts : u32 = 100 ;
10461046 #[ derive( Serialize , Deserialize ) ]
@@ -1200,9 +1200,9 @@ impl pallet_proxy::Config for Runtime {
12001200}
12011201
12021202parameter_types ! {
1203- pub const AssetDeposit : Balance = 10 * UNIT ;
1204- pub const AssetAccountDeposit : Balance = DOLLAR ;
1205- pub const ApprovalDeposit : Balance = ExistentialDeposit :: get ( ) ;
1203+ pub const AssetDeposit : Balance = 0 ;
1204+ pub const AssetAccountDeposit : Balance = 0 ;
1205+ pub const ApprovalDeposit : Balance = 0 ;
12061206 pub const AssetsStringLimit : u32 = 50 ;
12071207 // set to zero since only the LST pallet is allowed to create assets
12081208 pub const MetadataDepositBase : Balance = 0 ;
@@ -1215,12 +1215,6 @@ pub type AssetId = u128;
12151215#[ cfg( feature = "runtime-benchmarks" ) ]
12161216pub type AssetId = u32 ;
12171217
1218- // impl tangle_primitives::traits::NextAssetId<AssetId> for Runtime {
1219- // fn next_asset_id() -> Option<AssetId> {
1220- // pallet_assets::NextAssetId::<Runtime, GeneralAssetsInstance>::get()
1221- // }
1222- // }
1223-
12241218ord_parameter_types ! {
12251219 pub const LstPalletOrigin : sp_runtime:: AccountId32 =
12261220 AccountIdConversion :: <sp_runtime:: AccountId32 >:: into_account_truncating( & LstPalletId :: get( ) ) ;
@@ -1237,7 +1231,7 @@ impl pallet_assets::Config<LstPoolAssetsInstance> for Runtime {
12371231 // only lst pallet can create pool tokens
12381232 type CreateOrigin =
12391233 AsEnsureOriginWithArg < EnsureSignedBy < LstPalletOrigin , sp_runtime:: AccountId32 > > ;
1240- type ForceOrigin = frame_system :: EnsureRoot < Self :: AccountId > ;
1234+ type ForceOrigin = EnsureRootOrHalfCouncil ;
12411235 type AssetDeposit = AssetDeposit ;
12421236 type AssetAccountDeposit = AssetAccountDeposit ;
12431237 type MetadataDepositBase = MetadataDepositBase ;
@@ -1254,39 +1248,58 @@ impl pallet_assets::Config<LstPoolAssetsInstance> for Runtime {
12541248}
12551249
12561250parameter_types ! {
1257- pub const MinOperatorBondAmount : Balance = 10_000 ;
1258- pub const BondDuration : u32 = 10 ;
1259- pub const MinDelegateAmount : Balance = 1000 ;
1251+ // Min operator bond amount to `join_operators`
1252+ pub const MinOperatorBondAmount : Balance = 10 * UNIT ;
1253+ // Min delegate amount to `delegate`
1254+ pub const MinDelegateAmount : Balance = 10 * UNIT ;
1255+ // Time delay for leaving operators, time between `schedule_leave_operators` and `execute_leave_operators`
1256+ pub const LeaveOperatorsDelay : u32 = 14 ;
1257+ // Time delay for reducing operator bond
1258+ pub const OperatorBondLessDelay : u32 = 14 ;
1259+ // Time delay for leaving delegators, time between `schedule_withdraw` and `execute_withdraw`
1260+ pub const LeaveDelegatorsDelay : u32 = 7 ;
1261+ // Time delay for reducing delegation bond, time between `schedule_delegator_unstake` and `execute_delegator_unstake`
1262+ pub const DelegationBondLessDelay : u32 = 7 ;
1263+
12601264 pub PID : PalletId = PalletId ( * b"PotStake" ) ;
1265+
1266+ // Max number of blueprints a delegator can have in Fixed mode per operator
12611267 #[ derive( PartialEq , Eq , Clone , Copy , Debug , Encode , Decode , MaxEncodedLen , TypeInfo ) ]
1262- pub const MaxDelegatorBlueprints : u32 = 50 ;
1268+ pub const MaxDelegatorBlueprints : u32 = 16 ;
1269+
1270+ // Max number of blueprints an operator can support
12631271 #[ derive( PartialEq , Eq , Clone , Copy , Debug , Encode , Decode , MaxEncodedLen , TypeInfo ) ]
1264- pub const MaxOperatorBlueprints : u32 = 50 ;
1272+ pub const MaxOperatorBlueprints : u32 = 16 ;
1273+
1274+ // Max number of withdraw requests a delegator can have
12651275 #[ derive( PartialEq , Eq , Clone , Copy , Debug , Encode , Decode , MaxEncodedLen , TypeInfo ) ]
1266- pub const MaxWithdrawRequests : u32 = 5 ;
1276+ pub const MaxWithdrawRequests : u32 = 8 ;
1277+
1278+ // Max number of unstake requests a delegator can have
12671279 #[ derive( PartialEq , Eq , Clone , Copy , Debug , Encode , Decode , MaxEncodedLen , TypeInfo ) ]
1268- pub const MaxUnstakeRequests : u32 = 5 ;
1280+ pub const MaxUnstakeRequests : u32 = 8 ;
1281+
1282+ // Max number of delegations a delegator can have
12691283 #[ derive( PartialEq , Eq , Clone , Copy , Debug , Encode , Decode , MaxEncodedLen , TypeInfo ) ]
1270- pub const MaxDelegations : u32 = 50 ;
1284+ pub const MaxDelegations : u32 = 64 ;
12711285}
12721286
12731287impl pallet_multi_asset_delegation:: Config for Runtime {
12741288 type RuntimeEvent = RuntimeEvent ;
12751289 type Currency = Balances ;
12761290 type SlashRecipient = TreasuryAccount ;
12771291 type MinOperatorBondAmount = MinOperatorBondAmount ;
1278- type BondDuration = BondDuration ;
12791292 type CurrencyToVote = U128CurrencyToVote ;
12801293 type StakingInterface = Staking ;
12811294 type ServiceManager = Services ;
1282- type LeaveOperatorsDelay = ConstU32 < 10 > ;
1283- type OperatorBondLessDelay = ConstU32 < 1 > ;
1284- type LeaveDelegatorsDelay = ConstU32 < 1 > ;
1285- type DelegationBondLessDelay = ConstU32 < 5 > ;
1295+ type LeaveOperatorsDelay = LeaveOperatorsDelay ;
1296+ type OperatorBondLessDelay = OperatorBondLessDelay ;
1297+ type LeaveDelegatorsDelay = LeaveDelegatorsDelay ;
1298+ type DelegationBondLessDelay = DelegationBondLessDelay ;
12861299 type MinDelegateAmount = MinDelegateAmount ;
12871300 type Fungibles = Assets ;
12881301 type AssetId = AssetId ;
1289- type ForceOrigin = frame_system :: EnsureRoot < Self :: AccountId > ;
1302+ type ForceOrigin = EnsureRootOrHalfCouncil ;
12901303 type PalletId = PID ;
12911304 type MaxDelegatorBlueprints = MaxDelegatorBlueprints ;
12921305 type MaxOperatorBlueprints = MaxOperatorBlueprints ;
@@ -1301,8 +1314,9 @@ impl pallet_multi_asset_delegation::Config for Runtime {
13011314}
13021315
13031316parameter_types ! {
1317+ // `PostUnbondingPoolsWindow` taken from polkadot runtime
13041318 pub const PostUnbondingPoolsWindow : u32 = 2 ;
1305- pub const MaxMetadataLen : u32 = 2 ;
1319+ pub const MaxMetadataLen : u32 = 256 ;
13061320 pub const CheckLevel : u8 = 255 ;
13071321 pub const LstPalletId : PalletId = PalletId ( * b"py/tnlst" ) ;
13081322}
@@ -1326,15 +1340,15 @@ impl pallet_tangle_lst::Config for Runtime {
13261340 type Fungibles = Assets ;
13271341 type AssetId = AssetId ;
13281342 type PoolId = AssetId ;
1329- type ForceOrigin = frame_system :: EnsureRoot < AccountId > ;
1343+ type ForceOrigin = EnsureRootOrHalfCouncil ;
13301344 type MaxPointsToBalance = frame_support:: traits:: ConstU8 < 10 > ;
13311345}
13321346
13331347parameter_types ! {
13341348 pub const RewardsPID : PalletId = PalletId ( * b"py/tnrew" ) ;
13351349 pub const MaxDepositCap : u128 = UNIT * 100_000_000 ;
13361350 pub const MaxIncentiveCap : u128 = UNIT * 100_000_000 ;
1337- pub const MaxApy : Perbill = Perbill :: from_percent( 20 ) ;
1351+ pub const MaxApy : Perbill = Perbill :: from_percent( 2 ) ;
13381352 pub const MinDepositCap : u128 = 0 ;
13391353 pub const MinIncentiveCap : u128 = 0 ;
13401354}
@@ -1346,7 +1360,7 @@ impl pallet_rewards::Config for Runtime {
13461360 type PalletId = RewardsPID ;
13471361 type VaultId = u32 ;
13481362 type DelegationManager = MultiAssetDelegation ;
1349- type ForceOrigin = frame_system :: EnsureRoot < AccountId > ;
1363+ type ForceOrigin = EnsureRootOrHalfCouncil ;
13501364 type MaxApy = MaxApy ;
13511365 type MaxDepositCap = MaxDepositCap ;
13521366 type MaxIncentiveCap = MaxIncentiveCap ;
0 commit comments