diff --git a/CHANGELOG.md b/CHANGELOG.md index ddae0b14c..a8bf49b8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/app/app.go b/app/app.go index a9c5458bf..f6322ee0a 100644 --- a/app/app.go +++ b/app/app.go @@ -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" @@ -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, @@ -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, diff --git a/app/keepers.go b/app/keepers.go index 9ae39a9f7..01430d884 100644 --- a/app/keepers.go +++ b/app/keepers.go @@ -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" @@ -180,7 +181,7 @@ type AppKeepers struct { TokenFactoryKeeper tokenfactorykeeper.Keeper // WASM keepers - WasmKeeper wasm.Keeper + WasmKeeper wasmkeeper.Keeper ScopedWasmKeeper capabilitykeeper.ScopedKeeper } @@ -217,7 +218,7 @@ func initStoreKeys() ( perptypes.StoreKey, inflationtypes.StoreKey, sudotypes.StoreKey, - wasm.StoreKey, + wasmtypes.StoreKey, devgastypes.StoreKey, tokenfactorytypes.StoreKey, ) @@ -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) @@ -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, @@ -672,7 +673,7 @@ func orderedModuleNames() []string { // -------------------------------------------------------------------- // CosmWasm - wasm.ModuleName, + wasmtypes.ModuleName, devgastypes.ModuleName, tokenfactorytypes.ModuleName, @@ -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}, } } @@ -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 diff --git a/go.mod b/go.mod index e672043ec..f91fd373c 100644 --- a/go.mod +++ b/go.mod @@ -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 diff --git a/go.sum b/go.sum index 1c9b94897..5d6664a1a 100644 --- a/go.sum +++ b/go.sum @@ -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= diff --git a/wasmbinding/test/cli_test.go b/wasmbinding/test/cli_test.go index 19ee618f1..8c10a37c8 100644 --- a/wasmbinding/test/cli_test.go +++ b/wasmbinding/test/cli_test.go @@ -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" @@ -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 diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index f0c3896cb..baee43c27 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -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" @@ -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), @@ -35,5 +34,5 @@ func NibiruWasmOptions( CustomMessageDecorator(perpv2, sudoKeeper, oracleKeeper), ) - return []wasm.Option{wasmQueryOption, wasmExecuteOption} + return []wasmkeeper.Option{wasmQueryOption, wasmExecuteOption} }