Skip to content

Commit

Permalink
feat: remove ibc wasm module
Browse files Browse the repository at this point in the history
  • Loading branch information
Peartes committed Feb 5, 2025
1 parent 2bd471c commit 15cb1fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 24 deletions.
20 changes: 1 addition & 19 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ import (
"github.com/cosmos/ibc-go/modules/capability"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
ibcwasm "github.com/cosmos/ibc-go/modules/light-clients/08-wasm"
ibcwasmkeeper "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/keeper"
ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"
ica "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts"
icacontroller "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller"
icacontrollerkeeper "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/keeper"
Expand Down Expand Up @@ -278,7 +275,6 @@ type WasmApp struct {
ICAHostKeeper icahostkeeper.Keeper
TransferKeeper ibctransferkeeper.Keeper
WasmKeeper wasmkeeper.Keeper
WasmClientKeeper ibcwasmkeeper.Keeper
AbstractAccountKeeper aakeeper.Keeper
IBCHooksKeeper *ibchookskeeper.Keeper
ContractKeeper *wasmkeeper.PermissionedKeeper
Expand Down Expand Up @@ -360,7 +356,7 @@ func NewWasmApp(
nftkeeper.StoreKey, group.StoreKey,
// non sdk store keys
ibcexported.StoreKey, ibctransfertypes.StoreKey, ibcfeetypes.StoreKey,
ibcwasmtypes.StoreKey, wasmtypes.StoreKey, icahosttypes.StoreKey,
wasmtypes.StoreKey, icahosttypes.StoreKey,
aatypes.StoreKey, icacontrollertypes.StoreKey, globalfee.StoreKey,
xiontypes.StoreKey, ibchookstypes.StoreKey, packetforwardtypes.StoreKey,
feeabstypes.StoreKey, jwktypes.StoreKey, tokenfactorytypes.StoreKey,
Expand Down Expand Up @@ -752,15 +748,6 @@ func NewWasmApp(
wasmOpts...,
)

app.WasmClientKeeper = ibcwasmkeeper.NewKeeperWithVM(
appCodec,
runtime.NewKVStoreService(keys[ibcwasmtypes.StoreKey]),
app.IBCKeeper.ClientKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
wasmVM,
app.GRPCQueryRouter(),
)

app.AbstractAccountKeeper = aakeeper.NewKeeper(
appCodec,
keys[aatypes.StoreKey],
Expand Down Expand Up @@ -869,7 +856,6 @@ func NewWasmApp(
xion.NewAppModule(app.XionKeeper),
ibc.NewAppModule(app.IBCKeeper),
ibctm.NewAppModule(),
ibcwasm.NewAppModule(app.WasmClientKeeper),
transfer.NewAppModule(app.TransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
Expand Down Expand Up @@ -922,7 +908,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
xiontypes.ModuleName,
Expand All @@ -948,7 +933,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
ibchookstypes.ModuleName,
Expand Down Expand Up @@ -980,7 +964,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
// wasm after ibc transfer
wasmtypes.ModuleName,
aatypes.ModuleName,
Expand Down Expand Up @@ -1349,7 +1332,6 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino
paramsKeeper.Subspace(aatypes.ModuleName)
paramsKeeper.Subspace(packetforwardtypes.ModuleName)
paramsKeeper.Subspace(feeabstypes.ModuleName)
paramsKeeper.Subspace(ibcwasmtypes.ModuleName)

// IBC params migration - legacySubspace to selfManaged
// https://github.com/cosmos/ibc-go/blob/main/docs/docs/05-migrations/11-v7-to-v8.md#params-migration
Expand Down
8 changes: 4 additions & 4 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cosmos/cosmos-sdk/types/module"
)

const UpgradeName = "v14"
const UpgradeName = "v15"

func (app *WasmApp) RegisterUpgradeHandlers() {
app.WrapSetUpgradeHandler(UpgradeName)
Expand All @@ -26,12 +26,12 @@ func (app *WasmApp) RegisterUpgradeHandlers() {
if upgradeInfo.Name == UpgradeName {
if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
// Remove the ibcwasm module store.
Deleted: []string{
ibcwasmtypes.ModuleName,
},
}

app.Logger().Info("setting upgrade store loaders")
app.Logger().Info("setting upgrade store loaders for v15")
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/upgrade_ibc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const (
xionVersionFrom = "12.0.1"
xionImageTo = "xion"
xionVersionTo = "local"
xionUpgradeName = "v13"
xionUpgradeName = "v15"

osmosisImage = "ghcr.io/strangelove-ventures/heighliner/osmosis"
osmosisVersion = "v25.2.1"
Expand Down

0 comments on commit 15cb1fd

Please sign in to comment.