Skip to content

Commit

Permalink
prepare v7_0_2 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed Jun 11, 2024
1 parent 93f377e commit b30cb9d
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import (
"github.com/cosmos/cosmos-sdk/x/bank"

"github.com/notional-labs/composable/v6/app/keepers"
"github.com/notional-labs/composable/v6/app/upgrades/v7_0_1"
"github.com/notional-labs/composable/v6/app/upgrades/v7_0_2"

// bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
"cosmossdk.io/x/evidence"
Expand Down Expand Up @@ -149,7 +149,7 @@ var (
// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
EnableSpecificProposals = ""

Upgrades = []upgrades.Upgrade{v7_0_1.Upgrade}
Upgrades = []upgrades.Upgrade{v7_0_2.Upgrade}
Forks = []upgrades.Fork{}
)

Expand Down
20 changes: 20 additions & 0 deletions app/upgrades/v7_0_2/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v7_0_2

import (
store "cosmossdk.io/store/types"
"github.com/notional-labs/composable/v6/app/upgrades"
)

const (
// UpgradeName defines the on-chain upgrade name for the composable upgrade.
UpgradeName = "v7_0_2"
)

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{},
Deleted: []string{},
},
}
27 changes: 27 additions & 0 deletions app/upgrades/v7_0_2/upgrade.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package v7_0_2

import (
"context"

sdk "github.com/cosmos/cosmos-sdk/types"

upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/types/module"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/notional-labs/composable/v6/app/keepers"
"github.com/notional-labs/composable/v6/app/upgrades"
)

func CreateUpgradeHandler(
mm *module.Manager,
configurator module.Configurator,
_ upgrades.BaseAppParamManager,
codec codec.Codec,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(goCtx context.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
ctx := sdk.UnwrapSDKContext(goCtx)
return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit b30cb9d

Please sign in to comment.