88 "strings"
99 "time"
1010
11+ "cosmossdk.io/math"
1112 storetypes "cosmossdk.io/store/types"
1213 circuittypes "cosmossdk.io/x/circuit/types"
1314 "cosmossdk.io/x/nft"
@@ -24,6 +25,8 @@ import (
2425 minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
2526 paramstypes "github.com/cosmos/cosmos-sdk/x/params/types"
2627 protocolpooltypes "github.com/cosmos/cosmos-sdk/x/protocolpool/types"
28+ stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
29+ liquidtypes "github.com/cosmos/gaia/v25/x/liquid/types"
2730 icacontrollertypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/controller/types"
2831 icatypes "github.com/cosmos/ibc-go/v10/modules/apps/27-interchain-accounts/types"
2932 ibctransfertypes "github.com/cosmos/ibc-go/v10/modules/apps/transfer/types"
@@ -45,6 +48,7 @@ var v053StoreUpgrades = storetypes.StoreUpgrades{
4548 group .StoreKey ,
4649 icacontrollertypes .StoreKey ,
4750 nft .StoreKey ,
51+ liquidtypes .StoreKey ,
4852 },
4953 Renamed : []storetypes.StoreRename {
5054 // {OldKey: "oldkey", NewKey: "newkey"},
@@ -115,6 +119,22 @@ func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
115119 return nil , err
116120 }
117121
122+ // Bootstrap liquid staking
123+ err = app .StakingKeeper .IterateValidators (ctx , func (_ int64 , v stakingtypes.ValidatorI ) (stop bool ) {
124+ lv := liquidtypes.LiquidValidator {
125+ OperatorAddress : v .GetOperator (),
126+ LiquidShares : math .LegacyZeroDec (),
127+ }
128+ err := app .LiquidKeeper .SetLiquidValidator (ctx , lv )
129+ if err != nil {
130+ return false
131+ }
132+ return false
133+ })
134+ if err != nil {
135+ return nil , err
136+ }
137+
118138 // If you must pin any module "from" versions, adjust fromVM here.
119139 return app .mm .RunMigrations (ctx , cfg , fromVM )
120140 },
0 commit comments