-
Notifications
You must be signed in to change notification settings - Fork 607
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
remove exit fee param #4440
remove exit fee param #4440
Changes from 26 commits
f84fce3
eac9f6f
12583ff
7e8f7c0
bc5de98
536f69a
f0c4d6a
a1f0370
1a90863
9483832
d88c9c6
22dbceb
3148b6c
ea88524
267c0f8
c956971
59d74c9
441196f
3a05a49
8455809
0bf6f3f
11d4f34
2db6074
96780d9
a15654a
b040201
456f19f
292d853
464cde3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
package v15 | ||
|
||
import ( | ||
"fmt" | ||
|
||
packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" | ||
|
||
poolmanagertypes "github.com/osmosis-labs/osmosis/v15/x/poolmanager/types" | ||
|
@@ -47,6 +49,13 @@ func CreateUpgradeHandler( | |
// Instead,it is moved to poolmanager. | ||
migrateNextPoolId(ctx, keepers.GAMMKeeper, keepers.PoolManagerKeeper) | ||
|
||
removeExitFee(ctx, *keepers.GAMMKeeper, exitFeePools) | ||
|
||
// N.B.: this is done to avoid initializing genesis for gamm module. | ||
// Otherwise, it would overwrite migrations with InitGenesis(). | ||
// See RunMigrations() for details. | ||
fromVM[gammtypes.ModuleName] = 0 | ||
|
||
// N.B.: this is done to avoid initializing genesis for poolmanager module. | ||
// Otherwise, it would overwrite migrations with InitGenesis(). | ||
// See RunMigrations() for details. | ||
|
@@ -83,6 +92,7 @@ func migrateBalancerPoolsToSolidlyStable(ctx sdk.Context, gammKeeper *gammkeeper | |
// migrate stOSMO_OSMOPoolId, stJUNO_JUNOPoolId, stSTARS_STARSPoolId | ||
pools := []uint64{stOSMO_OSMOPoolId, stJUNO_JUNOPoolId, stSTARS_STARSPoolId} | ||
for _, poolId := range pools { | ||
fmt.Println("poolId", poolId) | ||
migrateBalancerPoolToSolidlyStable(ctx, gammKeeper, poolmanagerKeeper, bankKeeper, poolId) | ||
} | ||
} | ||
|
@@ -97,7 +107,7 @@ func migrateBalancerPoolToSolidlyStable(ctx sdk.Context, gammKeeper *gammkeeper. | |
// initialize the stableswap pool | ||
stableswapPool, err := stableswap.NewStableswapPool( | ||
poolId, | ||
stableswap.PoolParams{SwapFee: balancerPool.GetSwapFee(ctx), ExitFee: balancerPool.GetExitFee(ctx)}, | ||
stableswap.PoolParams{SwapFee: balancerPool.GetSwapFee(ctx)}, | ||
balancerPool.GetTotalPoolLiquidity(ctx), | ||
[]uint64{1, 1}, | ||
"osmo1k8c2m5cn322akk5wy8lpt87dd2f4yh9afcd7af", // Stride Foundation 2/3 multisig | ||
|
@@ -286,3 +296,12 @@ func registerOsmoIonMetadata(ctx sdk.Context, bankKeeper bankkeeper.Keeper) { | |
bankKeeper.SetDenomMetaData(ctx, uosmoMetadata) | ||
bankKeeper.SetDenomMetaData(ctx, uionMetadata) | ||
} | ||
|
||
func removeExitFee(ctx sdk.Context, gammKeeper gammkeeper.Keeper, poolsWithExitFee []uint64) { | ||
for _, poolId := range poolsWithExitFee { | ||
err := gammKeeper.DeletePool(ctx, poolId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are we deleting these pools? The pools should stay, only the exit fee setting is removed |
||
if err != nil { | ||
panic(err) | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"weights": "5ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,5uosmo", | ||
"initial-deposit": "499404ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,500000uosmo", | ||
"swap-fee": "0.01", | ||
"exit-fee": "0.01", | ||
"future-governor": "" | ||
} |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -2,6 +2,5 @@ | |||
"weights": "5ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,5uosmo", | ||||
"initial-deposit": "499404ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,500000uosmo", | ||||
"swap-fee": "0.01", | ||||
"exit-fee": "0.01", | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. e2e is failing because this is removed. Basically, it tries to create a pool for pre-upgrade Osmosis (v14) that still has and expects this parameter. I suggest copying this file and naming it osmosis/tests/e2e/configurer/upgrade.go Line 128 in ae97cec
Also, please do the same for |
||||
"future-governor": "" | ||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"weights": "5ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878,5uosmo", | ||
"initial-deposit": "499404ibc/C053D637CCA2A2BA030E2C5EE1B28A16F71CCB0E45E8BE52766DC1B241B77878,500000uosmo", | ||
"swap-fee": "0.01", | ||
"exit-fee": "0.0", | ||
"future-governor": "" | ||
} |
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.
This is only needed for newly added modules