From 675f08a76ff03f631459920a9fd624c32ba5f7ea Mon Sep 17 00:00:00 2001 From: GNaD Date: Thu, 3 Nov 2022 16:35:16 +0700 Subject: [PATCH 1/7] preserve contract created date on genesis import and add query contract created date --- proto/cosmwasm/wasm/v1/types.proto | 2 -- x/wasm/keeper/genesis.go | 2 -- x/wasm/keeper/genesis_test.go | 29 ++++++++++++++-------- x/wasm/keeper/proposal_integration_test.go | 1 + x/wasm/keeper/querier.go | 2 -- x/wasm/keeper/querier_test.go | 12 +++------ x/wasm/types/genesis.go | 3 --- x/wasm/types/genesis_test.go | 2 +- x/wasm/types/test_fixtures.go | 4 +++ x/wasm/types/types.go | 1 - 10 files changed, 28 insertions(+), 30 deletions(-) diff --git a/proto/cosmwasm/wasm/v1/types.proto b/proto/cosmwasm/wasm/v1/types.proto index 8d140248a8..216b24e3b4 100644 --- a/proto/cosmwasm/wasm/v1/types.proto +++ b/proto/cosmwasm/wasm/v1/types.proto @@ -84,8 +84,6 @@ message ContractInfo { // Label is optional metadata to be stored with a contract instance. string label = 4; // Created Tx position when the contract was instantiated. - // This data should kept internal and not be exposed via query results. Just - // use for sorting AbsoluteTxPosition created = 5; string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ]; diff --git a/x/wasm/keeper/genesis.go b/x/wasm/keeper/genesis.go index 7fa5280b9e..55e2a1be48 100644 --- a/x/wasm/keeper/genesis.go +++ b/x/wasm/keeper/genesis.go @@ -107,8 +107,6 @@ func ExportGenesis(ctx sdk.Context, keeper *Keeper) *types.GenesisState { state = append(state, types.Model{Key: key, Value: value}) return false }) - // redact contract info - contract.Created = nil genState.Contracts = append(genState.Contracts, types.Contract{ ContractAddress: addr.String(), ContractInfo: contract, diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 1d8f29a40f..3506eb3977 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -272,7 +272,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, }, Sequences: []types.Sequence{ @@ -293,10 +293,10 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, { ContractAddress: BuildContractAddressClassic(1, 2).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, }, Sequences: []types.Sequence{ @@ -312,7 +312,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), }, }, Params: types.DefaultParams(), @@ -328,10 +328,10 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), }, { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), }, }, Params: types.DefaultParams(), @@ -347,7 +347,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), ContractState: []types.Model{ { Key: []byte{0x1}, @@ -395,7 +395,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.OnlyGenesisFields), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), }, }, Sequences: []types.Sequence{ @@ -489,7 +489,11 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { "code_id": "1", "creator": "cosmos13x849jzd03vne42ynpj25hn8npjecxqrjghd8x", "admin": "cosmos1h5t8zxmjr30e9dqghtlpl40f2zz5cgey6esxtn", - "label": "ȀĴnZV芢毤" + "label": "ȀĴnZV芢毤", + "created": { + "block_height" : "100", + "tx_index" : "10" + } } } ], @@ -550,7 +554,7 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { Creator: contractCreatorAddr, Admin: adminAddr, Label: "ȀĴnZV芢毤", - Created: &types.AbsoluteTxPosition{BlockHeight: 0, TxIndex: 0}, + Created: &types.AbsoluteTxPosition{BlockHeight: 100, TxIndex: 10}, } assert.Equal(t, expContractInfo, *gotContractInfo) @@ -558,7 +562,10 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { { Operation: types.ContractCodeHistoryOperationTypeGenesis, CodeID: firstCodeID, - Updated: types.NewAbsoluteTxPosition(ctx), + Updated: &types.AbsoluteTxPosition{ + BlockHeight: 100, + TxIndex: 10, + }, }, } assert.Equal(t, expHistory, keeper.GetContractHistory(ctx, contractAddr)) diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index 5a0305a485..2e80ecfa25 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -234,6 +234,7 @@ func TestMigrateProposal(t *testing.T) { contractInfoFixture := types.ContractInfoFixture(func(c *types.ContractInfo) { c.Label = "testing" c.Admin = anyAddress.String() + c.Created = types.NewAbsoluteTxPosition(ctx) }) key, err := hex.DecodeString("636F6E666967") require.NoError(t, err) diff --git a/x/wasm/keeper/querier.go b/x/wasm/keeper/querier.go index 9b23c68d96..ceb0470de6 100644 --- a/x/wasm/keeper/querier.go +++ b/x/wasm/keeper/querier.go @@ -257,8 +257,6 @@ func queryContractInfo(ctx sdk.Context, addr sdk.AccAddress, keeper types.ViewKe if info == nil { return nil, types.ErrNotFound } - // redact the Created field (just used for sorting, not part of public API) - info.Created = nil return &types.QueryContractInfoResponse{ Address: addr.String(), ContractInfo: *info, diff --git a/x/wasm/keeper/querier_test.go b/x/wasm/keeper/querier_test.go index 52a17d0e11..197e6afaa2 100644 --- a/x/wasm/keeper/querier_test.go +++ b/x/wasm/keeper/querier_test.go @@ -560,20 +560,16 @@ func TestQueryContractInfo(t *testing.T) { src: &types.QueryContractInfoRequest{Address: contractAddr.String()}, stored: types.ContractInfoFixture(), expRsp: &types.QueryContractInfoResponse{ - Address: contractAddr.String(), - ContractInfo: types.ContractInfoFixture(func(info *types.ContractInfo) { - info.Created = nil // not returned on queries - }), + Address: contractAddr.String(), + ContractInfo: types.ContractInfoFixture(), }, }, "with extension": { src: &types.QueryContractInfoRequest{Address: contractAddr.String()}, stored: types.ContractInfoFixture(myExtension), expRsp: &types.QueryContractInfoResponse{ - Address: contractAddr.String(), - ContractInfo: types.ContractInfoFixture(myExtension, func(info *types.ContractInfo) { - info.Created = nil // not returned on queries - }), + Address: contractAddr.String(), + ContractInfo: types.ContractInfoFixture(myExtension), }, }, "not found": { diff --git a/x/wasm/types/genesis.go b/x/wasm/types/genesis.go index ba973c6f02..5e8a25a25a 100644 --- a/x/wasm/types/genesis.go +++ b/x/wasm/types/genesis.go @@ -61,9 +61,6 @@ func (c Contract) ValidateBasic() error { return sdkerrors.Wrap(err, "contract info") } - if c.ContractInfo.Created != nil { - return sdkerrors.Wrap(ErrInvalid, "created must be empty") - } for i := range c.ContractState { if err := c.ContractState[i].ValidateBasic(); err != nil { return sdkerrors.Wrapf(err, "contract state %d", i) diff --git a/x/wasm/types/genesis_test.go b/x/wasm/types/genesis_test.go index 3ef424e7e5..d801aba4c0 100644 --- a/x/wasm/types/genesis_test.go +++ b/x/wasm/types/genesis_test.go @@ -157,7 +157,7 @@ func TestContractValidateBasic(t *testing.T) { srcMutator: func(c *Contract) { c.ContractInfo.Created = &AbsoluteTxPosition{} }, - expError: true, + expError: false, }, "contract state invalid": { srcMutator: func(c *Contract) { diff --git a/x/wasm/types/test_fixtures.go b/x/wasm/types/test_fixtures.go index de07f175de..a62b24a886 100644 --- a/x/wasm/types/test_fixtures.go +++ b/x/wasm/types/test_fixtures.go @@ -101,6 +101,10 @@ func OnlyGenesisFields(info *ContractInfo) { info.Created = nil } +func RandCreatedFields(info *ContractInfo) { + info.Created = &AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()} +} + func ContractInfoFixture(mutators ...func(*ContractInfo)) ContractInfo { const anyAddress = "cosmos1qyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqszqgpqyqs2m6sx4" diff --git a/x/wasm/types/types.go b/x/wasm/types/types.go index 6453c5f1d0..7aea59ef29 100644 --- a/x/wasm/types/types.go +++ b/x/wasm/types/types.go @@ -173,7 +173,6 @@ func (c *ContractInfo) AddMigration(ctx sdk.Context, codeID uint64, msg []byte) // ResetFromGenesis resets contracts timestamp and history. func (c *ContractInfo) ResetFromGenesis(ctx sdk.Context) ContractCodeHistoryEntry { - c.Created = NewAbsoluteTxPosition(ctx) return ContractCodeHistoryEntry{ Operation: ContractCodeHistoryOperationTypeGenesis, CodeID: c.CodeID, From 6c0da1e37265c6cef6344aa8c9557fba4d5aa082 Mon Sep 17 00:00:00 2001 From: GNaD Date: Thu, 3 Nov 2022 16:51:24 +0700 Subject: [PATCH 2/7] add validate created --- x/wasm/client/cli/genesis_msg_test.go | 24 ++++++++---------------- x/wasm/keeper/genesis_test.go | 10 +++++----- x/wasm/types/genesis.go | 3 +++ x/wasm/types/test_fixtures.go | 2 +- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/x/wasm/client/cli/genesis_msg_test.go b/x/wasm/client/cli/genesis_msg_test.go index a1d24f29cd..614d895a90 100644 --- a/x/wasm/client/cli/genesis_msg_test.go +++ b/x/wasm/client/cli/genesis_msg_test.go @@ -391,10 +391,8 @@ func TestExecuteContractCmd(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: firstContractAddress, - ContractInfo: types.ContractInfoFixture(func(info *types.ContractInfo) { - info.Created = nil - }), - ContractState: []types.Model{}, + ContractInfo: types.ContractInfoFixture(), + ContractState: []types.Model{}, }, }, }, @@ -473,10 +471,8 @@ func TestExecuteContractCmd(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: firstContractAddress, - ContractInfo: types.ContractInfoFixture(func(info *types.ContractInfo) { - info.Created = nil - }), - ContractState: []types.Model{}, + ContractInfo: types.ContractInfoFixture(), + ContractState: []types.Model{}, }, }, }, @@ -500,10 +496,8 @@ func TestExecuteContractCmd(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: firstContractAddress, - ContractInfo: types.ContractInfoFixture(func(info *types.ContractInfo) { - info.Created = nil - }), - ContractState: []types.Model{}, + ContractInfo: types.ContractInfoFixture(), + ContractState: []types.Model{}, }, }, }, @@ -528,10 +522,8 @@ func TestExecuteContractCmd(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: firstContractAddress, - ContractInfo: types.ContractInfoFixture(func(info *types.ContractInfo) { - info.Created = nil - }), - ContractState: []types.Model{}, + ContractInfo: types.ContractInfoFixture(), + ContractState: []types.Model{}, }, }, }, diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 3506eb3977..1ab24e23a0 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -312,7 +312,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, }, Params: types.DefaultParams(), @@ -328,10 +328,10 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, }, Params: types.DefaultParams(), @@ -347,7 +347,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), ContractState: []types.Model{ { Key: []byte{0x1}, @@ -395,7 +395,7 @@ func TestGenesisInit(t *testing.T) { Contracts: []types.Contract{ { ContractAddress: BuildContractAddressClassic(1, 1).String(), - ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }), + ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), }, }, Sequences: []types.Sequence{ diff --git a/x/wasm/types/genesis.go b/x/wasm/types/genesis.go index 5e8a25a25a..eead8ff915 100644 --- a/x/wasm/types/genesis.go +++ b/x/wasm/types/genesis.go @@ -61,6 +61,9 @@ func (c Contract) ValidateBasic() error { return sdkerrors.Wrap(err, "contract info") } + if c.ContractInfo.Created == nil { + return sdkerrors.Wrap(ErrInvalid, "created must not be empty") + } for i := range c.ContractState { if err := c.ContractState[i].ValidateBasic(); err != nil { return sdkerrors.Wrapf(err, "contract state %d", i) diff --git a/x/wasm/types/test_fixtures.go b/x/wasm/types/test_fixtures.go index a62b24a886..61665b6efe 100644 --- a/x/wasm/types/test_fixtures.go +++ b/x/wasm/types/test_fixtures.go @@ -87,7 +87,7 @@ func ContractFixture(mutators ...func(*Contract)) Contract { fixture := Contract{ ContractAddress: anyAddress, - ContractInfo: ContractInfoFixture(OnlyGenesisFields), + ContractInfo: ContractInfoFixture(RandCreatedFields), ContractState: []Model{{Key: []byte("anyKey"), Value: []byte("anyValue")}}, } From 56223126ac8fe584c4168fcc8b6e6047caf2650a Mon Sep 17 00:00:00 2001 From: GNaD Date: Thu, 3 Nov 2022 17:54:04 +0700 Subject: [PATCH 3/7] fix sims test app import export --- app/sim_test.go | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/app/sim_test.go b/app/sim_test.go index 41f729099e..ef858bc919 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -196,6 +196,7 @@ func TestAppImportExport(t *testing.T) { // delete persistent tx counter value ctxA.KVStore(app.keys[wasm.StoreKey]).Delete(wasmtypes.TXCounterPrefix) + // still need to drop contract history. We not recovery the ContractCodeHistoryEntry.Msg // reset contract code index in source DB for comparison with dest DB dropContractHistory := func(s store.KVStore, keys ...[]byte) { for _, key := range keys { @@ -211,22 +212,6 @@ func TestAppImportExport(t *testing.T) { dropContractHistory(ctxA.KVStore(app.keys[wasm.StoreKey]), prefixes...) dropContractHistory(ctxB.KVStore(newApp.keys[wasm.StoreKey]), prefixes...) - normalizeContractInfo := func(ctx sdk.Context, app *WasmApp) { - var index uint64 - app.WasmKeeper.IterateContractInfo(ctx, func(address sdk.AccAddress, info wasmtypes.ContractInfo) bool { - created := &wasmtypes.AbsoluteTxPosition{ - BlockHeight: uint64(0), - TxIndex: index, - } - info.Created = created - store := ctx.KVStore(app.keys[wasm.StoreKey]) - store.Set(wasmtypes.GetContractAddressKey(address), app.appCodec.MustMarshal(&info)) - index++ - return false - }) - } - normalizeContractInfo(ctxA, app) - normalizeContractInfo(ctxB, newApp) // diff both stores for _, skp := range storeKeysPrefixes { storeA := ctxA.KVStore(skp.A) From 554c776fc98db06934ae6bd95fc7001f7931202c Mon Sep 17 00:00:00 2001 From: GNaD Date: Sun, 6 Nov 2022 22:23:39 +0700 Subject: [PATCH 4/7] add preserve contract history --- app/sim_test.go | 19 -- docs/proto/proto-docs.md | 3 +- proto/cosmwasm/wasm/v1/genesis.proto | 1 + x/wasm/keeper/genesis.go | 12 +- x/wasm/keeper/genesis_test.go | 104 +++++++++-- x/wasm/keeper/keeper.go | 10 +- x/wasm/keeper/proposal_integration_test.go | 11 +- x/wasm/types/genesis.pb.go | 205 ++++++++++++--------- x/wasm/types/ibc.pb.go | 27 +-- x/wasm/types/proposal.pb.go | 94 +--------- x/wasm/types/query.pb.go | 173 +---------------- x/wasm/types/query.pb.gw.go | 92 +++++++-- x/wasm/types/tx.pb.go | 116 ++---------- x/wasm/types/types.pb.go | 75 +------- 14 files changed, 334 insertions(+), 608 deletions(-) diff --git a/app/sim_test.go b/app/sim_test.go index ef858bc919..e80c6fcae7 100644 --- a/app/sim_test.go +++ b/app/sim_test.go @@ -8,9 +8,6 @@ import ( "testing" "time" - "github.com/cosmos/cosmos-sdk/store" - "github.com/cosmos/cosmos-sdk/store/prefix" - "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/simapp" @@ -196,22 +193,6 @@ func TestAppImportExport(t *testing.T) { // delete persistent tx counter value ctxA.KVStore(app.keys[wasm.StoreKey]).Delete(wasmtypes.TXCounterPrefix) - // still need to drop contract history. We not recovery the ContractCodeHistoryEntry.Msg - // reset contract code index in source DB for comparison with dest DB - dropContractHistory := func(s store.KVStore, keys ...[]byte) { - for _, key := range keys { - prefixStore := prefix.NewStore(s, key) - iter := prefixStore.Iterator(nil, nil) - for ; iter.Valid(); iter.Next() { - prefixStore.Delete(iter.Key()) - } - iter.Close() - } - } - prefixes := [][]byte{wasmtypes.ContractCodeHistoryElementPrefix, wasmtypes.ContractByCodeIDAndCreatedSecondaryIndexPrefix} - dropContractHistory(ctxA.KVStore(app.keys[wasm.StoreKey]), prefixes...) - dropContractHistory(ctxB.KVStore(newApp.keys[wasm.StoreKey]), prefixes...) - // diff both stores for _, skp := range storeKeysPrefixes { storeA := ctxA.KVStore(skp.A) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index d6e5aee1d6..fdf641c81a 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -193,7 +193,7 @@ ContractInfo stores a WASM contract instance | `creator` | [string](#string) | | Creator address who initially instantiated the contract | | `admin` | [string](#string) | | Admin is an optional address that can execute migrations | | `label` | [string](#string) | | Label is optional metadata to be stored with a contract instance. | -| `created` | [AbsoluteTxPosition](#cosmwasm.wasm.v1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. This data should kept internal and not be exposed via query results. Just use for sorting | +| `created` | [AbsoluteTxPosition](#cosmwasm.wasm.v1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. | | `ibc_port_id` | [string](#string) | | | | `extension` | [google.protobuf.Any](#google.protobuf.Any) | | Extension is an extension point to store custom metadata within the persistence model. | @@ -568,6 +568,7 @@ Contract struct encompasses ContractAddress, ContractInfo, and ContractState | `contract_address` | [string](#string) | | | | `contract_info` | [ContractInfo](#cosmwasm.wasm.v1.ContractInfo) | | | | `contract_state` | [Model](#cosmwasm.wasm.v1.Model) | repeated | | +| `contract_code_history` | [ContractCodeHistoryEntry](#cosmwasm.wasm.v1.ContractCodeHistoryEntry) | repeated | | diff --git a/proto/cosmwasm/wasm/v1/genesis.proto b/proto/cosmwasm/wasm/v1/genesis.proto index 87373e18d7..47c1526942 100644 --- a/proto/cosmwasm/wasm/v1/genesis.proto +++ b/proto/cosmwasm/wasm/v1/genesis.proto @@ -53,6 +53,7 @@ message Contract { string contract_address = 1; ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; + repeated ContractCodeHistoryEntry contract_code_history = 4 [ (gogoproto.nullable) = false ]; } // Sequence key and value of an id generation counter diff --git a/x/wasm/keeper/genesis.go b/x/wasm/keeper/genesis.go index 55e2a1be48..2fb152a130 100644 --- a/x/wasm/keeper/genesis.go +++ b/x/wasm/keeper/genesis.go @@ -41,7 +41,7 @@ func InitGenesis(ctx sdk.Context, keeper *Keeper, data types.GenesisState, staki if err != nil { return nil, sdkerrors.Wrapf(err, "address in contract number %d", i) } - err = keeper.importContract(ctx, contractAddr, &contract.ContractInfo, contract.ContractState) + err = keeper.importContract(ctx, contractAddr, &contract.ContractInfo, contract.ContractState, contract.ContractCodeHistory) if err != nil { return nil, sdkerrors.Wrapf(err, "contract number %d", i) } @@ -107,10 +107,14 @@ func ExportGenesis(ctx sdk.Context, keeper *Keeper) *types.GenesisState { state = append(state, types.Model{Key: key, Value: value}) return false }) + + contractCodeHistory := keeper.GetContractHistory(ctx, addr) + genState.Contracts = append(genState.Contracts, types.Contract{ - ContractAddress: addr.String(), - ContractInfo: contract, - ContractState: state, + ContractAddress: addr.String(), + ContractInfo: contract, + ContractState: state, + ContractCodeHistory: contractCodeHistory, }) return false }) diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 1ab24e23a0..970f205187 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -12,7 +12,6 @@ import ( "time" "github.com/cosmos/cosmos-sdk/store" - "github.com/cosmos/cosmos-sdk/store/prefix" sdk "github.com/cosmos/cosmos-sdk/types" authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper" bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" @@ -111,21 +110,10 @@ func TestGenesisExportImport(t *testing.T) { // reset contract code index in source DB for comparison with dest DB wasmKeeper.IterateContractInfo(srcCtx, func(address sdk.AccAddress, info wasmTypes.ContractInfo) bool { creatorAddress := sdk.MustAccAddressFromBech32(info.Creator) - wasmKeeper.removeFromContractCodeSecondaryIndex(srcCtx, address, wasmKeeper.getLastContractHistoryEntry(srcCtx, address)) + history := wasmKeeper.GetContractHistory(srcCtx, address) - prefixStore := prefix.NewStore(srcCtx.KVStore(wasmKeeper.storeKey), types.GetContractCodeHistoryElementPrefix(address)) - iter := prefixStore.Iterator(nil, nil) - - for ; iter.Valid(); iter.Next() { - prefixStore.Delete(iter.Key()) - } - x := &info - newHistory := x.ResetFromGenesis(dstCtx) - wasmKeeper.storeContractInfo(srcCtx, address, x) - wasmKeeper.addToContractCodeSecondaryIndex(srcCtx, address, newHistory) - wasmKeeper.addToContractCreatorSecondaryIndex(srcCtx, creatorAddress, newHistory.Updated, address) - wasmKeeper.appendToContractHistory(srcCtx, address, newHistory) - iter.Close() + wasmKeeper.addToContractCodeSecondaryIndex(srcCtx, address, history[len(history)-1]) + wasmKeeper.addToContractCreatorSecondaryIndex(srcCtx, creatorAddress, history[0].Updated, address) return false }) @@ -273,6 +261,13 @@ func TestGenesisInit(t *testing.T) { { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Sequences: []types.Sequence{ @@ -294,9 +289,23 @@ func TestGenesisInit(t *testing.T) { { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, { ContractAddress: BuildContractAddressClassic(1, 2).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Sequences: []types.Sequence{ @@ -313,6 +322,13 @@ func TestGenesisInit(t *testing.T) { { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Params: types.DefaultParams(), @@ -329,9 +345,23 @@ func TestGenesisInit(t *testing.T) { { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Params: types.DefaultParams(), @@ -358,6 +388,13 @@ func TestGenesisInit(t *testing.T) { Value: []byte("bar"), }, }, + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Params: types.DefaultParams(), @@ -396,6 +433,13 @@ func TestGenesisInit(t *testing.T) { { ContractAddress: BuildContractAddressClassic(1, 1).String(), ContractInfo: types.ContractInfoFixture(func(c *wasmTypes.ContractInfo) { c.CodeID = 1 }, types.RandCreatedFields), + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: 1, + Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + }, + }, }, }, Sequences: []types.Sequence{ @@ -494,7 +538,25 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { "block_height" : "100", "tx_index" : "10" } - } + }, + "contract_code_history": [ + { + "operation": "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT", + "code_id": "1", + "updated": { + "block_height" : "100", + "tx_index" : "10" + } + }, + { + "operation": "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", + "code_id": "1", + "updated": { + "block_height" : "200", + "tx_index" : "10" + } + } + ] } ], "sequences": [ @@ -560,13 +622,21 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { expHistory := []types.ContractCodeHistoryEntry{ { - Operation: types.ContractCodeHistoryOperationTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Updated: &types.AbsoluteTxPosition{ BlockHeight: 100, TxIndex: 10, }, }, + { + Operation: types.ContractCodeHistoryOperationTypeMigrate, + CodeID: firstCodeID, + Updated: &types.AbsoluteTxPosition{ + BlockHeight: 200, + TxIndex: 10, + }, + }, } assert.Equal(t, expHistory, keeper.GetContractHistory(ctx, contractAddr)) assert.Equal(t, uint64(2), keeper.PeekAutoIncrementID(ctx, types.KeyLastCodeID)) diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 3112a26eb5..195a4614ce 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -1062,7 +1062,7 @@ func (k Keeper) importAutoIncrementID(ctx sdk.Context, lastIDKey []byte, val uin return nil } -func (k Keeper) importContract(ctx sdk.Context, contractAddr sdk.AccAddress, c *types.ContractInfo, state []types.Model) error { +func (k Keeper) importContract(ctx sdk.Context, contractAddr sdk.AccAddress, c *types.ContractInfo, state []types.Model, entries []types.ContractCodeHistoryEntry) error { if !k.containsCodeInfo(ctx, c.CodeID) { return sdkerrors.Wrapf(types.ErrNotFound, "code id: %d", c.CodeID) } @@ -1074,11 +1074,11 @@ func (k Keeper) importContract(ctx sdk.Context, contractAddr sdk.AccAddress, c * if err != nil { return err } - historyEntry := c.ResetFromGenesis(ctx) - k.appendToContractHistory(ctx, contractAddr, historyEntry) + + k.appendToContractHistory(ctx, contractAddr, entries...) k.storeContractInfo(ctx, contractAddr, c) - k.addToContractCodeSecondaryIndex(ctx, contractAddr, historyEntry) - k.addToContractCreatorSecondaryIndex(ctx, creatorAddress, historyEntry.Updated, contractAddr) + k.addToContractCodeSecondaryIndex(ctx, contractAddr, entries[len(entries)-1]) + k.addToContractCreatorSecondaryIndex(ctx, creatorAddress, entries[0].Updated, contractAddr) return k.importContractState(ctx, contractAddr, state) } diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index 2e80ecfa25..206782e2d2 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -236,10 +236,13 @@ func TestMigrateProposal(t *testing.T) { c.Admin = anyAddress.String() c.Created = types.NewAbsoluteTxPosition(ctx) }) + entries := []types.ContractCodeHistoryEntry{ + contractInfoFixture.ResetFromGenesis(ctx), + } key, err := hex.DecodeString("636F6E666967") require.NoError(t, err) m := types.Model{Key: key, Value: []byte(`{"verifier":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","beneficiary":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","funder":"AQEBAQEBAQEBAQEBAQEBAQEBAQE="}`)} - require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &contractInfoFixture, []types.Model{m})) + require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &contractInfoFixture, []types.Model{m}, entries)) migMsg := struct { Verifier sdk.AccAddress `json:"verifier"` @@ -473,7 +476,11 @@ func TestAdminProposals(t *testing.T) { codeInfoFixture := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) require.NoError(t, wasmKeeper.importCode(ctx, 1, codeInfoFixture, wasmCode)) - require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &spec.state, []types.Model{})) + entries := []types.ContractCodeHistoryEntry{ + spec.state.ResetFromGenesis(ctx), + } + + require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &spec.state, []types.Model{}, entries)) // when stored storedProposal, err := govKeeper.SubmitProposal(ctx, spec.srcProposal) require.NoError(t, err) diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index 926b74c81c..37283caece 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -5,21 +5,17 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) +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 +38,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 +53,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) } @@ -127,11 +118,9 @@ func (*GenesisState_GenMsgs) ProtoMessage() {} func (*GenesisState_GenMsgs) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{0, 0} } - func (m *GenesisState_GenMsgs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *GenesisState_GenMsgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState_GenMsgs.Marshal(b, m, deterministic) @@ -144,15 +133,12 @@ func (m *GenesisState_GenMsgs) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } - func (m *GenesisState_GenMsgs) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState_GenMsgs.Merge(m, src) } - func (m *GenesisState_GenMsgs) XXX_Size() int { return m.Size() } - func (m *GenesisState_GenMsgs) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState_GenMsgs.DiscardUnknown(m) } @@ -231,11 +217,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) @@ -248,15 +232,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) } @@ -293,9 +274,10 @@ func (m *Code) GetPinned() bool { // Contract struct encompasses ContractAddress, ContractInfo, and ContractState type Contract struct { - ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - ContractInfo ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3" json:"contract_info"` - ContractState []Model `protobuf:"bytes,3,rep,name=contract_state,json=contractState,proto3" json:"contract_state"` + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + ContractInfo ContractInfo `protobuf:"bytes,2,opt,name=contract_info,json=contractInfo,proto3" json:"contract_info"` + ContractState []Model `protobuf:"bytes,3,rep,name=contract_state,json=contractState,proto3" json:"contract_state"` + ContractCodeHistory []ContractCodeHistoryEntry `protobuf:"bytes,4,rep,name=contract_code_history,json=contractCodeHistory,proto3" json:"contract_code_history"` } func (m *Contract) Reset() { *m = Contract{} } @@ -304,11 +286,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) @@ -321,15 +301,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) } @@ -357,6 +334,13 @@ func (m *Contract) GetContractState() []Model { return nil } +func (m *Contract) GetContractCodeHistory() []ContractCodeHistoryEntry { + if m != nil { + return m.ContractCodeHistory + } + return nil +} + // Sequence key and value of an id generation counter type Sequence struct { IDKey []byte `protobuf:"bytes,1,opt,name=id_key,json=idKey,proto3" json:"id_key,omitempty"` @@ -369,11 +353,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) @@ -386,15 +368,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) } @@ -426,48 +405,50 @@ func init() { func init() { proto.RegisterFile("cosmwasm/wasm/v1/genesis.proto", fileDescriptor_2ab3f539b23472a6) } var fileDescriptor_2ab3f539b23472a6 = []byte{ - // 646 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xc7, 0xe3, 0x26, 0x4e, 0x93, 0x69, 0x7e, 0xbf, 0x56, 0xdb, 0xaa, 0x35, 0x06, 0x9c, 0x28, - 0xa0, 0x2a, 0x48, 0x28, 0x51, 0x8b, 0xc4, 0x0d, 0x01, 0x6e, 0x2b, 0x6a, 0x55, 0x95, 0xc0, 0x15, - 0x42, 0x42, 0xaa, 0x22, 0xd7, 0xde, 0x1a, 0x8b, 0xda, 0x1b, 0xb2, 0x9b, 0x52, 0x9f, 0x79, 0x01, - 0x1e, 0x01, 0x5e, 0x06, 0xf5, 0xd8, 0x23, 0xa7, 0x08, 0xa5, 0x37, 0x9e, 0x02, 0xed, 0x1f, 0xbb, - 0x06, 0xa7, 0x17, 0x2b, 0x3b, 0xf3, 0x9d, 0xcf, 0xfc, 0xc9, 0xec, 0x82, 0xe5, 0x13, 0x1a, 0x7f, - 0xf6, 0x68, 0x3c, 0x10, 0x9f, 0xf3, 0xad, 0x41, 0x88, 0x13, 0x4c, 0x23, 0xda, 0x1f, 0x8d, 0x09, - 0x23, 0x68, 0x25, 0xf3, 0xf7, 0xc5, 0xe7, 0x7c, 0xcb, 0x5c, 0x0b, 0x49, 0x48, 0x84, 0x73, 0xc0, - 0x7f, 0x49, 0x9d, 0x79, 0xaf, 0xc4, 0x61, 0xe9, 0x08, 0x2b, 0x8a, 0x79, 0xa7, 0xec, 0xbd, 0x90, - 0xae, 0xee, 0x37, 0x1d, 0x5a, 0xaf, 0x64, 0xca, 0x23, 0xe6, 0x31, 0x8c, 0x9e, 0x42, 0x7d, 0xe4, - 0x8d, 0xbd, 0x98, 0x1a, 0x5a, 0x47, 0xeb, 0x2d, 0x6d, 0x1b, 0xfd, 0x7f, 0x4b, 0xe8, 0xbf, 0x16, - 0x7e, 0xbb, 0x76, 0x39, 0x6d, 0x57, 0x5c, 0xa5, 0x46, 0x7b, 0xa0, 0xfb, 0x24, 0xc0, 0xd4, 0x58, - 0xe8, 0x54, 0x7b, 0x4b, 0xdb, 0xeb, 0xe5, 0xb0, 0x1d, 0x12, 0x60, 0x7b, 0x83, 0x07, 0xfd, 0x9e, - 0xb6, 0x97, 0x85, 0xf8, 0x31, 0x89, 0x23, 0x86, 0xe3, 0x11, 0x4b, 0x5d, 0x19, 0x8d, 0xde, 0x42, - 0xd3, 0x27, 0x09, 0x1b, 0x7b, 0x3e, 0xa3, 0x46, 0x55, 0xa0, 0xcc, 0x79, 0x28, 0x29, 0xb1, 0xef, - 0x2a, 0xdc, 0x6a, 0x1e, 0x54, 0x40, 0xde, 0x90, 0x38, 0x96, 0xe2, 0x4f, 0x13, 0x9c, 0xf8, 0x98, - 0x1a, 0xb5, 0xdb, 0xb0, 0x47, 0x4a, 0x72, 0x83, 0xcd, 0x83, 0x8a, 0xd8, 0xdc, 0x88, 0x8e, 0xa1, - 0x11, 0xe2, 0x64, 0x18, 0xd3, 0x90, 0x1a, 0xba, 0xa0, 0x6e, 0x96, 0xa9, 0xc5, 0xf1, 0xf2, 0xc3, - 0x21, 0x0d, 0xa9, 0x6d, 0xaa, 0x0c, 0x28, 0x8b, 0x2f, 0x24, 0x58, 0x0c, 0xa5, 0xc8, 0xfc, 0xb2, - 0x00, 0x8b, 0x2a, 0x00, 0x3d, 0x07, 0xa0, 0x8c, 0x8c, 0xf1, 0x90, 0xcf, 0x49, 0xfd, 0x37, 0x56, - 0x39, 0xd9, 0x21, 0x0d, 0x8f, 0xb8, 0x8c, 0x0f, 0x7b, 0xbf, 0xe2, 0x36, 0x69, 0x76, 0x40, 0xc7, - 0xb0, 0x16, 0x25, 0x94, 0x79, 0x09, 0x8b, 0x3c, 0xc6, 0x31, 0x72, 0x36, 0xc6, 0x82, 0x40, 0xf5, - 0xe6, 0xa2, 0x9c, 0x9b, 0x80, 0x6c, 0xe4, 0xfb, 0x15, 0x77, 0x35, 0x2a, 0x9b, 0xd1, 0x1b, 0x58, - 0xc1, 0x17, 0xd8, 0x9f, 0x14, 0xd1, 0x55, 0x81, 0x7e, 0x38, 0x17, 0xbd, 0x27, 0xc5, 0x05, 0xec, - 0x32, 0xfe, 0xdb, 0x64, 0xeb, 0x50, 0xa5, 0x93, 0xb8, 0xfb, 0x5d, 0x83, 0x9a, 0xe8, 0xe0, 0x01, - 0x2c, 0xf2, 0xe6, 0x87, 0x51, 0x20, 0xfa, 0xaf, 0xd9, 0x30, 0x9b, 0xb6, 0xeb, 0xdc, 0xe5, 0xec, - 0xba, 0x75, 0xee, 0x72, 0x02, 0xf4, 0x8c, 0x2f, 0x10, 0x17, 0x25, 0xa7, 0x44, 0xf5, 0x66, 0xce, - 0xdf, 0x45, 0x27, 0x39, 0x25, 0x6a, 0x89, 0x1b, 0xbe, 0x3a, 0xa3, 0xfb, 0x00, 0x22, 0xfc, 0x24, - 0x65, 0x98, 0x8a, 0x06, 0x5a, 0xae, 0x00, 0xda, 0xdc, 0x80, 0xd6, 0xa1, 0x3e, 0x8a, 0x92, 0x04, - 0x07, 0x46, 0xad, 0xa3, 0xf5, 0x1a, 0xae, 0x3a, 0x75, 0x7f, 0x68, 0xd0, 0xc8, 0x47, 0xf1, 0x08, - 0x56, 0xb2, 0x11, 0x0c, 0xbd, 0x20, 0x18, 0x63, 0x2a, 0x2f, 0x53, 0xd3, 0x5d, 0xce, 0xec, 0x2f, - 0xa5, 0x19, 0x39, 0xf0, 0x5f, 0x2e, 0x2d, 0x54, 0x6c, 0xdd, 0xbe, 0xf2, 0x85, 0xaa, 0x5b, 0x7e, - 0xc1, 0x86, 0x76, 0xe1, 0xff, 0x1c, 0x45, 0xf9, 0xae, 0xa9, 0xeb, 0xb3, 0x31, 0x67, 0xfc, 0x24, - 0xc0, 0x67, 0x0a, 0x92, 0xe7, 0x17, 0xfb, 0xd9, 0xb5, 0xa1, 0x91, 0xdd, 0x02, 0xd4, 0x81, 0x7a, - 0x14, 0x0c, 0x3f, 0xe2, 0x54, 0x54, 0xdf, 0xb2, 0x9b, 0xb3, 0x69, 0x5b, 0x77, 0x76, 0x0f, 0x70, - 0xea, 0xea, 0x51, 0x70, 0x80, 0x53, 0xb4, 0x06, 0xfa, 0xb9, 0x77, 0x36, 0xc1, 0xa2, 0xec, 0x9a, - 0x2b, 0x0f, 0xf6, 0x8b, 0xcb, 0x99, 0xa5, 0x5d, 0xcd, 0x2c, 0xed, 0xd7, 0xcc, 0xd2, 0xbe, 0x5e, - 0x5b, 0x95, 0xab, 0x6b, 0xab, 0xf2, 0xf3, 0xda, 0xaa, 0xbc, 0xdf, 0x0c, 0x23, 0xf6, 0x61, 0x72, - 0xd2, 0xf7, 0x49, 0x3c, 0xd8, 0x21, 0x34, 0x7e, 0x97, 0xbd, 0x49, 0xc1, 0xe0, 0x42, 0xbe, 0x4d, - 0xe2, 0xd9, 0x3a, 0xa9, 0x8b, 0xc7, 0xe9, 0xc9, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x7c, 0x05, - 0x87, 0xde, 0x1f, 0x05, 0x00, 0x00, + // 676 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0xcf, 0x6e, 0xd3, 0x40, + 0x10, 0xc6, 0xe3, 0x24, 0x4e, 0x93, 0x69, 0xa0, 0xd5, 0xb6, 0xb4, 0xc6, 0x80, 0x13, 0x05, 0x54, + 0x05, 0x84, 0x12, 0xb5, 0x48, 0xdc, 0x10, 0xe0, 0xb6, 0xa2, 0x51, 0x55, 0x09, 0x5c, 0x21, 0x24, + 0xa4, 0x2a, 0x72, 0xed, 0xad, 0x6b, 0x51, 0x7b, 0x43, 0x76, 0x53, 0xea, 0x33, 0x2f, 0xc0, 0x23, + 0xc0, 0x9d, 0x07, 0xe9, 0xb1, 0x47, 0x4e, 0x11, 0x4a, 0x6f, 0x3c, 0x05, 0xda, 0x3f, 0x76, 0x0d, + 0x49, 0x2e, 0x56, 0x76, 0xe6, 0x9b, 0xdf, 0xee, 0x7e, 0x99, 0x59, 0xb0, 0x3c, 0x42, 0xa3, 0x2f, + 0x2e, 0x8d, 0xba, 0xe2, 0x73, 0xbe, 0xd9, 0x0d, 0x70, 0x8c, 0x69, 0x48, 0x3b, 0x83, 0x21, 0x61, + 0x04, 0x2d, 0xa7, 0xf9, 0x8e, 0xf8, 0x9c, 0x6f, 0x9a, 0xab, 0x01, 0x09, 0x88, 0x48, 0x76, 0xf9, + 0x2f, 0xa9, 0x33, 0xef, 0x4f, 0x71, 0x58, 0x32, 0xc0, 0x8a, 0x62, 0xde, 0x9d, 0xce, 0x5e, 0xc8, + 0x54, 0xeb, 0xbb, 0x0e, 0xf5, 0x37, 0x72, 0xcb, 0x43, 0xe6, 0x32, 0x8c, 0x9e, 0x43, 0x65, 0xe0, + 0x0e, 0xdd, 0x88, 0x1a, 0x5a, 0x53, 0x6b, 0x2f, 0x6e, 0x19, 0x9d, 0xff, 0x8f, 0xd0, 0x79, 0x2b, + 0xf2, 0x76, 0xf9, 0x72, 0xdc, 0x28, 0x38, 0x4a, 0x8d, 0x76, 0x41, 0xf7, 0x88, 0x8f, 0xa9, 0x51, + 0x6c, 0x96, 0xda, 0x8b, 0x5b, 0x6b, 0xd3, 0x65, 0xdb, 0xc4, 0xc7, 0xf6, 0x3a, 0x2f, 0xfa, 0x33, + 0x6e, 0x2c, 0x09, 0xf1, 0x53, 0x12, 0x85, 0x0c, 0x47, 0x03, 0x96, 0x38, 0xb2, 0x1a, 0xbd, 0x87, + 0x9a, 0x47, 0x62, 0x36, 0x74, 0x3d, 0x46, 0x8d, 0x92, 0x40, 0x99, 0xb3, 0x50, 0x52, 0x62, 0xdf, + 0x53, 0xb8, 0x95, 0xac, 0x28, 0x87, 0xbc, 0x21, 0x71, 0x2c, 0xc5, 0x9f, 0x47, 0x38, 0xf6, 0x30, + 0x35, 0xca, 0xf3, 0xb0, 0x87, 0x4a, 0x72, 0x83, 0xcd, 0x8a, 0xf2, 0xd8, 0x2c, 0x88, 0x8e, 0xa0, + 0x1a, 0xe0, 0xb8, 0x1f, 0xd1, 0x80, 0x1a, 0xba, 0xa0, 0x6e, 0x4c, 0x53, 0xf3, 0xf6, 0xf2, 0xc5, + 0x01, 0x0d, 0xa8, 0x6d, 0xaa, 0x1d, 0x50, 0x5a, 0x9f, 0xdb, 0x60, 0x21, 0x90, 0x22, 0xf3, 0x6b, + 0x11, 0x16, 0x54, 0x01, 0x7a, 0x09, 0x40, 0x19, 0x19, 0xe2, 0x3e, 0xf7, 0x49, 0xfd, 0x37, 0xd6, + 0xf4, 0x66, 0x07, 0x34, 0x38, 0xe4, 0x32, 0x6e, 0xf6, 0x5e, 0xc1, 0xa9, 0xd1, 0x74, 0x81, 0x8e, + 0x60, 0x35, 0x8c, 0x29, 0x73, 0x63, 0x16, 0xba, 0x8c, 0x63, 0xa4, 0x37, 0x46, 0x51, 0xa0, 0xda, + 0x33, 0x51, 0xbd, 0x9b, 0x82, 0xd4, 0xf2, 0xbd, 0x82, 0xb3, 0x12, 0x4e, 0x87, 0xd1, 0x3b, 0x58, + 0xc6, 0x17, 0xd8, 0x1b, 0xe5, 0xd1, 0x25, 0x81, 0x7e, 0x34, 0x13, 0xbd, 0x2b, 0xc5, 0x39, 0xec, + 0x12, 0xfe, 0x37, 0x64, 0xeb, 0x50, 0xa2, 0xa3, 0xa8, 0xf5, 0x43, 0x83, 0xb2, 0xb8, 0xc1, 0x43, + 0x58, 0xe0, 0x97, 0xef, 0x87, 0xbe, 0xb8, 0x7f, 0xd9, 0x86, 0xc9, 0xb8, 0x51, 0xe1, 0xa9, 0xde, + 0x8e, 0x53, 0xe1, 0xa9, 0x9e, 0x8f, 0x5e, 0xf0, 0x06, 0xe2, 0xa2, 0xf8, 0x84, 0xa8, 0xbb, 0x99, + 0xb3, 0x7b, 0xb1, 0x17, 0x9f, 0x10, 0xd5, 0xc4, 0x55, 0x4f, 0xad, 0xd1, 0x03, 0x00, 0x51, 0x7e, + 0x9c, 0x30, 0x4c, 0xc5, 0x05, 0xea, 0x8e, 0x00, 0xda, 0x3c, 0x80, 0xd6, 0xa0, 0x32, 0x08, 0xe3, + 0x18, 0xfb, 0x46, 0xb9, 0xa9, 0xb5, 0xab, 0x8e, 0x5a, 0xb5, 0x7e, 0x16, 0xa1, 0x9a, 0x59, 0xf1, + 0x18, 0x96, 0x53, 0x0b, 0xfa, 0xae, 0xef, 0x0f, 0x31, 0x95, 0xc3, 0x54, 0x73, 0x96, 0xd2, 0xf8, + 0x6b, 0x19, 0x46, 0x3d, 0xb8, 0x95, 0x49, 0x73, 0x27, 0xb6, 0xe6, 0xb7, 0x7c, 0xee, 0xd4, 0x75, + 0x2f, 0x17, 0x43, 0x3b, 0x70, 0x3b, 0x43, 0x51, 0xde, 0x6b, 0x6a, 0x7c, 0xd6, 0x67, 0xd8, 0x4f, + 0x7c, 0x7c, 0xa6, 0x20, 0xd9, 0xfe, 0x72, 0xfc, 0x7d, 0xb8, 0x93, 0x51, 0x84, 0x11, 0xa7, 0x21, + 0x6f, 0xa1, 0x44, 0x0d, 0xcd, 0x93, 0xf9, 0x07, 0x13, 0x1d, 0x27, 0xc5, 0xbb, 0x31, 0x1b, 0x26, + 0x8a, 0x9f, 0x4d, 0x66, 0x2e, 0xdf, 0xb2, 0xa1, 0x9a, 0xce, 0x1a, 0x6a, 0x42, 0x25, 0xf4, 0xfb, + 0x9f, 0x70, 0x22, 0x3c, 0xaa, 0xdb, 0xb5, 0xc9, 0xb8, 0xa1, 0xf7, 0x76, 0xf6, 0x71, 0xe2, 0xe8, + 0xa1, 0xbf, 0x8f, 0x13, 0xb4, 0x0a, 0xfa, 0xb9, 0x7b, 0x36, 0xc2, 0xc2, 0x9c, 0xb2, 0x23, 0x17, + 0xf6, 0xab, 0xcb, 0x89, 0xa5, 0x5d, 0x4d, 0x2c, 0xed, 0xf7, 0xc4, 0xd2, 0xbe, 0x5d, 0x5b, 0x85, + 0xab, 0x6b, 0xab, 0xf0, 0xeb, 0xda, 0x2a, 0x7c, 0xdc, 0x08, 0x42, 0x76, 0x3a, 0x3a, 0xee, 0x78, + 0x24, 0xea, 0x6e, 0x13, 0x1a, 0x7d, 0x48, 0x5f, 0x3e, 0xbf, 0x7b, 0x21, 0x5f, 0x40, 0xf1, 0x38, + 0x1e, 0x57, 0xc4, 0x13, 0xf8, 0xec, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x55, 0xb6, 0x2c, 0x20, + 0x85, 0x05, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -612,7 +593,6 @@ func (m *GenesisState_GenMsgs_StoreCode) MarshalToSizedBuffer(dAtA []byte) (int, } return len(dAtA) - i, nil } - func (m *GenesisState_GenMsgs_InstantiateContract) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -634,7 +614,6 @@ func (m *GenesisState_GenMsgs_InstantiateContract) MarshalToSizedBuffer(dAtA []b } return len(dAtA) - i, nil } - func (m *GenesisState_GenMsgs_ExecuteContract) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -656,7 +635,6 @@ func (m *GenesisState_GenMsgs_ExecuteContract) MarshalToSizedBuffer(dAtA []byte) } return len(dAtA) - i, nil } - func (m *Code) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -732,6 +710,20 @@ func (m *Contract) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ContractCodeHistory) > 0 { + for iNdEx := len(m.ContractCodeHistory) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ContractCodeHistory[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } if len(m.ContractState) > 0 { for iNdEx := len(m.ContractState) - 1; iNdEx >= 0; iNdEx-- { { @@ -812,7 +804,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 @@ -872,7 +863,6 @@ func (m *GenesisState_GenMsgs_StoreCode) Size() (n int) { } return n } - func (m *GenesisState_GenMsgs_InstantiateContract) Size() (n int) { if m == nil { return 0 @@ -885,7 +875,6 @@ func (m *GenesisState_GenMsgs_InstantiateContract) Size() (n int) { } return n } - func (m *GenesisState_GenMsgs_ExecuteContract) Size() (n int) { if m == nil { return 0 @@ -898,7 +887,6 @@ func (m *GenesisState_GenMsgs_ExecuteContract) Size() (n int) { } return n } - func (m *Code) Size() (n int) { if m == nil { return 0 @@ -938,6 +926,12 @@ func (m *Contract) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if len(m.ContractCodeHistory) > 0 { + for _, e := range m.ContractCodeHistory { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } return n } @@ -960,11 +954,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 @@ -1184,7 +1176,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } - func (m *GenesisState_GenMsgs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1340,7 +1331,6 @@ func (m *GenesisState_GenMsgs) Unmarshal(dAtA []byte) error { } return nil } - func (m *Code) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1497,7 +1487,6 @@ func (m *Code) Unmarshal(dAtA []byte) error { } return nil } - func (m *Contract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1626,6 +1615,40 @@ func (m *Contract) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractCodeHistory", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractCodeHistory = append(m.ContractCodeHistory, ContractCodeHistoryEntry{}) + if err := m.ContractCodeHistory[len(m.ContractCodeHistory)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -1647,7 +1670,6 @@ func (m *Contract) Unmarshal(dAtA []byte) error { } return nil } - func (m *Sequence) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1751,7 +1773,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 bedc1954ab..f424271d5f 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -5,21 +5,17 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" - - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal - -var ( - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -48,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) @@ -65,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 +82,9 @@ func (*MsgIBCCloseChannel) ProtoMessage() {} func (*MsgIBCCloseChannel) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{1} } - 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) @@ -108,15 +97,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) } @@ -241,7 +227,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 @@ -281,11 +266,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 @@ -440,7 +423,6 @@ func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -523,7 +505,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/proposal.pb.go b/x/wasm/types/proposal.pb.go index 0e87ce5fca..3318ee70a8 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -6,23 +6,19 @@ package types import ( bytes "bytes" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/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 - _ = math.Inf -) +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. @@ -51,11 +47,9 @@ func (*StoreCodeProposal) ProtoMessage() {} func (*StoreCodeProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []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) @@ -68,15 +62,12 @@ func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e 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) } @@ -109,11 +100,9 @@ func (*InstantiateContractProposal) ProtoMessage() {} func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []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) @@ -126,15 +115,12 @@ func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) 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) } @@ -160,11 +146,9 @@ func (*MigrateContractProposal) ProtoMessage() {} func (*MigrateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{2} } - 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) @@ -177,15 +161,12 @@ func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b 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) } @@ -209,11 +190,9 @@ func (*SudoContractProposal) ProtoMessage() {} func (*SudoContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{3} } - 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) @@ -226,15 +205,12 @@ func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte 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) } @@ -263,11 +239,9 @@ func (*ExecuteContractProposal) ProtoMessage() {} func (*ExecuteContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{4} } - 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) @@ -280,15 +254,12 @@ func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b 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) } @@ -312,11 +283,9 @@ func (*UpdateAdminProposal) ProtoMessage() {} func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{5} } - 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) @@ -329,15 +298,12 @@ func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -360,11 +326,9 @@ func (*ClearAdminProposal) ProtoMessage() {} func (*ClearAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{6} } - 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) @@ -377,15 +341,12 @@ func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -408,11 +369,9 @@ func (*PinCodesProposal) ProtoMessage() {} func (*PinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{7} } - 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) @@ -425,15 +384,12 @@ func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, er 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) } @@ -456,11 +412,9 @@ func (*UnpinCodesProposal) ProtoMessage() {} func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{8} } - 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) @@ -473,15 +427,12 @@ func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -502,11 +453,9 @@ func (*AccessConfigUpdate) ProtoMessage() {} func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{9} } - 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) @@ -519,15 +468,12 @@ func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -551,11 +497,9 @@ func (*UpdateInstantiateConfigProposal) ProtoMessage() {} func (*UpdateInstantiateConfigProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{10} } - 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) @@ -568,15 +512,12 @@ func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bo 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) } @@ -695,7 +636,6 @@ func (this *StoreCodeProposal) Equal(that interface{}) bool { } return true } - func (this *InstantiateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -746,7 +686,6 @@ func (this *InstantiateContractProposal) Equal(that interface{}) bool { } return true } - func (this *MigrateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -783,7 +722,6 @@ func (this *MigrateContractProposal) Equal(that interface{}) bool { } return true } - func (this *SudoContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -817,7 +755,6 @@ func (this *SudoContractProposal) Equal(that interface{}) bool { } return true } - func (this *ExecuteContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -862,7 +799,6 @@ func (this *ExecuteContractProposal) Equal(that interface{}) bool { } return true } - func (this *UpdateAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -896,7 +832,6 @@ func (this *UpdateAdminProposal) Equal(that interface{}) bool { } return true } - func (this *ClearAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -927,7 +862,6 @@ func (this *ClearAdminProposal) Equal(that interface{}) bool { } return true } - func (this *PinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -963,7 +897,6 @@ func (this *PinCodesProposal) Equal(that interface{}) bool { } return true } - func (this *UnpinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -999,7 +932,6 @@ func (this *UnpinCodesProposal) Equal(that interface{}) bool { } return true } - func (this *AccessConfigUpdate) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1027,7 +959,6 @@ func (this *AccessConfigUpdate) Equal(that interface{}) bool { } return true } - func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1063,7 +994,6 @@ func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { } return true } - func (m *StoreCodeProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1705,7 +1635,6 @@ func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *StoreCodeProposal) Size() (n int) { if m == nil { return 0 @@ -2002,11 +1931,9 @@ func (m *UpdateInstantiateConfigProposal) Size() (n int) { func sovProposal(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozProposal(x uint64) (n int) { return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2243,7 +2170,6 @@ func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2541,7 +2467,6 @@ func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2741,7 +2666,6 @@ func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2922,7 +2846,6 @@ func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3169,7 +3092,6 @@ func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3348,7 +3270,6 @@ func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3495,7 +3416,6 @@ func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3686,7 +3606,6 @@ func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3877,7 +3796,6 @@ func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } - func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3980,7 +3898,6 @@ func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { } return nil } - func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4129,7 +4046,6 @@ func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { } return nil } - func skipProposal(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index bb08b7571c..dafa74a5f2 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" - query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -20,15 +16,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 - -var ( - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -49,11 +45,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) @@ -66,15 +60,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) } @@ -95,11 +86,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) @@ -112,15 +101,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) } @@ -142,11 +128,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) @@ -159,15 +143,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) } @@ -188,11 +169,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) @@ -205,15 +184,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) } @@ -234,11 +210,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) @@ -251,15 +225,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) } @@ -281,11 +252,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) @@ -298,15 +267,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) } @@ -328,11 +294,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) @@ -345,15 +309,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) } @@ -374,11 +335,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) @@ -391,15 +350,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) } @@ -420,11 +376,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) @@ -437,15 +391,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) } @@ -465,11 +416,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) @@ -482,15 +431,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) } @@ -512,11 +458,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) @@ -529,15 +473,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) } @@ -557,11 +498,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) @@ -574,15 +513,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) } @@ -600,11 +536,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) @@ -617,15 +551,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) } @@ -646,11 +577,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) @@ -663,15 +592,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) } @@ -690,11 +616,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) @@ -707,15 +631,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) } @@ -734,11 +655,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) @@ -751,15 +670,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) } @@ -779,11 +695,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) @@ -796,15 +710,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) } @@ -824,11 +735,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) @@ -841,15 +750,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) } @@ -870,11 +776,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) @@ -887,15 +791,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) } @@ -903,7 +804,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) } @@ -911,11 +813,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) @@ -928,15 +828,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) } @@ -955,11 +852,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) @@ -972,15 +867,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) } @@ -1002,11 +894,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) @@ -1019,15 +909,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) } @@ -1049,11 +936,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) @@ -1066,15 +951,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) } @@ -1224,7 +1106,6 @@ func (this *QueryContractInfoResponse) Equal(that interface{}) bool { } return true } - func (this *CodeInfoResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1258,7 +1139,6 @@ func (this *CodeInfoResponse) Equal(that interface{}) bool { } return true } - func (this *QueryCodeResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1457,48 +1337,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") } @@ -2675,7 +2546,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 @@ -3046,11 +2916,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 @@ -3133,7 +3001,6 @@ func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3249,7 +3116,6 @@ func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3368,7 +3234,6 @@ func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3489,7 +3354,6 @@ func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3595,7 +3459,6 @@ func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3714,7 +3577,6 @@ func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3833,7 +3695,6 @@ func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3954,7 +3815,6 @@ func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4071,7 +3931,6 @@ func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4156,7 +4015,6 @@ func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4273,7 +4131,6 @@ func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4358,7 +4215,6 @@ func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4428,7 +4284,6 @@ func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4597,7 +4452,6 @@ func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4718,7 +4572,6 @@ func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4805,7 +4658,6 @@ func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4926,7 +4778,6 @@ func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5013,7 +4864,6 @@ func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5176,7 +5026,6 @@ func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5227,7 +5076,6 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5311,7 +5159,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5430,7 +5277,6 @@ func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { } return nil } - func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5549,7 +5395,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 527cac4e74..696252ab02 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -26,15 +26,12 @@ import ( // Suppress "imported and not used" errors var _ codes.Code - -var ( - _ io.Reader - _ status.Status - _ = runtime.String - _ = utilities.NewDoubleArray - _ = descriptor.ForMessage - _ = metadata.Join -) +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 @@ -60,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) { @@ -86,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 @@ -121,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) { @@ -154,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 @@ -189,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) { @@ -222,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 @@ -257,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) { @@ -290,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) { @@ -327,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) { @@ -364,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) { @@ -401,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) { @@ -438,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) { @@ -464,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) { @@ -490,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 @@ -507,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) { @@ -522,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 @@ -539,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) { @@ -554,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) { @@ -562,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) { @@ -570,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 @@ -605,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) { @@ -638,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". @@ -645,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() @@ -665,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) { @@ -687,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) { @@ -709,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) { @@ -731,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) { @@ -753,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) { @@ -775,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) { @@ -797,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) { @@ -819,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) { @@ -841,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) { @@ -863,11 +904,14 @@ 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) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) if err != nil { @@ -875,6 +919,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ContractsByCreator_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) @@ -882,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 @@ -924,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() @@ -941,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) { @@ -960,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) { @@ -979,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) { @@ -998,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) { @@ -1017,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) { @@ -1036,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) { @@ -1055,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) { @@ -1074,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) { @@ -1093,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) { @@ -1112,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) { @@ -1131,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 @@ -1155,9 +1213,9 @@ var ( pattern_Query_PinnedCodes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmwasm", "wasm", "v1", "codes", "pinned"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmwasm", "wasm", "v1", "codes", "params"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cosmwasm", "wasm", "v1", "codes", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ContractsByCreator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmwasm", "wasm", "v1", "contracts", "creator", "creator_address"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ContractsByCreator_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"cosmwasm", "wasm", "v1", "contracts", "creator", "creator_address"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/wasm/types/tx.pb.go b/x/wasm/types/tx.pb.go index f81b1106e0..a47e283e9a 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_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -18,15 +14,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 - -var ( - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -51,11 +47,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) @@ -68,15 +62,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) } @@ -97,11 +88,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) @@ -114,15 +103,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) } @@ -152,11 +138,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) @@ -169,15 +153,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) } @@ -212,11 +193,9 @@ func (*MsgInstantiateContract2) ProtoMessage() {} func (*MsgInstantiateContract2) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{3} } - 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) @@ -229,15 +208,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) } @@ -258,11 +234,9 @@ func (*MsgInstantiateContractResponse) ProtoMessage() {} func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{4} } - 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) @@ -275,15 +249,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) } @@ -304,11 +275,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) @@ -321,15 +290,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) } @@ -354,11 +320,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) @@ -371,15 +335,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) } @@ -398,11 +359,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) @@ -415,15 +374,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) } @@ -448,11 +404,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) @@ -465,15 +419,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) } @@ -493,11 +444,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) @@ -510,15 +459,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) } @@ -541,11 +487,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) @@ -558,15 +502,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) } @@ -574,7 +515,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) } @@ -582,11 +524,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) @@ -599,15 +539,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) } @@ -628,11 +565,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) @@ -645,15 +580,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) } @@ -661,7 +593,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) } @@ -669,11 +602,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) @@ -686,15 +617,12 @@ 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) } @@ -899,32 +827,27 @@ 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") } @@ -1716,7 +1639,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 @@ -1999,11 +1921,9 @@ func (m *MsgClearAdminResponse) 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 @@ -2156,7 +2076,6 @@ func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2260,7 +2179,6 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2494,7 +2412,6 @@ func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2782,7 +2699,6 @@ func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2899,7 +2815,6 @@ func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3016,7 +2931,6 @@ func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3199,7 +3113,6 @@ func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3284,7 +3197,6 @@ func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3452,7 +3364,6 @@ func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3537,7 +3448,6 @@ func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3684,7 +3594,6 @@ func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3735,7 +3644,6 @@ func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3850,7 +3758,6 @@ func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { } return nil } - func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3901,7 +3808,6 @@ func (m *MsgClearAdminResponse) 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.pb.go b/x/wasm/types/types.pb.go index 7b41c98394..e31d2eefc7 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -6,24 +6,20 @@ package types import ( bytes "bytes" 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/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" + 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 - _ = math.Inf -) +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. @@ -115,11 +111,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) @@ -132,15 +126,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) } @@ -162,11 +153,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) @@ -179,15 +168,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) } @@ -205,11 +191,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) @@ -222,15 +206,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) } @@ -253,11 +234,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) @@ -270,15 +249,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) } @@ -296,8 +272,6 @@ type ContractInfo struct { // Label is optional metadata to be stored with a contract instance. Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` // Created Tx position when the contract was instantiated. - // This data should kept internal and not be exposed via query results. Just - // use for sorting Created *AbsoluteTxPosition `protobuf:"bytes,5,opt,name=created,proto3" json:"created,omitempty"` IBCPortID string `protobuf:"bytes,6,opt,name=ibc_port_id,json=ibcPortId,proto3" json:"ibc_port_id,omitempty"` // Extension is an extension point to store custom metadata within the @@ -311,11 +285,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) @@ -328,15 +300,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) } @@ -359,11 +328,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) @@ -376,15 +343,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) } @@ -407,11 +371,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) @@ -424,15 +386,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) } @@ -453,11 +412,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) @@ -470,15 +427,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) } @@ -602,7 +556,6 @@ func (this *AccessTypeParam) Equal(that interface{}) bool { } return true } - func (this *AccessConfig) Equal(that interface{}) bool { if that == nil { return this == nil @@ -638,7 +591,6 @@ func (this *AccessConfig) Equal(that interface{}) bool { } return true } - func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -666,7 +618,6 @@ func (this *Params) Equal(that interface{}) bool { } return true } - func (this *CodeInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -697,7 +648,6 @@ func (this *CodeInfo) Equal(that interface{}) bool { } return true } - func (this *ContractInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -740,7 +690,6 @@ func (this *ContractInfo) Equal(that interface{}) bool { } return true } - func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { if that == nil { return this == nil @@ -774,7 +723,6 @@ func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { } return true } - func (this *AbsoluteTxPosition) Equal(that interface{}) bool { if that == nil { return this == nil @@ -802,7 +750,6 @@ func (this *AbsoluteTxPosition) Equal(that interface{}) bool { } return true } - func (this *Model) Equal(that interface{}) bool { if that == nil { return this == nil @@ -830,7 +777,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) @@ -1201,7 +1147,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 @@ -1363,11 +1308,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 @@ -1437,7 +1380,6 @@ func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { } return nil } - func (m *AccessConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1571,7 +1513,6 @@ func (m *AccessConfig) Unmarshal(dAtA []byte) error { } return nil } - func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1674,7 +1615,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } - func (m *CodeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1824,7 +1764,6 @@ func (m *CodeInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2094,7 +2033,6 @@ func (m *ContractInfo) Unmarshal(dAtA []byte) error { } return nil } - func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2253,7 +2191,6 @@ func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { } return nil } - func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2342,7 +2279,6 @@ func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { } return nil } - func (m *Model) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2461,7 +2397,6 @@ func (m *Model) Unmarshal(dAtA []byte) error { } return nil } - func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 0ed5264edca734c73228803307ce21d87beb72c2 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 9 Nov 2022 10:34:39 +0100 Subject: [PATCH 5/7] Make proto-all only --- proto/cosmwasm/wasm/v1/genesis.proto | 3 +- x/wasm/types/genesis.pb.go | 51 +++++++- x/wasm/types/ibc.pb.go | 27 ++++- x/wasm/types/proposal.pb.go | 94 ++++++++++++++- x/wasm/types/query.pb.go | 173 +++++++++++++++++++++++++-- x/wasm/types/query.pb.gw.go | 85 +++---------- x/wasm/types/tx.pb.go | 116 ++++++++++++++++-- x/wasm/types/types.pb.go | 73 ++++++++++- 8 files changed, 513 insertions(+), 109 deletions(-) diff --git a/proto/cosmwasm/wasm/v1/genesis.proto b/proto/cosmwasm/wasm/v1/genesis.proto index 47c1526942..b7622c206a 100644 --- a/proto/cosmwasm/wasm/v1/genesis.proto +++ b/proto/cosmwasm/wasm/v1/genesis.proto @@ -53,7 +53,8 @@ message Contract { string contract_address = 1; ContractInfo contract_info = 2 [ (gogoproto.nullable) = false ]; repeated Model contract_state = 3 [ (gogoproto.nullable) = false ]; - repeated ContractCodeHistoryEntry contract_code_history = 4 [ (gogoproto.nullable) = false ]; + repeated ContractCodeHistoryEntry contract_code_history = 4 + [ (gogoproto.nullable) = false ]; } // Sequence key and value of an id generation counter diff --git a/x/wasm/types/genesis.pb.go b/x/wasm/types/genesis.pb.go index 37283caece..3f7037985a 100644 --- a/x/wasm/types/genesis.pb.go +++ b/x/wasm/types/genesis.pb.go @@ -5,17 +5,21 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf + +var ( + _ = fmt.Errorf + _ = 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. @@ -38,9 +42,11 @@ 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) @@ -53,12 +59,15 @@ 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) } @@ -118,9 +127,11 @@ func (*GenesisState_GenMsgs) ProtoMessage() {} func (*GenesisState_GenMsgs) Descriptor() ([]byte, []int) { return fileDescriptor_2ab3f539b23472a6, []int{0, 0} } + func (m *GenesisState_GenMsgs) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *GenesisState_GenMsgs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState_GenMsgs.Marshal(b, m, deterministic) @@ -133,12 +144,15 @@ func (m *GenesisState_GenMsgs) XXX_Marshal(b []byte, deterministic bool) ([]byte return b[:n], nil } } + func (m *GenesisState_GenMsgs) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState_GenMsgs.Merge(m, src) } + func (m *GenesisState_GenMsgs) XXX_Size() int { return m.Size() } + func (m *GenesisState_GenMsgs) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState_GenMsgs.DiscardUnknown(m) } @@ -217,9 +231,11 @@ 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) @@ -232,12 +248,15 @@ 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) } @@ -286,9 +305,11 @@ 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) @@ -301,12 +322,15 @@ 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) } @@ -353,9 +377,11 @@ 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) @@ -368,12 +394,15 @@ 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) } @@ -593,6 +622,7 @@ func (m *GenesisState_GenMsgs_StoreCode) MarshalToSizedBuffer(dAtA []byte) (int, } return len(dAtA) - i, nil } + func (m *GenesisState_GenMsgs_InstantiateContract) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -614,6 +644,7 @@ func (m *GenesisState_GenMsgs_InstantiateContract) MarshalToSizedBuffer(dAtA []b } return len(dAtA) - i, nil } + func (m *GenesisState_GenMsgs_ExecuteContract) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) @@ -635,6 +666,7 @@ func (m *GenesisState_GenMsgs_ExecuteContract) MarshalToSizedBuffer(dAtA []byte) } return len(dAtA) - i, nil } + func (m *Code) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -804,6 +836,7 @@ 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 @@ -863,6 +896,7 @@ func (m *GenesisState_GenMsgs_StoreCode) Size() (n int) { } return n } + func (m *GenesisState_GenMsgs_InstantiateContract) Size() (n int) { if m == nil { return 0 @@ -875,6 +909,7 @@ func (m *GenesisState_GenMsgs_InstantiateContract) Size() (n int) { } return n } + func (m *GenesisState_GenMsgs_ExecuteContract) Size() (n int) { if m == nil { return 0 @@ -887,6 +922,7 @@ func (m *GenesisState_GenMsgs_ExecuteContract) Size() (n int) { } return n } + func (m *Code) Size() (n int) { if m == nil { return 0 @@ -954,9 +990,11 @@ 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 @@ -1176,6 +1214,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } + func (m *GenesisState_GenMsgs) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1331,6 +1370,7 @@ func (m *GenesisState_GenMsgs) Unmarshal(dAtA []byte) error { } return nil } + func (m *Code) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1487,6 +1527,7 @@ func (m *Code) Unmarshal(dAtA []byte) error { } return nil } + func (m *Contract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1670,6 +1711,7 @@ func (m *Contract) Unmarshal(dAtA []byte) error { } return nil } + func (m *Sequence) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1773,6 +1815,7 @@ 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 f424271d5f..bedc1954ab 100644 --- a/x/wasm/types/ibc.pb.go +++ b/x/wasm/types/ibc.pb.go @@ -5,17 +5,21 @@ package types import ( fmt "fmt" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/gogo/protobuf/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf + +var ( + _ = fmt.Errorf + _ = 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,9 +48,11 @@ 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) @@ -59,12 +65,15 @@ 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) } @@ -82,9 +91,11 @@ func (*MsgIBCCloseChannel) ProtoMessage() {} func (*MsgIBCCloseChannel) Descriptor() ([]byte, []int) { return fileDescriptor_af0d1c43ea53c4b9, []int{1} } + 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) @@ -97,12 +108,15 @@ 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) } @@ -227,6 +241,7 @@ 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 @@ -266,9 +281,11 @@ 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 @@ -423,6 +440,7 @@ func (m *MsgIBCSend) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgIBCCloseChannel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -505,6 +523,7 @@ 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/proposal.pb.go b/x/wasm/types/proposal.pb.go index 3318ee70a8..0e87ce5fca 100644 --- a/x/wasm/types/proposal.pb.go +++ b/x/wasm/types/proposal.pb.go @@ -6,19 +6,23 @@ package types import ( bytes "bytes" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/gogo/protobuf/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 + +var ( + _ = fmt.Errorf + _ = 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,9 +51,11 @@ func (*StoreCodeProposal) ProtoMessage() {} func (*StoreCodeProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []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) @@ -62,12 +68,15 @@ func (m *StoreCodeProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, e 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) } @@ -100,9 +109,11 @@ func (*InstantiateContractProposal) ProtoMessage() {} func (*InstantiateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []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) @@ -115,12 +126,15 @@ func (m *InstantiateContractProposal) XXX_Marshal(b []byte, deterministic bool) 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) } @@ -146,9 +160,11 @@ func (*MigrateContractProposal) ProtoMessage() {} func (*MigrateContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{2} } + 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) @@ -161,12 +177,15 @@ func (m *MigrateContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b 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) } @@ -190,9 +209,11 @@ func (*SudoContractProposal) ProtoMessage() {} func (*SudoContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{3} } + 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) @@ -205,12 +226,15 @@ func (m *SudoContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte 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) } @@ -239,9 +263,11 @@ func (*ExecuteContractProposal) ProtoMessage() {} func (*ExecuteContractProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{4} } + 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) @@ -254,12 +280,15 @@ func (m *ExecuteContractProposal) XXX_Marshal(b []byte, deterministic bool) ([]b 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) } @@ -283,9 +312,11 @@ func (*UpdateAdminProposal) ProtoMessage() {} func (*UpdateAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{5} } + 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) @@ -298,12 +329,15 @@ func (m *UpdateAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -326,9 +360,11 @@ func (*ClearAdminProposal) ProtoMessage() {} func (*ClearAdminProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{6} } + 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) @@ -341,12 +377,15 @@ func (m *ClearAdminProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -369,9 +408,11 @@ func (*PinCodesProposal) ProtoMessage() {} func (*PinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{7} } + 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) @@ -384,12 +425,15 @@ func (m *PinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, er 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) } @@ -412,9 +456,11 @@ func (*UnpinCodesProposal) ProtoMessage() {} func (*UnpinCodesProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{8} } + 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) @@ -427,12 +473,15 @@ func (m *UnpinCodesProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -453,9 +502,11 @@ func (*AccessConfigUpdate) ProtoMessage() {} func (*AccessConfigUpdate) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{9} } + 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) @@ -468,12 +519,15 @@ func (m *AccessConfigUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, 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) } @@ -497,9 +551,11 @@ func (*UpdateInstantiateConfigProposal) ProtoMessage() {} func (*UpdateInstantiateConfigProposal) Descriptor() ([]byte, []int) { return fileDescriptor_be6422d717c730cb, []int{10} } + 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) @@ -512,12 +568,15 @@ func (m *UpdateInstantiateConfigProposal) XXX_Marshal(b []byte, deterministic bo 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) } @@ -636,6 +695,7 @@ func (this *StoreCodeProposal) Equal(that interface{}) bool { } return true } + func (this *InstantiateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -686,6 +746,7 @@ func (this *InstantiateContractProposal) Equal(that interface{}) bool { } return true } + func (this *MigrateContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -722,6 +783,7 @@ func (this *MigrateContractProposal) Equal(that interface{}) bool { } return true } + func (this *SudoContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -755,6 +817,7 @@ func (this *SudoContractProposal) Equal(that interface{}) bool { } return true } + func (this *ExecuteContractProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -799,6 +862,7 @@ func (this *ExecuteContractProposal) Equal(that interface{}) bool { } return true } + func (this *UpdateAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -832,6 +896,7 @@ func (this *UpdateAdminProposal) Equal(that interface{}) bool { } return true } + func (this *ClearAdminProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -862,6 +927,7 @@ func (this *ClearAdminProposal) Equal(that interface{}) bool { } return true } + func (this *PinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -897,6 +963,7 @@ func (this *PinCodesProposal) Equal(that interface{}) bool { } return true } + func (this *UnpinCodesProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -932,6 +999,7 @@ func (this *UnpinCodesProposal) Equal(that interface{}) bool { } return true } + func (this *AccessConfigUpdate) Equal(that interface{}) bool { if that == nil { return this == nil @@ -959,6 +1027,7 @@ func (this *AccessConfigUpdate) Equal(that interface{}) bool { } return true } + func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { if that == nil { return this == nil @@ -994,6 +1063,7 @@ func (this *UpdateInstantiateConfigProposal) Equal(that interface{}) bool { } return true } + func (m *StoreCodeProposal) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1635,6 +1705,7 @@ func encodeVarintProposal(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *StoreCodeProposal) Size() (n int) { if m == nil { return 0 @@ -1931,9 +2002,11 @@ func (m *UpdateInstantiateConfigProposal) Size() (n int) { func sovProposal(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozProposal(x uint64) (n int) { return sovProposal(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2170,6 +2243,7 @@ func (m *StoreCodeProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2467,6 +2541,7 @@ func (m *InstantiateContractProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2666,6 +2741,7 @@ func (m *MigrateContractProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2846,6 +2922,7 @@ func (m *SudoContractProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3092,6 +3169,7 @@ func (m *ExecuteContractProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3270,6 +3348,7 @@ func (m *UpdateAdminProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3416,6 +3495,7 @@ func (m *ClearAdminProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3606,6 +3686,7 @@ func (m *PinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3796,6 +3877,7 @@ func (m *UnpinCodesProposal) Unmarshal(dAtA []byte) error { } return nil } + func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3898,6 +3980,7 @@ func (m *AccessConfigUpdate) Unmarshal(dAtA []byte) error { } return nil } + func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4046,6 +4129,7 @@ func (m *UpdateInstantiateConfigProposal) Unmarshal(dAtA []byte) error { } return nil } + func skipProposal(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index dafa74a5f2..bb08b7571c 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -7,6 +7,10 @@ import ( bytes "bytes" context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" @@ -16,15 +20,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 -var _ = fmt.Errorf -var _ = math.Inf + +var ( + _ = fmt.Errorf + _ = 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. @@ -45,9 +49,11 @@ 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) @@ -60,12 +66,15 @@ 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) } @@ -86,9 +95,11 @@ 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) @@ -101,12 +112,15 @@ 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) } @@ -128,9 +142,11 @@ 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) @@ -143,12 +159,15 @@ 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) } @@ -169,9 +188,11 @@ 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) @@ -184,12 +205,15 @@ 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) } @@ -210,9 +234,11 @@ 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) @@ -225,12 +251,15 @@ 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) } @@ -252,9 +281,11 @@ 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) @@ -267,12 +298,15 @@ 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) } @@ -294,9 +328,11 @@ 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) @@ -309,12 +345,15 @@ 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) } @@ -335,9 +374,11 @@ 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) @@ -350,12 +391,15 @@ 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) } @@ -376,9 +420,11 @@ 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) @@ -391,12 +437,15 @@ 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) } @@ -416,9 +465,11 @@ 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) @@ -431,12 +482,15 @@ 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) } @@ -458,9 +512,11 @@ 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) @@ -473,12 +529,15 @@ 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) } @@ -498,9 +557,11 @@ 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) @@ -513,12 +574,15 @@ 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) } @@ -536,9 +600,11 @@ 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) @@ -551,12 +617,15 @@ 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) } @@ -577,9 +646,11 @@ 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) @@ -592,12 +663,15 @@ 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) } @@ -616,9 +690,11 @@ 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) @@ -631,12 +707,15 @@ 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) } @@ -655,9 +734,11 @@ 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) @@ -670,12 +751,15 @@ 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) } @@ -695,9 +779,11 @@ 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) @@ -710,12 +796,15 @@ 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) } @@ -735,9 +824,11 @@ 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) @@ -750,12 +841,15 @@ 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) } @@ -776,9 +870,11 @@ 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) @@ -791,12 +887,15 @@ 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) } @@ -804,8 +903,7 @@ 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) } @@ -813,9 +911,11 @@ 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) @@ -828,12 +928,15 @@ 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) } @@ -852,9 +955,11 @@ 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) @@ -867,12 +972,15 @@ 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) } @@ -894,9 +1002,11 @@ 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) @@ -909,12 +1019,15 @@ 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) } @@ -936,9 +1049,11 @@ 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) @@ -951,12 +1066,15 @@ 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) } @@ -1106,6 +1224,7 @@ func (this *QueryContractInfoResponse) Equal(that interface{}) bool { } return true } + func (this *CodeInfoResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1139,6 +1258,7 @@ func (this *CodeInfoResponse) Equal(that interface{}) bool { } return true } + func (this *QueryCodeResponse) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1337,39 +1457,48 @@ 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") } @@ -2546,6 +2675,7 @@ 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 @@ -2916,9 +3046,11 @@ 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 @@ -3001,6 +3133,7 @@ func (m *QueryContractInfoRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3116,6 +3249,7 @@ func (m *QueryContractInfoResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3234,6 +3368,7 @@ func (m *QueryContractHistoryRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3354,6 +3489,7 @@ func (m *QueryContractHistoryResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3459,6 +3595,7 @@ func (m *QueryContractsByCodeRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3577,6 +3714,7 @@ func (m *QueryContractsByCodeResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3695,6 +3833,7 @@ func (m *QueryAllContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3815,6 +3954,7 @@ func (m *QueryAllContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3931,6 +4071,7 @@ func (m *QueryRawContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4015,6 +4156,7 @@ func (m *QueryRawContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4131,6 +4273,7 @@ func (m *QuerySmartContractStateRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4215,6 +4358,7 @@ func (m *QuerySmartContractStateResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4284,6 +4428,7 @@ func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4452,6 +4597,7 @@ func (m *CodeInfoResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4572,6 +4718,7 @@ func (m *QueryCodeResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4658,6 +4805,7 @@ func (m *QueryCodesRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4778,6 +4926,7 @@ func (m *QueryCodesResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -4864,6 +5013,7 @@ func (m *QueryPinnedCodesRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5026,6 +5176,7 @@ func (m *QueryPinnedCodesResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5076,6 +5227,7 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5159,6 +5311,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5277,6 +5430,7 @@ func (m *QueryContractsByCreatorRequest) Unmarshal(dAtA []byte) error { } return nil } + func (m *QueryContractsByCreatorResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -5395,6 +5549,7 @@ 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 696252ab02..4bffee3d7c 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -26,12 +26,15 @@ import ( // Suppress "imported and not used" errors var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage -var _ = metadata.Join + +var ( + _ io.Reader + _ status.Status + _ = runtime.String + _ = utilities.NewDoubleArray + _ = descriptor.ForMessage + _ = 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 @@ -57,7 +60,6 @@ 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) { @@ -84,12 +86,9 @@ 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 @@ -122,7 +121,6 @@ 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) { @@ -156,12 +154,9 @@ 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 @@ -194,7 +189,6 @@ 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) { @@ -228,12 +222,9 @@ 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 @@ -266,7 +257,6 @@ 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) { @@ -300,7 +290,6 @@ 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) { @@ -338,7 +327,6 @@ 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) { @@ -376,7 +364,6 @@ 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) { @@ -414,7 +401,6 @@ 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) { @@ -452,7 +438,6 @@ 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) { @@ -479,7 +464,6 @@ 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) { @@ -506,12 +490,9 @@ 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 @@ -526,7 +507,6 @@ 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) { @@ -542,12 +522,9 @@ 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 @@ -562,7 +539,6 @@ 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) { @@ -578,7 +554,6 @@ 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) { @@ -587,7 +562,6 @@ 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) { @@ -596,12 +570,9 @@ 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 @@ -634,7 +605,6 @@ 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) { @@ -668,7 +638,6 @@ 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". @@ -676,7 +645,6 @@ 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() @@ -697,7 +665,6 @@ 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) { @@ -720,7 +687,6 @@ 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) { @@ -743,7 +709,6 @@ 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) { @@ -766,7 +731,6 @@ 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) { @@ -789,7 +753,6 @@ 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) { @@ -812,7 +775,6 @@ 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) { @@ -835,7 +797,6 @@ 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) { @@ -858,7 +819,6 @@ 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) { @@ -881,7 +841,6 @@ 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) { @@ -904,7 +863,6 @@ 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) { @@ -927,7 +885,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv } forward_Query_ContractsByCreator_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - }) return nil @@ -970,7 +927,6 @@ 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() @@ -988,7 +944,6 @@ 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) { @@ -1008,7 +963,6 @@ 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) { @@ -1028,7 +982,6 @@ 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) { @@ -1048,7 +1001,6 @@ 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) { @@ -1068,7 +1020,6 @@ 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) { @@ -1088,7 +1039,6 @@ 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) { @@ -1108,7 +1058,6 @@ 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) { @@ -1128,7 +1077,6 @@ 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) { @@ -1148,7 +1096,6 @@ 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) { @@ -1168,7 +1115,6 @@ 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) { @@ -1188,7 +1134,6 @@ 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.pb.go b/x/wasm/types/tx.pb.go index a47e283e9a..f81b1106e0 100644 --- a/x/wasm/types/tx.pb.go +++ b/x/wasm/types/tx.pb.go @@ -6,6 +6,10 @@ package types import ( context "context" fmt "fmt" + io "io" + math "math" + math_bits "math/bits" + github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" @@ -14,15 +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 -var _ = fmt.Errorf -var _ = math.Inf + +var ( + _ = fmt.Errorf + _ = 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,9 +51,11 @@ 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) @@ -62,12 +68,15 @@ 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) } @@ -88,9 +97,11 @@ 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) @@ -103,12 +114,15 @@ 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) } @@ -138,9 +152,11 @@ 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) @@ -153,12 +169,15 @@ 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) } @@ -193,9 +212,11 @@ func (*MsgInstantiateContract2) ProtoMessage() {} func (*MsgInstantiateContract2) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{3} } + 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) @@ -208,12 +229,15 @@ 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) } @@ -234,9 +258,11 @@ func (*MsgInstantiateContractResponse) ProtoMessage() {} func (*MsgInstantiateContractResponse) Descriptor() ([]byte, []int) { return fileDescriptor_4f74d82755520264, []int{4} } + 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) @@ -249,12 +275,15 @@ 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) } @@ -275,9 +304,11 @@ 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) @@ -290,12 +321,15 @@ 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) } @@ -320,9 +354,11 @@ 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) @@ -335,12 +371,15 @@ 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) } @@ -359,9 +398,11 @@ 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) @@ -374,12 +415,15 @@ 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) } @@ -404,9 +448,11 @@ 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) @@ -419,12 +465,15 @@ 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) } @@ -444,9 +493,11 @@ 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) @@ -459,12 +510,15 @@ 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) } @@ -487,9 +541,11 @@ 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) @@ -502,12 +558,15 @@ 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) } @@ -515,8 +574,7 @@ 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) } @@ -524,9 +582,11 @@ 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) @@ -539,12 +599,15 @@ 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) } @@ -565,9 +628,11 @@ 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) @@ -580,12 +645,15 @@ 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) } @@ -593,8 +661,7 @@ 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) } @@ -602,9 +669,11 @@ 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) @@ -617,12 +686,15 @@ 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) } @@ -827,27 +899,32 @@ 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") } @@ -1639,6 +1716,7 @@ 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 @@ -1921,9 +1999,11 @@ func (m *MsgClearAdminResponse) 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 @@ -2076,6 +2156,7 @@ func (m *MsgStoreCode) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2179,6 +2260,7 @@ func (m *MsgStoreCodeResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2412,6 +2494,7 @@ func (m *MsgInstantiateContract) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2699,6 +2782,7 @@ func (m *MsgInstantiateContract2) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2815,6 +2899,7 @@ func (m *MsgInstantiateContractResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2931,6 +3016,7 @@ func (m *MsgInstantiateContract2Response) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3113,6 +3199,7 @@ func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3197,6 +3284,7 @@ func (m *MsgExecuteContractResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3364,6 +3452,7 @@ func (m *MsgMigrateContract) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3448,6 +3537,7 @@ func (m *MsgMigrateContractResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3594,6 +3684,7 @@ func (m *MsgUpdateAdmin) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3644,6 +3735,7 @@ func (m *MsgUpdateAdminResponse) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3758,6 +3850,7 @@ func (m *MsgClearAdmin) Unmarshal(dAtA []byte) error { } return nil } + func (m *MsgClearAdminResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3808,6 +3901,7 @@ func (m *MsgClearAdminResponse) 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.pb.go b/x/wasm/types/types.pb.go index e31d2eefc7..d53952253e 100644 --- a/x/wasm/types/types.pb.go +++ b/x/wasm/types/types.pb.go @@ -6,20 +6,24 @@ package types import ( bytes "bytes" 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/gogoproto/gogoproto" proto "github.com/gogo/protobuf/proto" github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" - 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 + +var ( + _ = fmt.Errorf + _ = 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. @@ -111,9 +115,11 @@ 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) @@ -126,12 +132,15 @@ 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) } @@ -153,9 +162,11 @@ 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) @@ -168,12 +179,15 @@ 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) } @@ -191,9 +205,11 @@ 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) @@ -206,12 +222,15 @@ 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) } @@ -234,9 +253,11 @@ 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) @@ -249,12 +270,15 @@ 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) } @@ -285,9 +309,11 @@ 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) @@ -300,12 +326,15 @@ 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) } @@ -328,9 +357,11 @@ 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) @@ -343,12 +374,15 @@ 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) } @@ -371,9 +405,11 @@ 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) @@ -386,12 +422,15 @@ 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) } @@ -412,9 +451,11 @@ 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) @@ -427,12 +468,15 @@ 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) } @@ -556,6 +600,7 @@ func (this *AccessTypeParam) Equal(that interface{}) bool { } return true } + func (this *AccessConfig) Equal(that interface{}) bool { if that == nil { return this == nil @@ -591,6 +636,7 @@ func (this *AccessConfig) Equal(that interface{}) bool { } return true } + func (this *Params) Equal(that interface{}) bool { if that == nil { return this == nil @@ -618,6 +664,7 @@ func (this *Params) Equal(that interface{}) bool { } return true } + func (this *CodeInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -648,6 +695,7 @@ func (this *CodeInfo) Equal(that interface{}) bool { } return true } + func (this *ContractInfo) Equal(that interface{}) bool { if that == nil { return this == nil @@ -690,6 +738,7 @@ func (this *ContractInfo) Equal(that interface{}) bool { } return true } + func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { if that == nil { return this == nil @@ -723,6 +772,7 @@ func (this *ContractCodeHistoryEntry) Equal(that interface{}) bool { } return true } + func (this *AbsoluteTxPosition) Equal(that interface{}) bool { if that == nil { return this == nil @@ -750,6 +800,7 @@ func (this *AbsoluteTxPosition) Equal(that interface{}) bool { } return true } + func (this *Model) Equal(that interface{}) bool { if that == nil { return this == nil @@ -777,6 +828,7 @@ func (this *Model) Equal(that interface{}) bool { } return true } + func (m *AccessTypeParam) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1147,6 +1199,7 @@ 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 @@ -1308,9 +1361,11 @@ 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 @@ -1380,6 +1435,7 @@ func (m *AccessTypeParam) Unmarshal(dAtA []byte) error { } return nil } + func (m *AccessConfig) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1513,6 +1569,7 @@ func (m *AccessConfig) Unmarshal(dAtA []byte) error { } return nil } + func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1615,6 +1672,7 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } + func (m *CodeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1764,6 +1822,7 @@ func (m *CodeInfo) Unmarshal(dAtA []byte) error { } return nil } + func (m *ContractInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2033,6 +2092,7 @@ func (m *ContractInfo) Unmarshal(dAtA []byte) error { } return nil } + func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2191,6 +2251,7 @@ func (m *ContractCodeHistoryEntry) Unmarshal(dAtA []byte) error { } return nil } + func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2279,6 +2340,7 @@ func (m *AbsoluteTxPosition) Unmarshal(dAtA []byte) error { } return nil } + func (m *Model) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2397,6 +2459,7 @@ func (m *Model) Unmarshal(dAtA []byte) error { } return nil } + func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 From 8422d17c4708c61e0a1ae9e066f0b2893470233d Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 9 Nov 2022 10:55:36 +0100 Subject: [PATCH 6/7] Remove ResetFromGenesis --- x/wasm/keeper/proposal_integration_test.go | 18 +++++++++++------- x/wasm/types/types.go | 9 --------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/x/wasm/keeper/proposal_integration_test.go b/x/wasm/keeper/proposal_integration_test.go index 206782e2d2..1327ba88e3 100644 --- a/x/wasm/keeper/proposal_integration_test.go +++ b/x/wasm/keeper/proposal_integration_test.go @@ -231,18 +231,18 @@ func TestMigrateProposal(t *testing.T) { contractAddr = BuildContractAddressClassic(1, 1) ) - contractInfoFixture := types.ContractInfoFixture(func(c *types.ContractInfo) { + contractInfo := types.ContractInfoFixture(func(c *types.ContractInfo) { c.Label = "testing" c.Admin = anyAddress.String() c.Created = types.NewAbsoluteTxPosition(ctx) }) entries := []types.ContractCodeHistoryEntry{ - contractInfoFixture.ResetFromGenesis(ctx), + {Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: 1, Updated: contractInfo.Created}, } key, err := hex.DecodeString("636F6E666967") require.NoError(t, err) m := types.Model{Key: key, Value: []byte(`{"verifier":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","beneficiary":"AAAAAAAAAAAAAAAAAAAAAAAAAAA=","funder":"AQEBAQEBAQEBAQEBAQEBAQEBAQE="}`)} - require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &contractInfoFixture, []types.Model{m}, entries)) + require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &contractInfo, []types.Model{m}, entries)) migMsg := struct { Verifier sdk.AccAddress `json:"verifier"` @@ -277,7 +277,7 @@ func TestMigrateProposal(t *testing.T) { assert.Equal(t, anyAddress.String(), cInfo.Admin) assert.Equal(t, "testing", cInfo.Label) expHistory := []types.ContractCodeHistoryEntry{{ - Operation: types.ContractCodeHistoryOperationTypeGenesis, + Operation: types.ContractCodeHistoryOperationTypeInit, CodeID: firstCodeID, Updated: types.NewAbsoluteTxPosition(ctx), }, { @@ -473,11 +473,15 @@ func TestAdminProposals(t *testing.T) { InstantiateDefaultPermission: types.AccessTypeNobody, }) - codeInfoFixture := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) - require.NoError(t, wasmKeeper.importCode(ctx, 1, codeInfoFixture, wasmCode)) + codeInfo := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) + require.NoError(t, wasmKeeper.importCode(ctx, 1, codeInfo, wasmCode)) entries := []types.ContractCodeHistoryEntry{ - spec.state.ResetFromGenesis(ctx), + { + Operation: types.ContractCodeHistoryOperationTypeInit, + CodeID: 1, + Updated: spec.state.Created, + }, } require.NoError(t, wasmKeeper.importContract(ctx, contractAddr, &spec.state, []types.Model{}, entries)) diff --git a/x/wasm/types/types.go b/x/wasm/types/types.go index 7aea59ef29..a88cfa1994 100644 --- a/x/wasm/types/types.go +++ b/x/wasm/types/types.go @@ -171,15 +171,6 @@ func (c *ContractInfo) AddMigration(ctx sdk.Context, codeID uint64, msg []byte) return h } -// ResetFromGenesis resets contracts timestamp and history. -func (c *ContractInfo) ResetFromGenesis(ctx sdk.Context) ContractCodeHistoryEntry { - return ContractCodeHistoryEntry{ - Operation: ContractCodeHistoryOperationTypeGenesis, - CodeID: c.CodeID, - Updated: c.Created, - } -} - // AdminAddr convert into sdk.AccAddress or nil when not set func (c *ContractInfo) AdminAddr() sdk.AccAddress { if c.Admin == "" { From a1b63bf1f967fed31f5d1b947594c9a9690b4a58 Mon Sep 17 00:00:00 2001 From: Alex Peters Date: Wed, 9 Nov 2022 11:55:26 +0100 Subject: [PATCH 7/7] Add validation --- x/wasm/client/cli/genesis_msg_test.go | 12 +++++++++ x/wasm/keeper/genesis_test.go | 18 ++++++++++--- x/wasm/types/genesis.go | 8 ++++++ x/wasm/types/genesis_test.go | 6 +++++ x/wasm/types/test_fixtures.go | 17 ++++++++++++ x/wasm/types/types.go | 21 +++++++++++++++ x/wasm/types/types_test.go | 39 +++++++++++++++++++++++++++ 7 files changed, 118 insertions(+), 3 deletions(-) diff --git a/x/wasm/client/cli/genesis_msg_test.go b/x/wasm/client/cli/genesis_msg_test.go index 614d895a90..cd8a5f3b7b 100644 --- a/x/wasm/client/cli/genesis_msg_test.go +++ b/x/wasm/client/cli/genesis_msg_test.go @@ -393,6 +393,9 @@ func TestExecuteContractCmd(t *testing.T) { ContractAddress: firstContractAddress, ContractInfo: types.ContractInfoFixture(), ContractState: []types.Model{}, + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + types.ContractCodeHistoryEntryFixture(), + }, }, }, }, @@ -473,6 +476,9 @@ func TestExecuteContractCmd(t *testing.T) { ContractAddress: firstContractAddress, ContractInfo: types.ContractInfoFixture(), ContractState: []types.Model{}, + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + types.ContractCodeHistoryEntryFixture(), + }, }, }, }, @@ -498,6 +504,9 @@ func TestExecuteContractCmd(t *testing.T) { ContractAddress: firstContractAddress, ContractInfo: types.ContractInfoFixture(), ContractState: []types.Model{}, + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + types.ContractCodeHistoryEntryFixture(), + }, }, }, }, @@ -524,6 +533,9 @@ func TestExecuteContractCmd(t *testing.T) { ContractAddress: firstContractAddress, ContractInfo: types.ContractInfoFixture(), ContractState: []types.Model{}, + ContractCodeHistory: []types.ContractCodeHistoryEntry{ + types.ContractCodeHistoryEntryFixture(), + }, }, }, }, diff --git a/x/wasm/keeper/genesis_test.go b/x/wasm/keeper/genesis_test.go index 970f205187..beba80fe7d 100644 --- a/x/wasm/keeper/genesis_test.go +++ b/x/wasm/keeper/genesis_test.go @@ -266,6 +266,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{}`), }, }, }, @@ -294,6 +295,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{}`), }, }, }, { @@ -304,6 +306,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{"foo":"bar"}`), }, }, }, @@ -327,6 +330,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{"foo":"bar"}`), }, }, }, @@ -350,6 +354,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{"foo":"bar"}`), }, }, }, { @@ -360,6 +365,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{"other":"value"}`), }, }, }, @@ -393,6 +399,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{"foo":"bar"}`), }, }, }, @@ -438,6 +445,7 @@ func TestGenesisInit(t *testing.T) { Operation: types.ContractCodeHistoryOperationTypeMigrate, CodeID: 1, Updated: &types.AbsoluteTxPosition{BlockHeight: rand.Uint64(), TxIndex: rand.Uint64()}, + Msg: []byte(`{}`), }, }, }, @@ -503,7 +511,7 @@ func TestGenesisInit(t *testing.T) { } } -func TestImportContractWithCodeHistoryReset(t *testing.T) { +func TestImportContractWithCodeHistoryPreserved(t *testing.T) { genesisTemplate := ` { "params":{ @@ -546,7 +554,8 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { "updated": { "block_height" : "100", "tx_index" : "10" - } + }, + "msg": {"foo": "bar"} }, { "operation": "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE", @@ -554,7 +563,8 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { "updated": { "block_height" : "200", "tx_index" : "10" - } + }, + "msg": {"other": "msg"} } ] } @@ -628,6 +638,7 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { BlockHeight: 100, TxIndex: 10, }, + Msg: []byte(`{"foo": "bar"}`), }, { Operation: types.ContractCodeHistoryOperationTypeMigrate, @@ -636,6 +647,7 @@ func TestImportContractWithCodeHistoryReset(t *testing.T) { BlockHeight: 200, TxIndex: 10, }, + Msg: []byte(`{"other": "msg"}`), }, } assert.Equal(t, expHistory, keeper.GetContractHistory(ctx, contractAddr)) diff --git a/x/wasm/types/genesis.go b/x/wasm/types/genesis.go index eead8ff915..a82893bd90 100644 --- a/x/wasm/types/genesis.go +++ b/x/wasm/types/genesis.go @@ -69,6 +69,14 @@ func (c Contract) ValidateBasic() error { return sdkerrors.Wrapf(err, "contract state %d", i) } } + if len(c.ContractCodeHistory) == 0 { + return ErrEmpty.Wrap("code history") + } + for i, v := range c.ContractCodeHistory { + if err := v.ValidateBasic(); err != nil { + return sdkerrors.Wrapf(err, "code history element %d", i) + } + } return nil } diff --git a/x/wasm/types/genesis_test.go b/x/wasm/types/genesis_test.go index d801aba4c0..5ddcb20885 100644 --- a/x/wasm/types/genesis_test.go +++ b/x/wasm/types/genesis_test.go @@ -165,6 +165,12 @@ func TestContractValidateBasic(t *testing.T) { }, expError: true, }, + "contract history invalid": { + srcMutator: func(c *Contract) { + c.ContractCodeHistory = []ContractCodeHistoryEntry{{}} + }, + expError: true, + }, } for msg, spec := range specs { t.Run(msg, func(t *testing.T) { diff --git a/x/wasm/types/test_fixtures.go b/x/wasm/types/test_fixtures.go index 61665b6efe..22da3520d6 100644 --- a/x/wasm/types/test_fixtures.go +++ b/x/wasm/types/test_fixtures.go @@ -90,6 +90,9 @@ func ContractFixture(mutators ...func(*Contract)) Contract { ContractInfo: ContractInfoFixture(RandCreatedFields), ContractState: []Model{{Key: []byte("anyKey"), Value: []byte("anyValue")}}, } + fixture.ContractCodeHistory = []ContractCodeHistoryEntry{ContractCodeHistoryEntryFixture(func(e *ContractCodeHistoryEntry) { + e.Updated = fixture.ContractInfo.Created + })} for _, m := range mutators { m(&fixture) @@ -121,6 +124,20 @@ func ContractInfoFixture(mutators ...func(*ContractInfo)) ContractInfo { return fixture } +// ContractCodeHistoryEntryFixture test fixture +func ContractCodeHistoryEntryFixture(mutators ...func(*ContractCodeHistoryEntry)) ContractCodeHistoryEntry { + fixture := ContractCodeHistoryEntry{ + Operation: ContractCodeHistoryOperationTypeInit, + CodeID: 1, + Updated: ContractInfoFixture().Created, + Msg: []byte(`{"foo":"bar"}`), + } + for _, m := range mutators { + m(&fixture) + } + return fixture +} + func WithSHA256CodeHash(wasmCode []byte) func(info *CodeInfo) { return func(info *CodeInfo) { codeHash := sha256.Sum256(wasmCode) diff --git a/x/wasm/types/types.go b/x/wasm/types/types.go index a88cfa1994..4a0e198f03 100644 --- a/x/wasm/types/types.go +++ b/x/wasm/types/types.go @@ -243,6 +243,27 @@ func (a *AbsoluteTxPosition) Bytes() []byte { return r } +// ValidateBasic syntax checks +func (c ContractCodeHistoryEntry) ValidateBasic() error { + var found bool + for _, v := range AllCodeHistoryTypes { + if c.Operation == v { + found = true + break + } + } + if !found { + return ErrInvalid.Wrap("operation") + } + if c.CodeID == 0 { + return ErrEmpty.Wrap("code id") + } + if c.Updated == nil { + return ErrEmpty.Wrap("updated") + } + return sdkerrors.Wrap(c.Msg.ValidateBasic(), "msg") +} + // NewEnv initializes the environment for a contract instance func NewEnv(ctx sdk.Context, contractAddr sdk.AccAddress) wasmvmtypes.Env { // safety checks before casting below diff --git a/x/wasm/types/types_test.go b/x/wasm/types/types_test.go index be270ddeb3..25df828023 100644 --- a/x/wasm/types/types_test.go +++ b/x/wasm/types/types_test.go @@ -706,3 +706,42 @@ func TestAccessTypeSubset(t *testing.T) { }) } } + +func TestContractCodeHistoryEntryValidation(t *testing.T) { + specs := map[string]struct { + src ContractCodeHistoryEntry + expErr bool + }{ + "all good": { + src: ContractCodeHistoryEntryFixture(), + }, + "unknown operation": { + src: ContractCodeHistoryEntryFixture(func(entry *ContractCodeHistoryEntry) { + entry.Operation = 0 + }), + expErr: true, + }, + "empty code id": { + src: ContractCodeHistoryEntryFixture(func(entry *ContractCodeHistoryEntry) { + entry.CodeID = 0 + }), + expErr: true, + }, + "empty updated": { + src: ContractCodeHistoryEntryFixture(func(entry *ContractCodeHistoryEntry) { + entry.Updated = nil + }), + expErr: true, + }, + } + for name, spec := range specs { + t.Run(name, func(t *testing.T) { + gotErr := spec.src.ValidateBasic() + if spec.expErr { + require.Error(t, gotErr) + return + } + require.NoError(t, gotErr) + }) + } +}