Skip to content

Commit

Permalink
remove ibc wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
ash-burnt committed Oct 3, 2024
1 parent 77e405f commit ee984ae
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 43 deletions.
34 changes: 1 addition & 33 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
wasmvm "github.com/CosmWasm/wasmvm/v2"
"github.com/gorilla/mux"
aa "github.com/larry0x/abstract-account/x/abstractaccount"
aakeeper "github.com/larry0x/abstract-account/x/abstractaccount/keeper"
Expand Down Expand Up @@ -41,9 +40,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 +274,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 @@ -358,7 +353,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 @@ -713,20 +708,6 @@ func NewWasmApp(
wasmOpts = append(owasm.RegisterStargateQueries(*app.GRPCQueryRouter(), appCodec), wasmOpts...)
wasmOpts = append(wasmOpts, tokenFactoryOpts...)

// instantiate the Wasm VM with the chosen parameters
wasmVM, err := wasmvm.NewVM(
wasmDir,
availableCapabilities,
WasmContractMemoryLimit, // default of 32
wasmConfig.ContractDebugMode,
wasmConfig.MemoryCacheSize,
)
if err != nil {
panic(err)
}

wasmOpts = append(wasmOpts, wasmkeeper.WithWasmEngine(wasmVM))

app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
runtime.NewKVStoreService(keys[wasmtypes.StoreKey]),
Expand All @@ -748,15 +729,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 @@ -865,7 +837,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 @@ -918,7 +889,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
xiontypes.ModuleName,
Expand All @@ -944,7 +914,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
wasmtypes.ModuleName,
aatypes.ModuleName,
ibchookstypes.ModuleName,
Expand Down Expand Up @@ -976,7 +945,6 @@ func NewWasmApp(
feeabstypes.ModuleName,
icatypes.ModuleName,
ibcfeetypes.ModuleName,
ibcwasmtypes.ModuleName,
// wasm after ibc transfer
wasmtypes.ModuleName,
aatypes.ModuleName,
Expand Down
8 changes: 1 addition & 7 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ import (
"context"
"fmt"

ibcwasmtypes "github.com/cosmos/ibc-go/modules/light-clients/08-wasm/types"

storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"

Expand All @@ -25,11 +23,7 @@ func (app *WasmApp) RegisterUpgradeHandlers() {

if upgradeInfo.Name == UpgradeName {
if !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{
Added: []string{
ibcwasmtypes.ModuleName,
},
}
storeUpgrades := storetypes.StoreUpgrades{}

app.Logger().Info("setting upgrade store loaders")
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ require (
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2
github.com/cosmos/ibc-apps/modules/ibc-hooks/v8 v8.0.0-20240530162148-4827cf263165
github.com/cosmos/ibc-go/modules/capability v1.0.1
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72
github.com/cosmos/ibc-go/v8 v8.5.1
github.com/cosmos/rosetta v0.50.6
github.com/dvsekhvalnov/jose2go v1.6.0
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,6 @@ github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0
github.com/cosmos/ibc-go/modules/apps/callbacks v0.2.1-0.20231113120333-342c00b0f8bd/go.mod h1:JWfpWVKJKiKtd53/KbRoKfxWl8FsT2GPcNezTOk0o5Q=
github.com/cosmos/ibc-go/modules/capability v1.0.1 h1:ibwhrpJ3SftEEZRxCRkH0fQZ9svjthrX2+oXdZvzgGI=
github.com/cosmos/ibc-go/modules/capability v1.0.1/go.mod h1:rquyOV262nGJplkumH+/LeYs04P3eV8oB7ZM4Ygqk4E=
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72 h1:QjCi4bJoy9AXLL1e4jqi+4rHYN0gGZAQxf937cdWhw4=
github.com/cosmos/ibc-go/modules/light-clients/08-wasm v0.4.2-0.20240730185033-ccd4dc278e72/go.mod h1:yiulzyQAZ+Ci802z/kVQqTA3lGiSJOmDpTq7kZxOUNE=
github.com/cosmos/ibc-go/v8 v8.5.1 h1:3JleEMKBjRKa3FeTKt4fjg22za/qygLBo7mDkoYTNBs=
github.com/cosmos/ibc-go/v8 v8.5.1/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo=
github.com/cosmos/ics23/go v0.11.0 h1:jk5skjT0TqX5e5QJbEnwXIS2yI2vnmLOgpQPeM5RtnU=
Expand Down

0 comments on commit ee984ae

Please sign in to comment.