diff --git a/Cargo.lock b/Cargo.lock index f895ac38f8..c51edff90b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7879,7 +7879,6 @@ version = "1.0.0" dependencies = [ "cfg-mocks", "cfg-primitives", - "cfg-test-utils", "cfg-traits", "cfg-types", "frame-benchmarking", diff --git a/libs/test-utils/src/mocks/accountant.rs b/libs/test-utils/src/mocks/accountant.rs deleted file mode 100644 index 7b27882cf5..0000000000 --- a/libs/test-utils/src/mocks/accountant.rs +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -/// Exposes a struct $name that implements the `trait Accountant`. The struct -/// expects one generic parameter that implements the fungibles traits -/// `Inspect`, `Mutate` and `Transfer`. -/// -/// * E.g.: `MockAccountant` -/// -/// # Example macro usage: -/// ```ignore -/// use cfg_traits::impl_mock_accountant; -/// use cfg_primitives::{PoolId, TrancheId, Balance}; -/// use cfg_types::tokens::CurrencyId; -/// use frame_support::traits::fungibles::{Inspect, Mutate, Transfer}; -/// use frame_support::traits::GenesisBuild; -/// -/// /// The used account id for this mock -/// type AccountId = u64; -/// -/// enum InvestmentId { -/// Tranches(PoolId, TrancheId), -/// } -/// -/// impl Into for InvestmentId { -/// fn into(self) -> CurrencyId { -/// CurrencyId::Tranche(self.0, self.1) -/// } -/// } -/// -/// -/// impl_mock_accountant!( -/// MockAccountant, -/// AccountId, -/// InvestmentId, -/// CurrencyId, -/// Balance -/// ); -/// -/// // Using the `GenesisConfig` -/// use accountant_mock::InvestmentInfo; -/// let storage = GenesisBuild::init(&accountant_mock::Genesis { -/// infos: vec![ -/// ( -/// InvestmentId::Tranche(0, [0;16]), -/// accountant_mock::InvestmentInfo { -/// owner: 1, -/// id: InvestmentId::Tranches(0, [0;16]), -/// payment_currency: AUSD_CURRENCY_ID -/// } -/// ) -/// ] -/// }).expect("Must not fail"); -/// ``` -#[macro_export] -macro_rules! impl_mock_accountant { - ($name:ident, $account_id:ty, $investment_id:ty, $currency_id:ty, $balance:ty) => { - pub use accountant_mock::$name; - - mod accountant_mock { - use std::borrow::{Borrow as _, BorrowMut as _}; - - use __private::STATE as __private_STATE; - use frame_support::traits::tokens::{Fortitude, Precision, Preservation}; - - use super::*; - - pub type InvestmentInfo = - cfg_types::investments::InvestmentInfo<$account_id, $currency_id, $investment_id>; - - #[derive(Default)] - pub struct Genesis { - pub infos: Vec<($investment_id, InvestmentInfo)>, - } - - pub struct $name(sp_std::marker::PhantomData); - - impl $name { - pub fn init(genesis: Genesis) { - __private_STATE.with(|s| { - let mut state = s.borrow_mut(); - - for (id, info) in &genesis.infos { - state.add(id.clone(), info.clone()) - } - }) - } - } - - impl cfg_traits::investments::InvestmentAccountant<$account_id> for $name - where - Tokens: frame_support::traits::tokens::fungibles::Mutate<$account_id> - // + frame_support::traits::tokens::fungibles::Transfer<$account_id> - + frame_support::traits::tokens::fungibles::Inspect< - $account_id, - Balance = $balance, - AssetId = $currency_id, - >, - $investment_id: - Into< - >::AssetId, - >, - { - type Amount = $balance; - type Error = frame_support::dispatch::DispatchError; - type InvestmentId = $investment_id; - type InvestmentInfo = InvestmentInfo; - - fn info(id: Self::InvestmentId) -> Result { - __private_STATE.with(|s| s.borrow().info(&id)) - } - - fn balance(id: Self::InvestmentId, who: &$account_id) -> Self::Amount { - Tokens::balance(id.into(), who) - } - - fn transfer( - id: Self::InvestmentId, - source: &$account_id, - dest: &$account_id, - amount: Self::Amount, - ) -> Result<(), Self::Error> { - let _ = __private_STATE.with(|s| s.borrow().info(&id))?; - - Tokens::transfer(id.into(), source, dest, amount, Preservation::Expendable) - .map(|_| ()) - } - - fn deposit( - buyer: &$account_id, - id: Self::InvestmentId, - amount: Self::Amount, - ) -> Result<(), Self::Error> { - let _ = __private_STATE.with(|s| s.borrow().info(&id))?; - - Tokens::mint_into(id.into(), buyer, amount).map(|_| ()) - } - - fn withdraw( - seller: &$account_id, - id: Self::InvestmentId, - amount: Self::Amount, - ) -> Result<(), Self::Error> { - let _ = __private_STATE.with(|s| s.borrow().info(&id))?; - - Tokens::burn_from( - id.into(), - seller, - amount, - Precision::Exact, - Fortitude::Polite, - ) - .map(|_| ()) - } - } - - #[cfg(feature = "runtime-benchmarks")] - impl cfg_traits::benchmarking::FundedPoolBenchmarkHelper for $name { - type AccountId = $account_id; - type Balance = $balance; - type PoolId = (); - - fn bench_create_funded_pool(_: Self::PoolId, _: &Self::AccountId) {} - - fn bench_investor_setup(_: Self::PoolId, _: Self::AccountId, _: Self::Balance) {} - } - - #[cfg(feature = "runtime-benchmarks")] - impl cfg_traits::benchmarking::InvestmentIdBenchmarkHelper for $name { - type InvestmentId = $investment_id; - type PoolId = (); - - fn bench_default_investment_id(_: Self::PoolId) -> Self::InvestmentId { - Self::InvestmentId::default() - } - } - - mod __private { - use super::*; - - pub struct AccountantState { - infos: Vec<($investment_id, InvestmentInfo)>, - } - - impl AccountantState { - pub fn new() -> Self { - Self { - infos: Vec::default(), - } - } - - pub fn info( - &self, - investment_id: &$investment_id, - ) -> Result { - for (curr_id, info) in &self.infos { - if curr_id == investment_id { - return Ok(info.clone()); - } - } - - Err(frame_support::dispatch::DispatchError::Other( - "No info for investment_id available", - )) - } - - pub fn add(&mut self, investment_id: $investment_id, info: InvestmentInfo) { - // NOTE: We deliberately update the info here as add() is only called - // upon init(). We assume, if we are running in the - // same thread this means a new initialization is wanted. - for (curr_id, curr_info) in &mut self.infos { - if *curr_id == investment_id { - *curr_info = info; - return; - } - } - - self.infos.push((investment_id, info)) - } - } - - thread_local! { - pub static STATE: sp_std::cell::RefCell< - AccountantState, - > = sp_std::cell::RefCell::new(AccountantState::new()); - } - } - } - }; -} - -pub use impl_mock_accountant; diff --git a/libs/test-utils/src/mocks/authority_origin.rs b/libs/test-utils/src/mocks/authority_origin.rs deleted file mode 100644 index d7fc4bdeb0..0000000000 --- a/libs/test-utils/src/mocks/authority_origin.rs +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -use cfg_types::tokens::CurrencyId; -use frame_support::traits::{EnsureOrigin, EnsureOriginWithArg}; -use frame_system::RawOrigin; -use sp_std::marker::PhantomData; - -type AccountId = u64; - -/// This OrmlAssetRegistry::AuthorityOrigin implementation is used for our -/// pallet-loans and pallet-pool-system Mocks. We overwrite this because of the -/// `type AccountId = u64`. In the runtime tests, we use proper AccountIds, in -/// the Mocks, we use 1,2,3,... . Therefore, we implement `AuthorityOrigin` and -/// use the `u64` type for the AccountId. -/// -/// Use this implementation only when setting up Mocks with simple AccountIds. -pub struct AuthorityOrigin< - // The origin type - Origin, - // The default EnsureOrigin impl used to authorize all - // assets besides tranche tokens. - DefaultEnsureOrigin, ->(PhantomData<(Origin, DefaultEnsureOrigin)>); - -impl< - Origin: Into, Origin>> + From>, - EnsureRoot: EnsureOrigin, - > EnsureOriginWithArg> for AuthorityOrigin -{ - type Success = (); - - fn try_origin(origin: Origin, asset_id: &Option) -> Result { - match asset_id { - // Only the pools pallet should directly register/update tranche tokens - Some(CurrencyId::Tranche(_, _)) => Err(origin), - - // Any other `asset_id` defaults to EnsureRoot - _ => EnsureRoot::try_origin(origin).map(|_| ()), - } - } - - #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin(_: &Option) -> Result { - Err(()) - } -} diff --git a/libs/test-utils/src/mocks/mod.rs b/libs/test-utils/src/mocks/mod.rs index 9b48d90110..53cfd9558e 100644 --- a/libs/test-utils/src/mocks/mod.rs +++ b/libs/test-utils/src/mocks/mod.rs @@ -13,8 +13,5 @@ //! Mocks of traits for usage in pallet-tests. //! Also does contain implementations for Substrate based traits for testing -pub mod accountant; -pub mod authority_origin; pub mod nav; -pub mod order_manager; pub mod orml_asset_registry; diff --git a/libs/test-utils/src/mocks/order_manager.rs b/libs/test-utils/src/mocks/order_manager.rs deleted file mode 100644 index 3e318e27f4..0000000000 --- a/libs/test-utils/src/mocks/order_manager.rs +++ /dev/null @@ -1,412 +0,0 @@ -// Copyright 2021 Centrifuge Foundation (centrifuge.io). -// -// This file is part of the Centrifuge chain project. -// Centrifuge is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version (see http://www.gnu.org/licenses). -// Centrifuge is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -pub use pallet::*; - -#[frame_support::pallet] -pub mod pallet { - use cfg_traits::investments::{ - Investment, InvestmentAccountant, OrderManager, TrancheCurrency, - }; - use cfg_types::{ - investments::InvestmentInfo, - orders::{FulfillmentWithPrice, TotalOrder}, - }; - use frame_support::{ - pallet_prelude::*, - traits::{ - fungibles::{Inspect, Mutate}, - tokens::Preservation, - }, - PalletId, - }; - use frame_system::pallet_prelude::BlockNumberFor; - use sp_runtime::{traits::AccountIdConversion, FixedPointNumber, FixedPointOperand}; - - pub struct OrderManagerAccount; - - impl OrderManagerAccount { - pub const LOCAL_ID: PalletId = PalletId(*b"OrdrMngr"); - - pub fn get() -> T::AccountId { - OrderManagerAccount::LOCAL_ID.into_account_truncating() - } - } - - type BalanceOf = - <::Tokens as Inspect<::AccountId>>::Balance; - type CurrencyOf = - <::Tokens as Inspect<::AccountId>>::AssetId; - - #[pallet::config] - pub trait Config: frame_system::Config - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: - MaxEncodedLen + MaybeSerializeDeserialize, - { - type FundsAccount: Get; - - type Accountant: InvestmentAccountant< - Self::AccountId, - Amount = BalanceOf, - Error = DispatchError, - InvestmentId = Self::InvestmentId, - InvestmentInfo = InvestmentInfo, Self::InvestmentId>, - >; - - type PoolId: Member + Parameter + Default + Copy + MaxEncodedLen; - - type TrancheId: Member + Parameter + Default + Copy + MaxEncodedLen; - - type InvestmentId: Member - + Parameter - + Copy - + MaxEncodedLen - + MaybeSerializeDeserialize - + Into> - + TrancheCurrency; - - type Rate: FixedPointNumber>; - - type Tokens: Inspect + Mutate; - } - - #[pallet::pallet] - pub struct Pallet(_); - - #[pallet::genesis_config] - pub struct GenesisConfig - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - pub invest_orders: Vec<(T::InvestmentId, BalanceOf)>, - pub redeem_orders: Vec<(T::InvestmentId, BalanceOf)>, - } - - #[cfg(feature = "std")] - impl Default for GenesisConfig - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - fn default() -> Self { - Self { - invest_orders: Default::default(), - redeem_orders: Default::default(), - } - } - } - - #[pallet::genesis_build] - impl GenesisBuild for GenesisConfig - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - fn build(&self) { - for (id, amount) in &self.invest_orders { - InvestOrders::::insert(*id, TotalOrder { amount: *amount }); - } - for (id, amount) in &self.redeem_orders { - RedeemOrders::::insert(*id, TotalOrder { amount: *amount }); - } - } - } - - #[pallet::storage] - pub type InvestOrders = - StorageMap<_, Blake2_128Concat, T::InvestmentId, TotalOrder>>; - - #[pallet::storage] - pub type RedeemOrders = - StorageMap<_, Blake2_128Concat, T::InvestmentId, TotalOrder>>; - - #[pallet::hooks] - impl Hooks> for Pallet - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - // TODO: Remove once we are on Substrate:polkadot-v0.9.29 - } - #[pallet::call] - impl Pallet - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - // TODO: Remove once we are on Substrate:polkadot-v0.9.29 - } - - impl Pallet - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - /// **Test Method** - /// - /// Moves funds from the `T::FundsAccount` to the local - /// `OrderManagerAccount` - pub fn update_invest_order( - investment_id: T::InvestmentId, - amount: BalanceOf, - ) -> DispatchResult { - let mut orders = InvestOrders::::get(investment_id).unwrap_or_default(); - orders.amount += amount; - InvestOrders::::insert(investment_id, orders); - - let details = T::Accountant::info(investment_id)?; - - T::Tokens::transfer( - details.payment_currency, - &T::FundsAccount::get().into_account_truncating(), - &OrderManagerAccount::get::(), - amount, - Preservation::Expendable, - ) - .map(|_| ()) - } - - /// **Test Method** - /// - /// DOES NOT move funds. We assume that all received `TrancheTokens` - /// stay in the given `OrderManagerAccount` while testing. Hence, if - /// redeemptions should be locked we do not need to move them. - pub fn update_redeem_order( - investment_id: T::InvestmentId, - amount: BalanceOf, - ) -> DispatchResult { - let mut orders = RedeemOrders::::get(investment_id).unwrap_or_default(); - orders.amount += amount; - RedeemOrders::::insert(investment_id, orders); - - // NOTE: TrancheTokens NEVER leave the TEST_PALLET_ID account and hence we can - // keep them here and need no transfer. - - Ok(()) - } - } - - impl Investment for Pallet - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - type Amount = BalanceOf; - type CurrencyId = CurrencyOf; - type Error = DispatchError; - type InvestmentId = T::InvestmentId; - - fn update_investment( - _: &T::AccountId, - investment_id: Self::InvestmentId, - amount: Self::Amount, - ) -> Result<(), Self::Error> { - Self::update_invest_order(investment_id, amount) - } - - fn accepted_payment_currency( - investment_id: Self::InvestmentId, - currency: Self::CurrencyId, - ) -> bool { - T::Accountant::info(investment_id) - .map(|info| info.payment_currency == currency) - .unwrap_or(false) - } - - fn investment( - _: &T::AccountId, - investment_id: Self::InvestmentId, - ) -> Result { - Ok(InvestOrders::::get(investment_id) - .unwrap_or_default() - .amount) - } - - fn update_redemption( - _: &T::AccountId, - investment_id: Self::InvestmentId, - amount: Self::Amount, - ) -> Result<(), Self::Error> { - Self::update_redeem_order(investment_id, amount) - } - - fn accepted_payout_currency( - investment_id: Self::InvestmentId, - currency: Self::CurrencyId, - ) -> bool { - T::Accountant::info(investment_id) - .map(|info| info.payment_currency == currency) - .unwrap_or(false) - } - - fn redemption( - _: &T::AccountId, - investment_id: Self::InvestmentId, - ) -> Result { - Ok(RedeemOrders::::get(investment_id) - .unwrap_or_default() - .amount) - } - - fn investment_requires_collect( - _investor: &T::AccountId, - _investment_id: Self::InvestmentId, - ) -> bool { - unimplemented!("not needed here, could also default to false") - } - - fn redemption_requires_collect( - _investor: &T::AccountId, - _investment_id: Self::InvestmentId, - ) -> bool { - unimplemented!("not needed here, could also default to false") - } - } - - impl OrderManager for Pallet - where - >::Balance: - From + FixedPointOperand + MaxEncodedLen + MaybeSerializeDeserialize, - >::AssetId: MaxEncodedLen + MaybeSerializeDeserialize, - { - type Error = DispatchError; - type Fulfillment = FulfillmentWithPrice; - type InvestmentId = T::InvestmentId; - type Orders = TotalOrder>; - - /// When called the manager return the current - /// invest orders for the given investment class. - fn process_invest_orders( - asset_id: Self::InvestmentId, - ) -> Result { - Ok(InvestOrders::::get(asset_id).unwrap_or_default()) - } - - /// When called the manager return the current - /// redeem orders for the given investment class. - fn process_redeem_orders( - asset_id: Self::InvestmentId, - ) -> Result { - Ok(RedeemOrders::::get(asset_id).unwrap_or_default()) - } - - fn invest_orders(asset_id: Self::InvestmentId) -> Self::Orders { - InvestOrders::::get(asset_id).unwrap_or_default() - } - - fn redeem_orders(asset_id: Self::InvestmentId) -> Self::Orders { - RedeemOrders::::get(asset_id).unwrap_or_default() - } - - /// Signals the manager that the previously - /// fetch invest orders for a given investment class - /// will be fulfilled by fulfillment. - fn invest_fulfillment( - asset_id: Self::InvestmentId, - fulfillment: Self::Fulfillment, - ) -> Result<(), Self::Error> { - let orders = InvestOrders::::get(asset_id).unwrap_or_default(); - InvestOrders::::insert(asset_id, TotalOrder::default()); - - // Move tokens to pools - let tokens_to_transfer_to_pool = fulfillment.of_amount.mul_floor(orders.amount); - let details = T::Accountant::info(asset_id)?; - T::Tokens::transfer( - details.payment_currency, - &OrderManagerAccount::get::(), - &details.owner, - tokens_to_transfer_to_pool, - Preservation::Preserve, - ) - .expect("Transferring must work. Qed."); - - // Update local order - InvestOrders::::insert( - asset_id, - TotalOrder { - amount: orders.amount - tokens_to_transfer_to_pool, - }, - ); - - // Mint tranche tokens into test pallet-id - let tranche_tokens_to_mint = fulfillment - .price - .reciprocal() - .unwrap() - .checked_mul_int(tokens_to_transfer_to_pool) - .unwrap(); - T::Accountant::deposit( - &OrderManagerAccount::get::(), - asset_id, - tranche_tokens_to_mint, - ) - .expect("Depositing must work. Qed."); - - Ok(()) - } - - /// Signals the manager that the previously - /// fetch redeem orders for a given investment class - /// will be fulfilled by fulfillment. - fn redeem_fulfillment( - asset_id: Self::InvestmentId, - fulfillment: Self::Fulfillment, - ) -> Result<(), Self::Error> { - let orders = RedeemOrders::::get(asset_id).unwrap_or_default(); - RedeemOrders::::insert(asset_id, TotalOrder::default()); - - let tranche_tokens_to_burn_from_test_pallet = - fulfillment.of_amount.mul_floor(orders.amount); - T::Accountant::withdraw( - &OrderManagerAccount::get::(), - asset_id, - tranche_tokens_to_burn_from_test_pallet, - ) - .expect("Withdrawing must work. Qed."); - - // Update local order - RedeemOrders::::insert( - asset_id, - TotalOrder { - amount: orders.amount - tranche_tokens_to_burn_from_test_pallet, - }, - ); - - let payment_currency_to_move_to_order_manager = fulfillment - .price - .checked_mul_int(tranche_tokens_to_burn_from_test_pallet) - .unwrap(); - let details = T::Accountant::info(asset_id)?; - T::Tokens::transfer( - details.payment_currency, - &details.owner, - &OrderManagerAccount::get::(), - payment_currency_to_move_to_order_manager, - Preservation::Expendable, - ) - .expect("Transferring must work. Qed."); - - Ok(()) - } - } -} diff --git a/pallets/investments/Cargo.toml b/pallets/investments/Cargo.toml index ded078003d..296860a2dc 100644 --- a/pallets/investments/Cargo.toml +++ b/pallets/investments/Cargo.toml @@ -27,7 +27,6 @@ sp-std = { git = "https://github.com/paritytech/substrate", default-features = f frame-benchmarking = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "polkadot-v0.9.43" } [dev-dependencies] -cfg-test-utils = { path = "../../libs/test-utils" } cfg-types = { path = "../../libs/types" } cfg-mocks = { workspace = true, default-features = true } orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.43" } @@ -42,7 +41,6 @@ sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0 default = ["std"] runtime-benchmarks = [ "cfg-primitives/runtime-benchmarks", - "cfg-test-utils/runtime-benchmarks", "cfg-traits/runtime-benchmarks", "cfg-types/runtime-benchmarks", "cfg-mocks/runtime-benchmarks", @@ -67,7 +65,6 @@ std = [ ] try-runtime = [ "cfg-primitives/try-runtime", - "cfg-test-utils/try-runtime", "cfg-traits/try-runtime", "cfg-mocks/try-runtime", "frame-support/try-runtime", diff --git a/pallets/investments/src/mock.rs b/pallets/investments/src/mock.rs index b6b034b6bc..b9dbe8fa27 100644 --- a/pallets/investments/src/mock.rs +++ b/pallets/investments/src/mock.rs @@ -148,16 +148,6 @@ impl pallet_balances::Config for MockRuntime { type WeightInfo = (); } -/* -cfg_test_utils::mocks::accountant::impl_mock_accountant!( - MockAccountant, - MockAccountId, - InvestmentId, - CurrencyId, - Balance -); -*/ - impl cfg_mocks::pallet_mock_pools::Config for MockRuntime { type Balance = Balance; type BalanceRatio = Quantity;