diff --git a/primitives/src/lib.rs b/primitives/src/lib.rs index b711cb02d..6b58e7f04 100644 --- a/primitives/src/lib.rs +++ b/primitives/src/lib.rs @@ -161,9 +161,10 @@ pub type TimeStampedPrice = orml_oracle::TimestampedValue; // Pallet Id parameter_types! { pub const BifrostCrowdloanId: PalletId = PalletId(*b"bf/salp#"); - pub BifrostEntranceAccount: PalletId = PalletId(*b"bf/vtkin"); - pub BifrostExitAccount: PalletId = PalletId(*b"bf/vtout"); - pub BifrostVsbondAccount: PalletId = PalletId(*b"bf/salpb"); + pub const BifrostEntranceAccount: PalletId = PalletId(*b"bf/vtkin"); + pub const BifrostExitAccount: PalletId = PalletId(*b"bf/vtout"); + pub const BifrostSalpLiteCrowdloanId: PalletId = PalletId(*b"bf/salpl"); + pub const BifrostVsbondAccount: PalletId = PalletId(*b"bf/salpb"); pub const BuyBackAccount: PalletId = PalletId(*b"bf/bybck"); pub const BuybackPalletId: PalletId = PalletId(*b"bf/salpc"); pub const CloudsPalletId: PalletId = PalletId(*b"bf/cloud"); @@ -174,17 +175,22 @@ parameter_types! { pub const FarmingRewardIssuerPalletId: PalletId = PalletId(*b"bf/fmrir"); pub const FeeSharePalletId: PalletId = PalletId(*b"bf/feesh"); pub const FlexibleFeePalletId: PalletId = PalletId(*b"bf/flexi"); - pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo"); - pub IncentivePalletId: PalletId = PalletId(*b"bf/bbict"); + pub const IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo"); + pub const IncentivePalletId: PalletId = PalletId(*b"bf/bbict"); pub const LendMarketPalletId: PalletId = PalletId(*b"bf/ldmkt"); pub const LighteningRedeemPalletId: PalletId = PalletId(*b"lighten#"); pub const LiquidityAccount: PalletId = PalletId(*b"bf/liqdt"); + pub const LiquidityMiningDOTPalletId: PalletId = PalletId(*b"bf/lmdot"); pub const LiquidityMiningPalletId: PalletId = PalletId(*b"mining##"); + pub const MerkleDirtributorPalletId: PalletId = PalletId(*b"bf/mklds"); + pub const OraclePalletId: PalletId = PalletId(*b"bf/oracl"); pub const ParachainStakingPalletId: PalletId = PalletId(*b"bf/stake"); pub const SlpEntrancePalletId: PalletId = PalletId(*b"bf/vtkin"); + pub const SlpExitPalletId: PalletId = PalletId(*b"bf/vtout"); pub const StableAssetPalletId: PalletId = PalletId(*b"nuts/sta"); pub const SystemMakerPalletId: PalletId = PalletId(*b"bf/sysmk"); pub const SystemStakingPalletId: PalletId = PalletId(*b"bf/sysst"); + pub const TreasuryPalletId: PalletId = PalletId(*b"bf/trsry"); pub const VBNCConvertPalletId: PalletId = PalletId(*b"bf/vbncc"); pub const VeMintingPalletId: PalletId = PalletId(*b"bf/vemnt"); pub const VsbondAuctionPalletId: PalletId = PalletId(*b"bf/vsbnd"); diff --git a/runtime/bifrost-kusama/src/lib.rs b/runtime/bifrost-kusama/src/lib.rs index aa98fd219..2a71076ee 100644 --- a/runtime/bifrost-kusama/src/lib.rs +++ b/runtime/bifrost-kusama/src/lib.rs @@ -30,6 +30,14 @@ use bifrost_slp::{DerivativeAccountProvider, QueryResponseManager}; use core::convert::TryInto; // A few exports that help ease life for downstream crates. pub use bifrost_parachain_staking::{InflationInfo, Range}; +use bifrost_primitives::{ + BifrostCrowdloanId, BifrostVsbondAccount, BuybackPalletId, CommissionPalletId, + FarmingBoostPalletId, FarmingGaugeRewardIssuerPalletId, FarmingKeeperPalletId, + FarmingRewardIssuerPalletId, FeeSharePalletId, FlexibleFeePalletId, IncentivePoolAccount, + LendMarketPalletId, MerkleDirtributorPalletId, OraclePalletId, ParachainStakingPalletId, + SlpEntrancePalletId, SlpExitPalletId, SystemMakerPalletId, SystemStakingPalletId, + TreasuryPalletId, VBNCConvertPalletId, VsbondAuctionPalletId, +}; pub use frame_support::{ construct_runtime, match_types, parameter_types, traits::{ @@ -205,35 +213,11 @@ parameter_types! { } parameter_types! { - pub const TreasuryPalletId: PalletId = PalletId(*b"bf/trsry"); - pub const BifrostCrowdloanId: PalletId = PalletId(*b"bf/salp#"); - pub const BifrostSalpLiteCrowdloanId: PalletId = PalletId(*b"bf/salpl"); pub const LiquidityMiningPalletId: PalletId = PalletId(*b"bf/lm###"); - pub const LiquidityMiningDOTPalletId: PalletId = PalletId(*b"bf/lmdot"); pub const LighteningRedeemPalletId: PalletId = PalletId(*b"bf/ltnrd"); - pub const MerkleDirtributorPalletId: PalletId = PalletId(*b"bf/mklds"); - pub const VsbondAuctionPalletId: PalletId = PalletId(*b"bf/vsbnd"); - pub const ParachainStakingPalletId: PalletId = PalletId(*b"bf/stake"); - pub const BifrostVsbondPalletId: PalletId = PalletId(*b"bf/salpb"); - pub const SlpEntrancePalletId: PalletId = PalletId(*b"bf/vtkin"); - pub const SlpExitPalletId: PalletId = PalletId(*b"bf/vtout"); pub const StableAmmPalletId: PalletId = PalletId(*b"bf/stamm"); - pub const FarmingKeeperPalletId: PalletId = PalletId(*b"bf/fmkpr"); - pub const FarmingRewardIssuerPalletId: PalletId = PalletId(*b"bf/fmrir"); - pub const SystemStakingPalletId: PalletId = PalletId(*b"bf/sysst"); - pub const BuybackPalletId: PalletId = PalletId(*b"bf/salpc"); - pub const SystemMakerPalletId: PalletId = PalletId(*b"bf/sysmk"); - pub const FeeSharePalletId: PalletId = PalletId(*b"bf/feesh"); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub const FarmingBoostPalletId: PalletId = PalletId(*b"bf/fmbst"); - pub const LendMarketPalletId: PalletId = PalletId(*b"bf/ldmkt"); - pub const OraclePalletId: PalletId = PalletId(*b"bf/oracl"); pub const StableAssetPalletId: PalletId = PalletId(*b"bf/stabl"); - pub const CommissionPalletId: PalletId = PalletId(*b"bf/comms"); - pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo"); - pub const FarmingGaugeRewardIssuerPalletId: PalletId = PalletId(*b"bf/fmgar"); - pub const FlexibleFeePalletId: PalletId = PalletId(*b"bf/flexi"); - pub const VBNCConvertPalletId: PalletId = PalletId(*b"bf/vbncc"); } impl frame_system::Config for Runtime { @@ -1274,7 +1258,7 @@ impl bifrost_vstoken_conversion::Config for Runtime { type RelayCurrencyId = RelayCurrencyId; type TreasuryAccount = BifrostTreasuryAccount; type ControlOrigin = CoreAdminOrCouncil; - type VsbondAccount = BifrostVsbondPalletId; + type VsbondAccount = BifrostVsbondAccount; type CurrencyIdConversion = AssetIdMaps; type WeightInfo = weights::bifrost_vstoken_conversion::BifrostWeight; } diff --git a/runtime/bifrost-kusama/src/xcm_config.rs b/runtime/bifrost-kusama/src/xcm_config.rs index 8222f6b28..414600305 100644 --- a/runtime/bifrost-kusama/src/xcm_config.rs +++ b/runtime/bifrost-kusama/src/xcm_config.rs @@ -559,7 +559,7 @@ impl Contains for DustRemovalWhitelist { let whitelist: Vec = vec![ TreasuryPalletId::get().into_account_truncating(), BifrostCrowdloanId::get().into_account_truncating(), - BifrostVsbondPalletId::get().into_account_truncating(), + BifrostVsbondAccount::get().into_account_truncating(), SlpEntrancePalletId::get().into_account_truncating(), SlpExitPalletId::get().into_account_truncating(), BuybackPalletId::get().into_account_truncating(), diff --git a/runtime/bifrost-polkadot/src/lib.rs b/runtime/bifrost-polkadot/src/lib.rs index 409b4b72c..f63de4618 100644 --- a/runtime/bifrost-polkadot/src/lib.rs +++ b/runtime/bifrost-polkadot/src/lib.rs @@ -30,6 +30,14 @@ use bifrost_slp::{DerivativeAccountProvider, QueryResponseManager}; use core::convert::TryInto; use pallet_traits::evm::InspectEvmAccounts; // A few exports that help ease life for downstream crates. +use bifrost_primitives::{ + BifrostCrowdloanId, BifrostVsbondAccount, BuyBackAccount, BuybackPalletId, CloudsPalletId, + CommissionPalletId, FarmingBoostPalletId, FarmingGaugeRewardIssuerPalletId, + FarmingKeeperPalletId, FarmingRewardIssuerPalletId, FeeSharePalletId, FlexibleFeePalletId, + IncentivePalletId, IncentivePoolAccount, LendMarketPalletId, LiquidityAccount, + MerkleDirtributorPalletId, OraclePalletId, SlpEntrancePalletId, SlpExitPalletId, + SystemMakerPalletId, SystemStakingPalletId, TreasuryPalletId, +}; use cumulus_pallet_parachain_system::{RelayNumberStrictlyIncreases, RelaychainDataProvider}; pub use frame_support::{ construct_runtime, match_types, parameter_types, @@ -226,31 +234,8 @@ parameter_types! { } parameter_types! { - pub const TreasuryPalletId: PalletId = PalletId(*b"bf/trsry"); - pub const BifrostCrowdloanId: PalletId = PalletId(*b"bf/salp#"); - pub const MerkleDirtributorPalletId: PalletId = PalletId(*b"bf/mklds"); - pub const BifrostVsbondPalletId: PalletId = PalletId(*b"bf/salpb"); - pub const SlpEntrancePalletId: PalletId = PalletId(*b"bf/vtkin"); - pub const SlpExitPalletId: PalletId = PalletId(*b"bf/vtout"); - pub const FarmingKeeperPalletId: PalletId = PalletId(*b"bf/fmkpr"); - pub const FarmingRewardIssuerPalletId: PalletId = PalletId(*b"bf/fmrir"); - pub const SystemStakingPalletId: PalletId = PalletId(*b"bf/sysst"); - pub const BuybackPalletId: PalletId = PalletId(*b"bf/salpc"); - pub const SystemMakerPalletId: PalletId = PalletId(*b"bf/sysmk"); - pub const FeeSharePalletId: PalletId = PalletId(*b"bf/feesh"); pub CheckingAccount: AccountId = PolkadotXcm::check_account(); - pub const IncentivePalletId: PalletId = PalletId(*b"bf/bbict"); - pub const FarmingBoostPalletId: PalletId = PalletId(*b"bf/fmbst"); - pub const LendMarketPalletId: PalletId = PalletId(*b"bf/ldmkt"); - pub const OraclePalletId: PalletId = PalletId(*b"bf/oracl"); pub const StableAssetPalletId: PalletId = PalletId(*b"bf/stabl"); - pub const CommissionPalletId: PalletId = PalletId(*b"bf/comms"); - pub const CloudsPalletId: PalletId = PalletId(*b"bf/cloud"); - pub IncentivePoolAccount: PalletId = PalletId(*b"bf/inpoo"); - pub const FarmingGaugeRewardIssuerPalletId: PalletId = PalletId(*b"bf/fmgar"); - pub const BuyBackAccount: PalletId = PalletId(*b"bf/bybck"); - pub const LiquidityAccount: PalletId = PalletId(*b"bf/liqdt"); - pub const FlexibleFeePalletId: PalletId = PalletId(*b"bf/flexi"); } impl frame_system::Config for Runtime { @@ -1135,7 +1120,7 @@ impl bifrost_vstoken_conversion::Config for Runtime { type RelayCurrencyId = RelayCurrencyId; type TreasuryAccount = BifrostTreasuryAccount; type ControlOrigin = CoreAdminOrCouncil; - type VsbondAccount = BifrostVsbondPalletId; + type VsbondAccount = BifrostVsbondAccount; type CurrencyIdConversion = AssetIdMaps; type WeightInfo = weights::bifrost_vstoken_conversion::BifrostWeight; } diff --git a/runtime/bifrost-polkadot/src/xcm_config.rs b/runtime/bifrost-polkadot/src/xcm_config.rs index f9577776c..69ab3fa92 100644 --- a/runtime/bifrost-polkadot/src/xcm_config.rs +++ b/runtime/bifrost-polkadot/src/xcm_config.rs @@ -443,7 +443,7 @@ impl Contains for DustRemovalWhitelist { let whitelist: Vec = vec![ TreasuryPalletId::get().into_account_truncating(), BifrostCrowdloanId::get().into_account_truncating(), - BifrostVsbondPalletId::get().into_account_truncating(), + BifrostVsbondAccount::get().into_account_truncating(), SlpEntrancePalletId::get().into_account_truncating(), SlpExitPalletId::get().into_account_truncating(), BuybackPalletId::get().into_account_truncating(),