Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(wasm): bump wasmd dependency to v0.43.0 #1660

Merged
merged 3 commits into from
Nov 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bump `golang.org/x/net` from 0.12.0 to 0.17.0 ([#1634](https://github.com/NibiruChain/nibiru/pull/1634))
- feat(tools): Ignite CLI Open API spec generation -> Bump `github.com/grpc-ecosystem/grpc-gateway/v2` to v2.18.0 ([#1651](https://github.com/NibiruChain/nibiru/pull/1651))
- Bump `github.com/cosmos/ibc-go/v7` from 7.3.0 to 7.3.1 ([#1647](https://github.com/NibiruChain/nibiru/pull/1647))
- Bump `github.com/CosmWasm/wasmd` from 0.40.2 to 0.43.0 ([#1660](https://github.com/NibiruChain/nibiru/pull/1660))

### Bug Fixes

Expand Down
10 changes: 5 additions & 5 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"os"
"path/filepath"

"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
dbm "github.com/cometbft/cometbft-db"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/cometbft/cometbft/libs/log"
Expand Down Expand Up @@ -109,13 +109,13 @@ func init() {
}

// GetWasmOpts build wasm options
func GetWasmOpts(nibiru NibiruApp, appOpts servertypes.AppOptions) []wasm.Option {
var wasmOpts []wasm.Option
func GetWasmOpts(nibiru NibiruApp, appOpts servertypes.AppOptions) []wasmkeeper.Option {
var wasmOpts []wasmkeeper.Option
if cast.ToBool(appOpts.Get("telemetry.enabled")) {
wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer))
}

// Add the bindings to the app's set of []wasm.Option.
// Add the bindings to the app's set of []wasmkeeper.Option.
wasmOpts = append(wasmOpts, wasmbinding.NibiruWasmOptions(
nibiru.GRPCQueryRouter(),
nibiru.appCodec,
Expand Down Expand Up @@ -196,7 +196,7 @@ func NewNibiruApp(
SigGasConsumer: authante.DefaultSigVerificationGasConsumer,
},
IBCKeeper: app.ibcKeeper,
TxCounterStoreKey: keys[wasm.StoreKey],
TxCounterStoreKey: keys[wasmtypes.StoreKey],
WasmConfig: &wasmConfig,
DevGasKeeper: &app.DevGasKeeper,
DevGasBankKeeper: app.BankKeeper,
Expand Down
17 changes: 9 additions & 8 deletions app/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

wasmdapp "github.com/CosmWasm/wasmd/app"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
_ "github.com/cosmos/cosmos-sdk/client/docs/statik"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand Down Expand Up @@ -180,7 +181,7 @@ type AppKeepers struct {
TokenFactoryKeeper tokenfactorykeeper.Keeper

// WASM keepers
WasmKeeper wasm.Keeper
WasmKeeper wasmkeeper.Keeper
ScopedWasmKeeper capabilitykeeper.ScopedKeeper
}

Expand Down Expand Up @@ -217,7 +218,7 @@ func initStoreKeys() (
perptypes.StoreKey,
inflationtypes.StoreKey,
sudotypes.StoreKey,
wasm.StoreKey,
wasmtypes.StoreKey,
devgastypes.StoreKey,
tokenfactorytypes.StoreKey,
)
Expand Down Expand Up @@ -406,7 +407,7 @@ func (app *NibiruApp) InitKeepers(
app.BankKeeper,
)

app.ScopedWasmKeeper = app.capabilityKeeper.ScopeToModule(wasm.ModuleName)
app.ScopedWasmKeeper = app.capabilityKeeper.ScopeToModule(wasmtypes.ModuleName)

wasmDir := filepath.Join(homePath, "data")
wasmConfig, err := wasm.ReadWasmConfig(appOpts)
Expand All @@ -423,9 +424,9 @@ func (app *NibiruApp) InitKeepers(
// For example, if there are bindings for the x/perp module, then the app
// passed to GetWasmOpts must already have a non-nil PerpKeeper.
supportedFeatures := strings.Join(wasmdapp.AllCapabilities(), ",")
app.WasmKeeper = wasm.NewKeeper(
app.WasmKeeper = wasmkeeper.NewKeeper(
appCodec,
keys[wasm.StoreKey],
keys[wasmtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
app.stakingKeeper,
Expand Down Expand Up @@ -672,7 +673,7 @@ func orderedModuleNames() []string {

// --------------------------------------------------------------------
// CosmWasm
wasm.ModuleName,
wasmtypes.ModuleName,
devgastypes.ModuleName,
tokenfactorytypes.ModuleName,

Expand Down Expand Up @@ -808,7 +809,7 @@ func ModuleAccPerms() map[string][]string {
epochstypes.ModuleName: {},
sudotypes.ModuleName: {},
common.TreasuryPoolModuleAccount: {},
wasm.ModuleName: {authtypes.Burner},
wasmtypes.ModuleName: {authtypes.Burner},
tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner},
}
}
Expand Down Expand Up @@ -836,7 +837,7 @@ func initParamsKeeper(
paramsKeeper.Subspace(ibcexported.ModuleName)
paramsKeeper.Subspace(ibcfeetypes.ModuleName)
// wasm params keepers
paramsKeeper.Subspace(wasm.ModuleName)
paramsKeeper.Subspace(wasmtypes.ModuleName)
paramsKeeper.Subspace(devgastypes.ModuleName)

return paramsKeeper
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
cosmossdk.io/errors v1.0.0
cosmossdk.io/math v1.1.2
github.com/CosmWasm/wasmd v0.40.2
github.com/CosmWasm/wasmd v0.43.0
github.com/CosmWasm/wasmvm v1.5.0
github.com/MakeNowJust/heredoc/v2 v2.0.1
github.com/NibiruChain/collections v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg=
github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4=
github.com/CosmWasm/wasmd v0.40.2 h1:GSDHIaeJI7fcDF5mkzSXQI5IZLtvpNq5t3TjJ9bDpPw=
github.com/CosmWasm/wasmd v0.40.2/go.mod h1:vqI238yb4D6aNuigS8mCqTyyCV9HN5eBEZARKRoK3ts=
github.com/CosmWasm/wasmd v0.43.0 h1:4xQAiNf6Ej+TuYe4PXwrtVJ9C+xyFrbsdqHH/kU9Vxk=
github.com/CosmWasm/wasmd v0.43.0/go.mod h1:gpri8YvkRErBz+qDme5jOThGZmSlHfyN532bWibXOl4=
github.com/CosmWasm/wasmvm v1.5.0 h1:3hKeT9SfwfLhxTGKH3vXaKFzBz1yuvP8SlfwfQXbQfw=
github.com/CosmWasm/wasmvm v1.5.0/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc=
github.com/DATA-DOG/go-sqlmock v1.3.3/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM=
Expand Down
4 changes: 2 additions & 2 deletions wasmbinding/test/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"testing"
"time"

"github.com/CosmWasm/wasmd/x/wasm"
wasmcli "github.com/CosmWasm/wasmd/x/wasm/client/cli"

"github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/testutil/cli"
Expand Down Expand Up @@ -147,7 +147,7 @@ func (s *IntegrationTestSuite) deployWasmContract(path string) (uint64, error) {
return 0, fmt.Errorf("no data found in response")
}

var storeCodeResponse wasm.MsgStoreCodeResponse
var storeCodeResponse types.MsgStoreCodeResponse
err = codec.Unmarshal(respData.MsgResponses[0].Value, &storeCodeResponse)
if err != nil {
return 0, err
Expand Down
5 changes: 2 additions & 3 deletions wasmbinding/wasm.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package wasmbinding

import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -20,7 +19,7 @@ func NibiruWasmOptions(
perpv2 perpv2keeper.Keeper,
sudoKeeper keeper.Keeper,
oracleKeeper oraclekeeper.Keeper,
) []wasm.Option {
) []wasmkeeper.Option {
wasmQueryPlugin := NewQueryPlugin(perpv2, oracleKeeper)
wasmQueryOption := wasmkeeper.WithQueryPlugins(&wasmkeeper.QueryPlugins{
Custom: CustomQuerier(wasmQueryPlugin),
Expand All @@ -35,5 +34,5 @@ func NibiruWasmOptions(
CustomMessageDecorator(perpv2, sudoKeeper, oracleKeeper),
)

return []wasm.Option{wasmQueryOption, wasmExecuteOption}
return []wasmkeeper.Option{wasmQueryOption, wasmExecuteOption}
}
Loading