-
Notifications
You must be signed in to change notification settings - Fork 602
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
migrate stXXX/XXX constant product pool -> stableswap pool #4384
migrate stXXX/XXX constant product pool -> stableswap pool #4384
Conversation
Please merge This is the final step needed for e2e testing the migrations during the upgrade. We created Stride balancer pools via genesis in v14 in #4393 Now, when the upgrade runs, the pools will be found and the newly implemented migration run against them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM other than the suggested comments and e2e passing
…sis into aidan/migrate-pools-v15
app/upgrades/v15/upgrade_test.go
Outdated
// join the pool | ||
shareOutAmount := sdk.NewInt(10000000) | ||
tokenInMaxs := sdk.NewCoins(sdk.NewCoin("foo", sdk.NewInt(5000000)), sdk.NewCoin("bar", sdk.NewInt(5000000))) | ||
_, _, err = suite.App.GAMMKeeper.JoinPoolNoSwap(suite.Ctx, testAccount, poolID, shareOutAmount, tokenInMaxs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this function has sharesOut
as one of its returns, we could use these to then use for ExitPool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, used this below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thank you @asalzmann
* migrate stXXX/XXX constant product pool -> stableswap pool * update upgrade unittest * send LP tokens to lpWallet * update tests * add join, exit unittest * add checks per comments * one more comment * lp pre-upgrade * clean up and TODOs * fix e2e * add query * rm TestMigrateBalancerToStable, update ExitPool in upgrade_test.go * rm TestMigrateBalancerToStable * update changelog * fix e2e * more assertions for TestMigrateBalancerToStablePools * lint --------- Co-authored-by: Roman <[email protected]> (cherry picked from commit 0355d27) # Conflicts: # tests/e2e/configurer/chain/queries.go
…4384) (#4410) Co-authored-by: Roman <[email protected]>
What is the purpose of the change
Migrate pools 833, 817, and 810 from constant product -> stable swap.
Brief Changelog
Testing and Verifying
This change added tests and can be verified as follows:
TestMigrateBalancerToStablePools
to verify liquidity stays constant before/after the migrationCreatePreUpgradeState
by LPing to the 3 poolsTestMigrateBalancerToStable
e2e test which swaps in and exits each poolDocumentation and Release Note
Unreleased
section inCHANGELOG.md
? yesCHANGELOG.md