diff --git a/modules/ibc-hooks/sdkmodule.go b/modules/ibc-hooks/sdkmodule.go index 1167ffd4..756fa109 100644 --- a/modules/ibc-hooks/sdkmodule.go +++ b/modules/ibc-hooks/sdkmodule.go @@ -107,14 +107,20 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // BeginBlock returns the begin blocker for the ibc-hooks module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context) { } // EndBlock returns the end blocker for the ibc-hooks module. It returns no validator // updates. -func (AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { +func (AppModule) EndBlock(_ sdk.Context) []abci.ValidatorUpdate { return []abci.ValidatorUpdate{} } // ConsensusVersion implements AppModule/ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 1 } + +// Add this method to implement the module.AppModule interface +func (AppModule) IsAppModule() {} + +// IsOnePerModuleType ensures AppModule implements the module.AppModule interface. +func (AppModule) IsOnePerModuleType() {} diff --git a/modules/ibc-hooks/tests/unit/mocks/isc4_middleware_mock.go b/modules/ibc-hooks/tests/unit/mocks/isc4_middleware_mock.go index 328906f5..7d5bbddf 100644 --- a/modules/ibc-hooks/tests/unit/mocks/isc4_middleware_mock.go +++ b/modules/ibc-hooks/tests/unit/mocks/isc4_middleware_mock.go @@ -2,8 +2,8 @@ package mocks import ( sdk "github.com/cosmos/cosmos-sdk/types" - capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" "github.com/cosmos/ibc-go/v8/modules/core/exported" diff --git a/modules/ibc-hooks/wasm_hook.go b/modules/ibc-hooks/wasm_hook.go index cbc0a81f..49944828 100644 --- a/modules/ibc-hooks/wasm_hook.go +++ b/modules/ibc-hooks/wasm_hook.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" + sdkmath "cosmossdk.io/math" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/ibc-apps/modules/ibc-hooks/v8/keeper" @@ -92,7 +93,7 @@ func (h WasmHooks) OnRecvPacketOverride(im IBCMiddleware, ctx sdk.Context, packe return ack } - amount, ok := sdk.NewIntFromString(data.GetAmount()) + amount, ok := sdkmath.NewIntFromString(data.GetAmount()) if !ok { // This should never happen, as it should've been caught in the underlaying call to OnRecvPacket, // but returning here for completeness