Skip to content

Commit

Permalink
fix: elys/usdc testnet pool weight
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond committed Dec 12, 2023
1 parent 8a26fed commit eec645f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/setup_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ func setUpgradeHandler(app *ElysApp) {
// dedicated x/consensus module.
baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper)

// FIXME: temporary code to fix usdc/elys pool weights
pool, found := app.AmmKeeper.GetPool(ctx, 3)
if found {
totalWeight := sdk.ZeroInt()
for i := range pool.PoolAssets {
pool.PoolAssets[i].Weight = sdk.NewInt(107374182400)
totalWeight = totalWeight.Add(pool.PoolAssets[i].Weight)
}
pool.TotalWeight = totalWeight
pool.PoolParams.FeeDenom = "ibc/2180E84E20F5679FCC760D8C165B60F42065DEF7F46A72B447CFF1B7DC6C0A65"
app.AmmKeeper.SetPool(ctx, pool)
}

return app.mm.RunMigrations(ctx, app.configurator, vm)
},
)
Expand Down

0 comments on commit eec645f

Please sign in to comment.