Skip to content

Commit

Permalink
Make wasm hooks importable (#3850)
Browse files Browse the repository at this point in the history
* moved ibc-hooks to its own go.mod

* updated ibc hooks version

* go sum

* add ics23 patch into x/ibc-hooks

* Fix wasm import version conflict

* Update x/ibc-hooks to osmoutils v0.0.2

* Update versions

Co-authored-by: Dev Ojha <[email protected]>
  • Loading branch information
2 people authored and czarcas7ic committed Jan 4, 2023
1 parent e8c3c6c commit a2fc2c8
Show file tree
Hide file tree
Showing 16 changed files with 2,019 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ import (
v8 "github.com/osmosis-labs/osmosis/v13/app/upgrades/v8"
v9 "github.com/osmosis-labs/osmosis/v13/app/upgrades/v9"
_ "github.com/osmosis-labs/osmosis/v13/client/docs/statik"
ibc_hooks "github.com/osmosis-labs/osmosis/v13/x/ibc-hooks"
ibc_hooks "github.com/osmosis-labs/osmosis/x/ibc-hooks"
)

const appName = "OsmosisApp"
Expand Down
2 changes: 1 addition & 1 deletion app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
upgradekeeper "github.com/cosmos/cosmos-sdk/x/upgrade/keeper"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"

ibchooks "github.com/osmosis-labs/osmosis/v13/x/ibc-hooks"
ibcratelimit "github.com/osmosis-labs/osmosis/v13/x/ibc-rate-limit"
ibcratelimittypes "github.com/osmosis-labs/osmosis/v13/x/ibc-rate-limit/types"
ibchooks "github.com/osmosis-labs/osmosis/x/ibc-hooks"

icahost "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host"
icahostkeeper "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/host/keeper"
Expand Down
2 changes: 1 addition & 1 deletion app/keepers/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
_ "github.com/osmosis-labs/osmosis/v13/client/docs/statik"
"github.com/osmosis-labs/osmosis/v13/x/epochs"
"github.com/osmosis-labs/osmosis/v13/x/gamm"
ibc_hooks "github.com/osmosis-labs/osmosis/v13/x/ibc-hooks"
ibc_rate_limit "github.com/osmosis-labs/osmosis/v13/x/ibc-rate-limit"
"github.com/osmosis-labs/osmosis/v13/x/incentives"
"github.com/osmosis-labs/osmosis/v13/x/lockup"
Expand All @@ -42,6 +41,7 @@ import (
"github.com/osmosis-labs/osmosis/v13/x/tokenfactory"
"github.com/osmosis-labs/osmosis/v13/x/twap/twapmodule"
"github.com/osmosis-labs/osmosis/v13/x/txfees"
ibc_hooks "github.com/osmosis-labs/osmosis/x/ibc-hooks"
)

// AppModuleBasics returns ModuleBasics for the module BasicManager.
Expand Down
3 changes: 2 additions & 1 deletion app/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"github.com/cosmos/cosmos-sdk/client"
capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

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"
Expand All @@ -13,7 +14,7 @@ import (
ica "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts"
icatypes "github.com/cosmos/ibc-go/v4/modules/apps/27-interchain-accounts/types"

ibc_hooks "github.com/osmosis-labs/osmosis/v13/x/ibc-hooks"
ibc_hooks "github.com/osmosis-labs/osmosis/x/ibc-hooks"

"github.com/cosmos/cosmos-sdk/types/module"
"github.com/cosmos/cosmos-sdk/x/auth"
Expand Down
2 changes: 1 addition & 1 deletion app/upgrades/v13/upgrade_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
abci "github.com/tendermint/tendermint/abci/types"

"github.com/osmosis-labs/osmosis/v13/app/apptesting"
ibc_hooks "github.com/osmosis-labs/osmosis/v13/x/ibc-hooks"
ibc_hooks "github.com/osmosis-labs/osmosis/x/ibc-hooks"
)

type UpgradeTestSuite struct {
Expand Down
24 changes: 24 additions & 0 deletions app/upgrades/v14/constants.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package v14

import (
store "github.com/cosmos/cosmos-sdk/store/types"
ibchookstypes "github.com/osmosis-labs/osmosis/x/ibc-hooks/types"

"github.com/osmosis-labs/osmosis/v13/app/upgrades"
downtimetypes "github.com/osmosis-labs/osmosis/v13/x/downtime-detector/types"
protorevtypes "github.com/osmosis-labs/osmosis/v13/x/protorev/types"
swaproutertypes "github.com/osmosis-labs/osmosis/v13/x/swaprouter/types"
valsetpreftypes "github.com/osmosis-labs/osmosis/v13/x/valset-pref/types"
)

// UpgradeName defines the on-chain upgrade name for the Osmosis v14 upgrade.
const UpgradeName = "v14"

var Upgrade = upgrades.Upgrade{
UpgradeName: UpgradeName,
CreateUpgradeHandler: CreateUpgradeHandler,
StoreUpgrades: store.StoreUpgrades{
Added: []string{valsetpreftypes.StoreKey, protorevtypes.StoreKey, swaproutertypes.StoreKey, downtimetypes.StoreKey, ibchookstypes.StoreKey},
Deleted: []string{},
},
}
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ require (
github.com/ory/dockertest/v3 v3.9.1
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3
github.com/osmosis-labs/osmosis/osmomath v0.0.2
github.com/osmosis-labs/osmosis/osmoutils v0.0.2-ibc-work
github.com/osmosis-labs/osmosis/osmoutils v0.0.2
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.4
github.com/pkg/errors v0.9.1
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.0
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -855,8 +855,10 @@ github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3 h1:Ylmch
github.com/osmosis-labs/go-mutesting v0.0.0-20221208041716-b43bcd97b3b3/go.mod h1:lV6KnqXYD/ayTe7310MHtM3I2q8Z6bBfMAi+bhwPYtI=
github.com/osmosis-labs/osmosis/osmomath v0.0.2 h1:8vTobkYfoRTCJCie+jE7gzXvqUUfoPI4NSvTskoci50=
github.com/osmosis-labs/osmosis/osmomath v0.0.2/go.mod h1:IpoXO7lvmfsBFfQzaqovs541hpqtrnM+GJSZDi/TZtc=
github.com/osmosis-labs/osmosis/osmoutils v0.0.2-ibc-work h1:/cMOafE/0qNdNcqQsMBFAh/SGi8zdFVmWo6j2R/MQ0I=
github.com/osmosis-labs/osmosis/osmoutils v0.0.2-ibc-work/go.mod h1:T7CCZKYhKWASnv5mRE8u3m0gst3NZ/sU16Brjmv4UPw=
github.com/osmosis-labs/osmosis/osmoutils v0.0.2 h1:oFsKFhmVOQHzqRfezFAkg/BlsUEwPhQK5n13a3uC6xc=
github.com/osmosis-labs/osmosis/osmoutils v0.0.2/go.mod h1:T7CCZKYhKWASnv5mRE8u3m0gst3NZ/sU16Brjmv4UPw=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.4 h1:Ny0GQ40agzVesBpZ/AG8Bi7Hn3ZN+qGEJOX272Bck+Q=
github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.4/go.mod h1:JleJ+kfjhlUpYnk7VfNrpHd+P7A5Lq5VhuAxGV7FbJM=
github.com/osmosis-labs/wasmd v0.29.2-0.20221222131554-7c8ea36a6e30 h1:6uMi7HhPSwvKKU7j5NqljseFTEz4I7qHr+IPnnn42Ck=
github.com/osmosis-labs/wasmd v0.29.2-0.20221222131554-7c8ea36a6e30/go.mod h1:5fDYJyMXBq6u2iuHqqOTYiZ5NitIOeIW5k7qEXqbwJE=
github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw=
Expand Down
1 change: 1 addition & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ go 1.18

use ./osmomath
use ./osmoutils
use ./x/ibc-hooks
use .
Loading

0 comments on commit a2fc2c8

Please sign in to comment.