Skip to content

Commit

Permalink
Merge pull request #14 from cosmic-horizon/update_cosmwasm_version
Browse files Browse the repository at this point in the history
Update cosmwasm version
  • Loading branch information
dpdanpittman authored Oct 17, 2022
2 parents b798e5b + a9f37ec commit d43bf14
Show file tree
Hide file tree
Showing 54 changed files with 6,910 additions and 25 deletions.
24 changes: 12 additions & 12 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import (
"path/filepath"
"strings"

"github.com/cosmic-horizon/coho/x/mint"
mintkeeper "github.com/cosmic-horizon/coho/x/mint/keeper"
minttypes "github.com/cosmic-horizon/coho/x/mint/types"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/grpc/tmservice"
Expand Down Expand Up @@ -57,9 +60,6 @@ import (
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
"github.com/cosmos/cosmos-sdk/x/mint"
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
"github.com/cosmos/cosmos-sdk/x/params"
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper"
Expand Down Expand Up @@ -271,7 +271,7 @@ type App struct {
ScopedIBCKeeper capabilitykeeper.ScopedKeeper
ScopedTransferKeeper capabilitykeeper.ScopedKeeper

wasmKeeper wasm.Keeper
WasmKeeper wasm.Keeper
scopedWasmKeeper capabilitykeeper.ScopedKeeper

CohoKeeper cohomodulekeeper.Keeper
Expand Down Expand Up @@ -443,7 +443,7 @@ func New(
// if we want to allow any custom callbacks
supportedFeatures := "iterator,staking,stargate"
wasmOpts := GetWasmOpts(appOpts)
app.wasmKeeper = wasm.NewKeeper(
app.WasmKeeper = wasm.NewKeeper(
appCodec,
keys[wasm.StoreKey],
app.GetSubspace(wasm.ModuleName),
Expand All @@ -466,13 +466,13 @@ func New(
// register wasm gov proposal types
enabledProposals := GetEnabledProposals()
if len(enabledProposals) != 0 {
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.wasmKeeper, enabledProposals))
govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, enabledProposals))
}
// Create static IBC router, add transfer route, then set and seal it
ibcRouter := porttypes.NewRouter()
ibcRouter.AddRoute(icahosttypes.SubModuleName, icaHostIBCModule)
ibcRouter.AddRoute(ibctransfertypes.ModuleName, transferIBCModule)
ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.wasmKeeper, app.IBCKeeper.ChannelKeeper))
ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(app.WasmKeeper, app.IBCKeeper.ChannelKeeper))
app.IBCKeeper.SetRouter(ibcRouter)

app.GovKeeper = govkeeper.NewKeeper(
Expand All @@ -491,8 +491,8 @@ func New(
keys[gametypes.StoreKey],
keys[gametypes.MemStoreKey],
app.GetSubspace(gametypes.ModuleName),
wasmkeeper.NewDefaultPermissionKeeper(app.wasmKeeper),
app.wasmKeeper,
wasmkeeper.NewDefaultPermissionKeeper(app.WasmKeeper),
app.WasmKeeper,
app.AccountKeeper,
app.BankKeeper,
)
Expand Down Expand Up @@ -529,7 +529,7 @@ func New(
params.NewAppModule(app.ParamsKeeper),
transferModule,
icaModule,
wasm.NewAppModule(appCodec, &app.wasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
cohomodule.NewAppModule(appCodec, app.CohoKeeper, app.AccountKeeper, app.BankKeeper),
game.NewAppModule(appCodec, app.GameKeeper, app.AccountKeeper, app.BankKeeper),
)
Expand Down Expand Up @@ -620,7 +620,7 @@ func New(
evidence.NewAppModule(app.EvidenceKeeper),
ibc.NewAppModule(app.IBCKeeper),
transferModule,
wasm.NewAppModule(appCodec, &app.wasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
wasm.NewAppModule(appCodec, &app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper),
cohomodule.NewAppModule(appCodec, app.CohoKeeper, app.AccountKeeper, app.BankKeeper),
game.NewAppModule(appCodec, app.GameKeeper, app.AccountKeeper, app.BankKeeper),
)
Expand Down Expand Up @@ -659,7 +659,7 @@ func New(

if manager := app.SnapshotManager(); manager != nil {
err = manager.RegisterExtensions(
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.wasmKeeper),
wasmkeeper.NewWasmSnapshotter(app.CommitMultiStore(), &app.WasmKeeper),
)
if err != nil {
panic("failed to register snapshot extension: " + err.Error())
Expand Down
2 changes: 1 addition & 1 deletion cmd/cohod/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ import (

"github.com/cosmic-horizon/coho/app/params"
gametypes "github.com/cosmic-horizon/coho/x/game/types"
minttypes "github.com/cosmic-horizon/coho/x/mint/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
)

var (
Expand Down
22 changes: 12 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,33 @@ module github.com/cosmic-horizon/coho
go 1.16

require (
github.com/CosmWasm/wasmd v0.27.0
github.com/cosmos/cosmos-sdk v0.45.6
github.com/99designs/keyring v1.1.6 // indirect
github.com/CosmWasm/wasmd v0.28.0
github.com/CosmWasm/wasmvm v1.0.0 // indirect
github.com/cosmos/cosmos-sdk v0.45.9
github.com/cosmos/ibc-go/v3 v3.0.0
github.com/dustin/go-humanize v1.0.1-0.20200219035652-afde56e7acac // indirect
github.com/gogo/protobuf v1.3.3
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/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/onsi/gomega v1.18.1 // indirect
github.com/prometheus/client_golang v1.12.1
github.com/prometheus/client_golang v1.12.2
github.com/rakyll/statik v0.1.7
github.com/regen-network/cosmos-proto v0.3.1 // indirect
github.com/spf13/cast v1.4.1
github.com/spf13/cobra v1.4.0
github.com/stretchr/testify v1.7.1
github.com/tendermint/tendermint v0.34.19
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.21
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac
google.golang.org/grpc v1.45.0
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
google.golang.org/grpc v1.48.0
google.golang.org/protobuf v1.28.0
gopkg.in/yaml.v2 v2.4.0
)

replace (
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/keybase/go-keychain => github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4
google.golang.org/grpc => google.golang.org/grpc v1.33.2
Expand Down
Loading

0 comments on commit d43bf14

Please sign in to comment.