diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e846c5e568..1ea2c82125f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6836](https://github.com/osmosis-labs/osmosis/pull/6836) Add DenomsMetadata to stargate whitelist and fixs the DenomMetadata response type * [#6814](https://github.com/osmosis-labs/osmosis/pull/6814) Add EstimateTradeBasedOnPriceImpact to stargate whitelist * [#6859](https://github.com/osmosis-labs/osmosis/pull/6859) Add hooks to core CL operations (position creation/withdrawal and swaps) +* [#6937](https://github.com/osmosis-labs/osmosis/pull/6937) Update wasmd to v0.45.0 and wasmvm to v1.5.0 ### Misc Improvements diff --git a/app/ante.go b/app/ante.go index 6e02c3ec08c..6f29f87a3b8 100644 --- a/app/ante.go +++ b/app/ante.go @@ -1,8 +1,8 @@ package app import ( - wasm "github.com/CosmWasm/wasmd/x/wasm" wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante" ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper" @@ -24,7 +24,7 @@ import ( // https://github.com/cosmos/cosmos-sdk/blob/v0.43.0/x/auth/ante/ante.go#L41 func NewAnteHandler( appOpts servertypes.AppOptions, - wasmConfig wasm.Config, + wasmConfig wasmtypes.WasmConfig, txCounterStoreKey storetypes.StoreKey, ak ante.AccountKeeper, bankKeeper txfeestypes.BankKeeper, diff --git a/app/app.go b/app/app.go index 7179f312154..66345f50496 100644 --- a/app/app.go +++ b/app/app.go @@ -7,7 +7,6 @@ import ( "os" "path/filepath" "reflect" - "strings" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" @@ -126,7 +125,7 @@ var ( EnableSpecificWasmProposals = "" // EmptyWasmOpts defines a type alias for a list of wasm options. - EmptyWasmOpts []wasm.Option + EmptyWasmOpts []wasmkeeper.Option _ runtime.AppI = (*OsmosisApp)(nil) @@ -134,28 +133,6 @@ var ( Forks = []upgrades.Fork{v3.Fork, v6.Fork, v8.Fork, v10.Fork} ) -// GetWasmEnabledProposals parses the WasmProposalsEnabled and -// EnableSpecificWasmProposals values to produce a list of enabled proposals to -// pass into the application. -func GetWasmEnabledProposals() []wasm.ProposalType { - if EnableSpecificWasmProposals == "" { - if WasmProposalsEnabled == "true" { - return wasm.EnableAllProposals - } - - return wasm.DisableAllProposals - } - - chunks := strings.Split(EnableSpecificWasmProposals, ",") - - proposals, err := wasm.ConvertToProposals(chunks) - if err != nil { - panic(err) - } - - return proposals -} - // OsmosisApp extends an ABCI application, but with most of its parameters exported. // They are exported for convenience in creating helper functions, as object // capabilities aren't needed for testing. @@ -212,7 +189,7 @@ func NewOsmosisApp( homePath string, invCheckPeriod uint, appOpts servertypes.AppOptions, - wasmOpts []wasm.Option, + wasmOpts []wasmkeeper.Option, baseAppOptions ...func(*baseapp.BaseApp), ) *OsmosisApp { initReusablePackageInjections() // This should run before anything else to make sure the variables are properly initialized @@ -223,8 +200,6 @@ func NewOsmosisApp( interfaceRegistry := encodingConfig.InterfaceRegistry txConfig := encodingConfig.TxConfig - wasmEnabledProposals := GetWasmEnabledProposals() - bApp := baseapp.NewBaseApp(appName, logger, db, txConfig.TxDecoder(), baseAppOptions...) bApp.SetCommitMultiStoreTracer(traceStore) bApp.SetVersion(version.Version) @@ -266,7 +241,6 @@ func NewOsmosisApp( dataDir, wasmDir, wasmConfig, - wasmEnabledProposals, wasmOpts, app.BlockedAddrs(), ) @@ -354,7 +328,7 @@ func NewOsmosisApp( anteHandler := NewAnteHandler( appOpts, wasmConfig, - app.GetKey(wasm.StoreKey), + app.GetKey(wasmtypes.StoreKey), app.AccountKeeper, app.BankKeeper, app.TxFeesKeeper, diff --git a/app/apptesting/cosmwasmpool.go b/app/apptesting/cosmwasmpool.go index 71007486e2d..83005a52034 100644 --- a/app/apptesting/cosmwasmpool.go +++ b/app/apptesting/cosmwasmpool.go @@ -95,7 +95,7 @@ func (s *KeeperTestHelper) StoreCosmWasmPoolContractCode(contractName string) ui code := s.GetContractCode(contractName) - instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeOnlyAddress, Address: cosmwasmpoolModuleAddr.String()} + instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeAnyOfAddresses, Addresses: []string{cosmwasmpoolModuleAddr.String()}} codeID, _, err := s.App.ContractKeeper.Create(s.Ctx, cosmwasmpoolModuleAddr, code, &instantiateConfig) s.Require().NoError(err) diff --git a/app/genesis.go b/app/genesis.go index 03fc6c1a7dc..7dd95b70b5b 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -3,7 +3,6 @@ package app import ( "encoding/json" - "github.com/CosmWasm/wasmd/x/wasm" wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ) @@ -22,12 +21,12 @@ func NewDefaultGenesisState() GenesisState { gen := ModuleBasics.DefaultGenesis(encCfg.Marshaler) // here we override wasm config to make it permissioned by default - wasmGen := wasm.GenesisState{ + wasmGen := wasmtypes.GenesisState{ Params: wasmtypes.Params{ CodeUploadAccess: wasmtypes.AllowNobody, InstantiateDefaultPermission: wasmtypes.AccessTypeEverybody, }, } - gen[wasm.ModuleName] = encCfg.Marshaler.MustMarshalJSON(&wasmGen) + gen[wasmtypes.ModuleName] = encCfg.Marshaler.MustMarshalJSON(&wasmGen) return gen } diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index 4511953df17..883eeed94d8 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -3,6 +3,7 @@ package keepers import ( "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/baseapp" "github.com/cosmos/cosmos-sdk/codec" sdk "github.com/cosmos/cosmos-sdk/types" @@ -152,7 +153,7 @@ type AppKeepers struct { TxFeesKeeper *txfeeskeeper.Keeper SuperfluidKeeper *superfluidkeeper.Keeper GovKeeper *govkeeper.Keeper - WasmKeeper *wasm.Keeper + WasmKeeper *wasmkeeper.Keeper ContractKeeper *wasmkeeper.PermissionedKeeper TokenFactoryKeeper *tokenfactorykeeper.Keeper PoolManagerKeeper *poolmanager.Keeper @@ -183,9 +184,8 @@ func (appKeepers *AppKeepers) InitNormalKeepers( maccPerms map[string][]string, dataDir string, wasmDir string, - wasmConfig wasm.Config, - wasmEnabledProposals []wasm.ProposalType, - wasmOpts []wasm.Option, + wasmConfig wasmtypes.WasmConfig, + wasmOpts []wasmkeeper.Option, blockedAddress map[string]bool, ) { legacyAmino := encodingConfig.Amino @@ -475,14 +475,14 @@ func (appKeepers *AppKeepers) InitNormalKeepers( // The last arguments can contain custom message handlers, and custom query handlers, // if we want to allow any custom callbacks - supportedFeatures := "iterator,staking,stargate,osmosis,cosmwasm_1_1,cosmwasm_1_2" + supportedFeatures := "iterator,staking,stargate,osmosis,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_4" wasmOpts = append(owasm.RegisterCustomPlugins(&appKeepers.BankKeeper, appKeepers.TokenFactoryKeeper), wasmOpts...) wasmOpts = append(owasm.RegisterStargateQueries(*bApp.GRPCQueryRouter(), appCodec), wasmOpts...) - wasmKeeper := wasm.NewKeeper( + wasmKeeper := wasmkeeper.NewKeeper( appCodec, - appKeepers.keys[wasm.StoreKey], + appKeepers.keys[wasmtypes.StoreKey], *appKeepers.AccountKeeper, appKeepers.BankKeeper, *appKeepers.StakingKeeper, @@ -515,7 +515,7 @@ func (appKeepers *AppKeepers) InitNormalKeepers( appKeepers.TokenFactoryKeeper.SetContractKeeper(appKeepers.ContractKeeper) // wire up x/wasm to IBC - ibcRouter.AddRoute(wasm.ModuleName, wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCKeeper.ChannelKeeper)) + ibcRouter.AddRoute(wasmtypes.ModuleName, wasm.NewIBCHandler(appKeepers.WasmKeeper, appKeepers.IBCKeeper.ChannelKeeper, appKeepers.IBCKeeper.ChannelKeeper)) // Seal the router appKeepers.IBCKeeper.SetRouter(ibcRouter) @@ -537,11 +537,6 @@ func (appKeepers *AppKeepers) InitNormalKeepers( AddRoute(poolmanagertypes.RouterKey, poolmanager.NewPoolManagerProposalHandler(*appKeepers.PoolManagerKeeper)). AddRoute(incentivestypes.RouterKey, incentiveskeeper.NewIncentivesProposalHandler(*appKeepers.IncentivesKeeper)) - // The gov proposal types can be individually enabled - if len(wasmEnabledProposals) != 0 { - govRouter.AddRoute(wasm.RouterKey, wasm.NewWasmProposalHandler(appKeepers.WasmKeeper, wasmEnabledProposals)) - } - govConfig := govtypes.DefaultConfig() govKeeper := govkeeper.NewKeeper( appCodec, appKeepers.keys[govtypes.StoreKey], @@ -658,7 +653,7 @@ func (appKeepers *AppKeepers) InitSpecialKeepers( appKeepers.ScopedIBCKeeper = appKeepers.CapabilityKeeper.ScopeToModule(ibchost.ModuleName) appKeepers.ScopedICAHostKeeper = appKeepers.CapabilityKeeper.ScopeToModule(icahosttypes.SubModuleName) appKeepers.ScopedTransferKeeper = appKeepers.CapabilityKeeper.ScopeToModule(ibctransfertypes.ModuleName) - appKeepers.ScopedWasmKeeper = appKeepers.CapabilityKeeper.ScopeToModule(wasm.ModuleName) + appKeepers.ScopedWasmKeeper = appKeepers.CapabilityKeeper.ScopeToModule(wasmtypes.ModuleName) appKeepers.ScopedICQKeeper = appKeepers.CapabilityKeeper.ScopeToModule(icqtypes.ModuleName) appKeepers.CapabilityKeeper.Seal() @@ -702,7 +697,7 @@ func (appKeepers *AppKeepers) initParamsKeeper(appCodec codec.BinaryCodec, legac paramsKeeper.Subspace(superfluidtypes.ModuleName) paramsKeeper.Subspace(poolmanagertypes.ModuleName) paramsKeeper.Subspace(gammtypes.ModuleName) - paramsKeeper.Subspace(wasm.ModuleName) + paramsKeeper.Subspace(wasmtypes.ModuleName) paramsKeeper.Subspace(tokenfactorytypes.ModuleName) paramsKeeper.Subspace(twaptypes.ModuleName) paramsKeeper.Subspace(ibcratelimittypes.ModuleName) @@ -823,7 +818,7 @@ func KVStoreKeys() []string { authzkeeper.StoreKey, txfeestypes.StoreKey, superfluidtypes.StoreKey, - wasm.StoreKey, + wasmtypes.StoreKey, tokenfactorytypes.StoreKey, valsetpreftypes.StoreKey, protorevtypes.StoreKey, diff --git a/app/modules.go b/app/modules.go index 4ee8e016dbf..8178dc80f88 100644 --- a/app/modules.go +++ b/app/modules.go @@ -2,6 +2,7 @@ package app import ( "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/cosmos/cosmos-sdk/client" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper" @@ -121,7 +122,7 @@ var moduleAccountPermissions = map[string][]string{ txfeestypes.ModuleName: nil, txfeestypes.FeeCollectorForStakingRewardsName: nil, txfeestypes.FeeCollectorForCommunityPoolName: nil, - wasm.ModuleName: {authtypes.Burner}, + wasmtypes.ModuleName: {authtypes.Burner}, tokenfactorytypes.ModuleName: {authtypes.Minter, authtypes.Burner}, valsetpreftypes.ModuleName: {authtypes.Staking}, poolmanagertypes.ModuleName: nil, @@ -154,7 +155,7 @@ func appModules( downtimemodule.NewAppModule(*app.DowntimeKeeper), staking.NewAppModule(appCodec, app.StakingKeeper, app.AccountKeeper, app.BankKeeper, app.GetSubspace(stakingtypes.ModuleName)), upgrade.NewAppModule(app.UpgradeKeeper), - wasm.NewAppModule(appCodec, app.WasmKeeper, app.StakingKeeper, *app.AccountKeeper, app.BankKeeper, app.BaseApp.MsgServiceRouter(), app.GetSubspace(wasm.ModuleName)), + wasm.NewAppModule(appCodec, app.WasmKeeper, app.StakingKeeper, *app.AccountKeeper, app.BankKeeper, app.BaseApp.MsgServiceRouter(), app.GetSubspace(wasmtypes.ModuleName)), evidence.NewAppModule(*app.EvidenceKeeper), authzmodule.NewAppModule(appCodec, *app.AuthzKeeper, app.AccountKeeper, app.BankKeeper, app.interfaceRegistry), ibc.NewAppModule(app.IBCKeeper), @@ -271,7 +272,7 @@ func OrderInitGenesis(allModuleNames []string) []string { concentratedliquiditytypes.ModuleName, ibcratelimittypes.ModuleName, // wasm after ibc transfer - wasm.ModuleName, + wasmtypes.ModuleName, // ibc_hooks after auth keeper ibchookstypes.ModuleName, icqtypes.ModuleName, diff --git a/app/upgrades/v13/upgrades.go b/app/upgrades/v13/upgrades.go index 7df35f9c89e..9eb129988ac 100644 --- a/app/upgrades/v13/upgrades.go +++ b/app/upgrades/v13/upgrades.go @@ -29,7 +29,7 @@ func setupRateLimiting(ctx sdk.Context, keepers *keepers.AppKeepers) error { return err } contractKeeper := wasmkeeper.NewGovPermissionKeeper(keepers.WasmKeeper) - instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeOnlyAddress, Address: govModule.String()} + instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeAnyOfAddresses, Addresses: []string{govModule.String()}} codeID, _, err := contractKeeper.Create(ctx, govModule, code, &instantiateConfig) if err != nil { return err diff --git a/app/upgrades/v15/upgrade_test.go b/app/upgrades/v15/upgrade_test.go index dc2ff4afee6..3f4b83cf605 100644 --- a/app/upgrades/v15/upgrade_test.go +++ b/app/upgrades/v15/upgrade_test.go @@ -216,7 +216,7 @@ func (s *UpgradeTestSuite) TestSetRateLimits() { code, err := os.ReadFile("../v13/rate_limiter.wasm") s.Require().NoError(err) contractKeeper := wasmkeeper.NewGovPermissionKeeper(s.App.WasmKeeper) - instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeOnlyAddress, Address: govModule.String()} + instantiateConfig := wasmtypes.AccessConfig{Permission: wasmtypes.AccessTypeAnyOfAddresses, Addresses: []string{govModule.String()}} codeID, _, err := contractKeeper.Create(s.Ctx, govModule, code, &instantiateConfig) s.Require().NoError(err) transferModule := accountKeeper.GetModuleAddress(transfertypes.ModuleName) diff --git a/app/upgrades/v7/constants.go b/app/upgrades/v7/constants.go index 8a2f9511315..9fc7b82fa48 100644 --- a/app/upgrades/v7/constants.go +++ b/app/upgrades/v7/constants.go @@ -1,7 +1,7 @@ package v7 import ( - "github.com/CosmWasm/wasmd/x/wasm" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" "github.com/osmosis-labs/osmosis/v20/app/upgrades" superfluidtypes "github.com/osmosis-labs/osmosis/v20/x/superfluid/types" @@ -16,6 +16,6 @@ var Upgrade = upgrades.Upgrade{ UpgradeName: UpgradeName, CreateUpgradeHandler: CreateUpgradeHandler, StoreUpgrades: store.StoreUpgrades{ - Added: []string{wasm.ModuleName, superfluidtypes.ModuleName}, + Added: []string{wasmtypes.ModuleName, superfluidtypes.ModuleName}, }, } diff --git a/cmd/osmosisd/cmd/root.go b/cmd/osmosisd/cmd/root.go index 15b999c1e62..895a757e227 100644 --- a/cmd/osmosisd/cmd/root.go +++ b/cmd/osmosisd/cmd/root.go @@ -616,7 +616,7 @@ func newApp(logger log.Logger, db cometbftdb.DB, traceStore io.Writer, appOpts s chainID = appGenesis.ChainID } - var wasmOpts []wasm.Option + var wasmOpts []wasmkeeper.Option if cast.ToBool(appOpts.Get("telemetry.enabled")) { wasmOpts = append(wasmOpts, wasmkeeper.WithVMCacheMetrics(prometheus.DefaultRegisterer)) } diff --git a/go.mod b/go.mod index 2fe7f328bc7..86bb0edec33 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( cosmossdk.io/errors v1.0.0 cosmossdk.io/math v1.1.3-rc.1 cosmossdk.io/tools/rosetta v0.2.1 - github.com/CosmWasm/wasmd v0.40.1 + github.com/CosmWasm/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3 github.com/cometbft/cometbft v0.37.2 github.com/cometbft/cometbft-db v0.8.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 @@ -84,7 +84,7 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/coinbase/rosetta-sdk-go/types v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v0.20.0 // indirect + github.com/cosmos/iavl v0.20.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect github.com/creachadair/taskgroup v0.4.2 // indirect @@ -160,7 +160,7 @@ require ( github.com/Antonboom/nilnil v0.1.7 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.3.2 // indirect - github.com/CosmWasm/wasmvm v1.2.4 + github.com/CosmWasm/wasmvm v1.5.0 github.com/Masterminds/semver v1.5.0 // indirect github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect @@ -368,7 +368,7 @@ require ( ) replace ( - github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.40.2-0.20231108035253-e6a55f40958c + github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3 // force utilizing the following versions github.com/cosmos/cosmos-proto => github.com/cosmos/cosmos-proto v1.0.0-beta.2 github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20231124185741-15259ccd2249 diff --git a/go.sum b/go.sum index a896228f02d..2eef5143522 100644 --- a/go.sum +++ b/go.sum @@ -558,8 +558,8 @@ github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8 github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= 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/wasmvm v1.2.4 h1:6OfeZuEcEH/9iqwrg2pkeVtDCkMoj9U6PpKtcrCyVrQ= -github.com/CosmWasm/wasmvm v1.2.4/go.mod h1:vW/E3h8j9xBQs9bCoijDuawKo9kCtxOaS8N8J7KFtkc= +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/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/Djarvur/go-err113 v0.1.0 h1:uCRZZOdMQ0TZPHYTdYpoC0bLYJKPEHPUJ8MeAa51lNU= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= @@ -764,8 +764,8 @@ github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiK github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.10 h1:QH/yT8X+c0F4ZDacDv3z+xE3WU1P1Z3wQoLMBRJoKuI= github.com/cosmos/gogoproto v1.4.10/go.mod h1:3aAZzeRWpAwr+SS/LLkICX2/kDFyaYVzckBDzygIxek= -github.com/cosmos/iavl v0.20.0 h1:fTVznVlepH0KK8NyKq8w+U7c2L6jofa27aFX6YGlm38= -github.com/cosmos/iavl v0.20.0/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= +github.com/cosmos/iavl v0.20.1 h1:rM1kqeG3/HBT85vsZdoSNsehciqUQPWrR4BYmqE2+zg= +github.com/cosmos/iavl v0.20.1/go.mod h1:WO7FyvaZJoH65+HFOsDir7xU9FWk2w9cHXNW1XHcl7A= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.1 h1:PqIK9vTr6zxCdQmrDZwxwL4KMAqg/GRGsiMEiaMP4wA= github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.1.1/go.mod h1:UvDmcGIWJPIytq+Q78/ff5NTOsuX/7IrNgEugTW5i0s= github.com/cosmos/ibc-apps/modules/async-icq/v7 v7.1.1 h1:02RCbih5lQ8aGdDMSvxhTnk5JDLEDitn17ytEE1Qhko= @@ -1464,8 +1464,8 @@ github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231128160617-9a7cef4bff58 h1 github.com/osmosis-labs/osmosis/x/epochs v0.0.3-0.20231128160617-9a7cef4bff58/go.mod h1:pkrWxPSZ8K2ZssmokdEJqY5xKfvOqWKtJTipuMlBcIQ= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231124190325-d75e9ade352e h1:pn41/rRo9rzsot1c+2C/4ekcf66yjTSUEn8Y/OwVML4= github.com/osmosis-labs/osmosis/x/ibc-hooks v0.0.9-0.20231124190325-d75e9ade352e/go.mod h1:9jIiuB+lzPskcaLhaZYpdpbLiREupcMMtSszw38qqJ8= -github.com/osmosis-labs/wasmd v0.40.2-0.20231108035253-e6a55f40958c h1:GwdhwWFrkgax2Cd6s8fcLVbXYGlQodwV4CXYtYQKjGs= -github.com/osmosis-labs/wasmd v0.40.2-0.20231108035253-e6a55f40958c/go.mod h1:pijs8uXQvqRxuPcW6cKBqOt0NfuStCbFVzslLvJ9Y8k= +github.com/osmosis-labs/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3 h1:9/nE16UH+KdX36k58kfTzzJ80JT6tu4uMMDA7LMsMbU= +github.com/osmosis-labs/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3/go.mod h1:J6eRvwii5T1WxhetZkBg1kOJS3GTn1Bw2OLyZBb8EVU= github.com/otiai10/copy v1.2.0/go.mod h1:rrF5dJ5F0t/EWSYODDu4j9/vEeYHMkc8jt0zJChqQWw= github.com/otiai10/copy v1.11.0 h1:OKBD80J/mLBrwnzXqGtFCzprFSGioo30JcmR4APsNwc= github.com/otiai10/copy v1.11.0/go.mod h1:rSaLseMUsZFFbsFGc7wCJnnkTAvdc5L6VWxPE4308Ww= diff --git a/tests/cl-genesis-positions/go.mod b/tests/cl-genesis-positions/go.mod index 01a1d2cc8c3..543fe6dd3e2 100644 --- a/tests/cl-genesis-positions/go.mod +++ b/tests/cl-genesis-positions/go.mod @@ -28,8 +28,8 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/CosmWasm/wasmd v0.40.1 // indirect - github.com/CosmWasm/wasmvm v1.2.4 // indirect + github.com/CosmWasm/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3 // indirect + github.com/CosmWasm/wasmvm v1.5.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect diff --git a/tests/e2e/configurer/chain/chain.go b/tests/e2e/configurer/chain/chain.go index da151a2d6bd..9eb6afde0ee 100644 --- a/tests/e2e/configurer/chain/chain.go +++ b/tests/e2e/configurer/chain/chain.go @@ -30,8 +30,6 @@ type Config struct { NodeConfigs []*NodeConfig NodeTempConfigs []*NodeConfig - LatestCodeId int - t *testing.T containerManager *containers.Manager } diff --git a/tests/e2e/configurer/chain/commands.go b/tests/e2e/configurer/chain/commands.go index 3730391fc22..db3e81ab8c7 100644 --- a/tests/e2e/configurer/chain/commands.go +++ b/tests/e2e/configurer/chain/commands.go @@ -757,7 +757,6 @@ func (n *NodeConfig) SetupRateLimiting(paths, gov_addr string, chain *Config, is } codeId := srcNode.StoreWasmCode("rate_limiter.wasm", initialization.ValidatorWalletName) - chain.LatestCodeId = int(srcNode.QueryLatestWasmCodeID()) srcNode.InstantiateWasmContract( strconv.Itoa(codeId), fmt.Sprintf(`{"gov_module": "%s", "ibc_module": "%s", "paths": [%s] }`, gov_addr, initialization.ValidatorWalletName, paths), diff --git a/tests/e2e/helpers_e2e_test.go b/tests/e2e/helpers_e2e_test.go index 49f8d653f70..e7c2d788dca 100644 --- a/tests/e2e/helpers_e2e_test.go +++ b/tests/e2e/helpers_e2e_test.go @@ -130,7 +130,6 @@ func (s *IntegrationTestSuite) UploadAndInstantiateCounter(chain *chain.Config) s.NoError(err) codeId := node.StoreWasmCode("counter.wasm", initialization.ValidatorWalletName) - chain.LatestCodeId++ node.InstantiateWasmContract( strconv.Itoa(codeId), `{"count": 0}`, diff --git a/wasmbinding/wasm.go b/wasmbinding/wasm.go index 1d16328d3f2..42ae9c44a90 100644 --- a/wasmbinding/wasm.go +++ b/wasmbinding/wasm.go @@ -1,8 +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" @@ -25,7 +23,7 @@ func RegisterCustomPlugins( CustomMessageDecorator(bank, tokenFactory), ) - return []wasm.Option{ + return []wasmkeeper.Option{ queryPluginOpt, messengerDecoratorOpt, } @@ -36,7 +34,7 @@ func RegisterStargateQueries(queryRouter baseapp.GRPCQueryRouter, codec codec.Co Stargate: StargateQuerier(queryRouter, codec), }) - return []wasm.Option{ + return []wasmkeeper.Option{ queryPluginOpt, } } diff --git a/x/epochs/go.mod b/x/epochs/go.mod index 1cc576c5b62..8f37f83f748 100644 --- a/x/epochs/go.mod +++ b/x/epochs/go.mod @@ -36,9 +36,9 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect github.com/CosmWasm/wasmd v0.40.1 // indirect - github.com/CosmWasm/wasmvm v1.2.4 // indirect + github.com/CosmWasm/wasmvm v1.5.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect - github.com/aws/aws-sdk-go v1.44.203 // indirect + github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect diff --git a/x/ibc-hooks/go.mod b/x/ibc-hooks/go.mod index 94a0e285325..f0277a761d4 100644 --- a/x/ibc-hooks/go.mod +++ b/x/ibc-hooks/go.mod @@ -34,7 +34,7 @@ require ( github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/CosmWasm/wasmvm v1.2.4 // indirect + github.com/CosmWasm/wasmvm v1.5.0 // indirect github.com/armon/go-metrics v0.4.1 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -194,7 +194,7 @@ replace ( // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk, current branch: osmosis-main. Direct commit link: https://github.com/osmosis-labs/cosmos-sdk/commit/05346fa12992 github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.47.6-0.20231124185741-15259ccd2249 golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb - github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.40.2-0.20231108035253-e6a55f40958c + github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.45.1-0.20231128163306-4b9b61faeaa3 // Local replaces commented for development // github.com/osmosis-labs/osmosis/osmoutils => ../../osmoutils diff --git a/x/tokenfactory/keeper/keeper_test.go b/x/tokenfactory/keeper/keeper_test.go index 3259e8ffa1e..bea7e89ee7f 100644 --- a/x/tokenfactory/keeper/keeper_test.go +++ b/x/tokenfactory/keeper/keeper_test.go @@ -36,7 +36,7 @@ func TestKeeperTestSuite(t *testing.T) { type SudoAuthorizationPolicy struct{} -func (p SudoAuthorizationPolicy) CanCreateCode(chainAccesscoConfig wasmkeeper.ChainAccessConfigs, actor sdk.AccAddress, config wasmtypes.AccessConfig) bool { +func (p SudoAuthorizationPolicy) CanCreateCode(chainAccesscoConfig wasmtypes.ChainAccessConfigs, actor sdk.AccAddress, config wasmtypes.AccessConfig) bool { return true }