Skip to content

Commit 47ef523

Browse files
authored
fix: update credits rpc and constants (#1045)
* chore: add mainnet rpc * chore: format
1 parent 07b5c21 commit 47ef523

File tree

5 files changed

+202
-52
lines changed

5 files changed

+202
-52
lines changed

node/src/rpc/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,19 @@ where
238238
SC: SelectChain<Block> + 'static,
239239
B: sc_client_api::Backend<Block> + Send + Sync + 'static,
240240
B::State: sc_client_api::backend::StateBackend<sp_runtime::traits::BlakeTwo256>,
241+
C::Api: pallet_services_rpc::ServicesRuntimeApi<
242+
Block,
243+
PalletServicesConstraints,
244+
AccountId,
245+
AssetId,
246+
>,
247+
C::Api: pallet_rewards_rpc::RewardsRuntimeApi<Block, AccountId, AssetId, Balance>,
248+
C::Api: pallet_credits_rpc::CreditsRuntimeApi<Block, AccountId, Balance, AssetId>,
241249
CIDP: sp_inherents::CreateInherentDataProviders<Block, ()> + Send + Sync + 'static,
242250
{
251+
use pallet_credits_rpc::{CreditsApiServer, CreditsClient};
252+
use pallet_rewards_rpc::{RewardsApiServer, RewardsClient};
253+
use pallet_services_rpc::{ServicesApiServer, ServicesClient};
243254
use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};
244255
use sc_consensus_babe_rpc::{Babe, BabeApiServer};
245256
use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer};
@@ -268,6 +279,9 @@ where
268279

269280
io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?;
270281
io.merge(TransactionPayment::new(client.clone()).into_rpc())?;
282+
io.merge(ServicesClient::new(client.clone()).into_rpc())?;
283+
io.merge(RewardsClient::new(client.clone()).into_rpc())?;
284+
io.merge(CreditsClient::new(client.clone()).into_rpc())?;
271285
//io.merge(IsmpRpcHandler::new(client.clone(), backend)?.into_rpc())?;
272286

273287
io.merge(

primitives/src/lib.rs

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,59 @@ pub mod credits {
321321
pub const CLAIM_WINDOW_BLOCKS: u64 = DAYS * 7;
322322
}
323323

324+
pub mod multi_asset_delegation {
325+
use crate::types::Balance;
326+
use frame_support::PalletId;
327+
328+
/// Minimum amount required to become an operator
329+
pub const MIN_OPERATOR_BOND_AMOUNT: Balance = 100;
330+
331+
/// Minimum amount required to delegate
332+
pub const MIN_DELEGATE_AMOUNT: Balance = 1;
333+
334+
/// Pallet ID for multi-asset-delegation
335+
pub const PALLET_ID: PalletId = PalletId(*b"PotStake");
336+
337+
/// Maximum number of blueprints a delegator can have
338+
pub const MAX_DELEGATOR_BLUEPRINTS: u32 = 50;
339+
340+
/// Maximum number of blueprints an operator can have
341+
pub const MAX_OPERATOR_BLUEPRINTS: u32 = 50;
342+
343+
/// Maximum number of pending withdraw requests
344+
pub const MAX_WITHDRAW_REQUESTS: u32 = 5;
345+
346+
/// Maximum number of pending unstake requests
347+
pub const MAX_UNSTAKE_REQUESTS: u32 = 5;
348+
349+
/// Maximum number of delegations per delegator
350+
pub const MAX_DELEGATIONS: u32 = 50;
351+
352+
/// Leave operators delay for fast runtime
353+
pub const LEAVE_OPERATORS_DELAY_FAST: u32 = 1;
354+
355+
/// Leave delegators delay for fast runtime
356+
pub const LEAVE_DELEGATORS_DELAY_FAST: u32 = 1;
357+
358+
/// Delegation bond less delay for fast runtime
359+
pub const DELEGATION_BOND_LESS_DELAY_FAST: u32 = 1;
360+
361+
/// Operator bond less delay for fast runtime
362+
pub const OPERATOR_BOND_LESS_DELAY_FAST: u32 = 1;
363+
364+
/// Leave operators delay for normal runtime
365+
pub const LEAVE_OPERATORS_DELAY: u32 = 10;
366+
367+
/// Leave delegators delay for normal runtime
368+
pub const LEAVE_DELEGATORS_DELAY: u32 = 10;
369+
370+
/// Delegation bond less delay for normal runtime
371+
pub const DELEGATION_BOND_LESS_DELAY: u32 = 5;
372+
373+
/// Operator bond less delay for normal runtime
374+
pub const OPERATOR_BOND_LESS_DELAY: u32 = 5;
375+
}
376+
324377
/// We assume that ~10% of the block weight is consumed by `on_initialize` handlers. This is
325378
/// used to limit the maximal weight of a single extrinsic.
326379
pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);

