Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moved PrarachainId to primitives. #1394

Merged
merged 8 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions pallets/buy-back/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
bifrost-primitives = { workspace = true }
bifrost-slp = { workspace = true }
bifrost-ve-minting = { workspace = true }
bifrost-vtoken-minting = { workspace = true }
cumulus-primitives-core = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }
Expand All @@ -27,11 +28,11 @@ sp-runtime = { workspace = true }
sp-std = { workspace = true }
xcm = { workspace = true }
zenlink-protocol = { workspace = true }
bifrost-ve-minting = { workspace = true }

[dev-dependencies]
bifrost-asset-registry = { workspace = true }
bifrost-currencies = { workspace = true }
bifrost-runtime-common = { workspace = true }
orml-tokens = { workspace = true }
orml-traits = { workspace = true }
orml-xtokens = { workspace = true }
Expand All @@ -41,31 +42,31 @@ sp-io = { workspace = true }
xcm-builder = { workspace = true }
xcm-executor = { workspace = true }
env_logger = { workspace = true }
bifrost-runtime-common = { workspace = true }

[features]
default = ["std"]
std = [
"parity-scale-codec/std",
"scale-info/std",
"sp-runtime/std",
"bifrost-asset-registry/std",
"bifrost-primitives/std",
"bifrost-runtime-common/std",
"bifrost-slp/std",
"bifrost-vtoken-minting/std",
"frame-benchmarking/std",
"frame-support/std",
"frame-system/std",
"frame-benchmarking/std",
"bifrost-primitives/std",
"orml-traits/std",
"bifrost-vtoken-minting/std",
"zenlink-protocol/std",
"bifrost-slp/std",
"bifrost-asset-registry/std",
"orml-xtokens/std",
"bifrost-runtime-common/std",
"parity-scale-codec/std",
"scale-info/std",
"sp-runtime/std",
"zenlink-protocol/std",
]

runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",
"pallet-xcm/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
"xcm-builder/runtime-benchmarks",

]
try-runtime = ["frame-support/try-runtime"]
14 changes: 9 additions & 5 deletions pallets/buy-back/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

use bifrost_asset_registry::AssetIdMaps;
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator, TokenSymbol};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand Down Expand Up @@ -306,11 +310,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
15 changes: 9 additions & 6 deletions pallets/fee-share/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
pub use super::*;

