Skip to content

Commit

Permalink
v6_6_3 upgrade handler for testnet release
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed Apr 30, 2024
1 parent d0f797c commit 6805a95
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import (
"path/filepath"
"strings"

"github.com/notional-labs/composable/v6/app/upgrades/v6_6_2"

nodeservice "github.com/cosmos/cosmos-sdk/client/grpc/node"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation"
Expand Down Expand Up @@ -38,6 +36,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/v6_6_3"

// bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"

Expand Down Expand Up @@ -148,7 +147,7 @@ var (
// https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34
EnableSpecificProposals = ""

Upgrades = []upgrades.Upgrade{v6_6_2.Upgrade}
Upgrades = []upgrades.Upgrade{v6_6_3.Upgrade}
Forks = []upgrades.Fork{}
)

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

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

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

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

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

"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,
keepers *keepers.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, plan upgradetypes.Plan, vm module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit 6805a95

Please sign in to comment.