diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a5b7bba1b..32c90601a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * Add PreBlocker support for sdk v0.50 [#1760](https://github.com/provenance-io/provenance/issues/1760). * Add the Sanction module back in [#1922](https://github.com/provenance-io/provenance/pull/1922). * Add the Quarantine module back in [#1926](https://github.com/provenance-io/provenance/pull/1926). +* Bump wasmd to `v0.50.0` [#1760](https://github.com/provenance-io/provenance/issues/1760). ### Improvements diff --git a/app/app.go b/app/app.go index 02cead6870..e0097a2671 100644 --- a/app/app.go +++ b/app/app.go @@ -694,7 +694,7 @@ func New( govRouter.AddRoute(govtypes.RouterKey, govtypesv1beta1.ProposalHandler). AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)). AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)). - // AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(app.WasmKeeper, wasm.EnableAllProposals)). // TODO[1760]: wasm + AddRoute(wasm.RouterKey, wasmkeeper.NewLegacyWasmProposalHandler(app.WasmKeeper, wasmtypes.EnableAllProposals)). // TODO[1760]: gov: Can probably remove with gov v1 AddRoute(nametypes.ModuleName, name.NewProposalHandler(app.NameKeeper)). AddRoute(markertypes.ModuleName, marker.NewProposalHandler(app.MarkerKeeper)). AddRoute(msgfeestypes.ModuleName, msgfees.NewProposalHandler(app.MsgFeesKeeper, app.InterfaceRegistry())) @@ -1016,7 +1016,7 @@ func New( oraclemodule.NewAppModule(appCodec, app.OracleKeeper, app.AccountKeeper, app.BankKeeper, app.IBCKeeper.ChannelKeeper), holdmodule.NewAppModule(appCodec, app.HoldKeeper), exchangemodule.NewAppModule(appCodec, app.ExchangeKeeper), - provwasm.NewWrapper(appCodec, app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.NameKeeper, nil, app.GetSubspace(wasmtypes.ModuleName)), // TODO[1760]: Need to pass router instead of nil + provwasm.NewWrapper(appCodec, app.WasmKeeper, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.NameKeeper, pioMessageRouter, app.GetSubspace(wasmtypes.ModuleName)), // IBC ibc.NewAppModule(app.IBCKeeper), diff --git a/go.mod b/go.mod index e5858f5b62..8736372fe4 100644 --- a/go.mod +++ b/go.mod @@ -212,8 +212,7 @@ replace ( // Use cosmos fork of keyring (because the SDK does). github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 // This is required for https://github.com/provenance-io/provenance/issues/1414 - // TODO[1760]: wasm: Put this CosmWasm/wasmd replace back with an updated version (or delete it). - // github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.30.0-pio-5 + github.com/CosmWasm/wasmd => github.com/provenance-io/wasmd v0.50.0-pio-2 github.com/cosmos/cosmos-sdk => github.com/provenance-io/cosmos-sdk v0.50.5-pio-3 // TODO[1760]: Update once async-icq creates tag with our changes https://github.com/cosmos/ibc-apps/pull/168 diff --git a/go.sum b/go.sum index e0d26f6a2c..1052880816 100644 --- a/go.sum +++ b/go.sum @@ -223,8 +223,6 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25 github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/CosmWasm/wasmd v0.50.0 h1:NVaGqCSTRfb9UTDHJwT6nQIWcb6VjlQl88iI+u1+qjE= -github.com/CosmWasm/wasmd v0.50.0/go.mod h1:UjmShW4l9YxaMytwJZ7IB7MWzHiynSZP3DdWrG0FRtk= github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw= github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= @@ -918,6 +916,8 @@ github.com/provenance-io/cosmos-sdk v0.50.5-pio-3 h1:QwJ4feMM43a9fu2YZ1oSHd1wqEI github.com/provenance-io/cosmos-sdk v0.50.5-pio-3/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= github.com/provenance-io/ibc-apps/modules/async-icq/v8 v8.0.0-prov-1 h1:p+7pxHB0ukO2aow+M6uW9gHgeQl7YJyYGyMSKHZ5My8= github.com/provenance-io/ibc-apps/modules/async-icq/v8 v8.0.0-prov-1/go.mod h1:tObW9uxibh5Z22CtOaHVeTDotCSMyc/2B4MrYdaViBo= +github.com/provenance-io/wasmd v0.50.0-pio-2 h1:vuRXQ7NvqEk0TZ/dDFEfojMTwCn/ItVDjMe3/jiCDbY= +github.com/provenance-io/wasmd v0.50.0-pio-2/go.mod h1:UjmShW4l9YxaMytwJZ7IB7MWzHiynSZP3DdWrG0FRtk= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= diff --git a/internal/provwasm/simulation.go b/internal/provwasm/simulation.go index 71b6835444..85f5a6cb68 100644 --- a/internal/provwasm/simulation.go +++ b/internal/provwasm/simulation.go @@ -8,6 +8,7 @@ import ( "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmsimulation "github.com/CosmWasm/wasmd/x/wasm/simulation" "github.com/CosmWasm/wasmd/x/wasm/types" sdkmath "cosmossdk.io/math" @@ -43,15 +44,17 @@ type Wrapper struct { ak authkeeper.AccountKeeperI bk bankkeeper.Keeper nk namekeeper.Keeper + wk *wasmkeeper.Keeper } -func NewWrapper(cdc codec.Codec, keeper *wasmkeeper.Keeper, validatorSetSource wasmkeeper.ValidatorSetSource, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, router *baseapp.MsgServiceRouter, ss exported.Subspace) *Wrapper { +func NewWrapper(cdc codec.Codec, keeper *wasmkeeper.Keeper, validatorSetSource wasmkeeper.ValidatorSetSource, ak authkeeper.AccountKeeperI, bk bankkeeper.Keeper, nk namekeeper.Keeper, router wasmkeeper.MessageRouter, ss exported.Subspace) *Wrapper { return &Wrapper{ cdc: cdc, wasm: wasm.NewAppModule(cdc, keeper, validatorSetSource, ak, bk, router, ss), ak: ak, bk: bk, nk: nk, + wk: keeper, } } @@ -82,9 +85,8 @@ func (pw Wrapper) GenerateGenesisState(input *module.SimulationState) { } // ProposalContents doesn't return any content functions for governance proposals. -func (pw Wrapper) ProposalContents(simState module.SimulationState) []simtypes.WeightedProposalContent { - // return pw.wasm.ProposalContents(simState) // TODO[1760]: wasm: Find replacement for this or delete it. - return nil +func (pw Wrapper) ProposalContents(_ module.SimulationState) []simtypes.WeightedProposalMsg { + return wasmsimulation.ProposalMsgs(pw.bk, pw.wk) } // RandomizedParams returns empty list as the params don't change