diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 4fdcaf5ec..88db7bb4d 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -3,7 +3,7 @@ package keepers import ( "path/filepath" - ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" + // ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" @@ -54,8 +54,9 @@ import ( porttypes "github.com/cosmos/ibc-go/v4/modules/core/05-port/types" ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" ibckeeper "github.com/cosmos/ibc-go/v4/modules/core/keeper" - ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" - ibchookskeeper "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" + + // ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" + // ibchookskeeper "github.com/osmosis-labs/osmosis/x/ibc-hooks/keeper" packetforward "github.com/strangelove-ventures/packet-forward-middleware/v4/router" packetforwardkeeper "github.com/strangelove-ventures/packet-forward-middleware/v4/router/keeper" @@ -102,14 +103,15 @@ type AppKeepers struct { ParamsKeeper paramskeeper.Keeper IBCKeeper *ibckeeper.Keeper // IBC Keeper must be a pointer in the app, so we can SetRouter on it correctly IBCFeeKeeper ibcfeekeeper.Keeper - IBCHooksKeeper *ibchookskeeper.Keeper PacketForwardKeeper *packetforwardkeeper.Keeper EvidenceKeeper evidencekeeper.Keeper TransferKeeper ibctransferkeeper.Keeper AuthzKeeper authzkeeper.Keeper FeeGrantKeeper feegrantkeeper.Keeper FeeShareKeeper feesharekeeper.Keeper - ContractKeeper *wasmkeeper.PermissionedKeeper + + // IBCHooksKeeper *ibchookskeeper.Keeper + // ContractKeeper *wasmkeeper.PermissionedKeeper // OracleKeeper oraclekeeper.Keeper @@ -130,8 +132,8 @@ type AppKeepers struct { TokenFactoryKeeper tokenfactorykeeper.Keeper // Middleware wrapper - Ics20WasmHooks *ibchooks.WasmHooks - HooksICS4Wrapper ibchooks.ICS4Middleware + // Ics20WasmHooks *ibchooks.WasmHooks + // HooksICS4Wrapper ibchooks.ICS4Middleware } func NewAppKeepers( @@ -285,18 +287,18 @@ func NewAppKeepers( AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(appKeepers.IBCKeeper.ClientKeeper)) // Configure the hooks keeper - hooksKeeper := ibchookskeeper.NewKeeper( - appKeepers.keys[ibchookstypes.StoreKey], - ) - appKeepers.IBCHooksKeeper = &hooksKeeper - - junoPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() - wasmHooks := ibchooks.NewWasmHooks(appKeepers.IBCHooksKeeper, nil, junoPrefix) // The contract keeper needs to be set later - appKeepers.Ics20WasmHooks = &wasmHooks - appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( - appKeepers.IBCKeeper.ChannelKeeper, - appKeepers.Ics20WasmHooks, - ) + // hooksKeeper := ibchookskeeper.NewKeeper( + // appKeepers.keys[ibchookstypes.StoreKey], + // ) + // appKeepers.IBCHooksKeeper = &hooksKeeper + + // junoPrefix := sdk.GetConfig().GetBech32AccountAddrPrefix() + // wasmHooks := ibchooks.NewWasmHooks(appKeepers.IBCHooksKeeper, nil, junoPrefix) // The contract keeper needs to be set later + // appKeepers.Ics20WasmHooks = &wasmHooks + // appKeepers.HooksICS4Wrapper = ibchooks.NewICS4Middleware( + // appKeepers.IBCKeeper.ChannelKeeper, + // appKeepers.Ics20WasmHooks, + // ) // Initialize packet forward middleware router appKeepers.PacketForwardKeeper = packetforwardkeeper.NewKeeper( @@ -311,9 +313,11 @@ func NewAppKeepers( ) appKeepers.IBCFeeKeeper = ibcfeekeeper.NewKeeper( - appCodec, appKeepers.keys[ibcfeetypes.StoreKey], + appCodec, + appKeepers.keys[ibcfeetypes.StoreKey], appKeepers.GetSubspace(ibcfeetypes.ModuleName), // this isn't even used in the keeper but is required? - appKeepers.HooksICS4Wrapper, // replaced with IBC middleware + // appKeepers.HooksICS4Wrapper, // replaced with IBC middleware + appKeepers.IBCKeeper.ChannelKeeper, // TODO: replace this line with the above line for v13-part2 appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, @@ -326,7 +330,8 @@ func NewAppKeepers( appKeepers.keys[ibctransfertypes.StoreKey], appKeepers.GetSubspace(ibctransfertypes.ModuleName), // The ICS4Wrapper is replaced by the PacketForwardKeeper instead of the channel so that sending can be overridden by the middleware - appKeepers.PacketForwardKeeper, + // appKeepers.PacketForwardKeeper, + appKeepers.IBCKeeper.ChannelKeeper, // TODO: replace this with the above line for v13-part2 appKeepers.IBCKeeper.ChannelKeeper, &appKeepers.IBCKeeper.PortKeeper, appKeepers.AccountKeeper, @@ -465,7 +470,7 @@ func NewAppKeepers( packetforwardkeeper.DefaultRefundTransferPacketTimeoutTimestamp, ) transferStack = ibcfee.NewIBCMiddleware(transferStack, appKeepers.IBCFeeKeeper) - transferStack = ibchooks.NewIBCMiddleware(transferStack, &appKeepers.HooksICS4Wrapper) + // transferStack = ibchooks.NewIBCMiddleware(transferStack, &appKeepers.HooksICS4Wrapper) // RecvPacket, message that originates from core IBC and goes down to app, the flow is: // channel.RecvPacket -> fee.OnRecvPacket -> icaHost.OnRecvPacket @@ -499,8 +504,8 @@ func NewAppKeepers( // appKeepers.ScopedInterTxKeeper = scopedInterTxKeeper // set the contract keeper for the Ics20WasmHooks - appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper) - appKeepers.Ics20WasmHooks.ContractKeeper = appKeepers.ContractKeeper + // appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(appKeepers.WasmKeeper) + // appKeepers.Ics20WasmHooks.ContractKeeper = appKeepers.ContractKeeper return appKeepers } diff --git a/app/keepers/keys.go b/app/keepers/keys.go index 7545fca8f..f81d74565 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -24,7 +24,8 @@ import ( ibcfeetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" + + // ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" // intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" // oracletypes "github.com/CosmosContracts/juno/v13/x/oracle/types" @@ -45,8 +46,8 @@ func (appKeepers *AppKeepers) GenerateKeys() { icacontrollertypes.StoreKey, feesharetypes.StoreKey, packetforwardtypes.StoreKey, - ibchookstypes.StoreKey, ibcfeetypes.StoreKey, + // ibchookstypes.StoreKey, // intertxtypes.StoreKey, // oracletypes.StoreKey, ) diff --git a/app/modules.go b/app/modules.go index 4bb72850f..896c9866b 100644 --- a/app/modules.go +++ b/app/modules.go @@ -49,14 +49,14 @@ import ( ibctransfertypes "github.com/cosmos/ibc-go/v4/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v4/modules/core" ibchost "github.com/cosmos/ibc-go/v4/modules/core/24-host" - ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" - ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" packetforward "github.com/strangelove-ventures/packet-forward-middleware/v4/router" packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" // intertx "github.com/cosmos/interchain-accounts/x/inter-tx" // intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" // "github.com/CosmosContracts/juno/v13/x/oracle" // oracletypes "github.com/CosmosContracts/juno/v13/x/oracle/types" + // ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks" + // ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" ) // module account permissions @@ -101,11 +101,11 @@ var ModuleBasics = module.NewBasicManager( tokenfactory.AppModuleBasic{}, wasm.AppModuleBasic{}, ica.AppModuleBasic{}, - // oracle.AppModuleBasic{}, - // intertx.AppModuleBasic{}, feeshare.AppModuleBasic{}, - ibchooks.AppModuleBasic{}, packetforward.AppModuleBasic{}, + // ibchooks.AppModuleBasic{}, + // oracle.AppModuleBasic{}, + // intertx.AppModuleBasic{}, ) func appModules( @@ -144,7 +144,7 @@ func appModules( ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), // intertx.NewAppModule(appCodec, app.InterTxKeeper), // oracle.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper), - ibchooks.NewAppModule(app.AccountKeeper), + // ibchooks.NewAppModule(app.AccountKeeper), packetforward.NewAppModule(app.PacketForwardKeeper), } } @@ -205,13 +205,13 @@ func orderBeginBlockers() []string { ibctransfertypes.ModuleName, icatypes.ModuleName, packetforwardtypes.ModuleName, - // intertxtypes.ModuleName, ibcfeetypes.ModuleName, - // oracletypes.ModuleName, tokenfactorytypes.ModuleName, feesharetypes.ModuleName, wasm.ModuleName, - ibchookstypes.ModuleName, + // intertxtypes.ModuleName, + // oracletypes.ModuleName, + // ibchookstypes.ModuleName, } } @@ -238,13 +238,13 @@ func orderEndBlockers() []string { ibctransfertypes.ModuleName, icatypes.ModuleName, packetforwardtypes.ModuleName, - // intertxtypes.ModuleName, ibcfeetypes.ModuleName, - // oracletypes.ModuleName, tokenfactorytypes.ModuleName, feesharetypes.ModuleName, wasm.ModuleName, - ibchookstypes.ModuleName, + // intertxtypes.ModuleName, + // oracletypes.ModuleName, + // ibchookstypes.ModuleName, } } @@ -271,12 +271,12 @@ func orderInitBlockers() []string { ibctransfertypes.ModuleName, icatypes.ModuleName, packetforwardtypes.ModuleName, - // oracletypes.ModuleName, - // intertxtypes.ModuleName, ibcfeetypes.ModuleName, tokenfactorytypes.ModuleName, feesharetypes.ModuleName, wasm.ModuleName, - ibchookstypes.ModuleName, + // oracletypes.ModuleName, + // intertxtypes.ModuleName, + // ibchookstypes.ModuleName, } } diff --git a/app/upgrades/v13part1/constants.go b/app/upgrades/v13part1/constants.go index 5fd9b26a2..8a87c94d4 100644 --- a/app/upgrades/v13part1/constants.go +++ b/app/upgrades/v13part1/constants.go @@ -8,9 +8,8 @@ import ( store "github.com/cosmos/cosmos-sdk/store/types" icacontrollertypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/controller/types" ibcfeetypes "github.com/cosmos/ibc-go/v4/modules/apps/29-fee/types" - - ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" packetforwardtypes "github.com/strangelove-ventures/packet-forward-middleware/v4/router/types" + // ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types" // intertxtypes "github.com/cosmos/interchain-accounts/x/inter-tx/types" // oracletypes "github.com/CosmosContracts/juno/v13/x/oracle/types" ) @@ -26,10 +25,10 @@ var Upgrade = upgrades.Upgrade{ packetforwardtypes.StoreKey, feesharetypes.ModuleName, tokenfactorytypes.ModuleName, - ibchookstypes.StoreKey, - icacontrollertypes.StoreKey, ibcfeetypes.ModuleName, + + // ibchookstypes.StoreKey, // oracletypes.ModuleName, // intertxtypes.ModuleName, }, diff --git a/go.mod b/go.mod index 9bff94fa1..fab9924ba 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/golang/protobuf v1.5.2 github.com/gorilla/mux v1.8.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 - github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230201151635-ef43e092d196 + // github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230201151635-ef43e092d196 github.com/prometheus/client_golang v1.14.0 github.com/spf13/cast v1.5.0 github.com/spf13/cobra v1.6.1 @@ -112,7 +112,7 @@ require ( github.com/opencontainers/image-spec v1.1.0-rc2 // indirect github.com/opencontainers/runc v1.1.3 // indirect github.com/ory/dockertest/v3 v3.9.1 - github.com/osmosis-labs/osmosis/osmoutils v0.0.3-rc0 // indirect + // github.com/osmosis-labs/osmosis/osmoutils v0.0.3-rc0 // indirect github.com/pelletier/go-toml/v2 v2.0.6 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pkg/errors v0.9.1 // indirect diff --git a/go.sum b/go.sum index b4023499e..fb084a445 100644 --- a/go.sum +++ b/go.sum @@ -501,8 +501,8 @@ github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= +github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.2 h1:cfejS+Tpcp13yd5nYHWDI6qVCny6wyX2Mt5SGur2IGE= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= @@ -705,8 +705,8 @@ github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6 github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= -github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= @@ -733,10 +733,6 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1kY= github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= -github.com/osmosis-labs/osmosis/osmoutils v0.0.3-rc0 h1:u91mXL0DbbQdLy95gCkLrM6cxya9b53fuiNkLO04KOE= -github.com/osmosis-labs/osmosis/osmoutils v0.0.3-rc0/go.mod h1:rO4YKI0ZQkS3o4UDhFuQFy+j4eM/as8GLvuBDNBStkQ= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230201151635-ef43e092d196 h1:V8OgwzvHwvGt2yEHRFsiWUPC647qez2LNgcvLzXgw8U= -github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.0-20230201151635-ef43e092d196/go.mod h1:eoSRNkeqi3ufOmvY8XcW8y0NgbbaPyBTEn7DTxq8XY4= github.com/otiai10/copy v1.6.0 h1:IinKAryFFuPONZ7cm6T6E2QX/vcJwSnlaA5lfoaXIiQ= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=