Skip to content

Commit

Permalink
add a upgrade handler for new feature cosmos eth ibc fee priority
Browse files Browse the repository at this point in the history
  • Loading branch information
RustNinja committed Apr 26, 2024
1 parent 58b184c commit 58ec4cc
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
20 changes: 20 additions & 0 deletions app/upgrades/v6_5_5/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package v6_5_5

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_5_4"
)

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

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) {
// BrokenProposals := [3]uint64{2, 6, 11}
// // gov module store
// store := ctx.KVStore(keepers.GetKVStoreKey()["gov"])

// for _, proposalID := range BrokenProposals {
// bz := store.Get(types.ProposalKey(proposalID))
// if bz != nil {
// store.Delete(types.ProposalKey(proposalID))
// }
// }
return mm.RunMigrations(ctx, configurator, vm)
}
}

0 comments on commit 58ec4cc

Please sign in to comment.