Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
use TradingPairSourceManager trait in pool_xyk pallet
  • Loading branch information
TheLedgerOfJoudi committed Oct 30, 2023
commit 4d5a7ae707ff79c88c8075e01c1eb00216b42c6c
3 changes: 3 additions & 0 deletions pallets/ceres-governance-platform/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/ceres-launchpad/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/ceres-liquidity-locker/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/ceres-liquidity-locker/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/ceres-token-locker/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/demeter-farming-platform/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/demeter-farming-platform/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/dex-api/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/farming/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = (PswapDistribution, Farming);
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/hermes-governance-platform/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/liquidity-proxy/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/liquidity-proxy/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type OnPoolCreated = pswap_distribution::Pallet<Runtime>;
type OnPoolReservesChanged = ();
type GetFee = GetXykFee;
Expand Down
4 changes: 2 additions & 2 deletions pallets/multicollateral-bonding-curve-pool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,14 +873,14 @@ impl<T: Config> Pallet<T> {
Error::<T>::PoolAlreadyInitializedForPair
);
T::PriceToolsPallet::register_asset(&collateral_asset_id)?;
T::EnsureTradingPairExists::ensure_trading_pair_exists(
<T as pallet::Config>::EnsureTradingPairExists::ensure_trading_pair_exists(
&DEXId::Polkaswap.into(),
&T::GetBaseAssetId::get(),
&collateral_asset_id,
)?;

// TODO: #441 use TradingPairSourceManager instead of trading-pair pallet
T::TradingPairSourceManager::enable_source_for_trading_pair(
<T as pallet::Config>::TradingPairSourceManager::enable_source_for_trading_pair(
&DEXId::Polkaswap.into(),
&T::GetBaseAssetId::get(),
&collateral_asset_id,
Expand Down
3 changes: 3 additions & 0 deletions pallets/multicollateral-bonding-curve-pool/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/pool-xyk/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
32 changes: 20 additions & 12 deletions pallets/pool-xyk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ use common::prelude::{
Balance, EnsureDEXManager, FixedWrapper, QuoteAmount, SwapAmount, SwapOutcome,
};
use common::{
fixed_wrapper, AssetInfoProvider, DexInfoProvider, EnsureTradingPairExists, GetPoolReserves,
LiquiditySource, LiquiditySourceType, ManagementMode, OnPoolReservesChanged, PoolXykPallet,
RewardReason, TechAccountId, TechPurpose, ToFeeAccount, TradingPair, TradingPairSourceManager,
fixed_wrapper, AssetInfoProvider, DEXInfo, DexInfoProvider, EnsureTradingPairExists,
GetPoolReserves, LiquiditySource, LiquiditySourceType, ManagementMode, OnPoolReservesChanged,
PoolXykPallet, RewardReason, TechAccountId, TechPurpose, ToFeeAccount, TradingPair,
TradingPairSourceManager,
};

mod aliases;
Expand Down Expand Up @@ -168,7 +169,7 @@ impl<T: Config> Pallet<T> {
reserves_account_id: &T::AccountId,
fees_account_id: &T::AccountId,
) -> DispatchResult {
let dex_info = T::DexInfoProvider::get_dex_info(dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(dex_id)?;
let (sorted_asset_a, sorted_asset_b) = if dex_info.base_asset_id == *asset_a {
(asset_a, asset_b)
} else if dex_info.base_asset_id == *asset_b {
Expand All @@ -181,7 +182,7 @@ impl<T: Config> Pallet<T> {
};

// TODO: #441 use TradingPairSourceManager instead of trading-pair pallet
trading_pair::Pallet::<T>::enable_source_for_trading_pair(
T::TradingPairSourceManager::enable_source_for_trading_pair(
dex_id,
sorted_asset_a,
sorted_asset_b,
Expand Down Expand Up @@ -242,7 +243,7 @@ impl<T: Config> Pallet<T> {
// can be done, check every condition for `PoolIsAlreadyInitialized`.
if technical::Pallet::<T>::ensure_tech_account_registered(&tech_acc_id).is_ok() {
if technical::Pallet::<T>::ensure_tech_account_registered(&fee_acc_id).is_ok()
&& trading_pair::Pallet::<T>::ensure_trading_pair_exists(
&& T::EnsureTradingPairExists::ensure_trading_pair_exists(
&dex_id,
&trading_pair.base_asset_id.into(),
&trading_pair.target_asset_id.into(),
Expand All @@ -269,7 +270,7 @@ impl<T: Config> Pallet<T> {
input_a_min: Balance,
input_b_min: Balance,
) -> DispatchResult {
let dex_info = T::DexInfoProvider::get_dex_info(&dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(&dex_id)?;
let (_, tech_acc_id) = Pallet::<T>::tech_account_from_dex_and_asset_pair(
dex_id,
input_asset_a,
Expand Down Expand Up @@ -307,7 +308,7 @@ impl<T: Config> Pallet<T> {
output_a_min: Balance,
output_b_min: Balance,
) -> DispatchResult {
let dex_info = T::DexInfoProvider::get_dex_info(&dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(&dex_id)?;
let (_, tech_acc_id) = Pallet::<T>::tech_account_from_dex_and_asset_pair(
dex_id,
output_asset_a,
Expand Down Expand Up @@ -358,7 +359,7 @@ impl<T: Config> LiquiditySource<T::DEXId, T::AccountId, T::AssetId, Balance, Dis
input_asset_id: &T::AssetId,
output_asset_id: &T::AssetId,
) -> bool {
if let Ok(dex_info) = T::DexInfoProvider::get_dex_info(dex_id) {
if let Ok(dex_info) = <T as pallet::Config>::DexInfoProvider::get_dex_info(dex_id) {
let target_asset_id = if *input_asset_id == dex_info.base_asset_id {
output_asset_id
} else if *output_asset_id == dex_info.base_asset_id {
Expand All @@ -380,7 +381,7 @@ impl<T: Config> LiquiditySource<T::DEXId, T::AccountId, T::AssetId, Balance, Dis
amount: QuoteAmount<Balance>,
deduce_fee: bool,
) -> Result<(SwapOutcome<Balance>, Weight), DispatchError> {
let dex_info = T::DexInfoProvider::get_dex_info(dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(dex_id)?;
// Get pool account.
let (_, tech_acc_id) = Pallet::<T>::tech_account_from_dex_and_asset_pair(
*dex_id,
Expand Down Expand Up @@ -442,7 +443,7 @@ impl<T: Config> LiquiditySource<T::DEXId, T::AccountId, T::AssetId, Balance, Dis
output_asset_id: &T::AssetId,
swap_amount: SwapAmount<Balance>,
) -> Result<(SwapOutcome<Balance>, Weight), DispatchError> {
let dex_info = T::DexInfoProvider::get_dex_info(&dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(&dex_id)?;
let (_, tech_acc_id) = Pallet::<T>::tech_account_from_dex_and_asset_pair(
*dex_id,
*input_asset_id,
Expand Down Expand Up @@ -521,7 +522,7 @@ impl<T: Config> LiquiditySource<T::DEXId, T::AccountId, T::AssetId, Balance, Dis
amount: QuoteAmount<Balance>,
deduce_fee: bool,
) -> Result<SwapOutcome<Balance>, DispatchError> {
let dex_info = T::DexInfoProvider::get_dex_info(dex_id)?;
let dex_info = <T as pallet::Config>::DexInfoProvider::get_dex_info(dex_id)?;
// Get pool account.
let (_, tech_acc_id) = Pallet::<T>::tech_account_from_dex_and_asset_pair(
*dex_id,
Expand Down Expand Up @@ -676,6 +677,13 @@ pub mod pallet {
+ Into<<Self as technical::Config>::SwapAction>
+ From<PolySwapActionStructOf<Self>>;
type EnsureDEXManager: EnsureDEXManager<Self::DEXId, Self::AccountId, DispatchError>;
type TradingPairSourceManager: TradingPairSourceManager<Self::DEXId, Self::AssetId>;
type DexInfoProvider: DexInfoProvider<Self::DEXId, DEXInfo<Self::AssetId>>;
type EnsureTradingPairExists: EnsureTradingPairExists<
Self::DEXId,
Self::AssetId,
DispatchError,
>;
type XSTMarketInfo: GetMarketInfo<Self::AssetId>;
type GetFee: Get<Fixed>;
type OnPoolCreated: OnPoolCreated<AccountId = AccountIdOf<Self>, DEXId = DEXIdOf<Self>>;
Expand Down
3 changes: 3 additions & 0 deletions pallets/pool-xyk/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ impl Config for Runtime {
crate::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = crate::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
9 changes: 4 additions & 5 deletions pallets/pool-xyk/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ use frame_support::dispatch::{DispatchError, DispatchResult};
use frame_support::{ensure, fail};
use orml_traits::GetByKey;

use crate::aliases::{AssetIdOf, TechAccountIdOf, TechAssetIdOf};
use crate::{bounds::*, pallet};
use crate::{Config, Error, Pallet, PoolProviders, TotalIssuances};
use common::prelude::{Balance, SwapAmount};
use common::{
AccountIdOf, DexInfoProvider, ToFeeAccount, ToXykTechUnitFromDEXAndTradingPair, TradingPair,
};

use crate::aliases::{AssetIdOf, TechAccountIdOf, TechAssetIdOf};
use crate::bounds::*;
use crate::{Config, Error, Pallet, PoolProviders, TotalIssuances};

impl<T: Config> Pallet<T> {
pub fn decide_is_fee_from_destination(
base_asset_id: &AssetIdOf<T>,
Expand Down Expand Up @@ -92,7 +91,7 @@ impl<T: Config> Pallet<T> {
asset_a: T::AssetId,
asset_b: T::AssetId,
) -> Result<(common::TradingPair<TechAssetIdOf<T>>, TechAccountIdOf<T>), DispatchError> {
let dexinfo = T::DexInfoProvider::get_dex_info(&dex_id)?;
let dexinfo = <T as pallet::Config>::DexInfoProvider::get_dex_info(&dex_id)?;
let base_asset_id = dexinfo.base_asset_id;
ensure!(asset_a != asset_b, Error::<T>::AssetsMustNotBeSame);
let ba = base_asset_id;
Expand Down
3 changes: 3 additions & 0 deletions pallets/price-tools/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = pswap_distribution::Pallet<Runtime>;
type OnPoolReservesChanged = PriceTools;
Expand Down
3 changes: 3 additions & 0 deletions pallets/pswap-distribution/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/pswap-distribution/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/vested-rewards/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = pswap_distribution::Pallet<Runtime>;
type OnPoolReservesChanged = ();
Expand Down
3 changes: 3 additions & 0 deletions pallets/xst/benchmarking/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ impl pool_xyk::Config for Runtime {
pool_xyk::WithdrawLiquidityAction<AssetId, AccountId, TechAccountId>;
type PolySwapAction = pool_xyk::PolySwapAction<AssetId, AccountId, TechAccountId>;
type EnsureDEXManager = dex_manager::Pallet<Runtime>;
type TradingPairSourceManager = trading_pair::Pallet<Runtime>;
type DexInfoProvider = dex_manager::Pallet<Runtime>;
type EnsureTradingPairExists = trading_pair::Pallet<Runtime>;
type GetFee = GetXykFee;
type OnPoolCreated = PswapDistribution;
type OnPoolReservesChanged = ();
Expand Down
Loading