primitives/src/types/rewards.rs

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,57 @@ use scale_info::TypeInfo;
66
use services::AssetIdT;
77
use sp_std::vec::Vec;
88

9+
// Rewards Pallet Constants
10+
use crate::{currency::UNIT, types::Balance};
11+
use frame_support::PalletId;
12+
use sp_runtime::Perbill;
13+
14+
/// Pallet ID for rewards
15+
pub const PALLET_ID: PalletId = PalletId(*b"py/tnrew");
16+
17+
/// Minimum deposit cap (same for both mainnet and testnet)
18+
pub const MIN_DEPOSIT_CAP: Balance = 0;
19+
20+
/// Minimum incentive cap (same for both mainnet and testnet)
21+
pub const MIN_INCENTIVE_CAP: Balance = 0;
22+
23+
/// Maximum vault name length
24+
pub const MAX_VAULT_NAME_LENGTH: u32 = 64;
25+
26+
/// Maximum vault logo length
27+
pub const MAX_VAULT_LOGO_LENGTH: u32 = 256;
28+
29+
/// Maximum pending rewards per operator
30+
pub const MAX_PENDING_REWARDS_PER_OPERATOR: u32 = 100;
31+
32+
/// Mainnet-specific constants
33+
pub mod mainnet {
34+
use super::*;
35+
36+
/// Maximum deposit cap for mainnet
37+
pub const MAX_DEPOSIT_CAP: Balance = UNIT * 100_000_000;
38+
39+
/// Maximum incentive cap for mainnet
40+
pub const MAX_INCENTIVE_CAP: Balance = UNIT * 100_000_000;
41+
42+
/// Maximum APY for mainnet (2%)
43+
pub const MAX_APY: Perbill = Perbill::from_percent(2);
44+
}
45+
46+
/// Testnet-specific constants
47+
pub mod testnet {
48+
use super::*;
49+
50+
/// Maximum deposit cap for testnet
51+
pub const MAX_DEPOSIT_CAP: Balance = UNIT * 1_000_000_000_000;
52+
53+
/// Maximum incentive cap for testnet
54+
pub const MAX_INCENTIVE_CAP: Balance = UNIT * 1_000_000_000_000;
55+
56+
/// Maximum APY for testnet (20%)
57+
pub const MAX_APY: Perbill = Perbill::from_percent(20);
58+
}
59+
960
#[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Eq)]
1061
pub enum AssetType<AssetId> {
1162
/// This includes all lstTNT assets

runtime/mainnet/src/lib.rs

Lines changed: 54 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,14 +1273,14 @@ impl pallet_tangle_lst::Config for Runtime {
12731273
}
12741274

12751275
parameter_types! {
1276-
pub const RewardsPID: PalletId = PalletId(*b"py/tnrew");
1277-
pub const MaxDepositCap: u128 = UNIT * 100_000_000;
1278-
pub const MaxIncentiveCap: u128 = UNIT * 100_000_000;
1279-
pub const MaxApy: Perbill = Perbill::from_percent(2);
1280-
pub const MinDepositCap: u128 = 0;
1281-
pub const MinIncentiveCap: u128 = 0;
1282-
pub const MaxVaultNameLen: u32 = 64;
1283-
pub const MaxVaultLogoLen: u32 = 256;
1276+
pub const RewardsPID: PalletId = tangle_primitives::types::rewards::PALLET_ID;
1277+
pub const MaxDepositCap: Balance = tangle_primitives::types::rewards::mainnet::MAX_DEPOSIT_CAP;
1278+
pub const MaxIncentiveCap: Balance = tangle_primitives::types::rewards::mainnet::MAX_INCENTIVE_CAP;
1279+
pub const MaxApy: Perbill = tangle_primitives::types::rewards::mainnet::MAX_APY;
1280+
pub const MinDepositCap: Balance = tangle_primitives::types::rewards::MIN_DEPOSIT_CAP;
1281+
pub const MinIncentiveCap: Balance = tangle_primitives::types::rewards::MIN_INCENTIVE_CAP;
1282+
pub const MaxVaultNameLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_NAME_LENGTH;
1283+
pub const MaxVaultLogoLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_LOGO_LENGTH;
12841284
}
12851285

12861286
impl pallet_rewards::Config for Runtime {
@@ -1299,56 +1299,60 @@ impl pallet_rewards::Config for Runtime {
12991299
type MaxVaultNameLength = MaxVaultNameLen;
13001300
type MaxVaultLogoLength = MaxVaultLogoLen;
13011301
type VaultMetadataOrigin = EnsureRootOrHalfCouncil;
1302-
type MaxPendingRewardsPerOperator = ConstU32<100>;
1302+
type MaxPendingRewardsPerOperator =
1303+
ConstU32<{ tangle_primitives::types::rewards::MAX_PENDING_REWARDS_PER_OPERATOR }>;
13031304
type WeightInfo = ();
13041305
}
13051306

13061307
parameter_types! {
1307-
pub const MinOperatorBondAmount: Balance = 100;
1308+
pub const MinOperatorBondAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_OPERATOR_BOND_AMOUNT;
1309+
pub const MinDelegateAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_DELEGATE_AMOUNT;
1310+
pub PID: PalletId = tangle_primitives::multi_asset_delegation::PALLET_ID;
13081311

1309-
pub const MinDelegateAmount : Balance = 1;
1310-
pub PID: PalletId = PalletId(*b"PotStake");
13111312
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1312-
pub const MaxDelegatorBlueprints : u32 = 50;
1313-
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1314-
pub const MaxOperatorBlueprints : u32 = 50;
1313+
pub const MaxDelegatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATOR_BLUEPRINTS;
1314+
13151315
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1316-
pub const MaxWithdrawRequests: u32 = 5;
1316+
pub const MaxOperatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_OPERATOR_BLUEPRINTS;
1317+
13171318
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1318-
pub const MaxUnstakeRequests: u32 = 5;
1319+
pub const MaxWithdrawRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_WITHDRAW_REQUESTS;
1320+
13191321
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1320-
pub const MaxDelegations: u32 = 50;
1322+
pub const MaxUnstakeRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_UNSTAKE_REQUESTS;
13211323

1324+
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1325+
pub const MaxDelegations: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATIONS;
13221326
}
13231327

13241328
#[cfg(feature = "fast-runtime")]
13251329
parameter_types! {
13261330
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1327-
pub const LeaveOperatorsDelay: u32 = 1;
1331+
pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY_FAST;
13281332

13291333
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1330-
pub const LeaveDelegatorsDelay: u32 = 1;
1334+
pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY_FAST;
13311335

13321336
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1333-
pub const DelegationBondLessDelay: u32 = 1;
1337+
pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY_FAST;
13341338

13351339
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1336-
pub const OperatorBondLessDelay: u32 = 1;
1340+
pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY_FAST;
13371341
}
13381342

13391343
#[cfg(not(feature = "fast-runtime"))]
13401344
parameter_types! {
13411345
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1342-
pub const LeaveOperatorsDelay: u32 = 10;
1346+
pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY;
13431347

13441348
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1345-
pub const LeaveDelegatorsDelay: u32 = 10;
1349+
pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY;
13461350

13471351
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1348-
pub const DelegationBondLessDelay: u32 = 5;
1352+
pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY;
13491353

13501354
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1351-
pub const OperatorBondLessDelay: u32 = 5;
1355+
pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY;
13521356
}
13531357

13541358
impl pallet_multi_asset_delegation::Config for Runtime {
@@ -2235,4 +2239,28 @@ impl_runtime_apis! {
22352239
Services::service_requests_with_blueprints_by_operator(operator).map_err(Into::into)
22362240
}
22372241
}
2242+
2243+
impl pallet_rewards_rpc_runtime_api::RewardsApi<Block, AccountId, AssetId, Balance> for Runtime {
2244+
fn query_user_rewards(
2245+
account_id: AccountId,
2246+
asset_id: tangle_primitives::services::Asset<AssetId>,
2247+
) -> Result<Balance, sp_runtime::DispatchError> {
2248+
Rewards::calculate_rewards(&account_id, asset_id)
2249+
}
2250+
}
2251+
2252+
impl pallet_credits_rpc_runtime_api::CreditsApi<Block, AccountId, Balance, AssetId> for Runtime {
2253+
fn query_user_credits(
2254+
account_id: AccountId,
2255+
) -> Result<Balance, sp_runtime::DispatchError> {
2256+
Credits::get_accrued_amount(&account_id, None)
2257+
}
2258+
2259+
fn query_user_credits_with_asset(
2260+
account_id: AccountId,
2261+
asset_id: AssetId,
2262+
) -> Result<Balance, sp_runtime::DispatchError> {
2263+
Credits::get_accrued_amount_for_asset(&account_id, None, asset_id)
2264+
}
2265+
}
22382266
}

runtime/testnet/src/lib.rs

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,14 +1228,14 @@ impl pallet_tangle_lst::Config for Runtime {
12281228
}
12291229

12301230
parameter_types! {
1231-
pub const RewardsPID: PalletId = PalletId(*b"py/tnrew");
1232-
pub const MaxDepositCap: u128 = UNIT * 1_000_000_000_000;
1233-
pub const MaxIncentiveCap: u128 = UNIT * 1_000_000_000_000;
1234-
pub const MaxApy: Perbill = Perbill::from_percent(20);
1235-
pub const MinDepositCap: u128 = 0;
1236-
pub const MinIncentiveCap: u128 = 0;
1237-
pub const MaxVaultNameLen: u32 = 64;
1238-
pub const MaxVaultLogoLen: u32 = 256;
1231+
pub const RewardsPID: PalletId = tangle_primitives::types::rewards::PALLET_ID;
1232+
pub const MaxDepositCap: Balance = tangle_primitives::types::rewards::testnet::MAX_DEPOSIT_CAP;
1233+
pub const MaxIncentiveCap: Balance = tangle_primitives::types::rewards::testnet::MAX_INCENTIVE_CAP;
1234+
pub const MaxApy: Perbill = tangle_primitives::types::rewards::testnet::MAX_APY;
1235+
pub const MinDepositCap: Balance = tangle_primitives::types::rewards::MIN_DEPOSIT_CAP;
1236+
pub const MinIncentiveCap: Balance = tangle_primitives::types::rewards::MIN_INCENTIVE_CAP;
1237+
pub const MaxVaultNameLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_NAME_LENGTH;
1238+
pub const MaxVaultLogoLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_LOGO_LENGTH;
12391239
}
12401240

12411241
impl pallet_rewards::Config for Runtime {
@@ -1254,7 +1254,8 @@ impl pallet_rewards::Config for Runtime {
12541254
type MaxVaultNameLength = MaxVaultNameLen;
12551255
type MaxVaultLogoLength = MaxVaultLogoLen;
12561256
type VaultMetadataOrigin = EnsureRootOrHalfCouncil;
1257-
type MaxPendingRewardsPerOperator = ConstU32<100>;
1257+
type MaxPendingRewardsPerOperator =
1258+
ConstU32<{ tangle_primitives::types::rewards::MAX_PENDING_REWARDS_PER_OPERATOR }>;
12581259
type WeightInfo = ();
12591260
}
12601261

@@ -1533,51 +1534,54 @@ impl pallet_assets::Config<LstPoolAssetsInstance> for Runtime {
15331534
}
15341535

15351536
parameter_types! {
1536-
pub const MinOperatorBondAmount: Balance = 100;
1537+
pub const MinOperatorBondAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_OPERATOR_BOND_AMOUNT;
1538+
pub const MinDelegateAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_DELEGATE_AMOUNT;
1539+
pub PID: PalletId = tangle_primitives::multi_asset_delegation::PALLET_ID;
15371540

1538-
pub const MinDelegateAmount : Balance = 1;
1539-
pub PID: PalletId = PalletId(*b"PotStake");
15401541
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1541-
pub const MaxDelegatorBlueprints : u32 = 50;
1542-
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1543-
pub const MaxOperatorBlueprints : u32 = 50;
1542+
pub const MaxDelegatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATOR_BLUEPRINTS;
1543+
15441544
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1545-
pub const MaxWithdrawRequests: u32 = 5;
1545+
pub const MaxOperatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_OPERATOR_BLUEPRINTS;
1546+
15461547
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1547-
pub const MaxUnstakeRequests: u32 = 5;
1548+
pub const MaxWithdrawRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_WITHDRAW_REQUESTS;
1549+
15481550
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1549-
pub const MaxDelegations: u32 = 50;
1551+
pub const MaxUnstakeRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_UNSTAKE_REQUESTS;
15501552

1553+
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1554+
pub const MaxDelegations: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATIONS;
15511555
}
15521556

15531557
#[cfg(feature = "fast-runtime")]
15541558
parameter_types! {
15551559
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1556-
pub const LeaveOperatorsDelay: u32 = 1;
1560+
pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY_FAST;
15571561

15581562
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1559-
pub const LeaveDelegatorsDelay: u32 = 1;
1563+
pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY_FAST;
15601564

15611565
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1562-
pub const DelegationBondLessDelay: u32 = 1;
1566+
pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY_FAST;
15631567

15641568
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1565-
pub const OperatorBondLessDelay: u32 = 1;
1569+
pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY_FAST;
15661570
}
15671571

15681572
#[cfg(not(feature = "fast-runtime"))]
15691573
parameter_types! {
15701574
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1571-
pub const LeaveOperatorsDelay: u32 = 10;
1575+
pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY;
15721576

15731577
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1574-
pub const LeaveDelegatorsDelay: u32 = 10;
1578+
pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY;
15751579

15761580
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1577-
pub const DelegationBondLessDelay: u32 = 5;
1581+
pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY;
15781582

15791583
#[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)]
1580-
pub const OperatorBondLessDelay: u32 = 5;
1584+
pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY;
15811585
}
15821586

15831587
impl pallet_multi_asset_delegation::Config for Runtime {

0 commit comments

Comments
 (0)