From 4e974a6fbd50bc424c2eb384c0df37814788410c Mon Sep 17 00:00:00 2001 From: 1xstj <106580853+1xstj@users.noreply.github.com> Date: Fri, 1 Aug 2025 23:07:37 +0100 Subject: [PATCH 1/2] chore: add mainnet rpc --- node/src/rpc/mod.rs | 14 ++++++++++++++ runtime/mainnet/src/lib.rs | 24 ++++++++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 8de8d9d69..9b69c2a52 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -238,12 +238,23 @@ where SC: SelectChain + 'static, B: sc_client_api::Backend + Send + Sync + 'static, B::State: sc_client_api::backend::StateBackend, + C::Api: pallet_services_rpc::ServicesRuntimeApi< + Block, + PalletServicesConstraints, + AccountId, + AssetId, + >, + C::Api: pallet_rewards_rpc::RewardsRuntimeApi, + C::Api: pallet_credits_rpc::CreditsRuntimeApi, CIDP: sp_inherents::CreateInherentDataProviders + Send + Sync + 'static, { use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; + use pallet_credits_rpc::{CreditsApiServer, CreditsClient}; + use pallet_rewards_rpc::{RewardsApiServer, RewardsClient}; + use pallet_services_rpc::{ServicesApiServer, ServicesClient}; let mut io = RpcModule::new(()); @@ -268,6 +279,9 @@ where io.merge(System::new(client.clone(), pool, deny_unsafe).into_rpc())?; io.merge(TransactionPayment::new(client.clone()).into_rpc())?; + io.merge(ServicesClient::new(client.clone()).into_rpc())?; + io.merge(RewardsClient::new(client.clone()).into_rpc())?; + io.merge(CreditsClient::new(client.clone()).into_rpc())?; //io.merge(IsmpRpcHandler::new(client.clone(), backend)?.into_rpc())?; io.merge( diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index f1b0d6962..06663cb01 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -2235,4 +2235,28 @@ impl_runtime_apis! { Services::service_requests_with_blueprints_by_operator(operator).map_err(Into::into) } } + + impl pallet_rewards_rpc_runtime_api::RewardsApi for Runtime { + fn query_user_rewards( + account_id: AccountId, + asset_id: tangle_primitives::services::Asset, + ) -> Result { + Rewards::calculate_rewards(&account_id, asset_id) + } + } + + impl pallet_credits_rpc_runtime_api::CreditsApi for Runtime { + fn query_user_credits( + account_id: AccountId, + ) -> Result { + Credits::get_accrued_amount(&account_id, None) + } + + fn query_user_credits_with_asset( + account_id: AccountId, + asset_id: AssetId, + ) -> Result { + Credits::get_accrued_amount_for_asset(&account_id, None, asset_id) + } + } } From 0277820de585c92cc9adb51ad79f14c91d42c68c Mon Sep 17 00:00:00 2001 From: 1xstj <106580853+1xstj@users.noreply.github.com> Date: Mon, 4 Aug 2025 18:50:55 +0100 Subject: [PATCH 2/2] chore: format --- node/src/rpc/mod.rs | 6 ++-- primitives/src/lib.rs | 53 +++++++++++++++++++++++++++++++ primitives/src/types/rewards.rs | 51 ++++++++++++++++++++++++++++++ runtime/mainnet/src/lib.rs | 56 ++++++++++++++++++--------------- runtime/testnet/src/lib.rs | 56 ++++++++++++++++++--------------- 5 files changed, 167 insertions(+), 55 deletions(-) diff --git a/node/src/rpc/mod.rs b/node/src/rpc/mod.rs index 9b69c2a52..c3b6af435 100644 --- a/node/src/rpc/mod.rs +++ b/node/src/rpc/mod.rs @@ -248,13 +248,13 @@ where C::Api: pallet_credits_rpc::CreditsRuntimeApi, CIDP: sp_inherents::CreateInherentDataProviders + Send + Sync + 'static, { + use pallet_credits_rpc::{CreditsApiServer, CreditsClient}; + use pallet_rewards_rpc::{RewardsApiServer, RewardsClient}; + use pallet_services_rpc::{ServicesApiServer, ServicesClient}; use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer}; use sc_consensus_babe_rpc::{Babe, BabeApiServer}; use sc_consensus_grandpa_rpc::{Grandpa, GrandpaApiServer}; use substrate_frame_rpc_system::{System, SystemApiServer}; - use pallet_credits_rpc::{CreditsApiServer, CreditsClient}; - use pallet_rewards_rpc::{RewardsApiServer, RewardsClient}; - use pallet_services_rpc::{ServicesApiServer, ServicesClient}; let mut io = RpcModule::new(()); diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index d6335e02c..c15202500 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -321,6 +321,59 @@ pub mod credits { pub const CLAIM_WINDOW_BLOCKS: u64 = DAYS * 7; } +pub mod multi_asset_delegation { + use crate::types::Balance; + use frame_support::PalletId; + + /// Minimum amount required to become an operator + pub const MIN_OPERATOR_BOND_AMOUNT: Balance = 100; + + /// Minimum amount required to delegate + pub const MIN_DELEGATE_AMOUNT: Balance = 1; + + /// Pallet ID for multi-asset-delegation + pub const PALLET_ID: PalletId = PalletId(*b"PotStake"); + + /// Maximum number of blueprints a delegator can have + pub const MAX_DELEGATOR_BLUEPRINTS: u32 = 50; + + /// Maximum number of blueprints an operator can have + pub const MAX_OPERATOR_BLUEPRINTS: u32 = 50; + + /// Maximum number of pending withdraw requests + pub const MAX_WITHDRAW_REQUESTS: u32 = 5; + + /// Maximum number of pending unstake requests + pub const MAX_UNSTAKE_REQUESTS: u32 = 5; + + /// Maximum number of delegations per delegator + pub const MAX_DELEGATIONS: u32 = 50; + + /// Leave operators delay for fast runtime + pub const LEAVE_OPERATORS_DELAY_FAST: u32 = 1; + + /// Leave delegators delay for fast runtime + pub const LEAVE_DELEGATORS_DELAY_FAST: u32 = 1; + + /// Delegation bond less delay for fast runtime + pub const DELEGATION_BOND_LESS_DELAY_FAST: u32 = 1; + + /// Operator bond less delay for fast runtime + pub const OPERATOR_BOND_LESS_DELAY_FAST: u32 = 1; + + /// Leave operators delay for normal runtime + pub const LEAVE_OPERATORS_DELAY: u32 = 10; + + /// Leave delegators delay for normal runtime + pub const LEAVE_DELEGATORS_DELAY: u32 = 10; + + /// Delegation bond less delay for normal runtime + pub const DELEGATION_BOND_LESS_DELAY: u32 = 5; + + /// Operator bond less delay for normal runtime + pub const OPERATOR_BOND_LESS_DELAY: u32 = 5; +} + /// We assume that ~10% of the block weight is consumed by `on_initialize` handlers. This is /// used to limit the maximal weight of a single extrinsic. pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10); diff --git a/primitives/src/types/rewards.rs b/primitives/src/types/rewards.rs index db31c7f5f..432672ad8 100644 --- a/primitives/src/types/rewards.rs +++ b/primitives/src/types/rewards.rs @@ -6,6 +6,57 @@ use scale_info::TypeInfo; use services::AssetIdT; use sp_std::vec::Vec; +// Rewards Pallet Constants +use crate::{currency::UNIT, types::Balance}; +use frame_support::PalletId; +use sp_runtime::Perbill; + +/// Pallet ID for rewards +pub const PALLET_ID: PalletId = PalletId(*b"py/tnrew"); + +/// Minimum deposit cap (same for both mainnet and testnet) +pub const MIN_DEPOSIT_CAP: Balance = 0; + +/// Minimum incentive cap (same for both mainnet and testnet) +pub const MIN_INCENTIVE_CAP: Balance = 0; + +/// Maximum vault name length +pub const MAX_VAULT_NAME_LENGTH: u32 = 64; + +/// Maximum vault logo length +pub const MAX_VAULT_LOGO_LENGTH: u32 = 256; + +/// Maximum pending rewards per operator +pub const MAX_PENDING_REWARDS_PER_OPERATOR: u32 = 100; + +/// Mainnet-specific constants +pub mod mainnet { + use super::*; + + /// Maximum deposit cap for mainnet + pub const MAX_DEPOSIT_CAP: Balance = UNIT * 100_000_000; + + /// Maximum incentive cap for mainnet + pub const MAX_INCENTIVE_CAP: Balance = UNIT * 100_000_000; + + /// Maximum APY for mainnet (2%) + pub const MAX_APY: Perbill = Perbill::from_percent(2); +} + +/// Testnet-specific constants +pub mod testnet { + use super::*; + + /// Maximum deposit cap for testnet + pub const MAX_DEPOSIT_CAP: Balance = UNIT * 1_000_000_000_000; + + /// Maximum incentive cap for testnet + pub const MAX_INCENTIVE_CAP: Balance = UNIT * 1_000_000_000_000; + + /// Maximum APY for testnet (20%) + pub const MAX_APY: Perbill = Perbill::from_percent(20); +} + #[derive(Clone, Encode, Decode, RuntimeDebug, TypeInfo, PartialEq, Eq)] pub enum AssetType { /// This includes all lstTNT assets diff --git a/runtime/mainnet/src/lib.rs b/runtime/mainnet/src/lib.rs index 06663cb01..9ab671883 100644 --- a/runtime/mainnet/src/lib.rs +++ b/runtime/mainnet/src/lib.rs @@ -1273,14 +1273,14 @@ impl pallet_tangle_lst::Config for Runtime { } parameter_types! { - pub const RewardsPID: PalletId = PalletId(*b"py/tnrew"); - pub const MaxDepositCap: u128 = UNIT * 100_000_000; - pub const MaxIncentiveCap: u128 = UNIT * 100_000_000; - pub const MaxApy: Perbill = Perbill::from_percent(2); - pub const MinDepositCap: u128 = 0; - pub const MinIncentiveCap: u128 = 0; - pub const MaxVaultNameLen: u32 = 64; - pub const MaxVaultLogoLen: u32 = 256; + pub const RewardsPID: PalletId = tangle_primitives::types::rewards::PALLET_ID; + pub const MaxDepositCap: Balance = tangle_primitives::types::rewards::mainnet::MAX_DEPOSIT_CAP; + pub const MaxIncentiveCap: Balance = tangle_primitives::types::rewards::mainnet::MAX_INCENTIVE_CAP; + pub const MaxApy: Perbill = tangle_primitives::types::rewards::mainnet::MAX_APY; + pub const MinDepositCap: Balance = tangle_primitives::types::rewards::MIN_DEPOSIT_CAP; + pub const MinIncentiveCap: Balance = tangle_primitives::types::rewards::MIN_INCENTIVE_CAP; + pub const MaxVaultNameLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_NAME_LENGTH; + pub const MaxVaultLogoLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_LOGO_LENGTH; } impl pallet_rewards::Config for Runtime { @@ -1299,56 +1299,60 @@ impl pallet_rewards::Config for Runtime { type MaxVaultNameLength = MaxVaultNameLen; type MaxVaultLogoLength = MaxVaultLogoLen; type VaultMetadataOrigin = EnsureRootOrHalfCouncil; - type MaxPendingRewardsPerOperator = ConstU32<100>; + type MaxPendingRewardsPerOperator = + ConstU32<{ tangle_primitives::types::rewards::MAX_PENDING_REWARDS_PER_OPERATOR }>; type WeightInfo = (); } parameter_types! { - pub const MinOperatorBondAmount: Balance = 100; + pub const MinOperatorBondAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_OPERATOR_BOND_AMOUNT; + pub const MinDelegateAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_DELEGATE_AMOUNT; + pub PID: PalletId = tangle_primitives::multi_asset_delegation::PALLET_ID; - pub const MinDelegateAmount : Balance = 1; - pub PID: PalletId = PalletId(*b"PotStake"); #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxDelegatorBlueprints : u32 = 50; - #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxOperatorBlueprints : u32 = 50; + pub const MaxDelegatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATOR_BLUEPRINTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxWithdrawRequests: u32 = 5; + pub const MaxOperatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_OPERATOR_BLUEPRINTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxUnstakeRequests: u32 = 5; + pub const MaxWithdrawRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_WITHDRAW_REQUESTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxDelegations: u32 = 50; + pub const MaxUnstakeRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_UNSTAKE_REQUESTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] + pub const MaxDelegations: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATIONS; } #[cfg(feature = "fast-runtime")] parameter_types! { #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveOperatorsDelay: u32 = 1; + pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveDelegatorsDelay: u32 = 1; + pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const DelegationBondLessDelay: u32 = 1; + pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const OperatorBondLessDelay: u32 = 1; + pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY_FAST; } #[cfg(not(feature = "fast-runtime"))] parameter_types! { #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveOperatorsDelay: u32 = 10; + pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveDelegatorsDelay: u32 = 10; + pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const DelegationBondLessDelay: u32 = 5; + pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const OperatorBondLessDelay: u32 = 5; + pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY; } impl pallet_multi_asset_delegation::Config for Runtime { diff --git a/runtime/testnet/src/lib.rs b/runtime/testnet/src/lib.rs index 1a0cce6cc..832d0f540 100644 --- a/runtime/testnet/src/lib.rs +++ b/runtime/testnet/src/lib.rs @@ -1228,14 +1228,14 @@ impl pallet_tangle_lst::Config for Runtime { } parameter_types! { - pub const RewardsPID: PalletId = PalletId(*b"py/tnrew"); - pub const MaxDepositCap: u128 = UNIT * 1_000_000_000_000; - pub const MaxIncentiveCap: u128 = UNIT * 1_000_000_000_000; - pub const MaxApy: Perbill = Perbill::from_percent(20); - pub const MinDepositCap: u128 = 0; - pub const MinIncentiveCap: u128 = 0; - pub const MaxVaultNameLen: u32 = 64; - pub const MaxVaultLogoLen: u32 = 256; + pub const RewardsPID: PalletId = tangle_primitives::types::rewards::PALLET_ID; + pub const MaxDepositCap: Balance = tangle_primitives::types::rewards::testnet::MAX_DEPOSIT_CAP; + pub const MaxIncentiveCap: Balance = tangle_primitives::types::rewards::testnet::MAX_INCENTIVE_CAP; + pub const MaxApy: Perbill = tangle_primitives::types::rewards::testnet::MAX_APY; + pub const MinDepositCap: Balance = tangle_primitives::types::rewards::MIN_DEPOSIT_CAP; + pub const MinIncentiveCap: Balance = tangle_primitives::types::rewards::MIN_INCENTIVE_CAP; + pub const MaxVaultNameLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_NAME_LENGTH; + pub const MaxVaultLogoLen: u32 = tangle_primitives::types::rewards::MAX_VAULT_LOGO_LENGTH; } impl pallet_rewards::Config for Runtime { @@ -1254,7 +1254,8 @@ impl pallet_rewards::Config for Runtime { type MaxVaultNameLength = MaxVaultNameLen; type MaxVaultLogoLength = MaxVaultLogoLen; type VaultMetadataOrigin = EnsureRootOrHalfCouncil; - type MaxPendingRewardsPerOperator = ConstU32<100>; + type MaxPendingRewardsPerOperator = + ConstU32<{ tangle_primitives::types::rewards::MAX_PENDING_REWARDS_PER_OPERATOR }>; type WeightInfo = (); } @@ -1533,51 +1534,54 @@ impl pallet_assets::Config for Runtime { } parameter_types! { - pub const MinOperatorBondAmount: Balance = 100; + pub const MinOperatorBondAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_OPERATOR_BOND_AMOUNT; + pub const MinDelegateAmount: Balance = tangle_primitives::multi_asset_delegation::MIN_DELEGATE_AMOUNT; + pub PID: PalletId = tangle_primitives::multi_asset_delegation::PALLET_ID; - pub const MinDelegateAmount : Balance = 1; - pub PID: PalletId = PalletId(*b"PotStake"); #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxDelegatorBlueprints : u32 = 50; - #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxOperatorBlueprints : u32 = 50; + pub const MaxDelegatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATOR_BLUEPRINTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxWithdrawRequests: u32 = 5; + pub const MaxOperatorBlueprints: u32 = tangle_primitives::multi_asset_delegation::MAX_OPERATOR_BLUEPRINTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxUnstakeRequests: u32 = 5; + pub const MaxWithdrawRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_WITHDRAW_REQUESTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const MaxDelegations: u32 = 50; + pub const MaxUnstakeRequests: u32 = tangle_primitives::multi_asset_delegation::MAX_UNSTAKE_REQUESTS; + #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] + pub const MaxDelegations: u32 = tangle_primitives::multi_asset_delegation::MAX_DELEGATIONS; } #[cfg(feature = "fast-runtime")] parameter_types! { #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveOperatorsDelay: u32 = 1; + pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveDelegatorsDelay: u32 = 1; + pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const DelegationBondLessDelay: u32 = 1; + pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY_FAST; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const OperatorBondLessDelay: u32 = 1; + pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY_FAST; } #[cfg(not(feature = "fast-runtime"))] parameter_types! { #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveOperatorsDelay: u32 = 10; + pub const LeaveOperatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_OPERATORS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const LeaveDelegatorsDelay: u32 = 10; + pub const LeaveDelegatorsDelay: u32 = tangle_primitives::multi_asset_delegation::LEAVE_DELEGATORS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const DelegationBondLessDelay: u32 = 5; + pub const DelegationBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::DELEGATION_BOND_LESS_DELAY; #[derive(PartialEq, Eq, Clone, Copy, Debug, Encode, Decode, MaxEncodedLen, TypeInfo)] - pub const OperatorBondLessDelay: u32 = 5; + pub const OperatorBondLessDelay: u32 = tangle_primitives::multi_asset_delegation::OPERATOR_BOND_LESS_DELAY; } impl pallet_multi_asset_delegation::Config for Runtime {