From eec645fa16b94492902c8aa8ded8d41cfed071aa Mon Sep 17 00:00:00 2001 From: Cosmic Vagabond <121588426+cosmic-vagabond@users.noreply.github.com> Date: Tue, 12 Dec 2023 21:55:19 +0100 Subject: [PATCH] fix: elys/usdc testnet pool weight --- app/setup_handlers.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/setup_handlers.go b/app/setup_handlers.go index 84c76cc9f..6b0ef1737 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -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) }, )