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

[E2E] Create stableswap and cl pools #4175

Merged
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3815303
Create stableswap pools and CL pools
phamminh0811 Jan 31, 2023
f34a8b4
Refactor code to make sure e2e test upgrading run well
phamminh0811 Jan 31, 2023
a51508e
Update tests/e2e/configurer/chain/commands.go
phamminh0811 Jan 31, 2023
f51ee8d
Remove CL pool and change stable token denom
phamminh0811 Feb 1, 2023
f387979
renome debug bin
phamminh0811 Feb 1, 2023
3d73423
Merge branch 'minh/create-stableswap-and-cl-pools' of https://github.…
phamminh0811 Feb 1, 2023
f157d7b
Remove rate limiter
phamminh0811 Feb 3, 2023
e1ca8cf
resolve compile osmosis amd64 for linux error
phamminh0811 Feb 3, 2023
3a9b011
Merge branch 'minh/create-stableswap-and-cl-pools' of https://github.…
phamminh0811 Feb 3, 2023
33bb4aa
resolve conflict
phamminh0811 Feb 3, 2023
ab120e7
Update stablepool
phamminh0811 Feb 6, 2023
e5658fa
update create function name
phamminh0811 Feb 6, 2023
ee984e4
rename create stableswap function
phamminh0811 Feb 6, 2023
08f0b2b
add rate_limiter.wasm
phamminh0811 Feb 7, 2023
653a1e4
Update whitespace error
phamminh0811 Feb 7, 2023
7676830
add some logic to execute a swap
phamminh0811 Feb 10, 2023
71a5904
update wasm file
phamminh0811 Feb 10, 2023
05e4b76
fix conflict main
phamminh0811 Feb 20, 2023
67cd658
Add stableswap pool test to e2e
phamminh0811 Feb 20, 2023
e1ab28e
Change TestStableSwapPostUpgrade to try swapping the pool created in …
phamminh0811 Feb 22, 2023
b6ad44e
merge stable pool migrate
phamminh0811 Feb 27, 2023
2ca5dd1
avoid hard code on e2e test
phamminh0811 Feb 27, 2023
5dfcc36
fix conflict
phamminh0811 Feb 28, 2023
47468ed
fix conflict
phamminh0811 Feb 28, 2023
a8fb39a
resolve conflict main
phamminh0811 Mar 9, 2023
eaec8fb
Delete go.work.sum
phamminh0811 Mar 11, 2023
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
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"OSMOSIS_E2E": "True",
"OSMOSIS_E2E_SKIP_IBC": "false",
"OSMOSIS_E2E_SKIP_UPGRADE": "false",
"OSMOSIS_E2E_SKIP_CLEANUP": "true",
"OSMOSIS_E2E_SKIP_CLEANUP": "false",
"OSMOSIS_E2E_SKIP_STATE_SYNC": "false",
"OSMOSIS_E2E_UPGRADE_VERSION": "v15",
"OSMOSIS_E2E_DEBUG_LOG": "false",
Expand Down
1 change: 0 additions & 1 deletion go.work.sum
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5P
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo=
github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA=
Expand Down
11 changes: 11 additions & 0 deletions tests/e2e/configurer/chain/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ func (n *NodeConfig) CreateBalancerPool(poolFile, from string) uint64 {
return poolID
}

func (n *NodeConfig) CreateStableswapPool(poolFile, from string) uint64 {
n.LogActionF("creating stableswap pool from file %s", poolFile)
cmd := []string{"osmosisd", "tx", "gamm", "create-pool", fmt.Sprintf("--pool-file=/osmosis/%s", poolFile), "--pool-type=stableswap", fmt.Sprintf("--from=%s", from)}
_, _, err := n.containerManager.ExecTxCmd(n.t, n.chainId, n.Name, cmd)
require.NoError(n.t, err)

poolID := n.QueryNumPools()
n.LogActionF("successfully created stableswap pool with ID %d", poolID)
return poolID
}

func (n *NodeConfig) CreateConcentratedPool(from, denom1, denom2 string, tickSpacing uint64, exponentAtPriceOne int64, swapFee string) uint64 {
n.LogActionF("creating concentrated pool")

Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/configurer/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ func (uc *UpgradeConfigurer) CreatePreUpgradeState() error {

chainANode.CreateBalancerPool("pool1A.json", initialization.ValidatorWalletName)
chainBNode.CreateBalancerPool("pool1B.json", initialization.ValidatorWalletName)
chainANode.CreateStableswapPool("stablePool.json", initialization.ValidatorWalletName)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add some logic to execute a swap against one of these pools please

It could look similar to: TestGeometricTwapMigration

chainBNode.CreateStableswapPool("stablePool.json", initialization.ValidatorWalletName)

// enable superfluid assets on chainA
chainA.EnableSuperfluidAsset("gamm/pool/1")
Expand Down
7 changes: 7 additions & 0 deletions tests/e2e/scripts/stablePool.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"initial-deposit": "1000000stake,1000uosmo",
phamminh0811 marked this conversation as resolved.
Show resolved Hide resolved
"swap-fee": "0.005",
"exit-fee": "0",
"future-governor": "",
"scaling-factors": "1000,1"
}