use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::PriceDetail;
pub use bifrost_primitives::{currency::*, CurrencyId, Moment, SlpxOperator, TokenSymbol};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId, PriceDetail,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand Down Expand Up @@ -405,11 +408,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/leverage-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ use bifrost_asset_registry::AssetIdMaps;
pub use bifrost_primitives::{
currency::*, Balance, CurrencyId, CurrencyIdMapping, SlpOperator, SlpxOperator, TokenSymbol, *,
};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_runtime_common::milli;
use frame_support::{
derive_impl, ord_parameter_types, parameter_types,
Expand Down Expand Up @@ -311,12 +315,12 @@ impl bifrost_vtoken_minting::Config for Test {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type BifrostSlpx = SlpxInterface;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/salp/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ use zenlink_protocol::{
};

use crate as salp;
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};

pub(crate) type AccountId = <<Signature as sp_runtime::traits::Verify>::Signer as sp_runtime::traits::IdentifyAccount>::AccountId;
pub(crate) type Block = frame_system::mocking::MockBlock<Test>;
Expand Down Expand Up @@ -431,12 +435,12 @@ impl bifrost_vtoken_minting::Config for Test {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type BifrostSlpx = SlpxInterface;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
13 changes: 7 additions & 6 deletions pallets/slp/src/mocks/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ use crate::{Config, DispatchResult, QueryResponseManager, XcmDestWeightAndFeeHan
use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::{
currency::{BNC, KSM},
Amount, Balance, CurrencyId, SlpxOperator, TokenSymbol, XcmOperationType,
Amount, AstarParachainId, Balance, CurrencyId, HydradxParachainId, InterlayParachainId,
MantaParachainId, MoonbeamParachainId, SlpxOperator, TokenSymbol, XcmOperationType,
};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand Down Expand Up @@ -209,11 +210,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
15 changes: 8 additions & 7 deletions pallets/slp/src/mocks/mock_kusama.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ use crate::{Config, DispatchResult, QueryResponseManager};
use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::{
currency::{BNC, KSM, MANTA},
Amount, Balance, CurrencyId, DoNothingExecuteXcm, DoNothingRouter, SlpxOperator, TokenSymbol,
XcmDestWeightAndFeeHandler, XcmOperationType,
Amount, AstarParachainId, Balance, CurrencyId, DoNothingExecuteXcm, DoNothingRouter,
HydradxParachainId, InterlayParachainId, MantaParachainId, MoonbeamParachainId, SlpxOperator,
TokenSymbol, XcmDestWeightAndFeeHandler, XcmOperationType,
};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand Down Expand Up @@ -267,11 +268,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/slpx/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@

use crate as slpx;
use bifrost_asset_registry::AssetIdMaps;
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
pub use bifrost_primitives::{
CurrencyId, CurrencyIdMapping, DoNothingExecuteXcm, SlpxOperator, TokenSymbol, BNC, KSM,
};
Expand Down Expand Up @@ -196,11 +200,11 @@ impl bifrost_vtoken_minting::Config for Test {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/stable-pool/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ pub use bifrost_primitives::{
Balance, CurrencyId, CurrencyIdMapping, SlpOperator, SlpxOperator, TokenSymbol, ASTR, BNC, DOT,
GLMR, VBNC, VDOT,
};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_runtime_common::milli;
use frame_support::{
derive_impl, ord_parameter_types, parameter_types,
Expand Down Expand Up @@ -292,12 +296,12 @@ impl bifrost_vtoken_minting::Config for Test {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type BifrostSlpx = SlpxInterface;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/system-maker/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@

use bifrost_asset_registry::AssetIdMaps;
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator, TokenSymbol};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use frame_support::{
Expand Down Expand Up @@ -305,11 +309,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/system-staking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

use bifrost_asset_registry::AssetIdMaps;
pub use bifrost_primitives::{currency::*, CurrencyId, SlpxOperator, TokenSymbol};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
use cumulus_primitives_core::*;
Expand Down Expand Up @@ -197,11 +201,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
14 changes: 9 additions & 5 deletions pallets/ve-minting/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ use bifrost_asset_registry::AssetIdMaps;
pub use bifrost_primitives::{
currency::*, CurrencyId, CurrencyIdMapping, SlpxOperator, TokenSymbol,
};
use bifrost_primitives::{
AstarParachainId, HydradxParachainId, InterlayParachainId, MantaParachainId,
MoonbeamParachainId,
};
use bifrost_runtime_common::{micro, milli};
use bifrost_slp::{QueryId, QueryResponseManager};
pub use cumulus_primitives_core::ParaId;
Expand Down Expand Up @@ -220,11 +224,11 @@ impl bifrost_vtoken_minting::Config for Runtime {
type WeightInfo = ();
type OnRedeemSuccess = ();
type XcmTransfer = XTokens;
type AstarParachainId = ConstU32<2007>;
type MoonbeamParachainId = ConstU32<2023>;
type HydradxParachainId = ConstU32<2034>;
type MantaParachainId = ConstU32<2104>;
type InterlayParachainId = ConstU32<2032>;
type AstarParachainId = AstarParachainId;
type MoonbeamParachainId = MoonbeamParachainId;
type HydradxParachainId = HydradxParachainId;
type MantaParachainId = MantaParachainId;
type InterlayParachainId = InterlayParachainId;
type ChannelCommission = ();
type MaxLockRecords = ConstU32<100>;
type IncentivePoolAccount = IncentivePoolAccount;
Expand Down
Loading