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

feat: add more lm wrappers #953

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
04d71d9
add combined add liquidity stableswap omnipool and join farms wrapper…
dmoka Nov 25, 2024
fe05d99
add add_liquidity_with_limit_and_join_farms
dmoka Nov 25, 2024
a7f30cf
add missing doc
dmoka Nov 26, 2024
9838160
wip - benchmarking new wrappers
dmoka Nov 27, 2024
01de50f
wip - reproduce failing bench test in integration test
dmoka Nov 29, 2024
3632f31
adjust balance updates
dmoka Nov 29, 2024
98ad77a
fix test
dmoka Nov 29, 2024
8ad2726
add benchmark for new extrinswics
dmoka Dec 1, 2024
ea0af62
parameterize benchmark test
dmoka Dec 1, 2024
d53b4dd
use stableswap max asset const config in OMNI LM
dmoka Dec 1, 2024
5f7cb15
formatting
dmoka Dec 1, 2024
41b2448
regenerate benchmark for add liq stable omni and join farms extnrisc
dmoka Dec 1, 2024
e4517bb
use bounded vec for stableswap extrinsic
dmoka Dec 1, 2024
93462d1
remove not needed exit farms
dmoka Dec 3, 2024
6dad012
formatting
dmoka Dec 3, 2024
bb1be92
make clippy happy
dmoka Dec 3, 2024
07d34a3
fix compilation erros
dmoka Dec 4, 2024
a8675d5
Merge remote-tracking branch 'origin/master' into feat/add-more-lm-wr…
dmoka Dec 4, 2024
46136ad
bump versions
dmoka Dec 4, 2024
b3b64ab
add missing event assertions for new LM wrapper functions
dmoka Dec 26, 2024
d753c21
merge master to feat/add-more-lm-wrappers
dmoka Dec 26, 2024
218ad60
bump versions
dmoka Dec 26, 2024
bb6df3b
make clippy happy
dmoka Dec 26, 2024
94c0e15
formatting
dmoka Dec 26, 2024
01a6011
remove wrong comment
dmoka Dec 26, 2024
9a2ec27
merge master to feat/add-more-lm-wrappers
dmoka Jan 3, 2025
9a7d451
removed not used method
dmoka Jan 3, 2025
c289478
add separate benchmark for add_liquidity_with_limit_and_join_farms
dmoka Jan 3, 2025
d119148
merge add liq with limit optional param
dmoka Jan 3, 2025
60fc4fd
fix doc comment
dmoka Jan 3, 2025
2dd05bc
remove duplicated test
dmoka Jan 3, 2025
be0598d
fix benchmark tests
dmoka Jan 3, 2025
d924359
formatting
dmoka Jan 3, 2025
274d57f
rebench ommnipool lm on ref machine
dmoka Jan 3, 2025
f39e64f
only join farms when specified
dmoka Jan 3, 2025
94be437
bump runtime version
dmoka Jan 3, 2025
48cef98
formatting
dmoka Jan 3, 2025
9bb2171
delete not valid test
dmoka Jan 6, 2025
13861e9
formatting
dmoka Jan 6, 2025
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
16 changes: 9 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "runtime-integration-tests"
version = "1.25.1"
version = "1.26.0"
description = "Integration tests"
authors = ["GalacticCouncil"]
edition = "2021"
Expand Down
10 changes: 6 additions & 4 deletions integration-tests/src/dca.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ use hydradx_traits::registry::{AssetKind, Create};
use hydradx_traits::router::AssetPair;
use hydradx_traits::router::PoolType;
use hydradx_traits::router::Trade;
use hydradx_traits::stableswap::AssetAmount;
use orml_traits::MultiCurrency;
use orml_traits::MultiReservableCurrency;
use pallet_dca::types::{Order, Schedule};
use pallet_omnipool::types::Tradability;
use pallet_stableswap::types::AssetAmount;
use pallet_stableswap::MAX_ASSETS_IN_POOL;
use primitives::{AssetId, Balance};
use sp_runtime::traits::ConstU32;
Expand Down Expand Up @@ -2522,7 +2522,9 @@ mod stableswap {
vec![AssetAmount {
asset_id: stable_asset_1,
amount: amount_to_sell,
}],
}]
.try_into()
.unwrap(),
));
let alice_pool_id_balance = Currencies::free_balance(pool_id, &AccountId::from(ALICE));

Expand Down Expand Up @@ -4144,7 +4146,7 @@ pub fn init_stableswap() -> Result<(AssetId, AssetId, AssetId), DispatchError> {

Stableswap::create_pool(RuntimeOrigin::root(), pool_id, asset_ids, amplification, fee)?;

Stableswap::add_liquidity(RuntimeOrigin::signed(BOB.into()), pool_id, initial)?;
Stableswap::add_liquidity(RuntimeOrigin::signed(BOB.into()), pool_id, initial.try_into().unwrap())?;

Ok((pool_id, asset_in, asset_out))
}
Expand Down Expand Up @@ -4208,7 +4210,7 @@ pub fn init_stableswap_with_three_assets_having_different_decimals(

Stableswap::create_pool(RuntimeOrigin::root(), pool_id, asset_ids, amplification, fee)?;

Stableswap::add_liquidity(RuntimeOrigin::signed(BOB.into()), pool_id, initial)?;
Stableswap::add_liquidity(RuntimeOrigin::signed(BOB.into()), pool_id, initial.try_into().unwrap())?;

Ok((pool_id, asset_in, asset_out))
}
Expand Down
Loading
Loading