From 361159387f418771fc1ef9e9da4dbefe18397b1a Mon Sep 17 00:00:00 2001 From: Pham Tu Date: Wed, 22 Nov 2023 17:57:52 +0700 Subject: [PATCH] using latest wasmvm --- .github/workflows/proto-buf-publisher.yml | 2 +- .gitignore | 3 + CHANGELOG.md | 30 +- Dockerfile | 8 +- INTEGRATION.md | 6 + README.md | 4 + app/ante.go | 1 + app/app.go | 100 +- app/genesis.go | 19 - app/test_helpers.go | 20 +- app/upgrades.go | 69 +- app/upgrades/noop/upgrades.go | 2 +- app/upgrades/types.go | 22 +- app/upgrades/v050/upgrades.go | 3 +- .../v050/upgrades.go_wasmd_33_example.txt | 73 + cmd/wasmd/root.go | 42 +- contrib/local/01-accounts.sh | 2 +- contrib/local/02-contracts.sh | 15 +- docs/proto/proto-docs.md | 343 +- go.mod | 125 +- go.sum | 238 +- proto/cosmwasm/wasm/v1/proposal_legacy.proto | 333 + proto/cosmwasm/wasm/v1/tx.proto | 10 - tests/e2e/reflect_helper.go | 2 +- tests/system/go.mod | 74 +- tests/system/go.sum | 158 +- tests/system/system.go | 2 +- x/wasm/ibc.go | 3 + x/wasm/ibc_integration_test.go | 73 +- x/wasm/keeper/events.go | 4 - x/wasm/keeper/events_test.go | 41 +- x/wasm/keeper/genesis_test.go | 32 +- x/wasm/keeper/handler_plugin_encoders.go | 10 +- x/wasm/keeper/handler_plugin_encoders_test.go | 6 +- x/wasm/keeper/handler_plugin_test.go | 10 +- x/wasm/keeper/keeper.go | 35 +- x/wasm/keeper/keeper_test.go | 86 +- x/wasm/keeper/migrations_integration_test.go | 35 +- x/wasm/keeper/msg_dispatcher_test.go | 2 +- x/wasm/keeper/proposal_handler_legacy.go | 342 + x/wasm/keeper/proposal_integration_test.go | 226 + x/wasm/keeper/querier_test.go | 18 +- x/wasm/keeper/relay.go | 17 +- x/wasm/keeper/relay_test.go | 26 +- x/wasm/keeper/submsg_test.go | 48 +- x/wasm/keeper/wasmtesting/mock_engine.go | 105 +- x/wasm/legacy/codec.go | 23 +- x/wasm/migrations/v2/legacy_types.go | 1219 ++++ x/wasm/migrations/v2/params_legacy.go | 142 + x/wasm/migrations/v2/params_legacy_test.go | 89 + x/wasm/migrations/v2/store.go | 7 +- x/wasm/migrations/v2/store_test.go | 102 +- x/wasm/module.go | 13 + x/wasm/module_test.go | 14 +- x/wasm/relay_pingpong_test.go | 53 +- x/wasm/relay_test.go | 50 +- x/wasm/types/authz.pb.go | 87 +- x/wasm/types/codec.go | 38 +- x/wasm/types/genesis.pb.go | 42 +- x/wasm/types/ibc.pb.go | 34 +- x/wasm/types/params.go | 17 +- x/wasm/types/params_legacy.go | 26 - x/wasm/types/proposal_legacy.go | 804 +++ x/wasm/types/proposal_legacy.pb.go | 5762 +++++++++++++++++ x/wasm/types/proposal_legacy_test.go | 1317 ++++ x/wasm/types/query.pb.go | 180 +- x/wasm/types/query.pb.gw.go | 86 +- x/wasm/types/tx.go | 144 - x/wasm/types/tx.pb.go | 773 +-- x/wasm/types/types.go | 2 +- x/wasm/types/types.pb.go | 74 +- x/wasm/types/wasmer_engine.go | 22 +- 72 files changed, 11981 insertions(+), 1964 deletions(-) create mode 100644 app/upgrades/v050/upgrades.go_wasmd_33_example.txt create mode 100644 proto/cosmwasm/wasm/v1/proposal_legacy.proto create mode 100644 x/wasm/keeper/proposal_handler_legacy.go create mode 100644 x/wasm/keeper/proposal_integration_test.go create mode 100644 x/wasm/migrations/v2/legacy_types.go create mode 100644 x/wasm/migrations/v2/params_legacy.go create mode 100644 x/wasm/migrations/v2/params_legacy_test.go delete mode 100644 x/wasm/types/params_legacy.go create mode 100644 x/wasm/types/proposal_legacy.go create mode 100644 x/wasm/types/proposal_legacy.pb.go create mode 100644 x/wasm/types/proposal_legacy_test.go diff --git a/.github/workflows/proto-buf-publisher.yml b/.github/workflows/proto-buf-publisher.yml index 65cd702a68..6b31463303 100644 --- a/.github/workflows/proto-buf-publisher.yml +++ b/.github/workflows/proto-buf-publisher.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4.1.1 - - uses: bufbuild/buf-setup-action@v1.27.1 + - uses: bufbuild/buf-setup-action@v1.28.1 # lint checks - uses: bufbuild/buf-lint-action@v1 diff --git a/.gitignore b/.gitignore index f5f5405d3a..f40c5ae9f3 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,6 @@ dependency-graph.png *.out *.synctex.gz contract_tests/* + +# blockchain state +.oraid \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 442bca05d6..bf559cdf55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,35 @@ ## [Unreleased](https://github.com/CosmWasm/wasmd/tree/HEAD) -[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.43.0...HEAD) +[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.45.0...HEAD) + +## [v0.45.0](https://github.com/CosmWasm/wasmd/tree/v0.45.0) (2023-11-15) + +[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.44.0...v0.45.0) + +- Retract wasmd v0.43.0 and v0.44.0 [\#1720](https://github.com/CosmWasm/wasmd/pull/1720) +- Allow empty attribute values [\#1618](https://github.com/CosmWasm/wasmd/pull/1618) +- Fix gov v1beta1 support for legacy proposals [\#1715](https://github.com/CosmWasm/wasmd/pull/1715) +- Prevent empty channel version [\#1697](https://github.com/CosmWasm/wasmd/pull/1697) + +### Notable changes: +- Wasmd v0.43.0 and 0.44.0 releases were retracted because of a bug related to legacy proposals. See https://github.com/CosmWasm/wasmd/issues/1713 for more details. + +### Migration notes: +- This release does not include any state migrations but breaking changes that require a coordinated chain upgrade. + +## [v0.44.0](https://github.com/CosmWasm/wasmd/tree/v0.44.0) (2023-11-06) + +[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.43.0...v0.44.0) + +- Upgrade to wasmvm v1.5.0 [\#1675](https://github.com/CosmWasm/wasmd/issues/1675) +- Prevent non printable characters in label [\#1623](https://github.com/CosmWasm/wasmd/issues/1623) + +### Notable changes: +- Upgrade to wasmvm [v1.5.0](https://github.com/CosmWasm/wasmvm/releases/tag/v1.5.0) + +### Migration notes: +- This release does not include any state migrations but breaking changes that require a coordinated chain upgrade. ## [v0.43.0](https://github.com/CosmWasm/wasmd/tree/v0.43.0) (2023-10-10) diff --git a/Dockerfile b/Dockerfile index ccce907052..0d1bd5c9a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ RUN apk add git WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.1/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a -ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.4.1/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a -RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep a8259ba852f1b68f2a5f8eb666a9c7f1680196562022f71bb361be1472a83cfd -RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 324c1073cb988478d644861783ed5a7de21cfd090976ccc6b1de0559098fbbad +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a +ADD https://github.com/CosmWasm/wasmvm/releases/download/v1.5.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a +RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 2687afbdae1bc6c7c8b05ae20dfb8ffc7ddc5b4e056697d0f37853dfe294e913 +RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 465e3a088e96fd009a11bfd234c69fb8a0556967677e54511c084f815cf9ce63 # Copy the library you want to the final location that will be found by the linker flag `-lwasmvm_muslc` RUN cp /lib/libwasmvm_muslc.${arch}.a /lib/libwasmvm_muslc.a diff --git a/INTEGRATION.md b/INTEGRATION.md index 2ce4a33515..211331ea9e 100644 --- a/INTEGRATION.md +++ b/INTEGRATION.md @@ -19,6 +19,12 @@ hardware it runs on. | wasmd | Cosmos SDK | |:-----:|:----------:| +| v0.50 | v0.50.1 | +| v0.45 | v0.47.5 | +| v0.44 | v0.47.5 | +| v0.43 | v0.47.5 | +| v0.42 | v0.47.5 | +| v0.41 | v0.47.4 | | v0.40 | v0.47.1 | | v0.31 | v0.45.14 | | v0.30 | v0.45.11 | diff --git a/README.md b/README.md index 7abbad51d2..4367d347b5 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,10 @@ compatibility list: | wasmd | wasmvm | cosmwasm-vm | cosmwasm-std | |-------|--------------|-------------|--------------| +| 0.50 | v1.5.0 | | 1.0-1.5 | +| 0.45 | v1.5.0 | | 1.0-1.5 | +| 0.44 | v1.5.0 | | 1.0-1.5 | +| 0.43 | v1.4.1 | | 1.0-1.4 | | 0.42 | v1.4.0 | | 1.0-1.4 | | 0.41 | v1.3.0 | | 1.0-1.3 | | 0.40 | v1.2.3 | | 1.0-1.2 | diff --git a/app/ante.go b/app/ante.go index 43f1b5edcf..7a8f17e511 100644 --- a/app/ante.go +++ b/app/ante.go @@ -29,6 +29,7 @@ type HandlerOptions struct { CircuitKeeper *circuitkeeper.Keeper } +// NewAnteHandler constructor func NewAnteHandler(options HandlerOptions) (sdk.AnteHandler, error) { if options.AccountKeeper == nil { return nil, errors.New("account keeper is required for ante builder") diff --git a/app/app.go b/app/app.go index b143b01ff6..5197db7bae 100644 --- a/app/app.go +++ b/app/app.go @@ -8,6 +8,7 @@ import ( "path/filepath" "sort" "strings" + "sync" abci "github.com/cometbft/cometbft/abci/types" tmproto "github.com/cometbft/cometbft/proto/tendermint/types" @@ -27,10 +28,12 @@ import ( ibcfee "github.com/cosmos/ibc-go/v8/modules/apps/29-fee" ibcfeekeeper "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/keeper" ibcfeetypes "github.com/cosmos/ibc-go/v8/modules/apps/29-fee/types" - transfer "github.com/cosmos/ibc-go/v8/modules/apps/transfer" + "github.com/cosmos/ibc-go/v8/modules/apps/transfer" ibctransferkeeper "github.com/cosmos/ibc-go/v8/modules/apps/transfer/keeper" ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" ibc "github.com/cosmos/ibc-go/v8/modules/core" + ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck + ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types" ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" @@ -77,7 +80,6 @@ import ( "github.com/cosmos/cosmos-sdk/std" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/cosmos/cosmos-sdk/types/msgservice" "github.com/cosmos/cosmos-sdk/version" "github.com/cosmos/cosmos-sdk/x/auth" "github.com/cosmos/cosmos-sdk/x/auth/ante" @@ -240,6 +242,7 @@ type WasmApp struct { // module configurator configurator module.Configurator + once sync.Once } // NewWasmApp returns a reference to an initialized WasmApp. @@ -393,6 +396,21 @@ func NewWasmApp( logger, ) + // optional: enable sign mode textual by overwriting the default tx config (after setting the bank keeper) + // enabledSignModes := append(tx.DefaultSignModes, sigtypes.SignMode_SIGN_MODE_TEXTUAL) + // txConfigOpts := tx.ConfigOptions{ + // EnabledSignModes: enabledSignModes, + // TextualCoinMetadataQueryFn: txmodule.NewBankKeeperCoinMetadataQueryFn(app.BankKeeper), + // } + // txConfig, err := tx.NewTxConfigWithOptions( + // appCodec, + // txConfigOpts, + // ) + // if err != nil { + // panic(err) + // } + // app.txConfig = txConfig + app.StakingKeeper = stakingkeeper.NewKeeper( appCodec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]), @@ -510,9 +528,7 @@ func NewWasmApp( // See: https://docs.cosmos.network/main/modules/gov#proposal-messages govRouter := govv1beta1.NewRouter() govRouter.AddRoute(govtypes.RouterKey, govv1beta1.ProposalHandler). - // This should be removed. It is still in place to avoid failures of modules that have not yet been upgraded. AddRoute(paramproposal.RouterKey, params.NewParamChangeProposalHandler(app.ParamsKeeper)) - govConfig := govtypes.DefaultConfig() /* Example of setting gov params: @@ -530,6 +546,9 @@ func NewWasmApp( authtypes.NewModuleAddress(govtypes.ModuleName).String(), ) + // Set legacy router for backwards compatibility with gov v1beta1 + govKeeper.SetLegacyRouter(govRouter) + app.GovKeeper = *govKeeper.SetHooks( govtypes.NewMultiGovHooks( // register the governance hooks @@ -631,9 +650,6 @@ func NewWasmApp( wasmOpts..., ) - // Set legacy router for backwards compatibility with gov v1beta1 - app.GovKeeper.SetLegacyRouter(govRouter) - // Create Transfer Stack var transferStack porttypes.IBCModule transferStack = transfer.NewIBCModule(app.TransferKeeper) @@ -707,7 +723,7 @@ func NewWasmApp( transfer.NewAppModule(app.TransferKeeper), ibcfee.NewAppModule(app.IBCFeeKeeper), ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper), - ibctm.AppModuleBasic{}, + ibctm.AppModule{}, // sdk crisis.NewAppModule(app.CrisisKeeper, skipGenesisInvariants, app.GetSubspace(crisistypes.ModuleName)), // always be last to make sure that it checks for all invariants and not only part of them ) @@ -725,7 +741,6 @@ func NewWasmApp( paramsclient.ProposalHandler, }, ), - ibctm.ModuleName: ibctm.AppModuleBasic{}, }) app.BasicModuleManager.RegisterLegacyAminoCodec(legacyAmino) app.BasicModuleManager.RegisterInterfaces(interfaceRegistry) @@ -873,30 +888,25 @@ func NewWasmApp( // meaning that both `runMsgs` and `postHandler` state will be committed if // both are successful, and both will be reverted if any of the two fails. // - // The SDK exposes a default postHandlers chain, which comprises of only - // one decorator: the Transaction Tips decorator. However, some chains do - // not need it by default, so feel free to comment the next line if you do - // not need tips. - // To read more about tips: - // https://docs.cosmos.network/main/core/tips.html + // The SDK exposes a default postHandlers chain // // Please note that changing any of the anteHandler or postHandler chain is // likely to be a state-machine breaking change, which needs a coordinated // upgrade. app.setPostHandler() - // At startup, after all modules have been registered, check that all proto - // annotations are correct. - protoFiles, err := proto.MergedRegistry() - if err != nil { - panic(err) - } - err = msgservice.ValidateProtoAnnotations(protoFiles) - if err != nil { - // Once we switch to using protoreflect-based antehandlers, we might - // want to panic here instead of logging a warning. - _, _ = fmt.Fprintln(os.Stderr, err.Error()) - } + // // At startup, after all modules have been registered, check that all proto + // // annotations are correct. + // protoFiles, err := proto.MergedRegistry() + // if err != nil { + // panic(err) + // } + // err = msgservice.ValidateProtoAnnotations(protoFiles) + // if err != nil { + // // Once we switch to using protoreflect-based antehandlers, we might + // // want to panic here instead of logging a warning. + // _, _ = fmt.Fprintln(os.Stderr, err.Error()) + // } if loadLatest { if err := app.LoadLatestVersion(); err != nil { @@ -913,6 +923,27 @@ func NewWasmApp( return app } +func (app *WasmApp) FinalizeBlock(req *abci.RequestFinalizeBlock) (*abci.ResponseFinalizeBlock, error) { + // when skipping sdk 47 for sdk 50, the upgrade handler is called too late in BaseApp + // this is a hack to ensure that the migration is executed when needed and not panics + app.once.Do(func() { + ctx := app.NewUncachedContext(false, tmproto.Header{}) + if _, err := app.ConsensusParamsKeeper.Params(ctx, &consensusparamtypes.QueryParamsRequest{}); err != nil { + // prevents panic: consensus key is nil: collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams + // sdk 47: + // Migrate Tendermint consensus parameters from x/params module to a dedicated x/consensus module. + // see https://github.com/cosmos/cosmos-sdk/blob/v0.47.0/simapp/upgrades.go#L66 + baseAppLegacySS := app.GetSubspace(baseapp.Paramspace) + err := baseapp.MigrateParams(sdk.UnwrapSDKContext(ctx), baseAppLegacySS, app.ConsensusParamsKeeper.ParamsStore) + if err != nil { + panic(err) + } + } + }) + + return app.BaseApp.FinalizeBlock(req) +} + func (app *WasmApp) setAnteHandler(txConfig client.TxConfig, wasmConfig wasmtypes.WasmConfig, txCounterStoreKey *storetypes.KVStoreKey) { anteHandler, err := NewAnteHandler( HandlerOptions{ @@ -933,6 +964,8 @@ func (app *WasmApp) setAnteHandler(txConfig client.TxConfig, wasmConfig wasmtype if err != nil { panic(fmt.Errorf("failed to create AnteHandler: %s", err)) } + + // Set the AnteHandler for the app app.SetAnteHandler(anteHandler) } @@ -1165,10 +1198,15 @@ func initParamsKeeper(appCodec codec.BinaryCodec, legacyAmino *codec.LegacyAmino paramsKeeper.Subspace(slashingtypes.ModuleName) paramsKeeper.Subspace(govtypes.ModuleName) paramsKeeper.Subspace(crisistypes.ModuleName) - paramsKeeper.Subspace(ibctransfertypes.ModuleName) - paramsKeeper.Subspace(ibcexported.ModuleName) - paramsKeeper.Subspace(icahosttypes.SubModuleName) - paramsKeeper.Subspace(icacontrollertypes.SubModuleName) + + // register the IBC key tables for legacy param subspaces + keyTable := ibcclienttypes.ParamKeyTable() + keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) + paramsKeeper.Subspace(ibcexported.ModuleName).WithKeyTable(keyTable) + paramsKeeper.Subspace(ibctransfertypes.ModuleName).WithKeyTable(ibctransfertypes.ParamKeyTable()) + paramsKeeper.Subspace(icacontrollertypes.SubModuleName).WithKeyTable(icacontrollertypes.ParamKeyTable()) + paramsKeeper.Subspace(icahosttypes.SubModuleName).WithKeyTable(icahosttypes.ParamKeyTable()) + paramsKeeper.Subspace(wasmtypes.ModuleName) return paramsKeeper } diff --git a/app/genesis.go b/app/genesis.go index 1aa0f67001..e4e849fc27 100644 --- a/app/genesis.go +++ b/app/genesis.go @@ -2,15 +2,6 @@ package app import ( "encoding/json" - "testing" - - dbm "github.com/cosmos/cosmos-db" - - "cosmossdk.io/log" - - simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - - wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" ) // GenesisState of the blockchain is represented here as a map of raw json @@ -21,13 +12,3 @@ import ( // the ModuleBasicManager which populates json from each BasicModule // object provided to it during init. type GenesisState map[string]json.RawMessage - -// NewDefaultGenesisState generates the default state for the application. -// Deprecated: use wasmApp.DefaultGenesis() instead -func NewDefaultGenesisState(t *testing.T) GenesisState { - t.Helper() - // we "pre"-instantiate the application for getting the injected/configured encoding configuration - // note, this is not necessary when using app wiring, as depinject can be directly used (see root_v2.go) - tempApp := NewWasmApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(t.TempDir()), []wasmkeeper.Option{}) - return tempApp.DefaultGenesis() -} diff --git a/app/test_helpers.go b/app/test_helpers.go index ca61d3d3e4..5a6972e726 100644 --- a/app/test_helpers.go +++ b/app/test_helpers.go @@ -175,13 +175,6 @@ func SetupWithGenesisValSet( }) require.NoError(t, err) - votes := make([]abci.VoteInfo, len(valSet.Validators)) - for i, v := range valSet.Validators { - votes[i] = abci.VoteInfo{ - Validator: abci.Validator{Address: v.Address, Power: v.VotingPower}, - } - } - _, err = app.FinalizeBlock(&abci.RequestFinalizeBlock{ Height: app.LastBlockHeight() + 1, Hash: app.LastCommitID().Hash, @@ -236,12 +229,12 @@ func AddTestAddrsIncremental(app *WasmApp, ctx sdk.Context, accNum int, accAmt s func addTestAddrs(app *WasmApp, ctx sdk.Context, accNum int, accAmt sdkmath.Int, strategy simtestutil.GenerateAccountStrategy) []sdk.AccAddress { testAddrs := strategy(accNum) - - denom, err := app.StakingKeeper.BondDenom(ctx) + bondDenom, err := app.StakingKeeper.BondDenom(ctx) if err != nil { panic(err) } - initCoins := sdk.NewCoins(sdk.NewCoin(denom, accAmt)) + + initCoins := sdk.NewCoins(sdk.NewCoin(bondDenom, accAmt)) for _, addr := range testAddrs { initAccountWithCoins(app, ctx, addr, initCoins) @@ -262,13 +255,6 @@ func initAccountWithCoins(app *WasmApp, ctx sdk.Context, addr sdk.AccAddress, co } } -// ModuleAccountAddrs provides a list of blocked module accounts from configuration in AppConfig -// -// Ported from WasmApp -func ModuleAccountAddrs() map[string]bool { - return BlockedAddresses() -} - var emptyWasmOptions []wasmkeeper.Option // NewTestNetworkFixture returns a new WasmApp AppConstructor for network simulation tests diff --git a/app/upgrades.go b/app/upgrades.go index f8634ac0f2..2ffaa17b70 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -3,35 +3,49 @@ package app import ( "fmt" - icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" - icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types" - ibctransfertypes "github.com/cosmos/ibc-go/v8/modules/apps/transfer/types" - ibcclienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types" //nolint:staticcheck - ibcconnectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types" - ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported" - upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/baseapp" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" + banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + distrtypes "github.com/cosmos/cosmos-sdk/x/distribution/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + govv1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" + slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/CosmWasm/wasmd/app/upgrades" "github.com/CosmWasm/wasmd/app/upgrades/noop" v050 "github.com/CosmWasm/wasmd/app/upgrades/v050" + v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" ) // Upgrades list of chain upgrades var Upgrades = []upgrades.Upgrade{v050.Upgrade} // RegisterUpgradeHandlers registers the chain upgrade handlers -func (app WasmApp) RegisterUpgradeHandlers() { - setupLegacyKeyTables(app.ParamsKeeper) +func (app *WasmApp) RegisterUpgradeHandlers() { + setupLegacyKeyTables(&app.ParamsKeeper) if len(Upgrades) == 0 { // always have a unique upgrade registered for the current version to test in system tests Upgrades = append(Upgrades, noop.NewUpgrade(app.Version())) } - keepers := upgrades.AppKeepers{AccountKeeper: app.AccountKeeper} + keepers := upgrades.AppKeepers{ + AccountKeeper: &app.AccountKeeper, + ParamsKeeper: &app.ParamsKeeper, + ConsensusParamsKeeper: &app.ConsensusParamsKeeper, + CapabilityKeeper: app.CapabilityKeeper, + IBCKeeper: app.IBCKeeper, + Codec: app.appCodec, + GetStoreKey: app.GetKey, + } + app.GetStoreKeys() // register all upgrade handlers for _, upgrade := range Upgrades { app.UpgradeKeeper.SetUpgradeHandler( @@ -62,23 +76,31 @@ func (app WasmApp) RegisterUpgradeHandlers() { } } -func setupLegacyKeyTables(k paramskeeper.Keeper) { - // Set param key table for params module migration +func setupLegacyKeyTables(k *paramskeeper.Keeper) { for _, subspace := range k.GetSubspaces() { subspace := subspace var keyTable paramstypes.KeyTable switch subspace.Name() { - // ibc types - case ibcexported.ModuleName: - keyTable = ibcclienttypes.ParamKeyTable() - keyTable.RegisterParamSet(&ibcconnectiontypes.Params{}) - case ibctransfertypes.ModuleName: - keyTable = ibctransfertypes.ParamKeyTable() - case icahosttypes.SubModuleName: - keyTable = icahosttypes.ParamKeyTable() - case icacontrollertypes.SubModuleName: - keyTable = icacontrollertypes.ParamKeyTable() + case authtypes.ModuleName: + keyTable = authtypes.ParamKeyTable() //nolint:staticcheck + case banktypes.ModuleName: + keyTable = banktypes.ParamKeyTable() //nolint:staticcheck + case stakingtypes.ModuleName: + keyTable = stakingtypes.ParamKeyTable() //nolint:staticcheck + case minttypes.ModuleName: + keyTable = minttypes.ParamKeyTable() //nolint:staticcheck + case distrtypes.ModuleName: + keyTable = distrtypes.ParamKeyTable() //nolint:staticcheck + case slashingtypes.ModuleName: + keyTable = slashingtypes.ParamKeyTable() //nolint:staticcheck + case govtypes.ModuleName: + keyTable = govv1.ParamKeyTable() //nolint:staticcheck + case crisistypes.ModuleName: + keyTable = crisistypes.ParamKeyTable() //nolint:staticcheck + // wasm + case wasmtypes.ModuleName: + keyTable = v2.ParamKeyTable() //nolint:staticcheck default: continue } @@ -87,4 +109,7 @@ func setupLegacyKeyTables(k paramskeeper.Keeper) { subspace.WithKeyTable(keyTable) } } + // sdk 47 + k.Subspace(baseapp.Paramspace). + WithKeyTable(paramstypes.ConsensusParamsKeyTable()) } diff --git a/app/upgrades/noop/upgrades.go b/app/upgrades/noop/upgrades.go index 3458b1385e..e1ac64da01 100644 --- a/app/upgrades/noop/upgrades.go +++ b/app/upgrades/noop/upgrades.go @@ -24,7 +24,7 @@ func NewUpgrade(semver string) upgrades.Upgrade { } func CreateUpgradeHandler( - mm *module.Manager, + mm upgrades.ModuleManager, configurator module.Configurator, ak *upgrades.AppKeepers, ) upgradetypes.UpgradeHandler { diff --git a/app/upgrades/types.go b/app/upgrades/types.go index 02d31dab73..2ff71ce631 100644 --- a/app/upgrades/types.go +++ b/app/upgrades/types.go @@ -1,15 +1,33 @@ package upgrades import ( + "context" + + capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper" + ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper" + storetypes "cosmossdk.io/store/types" upgradetypes "cosmossdk.io/x/upgrade/types" + "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/types/module" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" + consensusparamkeeper "github.com/cosmos/cosmos-sdk/x/consensus/keeper" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" ) type AppKeepers struct { - authkeeper.AccountKeeper + AccountKeeper *authkeeper.AccountKeeper + ParamsKeeper *paramskeeper.Keeper + ConsensusParamsKeeper *consensusparamkeeper.Keeper + Codec codec.Codec + GetStoreKey func(storeKey string) *storetypes.KVStoreKey + CapabilityKeeper *capabilitykeeper.Keeper + IBCKeeper *ibckeeper.Keeper +} +type ModuleManager interface { + RunMigrations(ctx context.Context, cfg module.Configurator, fromVM module.VersionMap) (module.VersionMap, error) + GetVersionMap() module.VersionMap } // Upgrade defines a struct containing necessary fields that a SoftwareUpgradeProposal @@ -21,6 +39,6 @@ type Upgrade struct { UpgradeName string // CreateUpgradeHandler defines the function that creates an upgrade handler - CreateUpgradeHandler func(*module.Manager, module.Configurator, *AppKeepers) upgradetypes.UpgradeHandler + CreateUpgradeHandler func(ModuleManager, module.Configurator, *AppKeepers) upgradetypes.UpgradeHandler StoreUpgrades storetypes.StoreUpgrades } diff --git a/app/upgrades/v050/upgrades.go b/app/upgrades/v050/upgrades.go index 5ba00e2bbe..091cfe9be8 100644 --- a/app/upgrades/v050/upgrades.go +++ b/app/upgrades/v050/upgrades.go @@ -27,10 +27,11 @@ var Upgrade = upgrades.Upgrade{ } func CreateUpgradeHandler( - mm *module.Manager, + mm upgrades.ModuleManager, configurator module.Configurator, ak *upgrades.AppKeepers, ) upgradetypes.UpgradeHandler { + // sdk 47 to sdk 50 return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return mm.RunMigrations(ctx, configurator, fromVM) } diff --git a/app/upgrades/v050/upgrades.go_wasmd_33_example.txt b/app/upgrades/v050/upgrades.go_wasmd_33_example.txt new file mode 100644 index 0000000000..e3853b105b --- /dev/null +++ b/app/upgrades/v050/upgrades.go_wasmd_33_example.txt @@ -0,0 +1,73 @@ +package v050 + +import ( + "context" + + capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" + v6 "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/migrations/v6" + icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types" + ibctmmigrations "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint/migrations" + + storetypes "cosmossdk.io/store/types" + circuittypes "cosmossdk.io/x/circuit/types" + "cosmossdk.io/x/nft" + upgradetypes "cosmossdk.io/x/upgrade/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" + crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" + "github.com/cosmos/cosmos-sdk/x/group" + + "github.com/CosmWasm/wasmd/app/upgrades" +) + +// UpgradeName defines the on-chain upgrade name +const UpgradeName = "v0.50" + +var Upgrade = upgrades.Upgrade{ + UpgradeName: UpgradeName, + CreateUpgradeHandler: CreateUpgradeHandler, + StoreUpgrades: storetypes.StoreUpgrades{ + Added: []string{ + // SDK 46 + group.ModuleName, + nft.ModuleName, + // SDK 47 + crisistypes.ModuleName, + consensusparamtypes.ModuleName, + // SDK 50 + circuittypes.ModuleName, + }, + Deleted: []string{}, + }, +} + +func CreateUpgradeHandler( + mm upgrades.ModuleManager, + configurator module.Configurator, + ak *upgrades.AppKeepers, +) upgradetypes.UpgradeHandler { + return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + // ibc v6 + // NOTE: The moduleName arg of v6.CreateUpgradeHandler refers to the auth module ScopedKeeper name to which the channel capability should be migrated from. + // This should be the same string value provided upon instantiation of the ScopedKeeper with app.CapabilityKeeper.ScopeToModule() + const moduleName = icacontrollertypes.SubModuleName + if err := v6.MigrateICS27ChannelCapability(sdkCtx, ak.Codec, ak.GetStoreKey(capabilitytypes.ModuleName), + ak.CapabilityKeeper, moduleName); err != nil { + return nil, err + } + + // ibc v7 + if _, err := ibctmmigrations.PruneExpiredConsensusStates(sdkCtx, ak.Codec, ak.IBCKeeper.ClientKeeper); err != nil { + return nil, err + } + + // sdk 47 + // consensus params migration is done in app.go FinalizeBlock function to prevent panic + + // sdk 50 + return mm.RunMigrations(ctx, configurator, fromVM) + } +} diff --git a/cmd/wasmd/root.go b/cmd/wasmd/root.go index 7ef9136f93..6f6022336b 100644 --- a/cmd/wasmd/root.go +++ b/cmd/wasmd/root.go @@ -10,7 +10,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/client/config" - "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/server" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" sdk "github.com/cosmos/cosmos-sdk/types" @@ -37,7 +37,7 @@ func NewRootCmd() *cobra.Command { cfg.Seal() // we "pre"-instantiate the application for getting the injected/configured encoding configuration // note, this is not necessary when using app wiring, as depinject can be directly used (see root_v2.go) - tempApp := app.NewWasmApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(tempDir()), []wasmkeeper.Option{}) + tempApp := app.NewWasmApp(log.NewNopLogger(), dbm.NewMemDB(), nil, false, simtestutil.NewAppOptionsWithFlagHome(tempDir()), []wasmkeeper.Option{}) encodingConfig := params.EncodingConfig{ InterfaceRegistry: tempApp.InterfaceRegistry(), Codec: tempApp.AppCodec(), @@ -48,6 +48,7 @@ func NewRootCmd() *cobra.Command { initClientCtx := client.Context{}. WithCodec(encodingConfig.Codec). WithInterfaceRegistry(encodingConfig.InterfaceRegistry). + WithTxConfig(encodingConfig.TxConfig). WithLegacyAmino(encodingConfig.Amino). WithInput(os.Stdin). WithAccountRetriever(authtypes.AccountRetriever{}). @@ -55,8 +56,9 @@ func NewRootCmd() *cobra.Command { WithViper("") // In wasmd, we don't use any prefix for env variables. rootCmd := &cobra.Command{ - Use: version.AppName, - Short: "Wasm Daemon (server)", + Use: version.AppName, + Short: "Wasm Daemon (server)", + SilenceErrors: true, PersistentPreRunE: func(cmd *cobra.Command, _ []string) error { // set the default command outputs cmd.SetOut(cmd.OutOrStdout()) @@ -74,19 +76,24 @@ func NewRootCmd() *cobra.Command { } // This needs to go after ReadFromClientConfig, as that function - // sets the RPC client needed for SIGN_MODE_TEXTUAL. - txConfigOpts := tx.ConfigOptions{ - EnabledSignModes: append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL), - TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), + // sets the RPC client needed for SIGN_MODE_TEXTUAL. This sign mode + // is only available if the client is online. + if !initClientCtx.Offline { + enabledSignModes := append(tx.DefaultSignModes, signing.SignMode_SIGN_MODE_TEXTUAL) + txConfigOpts := tx.ConfigOptions{ + EnabledSignModes: enabledSignModes, + TextualCoinMetadataQueryFn: txmodule.NewGRPCCoinMetadataQueryFn(initClientCtx), + } + txConfig, err := tx.NewTxConfigWithOptions( + initClientCtx.Codec, + txConfigOpts, + ) + if err != nil { + return err + } + + initClientCtx = initClientCtx.WithTxConfig(txConfig) } - txConfigWithTextual, err := tx.NewTxConfigWithOptions( - codec.NewProtoCodec(encodingConfig.InterfaceRegistry), - txConfigOpts, - ) - if err != nil { - return err - } - initClientCtx = initClientCtx.WithTxConfig(txConfigWithTextual) if err := client.SetCmdClientContextHandler(initClientCtx, cmd); err != nil { return err @@ -104,7 +111,8 @@ func NewRootCmd() *cobra.Command { // add keyring to autocli opts autoCliOpts := tempApp.AutoCliOpts() initClientCtx, _ = config.ReadFromClientConfig(initClientCtx) - autoCliOpts.Keyring = initClientCtx.Keyring + autoCliOpts.Keyring, _ = keyring.NewAutoCLIKeyring(initClientCtx.Keyring) + autoCliOpts.ClientCtx = initClientCtx if err := autoCliOpts.EnhanceRootCommand(rootCmd); err != nil { panic(err) diff --git a/contrib/local/01-accounts.sh b/contrib/local/01-accounts.sh index 4aecc65b73..59478dc1ad 100755 --- a/contrib/local/01-accounts.sh +++ b/contrib/local/01-accounts.sh @@ -2,7 +2,7 @@ set -o errexit -o nounset -o pipefail BASE_ACCOUNT=$(wasmd keys show validator -a --keyring-backend=test) -wasmd q account "$BASE_ACCOUNT" -o json | jq +wasmd q auth account "$BASE_ACCOUNT" -o json | jq echo "## Add new account" wasmd keys add fred --keyring-backend=test diff --git a/contrib/local/02-contracts.sh b/contrib/local/02-contracts.sh index d3ea4bff2c..5e886fc29c 100755 --- a/contrib/local/02-contracts.sh +++ b/contrib/local/02-contracts.sh @@ -9,15 +9,15 @@ RESP=$(wasmd tx wasm store "$DIR/../../x/wasm/keeper/testdata/hackatom.wasm" \ --from validator --gas 1500000 -y --chain-id=testing --node=http://localhost:26657 -b sync -o json --keyring-backend=test) sleep 6 RESP=$(wasmd q tx $(echo "$RESP"| jq -r '.txhash') -o json) -CODE_ID=$(echo "$RESP" | jq -r '.logs[0].events[]| select(.type=="store_code").attributes[]| select(.key=="code_id").value') -CODE_HASH=$(echo "$RESP" | jq -r '.logs[0].events[]| select(.type=="store_code").attributes[]| select(.key=="code_checksum").value') +CODE_ID=$(echo "$RESP" | jq -r '.events[]| select(.type=="store_code").attributes[]| select(.key=="code_id").value') +CODE_HASH=$(echo "$RESP" | jq -r '.events[]| select(.type=="store_code").attributes[]| select(.key=="code_checksum").value') echo "* Code id: $CODE_ID" echo "* Code checksum: $CODE_HASH" echo "* Download code" -TMPDIR=$(mktemp -t wasmdXXXXXX) -wasmd q wasm code "$CODE_ID" "$TMPDIR" -rm -f "$TMPDIR" +TMPDIR=$(mktemp -d -t wasmdXXXXXX) +wasmd q wasm code "$CODE_ID" "$TMPDIR/delme.wasm" +rm -f "$TMPDIR/delme.wasm" echo "-----------------------" echo "## List code" wasmd query wasm list-code --node=http://localhost:26657 -o json | jq @@ -81,10 +81,11 @@ echo "-----------------------" echo "## Migrate contract" echo "### Upload new code" RESP=$(wasmd tx wasm store "$DIR/../../x/wasm/keeper/testdata/burner.wasm" \ - --from validator --gas 1000000 -y --chain-id=testing --node=http://localhost:26657 -b sync -o json --keyring-backend=test) + --from validator --gas 1100000 -y --chain-id=testing --node=http://localhost:26657 -b sync -o json --keyring-backend=test) sleep 6 RESP=$(wasmd q tx $(echo "$RESP"| jq -r '.txhash') -o json) -BURNER_CODE_ID=$(echo "$RESP" | jq -r '.logs[0].events[]| select(.type=="store_code").attributes[]| select(.key=="code_id").value') +BURNER_CODE_ID=$(echo "$RESP" | jq -r '.events[]| select(.type=="store_code").attributes[]| select(.key=="code_id").value') + echo "### Migrate to code id: $BURNER_CODE_ID" DEST_ACCOUNT=$(wasmd keys show fred -a --keyring-backend=test) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 2ea6190ed0..c3de180ca7 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -41,6 +41,21 @@ - [MsgIBCSend](#cosmwasm.wasm.v1.MsgIBCSend) - [MsgIBCSendResponse](#cosmwasm.wasm.v1.MsgIBCSendResponse) +- [cosmwasm/wasm/v1/proposal_legacy.proto](#cosmwasm/wasm/v1/proposal_legacy.proto) + - [AccessConfigUpdate](#cosmwasm.wasm.v1.AccessConfigUpdate) + - [ClearAdminProposal](#cosmwasm.wasm.v1.ClearAdminProposal) + - [ExecuteContractProposal](#cosmwasm.wasm.v1.ExecuteContractProposal) + - [InstantiateContract2Proposal](#cosmwasm.wasm.v1.InstantiateContract2Proposal) + - [InstantiateContractProposal](#cosmwasm.wasm.v1.InstantiateContractProposal) + - [MigrateContractProposal](#cosmwasm.wasm.v1.MigrateContractProposal) + - [PinCodesProposal](#cosmwasm.wasm.v1.PinCodesProposal) + - [StoreAndInstantiateContractProposal](#cosmwasm.wasm.v1.StoreAndInstantiateContractProposal) + - [StoreCodeProposal](#cosmwasm.wasm.v1.StoreCodeProposal) + - [SudoContractProposal](#cosmwasm.wasm.v1.SudoContractProposal) + - [UnpinCodesProposal](#cosmwasm.wasm.v1.UnpinCodesProposal) + - [UpdateAdminProposal](#cosmwasm.wasm.v1.UpdateAdminProposal) + - [UpdateInstantiateConfigProposal](#cosmwasm.wasm.v1.UpdateInstantiateConfigProposal) + - [cosmwasm/wasm/v1/query.proto](#cosmwasm/wasm/v1/query.proto) - [CodeInfoResponse](#cosmwasm.wasm.v1.CodeInfoResponse) - [QueryAllContractStateRequest](#cosmwasm.wasm.v1.QueryAllContractStateRequest) @@ -69,7 +84,6 @@ - [Query](#cosmwasm.wasm.v1.Query) - [cosmwasm/wasm/v1/tx.proto](#cosmwasm/wasm/v1/tx.proto) - - [AccessConfigUpdate](#cosmwasm.wasm.v1.AccessConfigUpdate) - [MsgAddCodeUploadParamsAddresses](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddresses) - [MsgAddCodeUploadParamsAddressesResponse](#cosmwasm.wasm.v1.MsgAddCodeUploadParamsAddressesResponse) - [MsgClearAdmin](#cosmwasm.wasm.v1.MsgClearAdmin) @@ -625,6 +639,316 @@ MsgIBCSendResponse + + + + + + + + + + + +

Top

+ +## cosmwasm/wasm/v1/proposal_legacy.proto + + + + + +### AccessConfigUpdate +AccessConfigUpdate contains the code id and the access config to be +applied. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code to be updated | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission to apply to the set of code ids | + + + + + + + + +### ClearAdminProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit ClearAdminProposal. To clear the admin of a contract, +a simple MsgClearAdmin can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `contract` | [string](#string) | | Contract is the address of the smart contract | + + + + + + + + +### ExecuteContractProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit ExecuteContractProposal. To call execute on a contract, +a simple MsgExecuteContract can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as execute | +| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | + + + + + + + + +### InstantiateContract2Proposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit InstantiateContract2Proposal. To instantiate contract 2, +a simple MsgInstantiateContract2 can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's enviroment as sender | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `label` | [string](#string) | | Label is optional metadata to be stored with a constract instance. | +| `msg` | [bytes](#bytes) | | Msg json encode message to be passed to the contract on instantiation | +| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | +| `salt` | [bytes](#bytes) | | Salt is an arbitrary value provided by the sender. Size can be 1 to 64. | +| `fix_msg` | [bool](#bool) | | FixMsg include the msg value into the hash for the predictable address. Default is false | + + + + + + + + +### InstantiateContractProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit InstantiateContractProposal. To instantiate a contract, +a simple MsgInstantiateContract can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code | +| `label` | [string](#string) | | Label is optional metadata to be stored with a constract instance. | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on instantiation | +| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | + + + + + + + + +### MigrateContractProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit MigrateContractProposal. To migrate a contract, +a simple MsgMigrateContract can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text + +Note: skipping 3 as this was previously used for unneeded run_as | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `code_id` | [uint64](#uint64) | | CodeID references the new WASM code | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on migration | + + + + + + + + +### PinCodesProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +cache, a simple MsgPinCodes can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the new WASM codes | + + + + + + + + +### StoreAndInstantiateContractProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit StoreAndInstantiateContractProposal. To store and instantiate +the contract, a simple MsgStoreAndInstantiateContract can be invoked from +the x/gov module via a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional | +| `unpin_code` | [bool](#bool) | | UnpinCode code on upload, optional | +| `admin` | [string](#string) | | Admin is an optional address that can execute migrations | +| `label` | [string](#string) | | Label is optional metadata to be stored with a constract instance. | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract on instantiation | +| `funds` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Funds coins that are transferred to the contract on instantiation | +| `source` | [string](#string) | | Source is the URL where the code is hosted | +| `builder` | [string](#string) | | Builder is the docker image used to build the code deterministically, used for smart contract verification | +| `code_hash` | [bytes](#bytes) | | CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification | + + + + + + + + +### StoreCodeProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit StoreCodeProposal. To submit WASM code to the system, +a simple MsgStoreCode can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `run_as` | [string](#string) | | RunAs is the address that is passed to the contract's environment as sender | +| `wasm_byte_code` | [bytes](#bytes) | | WASMByteCode can be raw or gzip compressed | +| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission to apply on contract creation, optional | +| `unpin_code` | [bool](#bool) | | UnpinCode code on upload, optional | +| `source` | [string](#string) | | Source is the URL where the code is hosted | +| `builder` | [string](#string) | | Builder is the docker image used to build the code deterministically, used for smart contract verification | +| `code_hash` | [bytes](#bytes) | | CodeHash is the SHA256 sum of the code outputted by builder, used for smart contract verification | + + + + + + + + +### SudoContractProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit SudoContractProposal. To call sudo on a contract, +a simple MsgSudoContract can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `contract` | [string](#string) | | Contract is the address of the smart contract | +| `msg` | [bytes](#bytes) | | Msg json encoded message to be passed to the contract as sudo | + + + + + + + + +### UnpinCodesProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `code_ids` | [uint64](#uint64) | repeated | CodeIDs references the WASM codes | + + + + + + + + +### UpdateAdminProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit UpdateAdminProposal. To set an admin for a contract, +a simple MsgUpdateAdmin can be invoked from the x/gov module via +a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `new_admin` | [string](#string) | | NewAdmin address to be set | +| `contract` | [string](#string) | | Contract is the address of the smart contract | + + + + + + + + +### UpdateInstantiateConfigProposal +Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +an explicit UpdateInstantiateConfigProposal. To update instantiate config +to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +the x/gov module via a v1 governance proposal. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `title` | [string](#string) | | Title is a short summary | +| `description` | [string](#string) | | Description is a human readable text | +| `access_config_updates` | [AccessConfigUpdate](#cosmwasm.wasm.v1.AccessConfigUpdate) | repeated | AccessConfigUpdate contains the list of code ids and the access config to be applied. | + + + + + @@ -1051,23 +1375,6 @@ Query provides defines the gRPC querier service - - -### AccessConfigUpdate -AccessConfigUpdate contains the code id and the access config to be -applied. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `code_id` | [uint64](#uint64) | | CodeID is the reference to the stored WASM code to be updated | -| `instantiate_permission` | [AccessConfig](#cosmwasm.wasm.v1.AccessConfig) | | InstantiatePermission to apply to the set of code ids | - - - - - - ### MsgAddCodeUploadParamsAddresses diff --git a/go.mod b/go.mod index 5aeec89b07..b6982c9be1 100644 --- a/go.mod +++ b/go.mod @@ -3,63 +3,63 @@ module github.com/CosmWasm/wasmd go 1.21 require ( - github.com/CosmWasm/wasmvm v1.4.1 + github.com/CosmWasm/wasmvm v1.5.0 github.com/cosmos/cosmos-proto v1.0.0-beta.3 - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 + github.com/cosmos/cosmos-sdk v0.50.1 github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 - github.com/cosmos/iavl v1.0.0-rc.1 + github.com/cosmos/iavl v1.0.0 github.com/cosmos/ics23/go v0.10.0 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/golang/protobuf v1.5.3 github.com/google/gofuzz v1.2.0 - github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/mux v1.8.1 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.17.0 github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa github.com/spf13/cast v1.5.1 - github.com/spf13/cobra v1.7.0 + github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d - google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb // indirect - google.golang.org/grpc v1.58.2 + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/grpc v1.59.0 gopkg.in/yaml.v2 v2.4.0 ) require ( - cosmossdk.io/api v0.7.1 - cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 + cosmossdk.io/api v0.7.2 + cosmossdk.io/client/v2 v2.0.0-beta.1 cosmossdk.io/collections v0.4.0 cosmossdk.io/core v0.11.0 cosmossdk.io/errors v1.0.0 cosmossdk.io/log v1.2.1 - cosmossdk.io/math v1.1.3-rc.1 - cosmossdk.io/store v1.0.0-rc.0 - cosmossdk.io/tools/confix v0.0.0-20230818115413-c402c51a1508 - cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508 - cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508 - cosmossdk.io/x/feegrant v0.0.0-20230818115413-c402c51a1508 - cosmossdk.io/x/nft v0.0.0-20230630152705-9f4a4e416f85 - cosmossdk.io/x/tx v0.10.0 - cosmossdk.io/x/upgrade v0.0.0-20230915171831-2196edacb99d + cosmossdk.io/math v1.2.0 + cosmossdk.io/store v1.0.0 + cosmossdk.io/tools/confix v0.1.0 + cosmossdk.io/x/circuit v0.1.0 + cosmossdk.io/x/evidence v0.1.0 + cosmossdk.io/x/feegrant v0.1.0 + cosmossdk.io/x/nft v0.1.0 + cosmossdk.io/x/tx v0.12.0 + cosmossdk.io/x/upgrade v0.1.0 github.com/cometbft/cometbft v0.38.0 github.com/cosmos/cosmos-db v1.0.0 - github.com/cosmos/ibc-go/modules/capability v1.0.0-rc6 - github.com/cosmos/ibc-go/v8 v8.0.0-beta.1 + github.com/cosmos/ibc-go/modules/capability v1.0.0 + github.com/cosmos/ibc-go/v8 v8.0.0 github.com/distribution/reference v0.5.0 github.com/gogo/protobuf v1.3.2 github.com/rs/zerolog v1.31.0 github.com/spf13/viper v1.17.0 - google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a ) require ( - cloud.google.com/go v0.110.7 // indirect - cloud.google.com/go/compute v1.23.0 // indirect + cloud.google.com/go v0.110.8 // indirect + cloud.google.com/go/compute v1.23.1 // indirect cloud.google.com/go/compute/metadata v0.2.3 // indirect - cloud.google.com/go/iam v1.1.1 // indirect + cloud.google.com/go/iam v1.1.3 // indirect cloud.google.com/go/storage v1.30.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect filippo.io/edwards25519 v1.0.0 // indirect @@ -79,13 +79,13 @@ require ( github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 // indirect + github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.8.0 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/creachadair/atomicfile v0.3.1 // indirect github.com/creachadair/tomledit v0.0.24 // indirect github.com/danieljoos/wincred v1.1.2 // indirect @@ -96,11 +96,11 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/dot v1.5.0 // indirect + github.com/emicklei/dot v1.6.0 // indirect github.com/fatih/color v1.15.0 // indirect - github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/getsentry/sentry-go v0.25.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect @@ -108,18 +108,18 @@ require ( github.com/gobwas/pool v0.2.1 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.1.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/google/s2a-go v0.1.7 // indirect github.com/google/uuid v1.3.1 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.1 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect @@ -128,7 +128,7 @@ require ( github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect @@ -141,32 +141,31 @@ require ( github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.17.0 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.4 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/onsi/ginkgo v1.16.4 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect - github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect @@ -177,38 +176,38 @@ require ( github.com/spf13/afero v1.10.0 // indirect github.com/subosito/gotenv v1.6.0 // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect go.opencensus.io v0.24.0 // indirect - go.uber.org/multierr v1.10.0 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.15.0 // indirect + go.uber.org/multierr v1.11.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/oauth2 v0.12.0 // indirect - golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sync v0.5.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect google.golang.org/api v0.143.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect - sigs.k8s.io/yaml v1.3.0 // indirect + sigs.k8s.io/yaml v1.4.0 // indirect ) replace ( github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0 - // go list -m -json github.com/oraichain/wasmvm@main | jq '.|"\(.Path) \(.Version)"' -r - github.com/CosmWasm/wasmvm => github.com/oraichain/wasmvm v1.1.4-0.20231016035742-9fd1ab8cfa2f + // go list -m -json github.com/oraichain/wasmvm@d3fcf3c | jq '.Version' -r + github.com/CosmWasm/wasmvm => github.com/oraichain/wasmvm v1.1.4-0.20231122084957-d3fcf3c1b7af // dgrijalva/jwt-go is deprecated and doesn't receive security updates. // See: https://github.com/cosmos/cosmos-sdk/issues/13134 github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2 @@ -228,5 +227,11 @@ replace ( github.com/tendermint/tendermint => github.com/informalsystems/tendermint v0.34.26 ) -// see https://github.com/CosmWasm/wasmd/issues/1651 -retract v0.42.0 +retract ( + // see https://github.com/CosmWasm/wasmd/issues/1713 + v0.44.0 + // see https://github.com/CosmWasm/wasmd/issues/1713 + v0.43.0 + // see https://github.com/CosmWasm/wasmd/issues/1651 + v0.42.0 +) diff --git a/go.sum b/go.sum index 3e0a265b48..05d8c45ab8 100644 --- a/go.sum +++ b/go.sum @@ -32,8 +32,8 @@ cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w9 cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.102.1/go.mod h1:XZ77E9qnTEnrgEOvr4xzfdX5TRo7fB4T2F4O6+34hIU= cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= -cloud.google.com/go v0.110.7 h1:rJyC7nWRg2jWGZ4wSJ5nY65GTdYJkg0cd/uXb+ACI6o= -cloud.google.com/go v0.110.7/go.mod h1:+EYjdK8e5RME/VY/qLCAtuyALQ9q67dvuum8i+H5xsI= +cloud.google.com/go v0.110.8 h1:tyNdfIxjzaWctIiLYOTalaLKZ17SI44SKFW26QbOhME= +cloud.google.com/go v0.110.8/go.mod h1:Iz8AkXJf1qmxC3Oxoep8R1T36w8B92yU29PcBhHO5fk= cloud.google.com/go/aiplatform v1.22.0/go.mod h1:ig5Nct50bZlzV6NvKaTwmplLLddFx0YReh9WfTO5jKw= cloud.google.com/go/aiplatform v1.24.0/go.mod h1:67UUvRBKG6GTayHKV8DBv2RtR1t93YRu5B1P3x99mYY= cloud.google.com/go/analytics v0.11.0/go.mod h1:DjEWCu41bVbYcKyvlws9Er60YE4a//bK6mnhWvQeFNI= @@ -70,8 +70,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= +cloud.google.com/go/compute v1.23.1 h1:V97tBoDaZHb6leicZ1G6DLK2BAaZLJ/7+9BB/En3hR0= +cloud.google.com/go/compute v1.23.1/go.mod h1:CqB3xpmPKKt3OJpW2ndFIXnA9A4xAy/F3Xp1ixncW78= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= @@ -111,8 +111,8 @@ cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y97 cloud.google.com/go/grafeas v0.2.0/go.mod h1:KhxgtF2hb0P191HlY5besjYm6MqTSTj3LSI+M+ByZHc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/iam v0.5.0/go.mod h1:wPU9Vt0P4UmCux7mqtRu6jcpPAb74cP1fh50J3QpkUc= -cloud.google.com/go/iam v1.1.1 h1:lW7fzj15aVIXYHREOqjRBV9PsH0Z6u8Y46a1YGvQP4Y= -cloud.google.com/go/iam v1.1.1/go.mod h1:A5avdyVL2tCppe4unb0951eI9jreack+RJ0/d+KUZOU= +cloud.google.com/go/iam v1.1.3 h1:18tKG7DzydKWUnLjonWcJO6wjSCAtzh4GcRKlH/Hrzc= +cloud.google.com/go/iam v1.1.3/go.mod h1:3khUlaBXfPKKe7huYgEpDn6FtgRyMEqbkvBxrQyY5SE= cloud.google.com/go/language v1.4.0/go.mod h1:F9dRpNFQmJbkaop6g0JhSBXCNlO90e1KWx5iDdxbWic= cloud.google.com/go/language v1.6.0/go.mod h1:6dJ8t3B+lUYfStgls25GusK04NLh3eDLQnWM3mdEbhI= cloud.google.com/go/lifesciences v0.5.0/go.mod h1:3oIKy8ycWGPUyZDR/8RNnTOYevhaMLqh5vLUXs9zvT8= @@ -187,10 +187,10 @@ cloud.google.com/go/webrisk v1.4.0/go.mod h1:Hn8X6Zr+ziE2aNd8SliSDWpEnSS1u4R9+xX cloud.google.com/go/webrisk v1.5.0/go.mod h1:iPG6fr52Tv7sGk0H6qUFzmL3HHZev1htXuWDEEsqMTg= cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1Vwf+KmJENM0= cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= -cosmossdk.io/api v0.7.1 h1:PNQ1xN8+/0hj/sSD0ANqjkgfXFys+bZ5L8Hg7uzoUTU= -cosmossdk.io/api v0.7.1/go.mod h1:ure9edhcROIHsngavM6mBLilMGFnfjhV/AaYhEMUkdo= -cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508 h1:tt5OMwdouv7dkwkWJYxb8I9h322bOxnC9RmK2qGvWMs= -cosmossdk.io/client/v2 v2.0.0-20230818115413-c402c51a1508/go.mod h1:iHeSk2AT6O8RNGlfcEQq6Yty6Z/6gydQsXXBh5I715Q= +cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= +cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= +cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q= +cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= @@ -201,24 +201,24 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= -cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/store v1.0.0-rc.0 h1:9DwOjuUYxDtYxn/REkTxGQAmxlIGfRroB35MQ8TrxF4= -cosmossdk.io/store v1.0.0-rc.0/go.mod h1:FtBDOJmwtOZfmKKF65bKZbTYgS3bDNjjo3nP76dAegk= -cosmossdk.io/tools/confix v0.0.0-20230818115413-c402c51a1508 h1:axKhxRa3M9QW2GdKJUsSyzo44gxcwSOTGeomtkbQClM= -cosmossdk.io/tools/confix v0.0.0-20230818115413-c402c51a1508/go.mod h1:qcJ1zwLIMefpDHZuYSa73yBe/k5HyQ5H1Jg9PWv30Ts= -cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508 h1:9HRBpMbGgk+W4BIp4ezYH2EjbpuVl2fBlwyJ2GZgrS0= -cosmossdk.io/x/circuit v0.0.0-20230818115413-c402c51a1508/go.mod h1:BhFX0kD6lkctNQO3ZGYY3p6h0/wPLVbFhrOt3uQxEIM= -cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508 h1:R9H1lDpcPSkrLOnt6IDE38o0Wp8xE/+BAxocb0oyX4I= -cosmossdk.io/x/evidence v0.0.0-20230818115413-c402c51a1508/go.mod h1:yjIo3J0QKDo9CJawK1QoTA1hBx0llafVJdPqI0+ry74= -cosmossdk.io/x/feegrant v0.0.0-20230818115413-c402c51a1508 h1:TKqjhhTfLchU8nSo1WZRgaH7xZWzYUQXVRj9CePcbaw= -cosmossdk.io/x/feegrant v0.0.0-20230818115413-c402c51a1508/go.mod h1:kOr8Rr10RoMeGGk/pfW5yo1R7GQTGu4KdRgKphVvjz4= -cosmossdk.io/x/nft v0.0.0-20230630152705-9f4a4e416f85 h1:fk1yplfM4UUTQmBJOb6cwk09ssRwaBbLR4rsfuBEhBg= -cosmossdk.io/x/nft v0.0.0-20230630152705-9f4a4e416f85/go.mod h1:arLtdZiIFmnqTNWSk2tFtSodGDKTmr+Q0fGmF5wpn2c= -cosmossdk.io/x/tx v0.10.0 h1:LxWF/hksVDbeQmFj4voLM5ZCHyVZ1cCNIqKenfH9plc= -cosmossdk.io/x/tx v0.10.0/go.mod h1:MKo9/b5wsoL8dd9y9pvD2yOP1CMvzHIWYxi1l2oLPFo= -cosmossdk.io/x/upgrade v0.0.0-20230915171831-2196edacb99d h1:LH8NPa2+yoMFdCTxCFyQUX5zVDip4YDgtg7e0EecDqo= -cosmossdk.io/x/upgrade v0.0.0-20230915171831-2196edacb99d/go.mod h1:+5jCm6Lk/CrQhQvtJFy/tmuLfhQKNMn/U0vwrRz/dxQ= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= +cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= +cosmossdk.io/tools/confix v0.1.0 h1:2OOZTtQsDT5e7P3FM5xqM0bPfluAxZlAwxqaDmYBE+E= +cosmossdk.io/tools/confix v0.1.0/go.mod h1:TdXKVYs4gEayav5wM+JHT+kTU2J7fozFNqoVaN+8CdY= +cosmossdk.io/x/circuit v0.1.0 h1:IAej8aRYeuOMritczqTlljbUVHq1E85CpBqaCTwYgXs= +cosmossdk.io/x/circuit v0.1.0/go.mod h1:YDzblVE8+E+urPYQq5kq5foRY/IzhXovSYXb4nwd39w= +cosmossdk.io/x/evidence v0.1.0 h1:J6OEyDl1rbykksdGynzPKG5R/zm6TacwW2fbLTW4nCk= +cosmossdk.io/x/evidence v0.1.0/go.mod h1:hTaiiXsoiJ3InMz1uptgF0BnGqROllAN8mwisOMMsfw= +cosmossdk.io/x/feegrant v0.1.0 h1:c7s3oAq/8/UO0EiN1H5BIjwVntujVTkYs35YPvvrdQk= +cosmossdk.io/x/feegrant v0.1.0/go.mod h1:4r+FsViJRpcZif/yhTn+E0E6OFfg4n0Lx+6cCtnZElU= +cosmossdk.io/x/nft v0.1.0 h1:VhcsFiEK33ODN27kxKLa0r/CeFd8laBfbDBwYqCyYCM= +cosmossdk.io/x/nft v0.1.0/go.mod h1:ec4j4QAO4mJZ+45jeYRnW7awLHby1JZANqe1hNZ4S3g= +cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= +cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= +cosmossdk.io/x/upgrade v0.1.0 h1:z1ZZG4UL9ICTNbJDYZ6jOnF9GdEK9wyoEFi4BUScHXE= +cosmossdk.io/x/upgrade v0.1.0/go.mod h1:/6jjNGbiPCNtmA1N+rBtP601sr0g4ZXuj3yC6ClPCGY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -328,8 +328,8 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 h1:M4A5LioEhkZ/s+m0g0pWgiLBQr83p0jWnQUo320Qy+A= -github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA= +github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb h1:6Po+YYKT5B5ZXN0wd2rwFBaebM0LufPf8p4zxOd48Kg= +github.com/cockroachdb/pebble v0.0.0-20231102162011-844f0582c2eb/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -353,8 +353,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.1 h1:2SYwAYqd7ZwtrWxu/J8PwbQV/cDcu90bCr/a78g3lVw= +github.com/cosmos/cosmos-sdk v0.50.1/go.mod h1:fsLSPGstCwn6MMsFDMAQWGJj8E4sYsN9Gnu1bGE5imA= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -362,21 +362,21 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0-rc.1 h1:5+73BEWW1gZOIUJKlk/1fpD4lOqqeFBA8KuV+NpkCpU= -github.com/cosmos/iavl v1.0.0-rc.1/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= -github.com/cosmos/ibc-go/modules/capability v1.0.0-rc6 h1:K3lWRr/WJkPdSWErxhQL1x0CTnJyONHwJSyaTefGDf0= -github.com/cosmos/ibc-go/modules/capability v1.0.0-rc6/go.mod h1:DBP9jg+NoXU2buK5QDyf87lMjcQYN8qFlByNeNJmuhs= -github.com/cosmos/ibc-go/v8 v8.0.0-beta.1 h1:vCateGEI1nl955HxLu/Nh+d8dYkribGjcrlQqWjjVnI= -github.com/cosmos/ibc-go/v8 v8.0.0-beta.1/go.mod h1:1bpsE9mtwEbSRmCCo0VsIGe64JY2sXSxeNv8Be1nPxQ= +github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= +github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/ibc-go/modules/capability v1.0.0 h1:r/l++byFtn7jHYa09zlAdSeevo8ci1mVZNO9+V0xsLE= +github.com/cosmos/ibc-go/modules/capability v1.0.0/go.mod h1:D81ZxzjZAe0ZO5ambnvn1qedsFQ8lOwtqicG6liLBco= +github.com/cosmos/ibc-go/v8 v8.0.0 h1:QKipnr/NGwc+9L7NZipURvmSIu+nw9jOIWTJuDBqOhg= +github.com/cosmos/ibc-go/v8 v8.0.0/go.mod h1:C6IiJom0F3cIQCD5fKwVPDrDK9j/xTu563AWuOmXois= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/atomicfile v0.3.1 h1:yQORkHjSYySh/tv5th1dkKcn02NEW5JleB84sjt+W4Q= github.com/creachadair/atomicfile v0.3.1/go.mod h1:mwfrkRxFKwpNAflYZzytbSwxvbK6fdGRRlp0KEQc0qU= github.com/creachadair/tomledit v0.0.24 h1:5Xjr25R2esu1rKCbQEmjZYlrhFkDspoAbAKb6QKQDhQ= @@ -419,8 +419,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.5.0 h1:tc9eKdCBTgoR68vJ6OcgMtI0SdrGDwLPPVaPA6XhX50= -github.com/emicklei/dot v1.5.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= +github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -436,9 +436,8 @@ github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5Kwzbycv github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= -github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= -github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= +github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= @@ -449,8 +448,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= +github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -484,7 +483,6 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo= github.com/gobwas/httphead v0.1.0 h1:exrUm0f4YX0L7EBwZHuCF4GDp8aJfVeBrlLQrs6NqWU= github.com/gobwas/httphead v0.1.0/go.mod h1:O/RXo79gxV8G+RqlR/otEwx4Q36zl9rqC5u12GKvMCM= @@ -505,8 +503,8 @@ github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0 github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -565,8 +563,9 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -623,12 +622,12 @@ github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+ github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= -github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= +github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyEE= +github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= -github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= +github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= +github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -661,8 +660,8 @@ github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/H github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-safetemp v1.0.0 h1:2HR189eFNrjHQyENnQMMpCiBAsRxzbTMIgBhEyExpmo= @@ -707,8 +706,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.15.2 h1:7YppbATX94jEt9KLAc5hICx4h6Yt3SaavhQRsIUEHP0= -github.com/jhump/protoreflect v1.15.2/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -736,8 +735,8 @@ github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYs github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/compress v1.15.11/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM= -github.com/klauspost/compress v1.17.0 h1:Rnbp4K9EjcDuVuHtd0dgA4qNuv9yKDYKK1ulpJwgrqM= -github.com/klauspost/compress v1.17.0/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -759,8 +758,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.4 h1:ZMsBpPpJNtRLHiKKp0mI7gW+NT4s7UgfD5xHxx1jVRo= +github.com/linxGnu/grocksdb v1.8.4/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -777,13 +776,14 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -824,8 +824,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -857,8 +857,8 @@ github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxS github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= -github.com/oraichain/wasmvm v1.1.4-0.20231016035742-9fd1ab8cfa2f h1:g40qEbFoCqIL5LoDoRd5fHjGpa1ShaCWgCs0MBNgFNo= -github.com/oraichain/wasmvm v1.1.4-0.20231016035742-9fd1ab8cfa2f/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= +github.com/oraichain/wasmvm v1.1.4-0.20231122084957-d3fcf3c1b7af h1:dHABEIU/63NoNrUVP7ugEulLW+WHSuznYcyDcomQTrs= +github.com/oraichain/wasmvm v1.1.4-0.20231122084957-d3fcf3c1b7af/go.mod h1:fXB+m2gyh4v9839zlIXdMZGeLAxqUdYdFQqYsTha2hc= github.com/ory/dockertest v3.3.5+incompatible h1:iLLK6SQwIhcbrG783Dghaaa3WPzGc+4Emza6EbVUUGA= github.com/ory/dockertest v3.3.5+incompatible/go.mod h1:1vX4m9wsvi00u5bseYwXaSnhNrne+V0E6LAcBILJdPs= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= @@ -872,8 +872,8 @@ github.com/pelletier/go-toml/v2 v2.1.0 h1:FnwAJ4oYMvbT/34k9zzHuZNrhlz48GB3/s6at6 github.com/pelletier/go-toml/v2 v2.1.0/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -903,24 +903,24 @@ github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1: github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16 h1:v7DLqVdK4VrYkVD5diGdl4sxJurKJEMnODWRJlxV9oM= -github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -978,8 +978,8 @@ github.com/spf13/cast v1.5.1 h1:R+kOtfhWQE6TVQzY+4D7wJLBgkdVasCEFxSUBYBYIlA= github.com/spf13/cast v1.5.1/go.mod h1:b9PdjNptOpzXr7Rq1q9gJML/2cdGQAo69NKzQ10KN48= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= -github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= +github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= +github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= @@ -1014,15 +1014,16 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.2.7 h1:qYhyWUUd6WbiM+C6JZAUkIJt/1WrjzNHY9+KCIjVqTo= github.com/ugorji/go v1.2.7/go.mod h1:nF9osbDWLy6bDVv/Rtoh6QgnvNDpmCalQV5urGCCS6M= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= +github.com/ugorji/go/codec v1.2.11 h1:BMaWp1Bb6fHwEtbplGBGJ498wD+LKlNSl25MjdZY4dU= +github.com/ugorji/go/codec v1.2.11/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= @@ -1036,10 +1037,10 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= @@ -1064,8 +1065,8 @@ go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1084,8 +1085,8 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1097,8 +1098,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g= -golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1125,8 +1126,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1188,8 +1189,8 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1231,8 +1232,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E= -golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE= +golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1287,7 +1288,6 @@ golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1333,13 +1333,14 @@ golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1407,7 +1408,6 @@ golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82u golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= @@ -1418,8 +1418,8 @@ golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ= -golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1598,12 +1598,12 @@ google.golang.org/genproto v0.0.0-20221010155953-15ba04fc1c0e/go.mod h1:3526vdqw google.golang.org/genproto v0.0.0-20221014173430-6e2ab493f96b/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz9N9Jx0QA82PqRVauvCz1SGSz739p0f183jM= google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb h1:XFBgcDwm7irdHTbz4Zk2h7Mh+eis4nfJEFQFYzJzuIA= -google.golang.org/genproto v0.0.0-20230913181813-007df8e322eb/go.mod h1:yZTlhN0tQnXo3h00fuXNCxJdLdIdnVFVBaRJ5LWBbw4= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb h1:lK0oleSc7IQsUxO3U5TjL9DWlsxpEBemh+zpB7IqhWI= -google.golang.org/genproto/googleapis/api v0.0.0-20230913181813-007df8e322eb/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13 h1:N3bU/SQDCDyD6R528GJ/PwW9KjYcJA3dgyH+MovAkIM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230920204549-e6e6cdab5c13/go.mod h1:KSqppvjFjtoCI+KGd4PELB0qLNxdJHRGqRI09mB6pQA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1645,8 +1645,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= -google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1697,8 +1697,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1715,6 +1715,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= -sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo= -sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= +sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= +sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/proto/cosmwasm/wasm/v1/proposal_legacy.proto b/proto/cosmwasm/wasm/v1/proposal_legacy.proto new file mode 100644 index 0000000000..8bb872e2a8 --- /dev/null +++ b/proto/cosmwasm/wasm/v1/proposal_legacy.proto @@ -0,0 +1,333 @@ +syntax = "proto3"; +package cosmwasm.wasm.v1; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "cosmwasm/wasm/v1/types.proto"; +import "amino/amino.proto"; + +option go_package = "github.com/CosmWasm/wasmd/x/wasm/types"; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_getters_all) = false; +option (gogoproto.equal_all) = true; + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreCodeProposal. To submit WASM code to the system, +// a simple MsgStoreCode can be invoked from the x/gov module via +// a v1 governance proposal. +message StoreCodeProposal { + option deprecated = true; + option (amino.name) = "wasm/StoreCodeProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's environment as sender + string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; + // Used in v1beta1 + reserved 5, 6; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 7; + // UnpinCode code on upload, optional + bool unpin_code = 8; + // Source is the URL where the code is hosted + string source = 9; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 10; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 11; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContractProposal. To instantiate a contract, +// a simple MsgInstantiateContract can be invoked from the x/gov module via +// a v1 governance proposal. +message InstantiateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/InstantiateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's environment as sender + string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Admin is an optional address that can execute migrations + string admin = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeID is the reference to the stored WASM code + uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; + // Label is optional metadata to be stored with a constract instance. + string label = 6; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 8 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContract2Proposal. To instantiate contract 2, +// a simple MsgInstantiateContract2 can be invoked from the x/gov module via +// a v1 governance proposal. +message InstantiateContract2Proposal { + option deprecated = true; + option (amino.name) = "wasm/InstantiateContract2Proposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's enviroment as sender + string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Admin is an optional address that can execute migrations + string admin = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeID is the reference to the stored WASM code + uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; + // Label is optional metadata to be stored with a constract instance. + string label = 6; + // Msg json encode message to be passed to the contract on instantiation + bytes msg = 7 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 8 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + bytes salt = 9; + // FixMsg include the msg value into the hash for the predictable address. + // Default is false + bool fix_msg = 10; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit MigrateContractProposal. To migrate a contract, +// a simple MsgMigrateContract can be invoked from the x/gov module via +// a v1 governance proposal. +message MigrateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/MigrateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // Note: skipping 3 as this was previously used for unneeded run_as + + // Contract is the address of the smart contract + string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // CodeID references the new WASM code + uint64 code_id = 5 [ (gogoproto.customname) = "CodeID" ]; + // Msg json encoded message to be passed to the contract on migration + bytes msg = 6 [ (gogoproto.casttype) = "RawContractMessage" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit SudoContractProposal. To call sudo on a contract, +// a simple MsgSudoContract can be invoked from the x/gov module via +// a v1 governance proposal. +message SudoContractProposal { + option deprecated = true; + option (amino.name) = "wasm/SudoContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // Contract is the address of the smart contract + string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Msg json encoded message to be passed to the contract as sudo + bytes msg = 4 [ (gogoproto.casttype) = "RawContractMessage" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ExecuteContractProposal. To call execute on a contract, +// a simple MsgExecuteContract can be invoked from the x/gov module via +// a v1 governance proposal. +message ExecuteContractProposal { + option deprecated = true; + option (amino.name) = "wasm/ExecuteContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's environment as sender + string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Contract is the address of the smart contract + string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // Msg json encoded message to be passed to the contract as execute + bytes msg = 5 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 6 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateAdminProposal. To set an admin for a contract, +// a simple MsgUpdateAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +message UpdateAdminProposal { + option deprecated = true; + option (amino.name) = "wasm/UpdateAdminProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // NewAdmin address to be set + string new_admin = 3 [ + (gogoproto.moretags) = "yaml:\"new_admin\"", + (cosmos_proto.scalar) = "cosmos.AddressString" + ]; + // Contract is the address of the smart contract + string contract = 4 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ClearAdminProposal. To clear the admin of a contract, +// a simple MsgClearAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +message ClearAdminProposal { + option deprecated = true; + option (amino.name) = "wasm/ClearAdminProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // Contract is the address of the smart contract + string contract = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +// cache, a simple MsgPinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +message PinCodesProposal { + option deprecated = true; + option (amino.name) = "wasm/PinCodesProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // CodeIDs references the new WASM codes + repeated uint64 code_ids = 3 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +message UnpinCodesProposal { + option deprecated = true; + option (amino.name) = "wasm/UnpinCodesProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // CodeIDs references the WASM codes + repeated uint64 code_ids = 3 [ + (gogoproto.customname) = "CodeIDs", + (gogoproto.moretags) = "yaml:\"code_ids\"" + ]; +} + +// AccessConfigUpdate contains the code id and the access config to be +// applied. +message AccessConfigUpdate { + // CodeID is the reference to the stored WASM code to be updated + uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; + // InstantiatePermission to apply to the set of code ids + AccessConfig instantiate_permission = 2 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateInstantiateConfigProposal. To update instantiate config +// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +// the x/gov module via a v1 governance proposal. +message UpdateInstantiateConfigProposal { + option deprecated = true; + option (amino.name) = "wasm/UpdateInstantiateConfigProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1 [ (gogoproto.moretags) = "yaml:\"title\"" ]; + // Description is a human readable text + string description = 2 [ (gogoproto.moretags) = "yaml:\"description\"" ]; + // AccessConfigUpdate contains the list of code ids and the access config + // to be applied. + repeated AccessConfigUpdate access_config_updates = 3 + [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; +} + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreAndInstantiateContractProposal. To store and instantiate +// the contract, a simple MsgStoreAndInstantiateContract can be invoked from +// the x/gov module via a v1 governance proposal. +message StoreAndInstantiateContractProposal { + option deprecated = true; + option (amino.name) = "wasm/StoreAndInstantiateContractProposal"; + option (cosmos_proto.implements_interface) = "cosmos.gov.v1beta1.Content"; + + // Title is a short summary + string title = 1; + // Description is a human readable text + string description = 2; + // RunAs is the address that is passed to the contract's environment as sender + string run_as = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; + // WASMByteCode can be raw or gzip compressed + bytes wasm_byte_code = 4 [ (gogoproto.customname) = "WASMByteCode" ]; + // InstantiatePermission to apply on contract creation, optional + AccessConfig instantiate_permission = 5; + // UnpinCode code on upload, optional + bool unpin_code = 6; + // Admin is an optional address that can execute migrations + string admin = 7; + // Label is optional metadata to be stored with a constract instance. + string label = 8; + // Msg json encoded message to be passed to the contract on instantiation + bytes msg = 9 [ (gogoproto.casttype) = "RawContractMessage" ]; + // Funds coins that are transferred to the contract on instantiation + repeated cosmos.base.v1beta1.Coin funds = 10 [ + (gogoproto.nullable) = false, + (amino.dont_omitempty) = true, + (gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins" + ]; + // Source is the URL where the code is hosted + string source = 11; + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + string builder = 12; + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + bytes code_hash = 13; +} diff --git a/proto/cosmwasm/wasm/v1/tx.proto b/proto/cosmwasm/wasm/v1/tx.proto index 887f3ccfb4..199ca37640 100644 --- a/proto/cosmwasm/wasm/v1/tx.proto +++ b/proto/cosmwasm/wasm/v1/tx.proto @@ -254,16 +254,6 @@ message MsgClearAdmin { // MsgClearAdminResponse returns empty data message MsgClearAdminResponse {} -// AccessConfigUpdate contains the code id and the access config to be -// applied. -message AccessConfigUpdate { - // CodeID is the reference to the stored WASM code to be updated - uint64 code_id = 1 [ (gogoproto.customname) = "CodeID" ]; - // InstantiatePermission to apply to the set of code ids - AccessConfig instantiate_permission = 2 - [ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; -} - // MsgUpdateInstantiateConfig updates instantiate config for a smart contract message MsgUpdateInstantiateConfig { option (amino.name) = "wasm/MsgUpdateInstantiateConfig"; diff --git a/tests/e2e/reflect_helper.go b/tests/e2e/reflect_helper.go index 2d8a4c4d79..a925dcc414 100644 --- a/tests/e2e/reflect_helper.go +++ b/tests/e2e/reflect_helper.go @@ -42,7 +42,7 @@ func MustExecViaStargateReflectContract[T sdkMessageType](t *testing.T, chain *i bz, err := chain.Codec.Marshal(m) require.NoError(t, err) vmMsgs[i] = wasmvmtypes.CosmosMsg{ - Stargate: &wasmvmtypes.StargateMsg{ + Any: &wasmvmtypes.AnyMsg{ TypeURL: sdk.MsgTypeURL(m), Value: bz, }, diff --git a/tests/system/go.mod b/tests/system/go.mod index 7d921f181d..524615485d 100644 --- a/tests/system/go.mod +++ b/tests/system/go.mod @@ -4,43 +4,43 @@ go 1.21 require ( github.com/cosmos/cosmos-proto v1.0.0-beta.3 // indirect - github.com/cosmos/cosmos-sdk v0.50.0-rc.1 + github.com/cosmos/cosmos-sdk v0.50.1 github.com/cosmos/gogogateway v1.2.0 // indirect github.com/cosmos/gogoproto v1.4.11 // indirect - github.com/cosmos/iavl v1.0.0-rc.1 // indirect + github.com/cosmos/iavl v1.0.0 // indirect github.com/dvsekhvalnov/jose2go v1.5.0 // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/gorilla/mux v1.8.0 // indirect github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect github.com/pkg/errors v0.9.1 // indirect - github.com/prometheus/client_golang v1.16.0 // indirect + github.com/prometheus/client_golang v1.17.0 // indirect github.com/spf13/cast v1.5.1 // indirect github.com/spf13/cobra v1.7.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.4 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect - google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 // indirect - google.golang.org/grpc v1.58.3 // indirect + google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b // indirect + google.golang.org/grpc v1.59.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect ) require ( - cosmossdk.io/math v1.1.3-rc.1 + cosmossdk.io/math v1.2.0 github.com/cometbft/cometbft v0.38.0 github.com/tidwall/gjson v1.14.2 github.com/tidwall/sjson v1.2.5 - golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 + golang.org/x/exp v0.0.0-20231006140011-7918f672742d ) require ( - cosmossdk.io/api v0.7.1 // indirect + cosmossdk.io/api v0.7.2 // indirect cosmossdk.io/collections v0.4.0 // indirect cosmossdk.io/core v0.11.0 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/errors v1.0.0 // indirect cosmossdk.io/log v1.2.1 // indirect - cosmossdk.io/store v1.0.0-rc.0 // indirect - cosmossdk.io/x/tx v0.10.0 // indirect + cosmossdk.io/store v1.0.0 // indirect + cosmossdk.io/x/tx v0.12.0 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect @@ -53,7 +53,7 @@ require ( github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cockroachdb/errors v1.11.1 // indirect github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect - github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 // indirect + github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.7.0 // indirect @@ -61,7 +61,7 @@ require ( github.com/cosmos/cosmos-db v1.0.0 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect - github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect + github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.1.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 // indirect @@ -70,21 +70,21 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect - github.com/emicklei/dot v1.5.0 // indirect + github.com/emicklei/dot v1.6.0 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.2 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect - github.com/getsentry/sentry-go v0.23.0 // indirect + github.com/getsentry/sentry-go v0.25.0 // indirect github.com/go-kit/kit v0.12.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/glog v1.1.0 // indirect + github.com/golang/glog v1.1.2 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/btree v1.1.2 // indirect - github.com/google/go-cmp v0.5.9 // indirect + github.com/google/go-cmp v0.6.0 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect @@ -93,7 +93,7 @@ require ( github.com/hashicorp/go-hclog v1.5.0 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-metrics v0.5.1 // indirect - github.com/hashicorp/go-plugin v1.4.10 // indirect + github.com/hashicorp/go-plugin v1.5.2 // indirect github.com/hashicorp/golang-lru v1.0.2 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/yamux v0.1.1 // indirect @@ -103,32 +103,32 @@ require ( github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect - github.com/klauspost/compress v1.16.7 // indirect + github.com/klauspost/compress v1.17.2 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.0 // indirect + github.com/linxGnu/grocksdb v1.8.4 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.19 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect + github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 // indirect + github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_model v0.4.0 // indirect - github.com/prometheus/common v0.44.0 // indirect - github.com/prometheus/procfs v0.11.1 // indirect + github.com/prometheus/client_model v0.5.0 // indirect + github.com/prometheus/common v0.45.0 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect - github.com/rs/zerolog v1.30.0 // indirect + github.com/rs/zerolog v1.31.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect github.com/spf13/afero v1.9.5 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect @@ -136,24 +136,24 @@ require ( github.com/subosito/gotenv v1.4.2 // indirect github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tendermint/go-amino v0.16.0 // indirect - github.com/tidwall/btree v1.6.0 // indirect + github.com/tidwall/btree v1.7.0 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect - github.com/zondax/hid v0.9.1 // indirect - github.com/zondax/ledger-go v0.14.1 // indirect + github.com/zondax/hid v0.9.2 // indirect + github.com/zondax/ledger-go v0.14.3 // indirect go.etcd.io/bbolt v1.3.7 // indirect - golang.org/x/crypto v0.13.0 // indirect - golang.org/x/net v0.15.0 // indirect + golang.org/x/crypto v0.14.0 // indirect + golang.org/x/net v0.17.0 // indirect golang.org/x/sync v0.3.0 // indirect - golang.org/x/sys v0.12.0 // indirect - golang.org/x/term v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect + golang.org/x/term v0.13.0 // indirect golang.org/x/text v0.13.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 // indirect google.golang.org/protobuf v1.31.0 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - gotest.tools/v3 v3.5.0 // indirect + gotest.tools/v3 v3.5.1 // indirect nhooyr.io/websocket v1.8.6 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.3.0 // indirect diff --git a/tests/system/go.sum b/tests/system/go.sum index e06ce05187..e3ba877de2 100644 --- a/tests/system/go.sum +++ b/tests/system/go.sum @@ -35,8 +35,8 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= -cosmossdk.io/api v0.7.1 h1:PNQ1xN8+/0hj/sSD0ANqjkgfXFys+bZ5L8Hg7uzoUTU= -cosmossdk.io/api v0.7.1/go.mod h1:ure9edhcROIHsngavM6mBLilMGFnfjhV/AaYhEMUkdo= +cosmossdk.io/api v0.7.2 h1:BO3i5fvKMKvfaUiMkCznxViuBEfyWA/k6w2eAF6q1C4= +cosmossdk.io/api v0.7.2/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38= cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s= cosmossdk.io/collections v0.4.0/go.mod h1:oa5lUING2dP+gdDquow+QjlF45eL1t4TJDypgGd+tv0= cosmossdk.io/core v0.11.0 h1:vtIafqUi+1ZNAE/oxLOQQ7Oek2n4S48SWLG8h/+wdbo= @@ -47,12 +47,12 @@ cosmossdk.io/errors v1.0.0 h1:nxF07lmlBbB8NKQhtJ+sJm6ef5uV1XkvPXG2bUntb04= cosmossdk.io/errors v1.0.0/go.mod h1:+hJZLuhdDE0pYN8HkOrVNwrIOYvUGnn6+4fjnJs/oV0= cosmossdk.io/log v1.2.1 h1:Xc1GgTCicniwmMiKwDxUjO4eLhPxoVdI9vtMW8Ti/uk= cosmossdk.io/log v1.2.1/go.mod h1:GNSCc/6+DhFIj1aLn/j7Id7PaO8DzNylUZoOYBL9+I4= -cosmossdk.io/math v1.1.3-rc.1 h1:NebCNWDqb1MJRNfvxr4YY7d8FSYgkuB3L75K6xvM+Zo= -cosmossdk.io/math v1.1.3-rc.1/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= -cosmossdk.io/store v1.0.0-rc.0 h1:9DwOjuUYxDtYxn/REkTxGQAmxlIGfRroB35MQ8TrxF4= -cosmossdk.io/store v1.0.0-rc.0/go.mod h1:FtBDOJmwtOZfmKKF65bKZbTYgS3bDNjjo3nP76dAegk= -cosmossdk.io/x/tx v0.10.0 h1:LxWF/hksVDbeQmFj4voLM5ZCHyVZ1cCNIqKenfH9plc= -cosmossdk.io/x/tx v0.10.0/go.mod h1:MKo9/b5wsoL8dd9y9pvD2yOP1CMvzHIWYxi1l2oLPFo= +cosmossdk.io/math v1.2.0 h1:8gudhTkkD3NxOP2YyyJIYYmt6dQ55ZfJkDOaxXpy7Ig= +cosmossdk.io/math v1.2.0/go.mod h1:l2Gnda87F0su8a/7FEKJfFdJrM0JZRXQaohlgJeyQh0= +cosmossdk.io/store v1.0.0 h1:6tnPgTpTSIskaTmw/4s5C9FARdgFflycIc9OX8i1tOI= +cosmossdk.io/store v1.0.0/go.mod h1:ABMprwjvx6IpMp8l06TwuMrj6694/QP5NIW+X6jaTYc= +cosmossdk.io/x/tx v0.12.0 h1:Ry2btjQdrfrje9qZ3iZeZSmDArjgxUJMMcLMrX4wj5U= +cosmossdk.io/x/tx v0.12.0/go.mod h1:qTth2coAGkwCwOCjqQ8EAQg+9udXNRzcnSbMgGKGEI0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= @@ -151,8 +151,8 @@ github.com/cockroachdb/errors v1.11.1 h1:xSEW75zKaKCWzR3OfxXUxgrk/NtT4G1MiOv5lWZ github.com/cockroachdb/errors v1.11.1/go.mod h1:8MUxA3Gi6b25tYlFEBGLf+D8aISL+M4MIpiWMSNRfxw= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b h1:r6VH0faHjZeQy818SGhaone5OnYfxFR/+AzdY3sf5aE= github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b/go.mod h1:Vz9DsVWQQhf3vs21MhPMZpMGSht7O/2vFW2xusFUVOs= -github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0 h1:M4A5LioEhkZ/s+m0g0pWgiLBQr83p0jWnQUo320Qy+A= -github.com/cockroachdb/pebble v0.0.0-20230817233644-564b068800e0/go.mod h1:EDjiaAXc0FXiRmxDzcu1wIEJ093ohHMUWxrI6iku0XA= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6 h1:g+Y6IAf28JinY3zNdXwpw71SBGhLEb72kGQgiR5XKZM= +github.com/cockroachdb/pebble v0.0.0-20231101195458-481da04154d6/go.mod h1:acMRUGd/BK8AUmQNK3spUCCGzFLZU2bSST3NMXSq2Kc= github.com/cockroachdb/redact v1.1.5 h1:u1PMllDkdFfPWaNGMyLD1+so+aq3uUItthCFqzwPJ30= github.com/cockroachdb/redact v1.1.5/go.mod h1:BVNblN9mBWFyMyqK1k3AAiSxhvhfK2oOZZ2lK+dpvRg= github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 h1:zuQyyAKVxetITBuuhv3BI9cMrmStnpT18zmgmTxunpo= @@ -176,8 +176,8 @@ github.com/cosmos/cosmos-db v1.0.0 h1:EVcQZ+qYag7W6uorBKFPvX6gRjw6Uq2hIh4hCWjuQ0 github.com/cosmos/cosmos-db v1.0.0/go.mod h1:iBvi1TtqaedwLdcrZVYRSSCb6eSy61NLj4UNmdIgs0U= github.com/cosmos/cosmos-proto v1.0.0-beta.3 h1:VitvZ1lPORTVxkmF2fAp3IiA61xVwArQYKXTdEcpW6o= github.com/cosmos/cosmos-proto v1.0.0-beta.3/go.mod h1:t8IASdLaAq+bbHbjq4p960BvcTqtwuAxid3b/2rOD6I= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1 h1:1Z+SgLg8S2+DoiePz9aO5dSjJUgag8VFhFUSD/HGvOU= -github.com/cosmos/cosmos-sdk v0.50.0-rc.1/go.mod h1:JbgPLZrh+yX+4+n1CPJ/uL9HrhZw6QVg0q7cTq2Iwq0= +github.com/cosmos/cosmos-sdk v0.50.1 h1:2SYwAYqd7ZwtrWxu/J8PwbQV/cDcu90bCr/a78g3lVw= +github.com/cosmos/cosmos-sdk v0.50.1/go.mod h1:fsLSPGstCwn6MMsFDMAQWGJj8E4sYsN9Gnu1bGE5imA= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -185,14 +185,14 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0-rc.1 h1:5+73BEWW1gZOIUJKlk/1fpD4lOqqeFBA8KuV+NpkCpU= -github.com/cosmos/iavl v1.0.0-rc.1/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= +github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/keyring v1.2.0 h1:8C1lBP9xhImmIabyXW4c3vFjjLiBdGCmfLUfeZlV1Yo= github.com/cosmos/keyring v1.2.0/go.mod h1:fc+wB5KTk9wQ9sDx0kFXB3A0MaeGHM9AwRStKOQ5vOA= -github.com/cosmos/ledger-cosmos-go v0.13.0 h1:ex0CvCxToSR7j5WjrghPu2Bu9sSXKikjnVvUryNnx4s= -github.com/cosmos/ledger-cosmos-go v0.13.0/go.mod h1:ZcqYgnfNJ6lAXe4HPtWgarNEY+B74i+2/8MhZw4ziiI= +github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= +github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5XV6svsnkk9vdJtLr8= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -231,8 +231,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.5.0 h1:tc9eKdCBTgoR68vJ6OcgMtI0SdrGDwLPPVaPA6XhX50= -github.com/emicklei/dot v1.5.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= +github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -265,8 +265,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= -github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE= -github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= +github.com/getsentry/sentry-go v0.25.0 h1:q6Eo+hS+yoJlTO3uu/azhQadsD8V+jQn2D8VvX1eOyI= +github.com/getsentry/sentry-go v0.25.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= @@ -324,8 +324,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= -github.com/golang/glog v1.1.0/go.mod h1:pfYeQZ3JWZoXTV5sFc986z3HTpwQs9At6P4ImfuP3NQ= +github.com/golang/glog v1.1.2 h1:DVjP2PbBOzHyzA+dn3WhHIq4NdVu3Q+pvivFICf/7fo= +github.com/golang/glog v1.1.2/go.mod h1:zR+okUeTbrL6EL3xHUDxZuEtGv04p5shwip1+mL/rLQ= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -377,8 +377,8 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= -github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= @@ -440,8 +440,8 @@ github.com/hashicorp/go-metrics v0.5.1 h1:rfPwUqFU6uZXNvGl4hzjY8LEBsqFVU4si1H9/H github.com/hashicorp/go-metrics v0.5.1/go.mod h1:KEjodfebIOuBYSAe/bHTm+HChmKSxAOXPBieMLYozDE= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-plugin v1.4.10 h1:xUbmA4jC6Dq163/fWcp8P3JuHilrHHMLNRxzGQJ9hNk= -github.com/hashicorp/go-plugin v1.4.10/go.mod h1:6/1TEzT0eQznvI/gV2CM29DLSkAK/e58mUWKVsPaph0= +github.com/hashicorp/go-plugin v1.5.2 h1:aWv8eimFqWlsEiMrYZdPYl+FdHaBJSN4AWwGWfT1G2Y= +github.com/hashicorp/go-plugin v1.5.2/go.mod h1:w1sAEES3g3PuV/RzUrgow20W2uErMly84hhD3um1WL4= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= @@ -481,8 +481,8 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/jhump/protoreflect v1.15.2 h1:7YppbATX94jEt9KLAc5hICx4h6Yt3SaavhQRsIUEHP0= -github.com/jhump/protoreflect v1.15.2/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= +github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= @@ -507,8 +507,8 @@ github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+o github.com/klauspost/compress v1.10.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.7/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= -github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I= -github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= +github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4= +github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= @@ -530,8 +530,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.0 h1:H4L/LhP7GOMf1j17oQAElHgVlbEje2h14A8Tz9cM2BE= -github.com/linxGnu/grocksdb v1.8.0/go.mod h1:09CeBborffXhXdNpEcOeZrLKEnRtrZFEpFdPNI9Zjjg= +github.com/linxGnu/grocksdb v1.8.4 h1:ZMsBpPpJNtRLHiKKp0mI7gW+NT4s7UgfD5xHxx1jVRo= +github.com/linxGnu/grocksdb v1.8.4/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= @@ -548,12 +548,13 @@ github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNx github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= +github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/minio/highwayhash v1.0.2 h1:Aak5U0nElisjDCfPSG79Tgzkn2gl66NxOMspRrKnA/g= github.com/minio/highwayhash v1.0.2/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= @@ -593,8 +594,8 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLA github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a h1:dlRvE5fWabOchtH7znfiFCcOvmIYgOeAS5ifBXBlh9Q= +github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= @@ -638,8 +639,8 @@ github.com/pelletier/go-toml/v2 v2.0.8 h1:0ctb6s9mE31h0/lhu+J6OPmVeDxJn+kYnJc2jZ github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761 h1:W04oB3d0J01W5jgYRGKsV8LCM6g9EkCvPkZcmFuy0OE= -github.com/petermattis/goid v0.0.0-20230518223814-80aa455d8761/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc h1:8bQZVK1X6BJR/6nYUPxQEP+ReTsceJTKizeuwjWOPUA= +github.com/petermattis/goid v0.0.0-20230904192822-1876fd5063bc/go.mod h1:pxMtw7cyUw6B2bRH0ZBANSPg+AoSud1I1iyJHI69jH4= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= @@ -660,32 +661,32 @@ github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5Fsn github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= -github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= +github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q= +github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= -github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= +github.com/prometheus/client_model v0.5.0 h1:VQw1hfvPvk3Uv6Qf29VrPF32JB6rtbgI6cYPYQjL0Qw= +github.com/prometheus/client_model v0.5.0/go.mod h1:dTiFglRmd66nLR9Pv9f0mZi7B7fk5Pm3gvsjB5tr+kI= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= -github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= +github.com/prometheus/common v0.45.0 h1:2BGz0eBc2hdMDLnO/8n0jeB3oPrt2D08CekT0lneoxM= +github.com/prometheus/common v0.45.0/go.mod h1:YJmSTw9BoKxJplESWWxlbyttQR4uaEcGyv9MZjVOJsY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= -github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -701,8 +702,8 @@ github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/cors v1.8.3 h1:O+qNyWn7Z+F9M0ILBHgMVPuB1xTOucVd5gtaYyXBpRo= github.com/rs/cors v1.8.3/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= -github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= -github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= +github.com/rs/zerolog v1.31.0 h1:FcTR3NnLWW+NnTwwhFWiJSZr4ECLpqCm6QsEnyvbV4A= +github.com/rs/zerolog v1.31.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= @@ -773,8 +774,8 @@ github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzH github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= -github.com/tidwall/btree v1.6.0 h1:LDZfKfQIBHGHWSwckhXI0RPSXzlo+KYdjK7FWSqOzzg= -github.com/tidwall/btree v1.6.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= +github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= +github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tidwall/gjson v1.14.2 h1:6BBkirS0rAHjumnjHF6qgy5d2YAJ1TLIaFE2lzfOLqo= github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= @@ -798,10 +799,10 @@ github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zondax/hid v0.9.1 h1:gQe66rtmyZ8VeGFcOpbuH3r7erYtNEAezCAYu8LdkJo= -github.com/zondax/hid v0.9.1/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= -github.com/zondax/ledger-go v0.14.1 h1:Pip65OOl4iJ84WTpA4BKChvOufMhhbxED3BaihoZN4c= -github.com/zondax/ledger-go v0.14.1/go.mod h1:fZ3Dqg6qcdXWSOJFKMG8GCTnD7slO/RL2feOQv8K320= +github.com/zondax/hid v0.9.2 h1:WCJFnEDMiqGF64nlZz28E9qLVZ0KSJ7xpc5DLEyma2U= +github.com/zondax/hid v0.9.2/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= +github.com/zondax/ledger-go v0.14.3 h1:wEpJt2CEcBJ428md/5MgSLsXLBos98sBOyxNmCjfUCw= +github.com/zondax/ledger-go v0.14.3/go.mod h1:IKKaoxupuB43g4NxeQmbLXv7T9AlQyie1UpHb342ycI= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= @@ -840,8 +841,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck= -golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= +golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -853,8 +854,8 @@ golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 h1:m64FZMko/V45gv0bNmrNYoDEq8U5YUhetc9cBWKS1TQ= -golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63/go.mod h1:0v4NqG35kSWCMzLaMeX+IQrlSnVE/bqGSyC2cz/9Le8= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -878,8 +879,8 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.12.0 h1:rmsUpXtvNzj340zd98LZ4KntptpfRHwpFOHG188oHXc= -golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= +golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -926,8 +927,8 @@ golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96b golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= -golang.org/x/net v0.15.0 h1:ugBLEUaxABaB5AJqW9enI0ACdci2RUd4eP51NTBvuJ8= -golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= +golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1023,12 +1024,13 @@ golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.12.0 h1:/ZfYdc3zq+q02Rv9vGqTeSItdzZTSNDmfTi0mBAuidU= -golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1101,8 +1103,8 @@ golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 h1:Vve/L0v7CXXuxUmaMGIEK/dEeq7uiqb5qBgQrZzIE7E= -golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846/go.mod h1:Sc0INKfu04TlqNoRA1hgpFZbhYXHPr4V5DzpSBTPqQM= +golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= +golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1177,12 +1179,12 @@ google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210126160654-44e461bb6506/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5 h1:L6iMMGrtzgHsWofoFcihmDEMYeDR9KN/ThbPWGrh++g= -google.golang.org/genproto v0.0.0-20230803162519-f966b187b2e5/go.mod h1:oH/ZOT02u4kWEp7oYBGYFFkCdKS/uYR9Z7+0/xuuFp8= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e h1:z3vDksarJxsAKM5dmEGv0GHwE2hKJ096wZra71Vs4sw= -google.golang.org/genproto/googleapis/api v0.0.0-20230726155614-23370e0ffb3e/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb h1:Isk1sSH7bovx8Rti2wZK0UZF6oraBDK74uoyLEEVFN0= -google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb/go.mod h1:+Bk1OCOj40wS2hwAMA+aCW9ypzm63QTBBHp6lQ3p+9M= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b h1:+YaDE2r2OG8t/z5qmsh7Y+XXwCbvadxxZ0YY6mTdrVA= +google.golang.org/genproto v0.0.0-20231016165738-49dd2c1f3d0b/go.mod h1:CgAqfJo+Xmu0GwA0411Ht3OU3OntXwsGmrmjI8ioGXI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a h1:myvhA4is3vrit1a6NZCWBIwN0kNEnX21DJOJX/NvIfI= +google.golang.org/genproto/googleapis/api v0.0.0-20231012201019-e917dd12ba7a/go.mod h1:SUBoKXbI1Efip18FClrQVGjWcyd0QZd8KkvdP34t7ww= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405 h1:AB/lmRny7e2pLhFEYIbl5qkDAUt2h0ZRO4wGPhZf+ik= +google.golang.org/genproto/googleapis/rpc v0.0.0-20231030173426-d783a09b4405/go.mod h1:67X1fPuzjcrkymZzZV1vvkFeTn2Rvc6lYF9MYFGCcwE= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1209,8 +1211,8 @@ google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAG google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= -google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= +google.golang.org/grpc v1.59.0 h1:Z5Iec2pjwb+LEOqzpB2MR12/eKFhDPhuqW91O+4bwUk= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1259,8 +1261,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gotest.tools/v3 v3.5.0 h1:Ljk6PdHdOhAb5aDMWXjDLMMhph+BpztA4v1QdqEW2eY= -gotest.tools/v3 v3.5.0/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= +gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= +gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/tests/system/system.go b/tests/system/system.go index 461c85c19b..1fc25313c1 100644 --- a/tests/system/system.go +++ b/tests/system/system.go @@ -442,7 +442,7 @@ func (s *SystemUnderTest) ResetChain(t *testing.T) { s.nodesCount = s.initialNodesCount // reset all validator nodes - s.ForEachNodeExecAndWait(t, []string{"tendermint", "unsafe-reset-all"}) + s.ForEachNodeExecAndWait(t, []string{"comet", "unsafe-reset-all"}) s.currentHeight = 0 s.dirty = false } diff --git a/x/wasm/ibc.go b/x/wasm/ibc.go index 347a3c2eaa..b1a3e81a83 100644 --- a/x/wasm/ibc.go +++ b/x/wasm/ibc.go @@ -75,6 +75,9 @@ func (i IBCHandler) OnChanOpenInit( return "", err } if acceptedVersion == "" { // accept incoming version when nothing returned by contract + if version == "" { + return "", types.ErrEmpty.Wrap("version") + } acceptedVersion = version } diff --git a/x/wasm/ibc_integration_test.go b/x/wasm/ibc_integration_test.go index 689c12b3f9..cf89521d26 100644 --- a/x/wasm/ibc_integration_test.go +++ b/x/wasm/ibc_integration_test.go @@ -22,28 +22,38 @@ import ( ) func TestOnChanOpenInitVersion(t *testing.T) { - const startVersion = "v1" + const v1 = "v1" specs := map[string]struct { - contractRsp *wasmvmtypes.IBC3ChannelOpenResponse - expVersion string + startVersion string + contractRsp *wasmvmtypes.IBC3ChannelOpenResponse + expVersion string + expErr bool }{ "different version": { - contractRsp: &wasmvmtypes.IBC3ChannelOpenResponse{Version: "v2"}, - expVersion: "v2", + startVersion: v1, + contractRsp: &wasmvmtypes.IBC3ChannelOpenResponse{Version: "v2"}, + expVersion: "v2", }, "no response": { - expVersion: startVersion, + startVersion: v1, + expVersion: v1, }, "empty result": { - contractRsp: &wasmvmtypes.IBC3ChannelOpenResponse{}, - expVersion: startVersion, + startVersion: v1, + contractRsp: &wasmvmtypes.IBC3ChannelOpenResponse{}, + expVersion: v1, + }, + "empty versions should fail": { + startVersion: "", + contractRsp: &wasmvmtypes.IBC3ChannelOpenResponse{}, + expErr: true, }, } for name, spec := range specs { t.Run(name, func(t *testing.T) { myContract := &wasmtesting.MockIBCContractCallbacks{ - IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { - return spec.contractRsp, 0, nil + IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { + return &wasmvmtypes.IBCChannelOpenResult{Ok: spec.contractRsp}, 0, nil }, } var ( @@ -63,10 +73,17 @@ func TestOnChanOpenInitVersion(t *testing.T) { coordinator.CreateConnections(path) path.EndpointA.ChannelConfig = &ibctesting.ChannelConfig{ PortID: contractInfo.IBCPortID, - Version: startVersion, + Version: spec.startVersion, Order: channeltypes.UNORDERED, } - require.NoError(t, path.EndpointA.ChanOpenInit()) + // when + gotErr := path.EndpointA.ChanOpenInit() + // then + if spec.expErr { + require.Error(t, gotErr) + return + } + require.NoError(t, gotErr) assert.Equal(t, spec.expVersion, path.EndpointA.ChannelConfig.Version) }) } @@ -93,8 +110,8 @@ func TestOnChanOpenTryVersion(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { myContract := &wasmtesting.MockIBCContractCallbacks{ - IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { - return spec.contractRsp, 0, nil + IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { + return &wasmvmtypes.IBCChannelOpenResult{Ok: spec.contractRsp}, 0, nil }, } var ( @@ -232,11 +249,13 @@ type captureAckTestContractEngine struct { // NewCaptureAckTestContractEngine constructor func NewCaptureAckTestContractEngine() *captureAckTestContractEngine { m := wasmtesting.NewIBCContractMockWasmEngine(&wasmtesting.MockIBCContractCallbacks{ - IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { - return &wasmvmtypes.IBC3ChannelOpenResponse{}, 0, nil + IBCChannelOpenFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { + return &wasmvmtypes.IBCChannelOpenResult{Ok: &wasmvmtypes.IBC3ChannelOpenResponse{}}, 0, nil }, - IBCChannelConnectFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { - return &wasmvmtypes.IBCBasicResponse{}, 0, nil + IBCChannelConnectFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil }, }) return &captureAckTestContractEngine{m} @@ -246,18 +265,22 @@ func NewCaptureAckTestContractEngine() *captureAckTestContractEngine { func (x *captureAckTestContractEngine) SubmitIBCPacket(t *testing.T, path *wasmibctesting.Path, chainA *wasmibctesting.TestChain, senderContractAddr sdk.AccAddress, packetData []byte) *[]byte { t.Helper() // prepare a bridge to send an ibc packet by an ordinary wasm execute message - x.MockWasmEngine.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{{ID: 1, ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: &wasmvmtypes.IBCMsg{SendPacket: &wasmvmtypes.SendPacketMsg{ - ChannelID: path.EndpointA.ChannelID, Data: executeMsg, Timeout: wasmvmtypes.IBCTimeout{Block: &wasmvmtypes.IBCTimeoutBlock{Revision: 1, Height: 10000000}}, - }}}}}, + x.MockWasmEngine.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{{ID: 1, ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: &wasmvmtypes.IBCMsg{SendPacket: &wasmvmtypes.SendPacketMsg{ + ChannelID: path.EndpointA.ChannelID, Data: executeMsg, Timeout: wasmvmtypes.IBCTimeout{Block: &wasmvmtypes.IBCTimeoutBlock{Revision: 1, Height: 10000000}}, + }}}}}, + }, }, 0, nil } // capture acknowledgement var gotAck []byte - x.MockWasmEngine.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { + x.MockWasmEngine.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { gotAck = msg.Acknowledgement.Data - return &wasmvmtypes.IBCBasicResponse{}, 0, nil + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil } // start the process diff --git a/x/wasm/keeper/events.go b/x/wasm/keeper/events.go index ef738b10d6..b50719d461 100644 --- a/x/wasm/keeper/events.go +++ b/x/wasm/keeper/events.go @@ -55,10 +55,6 @@ func contractSDKEventAttributes(customAttributes []wasmvmtypes.EventAttribute, c return nil, errorsmod.Wrap(types.ErrInvalidEvent, fmt.Sprintf("Empty attribute key. Value: %s", l.Value)) } value := strings.TrimSpace(l.Value) - // TODO: check if this is legal in the SDK - if it is, we can remove this check - if len(value) == 0 { - return nil, errorsmod.Wrap(types.ErrInvalidEvent, fmt.Sprintf("Empty attribute value. Key: %s", key)) - } // and reserve all _* keys for our use (not contract) if strings.HasPrefix(key, types.AttributeReservedPrefix) { return nil, errorsmod.Wrap(types.ErrInvalidEvent, fmt.Sprintf("Attribute key starts with reserved prefix %s: '%s'", types.AttributeReservedPrefix, key)) diff --git a/x/wasm/keeper/events_test.go b/x/wasm/keeper/events_test.go index b091eb452d..f3e5cc73f2 100644 --- a/x/wasm/keeper/events_test.go +++ b/x/wasm/keeper/events_test.go @@ -106,6 +106,23 @@ func TestNewCustomEvents(t *testing.T) { exp: sdk.Events{sdk.NewEvent("wasm-foo", sdk.NewAttribute("_contract_address", myContract.String()))}, }, + "empty value can be solved": { + src: wasmvmtypes.Events{{ + Type: "foo", + Attributes: []wasmvmtypes.EventAttribute{{Key: "myKey", Value: ""}}, + }}, + exp: sdk.Events{sdk.NewEvent("wasm-foo", + sdk.NewAttribute("_contract_address", myContract.String()), + sdk.NewAttribute("myKey", ""))}, + }, + "good on whitespace value": { + src: wasmvmtypes.Events{{ + Type: "foo", + Attributes: []wasmvmtypes.EventAttribute{{Key: "myKey", Value: "\n\n\n"}}, + }}, exp: sdk.Events{sdk.NewEvent("wasm-foo", + sdk.NewAttribute("_contract_address", myContract.String()), + sdk.NewAttribute("myKey", ""))}, + }, "error on short event type": { src: wasmvmtypes.Events{{ Type: "f", @@ -129,16 +146,6 @@ func TestNewCustomEvents(t *testing.T) { }}, isError: true, }, - "error on empty value": { - src: wasmvmtypes.Events{{ - Type: "boom", - Attributes: []wasmvmtypes.EventAttribute{ - {Key: "some", Value: "data"}, - {Key: "key", Value: ""}, - }, - }}, - isError: true, - }, "error on empty key": { src: wasmvmtypes.Events{{ Type: "boom", @@ -168,16 +175,6 @@ func TestNewCustomEvents(t *testing.T) { }}, isError: true, }, - "error on only whitespace value": { - src: wasmvmtypes.Events{{ - Type: "boom", - Attributes: []wasmvmtypes.EventAttribute{ - {Key: "some", Value: "data"}, - {Key: "myKey", Value: " \t\r\n"}, - }, - }}, - isError: true, - }, "strip out whitespace": { src: wasmvmtypes.Events{{ Type: " food\n", @@ -243,10 +240,6 @@ func TestNewWasmModuleEvent(t *testing.T) { src: []wasmvmtypes.EventAttribute{{Key: " ", Value: "value"}}, isError: true, }, - "error on whitespace value": { - src: []wasmvmtypes.EventAttribute{{Key: "key", Value: "\n\n\n"}}, - isError: true, - }, "strip whitespace": { src: []wasmvmtypes.EventAttribute{{Key: " my-real-key ", Value: "\n\n\nsome-val\t\t\t"}}, exp: sdk.Events{sdk.NewEvent("wasm", diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 913b373d26..b391ee0ba1 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -35,8 +35,6 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/types" ) -const firstCodeID = 1 - func TestGenesisExportImport(t *testing.T) { wasmKeeper, srcCtx := setupKeeper(t) contractKeeper := NewGovPermissionKeeper(wasmKeeper) @@ -187,7 +185,7 @@ func TestGenesisInit(t *testing.T) { "happy path: code info correct": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -202,7 +200,7 @@ func TestGenesisInit(t *testing.T) { "happy path: code ids can contain gaps": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }, { @@ -225,7 +223,7 @@ func TestGenesisInit(t *testing.T) { CodeInfo: myCodeInfo, CodeBytes: wasmCode, }, { - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -240,7 +238,7 @@ func TestGenesisInit(t *testing.T) { }, "prevent code hash mismatch": {src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: types.CodeInfoFixture(func(i *types.CodeInfo) { i.CodeHash = make([]byte, sha256.Size) }), CodeBytes: wasmCode, }}, @@ -249,12 +247,12 @@ func TestGenesisInit(t *testing.T) { "prevent duplicate codeIDs": {src: types.GenesisState{ Codes: []types.Code{ { - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }, { - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }, @@ -265,7 +263,7 @@ func TestGenesisInit(t *testing.T) { src: types.GenesisState{ Codes: []types.Code{ { - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, Pinned: true, @@ -283,7 +281,7 @@ func TestGenesisInit(t *testing.T) { "happy path: code id in info and contract do match": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -312,7 +310,7 @@ func TestGenesisInit(t *testing.T) { "happy path: code info with two contracts": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -371,7 +369,7 @@ func TestGenesisInit(t *testing.T) { "prevent duplicate contract address": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -406,7 +404,7 @@ func TestGenesisInit(t *testing.T) { "prevent duplicate contract model keys": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -462,7 +460,7 @@ func TestGenesisInit(t *testing.T) { "prevent contract id seq init value not high enough": { src: types.GenesisState{ Codes: []types.Code{{ - CodeID: firstCodeID, + CodeID: 1, CodeInfo: myCodeInfo, CodeBytes: wasmCode, }}, @@ -618,7 +616,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { adminAddr := "cosmos1h5t8zxmjr30e9dqghtlpl40f2zz5cgey6esxtn" expContractInfo := types.ContractInfo{ - CodeID: firstCodeID, + CodeID: 1, Creator: contractCreatorAddr, Admin: adminAddr, Label: "ȀĴnZV芢毤", @@ -629,7 +627,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { expHistory := []types.ContractCodeHistoryEntry{ { Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{ BlockHeight: 100, TxIndex: 10, @@ -638,7 +636,7 @@ func TestImportContractWithCodeHistoryPreserved(t *testing.T) { }, { Operation: types.ContractCodeHistoryOperationTypeMigrate, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{ BlockHeight: 200, TxIndex: 10, diff --git a/x/wasm/keeper/handler_plugin_encoders.go b/x/wasm/keeper/handler_plugin_encoders.go index 9e783c98ca..92595a185c 100644 --- a/x/wasm/keeper/handler_plugin_encoders.go +++ b/x/wasm/keeper/handler_plugin_encoders.go @@ -28,7 +28,7 @@ type ( CustomEncoder func(sender sdk.AccAddress, msg json.RawMessage) ([]sdk.Msg, error) DistributionEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.DistributionMsg) ([]sdk.Msg, error) StakingEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.StakingMsg) ([]sdk.Msg, error) - StargateEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.StargateMsg) ([]sdk.Msg, error) + StargateEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.AnyMsg) ([]sdk.Msg, error) WasmEncoder func(sender sdk.AccAddress, msg *wasmvmtypes.WasmMsg) ([]sdk.Msg, error) IBCEncoder func(ctx sdk.Context, sender sdk.AccAddress, contractIBCPortID string, msg *wasmvmtypes.IBCMsg) ([]sdk.Msg, error) ) @@ -39,7 +39,7 @@ type MessageEncoders struct { Distribution func(sender sdk.AccAddress, msg *wasmvmtypes.DistributionMsg) ([]sdk.Msg, error) IBC func(ctx sdk.Context, sender sdk.AccAddress, contractIBCPortID string, msg *wasmvmtypes.IBCMsg) ([]sdk.Msg, error) Staking func(sender sdk.AccAddress, msg *wasmvmtypes.StakingMsg) ([]sdk.Msg, error) - Stargate func(sender sdk.AccAddress, msg *wasmvmtypes.StargateMsg) ([]sdk.Msg, error) + Stargate func(sender sdk.AccAddress, msg *wasmvmtypes.AnyMsg) ([]sdk.Msg, error) Wasm func(sender sdk.AccAddress, msg *wasmvmtypes.WasmMsg) ([]sdk.Msg, error) Gov func(sender sdk.AccAddress, msg *wasmvmtypes.GovMsg) ([]sdk.Msg, error) } @@ -100,8 +100,8 @@ func (e MessageEncoders) Encode(ctx sdk.Context, contractAddr sdk.AccAddress, co return e.IBC(ctx, contractAddr, contractIBCPortID, msg.IBC) case msg.Staking != nil: return e.Staking(contractAddr, msg.Staking) - case msg.Stargate != nil: - return e.Stargate(contractAddr, msg.Stargate) + case msg.Any != nil: + return e.Stargate(contractAddr, msg.Any) case msg.Wasm != nil: return e.Wasm(contractAddr, msg.Wasm) case msg.Gov != nil: @@ -205,7 +205,7 @@ func EncodeStakingMsg(sender sdk.AccAddress, msg *wasmvmtypes.StakingMsg) ([]sdk } func EncodeStargateMsg(unpacker codectypes.AnyUnpacker) StargateEncoder { - return func(sender sdk.AccAddress, msg *wasmvmtypes.StargateMsg) ([]sdk.Msg, error) { + return func(sender sdk.AccAddress, msg *wasmvmtypes.AnyMsg) ([]sdk.Msg, error) { codecAny := codectypes.Any{ TypeUrl: msg.TypeURL, Value: msg.Value, diff --git a/x/wasm/keeper/handler_plugin_encoders_test.go b/x/wasm/keeper/handler_plugin_encoders_test.go index 1374f03509..f313d1358b 100644 --- a/x/wasm/keeper/handler_plugin_encoders_test.go +++ b/x/wasm/keeper/handler_plugin_encoders_test.go @@ -401,7 +401,7 @@ func TestEncoding(t *testing.T) { "stargate encoded bank msg": { sender: addr2, srcMsg: wasmvmtypes.CosmosMsg{ - Stargate: &wasmvmtypes.StargateMsg{ + Any: &wasmvmtypes.AnyMsg{ TypeURL: "/cosmos.bank.v1beta1.MsgSend", Value: bankMsgBin, }, @@ -411,7 +411,7 @@ func TestEncoding(t *testing.T) { "stargate encoded msg with any type": { sender: addr2, srcMsg: wasmvmtypes.CosmosMsg{ - Stargate: &wasmvmtypes.StargateMsg{ + Any: &wasmvmtypes.AnyMsg{ TypeURL: "/cosmos.gov.v1.MsgSubmitProposal", Value: proposalMsgBin, }, @@ -421,7 +421,7 @@ func TestEncoding(t *testing.T) { "stargate encoded invalid typeUrl": { sender: addr2, srcMsg: wasmvmtypes.CosmosMsg{ - Stargate: &wasmvmtypes.StargateMsg{ + Any: &wasmvmtypes.AnyMsg{ TypeURL: "/cosmos.bank.v2.MsgSend", Value: bankMsgBin, }, diff --git a/x/wasm/keeper/handler_plugin_test.go b/x/wasm/keeper/handler_plugin_test.go index 3a657a3ef1..50e04b707c 100644 --- a/x/wasm/keeper/handler_plugin_test.go +++ b/x/wasm/keeper/handler_plugin_test.go @@ -388,10 +388,12 @@ func TestBurnCoinMessageHandlerIntegration(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { ctx, _ = parentCtx.CacheContext() - k.wasmVM = &wasmtesting.MockWasmEngine{ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - {Msg: wasmvmtypes.CosmosMsg{Bank: &wasmvmtypes.BankMsg{Burn: &spec.msg}}, ReplyOn: wasmvmtypes.ReplyNever}, //nolint:gosec + k.wasmVM = &wasmtesting.MockWasmEngine{ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + {Msg: wasmvmtypes.CosmosMsg{Bank: &wasmvmtypes.BankMsg{Burn: &spec.msg}}, ReplyOn: wasmvmtypes.ReplyNever}, //nolint:gosec + }, }, }, 0, nil }} diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 925a7fd6df..e7f08f9040 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -319,10 +319,15 @@ func (k Keeper) instantiate( gas := k.runtimeGasForContract(sdkCtx) res, gasUsed, err := k.wasmVM.Instantiate(codeInfo.CodeHash, env, info, initMsg, vmStore, cosmwasmAPI, querier, k.gasMeter(sdkCtx), gas, costJSONDeserialization) k.consumeRuntimeGas(sdkCtx, gasUsed) + if err != nil { return nil, nil, errorsmod.Wrap(types.ErrInstantiateFailed, err.Error()) } + if len(res.Err) > 0 { + return nil, nil, errorsmod.Wrap(types.ErrInstantiateFailed, res.Err) + } + // persist instance first createdAt := types.NewAbsoluteTxPosition(sdkCtx) contractInfo := types.NewContractInfo(codeID, creator, admin, label, createdAt) @@ -365,7 +370,7 @@ func (k Keeper) instantiate( )) sdkCtx = types.WithSubMsgAuthzPolicy(sdkCtx, authPolicy.SubMessageAuthorizationPolicy(types.AuthZActionInstantiate)) - data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Messages, res.Attributes, res.Data, res.Events) + data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Ok.Messages, res.Ok.Attributes, res.Ok.Data, res.Ok.Events) if err != nil { return nil, nil, errorsmod.Wrap(err, "dispatch") } @@ -400,16 +405,21 @@ func (k Keeper) execute(ctx context.Context, contractAddress, caller sdk.AccAddr gas := k.runtimeGasForContract(sdkCtx) res, gasUsed, execErr := k.wasmVM.Execute(codeInfo.CodeHash, env, info, msg, prefixStore, cosmwasmAPI, querier, k.gasMeter(sdkCtx), gas, costJSONDeserialization) k.consumeRuntimeGas(sdkCtx, gasUsed) + if execErr != nil { return nil, errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } + if len(res.Err) > 0 { + return nil, errorsmod.Wrap(types.ErrExecuteFailed, res.Err) + } + sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeExecute, sdk.NewAttribute(types.AttributeKeyContractAddr, contractAddress.String()), )) - data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Messages, res.Attributes, res.Data, res.Events) + data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Ok.Messages, res.Ok.Attributes, res.Ok.Data, res.Ok.Events) if err != nil { return nil, errorsmod.Wrap(err, "dispatch") } @@ -477,6 +487,11 @@ func (k Keeper) migrate( if err != nil { return nil, errorsmod.Wrap(types.ErrMigrationFailed, err.Error()) } + + if len(res.Err) > 0 { + return nil, errorsmod.Wrap(types.ErrMigrationFailed, res.Err) + } + // delete old secondary index entry err = k.removeFromContractCodeSecondaryIndex(ctx, contractAddress, k.mustGetLastContractHistoryEntry(sdkCtx, contractAddress)) if err != nil { @@ -501,7 +516,7 @@ func (k Keeper) migrate( )) sdkCtx = types.WithSubMsgAuthzPolicy(sdkCtx, authZ.SubMessageAuthorizationPolicy(types.AuthZActionMigrateContract)) - data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Messages, res.Attributes, res.Data, res.Events) + data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Ok.Messages, res.Ok.Attributes, res.Ok.Data, res.Ok.Events) if err != nil { return nil, errorsmod.Wrap(err, "dispatch") } @@ -540,13 +555,17 @@ func (k Keeper) Sudo(ctx context.Context, contractAddress sdk.AccAddress, msg [] return nil, errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } + if len(res.Err) > 0 { + return nil, errorsmod.Wrap(types.ErrExecuteFailed, res.Err) + } + sdkCtx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeSudo, sdk.NewAttribute(types.AttributeKeyContractAddr, contractAddress.String()), )) // sudo submessages are executed with the default authorization policy - data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Messages, res.Attributes, res.Data, res.Events) + data, err := k.handleContractResponse(sdkCtx, contractAddress, contractInfo.IBCPortID, res.Ok.Messages, res.Ok.Attributes, res.Ok.Data, res.Ok.Events) if err != nil { return nil, errorsmod.Wrap(err, "dispatch") } @@ -577,12 +596,16 @@ func (k Keeper) reply(ctx sdk.Context, contractAddress sdk.AccAddress, reply was return nil, errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } + if len(res.Err) > 0 { + return nil, errorsmod.Wrap(types.ErrExecuteFailed, res.Err) + } + ctx.EventManager().EmitEvent(sdk.NewEvent( types.EventTypeReply, sdk.NewAttribute(types.AttributeKeyContractAddr, contractAddress.String()), )) - data, err := k.handleContractResponse(ctx, contractAddress, contractInfo.IBCPortID, res.Messages, res.Attributes, res.Data, res.Events) + data, err := k.handleContractResponse(ctx, contractAddress, contractInfo.IBCPortID, res.Ok.Messages, res.Ok.Attributes, res.Ok.Data, res.Ok.Events) if err != nil { return nil, errorsmod.Wrap(err, "dispatch") } @@ -759,7 +782,7 @@ func (k Keeper) QuerySmart(ctx context.Context, contractAddr sdk.AccAddress, req if qErr != nil { return nil, errorsmod.Wrap(types.ErrQueryFailed, qErr.Error()) } - return queryResult, nil + return queryResult.Ok, nil } func checkAndIncreaseQueryStackSize(ctx context.Context, maxQueryStackSize uint32) (sdk.Context, error) { diff --git a/x/wasm/keeper/keeper_test.go b/x/wasm/keeper/keeper_test.go index dfb7e3e45c..7cac74678f 100644 --- a/x/wasm/keeper/keeper_test.go +++ b/x/wasm/keeper/keeper_test.go @@ -419,7 +419,7 @@ func TestInstantiate(t *testing.T) { gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x1bc64), gasAfter-gasBefore) + require.Equal(t, uint64(0x1bc31), gasAfter-gasBefore) } // ensure it is stored properly @@ -714,8 +714,8 @@ func TestInstantiateWithContractDataResponse(t *testing.T) { ctx, keepers := CreateTestInput(t, false, AvailableCapabilities) wasmEngineMock := &wasmtesting.MockWasmEngine{ - InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{Data: []byte("my-response-data")}, 0, nil + InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("my-response-data")}}, 0, nil }, AnalyzeCodeFn: wasmtesting.WithoutIBCAnalyzeFn, StoreCodeFn: wasmtesting.NoOpStoreCodeFn, @@ -739,10 +739,10 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) { keeper := keepers.WasmKeeper var instantiationCount int - callbacks := make([]func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error), 2) + callbacks := make([]func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error), 2) wasmEngineMock := &wasmtesting.MockWasmEngine{ // dispatch instantiation calls to callbacks - InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { require.Greater(t, len(callbacks), instantiationCount, "unexpected call to instantiation") do := callbacks[instantiationCount] instantiationCount++ @@ -762,24 +762,26 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) { example := StoreRandomContract(t, ctx, keepers, wasmEngineMock) // factory contract - callbacks[0] = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + callbacks[0] = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { t.Log("called factory") - return &wasmvmtypes.Response{Data: []byte("parent"), Messages: []wasmvmtypes.SubMsg{ - { - ID: 1, ReplyOn: wasmvmtypes.ReplyNever, - Msg: wasmvmtypes.CosmosMsg{ - Wasm: &wasmvmtypes.WasmMsg{ - Instantiate: &wasmvmtypes.InstantiateMsg{CodeID: example.CodeID, Msg: []byte(`{}`), Label: "child"}, + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{Data: []byte("parent"), Messages: []wasmvmtypes.SubMsg{ + { + ID: 1, ReplyOn: wasmvmtypes.ReplyNever, + Msg: wasmvmtypes.CosmosMsg{ + Wasm: &wasmvmtypes.WasmMsg{ + Instantiate: &wasmvmtypes.InstantiateMsg{CodeID: example.CodeID, Msg: []byte(`{}`), Label: "child"}, + }, }, }, - }, - }}, 0, nil + }}, + }, 0, nil } // child contract var capturedSenderAddr string var capturedCodeInfo []byte - callbacks[1] = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + callbacks[1] = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { t.Log("called child") capturedSenderAddr = info.Sender var err error @@ -789,7 +791,7 @@ func TestInstantiateWithContractFactoryChildQueriesParent(t *testing.T) { }, }, gasLimit) require.NoError(t, err) - return &wasmvmtypes.Response{Data: []byte("child")}, 0, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("child")}}, 0, nil } // when @@ -863,7 +865,7 @@ func TestExecute(t *testing.T) { // make sure gas is properly deducted from ctx gasAfter := ctx.GasMeter().GasConsumed() if types.EnableGasVerification { - require.Equal(t, uint64(0x1ac6a), gasAfter-gasBefore) + require.Equal(t, uint64(0x1ac12), gasAfter-gasBefore) } // ensure bob now exists and got both payments released bobAcct = accKeeper.GetAccount(ctx, bob) @@ -1047,7 +1049,7 @@ func TestExecuteWithCpuLoop(t *testing.T) { require.NoError(t, err) // make sure we set a limit before calling - var gasLimit uint64 = 400_000 + var gasLimit uint64 = 400 ctx = ctx.WithGasMeter(storetypes.NewGasMeter(gasLimit)) require.Equal(t, uint64(0), ctx.GasMeter().GasConsumed()) @@ -1472,8 +1474,8 @@ func TestIterateContractsByCode(t *testing.T) { func TestIterateContractsByCodeWithMigration(t *testing.T) { // mock migration so that it does not fail when migrate example1 to example2.codeID - mockWasmVM := wasmtesting.MockWasmEngine{MigrateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{}, 1, nil + mockWasmVM := wasmtesting.MockWasmEngine{MigrateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{}}, 1, nil }} wasmtesting.MakeInstantiable(&mockWasmVM) ctx, keepers := CreateTestInput(t, false, AvailableCapabilities, WithWasmEngine(&mockWasmVM)) @@ -1842,18 +1844,20 @@ func TestPinnedContractLoops(t *testing.T) { require.NoError(t, k.pinCode(ctx, example.CodeID)) var loops int anyMsg := []byte(`{}`) - mock.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + mock.ExecuteFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { loops++ - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - { - ID: 1, - ReplyOn: wasmvmtypes.ReplyNever, - Msg: wasmvmtypes.CosmosMsg{ - Wasm: &wasmvmtypes.WasmMsg{ - Execute: &wasmvmtypes.ExecuteMsg{ - ContractAddr: example.Contract.String(), - Msg: anyMsg, + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + { + ID: 1, + ReplyOn: wasmvmtypes.ReplyNever, + Msg: wasmvmtypes.CosmosMsg{ + Wasm: &wasmvmtypes.WasmMsg{ + Execute: &wasmvmtypes.ExecuteMsg{ + ContractAddr: example.Contract.String(), + Msg: anyMsg, + }, }, }, }, @@ -1958,20 +1962,20 @@ func TestReply(t *testing.T) { example := SeedNewContractInstance(t, ctx, keepers, &mock) specs := map[string]struct { - replyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) + replyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) expData []byte expErr bool expEvt sdk.Events }{ "all good": { - replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{Data: []byte("foo")}, 1, nil + replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("foo")}}, 1, nil }, expData: []byte("foo"), expEvt: sdk.Events{sdk.NewEvent("reply", sdk.NewAttribute("_contract_address", example.Contract.String()))}, }, "with query": { - replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { bzRsp, err := querier.Query(wasmvmtypes.QueryRequest{ Bank: &wasmvmtypes.BankQuery{ Balance: &wasmvmtypes.BalanceQuery{Address: env.Contract.Address, Denom: "stake"}, @@ -1981,23 +1985,23 @@ func TestReply(t *testing.T) { var gotBankRsp wasmvmtypes.BalanceResponse require.NoError(t, json.Unmarshal(bzRsp, &gotBankRsp)) assert.Equal(t, wasmvmtypes.BalanceResponse{Amount: wasmvmtypes.NewCoin(0, "stake")}, gotBankRsp) - return &wasmvmtypes.Response{Data: []byte("foo")}, 1, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("foo")}}, 1, nil }, expData: []byte("foo"), expEvt: sdk.Events{sdk.NewEvent("reply", sdk.NewAttribute("_contract_address", example.Contract.String()))}, }, "with query error handled": { - replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { bzRsp, err := querier.Query(wasmvmtypes.QueryRequest{}, 0) require.Error(t, err) assert.Nil(t, bzRsp) - return &wasmvmtypes.Response{Data: []byte("foo")}, 1, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("foo")}}, 1, nil }, expData: []byte("foo"), expEvt: sdk.Events{sdk.NewEvent("reply", sdk.NewAttribute("_contract_address", example.Contract.String()))}, }, "error": { - replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + replyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { return nil, 1, errors.New("testing") }, expErr: true, @@ -2037,12 +2041,12 @@ func TestQueryIsolation(t *testing.T) { }).apply(k) // when - mock.ReplyFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + mock.ReplyFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { _, err := querier.Query(wasmvmtypes.QueryRequest{ Custom: []byte(`{}`), }, 10000*types.DefaultGasMultiplier) require.NoError(t, err) - return &wasmvmtypes.Response{}, 0, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{}}, 0, nil } em := sdk.NewEventManager() _, gotErr := k.reply(ctx.WithEventManager(em), example.Contract, wasmvmtypes.Reply{}) diff --git a/x/wasm/keeper/migrations_integration_test.go b/x/wasm/keeper/migrations_integration_test.go index a2ec8fd329..0962a79977 100644 --- a/x/wasm/keeper/migrations_integration_test.go +++ b/x/wasm/keeper/migrations_integration_test.go @@ -3,20 +3,24 @@ package keeper_test import ( "testing" + "github.com/cometbft/cometbft/libs/rand" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" upgradetypes "cosmossdk.io/x/upgrade/types" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" "github.com/cosmos/cosmos-sdk/types/module" "github.com/CosmWasm/wasmd/app" + v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2" "github.com/CosmWasm/wasmd/x/wasm/types" ) func TestModuleMigrations(t *testing.T) { wasmApp := app.Setup(t) + myAddress := sdk.AccAddress(rand.Bytes(address.Len)) upgradeHandler := func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { //nolint:unparam return wasmApp.ModuleManager.RunMigrations(ctx, wasmApp.Configurator(), fromVM) @@ -30,15 +34,15 @@ func TestModuleMigrations(t *testing.T) { "with legacy params migrated": { startVersion: 1, setup: func(ctx sdk.Context) { - params := types.Params{ - CodeUploadAccess: types.AllowNobody, - InstantiateDefaultPermission: types.AccessTypeNobody, + params := v2.Params{ + CodeUploadAccess: v2.AccessConfig{Permission: v2.AccessTypeNobody}, + InstantiateDefaultPermission: v2.AccessTypeNobody, } // upgrade code shipped with v0.40 // https://github.com/CosmWasm/wasmd/blob/v0.40.0/app/upgrades.go#L66 sp, _ := wasmApp.ParamsKeeper.GetSubspace(types.ModuleName) - keyTable := types.ParamKeyTable() + keyTable := v2.ParamKeyTable() if !sp.HasKeyTable() { sp.WithKeyTable(keyTable) } @@ -50,6 +54,29 @@ func TestModuleMigrations(t *testing.T) { InstantiateDefaultPermission: types.AccessTypeNobody, }, }, + "with legacy one address type replaced": { + startVersion: 1, + setup: func(ctx sdk.Context) { + params := v2.Params{ + CodeUploadAccess: v2.AccessConfig{Permission: v2.AccessTypeOnlyAddress, Address: myAddress.String()}, + InstantiateDefaultPermission: v2.AccessTypeNobody, + } + + // upgrade code shipped with v0.40 + // https://github.com/CosmWasm/wasmd/blob/v0.40.0/app/upgrades.go#L66 + sp, _ := wasmApp.ParamsKeeper.GetSubspace(types.ModuleName) + keyTable := v2.ParamKeyTable() + if !sp.HasKeyTable() { + sp.WithKeyTable(keyTable) + } + + sp.SetParamSet(ctx, ¶ms) + }, + exp: types.Params{ + CodeUploadAccess: types.AccessTypeAnyOfAddresses.With(myAddress), + InstantiateDefaultPermission: types.AccessTypeNobody, + }, + }, "fresh from genesis": { startVersion: wasmApp.ModuleManager.GetVersionMap()[types.ModuleName], // latest setup: func(ctx sdk.Context) {}, diff --git a/x/wasm/keeper/msg_dispatcher_test.go b/x/wasm/keeper/msg_dispatcher_test.go index 3cecfe6639..099342246c 100644 --- a/x/wasm/keeper/msg_dispatcher_test.go +++ b/x/wasm/keeper/msg_dispatcher_test.go @@ -348,7 +348,7 @@ func TestDispatchSubmessages(t *testing.T) { }, "non-wasm reply events get filtered": { // show events from a stargate message gets filtered out - msgs: []wasmvmtypes.SubMsg{{ID: 1, ReplyOn: wasmvmtypes.ReplyAlways, Msg: wasmvmtypes.CosmosMsg{Stargate: &wasmvmtypes.StargateMsg{}}}}, + msgs: []wasmvmtypes.SubMsg{{ID: 1, ReplyOn: wasmvmtypes.ReplyAlways, Msg: wasmvmtypes.CosmosMsg{Any: &wasmvmtypes.AnyMsg{}}}}, replyer: &mockReplyer{ replyFn: func(ctx sdk.Context, contractAddress sdk.AccAddress, reply wasmvmtypes.Reply) ([]byte, error) { if reply.Result.Err != "" { diff --git a/x/wasm/keeper/proposal_handler_legacy.go b/x/wasm/keeper/proposal_handler_legacy.go new file mode 100644 index 0000000000..d066e4b6e0 --- /dev/null +++ b/x/wasm/keeper/proposal_handler_legacy.go @@ -0,0 +1,342 @@ +package keeper + +import ( + "bytes" + "encoding/hex" + "fmt" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + + "github.com/CosmWasm/wasmd/x/wasm/types" +) + +// NewLegacyWasmProposalHandler creates a new governance Handler for wasm proposals +// +// Deprecated: Do not use v1beta1 handlers anymore. Gov v1 is the way to go +func NewLegacyWasmProposalHandler(k decoratedKeeper, enabledProposalTypes []types.ProposalType) v1beta1.Handler { + return NewLegacyWasmProposalHandlerX(NewGovPermissionKeeper(k), enabledProposalTypes) +} + +// NewLegacyWasmProposalHandlerX creates a new governance Handler for wasm proposals +// +// Deprecated: Do not use v1beta1 handlers anymore. Gov v1 is the way to go +func NewLegacyWasmProposalHandlerX(k types.ContractOpsKeeper, enabledProposalTypes []types.ProposalType) v1beta1.Handler { + enabledTypes := make(map[string]struct{}, len(enabledProposalTypes)) + for i := range enabledProposalTypes { + enabledTypes[string(enabledProposalTypes[i])] = struct{}{} + } + return func(ctx sdk.Context, content v1beta1.Content) error { + if content == nil { + return errorsmod.Wrap(sdkerrors.ErrUnknownRequest, "content must not be empty") + } + if _, ok := enabledTypes[content.ProposalType()]; !ok { + return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unsupported wasm proposal content type: %q", content.ProposalType()) + } + switch c := content.(type) { + case *types.StoreCodeProposal: + return handleStoreCodeProposal(ctx, k, *c) + case *types.InstantiateContractProposal: + return handleInstantiateProposal(ctx, k, *c) + case *types.InstantiateContract2Proposal: + return handleInstantiate2Proposal(ctx, k, *c) + case *types.MigrateContractProposal: + return handleMigrateProposal(ctx, k, *c) + case *types.SudoContractProposal: + return handleSudoProposal(ctx, k, *c) + case *types.ExecuteContractProposal: + return handleExecuteProposal(ctx, k, *c) + case *types.UpdateAdminProposal: + return handleUpdateAdminProposal(ctx, k, *c) + case *types.ClearAdminProposal: + return handleClearAdminProposal(ctx, k, *c) + case *types.PinCodesProposal: + return handlePinCodesProposal(ctx, k, *c) + case *types.UnpinCodesProposal: + return handleUnpinCodesProposal(ctx, k, *c) + case *types.UpdateInstantiateConfigProposal: + return handleUpdateInstantiateConfigProposal(ctx, k, *c) + case *types.StoreAndInstantiateContractProposal: + return handleStoreAndInstantiateContractProposal(ctx, k, *c) + default: + return errorsmod.Wrapf(sdkerrors.ErrUnknownRequest, "unrecognized wasm proposal content type: %T", c) + } + } +} + +//nolint:staticcheck +func handleStoreCodeProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.StoreCodeProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + codeID, checksum, err := k.Create(ctx, runAsAddr, p.WASMByteCode, p.InstantiatePermission) + if err != nil { + return err + } + + if len(p.CodeHash) != 0 && !bytes.Equal(checksum, p.CodeHash) { + return fmt.Errorf("code-hash mismatch: %X, checksum: %X", p.CodeHash, checksum) + } + + // if code should not be pinned return earlier + if p.UnpinCode { + return nil + } + return k.PinCode(ctx, codeID) +} + +//nolint:staticcheck +func handleInstantiateProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.InstantiateContractProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + var adminAddr sdk.AccAddress + if p.Admin != "" { + if adminAddr, err = sdk.AccAddressFromBech32(p.Admin); err != nil { + return errorsmod.Wrap(err, "admin") + } + } + + _, data, err := k.Instantiate(ctx, p.CodeID, runAsAddr, adminAddr, p.Msg, p.Label, p.Funds) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleInstantiate2Proposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.InstantiateContract2Proposal) error { + // Validatebasic with proposal + if err := p.ValidateBasic(); err != nil { + return err + } + + // Get runAsAddr as AccAddress + runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + + // Get admin address + var adminAddr sdk.AccAddress + if p.Admin != "" { + if adminAddr, err = sdk.AccAddressFromBech32(p.Admin); err != nil { + return errorsmod.Wrap(err, "admin") + } + } + + _, data, err := k.Instantiate2(ctx, p.CodeID, runAsAddr, adminAddr, p.Msg, p.Label, p.Funds, p.Salt, p.FixMsg) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleStoreAndInstantiateContractProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.StoreAndInstantiateContractProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + var adminAddr sdk.AccAddress + if p.Admin != "" { + if adminAddr, err = sdk.AccAddressFromBech32(p.Admin); err != nil { + return errorsmod.Wrap(err, "admin") + } + } + + codeID, checksum, err := k.Create(ctx, runAsAddr, p.WASMByteCode, p.InstantiatePermission) + if err != nil { + return err + } + + if p.CodeHash != nil && !bytes.Equal(checksum, p.CodeHash) { + return errorsmod.Wrap(fmt.Errorf("code-hash mismatch: %X, checksum: %X", p.CodeHash, checksum), "code-hash mismatch") + } + + if !p.UnpinCode { + if err := k.PinCode(ctx, codeID); err != nil { + return err + } + } + + _, data, err := k.Instantiate(ctx, codeID, runAsAddr, adminAddr, p.Msg, p.Label, p.Funds) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleMigrateProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.MigrateContractProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + contractAddr, err := sdk.AccAddressFromBech32(p.Contract) + if err != nil { + return errorsmod.Wrap(err, "contract") + } + + // runAs is not used if this is permissioned, so just put any valid address there (second contractAddr) + data, err := k.Migrate(ctx, contractAddr, contractAddr, p.CodeID, p.Msg) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleSudoProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.SudoContractProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + contractAddr, err := sdk.AccAddressFromBech32(p.Contract) + if err != nil { + return errorsmod.Wrap(err, "contract") + } + data, err := k.Sudo(ctx, contractAddr, p.Msg) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleExecuteProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.ExecuteContractProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + contractAddr, err := sdk.AccAddressFromBech32(p.Contract) + if err != nil { + return errorsmod.Wrap(err, "contract") + } + runAsAddr, err := sdk.AccAddressFromBech32(p.RunAs) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + data, err := k.Execute(ctx, contractAddr, runAsAddr, p.Msg, p.Funds) + if err != nil { + return err + } + + ctx.EventManager().EmitEvent(sdk.NewEvent( + types.EventTypeGovContractResult, + sdk.NewAttribute(types.AttributeKeyResultDataHex, hex.EncodeToString(data)), + )) + return nil +} + +//nolint:staticcheck +func handleUpdateAdminProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.UpdateAdminProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + contractAddr, err := sdk.AccAddressFromBech32(p.Contract) + if err != nil { + return errorsmod.Wrap(err, "contract") + } + newAdminAddr, err := sdk.AccAddressFromBech32(p.NewAdmin) + if err != nil { + return errorsmod.Wrap(err, "run as address") + } + + return k.UpdateContractAdmin(ctx, contractAddr, nil, newAdminAddr) +} + +//nolint:staticcheck +func handleClearAdminProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.ClearAdminProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + contractAddr, err := sdk.AccAddressFromBech32(p.Contract) + if err != nil { + return errorsmod.Wrap(err, "contract") + } + err = k.ClearContractAdmin(ctx, contractAddr, nil) + return err +} + +//nolint:staticcheck +func handlePinCodesProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.PinCodesProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + for _, v := range p.CodeIDs { + if err := k.PinCode(ctx, v); err != nil { + return errorsmod.Wrapf(err, "code id: %d", v) + } + } + return nil +} + +//nolint:staticcheck +func handleUnpinCodesProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.UnpinCodesProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + for _, v := range p.CodeIDs { + if err := k.UnpinCode(ctx, v); err != nil { + return errorsmod.Wrapf(err, "code id: %d", v) + } + } + return nil +} + +//nolint:staticcheck +func handleUpdateInstantiateConfigProposal(ctx sdk.Context, k types.ContractOpsKeeper, p types.UpdateInstantiateConfigProposal) error { + if err := p.ValidateBasic(); err != nil { + return err + } + + var emptyCaller sdk.AccAddress + for _, accessConfigUpdate := range p.AccessConfigUpdates { + if err := k.SetAccessConfig(ctx, accessConfigUpdate.CodeID, emptyCaller, accessConfigUpdate.InstantiatePermission); err != nil { + return errorsmod.Wrapf(err, "code id: %d", accessConfigUpdate.CodeID) + } + } + return nil +} diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go new file mode 100644 index 0000000000..cb5256e462 --- /dev/null +++ b/x/wasm/keeper/proposal_integration_test.go @@ -0,0 +1,226 @@ +package keeper + +import ( + "encoding/hex" + "encoding/json" + "fmt" + "testing" + + wasmvmtypes "github.com/CosmWasm/wasmvm/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + v1 "github.com/cosmos/cosmos-sdk/x/gov/types/v1" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + + "github.com/CosmWasm/wasmd/x/wasm/keeper/testdata" + "github.com/CosmWasm/wasmd/x/wasm/types" +) + +func TestLoadStoredGovV1Beta1LegacyTypes(t *testing.T) { + pCtx, keepers := CreateTestInput(t, false, ReflectCapabilities+",iterator") + k := keepers.WasmKeeper + keepers.GovKeeper.SetLegacyRouter(v1beta1.NewRouter(). + AddRoute(types.ModuleName, NewLegacyWasmProposalHandler(k, types.EnableAllProposals)), + ) + myAddress := RandomAccountAddress(t) + keepers.Faucet.Fund(pCtx, myAddress, sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewIntFromUint64(100_000_000))) + keepers.Faucet.Fund(pCtx, myAddress, sdk.NewCoin("denom", sdkmath.NewIntFromUint64(100_000_000))) + + reflectExample := InstantiateReflectExampleContract(t, pCtx, keepers) + burnerCodeID, _, err := k.create(pCtx, myAddress, testdata.BurnerContractWasm(), nil, DefaultAuthorizationPolicy{}) + require.NoError(t, err) + hackatomExample := InstantiateHackatomExampleContract(t, pCtx, keepers) + + type StealMsg struct { + Recipient string `json:"recipient"` + Amount []sdk.Coin `json:"amount"` + } + stealMsg := struct { + Steal StealMsg `json:"steal_funds"` + }{Steal: StealMsg{ + Recipient: myAddress.String(), + Amount: []sdk.Coin{sdk.NewInt64Coin("denom", 75)}, + }} + stealMsgBz := must(json.Marshal(stealMsg)) + + specs := map[string]struct { + legacyContent v1beta1.Content + }{ + "store code": { + legacyContent: &types.StoreCodeProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Source: "https://example.com/", + Builder: "cosmwasm/workspace-optimizer:v0.12.8", + RunAs: myAddress.String(), + WASMByteCode: testdata.HackatomContractWasm(), + CodeHash: must(hex.DecodeString(testdata.ChecksumHackatom)), + }, + }, + "instantiate": { + legacyContent: &types.InstantiateContractProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + RunAs: myAddress.String(), + Admin: myAddress.String(), + CodeID: reflectExample.CodeID, + Label: "testing", + Msg: []byte("{}"), + }, + }, + "instantiate2": { + legacyContent: &types.InstantiateContract2Proposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + RunAs: myAddress.String(), + Admin: myAddress.String(), + CodeID: reflectExample.CodeID, + Label: "testing", + Msg: []byte("{}"), + Salt: []byte("mySalt"), + }, + }, + "store and instantiate": { + legacyContent: &types.StoreAndInstantiateContractProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + RunAs: myAddress.String(), + WASMByteCode: testdata.ReflectContractWasm(), + Admin: myAddress.String(), + Label: "testing", + Msg: []byte("{}"), + Source: "https://example.com/", + Builder: "cosmwasm/workspace-optimizer:v0.12.8", + CodeHash: reflectExample.Checksum, + }, + }, + "migrate": { + legacyContent: &types.MigrateContractProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Contract: reflectExample.Contract.String(), + CodeID: burnerCodeID, + Msg: []byte(fmt.Sprintf(`{"payout": "%s"}`, myAddress)), + }, + }, + "execute": { + legacyContent: &types.ExecuteContractProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Contract: reflectExample.Contract.String(), + RunAs: reflectExample.CreatorAddr.String(), + Msg: must(json.Marshal(testdata.ReflectHandleMsg{ + Reflect: &testdata.ReflectPayload{ + Msgs: []wasmvmtypes.CosmosMsg{{ + Bank: &wasmvmtypes.BankMsg{ + Send: &wasmvmtypes.SendMsg{ + ToAddress: myAddress.String(), + Amount: []wasmvmtypes.Coin{{Denom: "denom", Amount: "100"}}, + }, + }, + }}, + }, + })), + }, + }, + "sudo": { + &types.SudoContractProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Contract: hackatomExample.Contract.String(), + Msg: stealMsgBz, + }, + }, + "update admin": { + legacyContent: &types.UpdateAdminProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Contract: reflectExample.Contract.String(), + NewAdmin: myAddress.String(), + }, + }, + "clear admin": { + legacyContent: &types.ClearAdminProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + Contract: reflectExample.Contract.String(), + }, + }, + "pin codes": { + legacyContent: &types.PinCodesProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + CodeIDs: []uint64{reflectExample.CodeID}, + }, + }, + "unpin codes": { + legacyContent: &types.UnpinCodesProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + CodeIDs: []uint64{reflectExample.CodeID}, + }, + }, + "update instantiate config": { + legacyContent: &types.UpdateInstantiateConfigProposal{ //nolint:staticcheck + Title: "Foo", + Description: "Bar", + AccessConfigUpdates: []types.AccessConfigUpdate{ + {CodeID: reflectExample.CodeID, InstantiatePermission: types.AllowNobody}, + }, + }, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + ctx, _ := pCtx.CacheContext() + propID := mustSubmitAndExecuteLegacyProposal(t, ctx, spec.legacyContent, myAddress.String(), keepers) + // when + proposal, err := keepers.GovKeeper.Proposals.Get(ctx, propID) + // then + require.NoError(t, err) + require.Len(t, proposal.Messages, 1) + assert.NotNil(t, proposal.Messages[0].GetCachedValue()) + }) + } +} + +func mustSubmitAndExecuteLegacyProposal(t *testing.T, ctx sdk.Context, content v1beta1.Content, myActorAddress string, keepers TestKeepers) uint64 { + t.Helper() + govAuthority := keepers.AccountKeeper.GetModuleAddress(govtypes.ModuleName).String() + msgServer := govkeeper.NewMsgServerImpl(keepers.GovKeeper) + // ignore all submit events + contentMsg, rsp, err := submitLegacyProposal(t, ctx.WithEventManager(sdk.NewEventManager()), content, myActorAddress, govAuthority, msgServer) + require.NoError(t, err) + + _, err = msgServer.ExecLegacyContent(ctx, v1.NewMsgExecLegacyContent(contentMsg.Content, govAuthority)) + require.NoError(t, err) + return rsp.ProposalId +} + +// does not fail on submit proposal +func submitLegacyProposal(t *testing.T, ctx sdk.Context, content v1beta1.Content, myActorAddress, govAuthority string, msgServer v1.MsgServer) (*v1.MsgExecLegacyContent, *v1.MsgSubmitProposalResponse, error) { + t.Helper() + contentMsg, err := v1.NewLegacyContent(content, govAuthority) + require.NoError(t, err) + + proposal, err := v1.NewMsgSubmitProposal( + []sdk.Msg{contentMsg}, + sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewIntFromUint64(1_000_000))), + myActorAddress, + "", + content.GetTitle(), + content.GetDescription(), + false, + ) + require.NoError(t, err) + + // when stored + rsp, err := msgServer.SubmitProposal(ctx, proposal) + return contentMsg, rsp, err +} diff --git a/x/wasm/keeper/querier_test.go b/x/wasm/keeper/querier_test.go index e196c537f9..0408b3a471 100644 --- a/x/wasm/keeper/querier_test.go +++ b/x/wasm/keeper/querier_test.go @@ -198,7 +198,7 @@ func TestQuerySmartContractPanics(t *testing.T) { } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { - keepers.WasmKeeper.wasmVM = &wasmtesting.MockWasmEngine{QueryFn: func(checksum wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) ([]byte, uint64, error) { + keepers.WasmKeeper.wasmVM = &wasmtesting.MockWasmEngine{QueryFn: func(checksum wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.QueryResponse, uint64, error) { spec.doInContract() return nil, 0, nil }} @@ -412,14 +412,14 @@ func TestQueryContractHistory(t *testing.T) { "response with internal fields cleared": { srcHistory: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeGenesis, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, Msg: []byte(`"init message"`), }}, req: types.QueryContractHistoryRequest{Address: myContractBech32Addr}, expContent: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeGenesis, - CodeID: firstCodeID, + CodeID: 1, Msg: []byte(`"init message"`), Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, }}, @@ -427,7 +427,7 @@ func TestQueryContractHistory(t *testing.T) { "response with multiple entries": { srcHistory: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, Msg: []byte(`"init message"`), }, { @@ -444,7 +444,7 @@ func TestQueryContractHistory(t *testing.T) { req: types.QueryContractHistoryRequest{Address: myContractBech32Addr}, expContent: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Msg: []byte(`"init message"`), Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, }, { @@ -462,7 +462,7 @@ func TestQueryContractHistory(t *testing.T) { "with pagination offset": { srcHistory: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, Msg: []byte(`"init message"`), }, { @@ -482,7 +482,7 @@ func TestQueryContractHistory(t *testing.T) { "with pagination limit": { srcHistory: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, Msg: []byte(`"init message"`), }, { @@ -499,7 +499,7 @@ func TestQueryContractHistory(t *testing.T) { }, expContent: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeInit, - CodeID: firstCodeID, + CodeID: 1, Msg: []byte(`"init message"`), Updated: &types.AbsoluteTxPosition{BlockHeight: 1, TxIndex: 2}, }}, @@ -508,7 +508,7 @@ func TestQueryContractHistory(t *testing.T) { req: types.QueryContractHistoryRequest{Address: otherBech32Addr}, srcHistory: []types.ContractCodeHistoryEntry{{ Operation: types.ContractCodeHistoryOperationTypeGenesis, - CodeID: firstCodeID, + CodeID: 1, Updated: types.NewAbsoluteTxPosition(ctx), Msg: []byte(`"init message"`), }}, diff --git a/x/wasm/keeper/relay.go b/x/wasm/keeper/relay.go index c542f6c04e..99b58448de 100644 --- a/x/wasm/keeper/relay.go +++ b/x/wasm/keeper/relay.go @@ -42,8 +42,13 @@ func (k Keeper) OnOpenChannel( if execErr != nil { return "", errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } + + if len(res.Err) > 0 { + return "", errorsmod.Wrap(types.ErrExecuteFailed, res.Err) + } + if res != nil { - return res.Version, nil + return res.Ok.Version, nil } return "", nil } @@ -76,7 +81,7 @@ func (k Keeper) OnConnectChannel( return errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } - return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res) + return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res.Ok) } // OnCloseChannel calls the contract to let it know the IBC channel is closed. @@ -107,7 +112,7 @@ func (k Keeper) OnCloseChannel( return errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } - return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res) + return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res.Ok) } // OnRecvPacket calls the contract to process the incoming IBC packet. The contract fully owns the data processing and @@ -139,7 +144,7 @@ func (k Keeper) OnRecvPacket( // all state downstream and not persist any data in ibc-go. // This can be triggered by throwing a panic in the contract } - if res.Err != "" { + if len(res.Err) > 0 { // return error ACK with non-redacted contract message, state will be reverted return channeltypes.Acknowledgement{ Response: &channeltypes.Acknowledgement_Error{Error: res.Err}, @@ -194,7 +199,7 @@ func (k Keeper) OnAckPacket( if execErr != nil { return errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } - return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res) + return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res.Ok) } // OnTimeoutPacket calls the contract to let it know the packet was never received on the destination chain within @@ -222,7 +227,7 @@ func (k Keeper) OnTimeoutPacket( return errorsmod.Wrap(types.ErrExecuteFailed, execErr.Error()) } - return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res) + return k.handleIBCBasicContractResponse(ctx, contractAddr, contractInfo.IBCPortID, res.Ok) } func (k Keeper) handleIBCBasicContractResponse(ctx sdk.Context, addr sdk.AccAddress, id string, res *wasmvmtypes.IBCBasicResponse) error { diff --git a/x/wasm/keeper/relay_test.go b/x/wasm/keeper/relay_test.go index 812d94fd8a..df2fecb163 100644 --- a/x/wasm/keeper/relay_test.go +++ b/x/wasm/keeper/relay_test.go @@ -59,9 +59,9 @@ func TestOnOpenChannel(t *testing.T) { t.Run(name, func(t *testing.T) { myChannel := wasmvmtypes.IBCChannel{Version: "my test channel"} myMsg := wasmvmtypes.IBCChannelOpenMsg{OpenTry: &wasmvmtypes.IBCOpenTry{Channel: myChannel, CounterpartyVersion: "foo"}} - m.IBCChannelOpenFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { + m.IBCChannelOpenFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { assert.Equal(t, myMsg, msg) - return &wasmvmtypes.IBC3ChannelOpenResponse{}, spec.contractGas * types.DefaultGasMultiplier, spec.contractErr + return &wasmvmtypes.IBCChannelOpenResult{Ok: &wasmvmtypes.IBC3ChannelOpenResponse{}}, spec.contractGas * types.DefaultGasMultiplier, spec.contractErr } ctx, _ := parentCtx.CacheContext() @@ -156,9 +156,9 @@ func TestOnConnectChannel(t *testing.T) { t.Run(name, func(t *testing.T) { myChannel := wasmvmtypes.IBCChannel{Version: "my test channel"} myMsg := wasmvmtypes.IBCChannelConnectMsg{OpenConfirm: &wasmvmtypes.IBCOpenConfirm{Channel: myChannel}} - m.IBCChannelConnectFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { + m.IBCChannelConnectFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { assert.Equal(t, msg, myMsg) - return spec.contractResp, myContractGas * types.DefaultGasMultiplier, spec.contractErr + return &wasmvmtypes.IBCBasicResult{Ok: spec.contractResp}, myContractGas * types.DefaultGasMultiplier, spec.contractErr } ctx, _ := parentCtx.CacheContext() @@ -268,9 +268,9 @@ func TestOnCloseChannel(t *testing.T) { t.Run(name, func(t *testing.T) { myChannel := wasmvmtypes.IBCChannel{Version: "my test channel"} myMsg := wasmvmtypes.IBCChannelCloseMsg{CloseInit: &wasmvmtypes.IBCCloseInit{Channel: myChannel}} - m.IBCChannelCloseFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { + m.IBCChannelCloseFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { assert.Equal(t, msg, myMsg) - return spec.contractResp, myContractGas * types.DefaultGasMultiplier, spec.contractErr + return &wasmvmtypes.IBCBasicResult{Ok: spec.contractResp}, myContractGas * types.DefaultGasMultiplier, spec.contractErr } ctx, _ := parentCtx.CacheContext() @@ -325,7 +325,7 @@ func TestOnRecvPacket(t *testing.T) { contractResp *wasmvmtypes.IBCReceiveResult contractErr error overwriteMessenger *wasmtesting.MockMessageHandler - mockReplyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) + mockReplyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) expContractGas storetypes.Gas expAck []byte expErr bool @@ -426,8 +426,8 @@ func TestOnRecvPacket(t *testing.T) { Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyAlways, Msg: wasmvmtypes.CosmosMsg{Bank: &wasmvmtypes.BankMsg{}}}}, }, }, - mockReplyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{Data: []byte("myBetterAck")}, 0, nil + mockReplyFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{Data: []byte("myBetterAck")}}, 0, nil }, expAck: []byte("myBetterAck"), expEventTypes: []string{types.EventTypeReply}, @@ -567,9 +567,9 @@ func TestOnAckPacket(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { myAck := wasmvmtypes.IBCPacketAckMsg{Acknowledgement: wasmvmtypes.IBCAcknowledgement{Data: []byte("myAck")}} - m.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { + m.IBCPacketAckFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { assert.Equal(t, myAck, msg) - return spec.contractResp, myContractGas * types.DefaultGasMultiplier, spec.contractErr + return &wasmvmtypes.IBCBasicResult{Ok: spec.contractResp}, myContractGas * types.DefaultGasMultiplier, spec.contractErr } ctx, _ := parentCtx.CacheContext() @@ -687,9 +687,9 @@ func TestOnTimeoutPacket(t *testing.T) { for name, spec := range specs { t.Run(name, func(t *testing.T) { myPacket := wasmvmtypes.IBCPacket{Data: []byte("my test packet")} - m.IBCPacketTimeoutFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { + m.IBCPacketTimeoutFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { assert.Equal(t, myPacket, msg.Packet) - return spec.contractResp, myContractGas * types.DefaultGasMultiplier, spec.contractErr + return &wasmvmtypes.IBCBasicResult{Ok: spec.contractResp}, myContractGas * types.DefaultGasMultiplier, spec.contractErr } ctx, _ := parentCtx.CacheContext() diff --git a/x/wasm/keeper/submsg_test.go b/x/wasm/keeper/submsg_test.go index 5f8c4932c6..b86ab91e9f 100644 --- a/x/wasm/keeper/submsg_test.go +++ b/x/wasm/keeper/submsg_test.go @@ -563,20 +563,22 @@ func TestInstantiateGovSubMsgAuthzPropagated(t *testing.T) { wasmtesting.MakeInstantiable(mockWasmVM) var instanceLevel int // mock wasvm to return new instantiate msgs with the response - mockWasmVM.InstantiateFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + mockWasmVM.InstantiateFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if instanceLevel == 2 { - return &wasmvmtypes.Response{}, 0, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{}}, 0, nil } instanceLevel++ submsgPayload := fmt.Sprintf(`{"sub":%d}`, instanceLevel) - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - { - ReplyOn: wasmvmtypes.ReplyNever, - Msg: wasmvmtypes.CosmosMsg{ - Wasm: &wasmvmtypes.WasmMsg{Instantiate: &wasmvmtypes.InstantiateMsg{ - CodeID: 1, Msg: []byte(submsgPayload), Label: "from sub-msg", - }}, + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + { + ReplyOn: wasmvmtypes.ReplyNever, + Msg: wasmvmtypes.CosmosMsg{ + Wasm: &wasmvmtypes.WasmMsg{Instantiate: &wasmvmtypes.InstantiateMsg{ + CodeID: 1, Msg: []byte(submsgPayload), Label: "from sub-msg", + }}, + }, }, }, }, @@ -650,22 +652,24 @@ func TestMigrateGovSubMsgAuthzPropagated(t *testing.T) { var instanceLevel int // mock wasvm to return new migrate msgs with the response - mockWasmVM.MigrateFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + mockWasmVM.MigrateFn = func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if instanceLevel == 1 { - return &wasmvmtypes.Response{}, 0, nil + return &wasmvmtypes.ContractResult{Ok: &wasmvmtypes.Response{}}, 0, nil } instanceLevel++ submsgPayload := fmt.Sprintf(`{"sub":%d}`, instanceLevel) - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - { - ReplyOn: wasmvmtypes.ReplyNever, - Msg: wasmvmtypes.CosmosMsg{ - Wasm: &wasmvmtypes.WasmMsg{Migrate: &wasmvmtypes.MigrateMsg{ - ContractAddr: example1.Contract.String(), - NewCodeID: example2.CodeID, - Msg: []byte(submsgPayload), - }}, + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + { + ReplyOn: wasmvmtypes.ReplyNever, + Msg: wasmvmtypes.CosmosMsg{ + Wasm: &wasmvmtypes.WasmMsg{Migrate: &wasmvmtypes.MigrateMsg{ + ContractAddr: example1.Contract.String(), + NewCodeID: example2.CodeID, + Msg: []byte(submsgPayload), + }}, + }, }, }, }, diff --git a/x/wasm/keeper/wasmtesting/mock_engine.go b/x/wasm/keeper/wasmtesting/mock_engine.go index b1c7b11d04..2081890a96 100644 --- a/x/wasm/keeper/wasmtesting/mock_engine.go +++ b/x/wasm/keeper/wasmtesting/mock_engine.go @@ -20,40 +20,40 @@ type MockWasmEngine struct { StoreCodeFn func(codeID wasmvm.WasmCode) (wasmvm.Checksum, error) StoreCodeUncheckedFn func(codeID wasmvm.WasmCode) (wasmvm.Checksum, error) AnalyzeCodeFn func(codeID wasmvm.Checksum) (*wasmvmtypes.AnalysisReport, error) - InstantiateFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) - ExecuteFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) - QueryFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) ([]byte, uint64, error) - MigrateFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) - SudoFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, sudoMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) - ReplyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) + InstantiateFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) + ExecuteFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) + QueryFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.QueryResponse, uint64, error) + MigrateFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) + SudoFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, sudoMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) + ReplyFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) GetCodeFn func(codeID wasmvm.Checksum) (wasmvm.WasmCode, error) CleanupFn func() - IBCChannelOpenFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) - IBCChannelConnectFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) - IBCChannelCloseFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) + IBCChannelOpenFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) + IBCChannelConnectFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) + IBCChannelCloseFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) IBCPacketReceiveFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketReceiveMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCReceiveResult, uint64, error) - IBCPacketAckFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) - IBCPacketTimeoutFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) + IBCPacketAckFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) + IBCPacketTimeoutFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) PinFn func(checksum wasmvm.Checksum) error UnpinFn func(checksum wasmvm.Checksum) error GetMetricsFn func() (*wasmvmtypes.Metrics, error) } -func (m *MockWasmEngine) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { +func (m *MockWasmEngine) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { if m.IBCChannelOpenFn == nil { panic("not supposed to be called!") } return m.IBCChannelOpenFn(codeID, env, msg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) IBCChannelConnect(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m *MockWasmEngine) IBCChannelConnect(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCChannelConnectFn == nil { panic("not supposed to be called!") } return m.IBCChannelConnectFn(codeID, env, msg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) IBCChannelClose(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m *MockWasmEngine) IBCChannelClose(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCChannelCloseFn == nil { panic("not supposed to be called!") } @@ -67,14 +67,14 @@ func (m *MockWasmEngine) IBCPacketReceive(codeID wasmvm.Checksum, env wasmvmtype return m.IBCPacketReceiveFn(codeID, env, msg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) IBCPacketAck(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m *MockWasmEngine) IBCPacketAck(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCPacketAckFn == nil { panic("not supposed to be called!") } return m.IBCPacketAckFn(codeID, env, msg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m *MockWasmEngine) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCPacketTimeoutFn == nil { panic("not supposed to be called!") } @@ -107,42 +107,42 @@ func (m *MockWasmEngine) AnalyzeCode(codeID wasmvm.Checksum) (*wasmvmtypes.Analy return m.AnalyzeCodeFn(codeID) } -func (m *MockWasmEngine) Instantiate(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (m *MockWasmEngine) Instantiate(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if m.InstantiateFn == nil { panic("not supposed to be called!") } return m.InstantiateFn(codeID, env, info, initMsg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) Execute(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (m *MockWasmEngine) Execute(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if m.ExecuteFn == nil { panic("not supposed to be called!") } return m.ExecuteFn(codeID, env, info, executeMsg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) Query(codeID wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) ([]byte, uint64, error) { +func (m *MockWasmEngine) Query(codeID wasmvm.Checksum, env wasmvmtypes.Env, queryMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.QueryResponse, uint64, error) { if m.QueryFn == nil { panic("not supposed to be called!") } return m.QueryFn(codeID, env, queryMsg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) Migrate(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (m *MockWasmEngine) Migrate(codeID wasmvm.Checksum, env wasmvmtypes.Env, migrateMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if m.MigrateFn == nil { panic("not supposed to be called!") } return m.MigrateFn(codeID, env, migrateMsg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) Sudo(codeID wasmvm.Checksum, env wasmvmtypes.Env, sudoMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (m *MockWasmEngine) Sudo(codeID wasmvm.Checksum, env wasmvmtypes.Env, sudoMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if m.SudoFn == nil { panic("not supposed to be called!") } return m.SudoFn(codeID, env, sudoMsg, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m *MockWasmEngine) Reply(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (m *MockWasmEngine) Reply(codeID wasmvm.Checksum, env wasmvmtypes.Env, reply wasmvmtypes.Reply, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { if m.ReplyFn == nil { panic("not supposed to be called!") } @@ -193,19 +193,22 @@ func SelfCallingInstMockWasmEngine(executeCalled *bool) *MockWasmEngine { anyCodeID := bytes.Repeat([]byte{0x1}, 32) return anyCodeID, nil }, - InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - {Msg: wasmvmtypes.CosmosMsg{ - Wasm: &wasmvmtypes.WasmMsg{Execute: &wasmvmtypes.ExecuteMsg{ContractAddr: env.Contract.Address, Msg: []byte(`{}`)}}, - }}, - }, - }, 1, nil + InstantiateFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, initMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + {Msg: wasmvmtypes.CosmosMsg{ + Wasm: &wasmvmtypes.WasmMsg{Execute: &wasmvmtypes.ExecuteMsg{ContractAddr: env.Contract.Address, Msg: []byte(`{}`)}}, + }}, + }, + }}, 1, nil }, AnalyzeCodeFn: WithoutIBCAnalyzeFn, - ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { + ExecuteFn: func(codeID wasmvm.Checksum, env wasmvmtypes.Env, info wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { *executeCalled = true - return &wasmvmtypes.Response{}, 1, nil + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{}, + }, 1, nil }, } } @@ -223,7 +226,7 @@ type IBCContractCallbacks interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) + ) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) IBCChannelConnect( codeID wasmvm.Checksum, @@ -235,7 +238,7 @@ type IBCContractCallbacks interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) IBCChannelClose( codeID wasmvm.Checksum, @@ -247,7 +250,7 @@ type IBCContractCallbacks interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) IBCPacketReceive( codeID wasmvm.Checksum, @@ -271,7 +274,7 @@ type IBCContractCallbacks interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) IBCPacketTimeout( codeID wasmvm.Checksum, @@ -283,7 +286,7 @@ type IBCContractCallbacks interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) } type contractExecutable interface { @@ -298,7 +301,7 @@ type contractExecutable interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) } // MakeInstantiable adds some noop functions to not fail when contract is used for instantiation @@ -341,8 +344,10 @@ func HashOnlyStoreCodeFn(code wasmvm.WasmCode) (wasmvm.Checksum, error) { return wasmvm.CreateChecksum(code) } -func NoOpInstantiateFn(wasmvm.Checksum, wasmvmtypes.Env, wasmvmtypes.MessageInfo, []byte, wasmvm.KVStore, wasmvm.GoAPI, wasmvm.Querier, wasmvm.GasMeter, uint64, wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { - return &wasmvmtypes.Response{}, 0, nil +func NoOpInstantiateFn(wasmvm.Checksum, wasmvmtypes.Env, wasmvmtypes.MessageInfo, []byte, wasmvm.KVStore, wasmvm.GoAPI, wasmvm.Querier, wasmvm.GasMeter, uint64, wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{}, + }, 0, nil } func NoOpStoreCodeFn(_ wasmvm.WasmCode) (wasmvm.Checksum, error) { @@ -362,29 +367,29 @@ func WithoutIBCAnalyzeFn(wasmvm.Checksum) (*wasmvmtypes.AnalysisReport, error) { var _ IBCContractCallbacks = &MockIBCContractCallbacks{} type MockIBCContractCallbacks struct { - IBCChannelOpenFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) - IBCChannelConnectFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) - IBCChannelCloseFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) + IBCChannelOpenFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) + IBCChannelConnectFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) + IBCChannelCloseFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) IBCPacketReceiveFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketReceiveMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCReceiveResult, uint64, error) - IBCPacketAckFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) - IBCPacketTimeoutFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) + IBCPacketAckFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) + IBCPacketTimeoutFn func(codeID wasmvm.Checksum, env wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) } -func (m MockIBCContractCallbacks) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { +func (m MockIBCContractCallbacks) IBCChannelOpen(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelOpenMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { if m.IBCChannelOpenFn == nil { panic("not expected to be called") } return m.IBCChannelOpenFn(codeID, env, channel, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m MockIBCContractCallbacks) IBCChannelConnect(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m MockIBCContractCallbacks) IBCChannelConnect(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCChannelConnectFn == nil { panic("not expected to be called") } return m.IBCChannelConnectFn(codeID, env, channel, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m MockIBCContractCallbacks) IBCChannelClose(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m MockIBCContractCallbacks) IBCChannelClose(codeID wasmvm.Checksum, env wasmvmtypes.Env, channel wasmvmtypes.IBCChannelCloseMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCChannelCloseFn == nil { panic("not expected to be called") } @@ -398,14 +403,14 @@ func (m MockIBCContractCallbacks) IBCPacketReceive(codeID wasmvm.Checksum, env w return m.IBCPacketReceiveFn(codeID, env, packet, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m MockIBCContractCallbacks) IBCPacketAck(codeID wasmvm.Checksum, env wasmvmtypes.Env, ack wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m MockIBCContractCallbacks) IBCPacketAck(codeID wasmvm.Checksum, env wasmvmtypes.Env, ack wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCPacketAckFn == nil { panic("not expected to be called") } return m.IBCPacketAckFn(codeID, env, ack, store, goapi, querier, gasMeter, gasLimit, deserCost) } -func (m MockIBCContractCallbacks) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, packet wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (m MockIBCContractCallbacks) IBCPacketTimeout(codeID wasmvm.Checksum, env wasmvmtypes.Env, packet wasmvmtypes.IBCPacketTimeoutMsg, store wasmvm.KVStore, goapi wasmvm.GoAPI, querier wasmvm.Querier, gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { if m.IBCPacketTimeoutFn == nil { panic("not expected to be called") } diff --git a/x/wasm/legacy/codec.go b/x/wasm/legacy/codec.go index 939fa8ee10..94bb2cccc3 100644 --- a/x/wasm/legacy/codec.go +++ b/x/wasm/legacy/codec.go @@ -3,7 +3,6 @@ package legacy import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) func RegisterInterfaces(registry types.InterfaceRegistry) { @@ -17,15 +16,15 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgClearAdmin{}, ) - // support legacy proposal querying - registry.RegisterImplementations( - (*v1beta1.Content)(nil), - &StoreCodeProposal{}, - &InstantiateContractProposal{}, - &MigrateContractProposal{}, - &UpdateAdminProposal{}, - &ClearAdminProposal{}, - &PinCodesProposal{}, - &UnpinCodesProposal{}, - ) + // // support legacy proposal querying + // registry.RegisterImplementations( + // (*v1beta1.Content)(nil), + // &StoreCodeProposal{}, + // &InstantiateContractProposal{}, + // &MigrateContractProposal{}, + // &UpdateAdminProposal{}, + // &ClearAdminProposal{}, + // &PinCodesProposal{}, + // &UnpinCodesProposal{}, + // ) } diff --git a/x/wasm/migrations/v2/legacy_types.go b/x/wasm/migrations/v2/legacy_types.go new file mode 100644 index 0000000000..787c28b574 --- /dev/null +++ b/x/wasm/migrations/v2/legacy_types.go @@ -0,0 +1,1219 @@ +package v2 + +import ( + bytes "bytes" + fmt "fmt" + io "io" + math_bits "math/bits" + + proto "github.com/cosmos/gogoproto/proto" + "gopkg.in/yaml.v2" +) + +// AccessType permission types +type AccessType int32 + +const ( + // AccessTypeUnspecified placeholder for empty value + AccessTypeUnspecified AccessType = 0 + // AccessTypeNobody forbidden + AccessTypeNobody AccessType = 1 + // AccessTypeOnlyAddress restricted to a single address + // Deprecated: use AccessTypeAnyOfAddresses instead + AccessTypeOnlyAddress AccessType = 2 + // AccessTypeEverybody unrestricted + AccessTypeEverybody AccessType = 3 + // AccessTypeAnyOfAddresses allow any of the addresses + AccessTypeAnyOfAddresses AccessType = 4 +) + +var AccessType_name = map[int32]string{ + 0: "ACCESS_TYPE_UNSPECIFIED", + 1: "ACCESS_TYPE_NOBODY", + 2: "ACCESS_TYPE_ONLY_ADDRESS", + 3: "ACCESS_TYPE_EVERYBODY", + 4: "ACCESS_TYPE_ANY_OF_ADDRESSES", +} + +var AccessType_value = map[string]int32{ + "ACCESS_TYPE_UNSPECIFIED": 0, + "ACCESS_TYPE_NOBODY": 1, + "ACCESS_TYPE_ONLY_ADDRESS": 2, + "ACCESS_TYPE_EVERYBODY": 3, + "ACCESS_TYPE_ANY_OF_ADDRESSES": 4, +} + +func (AccessType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_e6155d98fa173e02, []int{0} +} + +// AccessTypeParam +type AccessTypeParam struct { + Value AccessType `protobuf:"varint,1,opt,name=value,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"value,omitempty" yaml:"value"` +} + +func (m *AccessTypeParam) Reset() { *m = AccessTypeParam{} } +func (m *AccessTypeParam) String() string { return proto.CompactTextString(m) } +func (*AccessTypeParam) ProtoMessage() {} +func (*AccessTypeParam) Descriptor() ([]byte, []int) { + return fileDescriptor_e6155d98fa173e02, []int{0} +} + +func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessTypeParam.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} + +func (m *AccessTypeParam) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessTypeParam.Merge(m, src) +} + +func (m *AccessTypeParam) XXX_Size() int { + return m.Size() +} + +func (m *AccessTypeParam) XXX_DiscardUnknown() { + xxx_messageInfo_AccessTypeParam.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessTypeParam proto.InternalMessageInfo + +// AccessConfig access control type. +type AccessConfig struct { + Permission AccessType `protobuf:"varint,1,opt,name=permission,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"permission,omitempty" yaml:"permission"` + // Address + // Deprecated: replaced by addresses + Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty" yaml:"address"` + Addresses []string `protobuf:"bytes,3,rep,name=addresses,proto3" json:"addresses,omitempty" yaml:"addresses"` +} + +func (m *AccessConfig) Reset() { *m = AccessConfig{} } +func (m *AccessConfig) String() string { return proto.CompactTextString(m) } +func (*AccessConfig) ProtoMessage() {} +func (*AccessConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_e6155d98fa173e02, []int{1} +} + +func (m *AccessConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} + +func (m *AccessConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessConfig.Merge(m, src) +} + +func (m *AccessConfig) XXX_Size() int { + return m.Size() +} + +func (m *AccessConfig) XXX_DiscardUnknown() { + xxx_messageInfo_AccessConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessConfig proto.InternalMessageInfo + +// Params defines the set of wasm parameters. +type Params struct { + CodeUploadAccess AccessConfig `protobuf:"bytes,1,opt,name=code_upload_access,json=codeUploadAccess,proto3" json:"code_upload_access" yaml:"code_upload_access"` + InstantiateDefaultPermission AccessType `protobuf:"varint,2,opt,name=instantiate_default_permission,json=instantiateDefaultPermission,proto3,enum=cosmwasm.wasm.v1.AccessType" json:"instantiate_default_permission,omitempty" yaml:"instantiate_default_permission"` +} + +func (p Params) String() string { + out, err := yaml.Marshal(p) + if err != nil { + panic(err) + } + return string(out) +} + +func (m *Params) Reset() { *m = Params{} } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_e6155d98fa173e02, []int{2} +} + +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} + +func (m *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} + +func (m *Params) XXX_Size() int { + return m.Size() +} + +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +// CodeInfo is data for the uploaded contract WASM code +type CodeInfo struct { + // CodeHash is the unique identifier created by wasmvm + CodeHash []byte `protobuf:"bytes,1,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` + // Creator address who initially stored the code + Creator string `protobuf:"bytes,2,opt,name=creator,proto3" json:"creator,omitempty"` + // InstantiateConfig access control to apply on contract creation, optional + InstantiateConfig AccessConfig `protobuf:"bytes,5,opt,name=instantiate_config,json=instantiateConfig,proto3" json:"instantiate_config"` +} + +func (m *CodeInfo) Reset() { *m = CodeInfo{} } +func (m *CodeInfo) String() string { return proto.CompactTextString(m) } +func (*CodeInfo) ProtoMessage() {} +func (*CodeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e6155d98fa173e02, []int{3} +} + +func (m *CodeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *CodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CodeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} + +func (m *CodeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_CodeInfo.Merge(m, src) +} + +func (m *CodeInfo) XXX_Size() int { + return m.Size() +} + +func (m *CodeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_CodeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_CodeInfo proto.InternalMessageInfo + +var fileDescriptor_e6155d98fa173e02 = []byte{ + // 1201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x8f, 0xdb, 0xc4, + 0x17, 0x8f, 0x93, 0xec, 0x8f, 0x4c, 0xf7, 0xdb, 0xaf, 0x3b, 0x6c, 0x69, 0x36, 0xac, 0x92, 0x60, + 0x4a, 0xd9, 0x6e, 0xdb, 0xa4, 0x5d, 0x10, 0x48, 0x3d, 0x54, 0xca, 0x0f, 0xb7, 0xeb, 0x8a, 0x4d, + 0xa2, 0x49, 0x4a, 0x59, 0xa4, 0x62, 0x39, 0xf6, 0x24, 0x6b, 0x35, 0xf1, 0x44, 0x9e, 0xc9, 0x36, + 0xfe, 0x0f, 0x50, 0x24, 0x24, 0x0e, 0x1c, 0xb8, 0x44, 0x42, 0x02, 0x41, 0xb9, 0x71, 0xe0, 0x8f, + 0xa8, 0x40, 0x42, 0x3d, 0x72, 0x8a, 0x60, 0x7b, 0x80, 0x73, 0x8e, 0xe5, 0x82, 0x3c, 0x13, 0xd7, + 0xa6, 0xed, 0x76, 0xc3, 0xc5, 0x9a, 0x79, 0xef, 0x7d, 0x3e, 0xef, 0xbd, 0xcf, 0xcc, 0x3c, 0x19, + 0x6c, 0x9a, 0x84, 0xf6, 0x1f, 0x18, 0xb4, 0x5f, 0xe4, 0x9f, 0xc3, 0x6b, 0x45, 0xe6, 0x0d, 0x30, + 0x2d, 0x0c, 0x5c, 0xc2, 0x08, 0x94, 0x03, 0x6f, 0x81, 0x7f, 0x0e, 0xaf, 0x65, 0x36, 0x7c, 0x0b, + 0xa1, 0x3a, 0xf7, 0x17, 0xc5, 0x46, 0x04, 0x67, 0xd6, 0xbb, 0xa4, 0x4b, 0x84, 0xdd, 0x5f, 0xcd, + 0xad, 0x1b, 0x5d, 0x42, 0xba, 0x3d, 0x5c, 0xe4, 0xbb, 0xf6, 0xb0, 0x53, 0x34, 0x1c, 0x6f, 0xee, + 0x3a, 0x63, 0xf4, 0x6d, 0x87, 0x14, 0xf9, 0x57, 0x98, 0x94, 0x7b, 0xe0, 0xff, 0x25, 0xd3, 0xc4, + 0x94, 0xb6, 0xbc, 0x01, 0x6e, 0x18, 0xae, 0xd1, 0x87, 0x55, 0xb0, 0x74, 0x68, 0xf4, 0x86, 0x38, + 0x2d, 0xe5, 0xa5, 0xad, 0xd3, 0x3b, 0x9b, 0x85, 0xe7, 0x6b, 0x2a, 0x84, 0x88, 0xb2, 0x3c, 0x9b, + 0xe6, 0xd6, 0x3c, 0xa3, 0xdf, 0xbb, 0xae, 0x70, 0x90, 0x82, 0x04, 0xf8, 0x7a, 0xf2, 0xab, 0xaf, + 0x73, 0x92, 0xf2, 0x8b, 0x04, 0xd6, 0x44, 0x74, 0x85, 0x38, 0x1d, 0xbb, 0x0b, 0x9b, 0x00, 0x0c, + 0xb0, 0xdb, 0xb7, 0x29, 0xb5, 0x89, 0xb3, 0x50, 0x86, 0xb3, 0xb3, 0x69, 0xee, 0x8c, 0xc8, 0x10, + 0x22, 0x15, 0x14, 0xa1, 0x81, 0x97, 0xc1, 0x8a, 0x61, 0x59, 0x2e, 0xa6, 0x34, 0x1d, 0xcf, 0x4b, + 0x5b, 0xa9, 0x32, 0x9c, 0x4d, 0x73, 0xa7, 0x05, 0x66, 0xee, 0x50, 0x50, 0x10, 0x02, 0x77, 0x40, + 0x6a, 0xbe, 0xc4, 0x34, 0x9d, 0xc8, 0x27, 0xb6, 0x52, 0xe5, 0xf5, 0xd9, 0x34, 0x27, 0xff, 0x2b, + 0x1e, 0x53, 0x05, 0x85, 0x61, 0xf3, 0x6e, 0xbe, 0x8c, 0x83, 0x65, 0xae, 0x11, 0x85, 0x0c, 0x40, + 0x93, 0x58, 0x58, 0x1f, 0x0e, 0x7a, 0xc4, 0xb0, 0x74, 0x83, 0xd7, 0xcb, 0xfb, 0x39, 0xb5, 0x93, + 0x3d, 0xae, 0x1f, 0xa1, 0x41, 0xf9, 0xc2, 0xa3, 0x69, 0x2e, 0x36, 0x9b, 0xe6, 0x36, 0x44, 0xc6, + 0x17, 0x79, 0x94, 0x87, 0x7f, 0xfe, 0xb8, 0x2d, 0x21, 0xd9, 0xf7, 0xdc, 0xe1, 0x0e, 0x81, 0x87, + 0x9f, 0x4b, 0x20, 0x6b, 0x3b, 0x94, 0x19, 0x0e, 0xb3, 0x0d, 0x86, 0x75, 0x0b, 0x77, 0x8c, 0x61, + 0x8f, 0xe9, 0x11, 0x49, 0xe3, 0x0b, 0x48, 0x7a, 0x71, 0x36, 0xcd, 0xbd, 0x2d, 0x92, 0xbf, 0x9a, + 0x4d, 0x41, 0x9b, 0x91, 0x80, 0xaa, 0xf0, 0x37, 0x9e, 0xb9, 0xb9, 0x2c, 0x31, 0xe5, 0x7b, 0x09, + 0xac, 0x56, 0x88, 0x85, 0x35, 0xa7, 0x43, 0xe0, 0x1b, 0x20, 0xc5, 0x1b, 0x3a, 0x30, 0xe8, 0x01, + 0xd7, 0x63, 0x0d, 0xad, 0xfa, 0x86, 0x5d, 0x83, 0x1e, 0xc0, 0x34, 0x58, 0x31, 0x5d, 0x6c, 0x30, + 0xe2, 0x8a, 0x83, 0x42, 0xc1, 0x16, 0x7e, 0x0c, 0x60, 0xb4, 0x14, 0x93, 0x2b, 0x95, 0x5e, 0x5a, + 0x48, 0xcf, 0x94, 0xaf, 0xa7, 0x90, 0xec, 0x4c, 0x84, 0x44, 0x78, 0x6f, 0x27, 0x57, 0x13, 0x72, + 0xf2, 0x76, 0x72, 0x35, 0x29, 0x2f, 0x29, 0xbf, 0xc6, 0xc1, 0x5a, 0x85, 0x38, 0xcc, 0x35, 0x4c, + 0xc6, 0xab, 0x7d, 0x0b, 0xac, 0xf0, 0x6a, 0x6d, 0x8b, 0xd7, 0x9a, 0x2c, 0x83, 0xa3, 0x69, 0x6e, + 0x99, 0x37, 0x53, 0x45, 0xcb, 0xbe, 0x4b, 0xb3, 0x5e, 0x51, 0xf5, 0x3a, 0x58, 0x32, 0xac, 0xbe, + 0xed, 0xa4, 0x13, 0xdc, 0x2e, 0x36, 0xbe, 0xb5, 0x67, 0xb4, 0x71, 0x2f, 0x9d, 0x14, 0x56, 0xbe, + 0x81, 0x37, 0xe6, 0x2c, 0xd8, 0x9a, 0xb7, 0x75, 0xfe, 0x25, 0x6d, 0xb5, 0x29, 0xe9, 0x0d, 0x19, + 0x6e, 0x8d, 0x1a, 0x84, 0xda, 0xcc, 0x26, 0x0e, 0x0a, 0x40, 0xf0, 0x0a, 0x38, 0x65, 0xb7, 0x4d, + 0x7d, 0x40, 0x5c, 0xe6, 0x97, 0xbb, 0xcc, 0x2f, 0xfa, 0xff, 0x8e, 0xa6, 0xb9, 0x94, 0x56, 0xae, + 0x34, 0x88, 0xcb, 0xb4, 0x2a, 0x4a, 0xd9, 0x6d, 0x93, 0x2f, 0x2d, 0xf8, 0x29, 0x48, 0xe1, 0x11, + 0xc3, 0x0e, 0xbf, 0x14, 0x2b, 0x3c, 0xe1, 0x7a, 0x41, 0x8c, 0x86, 0x42, 0x30, 0x1a, 0x0a, 0x25, + 0xc7, 0x2b, 0x6f, 0xff, 0xfc, 0xd3, 0x95, 0x0b, 0x2f, 0x54, 0x12, 0x55, 0x49, 0x0d, 0x78, 0x50, + 0x48, 0x79, 0x3d, 0xf9, 0x97, 0xff, 0x22, 0xfe, 0x96, 0x40, 0x3a, 0x08, 0xf5, 0x55, 0xdb, 0xb5, + 0x29, 0x23, 0xae, 0xa7, 0x3a, 0xcc, 0xf5, 0x60, 0x03, 0xa4, 0xc8, 0x00, 0xbb, 0x06, 0x0b, 0x9f, + 0xfa, 0x4e, 0xe1, 0xd8, 0x4c, 0x11, 0x78, 0x3d, 0x40, 0xf9, 0xb7, 0x15, 0x85, 0x24, 0xd1, 0xe3, + 0x8a, 0x1f, 0x7b, 0x5c, 0x37, 0xc0, 0xca, 0x70, 0x60, 0x71, 0xa1, 0x13, 0xff, 0x45, 0xe8, 0x39, + 0x08, 0x6e, 0x81, 0x44, 0x9f, 0x76, 0xf9, 0xe1, 0xad, 0x95, 0x5f, 0x7f, 0x3a, 0xcd, 0x41, 0x64, + 0x3c, 0x08, 0xaa, 0xdc, 0xc3, 0x94, 0x1a, 0x5d, 0x8c, 0xfc, 0x10, 0x05, 0x01, 0xf8, 0x22, 0x11, + 0x7c, 0x13, 0xac, 0xb5, 0x7b, 0xc4, 0xbc, 0xaf, 0x1f, 0x60, 0xbb, 0x7b, 0xc0, 0xc4, 0xc5, 0x42, + 0xa7, 0xb8, 0x6d, 0x97, 0x9b, 0xe0, 0x06, 0x58, 0x65, 0x23, 0xdd, 0x76, 0x2c, 0x3c, 0x12, 0x8d, + 0xa0, 0x15, 0x36, 0xd2, 0xfc, 0xad, 0x82, 0xc1, 0xd2, 0x1e, 0xb1, 0x70, 0x0f, 0xde, 0x04, 0x89, + 0xfb, 0xd8, 0x13, 0x4f, 0xa8, 0xfc, 0xde, 0xd3, 0x69, 0xee, 0x6a, 0xd7, 0x66, 0x07, 0xc3, 0x76, + 0xc1, 0x24, 0xfd, 0xa2, 0x49, 0xfa, 0x98, 0xb5, 0x3b, 0x2c, 0x5c, 0xf4, 0xec, 0x36, 0x2d, 0xb6, + 0x3d, 0x86, 0x69, 0x61, 0x17, 0x8f, 0xca, 0xfe, 0x02, 0xf9, 0x04, 0xfe, 0x6d, 0x14, 0xe3, 0x3c, + 0xce, 0x1f, 0xa3, 0xd8, 0x6c, 0xff, 0x10, 0x07, 0x20, 0x9c, 0x08, 0xf0, 0x7d, 0x70, 0xae, 0x54, + 0xa9, 0xa8, 0xcd, 0xa6, 0xde, 0xda, 0x6f, 0xa8, 0xfa, 0x9d, 0x5a, 0xb3, 0xa1, 0x56, 0xb4, 0x9b, + 0x9a, 0x5a, 0x95, 0x63, 0x99, 0x8d, 0xf1, 0x24, 0x7f, 0x36, 0x0c, 0xbe, 0xe3, 0xd0, 0x01, 0x36, + 0xed, 0x8e, 0x8d, 0x2d, 0x78, 0x19, 0xc0, 0x28, 0xae, 0x56, 0x2f, 0xd7, 0xab, 0xfb, 0xb2, 0x94, + 0x59, 0x1f, 0x4f, 0xf2, 0x72, 0x08, 0xa9, 0x91, 0x36, 0xb1, 0x3c, 0xf8, 0x01, 0x48, 0x47, 0xa3, + 0xeb, 0xb5, 0x0f, 0xf7, 0xf5, 0x52, 0xb5, 0x8a, 0xd4, 0x66, 0x53, 0x8e, 0x3f, 0x9f, 0xa6, 0xee, + 0xf4, 0xbc, 0xd2, 0xb3, 0x91, 0x7d, 0x36, 0x0a, 0x54, 0x3f, 0x52, 0xd1, 0x3e, 0xcf, 0x94, 0xc8, + 0x9c, 0x1b, 0x4f, 0xf2, 0xaf, 0x85, 0x28, 0xf5, 0x10, 0xbb, 0x1e, 0x4f, 0x76, 0x03, 0x6c, 0x46, + 0x31, 0xa5, 0xda, 0xbe, 0x5e, 0xbf, 0x19, 0xa4, 0x53, 0x9b, 0x72, 0x32, 0xb3, 0x39, 0x9e, 0xe4, + 0xd3, 0x21, 0xb4, 0xe4, 0x78, 0xf5, 0x4e, 0x29, 0x18, 0xf9, 0x99, 0xd5, 0xcf, 0xbe, 0xc9, 0xc6, + 0x1e, 0x7e, 0x9b, 0x8d, 0x6d, 0x7f, 0x97, 0x00, 0xf9, 0x93, 0x6e, 0x29, 0xc4, 0xe0, 0x6a, 0xa5, + 0x5e, 0x6b, 0xa1, 0x52, 0xa5, 0xa5, 0x57, 0xea, 0x55, 0x55, 0xdf, 0xd5, 0x9a, 0xad, 0x3a, 0xda, + 0xd7, 0xeb, 0x0d, 0x15, 0x95, 0x5a, 0x5a, 0xbd, 0xf6, 0x32, 0x69, 0x8b, 0xe3, 0x49, 0xfe, 0xd2, + 0x49, 0xdc, 0x51, 0xc1, 0xef, 0x82, 0x8b, 0x0b, 0xa5, 0xd1, 0x6a, 0x5a, 0x4b, 0x96, 0x32, 0x5b, + 0xe3, 0x49, 0xfe, 0xfc, 0x49, 0xfc, 0x9a, 0x63, 0x33, 0x78, 0x0f, 0x5c, 0x5e, 0x88, 0x78, 0x4f, + 0xbb, 0x85, 0x4a, 0x2d, 0x55, 0x8e, 0x67, 0x2e, 0x8d, 0x27, 0xf9, 0x77, 0x4e, 0xe2, 0xde, 0xb3, + 0xbb, 0xae, 0xc1, 0xf0, 0xc2, 0xf4, 0xb7, 0xd4, 0x9a, 0xda, 0xd4, 0x9a, 0x72, 0x62, 0x31, 0xfa, + 0x5b, 0xd8, 0xc1, 0xd4, 0xa6, 0x99, 0xa4, 0x7f, 0x58, 0xe5, 0xdd, 0x47, 0x7f, 0x64, 0x63, 0x0f, + 0x8f, 0xb2, 0xd2, 0xa3, 0xa3, 0xac, 0xf4, 0xf8, 0x28, 0x2b, 0xfd, 0x7e, 0x94, 0x95, 0xbe, 0x78, + 0x92, 0x8d, 0x3d, 0x7e, 0x92, 0x8d, 0xfd, 0xf6, 0x24, 0x1b, 0xfb, 0xe4, 0x42, 0xe4, 0x0d, 0x55, + 0x08, 0xed, 0xdf, 0x0d, 0x7e, 0xc4, 0xac, 0xe2, 0x48, 0xfc, 0x90, 0xf1, 0xbf, 0xb1, 0xf6, 0x32, + 0x1f, 0x91, 0xef, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x69, 0x83, 0x28, 0x71, 0xae, 0x09, 0x00, + 0x00, +} + +func (m *AccessTypeParam) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + that1, ok := that.(*AccessTypeParam) + if !ok { + that2, ok := that.(AccessTypeParam) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return m == nil + } else if m == nil { + return false + } + if m.Value != that1.Value { + return false + } + return true +} + +func (m *AccessConfig) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + that1, ok := that.(*AccessConfig) + if !ok { + that2, ok := that.(AccessConfig) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return m == nil + } else if m == nil { + return false + } + if m.Permission != that1.Permission { + return false + } + if m.Address != that1.Address { + return false + } + if len(m.Addresses) != len(that1.Addresses) { + return false + } + for i := range m.Addresses { + if m.Addresses[i] != that1.Addresses[i] { + return false + } + } + return true +} + +func (m *Params) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + that1, ok := that.(*Params) + if !ok { + that2, ok := that.(Params) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return m == nil + } else if m == nil { + return false + } + if !m.CodeUploadAccess.Equal(&that1.CodeUploadAccess) { + return false + } + if m.InstantiateDefaultPermission != that1.InstantiateDefaultPermission { + return false + } + return true +} + +func (m *CodeInfo) Equal(that interface{}) bool { + if that == nil { + return m == nil + } + + that1, ok := that.(*CodeInfo) + if !ok { + that2, ok := that.(CodeInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return m == nil + } else if m == nil { + return false + } + if !bytes.Equal(m.CodeHash, that1.CodeHash) { + return false + } + if m.Creator != that1.Creator { + return false + } + if !m.InstantiateConfig.Equal(&that1.InstantiateConfig) { + return false + } + return true +} + +func (m *AccessTypeParam) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessTypeParam) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessTypeParam) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Value != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Value)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *AccessConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Addresses) > 0 { + for iNdEx := len(m.Addresses) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Addresses[iNdEx]) + copy(dAtA[i:], m.Addresses[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Addresses[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x12 + } + if m.Permission != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Permission)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Params) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.InstantiateDefaultPermission != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.InstantiateDefaultPermission)) + i-- + dAtA[i] = 0x10 + } + { + size, err := m.CodeUploadAccess.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *CodeInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CodeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CodeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.InstantiateConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + if len(m.Creator) > 0 { + i -= len(m.Creator) + copy(dAtA[i:], m.Creator) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Creator))) + i-- + dAtA[i] = 0x12 + } + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} + +func (m *AccessTypeParam) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Value != 0 { + n += 1 + sovTypes(uint64(m.Value)) + } + return n +} + +func (m *AccessConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Permission != 0 { + n += 1 + sovTypes(uint64(m.Permission)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Addresses) > 0 { + for _, s := range m.Addresses { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.CodeUploadAccess.Size() + n += 1 + l + sovTypes(uint64(l)) + if m.InstantiateDefaultPermission != 0 { + n += 1 + sovTypes(uint64(m.InstantiateDefaultPermission)) + } + return n +} + +func (m *CodeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Creator) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = m.InstantiateConfig.Size() + n += 1 + l + sovTypes(uint64(l)) + return n +} + +func sovTypes(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} + +func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessTypeParam: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessTypeParam: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + m.Value = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Value |= AccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *AccessConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Permission", wireType) + } + m.Permission = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Permission |= AccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Addresses", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Addresses = append(m.Addresses, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *Params) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeUploadAccess", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CodeUploadAccess.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InstantiateDefaultPermission", wireType) + } + m.InstantiateDefaultPermission = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InstantiateDefaultPermission |= AccessType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *CodeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CodeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CodeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...) + if m.CodeHash == nil { + m.CodeHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Creator", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Creator = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstantiateConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InstantiateConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func skipTypes(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTypes + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTypes + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTypes + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTypes + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/migrations/v2/params_legacy.go b/x/wasm/migrations/v2/params_legacy.go new file mode 100644 index 0000000000..d4fad0bdef --- /dev/null +++ b/x/wasm/migrations/v2/params_legacy.go @@ -0,0 +1,142 @@ +/* +NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov +controlled execution of MsgUpdateParams messages. These types remains solely +for migration purposes and will be removed in a future release. +*/ +package v2 + +import ( + "encoding/json" + "fmt" + + "github.com/cosmos/gogoproto/jsonpb" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" + + "github.com/CosmWasm/wasmd/x/wasm/types" +) + +var ( + ParamStoreKeyUploadAccess = []byte("uploadAccess") + ParamStoreKeyInstantiateAccess = []byte("instantiateAccess") +) + +// Deprecated: Type declaration for parameters +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// ParamSetPairs returns the parameter set pairs. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{ + paramtypes.NewParamSetPair(ParamStoreKeyUploadAccess, &p.CodeUploadAccess, validateAccessConfig), + paramtypes.NewParamSetPair(ParamStoreKeyInstantiateAccess, &p.InstantiateDefaultPermission, validateAccessType), + } +} + +func validateAccessConfig(i interface{}) error { + v, ok := i.(AccessConfig) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + return v.ValidateBasic() +} + +var AllAccessTypes = []AccessType{ + AccessTypeNobody, + AccessTypeOnlyAddress, + AccessTypeAnyOfAddresses, + AccessTypeEverybody, +} + +func validateAccessType(i interface{}) error { + a, ok := i.(AccessType) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + if a == AccessTypeUnspecified { + return errorsmod.Wrap(types.ErrEmpty, "type") + } + for _, v := range AllAccessTypes { + if v == a { + return nil + } + } + return errorsmod.Wrapf(types.ErrInvalid, "unknown type: %q", a) +} + +func (a AccessConfig) ValidateBasic() error { + switch a.Permission { + case AccessTypeUnspecified: + return errorsmod.Wrap(types.ErrEmpty, "type") + case AccessTypeNobody, AccessTypeEverybody: + return nil + case AccessTypeOnlyAddress: + _, err := sdk.AccAddressFromBech32(a.Address) + return errorsmod.Wrap(err, "only address") + case AccessTypeAnyOfAddresses: + return errorsmod.Wrap(assertValidAddresses(a.Addresses), "addresses") + } + return errorsmod.Wrapf(types.ErrInvalid, "unknown type: %q", a.Permission) +} + +func assertValidAddresses(addrs []string) error { + if len(addrs) == 0 { + return types.ErrEmpty + } + idx := make(map[string]struct{}, len(addrs)) + for _, a := range addrs { + if _, err := sdk.AccAddressFromBech32(a); err != nil { + return errorsmod.Wrapf(err, "address: %s", a) + } + if _, exists := idx[a]; exists { + return types.ErrDuplicate.Wrapf("address: %s", a) + } + idx[a] = struct{}{} + } + return nil +} + +func (a AccessType) String() string { + switch a { + case AccessTypeNobody: + return "Nobody" + case AccessTypeOnlyAddress: + return "OnlyAddress" + case AccessTypeEverybody: + return "Everybody" + case AccessTypeAnyOfAddresses: + return "AnyOfAddresses" + } + return "Unspecified" +} + +func (a *AccessType) UnmarshalText(text []byte) error { + for _, v := range AllAccessTypes { + if v.String() == string(text) { + *a = v + return nil + } + } + *a = AccessTypeUnspecified + return nil +} + +func (a AccessType) MarshalText() ([]byte, error) { + return []byte(a.String()), nil +} + +func (a *AccessType) MarshalJSONPB(_ *jsonpb.Marshaler) ([]byte, error) { + return json.Marshal(a) +} + +func (a *AccessType) UnmarshalJSONPB(_ *jsonpb.Unmarshaler, data []byte) error { + return json.Unmarshal(data, a) +} + +func (a AccessConfig) Equals(o AccessConfig) bool { + return a.Permission == o.Permission && a.Address == o.Address +} diff --git a/x/wasm/migrations/v2/params_legacy_test.go b/x/wasm/migrations/v2/params_legacy_test.go new file mode 100644 index 0000000000..d405b0b368 --- /dev/null +++ b/x/wasm/migrations/v2/params_legacy_test.go @@ -0,0 +1,89 @@ +package v2 + +import ( + "encoding/json" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + + "github.com/cosmos/cosmos-sdk/codec" +) + +func TestAccessTypeMarshalJson(t *testing.T) { + specs := map[string]struct { + src AccessType + exp string + }{ + "Unspecified": {src: AccessTypeUnspecified, exp: `"Unspecified"`}, + "Nobody": {src: AccessTypeNobody, exp: `"Nobody"`}, + "OnlyAddress": {src: AccessTypeOnlyAddress, exp: `"OnlyAddress"`}, + "AccessTypeAnyOfAddresses": {src: AccessTypeAnyOfAddresses, exp: `"AnyOfAddresses"`}, + "Everybody": {src: AccessTypeEverybody, exp: `"Everybody"`}, + "unknown": {src: 999, exp: `"Unspecified"`}, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + got, err := json.Marshal(spec.src) + require.NoError(t, err) + assert.Equal(t, []byte(spec.exp), got) + }) + } +} + +func TestAccessTypeUnmarshalJson(t *testing.T) { + specs := map[string]struct { + src string + exp AccessType + }{ + "Unspecified": {src: `"Unspecified"`, exp: AccessTypeUnspecified}, + "Nobody": {src: `"Nobody"`, exp: AccessTypeNobody}, + "OnlyAddress": {src: `"OnlyAddress"`, exp: AccessTypeOnlyAddress}, + "AnyOfAddresses": {src: `"AnyOfAddresses"`, exp: AccessTypeAnyOfAddresses}, + "Everybody": {src: `"Everybody"`, exp: AccessTypeEverybody}, + "unknown": {src: `""`, exp: AccessTypeUnspecified}, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + var got AccessType + err := json.Unmarshal([]byte(spec.src), &got) + require.NoError(t, err) + assert.Equal(t, spec.exp, got) + }) + } +} + +func TestParamsUnmarshalJson(t *testing.T) { + specs := map[string]struct { + src string + exp Params + }{ + "defaults": { + src: `{"code_upload_access": {"permission": "Everybody"}, + "instantiate_default_permission": "Everybody"}`, + exp: Params{ + CodeUploadAccess: AccessConfig{Permission: AccessTypeEverybody}, + InstantiateDefaultPermission: AccessTypeEverybody, + }, + }, + "legacy type": { + src: `{"code_upload_access": {"permission": "OnlyAddress", "address": "wasm1lq3q55r9sqwqyrfmlp6xy8ufhayt96lmcttthz", "addresses": [] }, + "instantiate_default_permission": "Nobody"}`, + exp: Params{ + CodeUploadAccess: AccessConfig{ + Permission: AccessTypeOnlyAddress, Address: "wasm1lq3q55r9sqwqyrfmlp6xy8ufhayt96lmcttthz", Addresses: nil, + }, + InstantiateDefaultPermission: AccessTypeNobody, + }, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + var val Params + marshaler := codec.NewLegacyAmino() + err := marshaler.UnmarshalJSON([]byte(spec.src), &val) + require.NoError(t, err) + assert.Equal(t, spec.exp, val) + }) + } +} diff --git a/x/wasm/migrations/v2/store.go b/x/wasm/migrations/v2/store.go index de1490dbca..481ef6865c 100644 --- a/x/wasm/migrations/v2/store.go +++ b/x/wasm/migrations/v2/store.go @@ -16,13 +16,8 @@ import ( // module state. func MigrateStore(ctx sdk.Context, storeService corestoretypes.KVStoreService, legacySubspace exported.Subspace, cdc codec.BinaryCodec) error { store := storeService.OpenKVStore(ctx) - var currParams types.Params + var currParams Params legacySubspace.GetParamSet(ctx, &currParams) - - if err := currParams.ValidateBasic(); err != nil { - return err - } - bz, err := cdc.Marshal(&currParams) if err != nil { return err diff --git a/x/wasm/migrations/v2/store_test.go b/x/wasm/migrations/v2/store_test.go index df52ef3686..f087e6f42f 100644 --- a/x/wasm/migrations/v2/store_test.go +++ b/x/wasm/migrations/v2/store_test.go @@ -3,6 +3,8 @@ package v2_test import ( "testing" + "github.com/cometbft/cometbft/libs/rand" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" storetypes "cosmossdk.io/store/types" @@ -10,38 +12,90 @@ import ( "github.com/cosmos/cosmos-sdk/runtime" "github.com/cosmos/cosmos-sdk/testutil" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/address" moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + paramskeeper "github.com/cosmos/cosmos-sdk/x/params/keeper" + paramstypes "github.com/cosmos/cosmos-sdk/x/params/types" "github.com/CosmWasm/wasmd/x/wasm" - "github.com/CosmWasm/wasmd/x/wasm/exported" v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2" "github.com/CosmWasm/wasmd/x/wasm/types" ) -type mockSubspace struct { - ps types.Params -} +func TestMigrate(t *testing.T) { + cfg := moduletestutil.MakeTestEncodingConfig(wasm.AppModuleBasic{}) + cdc := cfg.Codec + var ( + wasmStoreKey = storetypes.NewKVStoreKey(types.StoreKey) + paramsStoreKey = storetypes.NewKVStoreKey(paramstypes.StoreKey) + paramsTStoreKey = storetypes.NewTransientStoreKey(paramstypes.TStoreKey) + myAddress = sdk.AccAddress(rand.Bytes(address.Len)) + ) + specs := map[string]struct { + src v2.Params + }{ + "one address": { + src: v2.Params{ + CodeUploadAccess: v2.AccessConfig{ + Permission: v2.AccessTypeOnlyAddress, + Address: myAddress.String(), + }, + InstantiateDefaultPermission: v2.AccessTypeNobody, + }, + }, + "multiple addresses": { + src: v2.Params{ + CodeUploadAccess: v2.AccessConfig{ + Permission: v2.AccessTypeAnyOfAddresses, + Addresses: []string{myAddress.String(), sdk.AccAddress(rand.Bytes(address.Len)).String()}, + }, + InstantiateDefaultPermission: v2.AccessTypeEverybody, + }, + }, + "everybody": { + src: v2.Params{ + CodeUploadAccess: v2.AccessConfig{ + Permission: v2.AccessTypeEverybody, + }, + InstantiateDefaultPermission: v2.AccessTypeEverybody, + }, + }, + "nobody": { + src: v2.Params{ + CodeUploadAccess: v2.AccessConfig{ + Permission: v2.AccessTypeNobody, + }, + InstantiateDefaultPermission: v2.AccessTypeNobody, + }, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + paramsKeeper := paramskeeper.NewKeeper(cdc, cfg.Amino, paramsStoreKey, paramsTStoreKey) + ctx := testutil.DefaultContextWithKeys( + map[string]*storetypes.KVStoreKey{ + paramstypes.StoreKey: paramsStoreKey, + types.StoreKey: wasmStoreKey, + }, + map[string]*storetypes.TransientStoreKey{ + paramstypes.TStoreKey: paramsTStoreKey, + }, + nil, + ) -func newMockSubspace(ps types.Params) mockSubspace { - return mockSubspace{ps: ps} -} + // register legacy parameters + params := spec.src + subspace := paramsKeeper.Subspace(types.ModuleName) + subspace.WithKeyTable(v2.ParamKeyTable()) + subspace.SetParamSet(ctx, ¶ms) -func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { - *ps.(*types.Params) = ms.ps -} + // when + require.NoError(t, v2.MigrateStore(ctx, runtime.NewKVStoreService(wasmStoreKey), subspace, cdc)) -func TestMigrate(t *testing.T) { - cdc := moduletestutil.MakeTestEncodingConfig(wasm.AppModuleBasic{}).Codec - storeKey := storetypes.NewKVStoreKey(types.StoreKey) - tKey := storetypes.NewTransientStoreKey("transient_test") - ctx := testutil.DefaultContext(storeKey, tKey) - store := ctx.KVStore(storeKey) - - legacySubspace := newMockSubspace(types.DefaultParams()) - require.NoError(t, v2.MigrateStore(ctx, runtime.NewKVStoreService(storeKey), legacySubspace, cdc)) - - var res types.Params - bz := store.Get(types.ParamsKey) - require.NoError(t, cdc.Unmarshal(bz, &res)) - require.Equal(t, legacySubspace.ps, res) + var res v2.Params + bz := ctx.KVStore(wasmStoreKey).Get(types.ParamsKey) + require.NoError(t, cdc.Unmarshal(bz, &res)) + assert.Equal(t, params, res) + }) + } } diff --git a/x/wasm/module.go b/x/wasm/module.go index d8b51c6323..2d285cdb29 100644 --- a/x/wasm/module.go +++ b/x/wasm/module.go @@ -24,6 +24,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" "github.com/CosmWasm/wasmd/x/wasm/client/cli" "github.com/CosmWasm/wasmd/x/wasm/exported" @@ -98,6 +99,18 @@ func (b AppModuleBasic) RegisterInterfaces(registry cdctypes.InterfaceRegistry) types.RegisterInterfaces(registry) // legacy support legacy.RegisterInterfaces(registry) + + // support legacy proposal querying + registry.RegisterImplementations( + (*v1beta1.Content)(nil), + &types.StoreCodeProposal{}, + &types.InstantiateContractProposal{}, + &types.MigrateContractProposal{}, + &types.UpdateAdminProposal{}, + &types.ClearAdminProposal{}, + &types.PinCodesProposal{}, + &types.UnpinCodesProposal{}, + ) } // ____________________________________________________________________________ diff --git a/x/wasm/module_test.go b/x/wasm/module_test.go index 61ba616967..9812a0d841 100644 --- a/x/wasm/module_test.go +++ b/x/wasm/module_test.go @@ -27,20 +27,21 @@ import ( "github.com/CosmWasm/wasmd/x/wasm/exported" "github.com/CosmWasm/wasmd/x/wasm/keeper" "github.com/CosmWasm/wasmd/x/wasm/keeper/testdata" + v2 "github.com/CosmWasm/wasmd/x/wasm/migrations/v2" "github.com/CosmWasm/wasmd/x/wasm/types" codectypes "github.com/cosmos/cosmos-sdk/codec/types" ) type mockSubspace struct { - ps types.Params + ps v2.Params } -func newMockSubspace(ps types.Params) mockSubspace { +func newMockSubspace(ps v2.Params) mockSubspace { return mockSubspace{ps: ps} } func (ms mockSubspace) GetParamSet(ctx sdk.Context, ps exported.ParamSet) { - *ps.(*types.Params) = ms.ps + *ps.(*v2.Params) = ms.ps } type testData struct { @@ -58,6 +59,11 @@ type testData struct { func setupTest(t *testing.T) testData { t.Helper() + DefaultParams := v2.Params{ + CodeUploadAccess: v2.AccessConfig{Permission: v2.AccessTypeEverybody}, + InstantiateDefaultPermission: v2.AccessTypeEverybody, + } + ctx, keepers := keeper.CreateTestInput(t, false, "iterator,staking,stargate,cosmwasm_1_1,cosmwasm_1_2,cosmwasm_1_3,cosmwasm_1_4") encConf := keeper.MakeEncodingConfig(t) queryRouter := baseapp.NewGRPCQueryRouter() @@ -65,7 +71,7 @@ func setupTest(t *testing.T) testData { queryRouter.SetInterfaceRegistry(encConf.InterfaceRegistry) serviceRouter.SetInterfaceRegistry(encConf.InterfaceRegistry) data := testData{ - module: NewAppModule(encConf.Codec, keepers.WasmKeeper, keepers.StakingKeeper, keepers.AccountKeeper, keepers.BankKeeper, nil, newMockSubspace(types.DefaultParams())), + module: NewAppModule(encConf.Codec, keepers.WasmKeeper, keepers.StakingKeeper, keepers.AccountKeeper, keepers.BankKeeper, nil, newMockSubspace(DefaultParams)), ctx: ctx, acctKeeper: keepers.AccountKeeper, keeper: *keepers.WasmKeeper, diff --git a/x/wasm/relay_pingpong_test.go b/x/wasm/relay_pingpong_test.go index 6e03c16a3e..3244066042 100644 --- a/x/wasm/relay_pingpong_test.go +++ b/x/wasm/relay_pingpong_test.go @@ -137,7 +137,7 @@ type player struct { // Execute starts the ping pong game // Contracts finds all connected channels and broadcasts a ping message -func (p *player) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (p *player) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.MessageInfo, executeMsg []byte, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { p.execCalls++ // start game var start startGame @@ -153,39 +153,43 @@ func (p *player) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.Mes p.incrementCounter(sentBallsCountKey, store) store.Set(lastBallSentKey, sdk.Uint64ToBigEndian(start.Value)) - return &wasmvmtypes.Response{ - Messages: []wasmvmtypes.SubMsg{ - { - Msg: wasmvmtypes.CosmosMsg{ - IBC: &wasmvmtypes.IBCMsg{ - SendPacket: &wasmvmtypes.SendPacketMsg{ - ChannelID: start.ChannelID, - Data: service.GetBytes(), - Timeout: wasmvmtypes.IBCTimeout{Block: &wasmvmtypes.IBCTimeoutBlock{ - Revision: doNotTimeout.RevisionNumber, - Height: doNotTimeout.RevisionHeight, - }}, + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{ + Messages: []wasmvmtypes.SubMsg{ + { + Msg: wasmvmtypes.CosmosMsg{ + IBC: &wasmvmtypes.IBCMsg{ + SendPacket: &wasmvmtypes.SendPacketMsg{ + ChannelID: start.ChannelID, + Data: service.GetBytes(), + Timeout: wasmvmtypes.IBCTimeout{Block: &wasmvmtypes.IBCTimeoutBlock{ + Revision: doNotTimeout.RevisionNumber, + Height: doNotTimeout.RevisionHeight, + }}, + }, }, }, + ReplyOn: wasmvmtypes.ReplyNever, }, - ReplyOn: wasmvmtypes.ReplyNever, }, }, }, 0, nil } // OnIBCChannelOpen ensures to accept only configured version -func (p player) IBCChannelOpen(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { +func (p player) IBCChannelOpen(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCChannelOpenMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { if msg.GetChannel().Version != p.actor { - return &wasmvmtypes.IBC3ChannelOpenResponse{}, 0, nil + return &wasmvmtypes.IBCChannelOpenResult{Ok: &wasmvmtypes.IBC3ChannelOpenResponse{}}, 0, nil } - return &wasmvmtypes.IBC3ChannelOpenResponse{}, 0, nil + return &wasmvmtypes.IBCChannelOpenResult{Ok: &wasmvmtypes.IBC3ChannelOpenResponse{}}, 0, nil } // OnIBCChannelConnect persists connection endpoints -func (p player) IBCChannelConnect(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (p player) IBCChannelConnect(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCChannelConnectMsg, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { p.storeEndpoint(store, msg.GetChannel()) - return &wasmvmtypes.IBCBasicResponse{}, 0, nil + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil } // connectedChannelsModel is a simple persistence model to store endpoint addresses within the contract's store @@ -210,7 +214,7 @@ func (p player) storeEndpoint(store wasmvm.KVStore, channel wasmvmtypes.IBCChann store.Set(ibcEndpointsKey, bz) } -func (p player) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (p player) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { panic("implement me") } @@ -262,6 +266,9 @@ func (p player) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmv return &wasmvmtypes.IBCReceiveResult{ Ok: &wasmvmtypes.IBCReceiveResponse{ + Attributes: wasmvmtypes.EventAttributes{ + {Key: "empty-value-test"}, + }, Acknowledgement: receivedBall.BuildAck().GetBytes(), Messages: []wasmvmtypes.SubMsg{{Msg: wasmvmtypes.CosmosMsg{IBC: respHit}, ReplyOn: wasmvmtypes.ReplyNever}}, }, @@ -269,7 +276,7 @@ func (p player) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmv } // OnIBCPacketAcknowledgement handles the packet acknowledgment frame. Stops the game on an any error -func (p player) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (p player) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, store wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { // parse received data and store var sentBall hit if err := json.Unmarshal(msg.OriginalPacket.Data, &sentBall); err != nil { @@ -288,10 +295,10 @@ func (p player) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtyp } p.incrementCounter(confirmedBallsCountKey, store) - return &wasmvmtypes.IBCBasicResponse{}, 0, nil + return &wasmvmtypes.IBCBasicResult{Ok: &wasmvmtypes.IBCBasicResponse{}}, 0, nil } -func (p player) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (p player) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { panic("implement me") } diff --git a/x/wasm/relay_test.go b/x/wasm/relay_test.go index 91f1f34d72..80ca58681f 100644 --- a/x/wasm/relay_test.go +++ b/x/wasm/relay_test.go @@ -551,9 +551,11 @@ type captureCloseContract struct { closeCalled bool } -func (c *captureCloseContract) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (c *captureCloseContract) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { c.closeCalled = true - return &wasmvmtypes.IBCBasicResponse{}, 1, nil + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 1, nil } var _ wasmtesting.IBCContractCallbacks = &sendViaIBCTransferContract{} @@ -564,7 +566,7 @@ type sendViaIBCTransferContract struct { t *testing.T } -func (s *sendViaIBCTransferContract) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.MessageInfo, executeMsg []byte, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { +func (s *sendViaIBCTransferContract) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.MessageInfo, executeMsg []byte, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.ContractResult, uint64, error) { var in startTransfer if err := json.Unmarshal(executeMsg, &in); err != nil { return nil, 0, err @@ -581,7 +583,9 @@ func (s *sendViaIBCTransferContract) Execute(_ wasmvm.Checksum, _ wasmvmtypes.En }, } - return &wasmvmtypes.Response{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: ibcMsg}}}}, 0, nil + return &wasmvmtypes.ContractResult{ + Ok: &wasmvmtypes.Response{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: ibcMsg}}}}, + }, 0, nil } var _ wasmtesting.IBCContractCallbacks = &sendEmulatedIBCTransferContract{} @@ -619,7 +623,7 @@ func (s *sendEmulatedIBCTransferContract) Execute(_ wasmvm.Checksum, _ wasmvmtyp return &wasmvmtypes.Response{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{IBC: ibcMsg}}}}, 0, nil } -func (s *sendEmulatedIBCTransferContract) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (s *sendEmulatedIBCTransferContract) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { packet := msg.Packet var data ibctransfertypes.FungibleTokenPacketData @@ -638,7 +642,9 @@ func (s *sendEmulatedIBCTransferContract) IBCPacketTimeout(_ wasmvm.Checksum, _ }, } - return &wasmvmtypes.IBCBasicResponse{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{Bank: returnTokens}}}}, 0, nil + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{Messages: []wasmvmtypes.SubMsg{{ReplyOn: wasmvmtypes.ReplyNever, Msg: wasmvmtypes.CosmosMsg{Bank: returnTokens}}}}, + }, 0, nil } var _ wasmtesting.IBCContractCallbacks = &closeChannelContract{} @@ -647,8 +653,10 @@ type closeChannelContract struct { contractStub } -func (c *closeChannelContract) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { - return &wasmvmtypes.IBCBasicResponse{}, 1, nil +func (c *closeChannelContract) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 1, nil } func (c *closeChannelContract) Execute(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.MessageInfo, executeMsg []byte, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.Response, uint64, error) { @@ -725,7 +733,7 @@ func (c *ackReceiverContract) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtypes. return &wasmvmtypes.IBCReceiveResult{Ok: &wasmvmtypes.IBCReceiveResponse{Acknowledgement: ack, Attributes: log}}, 0, nil } -func (c *ackReceiverContract) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (c *ackReceiverContract) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, msg wasmvmtypes.IBCPacketAckMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { var data ibctransfertypes.FungibleTokenPacketData if err := ibctransfertypes.ModuleCdc.UnmarshalJSON(msg.OriginalPacket.Data, &data); err != nil { return nil, 0, err @@ -745,7 +753,9 @@ func (c *ackReceiverContract) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, return nil, 0, errorsmod.Wrap(err, "within our smart contract") } - return &wasmvmtypes.IBCBasicResponse{}, 0, nil + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil } // contract that acts as the receiving side for an ics-20 transfer and always returns a nack. @@ -785,15 +795,17 @@ func (c *errorReceiverContract) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtype // simple helper struct that implements connection setup methods. type contractStub struct{} -func (s *contractStub) IBCChannelOpen(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelOpenMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) { - return &wasmvmtypes.IBC3ChannelOpenResponse{}, 0, nil +func (s *contractStub) IBCChannelOpen(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelOpenMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) { + return &wasmvmtypes.IBCChannelOpenResult{Ok: &wasmvmtypes.IBC3ChannelOpenResponse{}}, 0, nil } -func (s *contractStub) IBCChannelConnect(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelConnectMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { - return &wasmvmtypes.IBCBasicResponse{}, 0, nil +func (s *contractStub) IBCChannelConnect(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelConnectMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil } -func (s *contractStub) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (s *contractStub) IBCChannelClose(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCChannelCloseMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { panic("implement me") } @@ -801,11 +813,13 @@ func (s *contractStub) IBCPacketReceive(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ panic("implement me") } -func (s *contractStub) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketAckMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { - return &wasmvmtypes.IBCBasicResponse{}, 0, nil +func (s *contractStub) IBCPacketAck(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketAckMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { + return &wasmvmtypes.IBCBasicResult{ + Ok: &wasmvmtypes.IBCBasicResponse{}, + }, 0, nil } -func (s *contractStub) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResponse, uint64, error) { +func (s *contractStub) IBCPacketTimeout(_ wasmvm.Checksum, _ wasmvmtypes.Env, _ wasmvmtypes.IBCPacketTimeoutMsg, _ wasmvm.KVStore, _ wasmvm.GoAPI, _ wasmvm.Querier, _ wasmvm.GasMeter, _ uint64, _ wasmvmtypes.UFraction) (*wasmvmtypes.IBCBasicResult, uint64, error) { panic("implement me") } diff --git a/x/wasm/types/authz.pb.go b/x/wasm/types/authz.pb.go index 3213bcf1f3..831fa54a25 100644 --- a/x/wasm/types/authz.pb.go +++ b/x/wasm/types/authz.pb.go @@ -5,10 +5,6 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" @@ -16,14 +12,15 @@ import ( _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -44,11 +41,9 @@ func (*StoreCodeAuthorization) ProtoMessage() {} func (*StoreCodeAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{0} } - func (m *StoreCodeAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *StoreCodeAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_StoreCodeAuthorization.Marshal(b, m, deterministic) @@ -61,15 +56,12 @@ func (m *StoreCodeAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *StoreCodeAuthorization) XXX_Merge(src proto.Message) { xxx_messageInfo_StoreCodeAuthorization.Merge(m, src) } - func (m *StoreCodeAuthorization) XXX_Size() int { return m.Size() } - func (m *StoreCodeAuthorization) XXX_DiscardUnknown() { xxx_messageInfo_StoreCodeAuthorization.DiscardUnknown(m) } @@ -89,11 +81,9 @@ func (*ContractExecutionAuthorization) ProtoMessage() {} func (*ContractExecutionAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{1} } - func (m *ContractExecutionAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractExecutionAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractExecutionAuthorization.Marshal(b, m, deterministic) @@ -106,15 +96,12 @@ func (m *ContractExecutionAuthorization) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *ContractExecutionAuthorization) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractExecutionAuthorization.Merge(m, src) } - func (m *ContractExecutionAuthorization) XXX_Size() int { return m.Size() } - func (m *ContractExecutionAuthorization) XXX_DiscardUnknown() { xxx_messageInfo_ContractExecutionAuthorization.DiscardUnknown(m) } @@ -134,11 +121,9 @@ func (*ContractMigrationAuthorization) ProtoMessage() {} func (*ContractMigrationAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{2} } - func (m *ContractMigrationAuthorization) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractMigrationAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractMigrationAuthorization.Marshal(b, m, deterministic) @@ -151,15 +136,12 @@ func (m *ContractMigrationAuthorization) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *ContractMigrationAuthorization) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractMigrationAuthorization.Merge(m, src) } - func (m *ContractMigrationAuthorization) XXX_Size() int { return m.Size() } - func (m *ContractMigrationAuthorization) XXX_DiscardUnknown() { xxx_messageInfo_ContractMigrationAuthorization.DiscardUnknown(m) } @@ -183,11 +165,9 @@ func (*CodeGrant) ProtoMessage() {} func (*CodeGrant) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{3} } - func (m *CodeGrant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CodeGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CodeGrant.Marshal(b, m, deterministic) @@ -200,15 +180,12 @@ func (m *CodeGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *CodeGrant) XXX_Merge(src proto.Message) { xxx_messageInfo_CodeGrant.Merge(m, src) } - func (m *CodeGrant) XXX_Size() int { return m.Size() } - func (m *CodeGrant) XXX_DiscardUnknown() { xxx_messageInfo_CodeGrant.DiscardUnknown(m) } @@ -235,11 +212,9 @@ func (*ContractGrant) ProtoMessage() {} func (*ContractGrant) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{4} } - func (m *ContractGrant) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractGrant.Marshal(b, m, deterministic) @@ -252,15 +227,12 @@ func (m *ContractGrant) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *ContractGrant) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractGrant.Merge(m, src) } - func (m *ContractGrant) XXX_Size() int { return m.Size() } - func (m *ContractGrant) XXX_DiscardUnknown() { xxx_messageInfo_ContractGrant.DiscardUnknown(m) } @@ -280,11 +252,9 @@ func (*MaxCallsLimit) ProtoMessage() {} func (*MaxCallsLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{5} } - func (m *MaxCallsLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MaxCallsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MaxCallsLimit.Marshal(b, m, deterministic) @@ -297,15 +267,12 @@ func (m *MaxCallsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MaxCallsLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_MaxCallsLimit.Merge(m, src) } - func (m *MaxCallsLimit) XXX_Size() int { return m.Size() } - func (m *MaxCallsLimit) XXX_DiscardUnknown() { xxx_messageInfo_MaxCallsLimit.DiscardUnknown(m) } @@ -325,11 +292,9 @@ func (*MaxFundsLimit) ProtoMessage() {} func (*MaxFundsLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{6} } - func (m *MaxFundsLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MaxFundsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MaxFundsLimit.Marshal(b, m, deterministic) @@ -342,15 +307,12 @@ func (m *MaxFundsLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MaxFundsLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_MaxFundsLimit.Merge(m, src) } - func (m *MaxFundsLimit) XXX_Size() int { return m.Size() } - func (m *MaxFundsLimit) XXX_DiscardUnknown() { xxx_messageInfo_MaxFundsLimit.DiscardUnknown(m) } @@ -373,11 +335,9 @@ func (*CombinedLimit) ProtoMessage() {} func (*CombinedLimit) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{7} } - func (m *CombinedLimit) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CombinedLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CombinedLimit.Marshal(b, m, deterministic) @@ -390,15 +350,12 @@ func (m *CombinedLimit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *CombinedLimit) XXX_Merge(src proto.Message) { xxx_messageInfo_CombinedLimit.Merge(m, src) } - func (m *CombinedLimit) XXX_Size() int { return m.Size() } - func (m *CombinedLimit) XXX_DiscardUnknown() { xxx_messageInfo_CombinedLimit.DiscardUnknown(m) } @@ -408,7 +365,8 @@ var xxx_messageInfo_CombinedLimit proto.InternalMessageInfo // AllowAllMessagesFilter is a wildcard to allow any type of contract payload // message. // Since: wasmd 0.30 -type AllowAllMessagesFilter struct{} +type AllowAllMessagesFilter struct { +} func (m *AllowAllMessagesFilter) Reset() { *m = AllowAllMessagesFilter{} } func (m *AllowAllMessagesFilter) String() string { return proto.CompactTextString(m) } @@ -416,11 +374,9 @@ func (*AllowAllMessagesFilter) ProtoMessage() {} func (*AllowAllMessagesFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{8} } - func (m *AllowAllMessagesFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AllowAllMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AllowAllMessagesFilter.Marshal(b, m, deterministic) @@ -433,15 +389,12 @@ func (m *AllowAllMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *AllowAllMessagesFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AllowAllMessagesFilter.Merge(m, src) } - func (m *AllowAllMessagesFilter) XXX_Size() int { return m.Size() } - func (m *AllowAllMessagesFilter) XXX_DiscardUnknown() { xxx_messageInfo_AllowAllMessagesFilter.DiscardUnknown(m) } @@ -462,11 +415,9 @@ func (*AcceptedMessageKeysFilter) ProtoMessage() {} func (*AcceptedMessageKeysFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{9} } - func (m *AcceptedMessageKeysFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AcceptedMessageKeysFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AcceptedMessageKeysFilter.Marshal(b, m, deterministic) @@ -479,15 +430,12 @@ func (m *AcceptedMessageKeysFilter) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } - func (m *AcceptedMessageKeysFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AcceptedMessageKeysFilter.Merge(m, src) } - func (m *AcceptedMessageKeysFilter) XXX_Size() int { return m.Size() } - func (m *AcceptedMessageKeysFilter) XXX_DiscardUnknown() { xxx_messageInfo_AcceptedMessageKeysFilter.DiscardUnknown(m) } @@ -508,11 +456,9 @@ func (*AcceptedMessagesFilter) ProtoMessage() {} func (*AcceptedMessagesFilter) Descriptor() ([]byte, []int) { return fileDescriptor_36ff3a20cf32b258, []int{10} } - func (m *AcceptedMessagesFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AcceptedMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AcceptedMessagesFilter.Marshal(b, m, deterministic) @@ -525,15 +471,12 @@ func (m *AcceptedMessagesFilter) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *AcceptedMessagesFilter) XXX_Merge(src proto.Message) { xxx_messageInfo_AcceptedMessagesFilter.Merge(m, src) } - func (m *AcceptedMessagesFilter) XXX_Size() int { return m.Size() } - func (m *AcceptedMessagesFilter) XXX_DiscardUnknown() { xxx_messageInfo_AcceptedMessagesFilter.DiscardUnknown(m) } @@ -1022,7 +965,6 @@ func encodeVarintAuthz(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *StoreCodeAuthorization) Size() (n int) { if m == nil { return 0 @@ -1193,11 +1135,9 @@ func (m *AcceptedMessagesFilter) Size() (n int) { func sovAuthz(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozAuthz(x uint64) (n int) { return sovAuthz(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *StoreCodeAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1282,7 +1222,6 @@ func (m *StoreCodeAuthorization) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractExecutionAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1367,7 +1306,6 @@ func (m *ContractExecutionAuthorization) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractMigrationAuthorization) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1452,7 +1390,6 @@ func (m *ContractMigrationAuthorization) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeGrant) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1573,7 +1510,6 @@ func (m *CodeGrant) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractGrant) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1728,7 +1664,6 @@ func (m *ContractGrant) Unmarshal(dAtA []byte) error { } return nil } - func (m *MaxCallsLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1798,7 +1733,6 @@ func (m *MaxCallsLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *MaxFundsLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1883,7 +1817,6 @@ func (m *MaxFundsLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *CombinedLimit) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1987,7 +1920,6 @@ func (m *CombinedLimit) Unmarshal(dAtA []byte) error { } return nil } - func (m *AllowAllMessagesFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2038,7 +1970,6 @@ func (m *AllowAllMessagesFilter) Unmarshal(dAtA []byte) error { } return nil } - func (m *AcceptedMessageKeysFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2121,7 +2052,6 @@ func (m *AcceptedMessageKeysFilter) Unmarshal(dAtA []byte) error { } return nil } - func (m *AcceptedMessagesFilter) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2204,7 +2134,6 @@ func (m *AcceptedMessagesFilter) Unmarshal(dAtA []byte) error { } return nil } - func skipAuthz(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/codec.go b/x/wasm/types/codec.go index b8866cc93c..277af11d5f 100644 --- a/x/wasm/types/codec.go +++ b/x/wasm/types/codec.go @@ -9,7 +9,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" ) -// RegisterLegacyAminoCodec registers the account types and interface +// RegisterLegacyAminoCodec registers the concrete types and interface func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&MsgStoreCode{}, "wasm/MsgStoreCode", nil) cdc.RegisterConcrete(&MsgInstantiateContract{}, "wasm/MsgInstantiateContract", nil) @@ -44,8 +44,23 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { cdc.RegisterConcrete(&StoreCodeAuthorization{}, "wasm/StoreCodeAuthorization", nil) cdc.RegisterConcrete(&ContractExecutionAuthorization{}, "wasm/ContractExecutionAuthorization", nil) cdc.RegisterConcrete(&ContractMigrationAuthorization{}, "wasm/ContractMigrationAuthorization", nil) + + // legacy gov v1beta1 types that may be used for unmarshalling stored gov data + cdc.RegisterConcrete(&PinCodesProposal{}, "wasm/PinCodesProposal", nil) + cdc.RegisterConcrete(&UnpinCodesProposal{}, "wasm/UnpinCodesProposal", nil) + cdc.RegisterConcrete(&StoreCodeProposal{}, "wasm/StoreCodeProposal", nil) + cdc.RegisterConcrete(&InstantiateContractProposal{}, "wasm/InstantiateContractProposal", nil) + cdc.RegisterConcrete(&InstantiateContract2Proposal{}, "wasm/InstantiateContract2Proposal", nil) + cdc.RegisterConcrete(&MigrateContractProposal{}, "wasm/MigrateContractProposal", nil) + cdc.RegisterConcrete(&SudoContractProposal{}, "wasm/SudoContractProposal", nil) + cdc.RegisterConcrete(&ExecuteContractProposal{}, "wasm/ExecuteContractProposal", nil) + cdc.RegisterConcrete(&UpdateAdminProposal{}, "wasm/UpdateAdminProposal", nil) + cdc.RegisterConcrete(&ClearAdminProposal{}, "wasm/ClearAdminProposal", nil) + cdc.RegisterConcrete(&UpdateInstantiateConfigProposal{}, "wasm/UpdateInstantiateConfigProposal", nil) + cdc.RegisterConcrete(&StoreAndInstantiateContractProposal{}, "wasm/StoreAndInstantiateContractProposal", nil) } +// RegisterInterfaces registers the concrete proto types and interfaces with the SDK interface registry func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), @@ -69,10 +84,6 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgStoreAndMigrateContract{}, &MsgUpdateContractLabel{}, ) - registry.RegisterImplementations( - (*v1beta1.Content)(nil), - ) - registry.RegisterInterface("cosmwasm.wasm.v1.ContractInfoExtension", (*ContractInfoExtension)(nil)) registry.RegisterInterface("cosmwasm.wasm.v1.ContractAuthzFilterX", (*ContractAuthzFilterX)(nil)) @@ -99,4 +110,21 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) + + // legacy gov v1beta1 types that may be used for unmarshalling stored gov data + registry.RegisterImplementations( + (*v1beta1.Content)(nil), + &StoreCodeProposal{}, + &InstantiateContractProposal{}, + &InstantiateContract2Proposal{}, + &MigrateContractProposal{}, + &SudoContractProposal{}, + &ExecuteContractProposal{}, + &UpdateAdminProposal{}, + &ClearAdminProposal{}, + &PinCodesProposal{}, + &UnpinCodesProposal{}, + &UpdateInstantiateConfigProposal{}, + &StoreAndInstantiateContractProposal{}, + ) } diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index ff6ad94589..dcf072a152 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -5,22 +5,19 @@ package types import ( fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -42,11 +39,9 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{0} } - func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) @@ -59,15 +54,12 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *GenesisState) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState.Merge(m, src) } - func (m *GenesisState) XXX_Size() int { return m.Size() } - func (m *GenesisState) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState.DiscardUnknown(m) } @@ -117,11 +109,9 @@ func (*Code) ProtoMessage() {} func (*Code) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{1} } - func (m *Code) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Code) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Code.Marshal(b, m, deterministic) @@ -134,15 +124,12 @@ func (m *Code) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Code) XXX_Merge(src proto.Message) { xxx_messageInfo_Code.Merge(m, src) } - func (m *Code) XXX_Size() int { return m.Size() } - func (m *Code) XXX_DiscardUnknown() { xxx_messageInfo_Code.DiscardUnknown(m) } @@ -191,11 +178,9 @@ func (*Contract) ProtoMessage() {} func (*Contract) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{2} } - func (m *Contract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Contract.Marshal(b, m, deterministic) @@ -208,15 +193,12 @@ func (m *Contract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Contract) XXX_Merge(src proto.Message) { xxx_messageInfo_Contract.Merge(m, src) } - func (m *Contract) XXX_Size() int { return m.Size() } - func (m *Contract) XXX_DiscardUnknown() { xxx_messageInfo_Contract.DiscardUnknown(m) } @@ -263,11 +245,9 @@ func (*Sequence) ProtoMessage() {} func (*Sequence) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{3} } - func (m *Sequence) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Sequence.Marshal(b, m, deterministic) @@ -280,15 +260,12 @@ func (m *Sequence) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Sequence) XXX_Merge(src proto.Message) { xxx_messageInfo_Sequence.Merge(m, src) } - func (m *Sequence) XXX_Size() int { return m.Size() } - func (m *Sequence) XXX_DiscardUnknown() { xxx_messageInfo_Sequence.DiscardUnknown(m) } @@ -603,7 +580,6 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -700,11 +676,9 @@ func (m *Sequence) Size() (n int) { func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -890,7 +864,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } - func (m *Code) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1047,7 +1020,6 @@ func (m *Code) Unmarshal(dAtA []byte) error { } return nil } - func (m *Contract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1231,7 +1203,6 @@ func (m *Contract) Unmarshal(dAtA []byte) error { } return nil } - func (m *Sequence) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1335,7 +1306,6 @@ func (m *Sequence) Unmarshal(dAtA []byte) error { } return nil } - func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/ibc.pb.go b/x/wasm/types/ibc.pb.go index 0e250491f9..2a5af9b454 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -5,20 +5,17 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -47,11 +44,9 @@ func (*MsgIBCSend) ProtoMessage() {} func (*MsgIBCSend) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{0} } - func (m *MsgIBCSend) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCSend.Marshal(b, m, deterministic) @@ -64,15 +59,12 @@ func (m *MsgIBCSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *MsgIBCSend) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCSend.Merge(m, src) } - func (m *MsgIBCSend) XXX_Size() int { return m.Size() } - func (m *MsgIBCSend) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCSend.DiscardUnknown(m) } @@ -91,11 +83,9 @@ func (*MsgIBCSendResponse) ProtoMessage() {} func (*MsgIBCSendResponse) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{1} } - func (m *MsgIBCSendResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCSendResponse.Marshal(b, m, deterministic) @@ -108,15 +98,12 @@ func (m *MsgIBCSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgIBCSendResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCSendResponse.Merge(m, src) } - func (m *MsgIBCSendResponse) XXX_Size() int { return m.Size() } - func (m *MsgIBCSendResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCSendResponse.DiscardUnknown(m) } @@ -134,11 +121,9 @@ func (*MsgIBCCloseChannel) ProtoMessage() {} func (*MsgIBCCloseChannel) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{2} } - func (m *MsgIBCCloseChannel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgIBCCloseChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgIBCCloseChannel.Marshal(b, m, deterministic) @@ -151,15 +136,12 @@ func (m *MsgIBCCloseChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgIBCCloseChannel) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgIBCCloseChannel.Merge(m, src) } - func (m *MsgIBCCloseChannel) XXX_Size() int { return m.Size() } - func (m *MsgIBCCloseChannel) XXX_DiscardUnknown() { xxx_messageInfo_MsgIBCCloseChannel.DiscardUnknown(m) } @@ -315,7 +297,6 @@ func encodeVarintIbc(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *MsgIBCSend) Size() (n int) { if m == nil { return 0 @@ -367,11 +348,9 @@ func (m *MsgIBCCloseChannel) Size() (n int) { func sovIbc(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozIbc(x uint64) (n int) { return sovIbc(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -526,7 +505,6 @@ func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgIBCSendResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -596,7 +574,6 @@ func (m *MsgIBCSendResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -679,7 +656,6 @@ func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { } return nil } - func skipIbc(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/params.go b/x/wasm/types/params.go index 9793ee68a0..4b923b1bd3 100644 --- a/x/wasm/types/params.go +++ b/x/wasm/types/params.go @@ -2,7 +2,6 @@ package types import ( "encoding/json" - "fmt" "github.com/cosmos/gogoproto/jsonpb" "github.com/pkg/errors" @@ -104,25 +103,13 @@ func (p Params) ValidateBasic() error { if err := validateAccessType(p.InstantiateDefaultPermission); err != nil { return errors.Wrap(err, "instantiate default permission") } - if err := validateAccessConfig(p.CodeUploadAccess); err != nil { + if err := p.CodeUploadAccess.ValidateBasic(); err != nil { return errors.Wrap(err, "upload access") } return nil } -func validateAccessConfig(i interface{}) error { - v, ok := i.(AccessConfig) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } - return v.ValidateBasic() -} - -func validateAccessType(i interface{}) error { - a, ok := i.(AccessType) - if !ok { - return fmt.Errorf("invalid parameter type: %T", i) - } +func validateAccessType(a AccessType) error { if a == AccessTypeUnspecified { return errorsmod.Wrap(ErrEmpty, "type") } diff --git a/x/wasm/types/params_legacy.go b/x/wasm/types/params_legacy.go deleted file mode 100644 index db38cb8bee..0000000000 --- a/x/wasm/types/params_legacy.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -NOTE: Usage of x/params to manage parameters is deprecated in favor of x/gov -controlled execution of MsgUpdateParams messages. These types remains solely -for migration purposes and will be removed in a future release. -*/ -package types - -import paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" - -var ( - ParamStoreKeyUploadAccess = []byte("uploadAccess") - ParamStoreKeyInstantiateAccess = []byte("instantiateAccess") -) - -// Deprecated: Type declaration for parameters -func ParamKeyTable() paramtypes.KeyTable { - return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) -} - -// ParamSetPairs returns the parameter set pairs. -func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { - return paramtypes.ParamSetPairs{ - paramtypes.NewParamSetPair(ParamStoreKeyUploadAccess, &p.CodeUploadAccess, validateAccessConfig), - paramtypes.NewParamSetPair(ParamStoreKeyInstantiateAccess, &p.InstantiateDefaultPermission, validateAccessType), - } -} diff --git a/x/wasm/types/proposal_legacy.go b/x/wasm/types/proposal_legacy.go new file mode 100644 index 0000000000..9745e4772e --- /dev/null +++ b/x/wasm/types/proposal_legacy.go @@ -0,0 +1,804 @@ +package types + +import ( + "encoding/base64" + "encoding/hex" + "fmt" + "strings" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +type ProposalType string + +const ( + ProposalTypeStoreCode ProposalType = "StoreCode" + ProposalTypeInstantiateContract ProposalType = "InstantiateContract" + ProposalTypeInstantiateContract2 ProposalType = "InstantiateContract2" + ProposalTypeMigrateContract ProposalType = "MigrateContract" + ProposalTypeSudoContract ProposalType = "SudoContract" + ProposalTypeExecuteContract ProposalType = "ExecuteContract" + ProposalTypeUpdateAdmin ProposalType = "UpdateAdmin" + ProposalTypeClearAdmin ProposalType = "ClearAdmin" + ProposalTypePinCodes ProposalType = "PinCodes" + ProposalTypeUnpinCodes ProposalType = "UnpinCodes" + ProposalTypeUpdateInstantiateConfig ProposalType = "UpdateInstantiateConfig" + ProposalTypeStoreAndInstantiateContractProposal ProposalType = "StoreAndInstantiateContract" +) + +// DisableAllProposals contains no wasm gov types. +// Deprecated: all gov v1beta1 types will be removed +var DisableAllProposals []ProposalType + +// EnableAllProposals contains all wasm gov types as keys. +// Deprecated: all gov v1beta1 types will be removed +var EnableAllProposals = []ProposalType{ + ProposalTypeStoreCode, + ProposalTypeInstantiateContract, + ProposalTypeInstantiateContract2, + ProposalTypeMigrateContract, + ProposalTypeSudoContract, + ProposalTypeExecuteContract, + ProposalTypeUpdateAdmin, + ProposalTypeClearAdmin, + ProposalTypePinCodes, + ProposalTypeUnpinCodes, + ProposalTypeUpdateInstantiateConfig, + ProposalTypeStoreAndInstantiateContractProposal, +} + +// Deprecated: all gov v1beta1 types will be removed +func init() { // register new content types with the sdk + v1beta1.RegisterProposalType(string(ProposalTypeStoreCode)) + v1beta1.RegisterProposalType(string(ProposalTypeInstantiateContract)) + v1beta1.RegisterProposalType(string(ProposalTypeInstantiateContract2)) + v1beta1.RegisterProposalType(string(ProposalTypeMigrateContract)) + v1beta1.RegisterProposalType(string(ProposalTypeSudoContract)) + v1beta1.RegisterProposalType(string(ProposalTypeExecuteContract)) + v1beta1.RegisterProposalType(string(ProposalTypeUpdateAdmin)) + v1beta1.RegisterProposalType(string(ProposalTypeClearAdmin)) + v1beta1.RegisterProposalType(string(ProposalTypePinCodes)) + v1beta1.RegisterProposalType(string(ProposalTypeUnpinCodes)) + v1beta1.RegisterProposalType(string(ProposalTypeUpdateInstantiateConfig)) + v1beta1.RegisterProposalType(string(ProposalTypeStoreAndInstantiateContractProposal)) +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p StoreCodeProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *StoreCodeProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p StoreCodeProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p StoreCodeProposal) ProposalType() string { return string(ProposalTypeStoreCode) } + +// ValidateBasic validates the proposal +func (p StoreCodeProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { + return errorsmod.Wrap(err, "run as") + } + + if err := validateWasmCode(p.WASMByteCode, MaxProposalWasmSize); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "code bytes %s", err.Error()) + } + + if p.InstantiatePermission != nil { + if err := p.InstantiatePermission.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "instantiate permission") + } + } + + if err := ValidateVerificationInfo(p.Source, p.Builder, p.CodeHash); err != nil { + return errorsmod.Wrapf(err, "code verification info") + } + return nil +} + +// String implements the Stringer interface. +func (p StoreCodeProposal) String() string { + return fmt.Sprintf(`Store Code Proposal: + Title: %s + Description: %s + Run as: %s + WasmCode: %X + Source: %s + Builder: %s + Code Hash: %X +`, p.Title, p.Description, p.RunAs, p.WASMByteCode, p.Source, p.Builder, p.CodeHash) +} + +// MarshalYAML pretty prints the wasm byte code +func (p StoreCodeProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + RunAs string `yaml:"run_as"` + WASMByteCode string `yaml:"wasm_byte_code"` + InstantiatePermission *AccessConfig `yaml:"instantiate_permission"` + Source string `yaml:"source"` + Builder string `yaml:"builder"` + CodeHash string `yaml:"code_hash"` + }{ + Title: p.Title, + Description: p.Description, + RunAs: p.RunAs, + WASMByteCode: base64.StdEncoding.EncodeToString(p.WASMByteCode), + InstantiatePermission: p.InstantiatePermission, + Source: p.Source, + Builder: p.Builder, + CodeHash: hex.EncodeToString(p.CodeHash), + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p InstantiateContractProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *InstantiateContractProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p InstantiateContractProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p InstantiateContractProposal) ProposalType() string { + return string(ProposalTypeInstantiateContract) +} + +// ValidateBasic validates the proposal +func (p InstantiateContractProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "run as") + } + + if p.CodeID == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "code id is required") + } + + if err := ValidateLabel(p.Label); err != nil { + return err + } + + if !p.Funds.IsValid() { + return sdkerrors.ErrInvalidCoins + } + + if len(p.Admin) != 0 { + if _, err := sdk.AccAddressFromBech32(p.Admin); err != nil { + return err + } + } + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + return nil +} + +// String implements the Stringer interface. +func (p InstantiateContractProposal) String() string { + return fmt.Sprintf(`Instantiate Code Proposal: + Title: %s + Description: %s + Run as: %s + Admin: %s + Code id: %d + Label: %s + Msg: %q + Funds: %s +`, p.Title, p.Description, p.RunAs, p.Admin, p.CodeID, p.Label, p.Msg, p.Funds) +} + +// MarshalYAML pretty prints the init message +func (p InstantiateContractProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + RunAs string `yaml:"run_as"` + Admin string `yaml:"admin"` + CodeID uint64 `yaml:"code_id"` + Label string `yaml:"label"` + Msg string `yaml:"msg"` + Funds sdk.Coins `yaml:"funds"` + }{ + Title: p.Title, + Description: p.Description, + RunAs: p.RunAs, + Admin: p.Admin, + CodeID: p.CodeID, + Label: p.Label, + Msg: string(p.Msg), + Funds: p.Funds, + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p InstantiateContract2Proposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *InstantiateContract2Proposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p InstantiateContract2Proposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p InstantiateContract2Proposal) ProposalType() string { + return string(ProposalTypeInstantiateContract2) +} + +// ValidateBasic validates the proposal +func (p InstantiateContract2Proposal) ValidateBasic() error { + // Validate title and description + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + // Validate run as + if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "run as") + } + // Validate admin + if len(p.Admin) != 0 { + if _, err := sdk.AccAddressFromBech32(p.Admin); err != nil { + return err + } + } + // Validate codeid + if p.CodeID == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "code id is required") + } + // Validate label + if err := ValidateLabel(p.Label); err != nil { + return err + } + // Validate msg + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + // Validate funds + if !p.Funds.IsValid() { + return sdkerrors.ErrInvalidCoins + } + // Validate salt + if len(p.Salt) == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "salt is required") + } + return nil +} + +// String implements the Stringer interface. +func (p InstantiateContract2Proposal) String() string { + return fmt.Sprintf(`Instantiate Code Proposal: + Title: %s + Description: %s + Run as: %s + Admin: %s + Code id: %d + Label: %s + Msg: %q + Funds: %s + Salt: %X +`, p.Title, p.Description, p.RunAs, p.Admin, p.CodeID, p.Label, p.Msg, p.Funds, p.Salt) +} + +// MarshalYAML pretty prints the init message +func (p InstantiateContract2Proposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + RunAs string `yaml:"run_as"` + Admin string `yaml:"admin"` + CodeID uint64 `yaml:"code_id"` + Label string `yaml:"label"` + Msg string `yaml:"msg"` + Funds sdk.Coins `yaml:"funds"` + Salt string `yaml:"salt"` + }{ + Title: p.Title, + Description: p.Description, + RunAs: p.RunAs, + Admin: p.Admin, + CodeID: p.CodeID, + Label: p.Label, + Msg: string(p.Msg), + Funds: p.Funds, + Salt: base64.StdEncoding.EncodeToString(p.Salt), + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p StoreAndInstantiateContractProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *StoreAndInstantiateContractProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p StoreAndInstantiateContractProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p StoreAndInstantiateContractProposal) ProposalType() string { + return string(ProposalTypeStoreAndInstantiateContractProposal) +} + +// ValidateBasic validates the proposal +func (p StoreAndInstantiateContractProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { + return errorsmod.Wrap(err, "run as") + } + + if err := validateWasmCode(p.WASMByteCode, MaxProposalWasmSize); err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidRequest, "code bytes %s", err.Error()) + } + + if err := ValidateVerificationInfo(p.Source, p.Builder, p.CodeHash); err != nil { + return errorsmod.Wrap(err, "code info") + } + + if p.InstantiatePermission != nil { + if err := p.InstantiatePermission.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "instantiate permission") + } + } + + if err := ValidateLabel(p.Label); err != nil { + return err + } + + if !p.Funds.IsValid() { + return sdkerrors.ErrInvalidCoins + } + + if len(p.Admin) != 0 { + if _, err := sdk.AccAddressFromBech32(p.Admin); err != nil { + return err + } + } + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + return nil +} + +// String implements the Stringer interface. +func (p StoreAndInstantiateContractProposal) String() string { + return fmt.Sprintf(`Store And Instantiate Coontract Proposal: + Title: %s + Description: %s + Run as: %s + WasmCode: %X + Source: %s + Builder: %s + Code Hash: %X + Instantiate permission: %s + Unpin code: %t + Admin: %s + Label: %s + Msg: %q + Funds: %s +`, p.Title, p.Description, p.RunAs, p.WASMByteCode, p.Source, p.Builder, p.CodeHash, p.InstantiatePermission, p.UnpinCode, p.Admin, p.Label, p.Msg, p.Funds) +} + +// MarshalYAML pretty prints the wasm byte code and the init message +func (p StoreAndInstantiateContractProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + RunAs string `yaml:"run_as"` + WASMByteCode string `yaml:"wasm_byte_code"` + Source string `yaml:"source"` + Builder string `yaml:"builder"` + CodeHash string `yaml:"code_hash"` + InstantiatePermission *AccessConfig `yaml:"instantiate_permission"` + UnpinCode bool `yaml:"unpin_code"` + Admin string `yaml:"admin"` + Label string `yaml:"label"` + Msg string `yaml:"msg"` + Funds sdk.Coins `yaml:"funds"` + }{ + Title: p.Title, + Description: p.Description, + RunAs: p.RunAs, + WASMByteCode: base64.StdEncoding.EncodeToString(p.WASMByteCode), + InstantiatePermission: p.InstantiatePermission, + UnpinCode: p.UnpinCode, + Admin: p.Admin, + Label: p.Label, + Source: p.Source, + Builder: p.Builder, + CodeHash: hex.EncodeToString(p.CodeHash), + Msg: string(p.Msg), + Funds: p.Funds, + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p MigrateContractProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *MigrateContractProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p MigrateContractProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p MigrateContractProposal) ProposalType() string { return string(ProposalTypeMigrateContract) } + +// ValidateBasic validates the proposal +func (p MigrateContractProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if p.CodeID == 0 { + return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "code_id is required") + } + if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { + return errorsmod.Wrap(err, "contract") + } + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + return nil +} + +// String implements the Stringer interface. +func (p MigrateContractProposal) String() string { + return fmt.Sprintf(`Migrate Contract Proposal: + Title: %s + Description: %s + Contract: %s + Code id: %d + Msg: %q +`, p.Title, p.Description, p.Contract, p.CodeID, p.Msg) +} + +// MarshalYAML pretty prints the migrate message +func (p MigrateContractProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + Contract string `yaml:"contract"` + CodeID uint64 `yaml:"code_id"` + Msg string `yaml:"msg"` + }{ + Title: p.Title, + Description: p.Description, + Contract: p.Contract, + CodeID: p.CodeID, + Msg: string(p.Msg), + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p SudoContractProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *SudoContractProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p SudoContractProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p SudoContractProposal) ProposalType() string { return string(ProposalTypeSudoContract) } + +// ValidateBasic validates the proposal +func (p SudoContractProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { + return errorsmod.Wrap(err, "contract") + } + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + return nil +} + +// String implements the Stringer interface. +func (p SudoContractProposal) String() string { + return fmt.Sprintf(`Migrate Contract Proposal: + Title: %s + Description: %s + Contract: %s + Msg: %q +`, p.Title, p.Description, p.Contract, p.Msg) +} + +// MarshalYAML pretty prints the migrate message +func (p SudoContractProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + Contract string `yaml:"contract"` + Msg string `yaml:"msg"` + }{ + Title: p.Title, + Description: p.Description, + Contract: p.Contract, + Msg: string(p.Msg), + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p ExecuteContractProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *ExecuteContractProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p ExecuteContractProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p ExecuteContractProposal) ProposalType() string { return string(ProposalTypeExecuteContract) } + +// ValidateBasic validates the proposal +func (p ExecuteContractProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { + return errorsmod.Wrap(err, "contract") + } + if _, err := sdk.AccAddressFromBech32(p.RunAs); err != nil { + return errorsmod.Wrap(err, "run as") + } + if !p.Funds.IsValid() { + return sdkerrors.ErrInvalidCoins + } + if err := p.Msg.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "payload msg") + } + return nil +} + +// String implements the Stringer interface. +func (p ExecuteContractProposal) String() string { + return fmt.Sprintf(`Migrate Contract Proposal: + Title: %s + Description: %s + Contract: %s + Run as: %s + Msg: %q + Funds: %s +`, p.Title, p.Description, p.Contract, p.RunAs, p.Msg, p.Funds) +} + +// MarshalYAML pretty prints the migrate message +func (p ExecuteContractProposal) MarshalYAML() (interface{}, error) { + return struct { + Title string `yaml:"title"` + Description string `yaml:"description"` + Contract string `yaml:"contract"` + Msg string `yaml:"msg"` + RunAs string `yaml:"run_as"` + Funds sdk.Coins `yaml:"funds"` + }{ + Title: p.Title, + Description: p.Description, + Contract: p.Contract, + Msg: string(p.Msg), + RunAs: p.RunAs, + Funds: p.Funds, + }, nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p UpdateAdminProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *UpdateAdminProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p UpdateAdminProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p UpdateAdminProposal) ProposalType() string { return string(ProposalTypeUpdateAdmin) } + +// ValidateBasic validates the proposal +func (p UpdateAdminProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { + return errorsmod.Wrap(err, "contract") + } + if _, err := sdk.AccAddressFromBech32(p.NewAdmin); err != nil { + return errorsmod.Wrap(err, "new admin") + } + return nil +} + +// String implements the Stringer interface. +func (p UpdateAdminProposal) String() string { + return fmt.Sprintf(`Update Contract Admin Proposal: + Title: %s + Description: %s + Contract: %s + New Admin: %s +`, p.Title, p.Description, p.Contract, p.NewAdmin) +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p ClearAdminProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *ClearAdminProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p ClearAdminProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p ClearAdminProposal) ProposalType() string { return string(ProposalTypeClearAdmin) } + +// ValidateBasic validates the proposal +func (p ClearAdminProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if _, err := sdk.AccAddressFromBech32(p.Contract); err != nil { + return errorsmod.Wrap(err, "contract") + } + return nil +} + +// String implements the Stringer interface. +func (p ClearAdminProposal) String() string { + return fmt.Sprintf(`Clear Contract Admin Proposal: + Title: %s + Description: %s + Contract: %s +`, p.Title, p.Description, p.Contract) +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p PinCodesProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *PinCodesProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p PinCodesProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p PinCodesProposal) ProposalType() string { return string(ProposalTypePinCodes) } + +// ValidateBasic validates the proposal +func (p PinCodesProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if len(p.CodeIDs) == 0 { + return errorsmod.Wrap(ErrEmpty, "code ids") + } + return nil +} + +// String implements the Stringer interface. +func (p PinCodesProposal) String() string { + return fmt.Sprintf(`Pin Wasm Codes Proposal: + Title: %s + Description: %s + Codes: %v +`, p.Title, p.Description, p.CodeIDs) +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p UnpinCodesProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *UnpinCodesProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p UnpinCodesProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p UnpinCodesProposal) ProposalType() string { return string(ProposalTypeUnpinCodes) } + +// ValidateBasic validates the proposal +func (p UnpinCodesProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if len(p.CodeIDs) == 0 { + return errorsmod.Wrap(ErrEmpty, "code ids") + } + return nil +} + +// String implements the Stringer interface. +func (p UnpinCodesProposal) String() string { + return fmt.Sprintf(`Unpin Wasm Codes Proposal: + Title: %s + Description: %s + Codes: %v +`, p.Title, p.Description, p.CodeIDs) +} + +func validateProposalCommons(title, description string) error { + if strings.TrimSpace(title) != title { + return errorsmod.Wrap(govtypes.ErrInvalidProposalContent, "proposal title must not start/end with white spaces") + } + if len(title) == 0 { + return errorsmod.Wrap(govtypes.ErrInvalidProposalContent, "proposal title cannot be blank") + } + if len(title) > v1beta1.MaxTitleLength { + return errorsmod.Wrapf(govtypes.ErrInvalidProposalContent, "proposal title is longer than max length of %d", v1beta1.MaxTitleLength) + } + if strings.TrimSpace(description) != description { + return errorsmod.Wrap(govtypes.ErrInvalidProposalContent, "proposal description must not start/end with white spaces") + } + if len(description) == 0 { + return errorsmod.Wrap(govtypes.ErrInvalidProposalContent, "proposal description cannot be blank") + } + if len(description) > v1beta1.MaxDescriptionLength { + return errorsmod.Wrapf(govtypes.ErrInvalidProposalContent, "proposal description is longer than max length of %d", v1beta1.MaxDescriptionLength) + } + return nil +} + +// ProposalRoute returns the routing key of a parameter change proposal. +func (p UpdateInstantiateConfigProposal) ProposalRoute() string { return RouterKey } + +// GetTitle returns the title of the proposal +func (p *UpdateInstantiateConfigProposal) GetTitle() string { return p.Title } + +// GetDescription returns the human readable description of the proposal +func (p UpdateInstantiateConfigProposal) GetDescription() string { return p.Description } + +// ProposalType returns the type +func (p UpdateInstantiateConfigProposal) ProposalType() string { + return string(ProposalTypeUpdateInstantiateConfig) +} + +// ValidateBasic validates the proposal +func (p UpdateInstantiateConfigProposal) ValidateBasic() error { + if err := validateProposalCommons(p.Title, p.Description); err != nil { + return err + } + if len(p.AccessConfigUpdates) == 0 { + return errorsmod.Wrap(ErrEmpty, "code updates") + } + dedup := make(map[uint64]bool) + for _, codeUpdate := range p.AccessConfigUpdates { + _, found := dedup[codeUpdate.CodeID] + if found { + return errorsmod.Wrapf(ErrDuplicate, "duplicate code: %d", codeUpdate.CodeID) + } + if err := codeUpdate.InstantiatePermission.ValidateBasic(); err != nil { + return errorsmod.Wrap(err, "instantiate permission") + } + dedup[codeUpdate.CodeID] = true + } + return nil +} + +// String implements the Stringer interface. +func (p UpdateInstantiateConfigProposal) String() string { + return fmt.Sprintf(`Update Instantiate Config Proposal: + Title: %s + Description: %s + AccessConfigUpdates: %v +`, p.Title, p.Description, p.AccessConfigUpdates) +} + +// String implements the Stringer interface. +func (c AccessConfigUpdate) String() string { + return fmt.Sprintf(`AccessConfigUpdate: + CodeID: %d + AccessConfig: %v +`, c.CodeID, c.InstantiatePermission) +} diff --git a/x/wasm/types/proposal_legacy.pb.go b/x/wasm/types/proposal_legacy.pb.go new file mode 100644 index 0000000000..0631471537 --- /dev/null +++ b/x/wasm/types/proposal_legacy.pb.go @@ -0,0 +1,5762 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: cosmwasm/wasm/v1/proposal_legacy.proto + +package types + +import ( + bytes "bytes" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" + types "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreCodeProposal. To submit WASM code to the system, +// a simple MsgStoreCode can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type StoreCodeProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // RunAs is the address that is passed to the contract's environment as sender + RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` + // WASMByteCode can be raw or gzip compressed + WASMByteCode []byte `protobuf:"bytes,4,opt,name=wasm_byte_code,json=wasmByteCode,proto3" json:"wasm_byte_code,omitempty"` + // InstantiatePermission to apply on contract creation, optional + InstantiatePermission *AccessConfig `protobuf:"bytes,7,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` + // UnpinCode code on upload, optional + UnpinCode bool `protobuf:"varint,8,opt,name=unpin_code,json=unpinCode,proto3" json:"unpin_code,omitempty"` + // Source is the URL where the code is hosted + Source string `protobuf:"bytes,9,opt,name=source,proto3" json:"source,omitempty"` + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + Builder string `protobuf:"bytes,10,opt,name=builder,proto3" json:"builder,omitempty"` + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + CodeHash []byte `protobuf:"bytes,11,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` +} + +func (m *StoreCodeProposal) Reset() { *m = StoreCodeProposal{} } +func (*StoreCodeProposal) ProtoMessage() {} +func (*StoreCodeProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{0} +} +func (m *StoreCodeProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreCodeProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StoreCodeProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreCodeProposal.Merge(m, src) +} +func (m *StoreCodeProposal) XXX_Size() int { + return m.Size() +} +func (m *StoreCodeProposal) XXX_DiscardUnknown() { + xxx_messageInfo_StoreCodeProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreCodeProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContractProposal. To instantiate a contract, +// a simple MsgInstantiateContract can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type InstantiateContractProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // RunAs is the address that is passed to the contract's environment as sender + RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` + // Admin is an optional address that can execute migrations + Admin string `protobuf:"bytes,4,opt,name=admin,proto3" json:"admin,omitempty"` + // CodeID is the reference to the stored WASM code + CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + // Label is optional metadata to be stored with a constract instance. + Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"` + // Msg json encoded message to be passed to the contract on instantiation + Msg RawContractMessage `protobuf:"bytes,7,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` + // Funds coins that are transferred to the contract on instantiation + Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,8,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` +} + +func (m *InstantiateContractProposal) Reset() { *m = InstantiateContractProposal{} } +func (*InstantiateContractProposal) ProtoMessage() {} +func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{1} +} +func (m *InstantiateContractProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InstantiateContractProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InstantiateContractProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstantiateContractProposal.Merge(m, src) +} +func (m *InstantiateContractProposal) XXX_Size() int { + return m.Size() +} +func (m *InstantiateContractProposal) XXX_DiscardUnknown() { + xxx_messageInfo_InstantiateContractProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_InstantiateContractProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit InstantiateContract2Proposal. To instantiate contract 2, +// a simple MsgInstantiateContract2 can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type InstantiateContract2Proposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // RunAs is the address that is passed to the contract's enviroment as sender + RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` + // Admin is an optional address that can execute migrations + Admin string `protobuf:"bytes,4,opt,name=admin,proto3" json:"admin,omitempty"` + // CodeID is the reference to the stored WASM code + CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + // Label is optional metadata to be stored with a constract instance. + Label string `protobuf:"bytes,6,opt,name=label,proto3" json:"label,omitempty"` + // Msg json encode message to be passed to the contract on instantiation + Msg RawContractMessage `protobuf:"bytes,7,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` + // Funds coins that are transferred to the contract on instantiation + Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,8,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` + // Salt is an arbitrary value provided by the sender. Size can be 1 to 64. + Salt []byte `protobuf:"bytes,9,opt,name=salt,proto3" json:"salt,omitempty"` + // FixMsg include the msg value into the hash for the predictable address. + // Default is false + FixMsg bool `protobuf:"varint,10,opt,name=fix_msg,json=fixMsg,proto3" json:"fix_msg,omitempty"` +} + +func (m *InstantiateContract2Proposal) Reset() { *m = InstantiateContract2Proposal{} } +func (*InstantiateContract2Proposal) ProtoMessage() {} +func (*InstantiateContract2Proposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{2} +} +func (m *InstantiateContract2Proposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *InstantiateContract2Proposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_InstantiateContract2Proposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *InstantiateContract2Proposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_InstantiateContract2Proposal.Merge(m, src) +} +func (m *InstantiateContract2Proposal) XXX_Size() int { + return m.Size() +} +func (m *InstantiateContract2Proposal) XXX_DiscardUnknown() { + xxx_messageInfo_InstantiateContract2Proposal.DiscardUnknown(m) +} + +var xxx_messageInfo_InstantiateContract2Proposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit MigrateContractProposal. To migrate a contract, +// a simple MsgMigrateContract can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type MigrateContractProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Contract is the address of the smart contract + Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` + // CodeID references the new WASM code + CodeID uint64 `protobuf:"varint,5,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + // Msg json encoded message to be passed to the contract on migration + Msg RawContractMessage `protobuf:"bytes,6,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` +} + +func (m *MigrateContractProposal) Reset() { *m = MigrateContractProposal{} } +func (*MigrateContractProposal) ProtoMessage() {} +func (*MigrateContractProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{3} +} +func (m *MigrateContractProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MigrateContractProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MigrateContractProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_MigrateContractProposal.Merge(m, src) +} +func (m *MigrateContractProposal) XXX_Size() int { + return m.Size() +} +func (m *MigrateContractProposal) XXX_DiscardUnknown() { + xxx_messageInfo_MigrateContractProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_MigrateContractProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit SudoContractProposal. To call sudo on a contract, +// a simple MsgSudoContract can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type SudoContractProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Contract is the address of the smart contract + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` + // Msg json encoded message to be passed to the contract as sudo + Msg RawContractMessage `protobuf:"bytes,4,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` +} + +func (m *SudoContractProposal) Reset() { *m = SudoContractProposal{} } +func (*SudoContractProposal) ProtoMessage() {} +func (*SudoContractProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{4} +} +func (m *SudoContractProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SudoContractProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SudoContractProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_SudoContractProposal.Merge(m, src) +} +func (m *SudoContractProposal) XXX_Size() int { + return m.Size() +} +func (m *SudoContractProposal) XXX_DiscardUnknown() { + xxx_messageInfo_SudoContractProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_SudoContractProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ExecuteContractProposal. To call execute on a contract, +// a simple MsgExecuteContract can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type ExecuteContractProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // RunAs is the address that is passed to the contract's environment as sender + RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` + // Contract is the address of the smart contract + Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` + // Msg json encoded message to be passed to the contract as execute + Msg RawContractMessage `protobuf:"bytes,5,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` + // Funds coins that are transferred to the contract on instantiation + Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,6,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` +} + +func (m *ExecuteContractProposal) Reset() { *m = ExecuteContractProposal{} } +func (*ExecuteContractProposal) ProtoMessage() {} +func (*ExecuteContractProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{5} +} +func (m *ExecuteContractProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExecuteContractProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExecuteContractProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExecuteContractProposal.Merge(m, src) +} +func (m *ExecuteContractProposal) XXX_Size() int { + return m.Size() +} +func (m *ExecuteContractProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ExecuteContractProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ExecuteContractProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateAdminProposal. To set an admin for a contract, +// a simple MsgUpdateAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type UpdateAdminProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // NewAdmin address to be set + NewAdmin string `protobuf:"bytes,3,opt,name=new_admin,json=newAdmin,proto3" json:"new_admin,omitempty" yaml:"new_admin"` + // Contract is the address of the smart contract + Contract string `protobuf:"bytes,4,opt,name=contract,proto3" json:"contract,omitempty"` +} + +func (m *UpdateAdminProposal) Reset() { *m = UpdateAdminProposal{} } +func (*UpdateAdminProposal) ProtoMessage() {} +func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{6} +} +func (m *UpdateAdminProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateAdminProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateAdminProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateAdminProposal.Merge(m, src) +} +func (m *UpdateAdminProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateAdminProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateAdminProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateAdminProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit ClearAdminProposal. To clear the admin of a contract, +// a simple MsgClearAdmin can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type ClearAdminProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // Contract is the address of the smart contract + Contract string `protobuf:"bytes,3,opt,name=contract,proto3" json:"contract,omitempty"` +} + +func (m *ClearAdminProposal) Reset() { *m = ClearAdminProposal{} } +func (*ClearAdminProposal) ProtoMessage() {} +func (*ClearAdminProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{7} +} +func (m *ClearAdminProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClearAdminProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ClearAdminProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClearAdminProposal.Merge(m, src) +} +func (m *ClearAdminProposal) XXX_Size() int { + return m.Size() +} +func (m *ClearAdminProposal) XXX_DiscardUnknown() { + xxx_messageInfo_ClearAdminProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_ClearAdminProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit PinCodesProposal. To pin a set of code ids in the wasmvm +// cache, a simple MsgPinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type PinCodesProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // CodeIDs references the new WASM codes + CodeIDs []uint64 `protobuf:"varint,3,rep,packed,name=code_ids,json=codeIds,proto3" json:"code_ids,omitempty" yaml:"code_ids"` +} + +func (m *PinCodesProposal) Reset() { *m = PinCodesProposal{} } +func (*PinCodesProposal) ProtoMessage() {} +func (*PinCodesProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{8} +} +func (m *PinCodesProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PinCodesProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PinCodesProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_PinCodesProposal.Merge(m, src) +} +func (m *PinCodesProposal) XXX_Size() int { + return m.Size() +} +func (m *PinCodesProposal) XXX_DiscardUnknown() { + xxx_messageInfo_PinCodesProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_PinCodesProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UnpinCodesProposal. To unpin a set of code ids in the wasmvm +// cache, a simple MsgUnpinCodes can be invoked from the x/gov module via +// a v1 governance proposal. +// +// Deprecated: Do not use. +type UnpinCodesProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // CodeIDs references the WASM codes + CodeIDs []uint64 `protobuf:"varint,3,rep,packed,name=code_ids,json=codeIds,proto3" json:"code_ids,omitempty" yaml:"code_ids"` +} + +func (m *UnpinCodesProposal) Reset() { *m = UnpinCodesProposal{} } +func (*UnpinCodesProposal) ProtoMessage() {} +func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{9} +} +func (m *UnpinCodesProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UnpinCodesProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UnpinCodesProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UnpinCodesProposal.Merge(m, src) +} +func (m *UnpinCodesProposal) XXX_Size() int { + return m.Size() +} +func (m *UnpinCodesProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UnpinCodesProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UnpinCodesProposal proto.InternalMessageInfo + +// AccessConfigUpdate contains the code id and the access config to be +// applied. +type AccessConfigUpdate struct { + // CodeID is the reference to the stored WASM code to be updated + CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` + // InstantiatePermission to apply to the set of code ids + InstantiatePermission AccessConfig `protobuf:"bytes,2,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission"` +} + +func (m *AccessConfigUpdate) Reset() { *m = AccessConfigUpdate{} } +func (*AccessConfigUpdate) ProtoMessage() {} +func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{10} +} +func (m *AccessConfigUpdate) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AccessConfigUpdate.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *AccessConfigUpdate) XXX_Merge(src proto.Message) { + xxx_messageInfo_AccessConfigUpdate.Merge(m, src) +} +func (m *AccessConfigUpdate) XXX_Size() int { + return m.Size() +} +func (m *AccessConfigUpdate) XXX_DiscardUnknown() { + xxx_messageInfo_AccessConfigUpdate.DiscardUnknown(m) +} + +var xxx_messageInfo_AccessConfigUpdate proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit UpdateInstantiateConfigProposal. To update instantiate config +// to a set of code ids, a simple MsgUpdateInstantiateConfig can be invoked from +// the x/gov module via a v1 governance proposal. +// +// Deprecated: Do not use. +type UpdateInstantiateConfigProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty" yaml:"title"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` + // AccessConfigUpdate contains the list of code ids and the access config + // to be applied. + AccessConfigUpdates []AccessConfigUpdate `protobuf:"bytes,3,rep,name=access_config_updates,json=accessConfigUpdates,proto3" json:"access_config_updates"` +} + +func (m *UpdateInstantiateConfigProposal) Reset() { *m = UpdateInstantiateConfigProposal{} } +func (*UpdateInstantiateConfigProposal) ProtoMessage() {} +func (*UpdateInstantiateConfigProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{11} +} +func (m *UpdateInstantiateConfigProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UpdateInstantiateConfigProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UpdateInstantiateConfigProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateInstantiateConfigProposal.Merge(m, src) +} +func (m *UpdateInstantiateConfigProposal) XXX_Size() int { + return m.Size() +} +func (m *UpdateInstantiateConfigProposal) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateInstantiateConfigProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateInstantiateConfigProposal proto.InternalMessageInfo + +// Deprecated: Do not use. Since wasmd v0.40, there is no longer a need for +// an explicit StoreAndInstantiateContractProposal. To store and instantiate +// the contract, a simple MsgStoreAndInstantiateContract can be invoked from +// the x/gov module via a v1 governance proposal. +// +// Deprecated: Do not use. +type StoreAndInstantiateContractProposal struct { + // Title is a short summary + Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` + // Description is a human readable text + Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` + // RunAs is the address that is passed to the contract's environment as sender + RunAs string `protobuf:"bytes,3,opt,name=run_as,json=runAs,proto3" json:"run_as,omitempty"` + // WASMByteCode can be raw or gzip compressed + WASMByteCode []byte `protobuf:"bytes,4,opt,name=wasm_byte_code,json=wasmByteCode,proto3" json:"wasm_byte_code,omitempty"` + // InstantiatePermission to apply on contract creation, optional + InstantiatePermission *AccessConfig `protobuf:"bytes,5,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission,omitempty"` + // UnpinCode code on upload, optional + UnpinCode bool `protobuf:"varint,6,opt,name=unpin_code,json=unpinCode,proto3" json:"unpin_code,omitempty"` + // Admin is an optional address that can execute migrations + Admin string `protobuf:"bytes,7,opt,name=admin,proto3" json:"admin,omitempty"` + // Label is optional metadata to be stored with a constract instance. + Label string `protobuf:"bytes,8,opt,name=label,proto3" json:"label,omitempty"` + // Msg json encoded message to be passed to the contract on instantiation + Msg RawContractMessage `protobuf:"bytes,9,opt,name=msg,proto3,casttype=RawContractMessage" json:"msg,omitempty"` + // Funds coins that are transferred to the contract on instantiation + Funds github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,10,rep,name=funds,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"funds"` + // Source is the URL where the code is hosted + Source string `protobuf:"bytes,11,opt,name=source,proto3" json:"source,omitempty"` + // Builder is the docker image used to build the code deterministically, used + // for smart contract verification + Builder string `protobuf:"bytes,12,opt,name=builder,proto3" json:"builder,omitempty"` + // CodeHash is the SHA256 sum of the code outputted by builder, used for smart + // contract verification + CodeHash []byte `protobuf:"bytes,13,opt,name=code_hash,json=codeHash,proto3" json:"code_hash,omitempty"` +} + +func (m *StoreAndInstantiateContractProposal) Reset() { *m = StoreAndInstantiateContractProposal{} } +func (*StoreAndInstantiateContractProposal) ProtoMessage() {} +func (*StoreAndInstantiateContractProposal) Descriptor() ([]byte, []int) { + return fileDescriptor_68e9c908a42bedfa, []int{12} +} +func (m *StoreAndInstantiateContractProposal) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *StoreAndInstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_StoreAndInstantiateContractProposal.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *StoreAndInstantiateContractProposal) XXX_Merge(src proto.Message) { + xxx_messageInfo_StoreAndInstantiateContractProposal.Merge(m, src) +} +func (m *StoreAndInstantiateContractProposal) XXX_Size() int { + return m.Size() +} +func (m *StoreAndInstantiateContractProposal) XXX_DiscardUnknown() { + xxx_messageInfo_StoreAndInstantiateContractProposal.DiscardUnknown(m) +} + +var xxx_messageInfo_StoreAndInstantiateContractProposal proto.InternalMessageInfo + +func init() { + proto.RegisterType((*StoreCodeProposal)(nil), "cosmwasm.wasm.v1.StoreCodeProposal") + proto.RegisterType((*InstantiateContractProposal)(nil), "cosmwasm.wasm.v1.InstantiateContractProposal") + proto.RegisterType((*InstantiateContract2Proposal)(nil), "cosmwasm.wasm.v1.InstantiateContract2Proposal") + proto.RegisterType((*MigrateContractProposal)(nil), "cosmwasm.wasm.v1.MigrateContractProposal") + proto.RegisterType((*SudoContractProposal)(nil), "cosmwasm.wasm.v1.SudoContractProposal") + proto.RegisterType((*ExecuteContractProposal)(nil), "cosmwasm.wasm.v1.ExecuteContractProposal") + proto.RegisterType((*UpdateAdminProposal)(nil), "cosmwasm.wasm.v1.UpdateAdminProposal") + proto.RegisterType((*ClearAdminProposal)(nil), "cosmwasm.wasm.v1.ClearAdminProposal") + proto.RegisterType((*PinCodesProposal)(nil), "cosmwasm.wasm.v1.PinCodesProposal") + proto.RegisterType((*UnpinCodesProposal)(nil), "cosmwasm.wasm.v1.UnpinCodesProposal") + proto.RegisterType((*AccessConfigUpdate)(nil), "cosmwasm.wasm.v1.AccessConfigUpdate") + proto.RegisterType((*UpdateInstantiateConfigProposal)(nil), "cosmwasm.wasm.v1.UpdateInstantiateConfigProposal") + proto.RegisterType((*StoreAndInstantiateContractProposal)(nil), "cosmwasm.wasm.v1.StoreAndInstantiateContractProposal") +} + +func init() { + proto.RegisterFile("cosmwasm/wasm/v1/proposal_legacy.proto", fileDescriptor_68e9c908a42bedfa) +} + +var fileDescriptor_68e9c908a42bedfa = []byte{ + // 1194 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0xcb, 0x6f, 0x1b, 0x45, + 0x18, 0xf7, 0xc4, 0xf6, 0xda, 0x1e, 0x1b, 0x70, 0xb7, 0x69, 0x32, 0x6d, 0xc3, 0xae, 0xd9, 0x56, + 0x91, 0x55, 0x11, 0x5b, 0x09, 0x0f, 0x81, 0x79, 0x48, 0xde, 0x50, 0x44, 0x2a, 0x22, 0x45, 0x1b, + 0x45, 0x95, 0xb8, 0x2c, 0xe3, 0xdd, 0xf1, 0x66, 0x85, 0xbd, 0x6b, 0xed, 0xac, 0xf3, 0xf8, 0x17, + 0x90, 0x90, 0x38, 0x82, 0xf8, 0x07, 0x2a, 0x4e, 0x95, 0xe8, 0x1f, 0x00, 0x48, 0x48, 0x51, 0x4f, + 0x15, 0xa7, 0x9e, 0x0c, 0x75, 0x0e, 0xbd, 0x71, 0xc8, 0x0d, 0x4e, 0x68, 0x66, 0xd6, 0x89, 0x93, + 0xd8, 0xd9, 0x34, 0x4d, 0x5a, 0x0e, 0x5c, 0x36, 0x99, 0xfd, 0xbe, 0x59, 0xff, 0x1e, 0x33, 0xdf, + 0xce, 0xb7, 0x70, 0xd6, 0xf2, 0x69, 0x7b, 0x13, 0xd3, 0x76, 0x95, 0x5f, 0x36, 0xe6, 0xab, 0x9d, + 0xc0, 0xef, 0xf8, 0x14, 0xb7, 0xcc, 0x16, 0x71, 0xb0, 0xb5, 0x5d, 0xe9, 0x04, 0x7e, 0xe8, 0xcb, + 0xc5, 0x41, 0x5e, 0x85, 0x5f, 0x36, 0xe6, 0xaf, 0x4d, 0x3a, 0xbe, 0xe3, 0xf3, 0x60, 0x95, 0xfd, + 0x27, 0xf2, 0xae, 0x5d, 0x65, 0x79, 0x3e, 0x35, 0x45, 0x40, 0x0c, 0xa2, 0x90, 0x22, 0x46, 0xd5, + 0x06, 0xa6, 0xa4, 0xba, 0x31, 0xdf, 0x20, 0x21, 0x9e, 0xaf, 0x5a, 0xbe, 0xeb, 0x45, 0xf1, 0x99, + 0x63, 0x50, 0xc2, 0xed, 0x0e, 0x19, 0xcc, 0xbe, 0x84, 0xdb, 0xae, 0xe7, 0x57, 0xf9, 0x55, 0xdc, + 0xd2, 0x7e, 0x4d, 0xc2, 0x4b, 0xab, 0xa1, 0x1f, 0x90, 0x45, 0xdf, 0x26, 0x2b, 0x11, 0x6c, 0x79, + 0x12, 0xa6, 0x43, 0x37, 0x6c, 0x11, 0x04, 0x4a, 0xa0, 0x9c, 0x33, 0xc4, 0x40, 0x2e, 0xc1, 0xbc, + 0x4d, 0xa8, 0x15, 0xb8, 0x9d, 0xd0, 0xf5, 0x3d, 0x34, 0xc1, 0x63, 0xc3, 0xb7, 0xe4, 0x2a, 0x94, + 0x82, 0xae, 0x67, 0x62, 0x8a, 0x92, 0x2c, 0xa8, 0xa3, 0xdf, 0x1f, 0xcc, 0x4d, 0x46, 0x04, 0xea, + 0xb6, 0x1d, 0x10, 0x4a, 0x57, 0xc3, 0xc0, 0xf5, 0x1c, 0x23, 0x1d, 0x74, 0xbd, 0x3a, 0x95, 0xdf, + 0x85, 0xaf, 0x32, 0xa0, 0x66, 0x63, 0x3b, 0x24, 0xa6, 0xe5, 0xdb, 0x04, 0xa5, 0x4a, 0xa0, 0x5c, + 0xd0, 0x8b, 0xfd, 0x9e, 0x5a, 0xb8, 0x5b, 0x5f, 0x5d, 0xd6, 0xb7, 0x43, 0x0e, 0xcd, 0x28, 0xb0, + 0xbc, 0xc1, 0x48, 0x5e, 0x83, 0x53, 0xae, 0x47, 0x43, 0xec, 0x85, 0x2e, 0x0e, 0x89, 0xd9, 0x21, + 0x41, 0xdb, 0xa5, 0x94, 0xa1, 0xca, 0x94, 0x40, 0x39, 0xbf, 0xa0, 0x54, 0x8e, 0x6a, 0x5d, 0xa9, + 0x5b, 0x16, 0xa1, 0x74, 0xd1, 0xf7, 0x9a, 0xae, 0x63, 0x5c, 0x19, 0x9a, 0xbd, 0xb2, 0x3f, 0x59, + 0x7e, 0x1d, 0xc2, 0xae, 0xd7, 0x71, 0x3d, 0x01, 0x25, 0x5b, 0x02, 0xe5, 0xac, 0x91, 0xe3, 0x77, + 0xf8, 0xaf, 0x4e, 0x41, 0x89, 0xfa, 0xdd, 0xc0, 0x22, 0x28, 0xc7, 0xb9, 0x47, 0x23, 0x19, 0xc1, + 0x4c, 0xa3, 0xeb, 0xb6, 0x6c, 0x12, 0x20, 0xc8, 0x03, 0x83, 0xa1, 0x7c, 0x1d, 0xe6, 0xd8, 0xa3, + 0xcc, 0x75, 0x4c, 0xd7, 0x51, 0x9e, 0x51, 0x33, 0xb2, 0xec, 0xc6, 0x67, 0x98, 0xae, 0xd7, 0x3e, + 0x78, 0xf8, 0x60, 0xee, 0x5a, 0xa4, 0x8e, 0xe3, 0x6f, 0x54, 0x22, 0x3f, 0x2b, 0x8b, 0xbe, 0x17, + 0x12, 0x2f, 0xfc, 0xfa, 0xe9, 0xfd, 0x5b, 0x53, 0xdc, 0xc6, 0x63, 0x06, 0x21, 0x70, 0x27, 0x95, + 0x4d, 0x17, 0xa5, 0x3b, 0xa9, 0xac, 0x54, 0xcc, 0x68, 0x0f, 0x93, 0xf0, 0xfa, 0xd2, 0x01, 0x21, + 0x36, 0x3f, 0xc0, 0x56, 0xf8, 0xe2, 0xed, 0xac, 0xc0, 0x34, 0xb6, 0xdb, 0xae, 0xc7, 0x5d, 0x3c, + 0x31, 0x9f, 0xa7, 0xc9, 0x37, 0x60, 0x86, 0xcb, 0xe3, 0xda, 0x28, 0x5d, 0x02, 0xe5, 0x94, 0x0e, + 0xfb, 0x3d, 0x55, 0x62, 0x4c, 0x97, 0x3e, 0x31, 0x24, 0x16, 0x5a, 0xb2, 0x19, 0xfa, 0x16, 0x6e, + 0x90, 0x16, 0x92, 0x04, 0x7a, 0x3e, 0x90, 0xcb, 0x30, 0xd9, 0xa6, 0x0e, 0xb7, 0xbb, 0xa0, 0x4f, + 0xfd, 0xd3, 0x53, 0x65, 0x03, 0x6f, 0x0e, 0x98, 0x2f, 0x13, 0x4a, 0xb1, 0x43, 0x0c, 0x96, 0x22, + 0x37, 0x61, 0xba, 0xd9, 0xf5, 0x6c, 0x8a, 0xb2, 0xa5, 0x64, 0x39, 0xbf, 0x70, 0xb5, 0x12, 0x21, + 0x62, 0x7b, 0x68, 0x48, 0x73, 0xd7, 0xd3, 0xdf, 0xd9, 0xe9, 0xa9, 0x89, 0x1f, 0xff, 0x50, 0xcb, + 0x8e, 0x1b, 0xae, 0x77, 0x1b, 0x15, 0xcb, 0x6f, 0x47, 0xdb, 0x2f, 0xfa, 0x33, 0x47, 0xed, 0xaf, + 0xa2, 0x1d, 0xc5, 0x26, 0xd0, 0x7b, 0x4f, 0xef, 0xdf, 0x02, 0x86, 0x78, 0x7c, 0xed, 0x76, 0xbc, + 0x9d, 0x25, 0x6e, 0xe7, 0x09, 0x56, 0x21, 0xa0, 0xfd, 0x9d, 0x84, 0x33, 0x23, 0x32, 0x16, 0xfe, + 0x77, 0xf3, 0x45, 0xba, 0x29, 0xcb, 0x30, 0x45, 0x71, 0x2b, 0xe4, 0x3b, 0xbd, 0x60, 0xf0, 0xff, + 0xe5, 0x69, 0x98, 0x69, 0xba, 0x5b, 0x26, 0x43, 0x0a, 0x79, 0x6d, 0x90, 0x9a, 0xee, 0xd6, 0x32, + 0x75, 0x6a, 0x9f, 0xc6, 0x5b, 0xff, 0xc6, 0x38, 0xeb, 0x17, 0x86, 0xbc, 0xff, 0x7e, 0x02, 0x4e, + 0x2f, 0xbb, 0x4e, 0x70, 0x9e, 0x9b, 0xf8, 0x6d, 0x98, 0xb5, 0xa2, 0x67, 0xc5, 0x1a, 0xb9, 0x9f, + 0x79, 0x3a, 0x2f, 0x23, 0xd7, 0xa4, 0x58, 0xd7, 0x6a, 0xf5, 0x78, 0x81, 0x66, 0xb8, 0x40, 0x63, + 0xd8, 0x23, 0xa0, 0xfd, 0x05, 0xe0, 0xe4, 0x6a, 0xd7, 0xf6, 0x2f, 0x44, 0x98, 0xe4, 0xa9, 0x85, + 0x89, 0x38, 0xa7, 0xe2, 0x39, 0x7f, 0x1c, 0xcf, 0xf9, 0xaa, 0x28, 0xef, 0x23, 0x58, 0x21, 0xa0, + 0x7d, 0x93, 0x84, 0xd3, 0xb7, 0xb7, 0x88, 0xd5, 0x7d, 0x99, 0x15, 0xfd, 0x6c, 0xab, 0x27, 0x12, + 0x29, 0xfd, 0x0c, 0xdb, 0x59, 0xba, 0xd8, 0xe2, 0x7c, 0xea, 0x05, 0x38, 0x46, 0x71, 0xe6, 0xc7, + 0x04, 0xbc, 0xbc, 0xd6, 0xb1, 0x71, 0x48, 0xea, 0xac, 0xdc, 0x3d, 0xb7, 0x17, 0x4b, 0x30, 0xe7, + 0x91, 0x4d, 0x53, 0x94, 0x58, 0x61, 0xc7, 0x9b, 0x7b, 0x3d, 0xb5, 0xb8, 0x8d, 0xdb, 0xad, 0x9a, + 0xb6, 0x1f, 0xd2, 0xc6, 0xeb, 0xed, 0x91, 0x4d, 0x0e, 0xe5, 0x6c, 0x2e, 0xd5, 0x3e, 0x8a, 0xd7, + 0x04, 0x71, 0x4d, 0x46, 0xb0, 0x46, 0x40, 0xfb, 0x19, 0x40, 0x79, 0xb1, 0x45, 0x70, 0x70, 0x3e, + 0x72, 0x9c, 0x69, 0x3b, 0xd6, 0x3e, 0x8c, 0xe7, 0x30, 0xcd, 0x39, 0x1c, 0x47, 0x8a, 0x80, 0xf6, + 0x0b, 0x80, 0xc5, 0x15, 0x71, 0xb8, 0xa3, 0xcf, 0x4d, 0xe0, 0x7d, 0x98, 0x8d, 0x4a, 0x26, 0xdb, + 0x5d, 0xc9, 0x72, 0x4a, 0x57, 0xfa, 0x3d, 0x35, 0x23, 0x6a, 0x26, 0xdd, 0xeb, 0xa9, 0xaf, 0x09, + 0x67, 0x07, 0x49, 0x9a, 0x91, 0x11, 0x75, 0x94, 0xd6, 0x6a, 0xf1, 0x2c, 0xae, 0x70, 0x16, 0x47, + 0xc1, 0x22, 0xa0, 0xfd, 0x06, 0xa0, 0xbc, 0x36, 0x38, 0xa2, 0xbe, 0x54, 0x16, 0xa7, 0xf6, 0xe2, + 0x38, 0x5c, 0x04, 0xb4, 0x1f, 0x00, 0x94, 0x87, 0xcf, 0xe8, 0x62, 0xd1, 0x0d, 0xbf, 0x88, 0xc0, + 0xd8, 0x17, 0xd1, 0x97, 0x63, 0xdb, 0x81, 0x89, 0xd3, 0xb4, 0x03, 0x7a, 0x8e, 0xd5, 0x16, 0x51, + 0x2f, 0x46, 0x77, 0x06, 0xda, 0x4f, 0x13, 0x50, 0x15, 0x88, 0x0e, 0xbf, 0xc2, 0x9b, 0xae, 0xb3, + 0x2f, 0xf9, 0xec, 0x21, 0xc9, 0xf5, 0xe2, 0x5e, 0x4f, 0x2d, 0x08, 0xb1, 0xf8, 0x6d, 0x6d, 0x60, + 0xc2, 0x7b, 0x23, 0x4c, 0xd0, 0xa7, 0xf6, 0x7a, 0xaa, 0x2c, 0xb2, 0x87, 0x82, 0xda, 0x61, 0x73, + 0x2c, 0x78, 0x05, 0x73, 0xdc, 0xa6, 0xc5, 0x7f, 0xda, 0xec, 0x72, 0x48, 0xc2, 0xa9, 0xfc, 0xc2, + 0xcd, 0x93, 0x69, 0x0a, 0xfc, 0xc3, 0x64, 0x2f, 0xe3, 0x63, 0x61, 0x5a, 0x5b, 0x8a, 0xb7, 0xf1, + 0xe6, 0x50, 0x59, 0x18, 0xab, 0x07, 0x02, 0xda, 0x77, 0x69, 0x78, 0x83, 0x37, 0x2f, 0x75, 0xcf, + 0xfe, 0x4f, 0x34, 0x28, 0xe7, 0xdf, 0x6f, 0xa6, 0xcf, 0xaf, 0xdf, 0x94, 0x8e, 0xf6, 0x9b, 0x93, + 0x83, 0x03, 0x78, 0x46, 0xc8, 0x22, 0x8e, 0xd9, 0xfb, 0x27, 0xe8, 0xec, 0x88, 0x13, 0x74, 0xee, + 0x19, 0x5e, 0xb9, 0xf0, 0x62, 0x4f, 0xd0, 0x07, 0xdd, 0x72, 0x7e, 0x5c, 0xb7, 0x5c, 0x38, 0xa1, + 0x5b, 0x7e, 0xe5, 0x48, 0xb7, 0xbc, 0x1c, 0xbf, 0x2c, 0xcb, 0x07, 0xdd, 0xf2, 0xc9, 0x0b, 0x0e, + 0x01, 0xfd, 0xf3, 0x9d, 0x27, 0x4a, 0xe2, 0xf1, 0x13, 0x25, 0x71, 0xaf, 0xaf, 0x80, 0x9d, 0xbe, + 0x02, 0x1e, 0xf5, 0x15, 0xf0, 0x67, 0x5f, 0x01, 0xdf, 0xee, 0x2a, 0x89, 0x47, 0xbb, 0x4a, 0xe2, + 0xf1, 0xae, 0x92, 0xf8, 0x62, 0x76, 0x88, 0xf9, 0xa2, 0x4f, 0xdb, 0x77, 0x07, 0x9f, 0x56, 0xec, + 0xea, 0x96, 0xf8, 0xc4, 0xc2, 0xd9, 0x37, 0x24, 0xfe, 0x35, 0xe5, 0xad, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xe5, 0x17, 0x08, 0x1e, 0x0b, 0x12, 0x00, 0x00, +} + +func (this *StoreCodeProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StoreCodeProposal) + if !ok { + that2, ok := that.(StoreCodeProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.RunAs != that1.RunAs { + return false + } + if !bytes.Equal(this.WASMByteCode, that1.WASMByteCode) { + return false + } + if !this.InstantiatePermission.Equal(that1.InstantiatePermission) { + return false + } + if this.UnpinCode != that1.UnpinCode { + return false + } + if this.Source != that1.Source { + return false + } + if this.Builder != that1.Builder { + return false + } + if !bytes.Equal(this.CodeHash, that1.CodeHash) { + return false + } + return true +} +func (this *InstantiateContractProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*InstantiateContractProposal) + if !ok { + that2, ok := that.(InstantiateContractProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.RunAs != that1.RunAs { + return false + } + if this.Admin != that1.Admin { + return false + } + if this.CodeID != that1.CodeID { + return false + } + if this.Label != that1.Label { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + if len(this.Funds) != len(that1.Funds) { + return false + } + for i := range this.Funds { + if !this.Funds[i].Equal(&that1.Funds[i]) { + return false + } + } + return true +} +func (this *InstantiateContract2Proposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*InstantiateContract2Proposal) + if !ok { + that2, ok := that.(InstantiateContract2Proposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.RunAs != that1.RunAs { + return false + } + if this.Admin != that1.Admin { + return false + } + if this.CodeID != that1.CodeID { + return false + } + if this.Label != that1.Label { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + if len(this.Funds) != len(that1.Funds) { + return false + } + for i := range this.Funds { + if !this.Funds[i].Equal(&that1.Funds[i]) { + return false + } + } + if !bytes.Equal(this.Salt, that1.Salt) { + return false + } + if this.FixMsg != that1.FixMsg { + return false + } + return true +} +func (this *MigrateContractProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*MigrateContractProposal) + if !ok { + that2, ok := that.(MigrateContractProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Contract != that1.Contract { + return false + } + if this.CodeID != that1.CodeID { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + return true +} +func (this *SudoContractProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*SudoContractProposal) + if !ok { + that2, ok := that.(SudoContractProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Contract != that1.Contract { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + return true +} +func (this *ExecuteContractProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ExecuteContractProposal) + if !ok { + that2, ok := that.(ExecuteContractProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.RunAs != that1.RunAs { + return false + } + if this.Contract != that1.Contract { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + if len(this.Funds) != len(that1.Funds) { + return false + } + for i := range this.Funds { + if !this.Funds[i].Equal(&that1.Funds[i]) { + return false + } + } + return true +} +func (this *UpdateAdminProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateAdminProposal) + if !ok { + that2, ok := that.(UpdateAdminProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.NewAdmin != that1.NewAdmin { + return false + } + if this.Contract != that1.Contract { + return false + } + return true +} +func (this *ClearAdminProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*ClearAdminProposal) + if !ok { + that2, ok := that.(ClearAdminProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.Contract != that1.Contract { + return false + } + return true +} +func (this *PinCodesProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*PinCodesProposal) + if !ok { + that2, ok := that.(PinCodesProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.CodeIDs) != len(that1.CodeIDs) { + return false + } + for i := range this.CodeIDs { + if this.CodeIDs[i] != that1.CodeIDs[i] { + return false + } + } + return true +} +func (this *UnpinCodesProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UnpinCodesProposal) + if !ok { + that2, ok := that.(UnpinCodesProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.CodeIDs) != len(that1.CodeIDs) { + return false + } + for i := range this.CodeIDs { + if this.CodeIDs[i] != that1.CodeIDs[i] { + return false + } + } + return true +} +func (this *AccessConfigUpdate) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*AccessConfigUpdate) + if !ok { + that2, ok := that.(AccessConfigUpdate) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.CodeID != that1.CodeID { + return false + } + if !this.InstantiatePermission.Equal(&that1.InstantiatePermission) { + return false + } + return true +} +func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UpdateInstantiateConfigProposal) + if !ok { + that2, ok := that.(UpdateInstantiateConfigProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if len(this.AccessConfigUpdates) != len(that1.AccessConfigUpdates) { + return false + } + for i := range this.AccessConfigUpdates { + if !this.AccessConfigUpdates[i].Equal(&that1.AccessConfigUpdates[i]) { + return false + } + } + return true +} +func (this *StoreAndInstantiateContractProposal) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*StoreAndInstantiateContractProposal) + if !ok { + that2, ok := that.(StoreAndInstantiateContractProposal) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Title != that1.Title { + return false + } + if this.Description != that1.Description { + return false + } + if this.RunAs != that1.RunAs { + return false + } + if !bytes.Equal(this.WASMByteCode, that1.WASMByteCode) { + return false + } + if !this.InstantiatePermission.Equal(that1.InstantiatePermission) { + return false + } + if this.UnpinCode != that1.UnpinCode { + return false + } + if this.Admin != that1.Admin { + return false + } + if this.Label != that1.Label { + return false + } + if !bytes.Equal(this.Msg, that1.Msg) { + return false + } + if len(this.Funds) != len(that1.Funds) { + return false + } + for i := range this.Funds { + if !this.Funds[i].Equal(&that1.Funds[i]) { + return false + } + } + if this.Source != that1.Source { + return false + } + if this.Builder != that1.Builder { + return false + } + if !bytes.Equal(this.CodeHash, that1.CodeHash) { + return false + } + return true +} +func (m *StoreCodeProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreCodeProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreCodeProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x5a + } + if len(m.Builder) > 0 { + i -= len(m.Builder) + copy(dAtA[i:], m.Builder) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Builder))) + i-- + dAtA[i] = 0x52 + } + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x4a + } + if m.UnpinCode { + i-- + if m.UnpinCode { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x40 + } + if m.InstantiatePermission != nil { + { + size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if len(m.WASMByteCode) > 0 { + i -= len(m.WASMByteCode) + copy(dAtA[i:], m.WASMByteCode) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.WASMByteCode))) + i-- + dAtA[i] = 0x22 + } + if len(m.RunAs) > 0 { + i -= len(m.RunAs) + copy(dAtA[i:], m.RunAs) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.RunAs))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InstantiateContractProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstantiateContractProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InstantiateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Funds) > 0 { + for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x3a + } + if len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Label))) + i-- + dAtA[i] = 0x32 + } + if m.CodeID != 0 { + i = encodeVarintProposalLegacy(dAtA, i, uint64(m.CodeID)) + i-- + dAtA[i] = 0x28 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x22 + } + if len(m.RunAs) > 0 { + i -= len(m.RunAs) + copy(dAtA[i:], m.RunAs) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.RunAs))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *InstantiateContract2Proposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InstantiateContract2Proposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *InstantiateContract2Proposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FixMsg { + i-- + if m.FixMsg { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if len(m.Salt) > 0 { + i -= len(m.Salt) + copy(dAtA[i:], m.Salt) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Salt))) + i-- + dAtA[i] = 0x4a + } + if len(m.Funds) > 0 { + for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x3a + } + if len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Label))) + i-- + dAtA[i] = 0x32 + } + if m.CodeID != 0 { + i = encodeVarintProposalLegacy(dAtA, i, uint64(m.CodeID)) + i-- + dAtA[i] = 0x28 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x22 + } + if len(m.RunAs) > 0 { + i -= len(m.RunAs) + copy(dAtA[i:], m.RunAs) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.RunAs))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MigrateContractProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MigrateContractProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MigrateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x32 + } + if m.CodeID != 0 { + i = encodeVarintProposalLegacy(dAtA, i, uint64(m.CodeID)) + i-- + dAtA[i] = 0x28 + } + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x22 + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SudoContractProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SudoContractProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SudoContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x22 + } + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExecuteContractProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecuteContractProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExecuteContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Funds) > 0 { + for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + } + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x2a + } + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x22 + } + if len(m.RunAs) > 0 { + i -= len(m.RunAs) + copy(dAtA[i:], m.RunAs) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.RunAs))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UpdateAdminProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateAdminProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateAdminProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x22 + } + if len(m.NewAdmin) > 0 { + i -= len(m.NewAdmin) + copy(dAtA[i:], m.NewAdmin) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.NewAdmin))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ClearAdminProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ClearAdminProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClearAdminProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Contract) > 0 { + i -= len(m.Contract) + copy(dAtA[i:], m.Contract) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Contract))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PinCodesProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PinCodesProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PinCodesProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeIDs) > 0 { + dAtA3 := make([]byte, len(m.CodeIDs)*10) + var j2 int + for _, num := range m.CodeIDs { + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintProposalLegacy(dAtA, i, uint64(j2)) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UnpinCodesProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UnpinCodesProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UnpinCodesProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeIDs) > 0 { + dAtA5 := make([]byte, len(m.CodeIDs)*10) + var j4 int + for _, num := range m.CodeIDs { + for num >= 1<<7 { + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j4++ + } + dAtA5[j4] = uint8(num) + j4++ + } + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintProposalLegacy(dAtA, i, uint64(j4)) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *AccessConfigUpdate) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AccessConfigUpdate) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AccessConfigUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.CodeID != 0 { + i = encodeVarintProposalLegacy(dAtA, i, uint64(m.CodeID)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *UpdateInstantiateConfigProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UpdateInstantiateConfigProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UpdateInstantiateConfigProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.AccessConfigUpdates) > 0 { + for iNdEx := len(m.AccessConfigUpdates) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccessConfigUpdates[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *StoreAndInstantiateContractProposal) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *StoreAndInstantiateContractProposal) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *StoreAndInstantiateContractProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.CodeHash) > 0 { + i -= len(m.CodeHash) + copy(dAtA[i:], m.CodeHash) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.CodeHash))) + i-- + dAtA[i] = 0x6a + } + if len(m.Builder) > 0 { + i -= len(m.Builder) + copy(dAtA[i:], m.Builder) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Builder))) + i-- + dAtA[i] = 0x62 + } + if len(m.Source) > 0 { + i -= len(m.Source) + copy(dAtA[i:], m.Source) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Source))) + i-- + dAtA[i] = 0x5a + } + if len(m.Funds) > 0 { + for iNdEx := len(m.Funds) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Funds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + } + if len(m.Msg) > 0 { + i -= len(m.Msg) + copy(dAtA[i:], m.Msg) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Msg))) + i-- + dAtA[i] = 0x4a + } + if len(m.Label) > 0 { + i -= len(m.Label) + copy(dAtA[i:], m.Label) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Label))) + i-- + dAtA[i] = 0x42 + } + if len(m.Admin) > 0 { + i -= len(m.Admin) + copy(dAtA[i:], m.Admin) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Admin))) + i-- + dAtA[i] = 0x3a + } + if m.UnpinCode { + i-- + if m.UnpinCode { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.InstantiatePermission != nil { + { + size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintProposalLegacy(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.WASMByteCode) > 0 { + i -= len(m.WASMByteCode) + copy(dAtA[i:], m.WASMByteCode) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.WASMByteCode))) + i-- + dAtA[i] = 0x22 + } + if len(m.RunAs) > 0 { + i -= len(m.RunAs) + copy(dAtA[i:], m.RunAs) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.RunAs))) + i-- + dAtA[i] = 0x1a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x12 + } + if len(m.Title) > 0 { + i -= len(m.Title) + copy(dAtA[i:], m.Title) + i = encodeVarintProposalLegacy(dAtA, i, uint64(len(m.Title))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintProposalLegacy(dAtA []byte, offset int, v uint64) int { + offset -= sovProposalLegacy(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *StoreCodeProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.RunAs) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.WASMByteCode) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.InstantiatePermission != nil { + l = m.InstantiatePermission.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.UnpinCode { + n += 2 + } + l = len(m.Source) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Builder) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func (m *InstantiateContractProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.RunAs) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.CodeID != 0 { + n += 1 + sovProposalLegacy(uint64(m.CodeID)) + } + l = len(m.Label) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.Funds) > 0 { + for _, e := range m.Funds { + l = e.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + } + return n +} + +func (m *InstantiateContract2Proposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.RunAs) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.CodeID != 0 { + n += 1 + sovProposalLegacy(uint64(m.CodeID)) + } + l = len(m.Label) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.Funds) > 0 { + for _, e := range m.Funds { + l = e.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + } + l = len(m.Salt) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.FixMsg { + n += 2 + } + return n +} + +func (m *MigrateContractProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.CodeID != 0 { + n += 1 + sovProposalLegacy(uint64(m.CodeID)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func (m *SudoContractProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func (m *ExecuteContractProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.RunAs) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.Funds) > 0 { + for _, e := range m.Funds { + l = e.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + } + return n +} + +func (m *UpdateAdminProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.NewAdmin) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func (m *ClearAdminProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Contract) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func (m *PinCodesProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.CodeIDs) > 0 { + l = 0 + for _, e := range m.CodeIDs { + l += sovProposalLegacy(uint64(e)) + } + n += 1 + sovProposalLegacy(uint64(l)) + l + } + return n +} + +func (m *UnpinCodesProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.CodeIDs) > 0 { + l = 0 + for _, e := range m.CodeIDs { + l += sovProposalLegacy(uint64(e)) + } + n += 1 + sovProposalLegacy(uint64(l)) + l + } + return n +} + +func (m *AccessConfigUpdate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CodeID != 0 { + n += 1 + sovProposalLegacy(uint64(m.CodeID)) + } + l = m.InstantiatePermission.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + return n +} + +func (m *UpdateInstantiateConfigProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.AccessConfigUpdates) > 0 { + for _, e := range m.AccessConfigUpdates { + l = e.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + } + return n +} + +func (m *StoreAndInstantiateContractProposal) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Title) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.RunAs) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.WASMByteCode) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.InstantiatePermission != nil { + l = m.InstantiatePermission.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if m.UnpinCode { + n += 2 + } + l = len(m.Admin) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Label) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Msg) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + if len(m.Funds) > 0 { + for _, e := range m.Funds { + l = e.Size() + n += 1 + l + sovProposalLegacy(uint64(l)) + } + } + l = len(m.Source) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.Builder) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + l = len(m.CodeHash) + if l > 0 { + n += 1 + l + sovProposalLegacy(uint64(l)) + } + return n +} + +func sovProposalLegacy(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozProposalLegacy(x uint64) (n int) { + return sovProposalLegacy(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreCodeProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreCodeProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WASMByteCode", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WASMByteCode = append(m.WASMByteCode[:0], dAtA[iNdEx:postIndex]...) + if m.WASMByteCode == nil { + m.WASMByteCode = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InstantiatePermission == nil { + m.InstantiatePermission = &AccessConfig{} + } + if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnpinCode", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UnpinCode = bool(v != 0) + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Source = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Builder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Builder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...) + if m.CodeHash == nil { + m.CodeHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstantiateContractProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstantiateContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) + } + m.CodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Funds = append(m.Funds, types.Coin{}) + if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InstantiateContract2Proposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InstantiateContract2Proposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InstantiateContract2Proposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) + } + m.CodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Funds = append(m.Funds, types.Coin{}) + if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Salt", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Salt = append(m.Salt[:0], dAtA[iNdEx:postIndex]...) + if m.Salt == nil { + m.Salt = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FixMsg", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FixMsg = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MigrateContractProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MigrateContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) + } + m.CodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SudoContractProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SudoContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecuteContractProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecuteContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Funds = append(m.Funds, types.Coin{}) + if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateAdminProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateAdminProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NewAdmin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NewAdmin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ClearAdminProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClearAdminProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Contract = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PinCodesProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PinCodesProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CodeIDs = append(m.CodeIDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.CodeIDs) == 0 { + m.CodeIDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CodeIDs = append(m.CodeIDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field CodeIDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UnpinCodesProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UnpinCodesProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CodeIDs = append(m.CodeIDs, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + var count int + for _, integer := range dAtA[iNdEx:postIndex] { + if integer < 128 { + count++ + } + } + elementCount = count + if elementCount != 0 && len(m.CodeIDs) == 0 { + m.CodeIDs = make([]uint64, 0, elementCount) + } + for iNdEx < postIndex { + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.CodeIDs = append(m.CodeIDs, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field CodeIDs", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AccessConfigUpdate: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AccessConfigUpdate: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) + } + m.CodeID = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeID |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateInstantiateConfigProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateInstantiateConfigProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccessConfigUpdates", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccessConfigUpdates = append(m.AccessConfigUpdates, AccessConfigUpdate{}) + if err := m.AccessConfigUpdates[len(m.AccessConfigUpdates)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *StoreAndInstantiateContractProposal) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: StoreAndInstantiateContractProposal: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: StoreAndInstantiateContractProposal: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Title", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Title = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RunAs", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RunAs = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WASMByteCode", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WASMByteCode = append(m.WASMByteCode[:0], dAtA[iNdEx:postIndex]...) + if m.WASMByteCode == nil { + m.WASMByteCode = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.InstantiatePermission == nil { + m.InstantiatePermission = &AccessConfig{} + } + if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UnpinCode", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.UnpinCode = bool(v != 0) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Admin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Admin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Label", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Label = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Msg = append(m.Msg[:0], dAtA[iNdEx:postIndex]...) + if m.Msg == nil { + m.Msg = []byte{} + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Funds", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Funds = append(m.Funds, types.Coin{}) + if err := m.Funds[len(m.Funds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Source = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Builder", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Builder = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeHash", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthProposalLegacy + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthProposalLegacy + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CodeHash = append(m.CodeHash[:0], dAtA[iNdEx:postIndex]...) + if m.CodeHash == nil { + m.CodeHash = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipProposalLegacy(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthProposalLegacy + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipProposalLegacy(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowProposalLegacy + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthProposalLegacy + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupProposalLegacy + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthProposalLegacy + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthProposalLegacy = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowProposalLegacy = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupProposalLegacy = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/wasm/types/proposal_legacy_test.go b/x/wasm/types/proposal_legacy_test.go new file mode 100644 index 0000000000..71318be453 --- /dev/null +++ b/x/wasm/types/proposal_legacy_test.go @@ -0,0 +1,1317 @@ +package types + +import ( + "bytes" + "encoding/hex" + "encoding/json" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gopkg.in/yaml.v2" + + sdkmath "cosmossdk.io/math" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" +) + +func TestValidateProposalCommons(t *testing.T) { + type commonProposal struct { + Title, Description string + } + + specs := map[string]struct { + src commonProposal + expErr bool + }{ + "all good": {src: commonProposal{ + Title: "Foo", + Description: "Bar", + }}, + "prevent empty title": { + src: commonProposal{ + Description: "Bar", + }, + expErr: true, + }, + "prevent white space only title": { + src: commonProposal{ + Title: " ", + Description: "Bar", + }, + expErr: true, + }, + "prevent leading white spaces in title": { + src: commonProposal{ + Title: " Foo", + Description: "Bar", + }, + expErr: true, + }, + "prevent title exceeds max length ": { + src: commonProposal{ + Title: strings.Repeat("a", v1beta1.MaxTitleLength+1), + Description: "Bar", + }, + expErr: true, + }, + "prevent empty description": { + src: commonProposal{ + Title: "Foo", + }, + expErr: true, + }, + "prevent leading white spaces in description": { + src: commonProposal{ + Title: "Foo", + Description: " Bar", + }, + expErr: true, + }, + "prevent white space only description": { + src: commonProposal{ + Title: "Foo", + Description: " ", + }, + expErr: true, + }, + "prevent descr exceeds max length ": { + src: commonProposal{ + Title: "Foo", + Description: strings.Repeat("a", v1beta1.MaxDescriptionLength+1), + }, + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := validateProposalCommons(spec.src.Title, spec.src.Description) + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateStoreCodeProposal(t *testing.T) { + var anyAddress sdk.AccAddress = bytes.Repeat([]byte{0x0}, ContractAddrLen) + + specs := map[string]struct { + src *StoreCodeProposal + expErr bool + }{ + "all good": { + src: StoreCodeProposalFixture(), + }, + "all good no code verification info": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.Source = "" + p.Builder = "" + p.CodeHash = nil + }), + }, + "source missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.Source = "" + }), + expErr: true, + }, + "builder missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.Builder = "" + }), + expErr: true, + }, + "code hash missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.CodeHash = nil + }), + expErr: true, + }, + "with instantiate permission": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + accessConfig := AccessTypeAnyOfAddresses.With(anyAddress) + p.InstantiatePermission = &accessConfig + }), + }, + "base data missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.Title = "" + }), + expErr: true, + }, + "run_as missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.RunAs = "" + }), + expErr: true, + }, + "run_as invalid": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.RunAs = invalidAddress + }), + expErr: true, + }, + "wasm code missing": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.WASMByteCode = nil + }), + expErr: true, + }, + "wasm code invalid": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.WASMByteCode = bytes.Repeat([]byte{0x0}, MaxProposalWasmSize+1) + }), + expErr: true, + }, + "with invalid instantiate permission": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.InstantiatePermission = &AccessConfig{} + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateInstantiateContractProposal(t *testing.T) { + specs := map[string]struct { + src *InstantiateContractProposal + expErr bool + }{ + "all good": { + src: InstantiateContractProposalFixture(), + }, + "without admin": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Admin = "" + }), + }, + "without init msg": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Msg = nil + }), + expErr: true, + }, + "with invalid init msg": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Msg = []byte("not a json string") + }), + expErr: true, + }, + "without init funds": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Funds = nil + }), + }, + "base data missing": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Title = "" + }), + expErr: true, + }, + "run_as missing": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.RunAs = "" + }), + expErr: true, + }, + "run_as invalid": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.RunAs = invalidAddress + }), + expErr: true, + }, + "admin invalid": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Admin = invalidAddress + }), + expErr: true, + }, + "code id empty": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.CodeID = 0 + }), + expErr: true, + }, + "label empty": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Label = "" + }), + expErr: true, + }, + "init funds negative": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(-1)}} + }), + expErr: true, + }, + "init funds with duplicates": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(1)}, {Denom: "foo", Amount: sdkmath.NewInt(2)}} + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateInstantiateContract2Proposal(t *testing.T) { + specs := map[string]struct { + src *InstantiateContract2Proposal + expErr bool + }{ + "all good": { + src: InstantiateContract2ProposalFixture(), + }, + "without admin": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Admin = "" + }), + }, + "without init msg": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Msg = nil + }), + expErr: true, + }, + "with invalid init msg": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Msg = []byte("not a json string") + }), + expErr: true, + }, + "without init funds": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Funds = nil + }), + }, + "base data missing": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Title = "" + }), + expErr: true, + }, + "run_as missing": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.RunAs = "" + }), + expErr: true, + }, + "run_as invalid": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.RunAs = invalidAddress + }), + expErr: true, + }, + "admin invalid": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Admin = invalidAddress + }), + expErr: true, + }, + "code id empty": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.CodeID = 0 + }), + expErr: true, + }, + "label empty": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Label = "" + }), + expErr: true, + }, + "untrimmed label ": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Label = " label " + }), + expErr: true, + }, + "init funds negative": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(-1)}} + }), + expErr: true, + }, + "init funds with duplicates": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(1)}, {Denom: "foo", Amount: sdkmath.NewInt(2)}} + }), + expErr: true, + }, + "init with empty salt": { + src: InstantiateContract2ProposalFixture(func(p *InstantiateContract2Proposal) { + p.Salt = nil + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateStoreAndInstantiateContractProposal(t *testing.T) { + var anyAddress sdk.AccAddress = bytes.Repeat([]byte{0x0}, ContractAddrLen) + + specs := map[string]struct { + src *StoreAndInstantiateContractProposal + expErr bool + }{ + "all good": { + src: StoreAndInstantiateContractProposalFixture(), + }, + "all good no code verification info": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Source = "" + p.Builder = "" + p.CodeHash = nil + }), + }, + "source missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Source = "" + }), + expErr: true, + }, + "builder missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Builder = "" + }), + expErr: true, + }, + "code hash missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.CodeHash = nil + }), + expErr: true, + }, + "with instantiate permission": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + accessConfig := AccessTypeAnyOfAddresses.With(anyAddress) + p.InstantiatePermission = &accessConfig + }), + }, + "base data missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Title = "" + }), + expErr: true, + }, + "run_as missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.RunAs = "" + }), + expErr: true, + }, + "run_as invalid": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.RunAs = invalidAddress + }), + expErr: true, + }, + "wasm code missing": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.WASMByteCode = nil + }), + expErr: true, + }, + "wasm code invalid": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.WASMByteCode = bytes.Repeat([]byte{0x0}, MaxProposalWasmSize+1) + }), + expErr: true, + }, + "with invalid instantiate permission": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.InstantiatePermission = &AccessConfig{} + }), + expErr: true, + }, + "without admin": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Admin = "" + }), + }, + "without init msg": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Msg = nil + }), + expErr: true, + }, + "with invalid init msg": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Msg = []byte("not a json string") + }), + expErr: true, + }, + "without init funds": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Funds = nil + }), + }, + "admin invalid": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Admin = invalidAddress + }), + expErr: true, + }, + "label empty": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Label = "" + }), + expErr: true, + }, + "init funds negative": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(-1)}} + }), + expErr: true, + }, + "init funds with duplicates": { + src: StoreAndInstantiateContractProposalFixture(func(p *StoreAndInstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(1)}, {Denom: "foo", Amount: sdkmath.NewInt(2)}} + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateMigrateContractProposal(t *testing.T) { + invalidAddress := "invalid address2" + + specs := map[string]struct { + src *MigrateContractProposal + expErr bool + }{ + "all good": { + src: MigrateContractProposalFixture(), + }, + "without migrate msg": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.Msg = nil + }), + expErr: true, + }, + "migrate msg with invalid json": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.Msg = []byte("not a json message") + }), + expErr: true, + }, + "base data missing": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.Title = "" + }), + expErr: true, + }, + "contract missing": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.Contract = "" + }), + expErr: true, + }, + "contract invalid": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.Contract = invalidAddress + }), + expErr: true, + }, + "code id empty": { + src: MigrateContractProposalFixture(func(p *MigrateContractProposal) { + p.CodeID = 0 + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateSudoContractProposal(t *testing.T) { + specs := map[string]struct { + src *SudoContractProposal + expErr bool + }{ + "all good": { + src: SudoContractProposalFixture(), + }, + "msg is nil": { + src: SudoContractProposalFixture(func(p *SudoContractProposal) { + p.Msg = nil + }), + expErr: true, + }, + "msg with invalid json": { + src: SudoContractProposalFixture(func(p *SudoContractProposal) { + p.Msg = []byte("not a json message") + }), + expErr: true, + }, + "base data missing": { + src: SudoContractProposalFixture(func(p *SudoContractProposal) { + p.Title = "" + }), + expErr: true, + }, + "contract missing": { + src: SudoContractProposalFixture(func(p *SudoContractProposal) { + p.Contract = "" + }), + expErr: true, + }, + "contract invalid": { + src: SudoContractProposalFixture(func(p *SudoContractProposal) { + p.Contract = invalidAddress + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateExecuteContractProposal(t *testing.T) { + specs := map[string]struct { + src *ExecuteContractProposal + expErr bool + }{ + "all good": { + src: ExecuteContractProposalFixture(), + }, + "msg is nil": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.Msg = nil + }), + expErr: true, + }, + "msg with invalid json": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.Msg = []byte("not a valid json message") + }), + expErr: true, + }, + "base data missing": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.Title = "" + }), + expErr: true, + }, + "contract missing": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.Contract = "" + }), + expErr: true, + }, + "contract invalid": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.Contract = invalidAddress + }), + expErr: true, + }, + "run as is invalid": { + src: ExecuteContractProposalFixture(func(p *ExecuteContractProposal) { + p.RunAs = invalidAddress + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateUpdateAdminProposal(t *testing.T) { + specs := map[string]struct { + src *UpdateAdminProposal + expErr bool + }{ + "all good": { + src: UpdateAdminProposalFixture(), + }, + "base data missing": { + src: UpdateAdminProposalFixture(func(p *UpdateAdminProposal) { + p.Title = "" + }), + expErr: true, + }, + "contract missing": { + src: UpdateAdminProposalFixture(func(p *UpdateAdminProposal) { + p.Contract = "" + }), + expErr: true, + }, + "contract invalid": { + src: UpdateAdminProposalFixture(func(p *UpdateAdminProposal) { + p.Contract = invalidAddress + }), + expErr: true, + }, + "admin missing": { + src: UpdateAdminProposalFixture(func(p *UpdateAdminProposal) { + p.NewAdmin = "" + }), + expErr: true, + }, + "admin invalid": { + src: UpdateAdminProposalFixture(func(p *UpdateAdminProposal) { + p.NewAdmin = invalidAddress + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestValidateClearAdminProposal(t *testing.T) { + specs := map[string]struct { + src *ClearAdminProposal + expErr bool + }{ + "all good": { + src: ClearAdminProposalFixture(), + }, + "base data missing": { + src: ClearAdminProposalFixture(func(p *ClearAdminProposal) { + p.Title = "" + }), + expErr: true, + }, + "contract missing": { + src: ClearAdminProposalFixture(func(p *ClearAdminProposal) { + p.Contract = "" + }), + expErr: true, + }, + "contract invalid": { + src: ClearAdminProposalFixture(func(p *ClearAdminProposal) { + p.Contract = invalidAddress + }), + expErr: true, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + err := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, err) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestProposalStrings(t *testing.T) { + specs := map[string]struct { + src v1beta1.Content + exp string + }{ + "store code": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.WASMByteCode = []byte{0o1, 0o2, 0o3, 0o4, 0o5, 0o6, 0o7, 0x08, 0x09, 0x0a} + }), + exp: `Store Code Proposal: + Title: Foo + Description: Bar + Run as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + WasmCode: 0102030405060708090A + Source: https://example.com/ + Builder: cosmwasm/workspace-optimizer:v0.12.8 + Code Hash: 6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D +`, + }, + "instantiate contract": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(1)}, {Denom: "bar", Amount: sdkmath.NewInt(2)}} + }), + exp: `Instantiate Code Proposal: + Title: Foo + Description: Bar + Run as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + Admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + Code id: 1 + Label: testing + Msg: "{\"verifier\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\",\"beneficiary\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\"}" + Funds: 1foo,2bar +`, + }, + "instantiate contract without funds": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { p.Funds = nil }), + exp: `Instantiate Code Proposal: + Title: Foo + Description: Bar + Run as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + Admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + Code id: 1 + Label: testing + Msg: "{\"verifier\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\",\"beneficiary\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\"}" + Funds: +`, + }, + "instantiate contract without admin": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { p.Admin = "" }), + exp: `Instantiate Code Proposal: + Title: Foo + Description: Bar + Run as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 + Admin: + Code id: 1 + Label: testing + Msg: "{\"verifier\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\",\"beneficiary\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\"}" + Funds: +`, + }, + "migrate contract": { + src: MigrateContractProposalFixture(), + exp: `Migrate Contract Proposal: + Title: Foo + Description: Bar + Contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr + Code id: 1 + Msg: "{\"verifier\":\"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4\"}" +`, + }, + "update admin": { + src: UpdateAdminProposalFixture(), + exp: `Update Contract Admin Proposal: + Title: Foo + Description: Bar + Contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr + New Admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +`, + }, + "clear admin": { + src: ClearAdminProposalFixture(), + exp: `Clear Contract Admin Proposal: + Title: Foo + Description: Bar + Contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr +`, + }, + "pin codes": { + src: &PinCodesProposal{ + Title: "Foo", + Description: "Bar", + CodeIDs: []uint64{1, 2, 3}, + }, + exp: `Pin Wasm Codes Proposal: + Title: Foo + Description: Bar + Codes: [1 2 3] +`, + }, + "unpin codes": { + src: &UnpinCodesProposal{ + Title: "Foo", + Description: "Bar", + CodeIDs: []uint64{3, 2, 1}, + }, + exp: `Unpin Wasm Codes Proposal: + Title: Foo + Description: Bar + Codes: [3 2 1] +`, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + assert.Equal(t, spec.exp, spec.src.String()) + }) + } +} + +func TestProposalYaml(t *testing.T) { + specs := map[string]struct { + src v1beta1.Content + exp string + }{ + "store code": { + src: StoreCodeProposalFixture(func(p *StoreCodeProposal) { + p.WASMByteCode = []byte{0o1, 0o2, 0o3, 0o4, 0o5, 0o6, 0o7, 0x08, 0x09, 0x0a} + }), + exp: `title: Foo +description: Bar +run_as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +wasm_byte_code: AQIDBAUGBwgJCg== +instantiate_permission: null +source: https://example.com/ +builder: cosmwasm/workspace-optimizer:v0.12.8 +code_hash: 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d +`, + }, + "instantiate contract": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { + p.Funds = sdk.Coins{{Denom: "foo", Amount: sdkmath.NewInt(1)}, {Denom: "bar", Amount: sdkmath.NewInt(2)}} + }), + exp: `title: Foo +description: Bar +run_as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +code_id: 1 +label: testing +msg: '{"verifier":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4","beneficiary":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4"}' +funds: +- denom: foo + amount: "1" +- denom: bar + amount: "2" +`, + }, + "instantiate contract without funds": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { p.Funds = nil }), + exp: `title: Foo +description: Bar +run_as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +code_id: 1 +label: testing +msg: '{"verifier":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4","beneficiary":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4"}' +funds: [] +`, + }, + "instantiate contract without admin": { + src: InstantiateContractProposalFixture(func(p *InstantiateContractProposal) { p.Admin = "" }), + exp: `title: Foo +description: Bar +run_as: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +admin: "" +code_id: 1 +label: testing +msg: '{"verifier":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4","beneficiary":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4"}' +funds: [] +`, + }, + "migrate contract": { + src: MigrateContractProposalFixture(), + exp: `title: Foo +description: Bar +contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr +code_id: 1 +msg: '{"verifier":"cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4"}' +`, + }, + "update admin": { + src: UpdateAdminProposalFixture(), + exp: `title: Foo +description: Bar +new_admin: cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4 +contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr +`, + }, + "clear admin": { + src: ClearAdminProposalFixture(), + exp: `title: Foo +description: Bar +contract: cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr +`, + }, + "pin codes": { + src: &PinCodesProposal{ + Title: "Foo", + Description: "Bar", + CodeIDs: []uint64{1, 2, 3}, + }, + exp: `title: Foo +description: Bar +code_ids: +- 1 +- 2 +- 3 +`, + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + v, err := yaml.Marshal(&spec.src) //nolint:gosec + require.NoError(t, err) + assert.Equal(t, spec.exp, string(v)) + }) + } +} + +func TestUnmarshalContentFromJson(t *testing.T) { + specs := map[string]struct { + src string + got v1beta1.Content + exp v1beta1.Content + }{ + "instantiate ": { + src: ` +{ + "title": "foo", + "description": "bar", + "admin": "myAdminAddress", + "code_id": 1, + "funds": [{"denom": "ALX", "amount": "2"},{"denom": "BLX","amount": "3"}], + "msg": {}, + "label": "testing", + "run_as": "myRunAsAddress" +}`, + got: &InstantiateContractProposal{}, + exp: &InstantiateContractProposal{ + Title: "foo", + Description: "bar", + RunAs: "myRunAsAddress", + Admin: "myAdminAddress", + CodeID: 1, + Label: "testing", + Msg: []byte("{}"), + Funds: sdk.NewCoins(sdk.NewCoin("ALX", sdkmath.NewInt(2)), sdk.NewCoin("BLX", sdkmath.NewInt(3))), + }, + }, + "migrate ": { + src: ` +{ + "title": "foo", + "description": "bar", + "code_id": 1, + "contract": "myContractAddr", + "msg": {}, + "run_as": "myRunAsAddress" +}`, + got: &MigrateContractProposal{}, + exp: &MigrateContractProposal{ + Title: "foo", + Description: "bar", + Contract: "myContractAddr", + CodeID: 1, + Msg: []byte("{}"), + }, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + require.NoError(t, json.Unmarshal([]byte(spec.src), spec.got)) + assert.Equal(t, spec.exp, spec.got) + }) + } +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func StoreCodeProposalFixture(mutators ...func(*StoreCodeProposal)) *StoreCodeProposal { + const anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + wasm := []byte{0x0} + // got the value from shell sha256sum + codeHash, err := hex.DecodeString("6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D") + if err != nil { + panic(err) + } + + p := &StoreCodeProposal{ + Title: "Foo", + Description: "Bar", + RunAs: anyAddress, + WASMByteCode: wasm, + Source: "https://example.com/", + Builder: "cosmwasm/workspace-optimizer:v0.12.8", + CodeHash: codeHash, + } + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func InstantiateContractProposalFixture(mutators ...func(p *InstantiateContractProposal)) *InstantiateContractProposal { + var ( + anyValidAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, ContractAddrLen) + + initMsg = struct { + Verifier sdk.AccAddress `json:"verifier"` + Beneficiary sdk.AccAddress `json:"beneficiary"` + }{ + Verifier: anyValidAddress, + Beneficiary: anyValidAddress, + } + ) + const anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + + initMsgBz, err := json.Marshal(initMsg) + if err != nil { + panic(err) + } + p := &InstantiateContractProposal{ + Title: "Foo", + Description: "Bar", + RunAs: anyAddress, + Admin: anyAddress, + CodeID: 1, + Label: "testing", + Msg: initMsgBz, + Funds: nil, + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func InstantiateContract2ProposalFixture(mutators ...func(p *InstantiateContract2Proposal)) *InstantiateContract2Proposal { + var ( + anyValidAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, ContractAddrLen) + + initMsg = struct { + Verifier sdk.AccAddress `json:"verifier"` + Beneficiary sdk.AccAddress `json:"beneficiary"` + }{ + Verifier: anyValidAddress, + Beneficiary: anyValidAddress, + } + ) + const ( + anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + mySalt = "myDefaultSalt" + ) + + initMsgBz, err := json.Marshal(initMsg) + if err != nil { + panic(err) + } + p := &InstantiateContract2Proposal{ + Title: "Foo", + Description: "Bar", + RunAs: anyAddress, + Admin: anyAddress, + CodeID: 1, + Label: "testing", + Msg: initMsgBz, + Funds: nil, + Salt: []byte(mySalt), + FixMsg: false, + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func StoreAndInstantiateContractProposalFixture(mutators ...func(p *StoreAndInstantiateContractProposal)) *StoreAndInstantiateContractProposal { + var ( + anyValidAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, ContractAddrLen) + + initMsg = struct { + Verifier sdk.AccAddress `json:"verifier"` + Beneficiary sdk.AccAddress `json:"beneficiary"` + }{ + Verifier: anyValidAddress, + Beneficiary: anyValidAddress, + } + ) + const anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + wasm := []byte{0x0} + // got the value from shell sha256sum + codeHash, err := hex.DecodeString("6E340B9CFFB37A989CA544E6BB780A2C78901D3FB33738768511A30617AFA01D") + if err != nil { + panic(err) + } + + initMsgBz, err := json.Marshal(initMsg) + if err != nil { + panic(err) + } + p := &StoreAndInstantiateContractProposal{ + Title: "Foo", + Description: "Bar", + RunAs: anyAddress, + WASMByteCode: wasm, + Source: "https://example.com/", + Builder: "cosmwasm/workspace-optimizer:v0.12.9", + CodeHash: codeHash, + Admin: anyAddress, + Label: "testing", + Msg: initMsgBz, + Funds: nil, + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func MigrateContractProposalFixture(mutators ...func(p *MigrateContractProposal)) *MigrateContractProposal { + var ( + anyValidAddress sdk.AccAddress = bytes.Repeat([]byte{0x1}, ContractAddrLen) + + migMsg = struct { + Verifier sdk.AccAddress `json:"verifier"` + }{Verifier: anyValidAddress} + ) + + migMsgBz, err := json.Marshal(migMsg) + if err != nil { + panic(err) + } + const ( + contractAddr = "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr" + anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + ) + p := &MigrateContractProposal{ + Title: "Foo", + Description: "Bar", + Contract: contractAddr, + CodeID: 1, + Msg: migMsgBz, + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func SudoContractProposalFixture(mutators ...func(p *SudoContractProposal)) *SudoContractProposal { + const ( + contractAddr = "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr" + ) + + p := &SudoContractProposal{ + Title: "Foo", + Description: "Bar", + Contract: contractAddr, + Msg: []byte(`{"do":"something"}`), + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func ExecuteContractProposalFixture(mutators ...func(p *ExecuteContractProposal)) *ExecuteContractProposal { + const ( + contractAddr = "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr" + anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + ) + + p := &ExecuteContractProposal{ + Title: "Foo", + Description: "Bar", + Contract: contractAddr, + RunAs: anyAddress, + Msg: []byte(`{"do":"something"}`), + Funds: sdk.Coins{{ + Denom: "stake", + Amount: sdkmath.NewInt(1), + }}, + } + + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func UpdateAdminProposalFixture(mutators ...func(p *UpdateAdminProposal)) *UpdateAdminProposal { + const ( + contractAddr = "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr" + anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" + ) + + p := &UpdateAdminProposal{ + Title: "Foo", + Description: "Bar", + NewAdmin: anyAddress, + Contract: contractAddr, + } + for _, m := range mutators { + m(p) + } + return p +} + +// Deprecated: all gov v1beta1 types are supported for gov store only +func ClearAdminProposalFixture(mutators ...func(p *ClearAdminProposal)) *ClearAdminProposal { + const contractAddr = "cosmos14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s4hmalr" + p := &ClearAdminProposal{ + Title: "Foo", + Description: "Bar", + Contract: contractAddr, + } + for _, m := range mutators { + m(p) + } + return p +} diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index b8874bfbba..b38965f7b4 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -7,10 +7,6 @@ import ( bytes "bytes" context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cometbft_cometbft_libs_bytes "github.com/cometbft/cometbft/libs/bytes" _ "github.com/cosmos/cosmos-proto" query "github.com/cosmos/cosmos-sdk/types/query" @@ -22,14 +18,15 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -50,11 +47,9 @@ func (*QueryContractInfoRequest) ProtoMessage() {} func (*QueryContractInfoRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{0} } - func (m *QueryContractInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractInfoRequest.Marshal(b, m, deterministic) @@ -67,15 +62,12 @@ func (m *QueryContractInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *QueryContractInfoRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractInfoRequest.Merge(m, src) } - func (m *QueryContractInfoRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractInfoRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractInfoRequest.DiscardUnknown(m) } @@ -96,11 +88,9 @@ func (*QueryContractInfoResponse) ProtoMessage() {} func (*QueryContractInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{1} } - func (m *QueryContractInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractInfoResponse.Marshal(b, m, deterministic) @@ -113,15 +103,12 @@ func (m *QueryContractInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } - func (m *QueryContractInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractInfoResponse.Merge(m, src) } - func (m *QueryContractInfoResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractInfoResponse.DiscardUnknown(m) } @@ -143,11 +130,9 @@ func (*QueryContractHistoryRequest) ProtoMessage() {} func (*QueryContractHistoryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{2} } - func (m *QueryContractHistoryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractHistoryRequest.Marshal(b, m, deterministic) @@ -160,15 +145,12 @@ func (m *QueryContractHistoryRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractHistoryRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractHistoryRequest.Merge(m, src) } - func (m *QueryContractHistoryRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractHistoryRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractHistoryRequest.DiscardUnknown(m) } @@ -189,11 +171,9 @@ func (*QueryContractHistoryResponse) ProtoMessage() {} func (*QueryContractHistoryResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{3} } - func (m *QueryContractHistoryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractHistoryResponse.Marshal(b, m, deterministic) @@ -206,15 +186,12 @@ func (m *QueryContractHistoryResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractHistoryResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractHistoryResponse.Merge(m, src) } - func (m *QueryContractHistoryResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractHistoryResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractHistoryResponse.DiscardUnknown(m) } @@ -235,11 +212,9 @@ func (*QueryContractsByCodeRequest) ProtoMessage() {} func (*QueryContractsByCodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{4} } - func (m *QueryContractsByCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCodeRequest.Marshal(b, m, deterministic) @@ -252,15 +227,12 @@ func (m *QueryContractsByCodeRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractsByCodeRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCodeRequest.Merge(m, src) } - func (m *QueryContractsByCodeRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCodeRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCodeRequest.DiscardUnknown(m) } @@ -282,11 +254,9 @@ func (*QueryContractsByCodeResponse) ProtoMessage() {} func (*QueryContractsByCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{5} } - func (m *QueryContractsByCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCodeResponse.Marshal(b, m, deterministic) @@ -299,15 +269,12 @@ func (m *QueryContractsByCodeResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryContractsByCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCodeResponse.Merge(m, src) } - func (m *QueryContractsByCodeResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCodeResponse.DiscardUnknown(m) } @@ -329,11 +296,9 @@ func (*QueryAllContractStateRequest) ProtoMessage() {} func (*QueryAllContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{6} } - func (m *QueryAllContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryAllContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllContractStateRequest.Marshal(b, m, deterministic) @@ -346,15 +311,12 @@ func (m *QueryAllContractStateRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryAllContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllContractStateRequest.Merge(m, src) } - func (m *QueryAllContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QueryAllContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllContractStateRequest.DiscardUnknown(m) } @@ -375,11 +337,9 @@ func (*QueryAllContractStateResponse) ProtoMessage() {} func (*QueryAllContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{7} } - func (m *QueryAllContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryAllContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryAllContractStateResponse.Marshal(b, m, deterministic) @@ -392,15 +352,12 @@ func (m *QueryAllContractStateResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } - func (m *QueryAllContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryAllContractStateResponse.Merge(m, src) } - func (m *QueryAllContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QueryAllContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryAllContractStateResponse.DiscardUnknown(m) } @@ -421,11 +378,9 @@ func (*QueryRawContractStateRequest) ProtoMessage() {} func (*QueryRawContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{8} } - func (m *QueryRawContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryRawContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRawContractStateRequest.Marshal(b, m, deterministic) @@ -438,15 +393,12 @@ func (m *QueryRawContractStateRequest) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } - func (m *QueryRawContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRawContractStateRequest.Merge(m, src) } - func (m *QueryRawContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QueryRawContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryRawContractStateRequest.DiscardUnknown(m) } @@ -466,11 +418,9 @@ func (*QueryRawContractStateResponse) ProtoMessage() {} func (*QueryRawContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{9} } - func (m *QueryRawContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryRawContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryRawContractStateResponse.Marshal(b, m, deterministic) @@ -483,15 +433,12 @@ func (m *QueryRawContractStateResponse) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } - func (m *QueryRawContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryRawContractStateResponse.Merge(m, src) } - func (m *QueryRawContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QueryRawContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryRawContractStateResponse.DiscardUnknown(m) } @@ -513,11 +460,9 @@ func (*QuerySmartContractStateRequest) ProtoMessage() {} func (*QuerySmartContractStateRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{10} } - func (m *QuerySmartContractStateRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QuerySmartContractStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QuerySmartContractStateRequest.Marshal(b, m, deterministic) @@ -530,15 +475,12 @@ func (m *QuerySmartContractStateRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *QuerySmartContractStateRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QuerySmartContractStateRequest.Merge(m, src) } - func (m *QuerySmartContractStateRequest) XXX_Size() int { return m.Size() } - func (m *QuerySmartContractStateRequest) XXX_DiscardUnknown() { xxx_messageInfo_QuerySmartContractStateRequest.DiscardUnknown(m) } @@ -558,11 +500,9 @@ func (*QuerySmartContractStateResponse) ProtoMessage() {} func (*QuerySmartContractStateResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{11} } - func (m *QuerySmartContractStateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QuerySmartContractStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QuerySmartContractStateResponse.Marshal(b, m, deterministic) @@ -575,15 +515,12 @@ func (m *QuerySmartContractStateResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *QuerySmartContractStateResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QuerySmartContractStateResponse.Merge(m, src) } - func (m *QuerySmartContractStateResponse) XXX_Size() int { return m.Size() } - func (m *QuerySmartContractStateResponse) XXX_DiscardUnknown() { xxx_messageInfo_QuerySmartContractStateResponse.DiscardUnknown(m) } @@ -601,11 +538,9 @@ func (*QueryCodeRequest) ProtoMessage() {} func (*QueryCodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{12} } - func (m *QueryCodeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodeRequest.Marshal(b, m, deterministic) @@ -618,15 +553,12 @@ func (m *QueryCodeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } - func (m *QueryCodeRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodeRequest.Merge(m, src) } - func (m *QueryCodeRequest) XXX_Size() int { return m.Size() } - func (m *QueryCodeRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodeRequest.DiscardUnknown(m) } @@ -647,11 +579,9 @@ func (*CodeInfoResponse) ProtoMessage() {} func (*CodeInfoResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{13} } - func (m *CodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CodeInfoResponse.Marshal(b, m, deterministic) @@ -664,15 +594,12 @@ func (m *CodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, er return b[:n], nil } } - func (m *CodeInfoResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_CodeInfoResponse.Merge(m, src) } - func (m *CodeInfoResponse) XXX_Size() int { return m.Size() } - func (m *CodeInfoResponse) XXX_DiscardUnknown() { xxx_messageInfo_CodeInfoResponse.DiscardUnknown(m) } @@ -691,11 +618,9 @@ func (*QueryCodeResponse) ProtoMessage() {} func (*QueryCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{14} } - func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodeResponse.Marshal(b, m, deterministic) @@ -708,15 +633,12 @@ func (m *QueryCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } - func (m *QueryCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodeResponse.Merge(m, src) } - func (m *QueryCodeResponse) XXX_Size() int { return m.Size() } - func (m *QueryCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodeResponse.DiscardUnknown(m) } @@ -735,11 +657,9 @@ func (*QueryCodesRequest) ProtoMessage() {} func (*QueryCodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{15} } - func (m *QueryCodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodesRequest.Marshal(b, m, deterministic) @@ -752,15 +672,12 @@ func (m *QueryCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } - func (m *QueryCodesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodesRequest.Merge(m, src) } - func (m *QueryCodesRequest) XXX_Size() int { return m.Size() } - func (m *QueryCodesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodesRequest.DiscardUnknown(m) } @@ -780,11 +697,9 @@ func (*QueryCodesResponse) ProtoMessage() {} func (*QueryCodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{16} } - func (m *QueryCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryCodesResponse.Marshal(b, m, deterministic) @@ -797,15 +712,12 @@ func (m *QueryCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryCodesResponse.Merge(m, src) } - func (m *QueryCodesResponse) XXX_Size() int { return m.Size() } - func (m *QueryCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryCodesResponse.DiscardUnknown(m) } @@ -825,11 +737,9 @@ func (*QueryPinnedCodesRequest) ProtoMessage() {} func (*QueryPinnedCodesRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{17} } - func (m *QueryPinnedCodesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryPinnedCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPinnedCodesRequest.Marshal(b, m, deterministic) @@ -842,15 +752,12 @@ func (m *QueryPinnedCodesRequest) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *QueryPinnedCodesRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPinnedCodesRequest.Merge(m, src) } - func (m *QueryPinnedCodesRequest) XXX_Size() int { return m.Size() } - func (m *QueryPinnedCodesRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryPinnedCodesRequest.DiscardUnknown(m) } @@ -871,11 +778,9 @@ func (*QueryPinnedCodesResponse) ProtoMessage() {} func (*QueryPinnedCodesResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{18} } - func (m *QueryPinnedCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryPinnedCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryPinnedCodesResponse.Marshal(b, m, deterministic) @@ -888,15 +793,12 @@ func (m *QueryPinnedCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *QueryPinnedCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryPinnedCodesResponse.Merge(m, src) } - func (m *QueryPinnedCodesResponse) XXX_Size() int { return m.Size() } - func (m *QueryPinnedCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryPinnedCodesResponse.DiscardUnknown(m) } @@ -904,7 +806,8 @@ func (m *QueryPinnedCodesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryPinnedCodesResponse proto.InternalMessageInfo // QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct{} +type QueryParamsRequest struct { +} func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } @@ -912,11 +815,9 @@ func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{19} } - func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) @@ -929,15 +830,12 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsRequest.Merge(m, src) } - func (m *QueryParamsRequest) XXX_Size() int { return m.Size() } - func (m *QueryParamsRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) } @@ -956,11 +854,9 @@ func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{20} } - func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryParamsResponse.Marshal(b, m, deterministic) @@ -973,15 +869,12 @@ func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *QueryParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryParamsResponse.Merge(m, src) } - func (m *QueryParamsResponse) XXX_Size() int { return m.Size() } - func (m *QueryParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) } @@ -1003,11 +896,9 @@ func (*QueryContractsByCreatorRequest) ProtoMessage() {} func (*QueryContractsByCreatorRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{21} } - func (m *QueryContractsByCreatorRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCreatorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCreatorRequest.Marshal(b, m, deterministic) @@ -1020,15 +911,12 @@ func (m *QueryContractsByCreatorRequest) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *QueryContractsByCreatorRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCreatorRequest.Merge(m, src) } - func (m *QueryContractsByCreatorRequest) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCreatorRequest) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCreatorRequest.DiscardUnknown(m) } @@ -1050,11 +938,9 @@ func (*QueryContractsByCreatorResponse) ProtoMessage() {} func (*QueryContractsByCreatorResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9677c207036b9f2b, []int{22} } - func (m *QueryContractsByCreatorResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *QueryContractsByCreatorResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_QueryContractsByCreatorResponse.Marshal(b, m, deterministic) @@ -1067,15 +953,12 @@ func (m *QueryContractsByCreatorResponse) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *QueryContractsByCreatorResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_QueryContractsByCreatorResponse.Merge(m, src) } - func (m *QueryContractsByCreatorResponse) XXX_Size() int { return m.Size() } - func (m *QueryContractsByCreatorResponse) XXX_DiscardUnknown() { xxx_messageInfo_QueryContractsByCreatorResponse.DiscardUnknown(m) } @@ -1228,7 +1111,6 @@ func (this *QueryContractInfoResponse) Equal(that interface{}) bool { } return true } - func (this *CodeInfoResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1262,7 +1144,6 @@ func (this *CodeInfoResponse) Equal(that interface{}) bool { } return true } - func (this *QueryCodeResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1292,10 +1173,8 @@ func (this *QueryCodeResponse) Equal(that interface{}) bool { } // Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) +var _ context.Context +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -1463,48 +1342,39 @@ type QueryServer interface { } // UnimplementedQueryServer can be embedded to have forward compatible implementations. -type UnimplementedQueryServer struct{} +type UnimplementedQueryServer struct { +} func (*UnimplementedQueryServer) ContractInfo(ctx context.Context, req *QueryContractInfoRequest) (*QueryContractInfoResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractInfo not implemented") } - func (*UnimplementedQueryServer) ContractHistory(ctx context.Context, req *QueryContractHistoryRequest) (*QueryContractHistoryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractHistory not implemented") } - func (*UnimplementedQueryServer) ContractsByCode(ctx context.Context, req *QueryContractsByCodeRequest) (*QueryContractsByCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractsByCode not implemented") } - func (*UnimplementedQueryServer) AllContractState(ctx context.Context, req *QueryAllContractStateRequest) (*QueryAllContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllContractState not implemented") } - func (*UnimplementedQueryServer) RawContractState(ctx context.Context, req *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RawContractState not implemented") } - func (*UnimplementedQueryServer) SmartContractState(ctx context.Context, req *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SmartContractState not implemented") } - func (*UnimplementedQueryServer) Code(ctx context.Context, req *QueryCodeRequest) (*QueryCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Code not implemented") } - func (*UnimplementedQueryServer) Codes(ctx context.Context, req *QueryCodesRequest) (*QueryCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Codes not implemented") } - func (*UnimplementedQueryServer) PinnedCodes(ctx context.Context, req *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PinnedCodes not implemented") } - func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } - func (*UnimplementedQueryServer) ContractsByCreator(ctx context.Context, req *QueryContractsByCreatorRequest) (*QueryContractsByCreatorResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ContractsByCreator not implemented") } @@ -2681,7 +2551,6 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *QueryContractInfoRequest) Size() (n int) { if m == nil { return 0 @@ -3052,11 +2921,9 @@ func (m *QueryContractsByCreatorResponse) Size() (n int) { func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3139,7 +3006,6 @@ func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3255,7 +3121,6 @@ func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3374,7 +3239,6 @@ func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3495,7 +3359,6 @@ func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3601,7 +3464,6 @@ func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3720,7 +3582,6 @@ func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3839,7 +3700,6 @@ func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3960,7 +3820,6 @@ func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4077,7 +3936,6 @@ func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4162,7 +4020,6 @@ func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4279,7 +4136,6 @@ func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4364,7 +4220,6 @@ func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4434,7 +4289,6 @@ func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4603,7 +4457,6 @@ func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4724,7 +4577,6 @@ func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4811,7 +4663,6 @@ func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4932,7 +4783,6 @@ func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5019,7 +4869,6 @@ func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5182,7 +5031,6 @@ func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5233,7 +5081,6 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5317,7 +5164,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5436,7 +5282,6 @@ func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5555,7 +5400,6 @@ func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { } return nil } - func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/query.pb.gw.go b/x/wasm/types/query.pb.gw.go index 32f3fd25cd..696252ab02 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -25,15 +25,13 @@ import ( ) // Suppress "imported and not used" errors -var ( - _ codes.Code - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = descriptor.ForMessage - _ = metadata.Join -) +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractInfoRequest @@ -59,6 +57,7 @@ func request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshal msg, err := client.ContractInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -85,9 +84,12 @@ func local_request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.M msg, err := server.ContractInfo(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractHistory_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractHistoryRequest @@ -120,6 +122,7 @@ func request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ContractHistory(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -153,9 +156,12 @@ func local_request_Query_ContractHistory_0(ctx context.Context, marshaler runtim msg, err := server.ContractHistory(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractsByCode_0 = &utilities.DoubleArray{Encoding: map[string]int{"code_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractsByCode_0 = &utilities.DoubleArray{Encoding: map[string]int{"code_id": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractsByCodeRequest @@ -188,6 +194,7 @@ func request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Mars msg, err := client.ContractsByCode(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -221,9 +228,12 @@ func local_request_Query_ContractsByCode_0(ctx context.Context, marshaler runtim msg, err := server.ContractsByCode(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_AllContractState_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_AllContractState_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryAllContractStateRequest @@ -256,6 +266,7 @@ func request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Mar msg, err := client.AllContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -289,6 +300,7 @@ func local_request_Query_AllContractState_0(ctx context.Context, marshaler runti msg, err := server.AllContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -326,6 +338,7 @@ func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Mar msg, err := client.RawContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -363,6 +376,7 @@ func local_request_Query_RawContractState_0(ctx context.Context, marshaler runti msg, err := server.RawContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -400,6 +414,7 @@ func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.M msg, err := client.SmartContractState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -437,6 +452,7 @@ func local_request_Query_SmartContractState_0(ctx context.Context, marshaler run msg, err := server.SmartContractState(ctx, &protoReq) return msg, metadata, err + } func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -463,6 +479,7 @@ func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, clie msg, err := client.Code(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -489,9 +506,12 @@ func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler msg, err := server.Code(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_Codes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_Query_Codes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryCodesRequest @@ -506,6 +526,7 @@ func request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, cli msg, err := client.Codes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -521,9 +542,12 @@ func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshale msg, err := server.Codes(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_PinnedCodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +var ( + filter_Query_PinnedCodes_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) func request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryPinnedCodesRequest @@ -538,6 +562,7 @@ func request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshale msg, err := client.PinnedCodes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -553,6 +578,7 @@ func local_request_Query_PinnedCodes_0(ctx context.Context, marshaler runtime.Ma msg, err := server.PinnedCodes(ctx, &protoReq) return msg, metadata, err + } func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -561,6 +587,7 @@ func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, cl msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -569,9 +596,12 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal msg, err := server.Params(ctx, &protoReq) return msg, metadata, err + } -var filter_Query_ContractsByCreator_0 = &utilities.DoubleArray{Encoding: map[string]int{"creator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +var ( + filter_Query_ContractsByCreator_0 = &utilities.DoubleArray{Encoding: map[string]int{"creator_address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryContractsByCreatorRequest @@ -604,6 +634,7 @@ func request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.M msg, err := client.ContractsByCreator(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err + } func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -637,6 +668,7 @@ func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler run msg, err := server.ContractsByCreator(ctx, &protoReq) return msg, metadata, err + } // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". @@ -644,6 +676,7 @@ func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler run // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. // Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + mux.Handle("GET", pattern_Query_ContractInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -664,6 +697,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -686,6 +720,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -708,6 +743,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractsByCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_AllContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -730,6 +766,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_AllContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_RawContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -752,6 +789,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_RawContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_SmartContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -774,6 +812,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_SmartContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -796,6 +835,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Codes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -818,6 +858,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Codes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_PinnedCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -840,6 +881,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_PinnedCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -862,6 +904,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCreator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -884,6 +927,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractsByCreator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil @@ -926,6 +970,7 @@ func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc // doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in // "QueryClient" to call the correct interceptors. func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + mux.Handle("GET", pattern_Query_ContractInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -943,6 +988,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractHistory_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -962,6 +1008,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractHistory_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCode_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -981,6 +1028,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractsByCode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_AllContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1000,6 +1048,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_AllContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_RawContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1019,6 +1068,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_RawContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_SmartContractState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1038,6 +1088,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_SmartContractState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Code_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1057,6 +1108,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Code_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Codes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1076,6 +1128,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Codes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_PinnedCodes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1095,6 +1148,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_PinnedCodes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1114,6 +1168,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) mux.Handle("GET", pattern_Query_ContractsByCreator_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { @@ -1133,6 +1188,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } forward_Query_ContractsByCreator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + }) return nil diff --git a/x/wasm/types/tx.go b/x/wasm/types/tx.go index 8ae08f8f19..ecd68bddf4 100644 --- a/x/wasm/types/tx.go +++ b/x/wasm/types/tx.go @@ -74,14 +74,6 @@ func (msg MsgStoreCode) ValidateBasic() error { return nil } -func (msg MsgStoreCode) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgInstantiateContract) Route() string { return RouterKey } @@ -118,14 +110,6 @@ func (msg MsgInstantiateContract) ValidateBasic() error { return nil } -func (msg MsgInstantiateContract) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgExecuteContract) Route() string { return RouterKey } @@ -151,14 +135,6 @@ func (msg MsgExecuteContract) ValidateBasic() error { return nil } -func (msg MsgExecuteContract) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - // GetMsg returns the payload message send to the contract func (msg MsgExecuteContract) GetMsg() RawContractMessage { return msg.Msg @@ -200,14 +176,6 @@ func (msg MsgMigrateContract) ValidateBasic() error { return nil } -func (msg MsgMigrateContract) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - // GetMsg returns the payload message send to the contract func (msg MsgMigrateContract) GetMsg() RawContractMessage { return msg.Msg @@ -247,14 +215,6 @@ func (msg MsgUpdateAdmin) ValidateBasic() error { return nil } -func (msg MsgUpdateAdmin) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgClearAdmin) Route() string { return RouterKey } @@ -273,14 +233,6 @@ func (msg MsgClearAdmin) ValidateBasic() error { return nil } -func (msg MsgClearAdmin) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgIBCSend) Route() string { return RouterKey } @@ -293,10 +245,6 @@ func (msg MsgIBCSend) ValidateBasic() error { return nil } -func (msg MsgIBCSend) GetSigners() []sdk.AccAddress { - return nil -} - func (msg MsgIBCCloseChannel) Route() string { return RouterKey } @@ -309,10 +257,6 @@ func (msg MsgIBCCloseChannel) ValidateBasic() error { return nil } -func (msg MsgIBCCloseChannel) GetSigners() []sdk.AccAddress { - return nil -} - var _ sdk.Msg = &MsgInstantiateContract2{} func (msg MsgInstantiateContract2) Route() string { @@ -354,14 +298,6 @@ func (msg MsgInstantiateContract2) ValidateBasic() error { return nil } -func (msg MsgInstantiateContract2) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgUpdateInstantiateConfig) Route() string { return RouterKey } @@ -390,14 +326,6 @@ func (msg MsgUpdateInstantiateConfig) ValidateBasic() error { return nil } -func (msg MsgUpdateInstantiateConfig) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} - func (msg MsgUpdateParams) Route() string { return RouterKey } @@ -406,14 +334,6 @@ func (msg MsgUpdateParams) Type() string { return "update-params" } -func (msg MsgUpdateParams) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgUpdateParams) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -429,14 +349,6 @@ func (msg MsgPinCodes) Type() string { return "pin-codes" } -func (msg MsgPinCodes) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgPinCodes) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -468,14 +380,6 @@ func (msg MsgUnpinCodes) Type() string { return "unpin-codes" } -func (msg MsgUnpinCodes) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgUnpinCodes) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -491,14 +395,6 @@ func (msg MsgSudoContract) Type() string { return "sudo-contract" } -func (msg MsgSudoContract) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgSudoContract) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -520,14 +416,6 @@ func (msg MsgStoreAndInstantiateContract) Type() string { return "store-and-instantiate-contract" } -func (msg MsgStoreAndInstantiateContract) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgStoreAndInstantiateContract) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -575,14 +463,6 @@ func (msg MsgAddCodeUploadParamsAddresses) Type() string { return "add-code-upload-params-addresses" } -func (msg MsgAddCodeUploadParamsAddresses) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgAddCodeUploadParamsAddresses) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -603,14 +483,6 @@ func (msg MsgRemoveCodeUploadParamsAddresses) Type() string { return "remove-code-upload-params-addresses" } -func (msg MsgRemoveCodeUploadParamsAddresses) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgRemoveCodeUploadParamsAddresses) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -646,14 +518,6 @@ func (msg MsgStoreAndMigrateContract) Type() string { return "store-and-migrate-contract" } -func (msg MsgStoreAndMigrateContract) GetSigners() []sdk.AccAddress { - authority, err := sdk.AccAddressFromBech32(msg.Authority) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{authority} -} - func (msg MsgStoreAndMigrateContract) ValidateBasic() error { if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { return errorsmod.Wrap(err, "authority") @@ -711,11 +575,3 @@ func (msg MsgUpdateContractLabel) ValidateBasic() error { } return nil } - -func (msg MsgUpdateContractLabel) GetSigners() []sdk.AccAddress { - senderAddr, err := sdk.AccAddressFromBech32(msg.Sender) - if err != nil { // should never happen as valid basic rejects invalid addresses - panic(err.Error()) - } - return []sdk.AccAddress{senderAddr} -} diff --git a/x/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go index a61d1eea8e..75ffabe9dd 100644 --- a/x/wasm/types/tx.pb.go +++ b/x/wasm/types/tx.pb.go @@ -6,10 +6,6 @@ package types import ( context "context" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-proto" github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" @@ -21,14 +17,15 @@ import ( grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -53,11 +50,9 @@ func (*MsgStoreCode) ProtoMessage() {} func (*MsgStoreCode) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{0} } - func (m *MsgStoreCode) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreCode.Marshal(b, m, deterministic) @@ -70,15 +65,12 @@ func (m *MsgStoreCode) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *MsgStoreCode) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreCode.Merge(m, src) } - func (m *MsgStoreCode) XXX_Size() int { return m.Size() } - func (m *MsgStoreCode) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreCode.DiscardUnknown(m) } @@ -99,11 +91,9 @@ func (*MsgStoreCodeResponse) ProtoMessage() {} func (*MsgStoreCodeResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{1} } - func (m *MsgStoreCodeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreCodeResponse.Marshal(b, m, deterministic) @@ -116,15 +106,12 @@ func (m *MsgStoreCodeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } - func (m *MsgStoreCodeResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreCodeResponse.Merge(m, src) } - func (m *MsgStoreCodeResponse) XXX_Size() int { return m.Size() } - func (m *MsgStoreCodeResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreCodeResponse.DiscardUnknown(m) } @@ -154,11 +141,9 @@ func (*MsgInstantiateContract) ProtoMessage() {} func (*MsgInstantiateContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{2} } - func (m *MsgInstantiateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract.Marshal(b, m, deterministic) @@ -171,15 +156,12 @@ func (m *MsgInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *MsgInstantiateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract.Merge(m, src) } - func (m *MsgInstantiateContract) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract.DiscardUnknown(m) } @@ -200,11 +182,9 @@ func (*MsgInstantiateContractResponse) ProtoMessage() {} func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{3} } - func (m *MsgInstantiateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContractResponse.Marshal(b, m, deterministic) @@ -217,15 +197,12 @@ func (m *MsgInstantiateContractResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *MsgInstantiateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContractResponse.Merge(m, src) } - func (m *MsgInstantiateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContractResponse.DiscardUnknown(m) } @@ -260,11 +237,9 @@ func (*MsgInstantiateContract2) ProtoMessage() {} func (*MsgInstantiateContract2) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{4} } - func (m *MsgInstantiateContract2) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract2.Marshal(b, m, deterministic) @@ -277,15 +252,12 @@ func (m *MsgInstantiateContract2) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgInstantiateContract2) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract2.Merge(m, src) } - func (m *MsgInstantiateContract2) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract2) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract2.DiscardUnknown(m) } @@ -306,11 +278,9 @@ func (*MsgInstantiateContract2Response) ProtoMessage() {} func (*MsgInstantiateContract2Response) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{5} } - func (m *MsgInstantiateContract2Response) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgInstantiateContract2Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgInstantiateContract2Response.Marshal(b, m, deterministic) @@ -323,15 +293,12 @@ func (m *MsgInstantiateContract2Response) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *MsgInstantiateContract2Response) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgInstantiateContract2Response.Merge(m, src) } - func (m *MsgInstantiateContract2Response) XXX_Size() int { return m.Size() } - func (m *MsgInstantiateContract2Response) XXX_DiscardUnknown() { xxx_messageInfo_MsgInstantiateContract2Response.DiscardUnknown(m) } @@ -356,11 +323,9 @@ func (*MsgExecuteContract) ProtoMessage() {} func (*MsgExecuteContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{6} } - func (m *MsgExecuteContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecuteContract.Marshal(b, m, deterministic) @@ -373,15 +338,12 @@ func (m *MsgExecuteContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgExecuteContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecuteContract.Merge(m, src) } - func (m *MsgExecuteContract) XXX_Size() int { return m.Size() } - func (m *MsgExecuteContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecuteContract.DiscardUnknown(m) } @@ -400,11 +362,9 @@ func (*MsgExecuteContractResponse) ProtoMessage() {} func (*MsgExecuteContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{7} } - func (m *MsgExecuteContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgExecuteContractResponse.Marshal(b, m, deterministic) @@ -417,15 +377,12 @@ func (m *MsgExecuteContractResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgExecuteContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgExecuteContractResponse.Merge(m, src) } - func (m *MsgExecuteContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgExecuteContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgExecuteContractResponse.DiscardUnknown(m) } @@ -450,11 +407,9 @@ func (*MsgMigrateContract) ProtoMessage() {} func (*MsgMigrateContract) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{8} } - func (m *MsgMigrateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgMigrateContract.Marshal(b, m, deterministic) @@ -467,15 +422,12 @@ func (m *MsgMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgMigrateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgMigrateContract.Merge(m, src) } - func (m *MsgMigrateContract) XXX_Size() int { return m.Size() } - func (m *MsgMigrateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgMigrateContract.DiscardUnknown(m) } @@ -495,11 +447,9 @@ func (*MsgMigrateContractResponse) ProtoMessage() {} func (*MsgMigrateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{9} } - func (m *MsgMigrateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgMigrateContractResponse.Marshal(b, m, deterministic) @@ -512,15 +462,12 @@ func (m *MsgMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgMigrateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgMigrateContractResponse.Merge(m, src) } - func (m *MsgMigrateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgMigrateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgMigrateContractResponse.DiscardUnknown(m) } @@ -543,11 +490,9 @@ func (*MsgUpdateAdmin) ProtoMessage() {} func (*MsgUpdateAdmin) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{10} } - func (m *MsgUpdateAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateAdmin.Marshal(b, m, deterministic) @@ -560,15 +505,12 @@ func (m *MsgUpdateAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } - func (m *MsgUpdateAdmin) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateAdmin.Merge(m, src) } - func (m *MsgUpdateAdmin) XXX_Size() int { return m.Size() } - func (m *MsgUpdateAdmin) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateAdmin.DiscardUnknown(m) } @@ -576,7 +518,8 @@ func (m *MsgUpdateAdmin) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateAdmin proto.InternalMessageInfo // MsgUpdateAdminResponse returns empty data -type MsgUpdateAdminResponse struct{} +type MsgUpdateAdminResponse struct { +} func (m *MsgUpdateAdminResponse) Reset() { *m = MsgUpdateAdminResponse{} } func (m *MsgUpdateAdminResponse) String() string { return proto.CompactTextString(m) } @@ -584,11 +527,9 @@ func (*MsgUpdateAdminResponse) ProtoMessage() {} func (*MsgUpdateAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{11} } - func (m *MsgUpdateAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateAdminResponse.Marshal(b, m, deterministic) @@ -601,15 +542,12 @@ func (m *MsgUpdateAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *MsgUpdateAdminResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateAdminResponse.Merge(m, src) } - func (m *MsgUpdateAdminResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateAdminResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateAdminResponse.DiscardUnknown(m) } @@ -630,11 +568,9 @@ func (*MsgClearAdmin) ProtoMessage() {} func (*MsgClearAdmin) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{12} } - func (m *MsgClearAdmin) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgClearAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgClearAdmin.Marshal(b, m, deterministic) @@ -647,15 +583,12 @@ func (m *MsgClearAdmin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MsgClearAdmin) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgClearAdmin.Merge(m, src) } - func (m *MsgClearAdmin) XXX_Size() int { return m.Size() } - func (m *MsgClearAdmin) XXX_DiscardUnknown() { xxx_messageInfo_MsgClearAdmin.DiscardUnknown(m) } @@ -663,7 +596,8 @@ func (m *MsgClearAdmin) XXX_DiscardUnknown() { var xxx_messageInfo_MsgClearAdmin proto.InternalMessageInfo // MsgClearAdminResponse returns empty data -type MsgClearAdminResponse struct{} +type MsgClearAdminResponse struct { +} func (m *MsgClearAdminResponse) Reset() { *m = MsgClearAdminResponse{} } func (m *MsgClearAdminResponse) String() string { return proto.CompactTextString(m) } @@ -671,11 +605,9 @@ func (*MsgClearAdminResponse) ProtoMessage() {} func (*MsgClearAdminResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{13} } - func (m *MsgClearAdminResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgClearAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgClearAdminResponse.Marshal(b, m, deterministic) @@ -688,68 +620,18 @@ func (m *MsgClearAdminResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } - func (m *MsgClearAdminResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgClearAdminResponse.Merge(m, src) } - func (m *MsgClearAdminResponse) XXX_Size() int { return m.Size() } - func (m *MsgClearAdminResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgClearAdminResponse.DiscardUnknown(m) } var xxx_messageInfo_MsgClearAdminResponse proto.InternalMessageInfo -// AccessConfigUpdate contains the code id and the access config to be -// applied. -type AccessConfigUpdate struct { - // CodeID is the reference to the stored WASM code to be updated - CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` - // InstantiatePermission to apply to the set of code ids - InstantiatePermission AccessConfig `protobuf:"bytes,2,opt,name=instantiate_permission,json=instantiatePermission,proto3" json:"instantiate_permission"` -} - -func (m *AccessConfigUpdate) Reset() { *m = AccessConfigUpdate{} } -func (m *AccessConfigUpdate) String() string { return proto.CompactTextString(m) } -func (*AccessConfigUpdate) ProtoMessage() {} -func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{14} -} - -func (m *AccessConfigUpdate) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AccessConfigUpdate.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} - -func (m *AccessConfigUpdate) XXX_Merge(src proto.Message) { - xxx_messageInfo_AccessConfigUpdate.Merge(m, src) -} - -func (m *AccessConfigUpdate) XXX_Size() int { - return m.Size() -} - -func (m *AccessConfigUpdate) XXX_DiscardUnknown() { - xxx_messageInfo_AccessConfigUpdate.DiscardUnknown(m) -} - -var xxx_messageInfo_AccessConfigUpdate proto.InternalMessageInfo - // MsgUpdateInstantiateConfig updates instantiate config for a smart contract type MsgUpdateInstantiateConfig struct { // Sender is the that actor that signed the messages @@ -764,13 +646,11 @@ func (m *MsgUpdateInstantiateConfig) Reset() { *m = MsgUpdateInstantiate func (m *MsgUpdateInstantiateConfig) String() string { return proto.CompactTextString(m) } func (*MsgUpdateInstantiateConfig) ProtoMessage() {} func (*MsgUpdateInstantiateConfig) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{15} + return fileDescriptor_4f74d82755520264, []int{14} } - func (m *MsgUpdateInstantiateConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateInstantiateConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateInstantiateConfig.Marshal(b, m, deterministic) @@ -783,15 +663,12 @@ func (m *MsgUpdateInstantiateConfig) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgUpdateInstantiateConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateInstantiateConfig.Merge(m, src) } - func (m *MsgUpdateInstantiateConfig) XXX_Size() int { return m.Size() } - func (m *MsgUpdateInstantiateConfig) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateInstantiateConfig.DiscardUnknown(m) } @@ -799,19 +676,18 @@ func (m *MsgUpdateInstantiateConfig) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateInstantiateConfig proto.InternalMessageInfo // MsgUpdateInstantiateConfigResponse returns empty data -type MsgUpdateInstantiateConfigResponse struct{} +type MsgUpdateInstantiateConfigResponse struct { +} func (m *MsgUpdateInstantiateConfigResponse) Reset() { *m = MsgUpdateInstantiateConfigResponse{} } func (m *MsgUpdateInstantiateConfigResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateInstantiateConfigResponse) ProtoMessage() {} func (*MsgUpdateInstantiateConfigResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{16} + return fileDescriptor_4f74d82755520264, []int{15} } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateInstantiateConfigResponse.Marshal(b, m, deterministic) @@ -824,15 +700,12 @@ func (m *MsgUpdateInstantiateConfigResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateInstantiateConfigResponse.Merge(m, src) } - func (m *MsgUpdateInstantiateConfigResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateInstantiateConfigResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateInstantiateConfigResponse.DiscardUnknown(m) } @@ -855,13 +728,11 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{17} + return fileDescriptor_4f74d82755520264, []int{16} } - func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic) @@ -874,15 +745,12 @@ func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } - func (m *MsgUpdateParams) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParams.Merge(m, src) } - func (m *MsgUpdateParams) XXX_Size() int { return m.Size() } - func (m *MsgUpdateParams) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) } @@ -893,19 +761,18 @@ var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo // MsgUpdateParams message. // // Since: 0.40 -type MsgUpdateParamsResponse struct{} +type MsgUpdateParamsResponse struct { +} func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{18} + return fileDescriptor_4f74d82755520264, []int{17} } - func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic) @@ -918,15 +785,12 @@ func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) } - func (m *MsgUpdateParamsResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) } @@ -949,13 +813,11 @@ func (m *MsgSudoContract) Reset() { *m = MsgSudoContract{} } func (m *MsgSudoContract) String() string { return proto.CompactTextString(m) } func (*MsgSudoContract) ProtoMessage() {} func (*MsgSudoContract) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{19} + return fileDescriptor_4f74d82755520264, []int{18} } - func (m *MsgSudoContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgSudoContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSudoContract.Marshal(b, m, deterministic) @@ -968,15 +830,12 @@ func (m *MsgSudoContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } - func (m *MsgSudoContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSudoContract.Merge(m, src) } - func (m *MsgSudoContract) XXX_Size() int { return m.Size() } - func (m *MsgSudoContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgSudoContract.DiscardUnknown(m) } @@ -996,13 +855,11 @@ func (m *MsgSudoContractResponse) Reset() { *m = MsgSudoContractResponse func (m *MsgSudoContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgSudoContractResponse) ProtoMessage() {} func (*MsgSudoContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{20} + return fileDescriptor_4f74d82755520264, []int{19} } - func (m *MsgSudoContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgSudoContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgSudoContractResponse.Marshal(b, m, deterministic) @@ -1015,15 +872,12 @@ func (m *MsgSudoContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } - func (m *MsgSudoContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgSudoContractResponse.Merge(m, src) } - func (m *MsgSudoContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgSudoContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgSudoContractResponse.DiscardUnknown(m) } @@ -1044,13 +898,11 @@ func (m *MsgPinCodes) Reset() { *m = MsgPinCodes{} } func (m *MsgPinCodes) String() string { return proto.CompactTextString(m) } func (*MsgPinCodes) ProtoMessage() {} func (*MsgPinCodes) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{21} + return fileDescriptor_4f74d82755520264, []int{20} } - func (m *MsgPinCodes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgPinCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPinCodes.Marshal(b, m, deterministic) @@ -1063,15 +915,12 @@ func (m *MsgPinCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *MsgPinCodes) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPinCodes.Merge(m, src) } - func (m *MsgPinCodes) XXX_Size() int { return m.Size() } - func (m *MsgPinCodes) XXX_DiscardUnknown() { xxx_messageInfo_MsgPinCodes.DiscardUnknown(m) } @@ -1082,19 +931,18 @@ var xxx_messageInfo_MsgPinCodes proto.InternalMessageInfo // MsgPinCodes message. // // Since: 0.40 -type MsgPinCodesResponse struct{} +type MsgPinCodesResponse struct { +} func (m *MsgPinCodesResponse) Reset() { *m = MsgPinCodesResponse{} } func (m *MsgPinCodesResponse) String() string { return proto.CompactTextString(m) } func (*MsgPinCodesResponse) ProtoMessage() {} func (*MsgPinCodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{22} + return fileDescriptor_4f74d82755520264, []int{21} } - func (m *MsgPinCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgPinCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgPinCodesResponse.Marshal(b, m, deterministic) @@ -1107,15 +955,12 @@ func (m *MsgPinCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *MsgPinCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgPinCodesResponse.Merge(m, src) } - func (m *MsgPinCodesResponse) XXX_Size() int { return m.Size() } - func (m *MsgPinCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgPinCodesResponse.DiscardUnknown(m) } @@ -1136,13 +981,11 @@ func (m *MsgUnpinCodes) Reset() { *m = MsgUnpinCodes{} } func (m *MsgUnpinCodes) String() string { return proto.CompactTextString(m) } func (*MsgUnpinCodes) ProtoMessage() {} func (*MsgUnpinCodes) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{23} + return fileDescriptor_4f74d82755520264, []int{22} } - func (m *MsgUnpinCodes) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUnpinCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUnpinCodes.Marshal(b, m, deterministic) @@ -1155,15 +998,12 @@ func (m *MsgUnpinCodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error return b[:n], nil } } - func (m *MsgUnpinCodes) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUnpinCodes.Merge(m, src) } - func (m *MsgUnpinCodes) XXX_Size() int { return m.Size() } - func (m *MsgUnpinCodes) XXX_DiscardUnknown() { xxx_messageInfo_MsgUnpinCodes.DiscardUnknown(m) } @@ -1174,19 +1014,18 @@ var xxx_messageInfo_MsgUnpinCodes proto.InternalMessageInfo // MsgUnpinCodes message. // // Since: 0.40 -type MsgUnpinCodesResponse struct{} +type MsgUnpinCodesResponse struct { +} func (m *MsgUnpinCodesResponse) Reset() { *m = MsgUnpinCodesResponse{} } func (m *MsgUnpinCodesResponse) String() string { return proto.CompactTextString(m) } func (*MsgUnpinCodesResponse) ProtoMessage() {} func (*MsgUnpinCodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{24} + return fileDescriptor_4f74d82755520264, []int{23} } - func (m *MsgUnpinCodesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUnpinCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUnpinCodesResponse.Marshal(b, m, deterministic) @@ -1199,15 +1038,12 @@ func (m *MsgUnpinCodesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byt return b[:n], nil } } - func (m *MsgUnpinCodesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUnpinCodesResponse.Merge(m, src) } - func (m *MsgUnpinCodesResponse) XXX_Size() int { return m.Size() } - func (m *MsgUnpinCodesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUnpinCodesResponse.DiscardUnknown(m) } @@ -1251,13 +1087,11 @@ func (m *MsgStoreAndInstantiateContract) Reset() { *m = MsgStoreAndInsta func (m *MsgStoreAndInstantiateContract) String() string { return proto.CompactTextString(m) } func (*MsgStoreAndInstantiateContract) ProtoMessage() {} func (*MsgStoreAndInstantiateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{25} + return fileDescriptor_4f74d82755520264, []int{24} } - func (m *MsgStoreAndInstantiateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreAndInstantiateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreAndInstantiateContract.Marshal(b, m, deterministic) @@ -1270,15 +1104,12 @@ func (m *MsgStoreAndInstantiateContract) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *MsgStoreAndInstantiateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreAndInstantiateContract.Merge(m, src) } - func (m *MsgStoreAndInstantiateContract) XXX_Size() int { return m.Size() } - func (m *MsgStoreAndInstantiateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreAndInstantiateContract.DiscardUnknown(m) } @@ -1302,13 +1133,11 @@ func (m *MsgStoreAndInstantiateContractResponse) Reset() { func (m *MsgStoreAndInstantiateContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgStoreAndInstantiateContractResponse) ProtoMessage() {} func (*MsgStoreAndInstantiateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{26} + return fileDescriptor_4f74d82755520264, []int{25} } - func (m *MsgStoreAndInstantiateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreAndInstantiateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreAndInstantiateContractResponse.Marshal(b, m, deterministic) @@ -1321,15 +1150,12 @@ func (m *MsgStoreAndInstantiateContractResponse) XXX_Marshal(b []byte, determini return b[:n], nil } } - func (m *MsgStoreAndInstantiateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreAndInstantiateContractResponse.Merge(m, src) } - func (m *MsgStoreAndInstantiateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgStoreAndInstantiateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreAndInstantiateContractResponse.DiscardUnknown(m) } @@ -1348,13 +1174,11 @@ func (m *MsgAddCodeUploadParamsAddresses) Reset() { *m = MsgAddCodeUploa func (m *MsgAddCodeUploadParamsAddresses) String() string { return proto.CompactTextString(m) } func (*MsgAddCodeUploadParamsAddresses) ProtoMessage() {} func (*MsgAddCodeUploadParamsAddresses) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{27} + return fileDescriptor_4f74d82755520264, []int{26} } - func (m *MsgAddCodeUploadParamsAddresses) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgAddCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddCodeUploadParamsAddresses.Marshal(b, m, deterministic) @@ -1367,15 +1191,12 @@ func (m *MsgAddCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic bo return b[:n], nil } } - func (m *MsgAddCodeUploadParamsAddresses) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddCodeUploadParamsAddresses.Merge(m, src) } - func (m *MsgAddCodeUploadParamsAddresses) XXX_Size() int { return m.Size() } - func (m *MsgAddCodeUploadParamsAddresses) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddCodeUploadParamsAddresses.DiscardUnknown(m) } @@ -1384,7 +1205,8 @@ var xxx_messageInfo_MsgAddCodeUploadParamsAddresses proto.InternalMessageInfo // MsgAddCodeUploadParamsAddressesResponse defines the response // structure for executing a MsgAddCodeUploadParamsAddresses message. -type MsgAddCodeUploadParamsAddressesResponse struct{} +type MsgAddCodeUploadParamsAddressesResponse struct { +} func (m *MsgAddCodeUploadParamsAddressesResponse) Reset() { *m = MsgAddCodeUploadParamsAddressesResponse{} @@ -1392,13 +1214,11 @@ func (m *MsgAddCodeUploadParamsAddressesResponse) Reset() { func (m *MsgAddCodeUploadParamsAddressesResponse) String() string { return proto.CompactTextString(m) } func (*MsgAddCodeUploadParamsAddressesResponse) ProtoMessage() {} func (*MsgAddCodeUploadParamsAddressesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{28} + return fileDescriptor_4f74d82755520264, []int{27} } - func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.Marshal(b, m, deterministic) @@ -1411,15 +1231,12 @@ func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, determin return b[:n], nil } } - func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.Merge(m, src) } - func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_Size() int { return m.Size() } - func (m *MsgAddCodeUploadParamsAddressesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgAddCodeUploadParamsAddressesResponse.DiscardUnknown(m) } @@ -1438,13 +1255,11 @@ func (m *MsgRemoveCodeUploadParamsAddresses) Reset() { *m = MsgRemoveCod func (m *MsgRemoveCodeUploadParamsAddresses) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCodeUploadParamsAddresses) ProtoMessage() {} func (*MsgRemoveCodeUploadParamsAddresses) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{29} + return fileDescriptor_4f74d82755520264, []int{28} } - func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.Marshal(b, m, deterministic) @@ -1457,15 +1272,12 @@ func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Marshal(b []byte, deterministic return b[:n], nil } } - func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.Merge(m, src) } - func (m *MsgRemoveCodeUploadParamsAddresses) XXX_Size() int { return m.Size() } - func (m *MsgRemoveCodeUploadParamsAddresses) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses.DiscardUnknown(m) } @@ -1474,24 +1286,22 @@ var xxx_messageInfo_MsgRemoveCodeUploadParamsAddresses proto.InternalMessageInfo // MsgRemoveCodeUploadParamsAddressesResponse defines the response // structure for executing a MsgRemoveCodeUploadParamsAddresses message. -type MsgRemoveCodeUploadParamsAddressesResponse struct{} +type MsgRemoveCodeUploadParamsAddressesResponse struct { +} func (m *MsgRemoveCodeUploadParamsAddressesResponse) Reset() { *m = MsgRemoveCodeUploadParamsAddressesResponse{} } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) String() string { return proto.CompactTextString(m) } func (*MsgRemoveCodeUploadParamsAddressesResponse) ProtoMessage() {} func (*MsgRemoveCodeUploadParamsAddressesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{30} + return fileDescriptor_4f74d82755520264, []int{29} } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.Marshal(b, m, deterministic) @@ -1504,15 +1314,12 @@ func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Marshal(b []byte, deter return b[:n], nil } } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.Merge(m, src) } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_Size() int { return m.Size() } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgRemoveCodeUploadParamsAddressesResponse.DiscardUnknown(m) } @@ -1540,13 +1347,11 @@ func (m *MsgStoreAndMigrateContract) Reset() { *m = MsgStoreAndMigrateCo func (m *MsgStoreAndMigrateContract) String() string { return proto.CompactTextString(m) } func (*MsgStoreAndMigrateContract) ProtoMessage() {} func (*MsgStoreAndMigrateContract) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{31} + return fileDescriptor_4f74d82755520264, []int{30} } - func (m *MsgStoreAndMigrateContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreAndMigrateContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreAndMigrateContract.Marshal(b, m, deterministic) @@ -1559,15 +1364,12 @@ func (m *MsgStoreAndMigrateContract) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } - func (m *MsgStoreAndMigrateContract) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreAndMigrateContract.Merge(m, src) } - func (m *MsgStoreAndMigrateContract) XXX_Size() int { return m.Size() } - func (m *MsgStoreAndMigrateContract) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreAndMigrateContract.DiscardUnknown(m) } @@ -1591,13 +1393,11 @@ func (m *MsgStoreAndMigrateContractResponse) Reset() { *m = MsgStoreAndM func (m *MsgStoreAndMigrateContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgStoreAndMigrateContractResponse) ProtoMessage() {} func (*MsgStoreAndMigrateContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{32} + return fileDescriptor_4f74d82755520264, []int{31} } - func (m *MsgStoreAndMigrateContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgStoreAndMigrateContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgStoreAndMigrateContractResponse.Marshal(b, m, deterministic) @@ -1610,15 +1410,12 @@ func (m *MsgStoreAndMigrateContractResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } - func (m *MsgStoreAndMigrateContractResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgStoreAndMigrateContractResponse.Merge(m, src) } - func (m *MsgStoreAndMigrateContractResponse) XXX_Size() int { return m.Size() } - func (m *MsgStoreAndMigrateContractResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgStoreAndMigrateContractResponse.DiscardUnknown(m) } @@ -1639,13 +1436,11 @@ func (m *MsgUpdateContractLabel) Reset() { *m = MsgUpdateContractLabel{} func (m *MsgUpdateContractLabel) String() string { return proto.CompactTextString(m) } func (*MsgUpdateContractLabel) ProtoMessage() {} func (*MsgUpdateContractLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{33} + return fileDescriptor_4f74d82755520264, []int{32} } - func (m *MsgUpdateContractLabel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateContractLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateContractLabel.Marshal(b, m, deterministic) @@ -1658,15 +1453,12 @@ func (m *MsgUpdateContractLabel) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } - func (m *MsgUpdateContractLabel) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateContractLabel.Merge(m, src) } - func (m *MsgUpdateContractLabel) XXX_Size() int { return m.Size() } - func (m *MsgUpdateContractLabel) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateContractLabel.DiscardUnknown(m) } @@ -1674,19 +1466,18 @@ func (m *MsgUpdateContractLabel) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateContractLabel proto.InternalMessageInfo // MsgUpdateContractLabelResponse returns empty data -type MsgUpdateContractLabelResponse struct{} +type MsgUpdateContractLabelResponse struct { +} func (m *MsgUpdateContractLabelResponse) Reset() { *m = MsgUpdateContractLabelResponse{} } func (m *MsgUpdateContractLabelResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateContractLabelResponse) ProtoMessage() {} func (*MsgUpdateContractLabelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_4f74d82755520264, []int{34} + return fileDescriptor_4f74d82755520264, []int{33} } - func (m *MsgUpdateContractLabelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *MsgUpdateContractLabelResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_MsgUpdateContractLabelResponse.Marshal(b, m, deterministic) @@ -1699,15 +1490,12 @@ func (m *MsgUpdateContractLabelResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } - func (m *MsgUpdateContractLabelResponse) XXX_Merge(src proto.Message) { xxx_messageInfo_MsgUpdateContractLabelResponse.Merge(m, src) } - func (m *MsgUpdateContractLabelResponse) XXX_Size() int { return m.Size() } - func (m *MsgUpdateContractLabelResponse) XXX_DiscardUnknown() { xxx_messageInfo_MsgUpdateContractLabelResponse.DiscardUnknown(m) } @@ -1729,7 +1517,6 @@ func init() { proto.RegisterType((*MsgUpdateAdminResponse)(nil), "cosmwasm.wasm.v1.MsgUpdateAdminResponse") proto.RegisterType((*MsgClearAdmin)(nil), "cosmwasm.wasm.v1.MsgClearAdmin") proto.RegisterType((*MsgClearAdminResponse)(nil), "cosmwasm.wasm.v1.MsgClearAdminResponse") - proto.RegisterType((*AccessConfigUpdate)(nil), "cosmwasm.wasm.v1.AccessConfigUpdate") proto.RegisterType((*MsgUpdateInstantiateConfig)(nil), "cosmwasm.wasm.v1.MsgUpdateInstantiateConfig") proto.RegisterType((*MsgUpdateInstantiateConfigResponse)(nil), "cosmwasm.wasm.v1.MsgUpdateInstantiateConfigResponse") proto.RegisterType((*MsgUpdateParams)(nil), "cosmwasm.wasm.v1.MsgUpdateParams") @@ -1755,123 +1542,120 @@ func init() { func init() { proto.RegisterFile("cosmwasm/wasm/v1/tx.proto", fileDescriptor_4f74d82755520264) } var fileDescriptor_4f74d82755520264 = []byte{ - // 1739 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcd, 0x6f, 0x1b, 0xd5, - 0x16, 0xcf, 0xc4, 0xdf, 0x27, 0x79, 0x6d, 0x3a, 0x4d, 0x13, 0x67, 0xd2, 0xda, 0xe9, 0xf4, 0x23, - 0x6e, 0x5e, 0x6a, 0x27, 0x7e, 0x6d, 0xdf, 0xab, 0x1f, 0x9b, 0x38, 0x45, 0x22, 0x15, 0x96, 0x22, - 0x47, 0xa1, 0x02, 0x55, 0x0a, 0x13, 0xcf, 0xcd, 0x64, 0xd4, 0x78, 0xc6, 0xf8, 0x8e, 0xf3, 0xb1, - 0x40, 0x42, 0xdd, 0x81, 0x58, 0xb0, 0x61, 0xc5, 0x12, 0x21, 0x01, 0x1b, 0xba, 0x40, 0xe2, 0x3f, - 0x40, 0x15, 0x62, 0x51, 0x55, 0x20, 0xb1, 0xc1, 0x40, 0x2a, 0xd4, 0x7d, 0xd5, 0x15, 0x0b, 0x84, - 0xe6, 0xde, 0x99, 0xf1, 0xf5, 0x78, 0x66, 0xfc, 0x91, 0x54, 0x65, 0xc1, 0x26, 0x99, 0x7b, 0xcf, - 0xc7, 0x3d, 0xbf, 0x73, 0xce, 0x3d, 0xf7, 0x9e, 0x6b, 0x98, 0xaa, 0xe8, 0xb8, 0xba, 0x27, 0xe1, - 0x6a, 0x8e, 0xfc, 0xd9, 0x5d, 0xcc, 0x19, 0xfb, 0xd9, 0x5a, 0x5d, 0x37, 0x74, 0x7e, 0xcc, 0x26, - 0x65, 0xc9, 0x9f, 0xdd, 0x45, 0x21, 0x65, 0xce, 0xe8, 0x38, 0xb7, 0x29, 0x61, 0x94, 0xdb, 0x5d, - 0xdc, 0x44, 0x86, 0xb4, 0x98, 0xab, 0xe8, 0xaa, 0x46, 0x25, 0x84, 0x49, 0x8b, 0x5e, 0xc5, 0x8a, - 0xa9, 0xa9, 0x8a, 0x15, 0x8b, 0x30, 0xae, 0xe8, 0x8a, 0x4e, 0x3e, 0x73, 0xe6, 0x97, 0x35, 0x7b, - 0xb6, 0x73, 0xed, 0x83, 0x1a, 0xc2, 0x16, 0x75, 0x8a, 0x2a, 0xdb, 0xa0, 0x62, 0x74, 0x60, 0x91, - 0x4e, 0x49, 0x55, 0x55, 0xd3, 0x73, 0xe4, 0x2f, 0x9d, 0x12, 0xff, 0xe4, 0x60, 0xb4, 0x84, 0x95, - 0x35, 0x43, 0xaf, 0xa3, 0x65, 0x5d, 0x46, 0xfc, 0x02, 0x44, 0x31, 0xd2, 0x64, 0x54, 0x4f, 0x72, - 0x33, 0x5c, 0x26, 0x51, 0x4c, 0x3e, 0xfe, 0xfa, 0xea, 0xb8, 0xa5, 0x65, 0x49, 0x96, 0xeb, 0x08, - 0xe3, 0x35, 0xa3, 0xae, 0x6a, 0x4a, 0xd9, 0xe2, 0xe3, 0x6f, 0xc0, 0x09, 0xd3, 0x8e, 0x8d, 0xcd, - 0x03, 0x03, 0x6d, 0x54, 0x74, 0x19, 0x25, 0x87, 0x67, 0xb8, 0xcc, 0x68, 0x71, 0xec, 0xb0, 0x99, - 0x1e, 0xbd, 0xb3, 0xb4, 0x56, 0x2a, 0x1e, 0x18, 0x44, 0x77, 0x79, 0xd4, 0xe4, 0xb3, 0x47, 0xfc, - 0x3a, 0x4c, 0xa8, 0x1a, 0x36, 0x24, 0xcd, 0x50, 0x25, 0x03, 0x6d, 0xd4, 0x50, 0xbd, 0xaa, 0x62, - 0xac, 0xea, 0x5a, 0x32, 0x32, 0xc3, 0x65, 0x46, 0xf2, 0xa9, 0xac, 0xdb, 0x91, 0xd9, 0xa5, 0x4a, - 0x05, 0x61, 0xbc, 0xac, 0x6b, 0x5b, 0xaa, 0x52, 0x3e, 0xc3, 0x48, 0xaf, 0x3a, 0xc2, 0x85, 0xf3, - 0xf7, 0x9f, 0x3e, 0x98, 0xb3, 0x6c, 0xfb, 0xe0, 0xe9, 0x83, 0xb9, 0x53, 0xc4, 0x49, 0x2c, 0xc6, - 0xdb, 0xe1, 0x78, 0x68, 0x2c, 0x7c, 0x3b, 0x1c, 0x0f, 0x8f, 0x45, 0xc4, 0x3b, 0x30, 0xce, 0xd2, - 0xca, 0x08, 0xd7, 0x74, 0x0d, 0x23, 0xfe, 0x02, 0xc4, 0x4c, 0x2c, 0x1b, 0xaa, 0x4c, 0x1c, 0x11, - 0x2e, 0xc2, 0x61, 0x33, 0x1d, 0x35, 0x59, 0x56, 0x6e, 0x95, 0xa3, 0x26, 0x69, 0x45, 0xe6, 0x05, - 0x88, 0x57, 0xb6, 0x51, 0xe5, 0x1e, 0x6e, 0x54, 0x29, 0xe8, 0xb2, 0x33, 0x16, 0x9f, 0x0f, 0xc3, - 0x44, 0x09, 0x2b, 0x2b, 0x2d, 0x23, 0x97, 0x75, 0xcd, 0xa8, 0x4b, 0x15, 0x63, 0x00, 0x1f, 0x67, - 0x21, 0x22, 0xc9, 0x55, 0x55, 0x23, 0xab, 0x04, 0x09, 0x50, 0x36, 0xd6, 0xfa, 0x90, 0xaf, 0xf5, - 0xe3, 0x10, 0xd9, 0x91, 0x36, 0xd1, 0x4e, 0x32, 0x6c, 0x2a, 0x2d, 0xd3, 0x01, 0x9f, 0x81, 0x50, - 0x15, 0x2b, 0x24, 0x06, 0xa3, 0xc5, 0x89, 0x3f, 0x9a, 0x69, 0xbe, 0x2c, 0xed, 0xd9, 0xa6, 0x97, - 0x10, 0xc6, 0x92, 0x82, 0xca, 0x26, 0x0b, 0xbf, 0x05, 0x91, 0xad, 0x86, 0x26, 0xe3, 0x64, 0x74, - 0x26, 0x94, 0x19, 0xc9, 0x4f, 0x65, 0x2d, 0x8b, 0xcc, 0x34, 0xcf, 0x5a, 0x69, 0x9e, 0x5d, 0xd6, - 0x55, 0xad, 0x78, 0xfd, 0x61, 0x33, 0x3d, 0xf4, 0xe5, 0x2f, 0xe9, 0x8c, 0xa2, 0x1a, 0xdb, 0x8d, - 0xcd, 0x6c, 0x45, 0xaf, 0x5a, 0x99, 0x69, 0xfd, 0xbb, 0x8a, 0xe5, 0x7b, 0x56, 0x16, 0x9b, 0x02, - 0xf8, 0xf3, 0xa7, 0x0f, 0xe6, 0xb8, 0x32, 0x55, 0x5f, 0xf8, 0xb7, 0x2b, 0xa2, 0xd3, 0x76, 0x44, - 0x3d, 0x7c, 0x2b, 0x6e, 0x43, 0xca, 0x9b, 0xe2, 0x44, 0x36, 0x0f, 0x31, 0x89, 0xfa, 0xac, 0xab, - 0xfb, 0x6d, 0x46, 0x9e, 0x87, 0xb0, 0x2c, 0x19, 0x92, 0x15, 0x64, 0xf2, 0x2d, 0x7e, 0x1a, 0x82, - 0x49, 0xef, 0xa5, 0xf2, 0xff, 0x44, 0xb8, 0xaf, 0x08, 0x9b, 0xee, 0xc5, 0xd2, 0x8e, 0x91, 0x8c, - 0x51, 0xf7, 0x9a, 0xdf, 0xfc, 0x24, 0xc4, 0xb6, 0xd4, 0xfd, 0x0d, 0xd3, 0xd2, 0xf8, 0x0c, 0x97, - 0x89, 0x97, 0xa3, 0x5b, 0xea, 0x7e, 0x09, 0x2b, 0x85, 0x79, 0x57, 0x3a, 0x9c, 0x0d, 0x48, 0x87, - 0xbc, 0xa8, 0x42, 0xda, 0x87, 0x74, 0xec, 0x09, 0xf1, 0xcd, 0x30, 0xf0, 0x25, 0xac, 0xbc, 0xba, - 0x8f, 0x2a, 0x8d, 0x23, 0xed, 0xf6, 0x6b, 0x10, 0xaf, 0x58, 0xd2, 0x5d, 0xd3, 0xc1, 0xe1, 0xb4, - 0xc3, 0x1a, 0xea, 0x23, 0xac, 0x91, 0x17, 0xbb, 0x71, 0x67, 0x5d, 0x91, 0x9a, 0xb4, 0x23, 0xe5, - 0x72, 0x91, 0xb8, 0x00, 0x42, 0xe7, 0xac, 0x13, 0x1f, 0xdb, 0xd7, 0x1c, 0xe3, 0xeb, 0xe7, 0x1c, - 0xf1, 0x75, 0x49, 0x55, 0xea, 0xd2, 0x4b, 0xf0, 0x75, 0x4f, 0xbb, 0xcf, 0x0a, 0x48, 0xb8, 0x6b, - 0x40, 0xfc, 0x1d, 0xe5, 0xc2, 0x67, 0x39, 0xca, 0x35, 0x1b, 0xe8, 0xa8, 0x1f, 0x38, 0x38, 0x51, - 0xc2, 0xca, 0x7a, 0x4d, 0x96, 0x0c, 0xb4, 0x44, 0x4a, 0x47, 0xff, 0x4e, 0xba, 0x0e, 0x09, 0x0d, - 0xed, 0x6d, 0xf4, 0x56, 0xa0, 0xe2, 0x1a, 0xda, 0xa3, 0x0b, 0xb1, 0xbe, 0x0d, 0xf5, 0xea, 0xdb, - 0xc2, 0x05, 0x97, 0x33, 0x4e, 0xdb, 0xce, 0x60, 0x30, 0x88, 0x49, 0x72, 0xb8, 0x32, 0x33, 0xb6, - 0x13, 0xc4, 0x4f, 0x38, 0xf8, 0x57, 0x09, 0x2b, 0xcb, 0x3b, 0x48, 0xaa, 0x0f, 0x8a, 0x77, 0x30, - 0xc3, 0x45, 0x97, 0xe1, 0xbc, 0x6d, 0x78, 0xcb, 0x16, 0x71, 0x12, 0xce, 0xb4, 0x4d, 0xb0, 0x66, - 0xf3, 0xec, 0xf5, 0x86, 0x42, 0xeb, 0xed, 0x1a, 0xf2, 0xb6, 0xef, 0x4d, 0x6a, 0xb8, 0x97, 0x9b, - 0x54, 0x31, 0x61, 0xee, 0x72, 0xba, 0x73, 0xbd, 0x2f, 0x55, 0xe2, 0xfd, 0x61, 0x92, 0x78, 0xd4, - 0xa8, 0xf6, 0x62, 0xba, 0xa5, 0x2a, 0x03, 0x78, 0x98, 0xc1, 0x35, 0xec, 0x8b, 0xeb, 0x2e, 0x08, - 0x66, 0xda, 0xf9, 0x60, 0x0b, 0xf5, 0x74, 0x4b, 0x4c, 0x6a, 0x68, 0x6f, 0xc5, 0xf3, 0xa2, 0x98, - 0x73, 0x85, 0x2b, 0xdd, 0x9e, 0x67, 0x1d, 0x28, 0xc5, 0x8b, 0x20, 0xfa, 0x53, 0x9d, 0x40, 0x7e, - 0xc5, 0xc1, 0x49, 0x87, 0x6d, 0x55, 0xaa, 0x4b, 0x55, 0xcc, 0xdf, 0x80, 0x84, 0xd4, 0x30, 0xb6, - 0xf5, 0xba, 0x6a, 0x1c, 0x74, 0x75, 0x51, 0x8b, 0x95, 0xff, 0x3f, 0x44, 0x6b, 0x44, 0x83, 0x15, - 0xc8, 0x64, 0x27, 0x58, 0xba, 0x02, 0x1b, 0x42, 0x4b, 0x84, 0x16, 0x95, 0x96, 0x32, 0x13, 0xe2, - 0x78, 0x3b, 0x44, 0x2a, 0x2b, 0x4e, 0x91, 0x7b, 0x0c, 0x3b, 0xe5, 0x80, 0x79, 0x4c, 0xc1, 0xac, - 0x35, 0x64, 0xdd, 0xa9, 0xb1, 0x83, 0x82, 0x79, 0xc1, 0xa7, 0x5a, 0x20, 0x5e, 0x16, 0x80, 0x78, - 0x95, 0xe0, 0x65, 0xa7, 0x02, 0x2b, 0xe8, 0x67, 0x1c, 0x8c, 0x94, 0xb0, 0xb2, 0xaa, 0x6a, 0x66, - 0x7a, 0x0e, 0x1e, 0xcc, 0x9b, 0x26, 0x7e, 0x92, 0xf2, 0x66, 0x38, 0x43, 0x99, 0x70, 0x31, 0x75, - 0xd8, 0x4c, 0xc7, 0x68, 0xce, 0xe3, 0x67, 0xcd, 0xf4, 0xc9, 0x03, 0xa9, 0xba, 0x53, 0x10, 0x6d, - 0x26, 0xb1, 0x1c, 0xa3, 0xfb, 0x00, 0xd3, 0x92, 0xd8, 0x0e, 0x6d, 0xcc, 0x86, 0x66, 0xdb, 0x25, - 0x9e, 0x81, 0xd3, 0xcc, 0xd0, 0x09, 0xe1, 0x17, 0xb4, 0x1e, 0xae, 0x6b, 0xb5, 0x97, 0x08, 0xe0, - 0x52, 0x27, 0x00, 0xa7, 0x3a, 0xb6, 0x2c, 0xb3, 0xaa, 0x63, 0x6b, 0xc2, 0x01, 0xf1, 0x7b, 0x98, - 0x5c, 0xeb, 0x49, 0x9b, 0xb6, 0xa4, 0xc9, 0x5e, 0x4d, 0xd5, 0xa0, 0xa8, 0x3a, 0xdb, 0xd7, 0xd0, - 0x11, 0xdb, 0xd7, 0xf0, 0x11, 0xda, 0x57, 0xfe, 0x1c, 0x40, 0xc3, 0xc4, 0x4f, 0x4d, 0x89, 0x90, - 0x9b, 0x6f, 0xa2, 0x61, 0x7b, 0xa4, 0xd5, 0x26, 0x44, 0x7b, 0x6b, 0x13, 0x9c, 0x0e, 0x20, 0xe6, - 0xd1, 0x01, 0xc4, 0xfb, 0xb8, 0x2a, 0x26, 0x5e, 0x6c, 0x07, 0x30, 0x01, 0x51, 0xac, 0x37, 0xea, - 0x15, 0x94, 0x04, 0x62, 0xa8, 0x35, 0xe2, 0x93, 0x10, 0xdb, 0x6c, 0xa8, 0x3b, 0xe6, 0xd1, 0x32, - 0x42, 0x08, 0xf6, 0x90, 0x9f, 0x86, 0x04, 0x49, 0xb4, 0x6d, 0x09, 0x6f, 0x27, 0x47, 0xad, 0xe6, - 0x5b, 0x97, 0xd1, 0x6b, 0x12, 0xde, 0x2e, 0xdc, 0xe8, 0xcc, 0xb7, 0x0b, 0x6d, 0xef, 0x00, 0xde, - 0x49, 0x24, 0xd6, 0xe0, 0x72, 0x30, 0xc7, 0xb1, 0x37, 0x0d, 0xdf, 0x72, 0xa4, 0x41, 0x59, 0x92, - 0x65, 0x33, 0xbe, 0xeb, 0xb5, 0x1d, 0x5d, 0x92, 0x69, 0x11, 0xb6, 0x94, 0x1c, 0x61, 0xc3, 0xe6, - 0x21, 0x21, 0xd9, 0x4a, 0xc8, 0x8e, 0x4d, 0x14, 0xc7, 0x9f, 0x35, 0xd3, 0x63, 0x74, 0x9b, 0x3a, - 0x24, 0xb1, 0xdc, 0x62, 0x2b, 0xfc, 0xb7, 0xd3, 0x73, 0x17, 0x6d, 0xcf, 0x05, 0x19, 0x29, 0x5e, - 0x81, 0xd9, 0x2e, 0x2c, 0xce, 0x6e, 0xfe, 0x9e, 0x23, 0x27, 0x69, 0x19, 0x55, 0xf5, 0x5d, 0xf4, - 0xf7, 0x80, 0x5d, 0xe8, 0x84, 0x3d, 0x6b, 0xc3, 0xee, 0x62, 0xa7, 0x38, 0x0f, 0x73, 0xdd, 0xb9, - 0x1c, 0xf0, 0x3f, 0xd3, 0xab, 0x94, 0x9d, 0x63, 0xee, 0x0e, 0xe6, 0xf8, 0xca, 0xd8, 0x51, 0x5f, - 0xe1, 0x42, 0x47, 0x29, 0x63, 0x02, 0x73, 0xd8, 0xd3, 0xc7, 0x87, 0x8e, 0x23, 0xbd, 0xfb, 0xfb, - 0x43, 0x21, 0xdf, 0x19, 0x95, 0xb4, 0x7b, 0x1b, 0xbb, 0x5b, 0xa4, 0x03, 0x92, 0x5b, 0x3e, 0xd4, - 0x63, 0x7b, 0xde, 0x73, 0xf6, 0x72, 0x88, 0xd9, 0xcb, 0xdf, 0x71, 0x4c, 0x57, 0x62, 0x2f, 0xf9, - 0x3a, 0xa9, 0xb8, 0xfd, 0xdf, 0x90, 0xa7, 0x69, 0xcf, 0x45, 0xab, 0xf7, 0x30, 0x75, 0xa1, 0x86, - 0xf6, 0xa8, 0xba, 0xc1, 0x1a, 0x14, 0xdf, 0x87, 0x34, 0x0f, 0x8b, 0xc5, 0x19, 0x72, 0xe2, 0x7a, - 0x50, 0x6c, 0x1f, 0xe6, 0x7f, 0x3c, 0x01, 0xa1, 0x12, 0x56, 0xf8, 0x35, 0x48, 0xb4, 0xde, 0x8f, - 0x3d, 0xf2, 0x85, 0x7d, 0x5f, 0x15, 0x2e, 0x07, 0xd3, 0x9d, 0x00, 0xbd, 0x03, 0xa7, 0xbd, 0x4e, - 0xf9, 0x8c, 0xa7, 0xb8, 0x07, 0xa7, 0xb0, 0xd0, 0x2b, 0xa7, 0xb3, 0xa4, 0x01, 0xe3, 0x9e, 0x8f, - 0x79, 0x57, 0x7a, 0xd5, 0x94, 0x17, 0x16, 0x7b, 0x66, 0x75, 0x56, 0x45, 0x70, 0xd2, 0xfd, 0x62, - 0x74, 0xd1, 0x53, 0x8b, 0x8b, 0x4b, 0x98, 0xef, 0x85, 0x8b, 0x5d, 0xc6, 0x5d, 0x6a, 0xbc, 0x97, - 0x71, 0x71, 0xf9, 0x2c, 0xe3, 0xb7, 0xaf, 0xde, 0x84, 0x11, 0xf6, 0xa9, 0x61, 0xc6, 0x53, 0x98, - 0xe1, 0x10, 0x32, 0xdd, 0x38, 0x1c, 0xd5, 0x6f, 0x00, 0x30, 0x4d, 0x7d, 0xda, 0x53, 0xae, 0xc5, - 0x20, 0xcc, 0x76, 0x61, 0x70, 0xf4, 0xbe, 0x0b, 0x93, 0x7e, 0x7d, 0xed, 0x7c, 0x80, 0x71, 0x1d, - 0xdc, 0xc2, 0xb5, 0x7e, 0xb8, 0x9d, 0xe5, 0xef, 0xc2, 0x68, 0x5b, 0xaf, 0x78, 0x3e, 0x40, 0x0b, - 0x65, 0x11, 0xae, 0x74, 0x65, 0x61, 0xb5, 0xb7, 0x35, 0x6f, 0xde, 0xda, 0x59, 0x16, 0x1f, 0xed, - 0x9e, 0xed, 0xd2, 0x2a, 0xc4, 0x9d, 0xb6, 0xe8, 0x9c, 0xa7, 0x98, 0x4d, 0x16, 0x2e, 0x05, 0x92, - 0xd9, 0x20, 0x33, 0x9d, 0x8a, 0x77, 0x90, 0x5b, 0x0c, 0x3e, 0x41, 0xee, 0x6c, 0x20, 0xf8, 0xf7, - 0x39, 0x98, 0x0e, 0xea, 0x1e, 0x16, 0xfc, 0xcb, 0x92, 0xb7, 0x84, 0xf0, 0xbf, 0x7e, 0x25, 0x1c, - 0x5b, 0x3e, 0xe6, 0x20, 0xdd, 0xed, 0xee, 0xe3, 0x9d, 0x4b, 0x5d, 0xa4, 0x84, 0x57, 0x06, 0x91, - 0x72, 0xec, 0xfa, 0x90, 0x83, 0xb3, 0x81, 0xf7, 0x50, 0xef, 0xea, 0x16, 0x24, 0x22, 0xdc, 0xec, - 0x5b, 0x84, 0xdd, 0x97, 0x7e, 0x97, 0xa4, 0xf9, 0x40, 0xdf, 0xbb, 0x2b, 0xd8, 0xb5, 0x7e, 0xb8, - 0xd9, 0x03, 0xc8, 0xeb, 0x20, 0x0f, 0xaa, 0x57, 0x6d, 0x9c, 0x3e, 0x07, 0x50, 0xc0, 0x81, 0x2a, - 0x44, 0xde, 0x33, 0x5b, 0xa2, 0xe2, 0xad, 0x87, 0xbf, 0xa5, 0x86, 0x1e, 0x1e, 0xa6, 0xb8, 0x47, - 0x87, 0x29, 0xee, 0xd7, 0xc3, 0x14, 0xf7, 0xd1, 0x93, 0xd4, 0xd0, 0xa3, 0x27, 0xa9, 0xa1, 0x9f, - 0x9e, 0xa4, 0x86, 0xde, 0xba, 0xcc, 0xf4, 0x57, 0xcb, 0x3a, 0xae, 0xde, 0xb1, 0x7f, 0x08, 0x96, - 0x73, 0xfb, 0xf4, 0x07, 0x61, 0xd2, 0x63, 0x6d, 0x46, 0xc9, 0x0f, 0xbc, 0xff, 0xf9, 0x2b, 0x00, - 0x00, 0xff, 0xff, 0xe6, 0xaa, 0xa3, 0xd7, 0xaa, 0x1e, 0x00, 0x00, + // 1717 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x59, 0xcb, 0x6f, 0x1b, 0x55, + 0x17, 0xcf, 0xc4, 0xef, 0x93, 0x7c, 0x6d, 0x3a, 0x4d, 0x13, 0x67, 0xd2, 0xda, 0xe9, 0xf4, 0x11, + 0x37, 0x5f, 0x6a, 0x27, 0xfe, 0xda, 0x7e, 0xd4, 0xb0, 0x89, 0x53, 0x24, 0x52, 0x61, 0x29, 0x72, + 0x14, 0x2a, 0x50, 0xa5, 0x68, 0xe2, 0xb9, 0x99, 0x8c, 0x1a, 0xcf, 0x18, 0xdf, 0x71, 0x1e, 0x0b, + 0x24, 0xd4, 0x1d, 0x88, 0x05, 0x1b, 0x56, 0x2c, 0x11, 0x12, 0xb0, 0xa1, 0x0b, 0x24, 0xfe, 0x03, + 0x54, 0x21, 0x16, 0x55, 0x05, 0x12, 0x1b, 0x0c, 0xa4, 0x42, 0xdd, 0x57, 0x5d, 0xb1, 0x40, 0x68, + 0xee, 0x9d, 0x19, 0x5f, 0x8f, 0x67, 0xc6, 0x8f, 0xa4, 0x2a, 0x0b, 0x36, 0xc9, 0xcc, 0x3d, 0x8f, + 0x7b, 0xce, 0xef, 0x9c, 0x7b, 0xee, 0x39, 0x63, 0x98, 0xaa, 0xe8, 0xb8, 0xba, 0x27, 0xe1, 0x6a, + 0x8e, 0xfc, 0xd9, 0x5d, 0xcc, 0x19, 0xfb, 0xd9, 0x5a, 0x5d, 0x37, 0x74, 0x7e, 0xcc, 0x26, 0x65, + 0xc9, 0x9f, 0xdd, 0x45, 0x21, 0x65, 0xae, 0xe8, 0x38, 0xb7, 0x29, 0x61, 0x94, 0xdb, 0x5d, 0xdc, + 0x44, 0x86, 0xb4, 0x98, 0xab, 0xe8, 0xaa, 0x46, 0x25, 0x84, 0x49, 0x8b, 0x5e, 0xc5, 0x8a, 0xa9, + 0xa9, 0x8a, 0x15, 0x8b, 0x30, 0xae, 0xe8, 0x8a, 0x4e, 0x1e, 0x73, 0xe6, 0x93, 0xb5, 0x7a, 0xb6, + 0x73, 0xef, 0x83, 0x1a, 0xc2, 0x16, 0x75, 0x8a, 0x2a, 0xdb, 0xa0, 0x62, 0xf4, 0xc5, 0x22, 0x9d, + 0x92, 0xaa, 0xaa, 0xa6, 0xe7, 0xc8, 0x5f, 0xba, 0x24, 0xfe, 0xc5, 0xc1, 0x68, 0x09, 0x2b, 0x6b, + 0x86, 0x5e, 0x47, 0xcb, 0xba, 0x8c, 0xf8, 0x05, 0x88, 0x62, 0xa4, 0xc9, 0xa8, 0x9e, 0xe4, 0x66, + 0xb8, 0x4c, 0xa2, 0x98, 0x7c, 0xfc, 0xcd, 0xd5, 0x71, 0x4b, 0xcb, 0x92, 0x2c, 0xd7, 0x11, 0xc6, + 0x6b, 0x46, 0x5d, 0xd5, 0x94, 0xb2, 0xc5, 0xc7, 0xdf, 0x80, 0x13, 0xa6, 0x1d, 0x1b, 0x9b, 0x07, + 0x06, 0xda, 0xa8, 0xe8, 0x32, 0x4a, 0x0e, 0xcf, 0x70, 0x99, 0xd1, 0xe2, 0xd8, 0x61, 0x33, 0x3d, + 0x7a, 0x67, 0x69, 0xad, 0x54, 0x3c, 0x30, 0x88, 0xee, 0xf2, 0xa8, 0xc9, 0x67, 0xbf, 0xf1, 0xeb, + 0x30, 0xa1, 0x6a, 0xd8, 0x90, 0x34, 0x43, 0x95, 0x0c, 0xb4, 0x51, 0x43, 0xf5, 0xaa, 0x8a, 0xb1, + 0xaa, 0x6b, 0xc9, 0xc8, 0x0c, 0x97, 0x19, 0xc9, 0xa7, 0xb2, 0x6e, 0x20, 0xb3, 0x4b, 0x95, 0x0a, + 0xc2, 0x78, 0x59, 0xd7, 0xb6, 0x54, 0xa5, 0x7c, 0x86, 0x91, 0x5e, 0x75, 0x84, 0x0b, 0xe7, 0xef, + 0x3f, 0x7d, 0x30, 0x67, 0xd9, 0xf6, 0xe1, 0xd3, 0x07, 0x73, 0xa7, 0x08, 0x48, 0xac, 0x8f, 0xb7, + 0xc3, 0xf1, 0xd0, 0x58, 0xf8, 0x76, 0x38, 0x1e, 0x1e, 0x8b, 0x88, 0x77, 0x60, 0x9c, 0xa5, 0x95, + 0x11, 0xae, 0xe9, 0x1a, 0x46, 0xfc, 0x05, 0x88, 0x99, 0xbe, 0x6c, 0xa8, 0x32, 0x01, 0x22, 0x5c, + 0x84, 0xc3, 0x66, 0x3a, 0x6a, 0xb2, 0xac, 0xdc, 0x2a, 0x47, 0x4d, 0xd2, 0x8a, 0xcc, 0x0b, 0x10, + 0xaf, 0x6c, 0xa3, 0xca, 0x3d, 0xdc, 0xa8, 0x52, 0xa7, 0xcb, 0xce, 0xbb, 0xf8, 0x7c, 0x18, 0x26, + 0x4a, 0x58, 0x59, 0x69, 0x19, 0xb9, 0xac, 0x6b, 0x46, 0x5d, 0xaa, 0x18, 0x03, 0x60, 0x9c, 0x85, + 0x88, 0x24, 0x57, 0x55, 0x8d, 0xec, 0x12, 0x24, 0x40, 0xd9, 0x58, 0xeb, 0x43, 0xbe, 0xd6, 0x8f, + 0x43, 0x64, 0x47, 0xda, 0x44, 0x3b, 0xc9, 0xb0, 0xa9, 0xb4, 0x4c, 0x5f, 0xf8, 0x0c, 0x84, 0xaa, + 0x58, 0x21, 0x31, 0x18, 0x2d, 0x4e, 0xfc, 0xd9, 0x4c, 0xf3, 0x65, 0x69, 0xcf, 0x36, 0xbd, 0x84, + 0x30, 0x96, 0x14, 0x54, 0x36, 0x59, 0xf8, 0x2d, 0x88, 0x6c, 0x35, 0x34, 0x19, 0x27, 0xa3, 0x33, + 0xa1, 0xcc, 0x48, 0x7e, 0x2a, 0x6b, 0x59, 0x64, 0xa6, 0x79, 0xd6, 0x4a, 0xf3, 0xec, 0xb2, 0xae, + 0x6a, 0xc5, 0xeb, 0x0f, 0x9b, 0xe9, 0xa1, 0xaf, 0x7e, 0x4d, 0x67, 0x14, 0xd5, 0xd8, 0x6e, 0x6c, + 0x66, 0x2b, 0x7a, 0xd5, 0xca, 0x4c, 0xeb, 0xdf, 0x55, 0x2c, 0xdf, 0xb3, 0xb2, 0xd8, 0x14, 0xc0, + 0x5f, 0x3c, 0x7d, 0x30, 0xc7, 0x95, 0xa9, 0xfa, 0xc2, 0x7f, 0x5d, 0x11, 0x9d, 0xb6, 0x23, 0xea, + 0x81, 0xad, 0xb8, 0x0d, 0x29, 0x6f, 0x8a, 0x13, 0xd9, 0x3c, 0xc4, 0x24, 0x8a, 0x59, 0x57, 0xf8, + 0x6d, 0x46, 0x9e, 0x87, 0xb0, 0x2c, 0x19, 0x92, 0x15, 0x64, 0xf2, 0x2c, 0x7e, 0x16, 0x82, 0x49, + 0xef, 0xad, 0xf2, 0xff, 0x46, 0xb8, 0xaf, 0x08, 0x9b, 0xf0, 0x62, 0x69, 0xc7, 0x48, 0xc6, 0x28, + 0xbc, 0xe6, 0x33, 0x3f, 0x09, 0xb1, 0x2d, 0x75, 0x7f, 0xc3, 0xb4, 0x34, 0x3e, 0xc3, 0x65, 0xe2, + 0xe5, 0xe8, 0x96, 0xba, 0x5f, 0xc2, 0x4a, 0x61, 0xde, 0x95, 0x0e, 0x67, 0x03, 0xd2, 0x21, 0x2f, + 0xaa, 0x90, 0xf6, 0x21, 0x1d, 0x7b, 0x42, 0x7c, 0x3b, 0x0c, 0x7c, 0x09, 0x2b, 0xaf, 0xef, 0xa3, + 0x4a, 0xe3, 0x48, 0xa7, 0xfd, 0x1a, 0xc4, 0x2b, 0x96, 0x74, 0xd7, 0x74, 0x70, 0x38, 0xed, 0xb0, + 0x86, 0xfa, 0x08, 0x6b, 0xe4, 0xc5, 0x1e, 0xdc, 0x59, 0x57, 0xa4, 0x26, 0xed, 0x48, 0xb9, 0x20, + 0x12, 0x17, 0x40, 0xe8, 0x5c, 0x75, 0xe2, 0x63, 0x63, 0xcd, 0x31, 0x58, 0x3f, 0xe7, 0x08, 0xd6, + 0x25, 0x55, 0xa9, 0x4b, 0x2f, 0x01, 0xeb, 0x9e, 0x4e, 0x9f, 0x15, 0x90, 0x70, 0xd7, 0x80, 0xf8, + 0x03, 0xe5, 0xf2, 0xcf, 0x02, 0xca, 0xb5, 0x1a, 0x08, 0xd4, 0x8f, 0x1c, 0x9c, 0x28, 0x61, 0x65, + 0xbd, 0x26, 0x4b, 0x06, 0x5a, 0x22, 0xa5, 0xa3, 0x7f, 0x90, 0xae, 0x43, 0x42, 0x43, 0x7b, 0x1b, + 0xbd, 0x15, 0xa8, 0xb8, 0x86, 0xf6, 0xe8, 0x46, 0x2c, 0xb6, 0xa1, 0x5e, 0xb1, 0x2d, 0x5c, 0x70, + 0x81, 0x71, 0xda, 0x06, 0x83, 0xf1, 0x41, 0x4c, 0x92, 0xcb, 0x95, 0x59, 0xb1, 0x41, 0x10, 0x3f, + 0xe5, 0xe0, 0x3f, 0x25, 0xac, 0x2c, 0xef, 0x20, 0xa9, 0x3e, 0xa8, 0xbf, 0x83, 0x19, 0x2e, 0xba, + 0x0c, 0xe7, 0x6d, 0xc3, 0x5b, 0xb6, 0x88, 0x93, 0x70, 0xa6, 0x6d, 0xc1, 0x31, 0xfb, 0xfe, 0x30, + 0x09, 0x2d, 0xf5, 0xa8, 0xbd, 0x5c, 0x6d, 0xa9, 0xca, 0x00, 0x3e, 0x30, 0x29, 0x3a, 0xec, 0x9b, + 0xa2, 0x77, 0x41, 0x30, 0x03, 0xeb, 0xd3, 0x87, 0x85, 0x7a, 0xea, 0xc3, 0x92, 0x1a, 0xda, 0x5b, + 0xf1, 0x6c, 0xc5, 0x72, 0x2e, 0x40, 0xd2, 0xed, 0x91, 0xec, 0xf0, 0x52, 0xbc, 0x08, 0xa2, 0x3f, + 0xd5, 0x81, 0xea, 0x6b, 0x0e, 0x4e, 0x3a, 0x6c, 0xab, 0x52, 0x5d, 0xaa, 0x62, 0xfe, 0x06, 0x24, + 0xa4, 0x86, 0xb1, 0xad, 0xd7, 0x55, 0xe3, 0xa0, 0x2b, 0x44, 0x2d, 0x56, 0xfe, 0x55, 0x88, 0xd6, + 0x88, 0x06, 0x02, 0xd2, 0x48, 0x3e, 0xd9, 0xe9, 0x2c, 0xdd, 0xa1, 0x98, 0x30, 0x4b, 0x21, 0x2d, + 0x6f, 0x96, 0x08, 0x3d, 0xb6, 0x2d, 0x65, 0xa6, 0x8b, 0xe3, 0xed, 0x2e, 0x52, 0x59, 0x71, 0x8a, + 0x74, 0x0a, 0xec, 0x92, 0xe3, 0xcc, 0x63, 0xea, 0xcc, 0x5a, 0x43, 0xd6, 0x9d, 0x2a, 0x36, 0xa8, + 0x33, 0x2f, 0xf8, 0xde, 0x08, 0xf4, 0x97, 0x75, 0x40, 0xbc, 0x4a, 0xfc, 0x65, 0x97, 0x02, 0x6b, + 0xd4, 0xe7, 0x1c, 0x8c, 0x94, 0xb0, 0xb2, 0xaa, 0x6a, 0x66, 0x7a, 0x0e, 0x1e, 0xcc, 0x9b, 0xa6, + 0xff, 0x24, 0xe5, 0xcd, 0x70, 0x86, 0x32, 0xe1, 0x62, 0xea, 0xb0, 0x99, 0x8e, 0xd1, 0x9c, 0xc7, + 0xcf, 0x9a, 0xe9, 0x93, 0x07, 0x52, 0x75, 0xa7, 0x20, 0xda, 0x4c, 0x62, 0x39, 0x46, 0xcf, 0x01, + 0xa6, 0x45, 0xa7, 0xdd, 0xb5, 0x31, 0xdb, 0x35, 0xdb, 0x2e, 0xf1, 0x0c, 0x9c, 0x66, 0x5e, 0x9d, + 0x10, 0x7e, 0x49, 0x2b, 0xce, 0xba, 0x56, 0x7b, 0x89, 0x0e, 0x5c, 0xea, 0x74, 0xc0, 0xa9, 0x3f, + 0x2d, 0xcb, 0xac, 0xfa, 0xd3, 0x5a, 0x70, 0x9c, 0xf8, 0x23, 0x4c, 0x1a, 0x67, 0x32, 0x08, 0x2d, + 0x69, 0xb2, 0xd7, 0xd8, 0x32, 0xa8, 0x57, 0x9d, 0x03, 0x62, 0xe8, 0x88, 0x03, 0x62, 0xf8, 0x08, + 0x03, 0x22, 0x7f, 0x0e, 0xa0, 0x61, 0xfa, 0x4f, 0x4d, 0x89, 0x90, 0xde, 0x32, 0xd1, 0xb0, 0x11, + 0x69, 0x35, 0xe2, 0xd1, 0xde, 0x1a, 0x71, 0xa7, 0xc7, 0x8e, 0x79, 0xf4, 0xd8, 0xf1, 0x3e, 0x9a, + 0xb1, 0xc4, 0x8b, 0xed, 0xb1, 0x27, 0x20, 0x8a, 0xf5, 0x46, 0xbd, 0x82, 0x92, 0x40, 0x0c, 0xb5, + 0xde, 0xf8, 0x24, 0xc4, 0x36, 0x1b, 0xea, 0x8e, 0x79, 0xb5, 0x8c, 0x10, 0x82, 0xfd, 0xca, 0x4f, + 0x43, 0x82, 0x24, 0xda, 0xb6, 0x84, 0xb7, 0x93, 0xa3, 0xd6, 0x78, 0xab, 0xcb, 0xe8, 0x0d, 0x09, + 0x6f, 0x17, 0x6e, 0x74, 0xe6, 0xdb, 0x85, 0xb6, 0x49, 0xdb, 0x3b, 0x89, 0xc4, 0x1a, 0x5c, 0x0e, + 0xe6, 0x38, 0xf6, 0xb6, 0xfc, 0x3b, 0x8e, 0x8c, 0x00, 0x4b, 0xb2, 0x6c, 0xc6, 0x77, 0xbd, 0xb6, + 0xa3, 0x4b, 0x32, 0x2d, 0xc2, 0x96, 0x92, 0x23, 0x1c, 0xd8, 0x3c, 0x24, 0x24, 0x5b, 0x09, 0x39, + 0xb1, 0x89, 0xe2, 0xf8, 0xb3, 0x66, 0x7a, 0x8c, 0x1e, 0x53, 0x87, 0x24, 0x96, 0x5b, 0x6c, 0x85, + 0xff, 0x77, 0x22, 0x77, 0xd1, 0x46, 0x2e, 0xc8, 0x48, 0xf1, 0x0a, 0xcc, 0x76, 0x61, 0x71, 0x4e, + 0xf3, 0x0f, 0x1c, 0xb9, 0x49, 0xcb, 0xa8, 0xaa, 0xef, 0xa2, 0x7f, 0x86, 0xdb, 0x85, 0x4e, 0xb7, + 0x67, 0x6d, 0xb7, 0xbb, 0xd8, 0x29, 0xce, 0xc3, 0x5c, 0x77, 0x2e, 0xc7, 0xf9, 0x5f, 0x68, 0x2b, + 0x65, 0xe7, 0x98, 0x7b, 0x46, 0x38, 0xbe, 0x32, 0x76, 0xd4, 0xef, 0x5c, 0xa1, 0xa3, 0x94, 0x31, + 0x81, 0xb9, 0xec, 0xe9, 0x78, 0xdf, 0x71, 0xa5, 0x77, 0x9f, 0xf0, 0x0b, 0xf9, 0xce, 0xa8, 0xa4, + 0xdd, 0xc7, 0xd8, 0x3d, 0x84, 0x1c, 0x90, 0xdc, 0xf2, 0xa1, 0x1e, 0xdb, 0x07, 0x34, 0xe7, 0x2c, + 0x87, 0x98, 0xb3, 0xfc, 0x3d, 0xc7, 0xf4, 0xfd, 0xf6, 0x96, 0x6f, 0x92, 0x8a, 0xdb, 0x7f, 0x87, + 0x3c, 0x4d, 0xa7, 0x1a, 0x5a, 0xbd, 0x87, 0x29, 0x84, 0x1a, 0xda, 0xa3, 0xea, 0x06, 0x1b, 0x01, + 0x7c, 0x3f, 0x55, 0x79, 0x58, 0x2c, 0xce, 0x90, 0x1b, 0xd7, 0x83, 0x62, 0x63, 0x98, 0xff, 0xe9, + 0x04, 0x84, 0x4a, 0x58, 0xe1, 0xd7, 0x20, 0xd1, 0xfa, 0x42, 0xeb, 0x91, 0x2f, 0xec, 0x17, 0x4c, + 0xe1, 0x72, 0x30, 0xdd, 0x09, 0xd0, 0xbb, 0x70, 0xda, 0xeb, 0x96, 0xcf, 0x78, 0x8a, 0x7b, 0x70, + 0x0a, 0x0b, 0xbd, 0x72, 0x3a, 0x5b, 0x1a, 0x30, 0xee, 0xf9, 0xb9, 0xec, 0x4a, 0xaf, 0x9a, 0xf2, + 0xc2, 0x62, 0xcf, 0xac, 0xce, 0xae, 0x08, 0x4e, 0xba, 0xbf, 0xc9, 0x5c, 0xf4, 0xd4, 0xe2, 0xe2, + 0x12, 0xe6, 0x7b, 0xe1, 0x62, 0xb7, 0x71, 0x97, 0x1a, 0xef, 0x6d, 0x5c, 0x5c, 0x3e, 0xdb, 0xf8, + 0x9d, 0xab, 0xb7, 0x61, 0x84, 0x1d, 0xe6, 0x67, 0x3c, 0x85, 0x19, 0x0e, 0x21, 0xd3, 0x8d, 0xc3, + 0x51, 0xfd, 0x16, 0x00, 0x33, 0x36, 0xa7, 0x3d, 0xe5, 0x5a, 0x0c, 0xc2, 0x6c, 0x17, 0x06, 0x47, + 0xef, 0x7b, 0x30, 0xe9, 0x37, 0xd7, 0xce, 0x07, 0x18, 0xd7, 0xc1, 0x2d, 0x5c, 0xeb, 0x87, 0xdb, + 0xd9, 0xfe, 0x2e, 0x8c, 0xb6, 0xcd, 0x8a, 0xe7, 0x03, 0xb4, 0x50, 0x16, 0xe1, 0x4a, 0x57, 0x16, + 0x56, 0x7b, 0xdb, 0xf0, 0xe6, 0xad, 0x9d, 0x65, 0xf1, 0xd1, 0xee, 0x39, 0x2e, 0xad, 0x42, 0xdc, + 0x19, 0x8b, 0xce, 0x79, 0x8a, 0xd9, 0x64, 0xe1, 0x52, 0x20, 0x99, 0x0d, 0x32, 0x33, 0xa9, 0x78, + 0x07, 0xb9, 0xc5, 0xe0, 0x13, 0xe4, 0xce, 0x01, 0x82, 0xff, 0x80, 0x83, 0xe9, 0xa0, 0xe9, 0x61, + 0xc1, 0xbf, 0x2c, 0x79, 0x4b, 0x08, 0xaf, 0xf4, 0x2b, 0xe1, 0xd8, 0xf2, 0x09, 0x07, 0xe9, 0x6e, + 0xbd, 0x8f, 0x77, 0x2e, 0x75, 0x91, 0x12, 0x5e, 0x1b, 0x44, 0xca, 0xb1, 0xeb, 0x23, 0x0e, 0xce, + 0x06, 0xf6, 0xa1, 0xde, 0xd5, 0x2d, 0x48, 0x44, 0xb8, 0xd9, 0xb7, 0x08, 0x7b, 0x2e, 0xfd, 0x9a, + 0xa4, 0xf9, 0x40, 0xec, 0xdd, 0x15, 0xec, 0x5a, 0x3f, 0xdc, 0xec, 0x05, 0xe4, 0x75, 0x91, 0x07, + 0xd5, 0xab, 0x36, 0x4e, 0x9f, 0x0b, 0x28, 0xe0, 0x42, 0x15, 0x22, 0xef, 0x9b, 0x23, 0x51, 0xf1, + 0xd6, 0xc3, 0xdf, 0x53, 0x43, 0x0f, 0x0f, 0x53, 0xdc, 0xa3, 0xc3, 0x14, 0xf7, 0xdb, 0x61, 0x8a, + 0xfb, 0xf8, 0x49, 0x6a, 0xe8, 0xd1, 0x93, 0xd4, 0xd0, 0xcf, 0x4f, 0x52, 0x43, 0xef, 0x5c, 0x66, + 0xe6, 0xab, 0x65, 0x1d, 0x57, 0xef, 0xd8, 0x3f, 0xb5, 0xca, 0xb9, 0x7d, 0xfa, 0x93, 0x2b, 0x99, + 0xb1, 0x36, 0xa3, 0xe4, 0x27, 0xd4, 0xff, 0xfd, 0x1d, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x91, 0xf8, + 0x74, 0x0c, 0x1e, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. -var ( - _ context.Context - _ grpc.ClientConn -) +var _ context.Context +var _ grpc.ClientConn // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. @@ -2169,72 +1953,57 @@ type MsgServer interface { } // UnimplementedMsgServer can be embedded to have forward compatible implementations. -type UnimplementedMsgServer struct{} +type UnimplementedMsgServer struct { +} func (*UnimplementedMsgServer) StoreCode(ctx context.Context, req *MsgStoreCode) (*MsgStoreCodeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreCode not implemented") } - func (*UnimplementedMsgServer) InstantiateContract(ctx context.Context, req *MsgInstantiateContract) (*MsgInstantiateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InstantiateContract not implemented") } - func (*UnimplementedMsgServer) InstantiateContract2(ctx context.Context, req *MsgInstantiateContract2) (*MsgInstantiateContract2Response, error) { return nil, status.Errorf(codes.Unimplemented, "method InstantiateContract2 not implemented") } - func (*UnimplementedMsgServer) ExecuteContract(ctx context.Context, req *MsgExecuteContract) (*MsgExecuteContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteContract not implemented") } - func (*UnimplementedMsgServer) MigrateContract(ctx context.Context, req *MsgMigrateContract) (*MsgMigrateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method MigrateContract not implemented") } - func (*UnimplementedMsgServer) UpdateAdmin(ctx context.Context, req *MsgUpdateAdmin) (*MsgUpdateAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAdmin not implemented") } - func (*UnimplementedMsgServer) ClearAdmin(ctx context.Context, req *MsgClearAdmin) (*MsgClearAdminResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ClearAdmin not implemented") } - func (*UnimplementedMsgServer) UpdateInstantiateConfig(ctx context.Context, req *MsgUpdateInstantiateConfig) (*MsgUpdateInstantiateConfigResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateInstantiateConfig not implemented") } - func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } - func (*UnimplementedMsgServer) SudoContract(ctx context.Context, req *MsgSudoContract) (*MsgSudoContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SudoContract not implemented") } - func (*UnimplementedMsgServer) PinCodes(ctx context.Context, req *MsgPinCodes) (*MsgPinCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PinCodes not implemented") } - func (*UnimplementedMsgServer) UnpinCodes(ctx context.Context, req *MsgUnpinCodes) (*MsgUnpinCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UnpinCodes not implemented") } - func (*UnimplementedMsgServer) StoreAndInstantiateContract(ctx context.Context, req *MsgStoreAndInstantiateContract) (*MsgStoreAndInstantiateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreAndInstantiateContract not implemented") } - func (*UnimplementedMsgServer) RemoveCodeUploadParamsAddresses(ctx context.Context, req *MsgRemoveCodeUploadParamsAddresses) (*MsgRemoveCodeUploadParamsAddressesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RemoveCodeUploadParamsAddresses not implemented") } - func (*UnimplementedMsgServer) AddCodeUploadParamsAddresses(ctx context.Context, req *MsgAddCodeUploadParamsAddresses) (*MsgAddCodeUploadParamsAddressesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AddCodeUploadParamsAddresses not implemented") } - func (*UnimplementedMsgServer) StoreAndMigrateContract(ctx context.Context, req *MsgStoreAndMigrateContract) (*MsgStoreAndMigrateContractResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method StoreAndMigrateContract not implemented") } - func (*UnimplementedMsgServer) UpdateContractLabel(ctx context.Context, req *MsgUpdateContractLabel) (*MsgUpdateContractLabelResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateContractLabel not implemented") } @@ -3235,44 +3004,6 @@ func (m *MsgClearAdminResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *AccessConfigUpdate) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AccessConfigUpdate) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AccessConfigUpdate) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - { - size, err := m.InstantiatePermission.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTx(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - if m.CodeID != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.CodeID)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *MsgUpdateInstantiateConfig) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3501,20 +3232,20 @@ func (m *MsgPinCodes) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.CodeIDs) > 0 { - dAtA6 := make([]byte, len(m.CodeIDs)*10) - var j5 int + dAtA5 := make([]byte, len(m.CodeIDs)*10) + var j4 int for _, num := range m.CodeIDs { for num >= 1<<7 { - dAtA6[j5] = uint8(uint64(num)&0x7f | 0x80) + dAtA5[j4] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j5++ + j4++ } - dAtA6[j5] = uint8(num) - j5++ + dAtA5[j4] = uint8(num) + j4++ } - i -= j5 - copy(dAtA[i:], dAtA6[:j5]) - i = encodeVarintTx(dAtA, i, uint64(j5)) + i -= j4 + copy(dAtA[i:], dAtA5[:j4]) + i = encodeVarintTx(dAtA, i, uint64(j4)) i-- dAtA[i] = 0x12 } @@ -3572,20 +3303,20 @@ func (m *MsgUnpinCodes) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if len(m.CodeIDs) > 0 { - dAtA8 := make([]byte, len(m.CodeIDs)*10) - var j7 int + dAtA7 := make([]byte, len(m.CodeIDs)*10) + var j6 int for _, num := range m.CodeIDs { for num >= 1<<7 { - dAtA8[j7] = uint8(uint64(num)&0x7f | 0x80) + dAtA7[j6] = uint8(uint64(num)&0x7f | 0x80) num >>= 7 - j7++ + j6++ } - dAtA8[j7] = uint8(num) - j7++ + dAtA7[j6] = uint8(num) + j6++ } - i -= j7 - copy(dAtA[i:], dAtA8[:j7]) - i = encodeVarintTx(dAtA, i, uint64(j7)) + i -= j6 + copy(dAtA[i:], dAtA7[:j6]) + i = encodeVarintTx(dAtA, i, uint64(j6)) i-- dAtA[i] = 0x12 } @@ -4081,7 +3812,6 @@ func encodeVarintTx(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *MsgStoreCode) Size() (n int) { if m == nil { return 0 @@ -4361,20 +4091,6 @@ func (m *MsgClearAdminResponse) Size() (n int) { return n } -func (m *AccessConfigUpdate) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.CodeID != 0 { - n += 1 + sovTx(uint64(m.CodeID)) - } - l = m.InstantiatePermission.Size() - n += 1 + l + sovTx(uint64(l)) - return n -} - func (m *MsgUpdateInstantiateConfig) Size() (n int) { if m == nil { return 0 @@ -4729,11 +4445,9 @@ func (m *MsgUpdateContractLabelResponse) Size() (n int) { func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozTx(x uint64) (n int) { return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4886,7 +4600,6 @@ func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4990,7 +4703,6 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5224,7 +4936,6 @@ func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5341,7 +5052,6 @@ func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5629,7 +5339,6 @@ func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5746,7 +5455,6 @@ func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5929,7 +5637,6 @@ func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6014,7 +5721,6 @@ func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6182,7 +5888,6 @@ func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6267,7 +5972,6 @@ func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6414,7 +6118,6 @@ func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6465,7 +6168,6 @@ func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6580,7 +6282,6 @@ func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6631,110 +6332,6 @@ func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { } return nil } - -func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AccessConfigUpdate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AccessConfigUpdate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field CodeID", wireType) - } - m.CodeID = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.CodeID |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field InstantiatePermission", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := m.InstantiatePermission.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - func (m *MsgUpdateInstantiateConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6872,7 +6469,6 @@ func (m *MsgUpdateInstantiateConfig) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateInstantiateConfigResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -6923,7 +6519,6 @@ func (m *MsgUpdateInstantiateConfigResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7039,7 +6634,6 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7090,7 +6684,6 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgSudoContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7239,7 +6832,6 @@ func (m *MsgSudoContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgSudoContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7324,7 +6916,6 @@ func (m *MsgSudoContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgPinCodes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7483,7 +7074,6 @@ func (m *MsgPinCodes) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgPinCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7534,7 +7124,6 @@ func (m *MsgPinCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUnpinCodes) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7693,7 +7282,6 @@ func (m *MsgUnpinCodes) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUnpinCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -7744,7 +7332,6 @@ func (m *MsgUnpinCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreAndInstantiateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8147,7 +7734,6 @@ func (m *MsgStoreAndInstantiateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreAndInstantiateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8264,7 +7850,6 @@ func (m *MsgStoreAndInstantiateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgAddCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8379,7 +7964,6 @@ func (m *MsgAddCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgAddCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8430,7 +8014,6 @@ func (m *MsgAddCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgRemoveCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8545,7 +8128,6 @@ func (m *MsgRemoveCodeUploadParamsAddresses) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgRemoveCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8596,7 +8178,6 @@ func (m *MsgRemoveCodeUploadParamsAddressesResponse) Unmarshal(dAtA []byte) erro } return nil } - func (m *MsgStoreAndMigrateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8815,7 +8396,6 @@ func (m *MsgStoreAndMigrateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreAndMigrateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -8953,7 +8533,6 @@ func (m *MsgStoreAndMigrateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateContractLabel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -9100,7 +8679,6 @@ func (m *MsgUpdateContractLabel) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateContractLabelResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -9151,7 +8729,6 @@ func (m *MsgUpdateContractLabelResponse) Unmarshal(dAtA []byte) error { } return nil } - func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/types.go b/x/wasm/types/types.go index fdf390cf86..4a0eda6df5 100644 --- a/x/wasm/types/types.go +++ b/x/wasm/types/types.go @@ -281,7 +281,7 @@ func NewEnv(ctx sdk.Context, contractAddr sdk.AccAddress) wasmvmtypes.Env { env := wasmvmtypes.Env{ Block: wasmvmtypes.BlockInfo{ Height: uint64(ctx.BlockHeight()), - Time: uint64(nano), + Time: wasmvmtypes.Uint64(nano), ChainID: ctx.ChainID(), }, Contract: wasmvmtypes.ContractInfo{ diff --git a/x/wasm/types/types.pb.go b/x/wasm/types/types.pb.go index 16ad44eb15..f9cf33fc4e 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -6,24 +6,21 @@ package types import ( bytes "bytes" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cometbft_cometbft_libs_bytes "github.com/cometbft/cometbft/libs/bytes" _ "github.com/cosmos/cosmos-proto" types "github.com/cosmos/cosmos-sdk/codec/types" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf // This is a compile-time assertion to ensure that this generated file // is compatible with the proto package it is being compiled against. @@ -110,11 +107,9 @@ func (*AccessTypeParam) ProtoMessage() {} func (*AccessTypeParam) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{0} } - func (m *AccessTypeParam) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessTypeParam.Marshal(b, m, deterministic) @@ -127,15 +122,12 @@ func (m *AccessTypeParam) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } - func (m *AccessTypeParam) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessTypeParam.Merge(m, src) } - func (m *AccessTypeParam) XXX_Size() int { return m.Size() } - func (m *AccessTypeParam) XXX_DiscardUnknown() { xxx_messageInfo_AccessTypeParam.DiscardUnknown(m) } @@ -154,11 +146,9 @@ func (*AccessConfig) ProtoMessage() {} func (*AccessConfig) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{1} } - func (m *AccessConfig) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AccessConfig.Marshal(b, m, deterministic) @@ -171,15 +161,12 @@ func (m *AccessConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *AccessConfig) XXX_Merge(src proto.Message) { xxx_messageInfo_AccessConfig.Merge(m, src) } - func (m *AccessConfig) XXX_Size() int { return m.Size() } - func (m *AccessConfig) XXX_DiscardUnknown() { xxx_messageInfo_AccessConfig.DiscardUnknown(m) } @@ -197,11 +184,9 @@ func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{2} } - func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Params.Marshal(b, m, deterministic) @@ -214,15 +199,12 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Params) XXX_Merge(src proto.Message) { xxx_messageInfo_Params.Merge(m, src) } - func (m *Params) XXX_Size() int { return m.Size() } - func (m *Params) XXX_DiscardUnknown() { xxx_messageInfo_Params.DiscardUnknown(m) } @@ -245,11 +227,9 @@ func (*CodeInfo) ProtoMessage() {} func (*CodeInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{3} } - func (m *CodeInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *CodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_CodeInfo.Marshal(b, m, deterministic) @@ -262,15 +242,12 @@ func (m *CodeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *CodeInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_CodeInfo.Merge(m, src) } - func (m *CodeInfo) XXX_Size() int { return m.Size() } - func (m *CodeInfo) XXX_DiscardUnknown() { xxx_messageInfo_CodeInfo.DiscardUnknown(m) } @@ -301,11 +278,9 @@ func (*ContractInfo) ProtoMessage() {} func (*ContractInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{4} } - func (m *ContractInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractInfo.Marshal(b, m, deterministic) @@ -318,15 +293,12 @@ func (m *ContractInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *ContractInfo) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractInfo.Merge(m, src) } - func (m *ContractInfo) XXX_Size() int { return m.Size() } - func (m *ContractInfo) XXX_DiscardUnknown() { xxx_messageInfo_ContractInfo.DiscardUnknown(m) } @@ -349,11 +321,9 @@ func (*ContractCodeHistoryEntry) ProtoMessage() {} func (*ContractCodeHistoryEntry) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{5} } - func (m *ContractCodeHistoryEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *ContractCodeHistoryEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_ContractCodeHistoryEntry.Marshal(b, m, deterministic) @@ -366,15 +336,12 @@ func (m *ContractCodeHistoryEntry) XXX_Marshal(b []byte, deterministic bool) ([] return b[:n], nil } } - func (m *ContractCodeHistoryEntry) XXX_Merge(src proto.Message) { xxx_messageInfo_ContractCodeHistoryEntry.Merge(m, src) } - func (m *ContractCodeHistoryEntry) XXX_Size() int { return m.Size() } - func (m *ContractCodeHistoryEntry) XXX_DiscardUnknown() { xxx_messageInfo_ContractCodeHistoryEntry.DiscardUnknown(m) } @@ -397,11 +364,9 @@ func (*AbsoluteTxPosition) ProtoMessage() {} func (*AbsoluteTxPosition) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{6} } - func (m *AbsoluteTxPosition) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *AbsoluteTxPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_AbsoluteTxPosition.Marshal(b, m, deterministic) @@ -414,15 +379,12 @@ func (m *AbsoluteTxPosition) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } - func (m *AbsoluteTxPosition) XXX_Merge(src proto.Message) { xxx_messageInfo_AbsoluteTxPosition.Merge(m, src) } - func (m *AbsoluteTxPosition) XXX_Size() int { return m.Size() } - func (m *AbsoluteTxPosition) XXX_DiscardUnknown() { xxx_messageInfo_AbsoluteTxPosition.DiscardUnknown(m) } @@ -443,11 +405,9 @@ func (*Model) ProtoMessage() {} func (*Model) Descriptor() ([]byte, []int) { return fileDescriptor_e6155d98fa173e02, []int{7} } - func (m *Model) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Model.Marshal(b, m, deterministic) @@ -460,15 +420,12 @@ func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Model) XXX_Merge(src proto.Message) { xxx_messageInfo_Model.Merge(m, src) } - func (m *Model) XXX_Size() int { return m.Size() } - func (m *Model) XXX_DiscardUnknown() { xxx_messageInfo_Model.DiscardUnknown(m) } @@ -592,7 +549,6 @@ func (this *AccessTypeParam) Equal(that interface{}) bool { } return true } - func (this *AccessConfig) Equal(that interface{}) bool { if that == nil { return this == nil @@ -625,7 +581,6 @@ func (this *AccessConfig) Equal(that interface{}) bool { } return true } - func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -653,7 +608,6 @@ func (this *Params) Equal(that interface{}) bool { } return true } - func (this *CodeInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -684,7 +638,6 @@ func (this *CodeInfo) Equal(that interface{}) bool { } return true } - func (this *ContractInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -727,7 +680,6 @@ func (this *ContractInfo) Equal(that interface{}) bool { } return true } - func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { if that == nil { return this == nil @@ -761,7 +713,6 @@ func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { } return true } - func (this *AbsoluteTxPosition) Equal(that interface{}) bool { if that == nil { return this == nil @@ -789,7 +740,6 @@ func (this *AbsoluteTxPosition) Equal(that interface{}) bool { } return true } - func (this *Model) Equal(that interface{}) bool { if that == nil { return this == nil @@ -817,7 +767,6 @@ func (this *Model) Equal(that interface{}) bool { } return true } - func (m *AccessTypeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1181,7 +1130,6 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *AccessTypeParam) Size() (n int) { if m == nil { return 0 @@ -1339,11 +1287,9 @@ func (m *Model) Size() (n int) { func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1413,7 +1359,6 @@ func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { } return nil } - func (m *AccessConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1515,7 +1460,6 @@ func (m *AccessConfig) Unmarshal(dAtA []byte) error { } return nil } - func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1618,7 +1562,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1768,7 +1711,6 @@ func (m *CodeInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2038,7 +1980,6 @@ func (m *ContractInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2197,7 +2138,6 @@ func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { } return nil } - func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2286,7 +2226,6 @@ func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { } return nil } - func (m *Model) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2405,7 +2344,6 @@ func (m *Model) Unmarshal(dAtA []byte) error { } return nil } - func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/wasmer_engine.go b/x/wasm/types/wasmer_engine.go index e27715bf74..a2bd87b983 100644 --- a/x/wasm/types/wasmer_engine.go +++ b/x/wasm/types/wasmer_engine.go @@ -61,7 +61,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) // Execute calls a given contract. Since the only difference between contracts with the same CodeID is the // data in their local storage, and their address in the outside world, we need no ContractID here. @@ -80,7 +80,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) // Query allows a client to execute a contract-specific query. If the result is not empty, it should be // valid json-encoded data to return to the client. @@ -95,7 +95,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) ([]byte, uint64, error) + ) (*wasmvmtypes.QueryResponse, uint64, error) // Migrate will migrate an existing contract to a new code binary. // This takes storage of the data from the original contract and the CodeID of the new contract that should @@ -113,7 +113,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) // Sudo runs an existing contract in read/write mode (like Execute), but is never exposed to external callers // (either transactions or government proposals), but can only be called by other native Go modules directly. @@ -130,7 +130,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) // Reply is called on the original dispatching contract after running a submessage Reply( @@ -143,7 +143,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.Response, uint64, error) + ) (*wasmvmtypes.ContractResult, uint64, error) // GetCode will load the original wasm code for the given code id. // This will only succeed if that code id was previously returned from @@ -169,7 +169,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBC3ChannelOpenResponse, uint64, error) + ) (*wasmvmtypes.IBCChannelOpenResult, uint64, error) // IBCChannelConnect is available on IBC-enabled contracts and is a hook to call into // during the handshake phase @@ -183,7 +183,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) // IBCChannelClose is available on IBC-enabled contracts and is a hook to call into // at the end of the channel lifetime @@ -197,7 +197,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) // IBCPacketReceive is available on IBC-enabled contracts and is called when an incoming // packet is received on a channel belonging to this contract @@ -226,7 +226,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) // IBCPacketTimeout is available on IBC-enabled contracts and is called when an // outgoing packet (previously sent by this contract) will probably never be executed. @@ -241,7 +241,7 @@ type WasmEngine interface { gasMeter wasmvm.GasMeter, gasLimit uint64, deserCost wasmvmtypes.UFraction, - ) (*wasmvmtypes.IBCBasicResponse, uint64, error) + ) (*wasmvmtypes.IBCBasicResult, uint64, error) // Pin pins a code to an in-memory cache, such that is // always loaded quickly when executed.