From 3e269cf4cb374e84fa37d3d02e82afb5d478e390 Mon Sep 17 00:00:00 2001 From: Pino' Surace Date: Thu, 1 Aug 2024 18:05:36 +0200 Subject: [PATCH] Add CodeInfo rpc query --- docs/proto/proto-docs.md | 19 +- proto/cosmwasm/wasm/v1/query.proto | 13 +- x/wasm/client/cli/query.go | 9 +- x/wasm/keeper/querier.go | 39 ++- x/wasm/keeper/querier_test.go | 52 ++++ x/wasm/types/query.pb.go | 415 +++++++++++++++++++++-------- x/wasm/types/query.pb.gw.go | 117 ++++++++ 7 files changed, 539 insertions(+), 125 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 9dafeb1ec7..7e1f4263c1 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -63,6 +63,7 @@ - [QueryAllContractStateResponse](#cosmwasm.wasm.v1.QueryAllContractStateResponse) - [QueryBuildAddressRequest](#cosmwasm.wasm.v1.QueryBuildAddressRequest) - [QueryBuildAddressResponse](#cosmwasm.wasm.v1.QueryBuildAddressResponse) + - [QueryCodeInfoRequest](#cosmwasm.wasm.v1.QueryCodeInfoRequest) - [QueryCodeRequest](#cosmwasm.wasm.v1.QueryCodeRequest) - [QueryCodeResponse](#cosmwasm.wasm.v1.QueryCodeResponse) - [QueryCodesRequest](#cosmwasm.wasm.v1.QueryCodesRequest) @@ -1066,6 +1067,21 @@ method. + + +### QueryCodeInfoRequest +QueryCodeInfoRequest is the request type for the Query/Code RPC method + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `code_id` | [uint64](#uint64) | | grpc-gateway_out does not support Go style CodID | + + + + + + ### QueryCodeRequest @@ -1406,8 +1422,9 @@ Query provides defines the gRPC querier service | `AllContractState` | [QueryAllContractStateRequest](#cosmwasm.wasm.v1.QueryAllContractStateRequest) | [QueryAllContractStateResponse](#cosmwasm.wasm.v1.QueryAllContractStateResponse) | AllContractState gets all raw store data for a single contract | GET|/cosmwasm/wasm/v1/contract/{address}/state| | `RawContractState` | [QueryRawContractStateRequest](#cosmwasm.wasm.v1.QueryRawContractStateRequest) | [QueryRawContractStateResponse](#cosmwasm.wasm.v1.QueryRawContractStateResponse) | RawContractState gets single key from the raw store data of a contract | GET|/cosmwasm/wasm/v1/contract/{address}/raw/{query_data}| | `SmartContractState` | [QuerySmartContractStateRequest](#cosmwasm.wasm.v1.QuerySmartContractStateRequest) | [QuerySmartContractStateResponse](#cosmwasm.wasm.v1.QuerySmartContractStateResponse) | SmartContractState get smart query result from the contract | GET|/cosmwasm/wasm/v1/contract/{address}/smart/{query_data}| -| `Code` | [QueryCodeRequest](#cosmwasm.wasm.v1.QueryCodeRequest) | [QueryCodeResponse](#cosmwasm.wasm.v1.QueryCodeResponse) | Code gets the binary code and metadata for a singe wasm code | GET|/cosmwasm/wasm/v1/code/{code_id}| +| `Code` | [QueryCodeRequest](#cosmwasm.wasm.v1.QueryCodeRequest) | [QueryCodeResponse](#cosmwasm.wasm.v1.QueryCodeResponse) | Code gets the binary code and metadata for a single wasm code | GET|/cosmwasm/wasm/v1/code/{code_id}| | `Codes` | [QueryCodesRequest](#cosmwasm.wasm.v1.QueryCodesRequest) | [QueryCodesResponse](#cosmwasm.wasm.v1.QueryCodesResponse) | Codes gets the metadata for all stored wasm codes | GET|/cosmwasm/wasm/v1/code| +| `CodeInfo` | [QueryCodeInfoRequest](#cosmwasm.wasm.v1.QueryCodeInfoRequest) | [CodeInfoResponse](#cosmwasm.wasm.v1.CodeInfoResponse) | CodeInfo gets the metadata for a single wasm code | GET|/cosmwasm/wasm/v1/code-info/{code_id}| | `PinnedCodes` | [QueryPinnedCodesRequest](#cosmwasm.wasm.v1.QueryPinnedCodesRequest) | [QueryPinnedCodesResponse](#cosmwasm.wasm.v1.QueryPinnedCodesResponse) | PinnedCodes gets the pinned code ids | GET|/cosmwasm/wasm/v1/codes/pinned| | `Params` | [QueryParamsRequest](#cosmwasm.wasm.v1.QueryParamsRequest) | [QueryParamsResponse](#cosmwasm.wasm.v1.QueryParamsResponse) | Params gets the module params | GET|/cosmwasm/wasm/v1/codes/params| | `ContractsByCreator` | [QueryContractsByCreatorRequest](#cosmwasm.wasm.v1.QueryContractsByCreatorRequest) | [QueryContractsByCreatorResponse](#cosmwasm.wasm.v1.QueryContractsByCreatorResponse) | ContractsByCreator gets the contracts by creator | GET|/cosmwasm/wasm/v1/contracts/creator/{creator_address}| diff --git a/proto/cosmwasm/wasm/v1/query.proto b/proto/cosmwasm/wasm/v1/query.proto index 14b0c427d1..522398e5dc 100644 --- a/proto/cosmwasm/wasm/v1/query.proto +++ b/proto/cosmwasm/wasm/v1/query.proto @@ -54,7 +54,7 @@ service Query { option (google.api.http).get = "/cosmwasm/wasm/v1/contract/{address}/smart/{query_data}"; } - // Code gets the binary code and metadata for a singe wasm code + // Code gets the binary code and metadata for a single wasm code rpc Code(QueryCodeRequest) returns (QueryCodeResponse) { option (cosmos.query.v1.module_query_safe) = true; option (google.api.http).get = "/cosmwasm/wasm/v1/code/{code_id}"; @@ -65,6 +65,12 @@ service Query { option (google.api.http).get = "/cosmwasm/wasm/v1/code"; } + // CodeInfo gets the metadata for a single wasm code + rpc CodeInfo(QueryCodeInfoRequest) returns (CodeInfoResponse) { + option (cosmos.query.v1.module_query_safe) = true; + option (google.api.http).get = "/cosmwasm/wasm/v1/code-info/{code_id}"; + } + // PinnedCodes gets the pinned code ids rpc PinnedCodes(QueryPinnedCodesRequest) returns (QueryPinnedCodesResponse) { option (cosmos.query.v1.module_query_safe) = true; @@ -211,6 +217,11 @@ message QueryCodeRequest { uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID } +// QueryCodeInfoRequest is the request type for the Query/Code RPC method +message QueryCodeInfoRequest { + uint64 code_id = 1; // grpc-gateway_out does not support Go style CodID +} + // CodeInfoResponse contains code meta data from CodeInfo message CodeInfoResponse { option (gogoproto.equal) = true; diff --git a/x/wasm/client/cli/query.go b/x/wasm/client/cli/query.go index 89f6790327..4fa6e3120f 100644 --- a/x/wasm/client/cli/query.go +++ b/x/wasm/client/cli/query.go @@ -252,20 +252,17 @@ func GetCmdQueryCodeInfo() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - res, err := queryClient.Code( + res, err := queryClient.CodeInfo( context.Background(), - &types.QueryCodeRequest{ + &types.QueryCodeInfoRequest{ CodeId: codeID, }, ) if err != nil { return err } - if res.CodeInfoResponse == nil { - return fmt.Errorf("contract not found") - } - return clientCtx.PrintProto(res.CodeInfoResponse) + return clientCtx.PrintProto(res) }, SilenceUsage: true, } diff --git a/x/wasm/keeper/querier.go b/x/wasm/keeper/querier.go index 7e366f7b3c..fca956f925 100644 --- a/x/wasm/keeper/querier.go +++ b/x/wasm/keeper/querier.go @@ -285,6 +285,23 @@ func (q GrpcQuerier) Codes(c context.Context, req *types.QueryCodesRequest) (*ty return &types.QueryCodesResponse{CodeInfos: r, Pagination: pageRes}, nil } +func (q GrpcQuerier) CodeInfo(c context.Context, req *types.QueryCodeInfoRequest) (*types.CodeInfoResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + if req.CodeId == 0 { + return nil, errorsmod.Wrap(types.ErrInvalid, "code id") + } + rsp, err := queryCodeInfo(sdk.UnwrapSDKContext(c), req.CodeId, q.keeper) + switch { + case err != nil: + return nil, err + case rsp == nil: + return nil, types.ErrNoSuchCodeFn(req.CodeId).Wrapf("code id %d", req.CodeId) + } + return rsp, nil +} + func queryContractInfo(ctx sdk.Context, addr sdk.AccAddress, keeper types.ViewKeeper) (*types.QueryContractInfoResponse, error) { info := keeper.GetContractInfo(ctx, addr) if info == nil { @@ -298,6 +315,20 @@ func queryContractInfo(ctx sdk.Context, addr sdk.AccAddress, keeper types.ViewKe } func queryCode(ctx sdk.Context, codeID uint64, keeper types.ViewKeeper) (*types.QueryCodeResponse, error) { + info, err := queryCodeInfo(ctx, codeID, keeper) + if err != nil { + return nil, err + } + + code, err := keeper.GetByteCode(ctx, codeID) + if err != nil { + return nil, errorsmod.Wrap(err, "loading wasm code") + } + + return &types.QueryCodeResponse{CodeInfoResponse: info, Data: code}, nil +} + +func queryCodeInfo(ctx sdk.Context, codeID uint64, keeper types.ViewKeeper) (*types.CodeInfoResponse, error) { if codeID == 0 { return nil, nil } @@ -312,13 +343,7 @@ func queryCode(ctx sdk.Context, codeID uint64, keeper types.ViewKeeper) (*types. DataHash: res.CodeHash, InstantiatePermission: res.InstantiateConfig, } - - code, err := keeper.GetByteCode(ctx, codeID) - if err != nil { - return nil, errorsmod.Wrap(err, "loading wasm code") - } - - return &types.QueryCodeResponse{CodeInfoResponse: &info, Data: code}, nil + return &info, nil } func (q GrpcQuerier) PinnedCodes(c context.Context, req *types.QueryPinnedCodesRequest) (*types.QueryPinnedCodesResponse, error) { diff --git a/x/wasm/keeper/querier_test.go b/x/wasm/keeper/querier_test.go index afd4ad3cc5..21f27021ec 100644 --- a/x/wasm/keeper/querier_test.go +++ b/x/wasm/keeper/querier_test.go @@ -781,6 +781,58 @@ func TestQueryCodeInfo(t *testing.T) { ctx, keepers := CreateTestInput(t, false, AvailableCapabilities) keeper := keepers.WasmKeeper + anyAddress, err := sdk.AccAddressFromBech32("cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz") + require.NoError(t, err) + specs := map[string]struct { + codeID uint64 + accessConfig types.AccessConfig + }{ + "everybody": { + codeID: 1, + accessConfig: types.AllowEverybody, + }, + "nobody": { + codeID: 10, + accessConfig: types.AllowNobody, + }, + "with_address": { + codeID: 20, + accessConfig: types.AccessTypeAnyOfAddresses.With(anyAddress), + }, + } + for msg, spec := range specs { + t.Run(msg, func(t *testing.T) { + codeInfo := types.CodeInfoFixture(types.WithSHA256CodeHash(wasmCode)) + codeInfo.InstantiateConfig = spec.accessConfig + require.NoError(t, keeper.importCode(ctx, spec.codeID, + codeInfo, + wasmCode), + ) + + q := Querier(keeper) + got, err := q.CodeInfo(ctx, &types.QueryCodeInfoRequest{ + CodeId: spec.codeID, + }) + require.NoError(t, err) + expectedResponse := &types.CodeInfoResponse{ + CodeID: spec.codeID, + Creator: codeInfo.Creator, + DataHash: codeInfo.CodeHash, + InstantiatePermission: spec.accessConfig, + } + require.NotNil(t, got) + require.EqualValues(t, expectedResponse, got) + }) + } +} + +func TestQueryCode(t *testing.T) { + wasmCode, err := os.ReadFile("./testdata/hackatom.wasm") + require.NoError(t, err) + + ctx, keepers := CreateTestInput(t, false, AvailableCapabilities) + keeper := keepers.WasmKeeper + anyAddress, err := sdk.AccAddressFromBech32("cosmos100dejzacpanrldpjjwksjm62shqhyss44jf5xz") require.NoError(t, err) specs := map[string]struct { diff --git a/x/wasm/types/query.pb.go b/x/wasm/types/query.pb.go index f13a529984..09eb7c09cd 100644 --- a/x/wasm/types/query.pb.go +++ b/x/wasm/types/query.pb.go @@ -633,6 +633,49 @@ func (m *QueryCodeRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCodeRequest proto.InternalMessageInfo +// QueryCodeInfoRequest is the request type for the Query/Code RPC method +type QueryCodeInfoRequest struct { + CodeId uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"code_id,omitempty"` +} + +func (m *QueryCodeInfoRequest) Reset() { *m = QueryCodeInfoRequest{} } +func (m *QueryCodeInfoRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCodeInfoRequest) ProtoMessage() {} +func (*QueryCodeInfoRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_9677c207036b9f2b, []int{13} +} + +func (m *QueryCodeInfoRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *QueryCodeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCodeInfoRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} + +func (m *QueryCodeInfoRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCodeInfoRequest.Merge(m, src) +} + +func (m *QueryCodeInfoRequest) XXX_Size() int { + return m.Size() +} + +func (m *QueryCodeInfoRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCodeInfoRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCodeInfoRequest proto.InternalMessageInfo + // CodeInfoResponse contains code meta data from CodeInfo type CodeInfoResponse struct { CodeID uint64 `protobuf:"varint,1,opt,name=code_id,json=codeId,proto3" json:"id"` @@ -645,7 +688,7 @@ func (m *CodeInfoResponse) Reset() { *m = CodeInfoResponse{} } func (m *CodeInfoResponse) String() string { return proto.CompactTextString(m) } func (*CodeInfoResponse) ProtoMessage() {} func (*CodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{13} + return fileDescriptor_9677c207036b9f2b, []int{14} } func (m *CodeInfoResponse) XXX_Unmarshal(b []byte) error { @@ -689,7 +732,7 @@ func (m *QueryCodeResponse) Reset() { *m = QueryCodeResponse{} } func (m *QueryCodeResponse) String() string { return proto.CompactTextString(m) } func (*QueryCodeResponse) ProtoMessage() {} func (*QueryCodeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{14} + return fileDescriptor_9677c207036b9f2b, []int{15} } func (m *QueryCodeResponse) XXX_Unmarshal(b []byte) error { @@ -733,7 +776,7 @@ func (m *QueryCodesRequest) Reset() { *m = QueryCodesRequest{} } func (m *QueryCodesRequest) String() string { return proto.CompactTextString(m) } func (*QueryCodesRequest) ProtoMessage() {} func (*QueryCodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{15} + return fileDescriptor_9677c207036b9f2b, []int{16} } func (m *QueryCodesRequest) XXX_Unmarshal(b []byte) error { @@ -778,7 +821,7 @@ func (m *QueryCodesResponse) Reset() { *m = QueryCodesResponse{} } func (m *QueryCodesResponse) String() string { return proto.CompactTextString(m) } func (*QueryCodesResponse) ProtoMessage() {} func (*QueryCodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{16} + return fileDescriptor_9677c207036b9f2b, []int{17} } func (m *QueryCodesResponse) XXX_Unmarshal(b []byte) error { @@ -823,7 +866,7 @@ func (m *QueryPinnedCodesRequest) Reset() { *m = QueryPinnedCodesRequest func (m *QueryPinnedCodesRequest) String() string { return proto.CompactTextString(m) } func (*QueryPinnedCodesRequest) ProtoMessage() {} func (*QueryPinnedCodesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{17} + return fileDescriptor_9677c207036b9f2b, []int{18} } func (m *QueryPinnedCodesRequest) XXX_Unmarshal(b []byte) error { @@ -869,7 +912,7 @@ func (m *QueryPinnedCodesResponse) Reset() { *m = QueryPinnedCodesRespon func (m *QueryPinnedCodesResponse) String() string { return proto.CompactTextString(m) } func (*QueryPinnedCodesResponse) ProtoMessage() {} func (*QueryPinnedCodesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{18} + return fileDescriptor_9677c207036b9f2b, []int{19} } func (m *QueryPinnedCodesResponse) XXX_Unmarshal(b []byte) error { @@ -910,7 +953,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{19} + return fileDescriptor_9677c207036b9f2b, []int{20} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { @@ -954,7 +997,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{20} + return fileDescriptor_9677c207036b9f2b, []int{21} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { @@ -1001,7 +1044,7 @@ func (m *QueryContractsByCreatorRequest) Reset() { *m = QueryContractsBy func (m *QueryContractsByCreatorRequest) String() string { return proto.CompactTextString(m) } func (*QueryContractsByCreatorRequest) ProtoMessage() {} func (*QueryContractsByCreatorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{21} + return fileDescriptor_9677c207036b9f2b, []int{22} } func (m *QueryContractsByCreatorRequest) XXX_Unmarshal(b []byte) error { @@ -1048,7 +1091,7 @@ func (m *QueryContractsByCreatorResponse) Reset() { *m = QueryContractsB func (m *QueryContractsByCreatorResponse) String() string { return proto.CompactTextString(m) } func (*QueryContractsByCreatorResponse) ProtoMessage() {} func (*QueryContractsByCreatorResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{22} + return fileDescriptor_9677c207036b9f2b, []int{23} } func (m *QueryContractsByCreatorResponse) XXX_Unmarshal(b []byte) error { @@ -1100,7 +1143,7 @@ func (m *QueryBuildAddressRequest) Reset() { *m = QueryBuildAddressReque func (m *QueryBuildAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryBuildAddressRequest) ProtoMessage() {} func (*QueryBuildAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{23} + return fileDescriptor_9677c207036b9f2b, []int{24} } func (m *QueryBuildAddressRequest) XXX_Unmarshal(b []byte) error { @@ -1145,7 +1188,7 @@ func (m *QueryBuildAddressResponse) Reset() { *m = QueryBuildAddressResp func (m *QueryBuildAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryBuildAddressResponse) ProtoMessage() {} func (*QueryBuildAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9677c207036b9f2b, []int{24} + return fileDescriptor_9677c207036b9f2b, []int{25} } func (m *QueryBuildAddressResponse) XXX_Unmarshal(b []byte) error { @@ -1193,6 +1236,7 @@ func init() { proto.RegisterType((*QuerySmartContractStateRequest)(nil), "cosmwasm.wasm.v1.QuerySmartContractStateRequest") proto.RegisterType((*QuerySmartContractStateResponse)(nil), "cosmwasm.wasm.v1.QuerySmartContractStateResponse") proto.RegisterType((*QueryCodeRequest)(nil), "cosmwasm.wasm.v1.QueryCodeRequest") + proto.RegisterType((*QueryCodeInfoRequest)(nil), "cosmwasm.wasm.v1.QueryCodeInfoRequest") proto.RegisterType((*CodeInfoResponse)(nil), "cosmwasm.wasm.v1.CodeInfoResponse") proto.RegisterType((*QueryCodeResponse)(nil), "cosmwasm.wasm.v1.QueryCodeResponse") proto.RegisterType((*QueryCodesRequest)(nil), "cosmwasm.wasm.v1.QueryCodesRequest") @@ -1210,102 +1254,104 @@ func init() { func init() { proto.RegisterFile("cosmwasm/wasm/v1/query.proto", fileDescriptor_9677c207036b9f2b) } var fileDescriptor_9677c207036b9f2b = []byte{ - // 1509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0xcf, 0x6f, 0x1b, 0x45, - 0x1b, 0xc7, 0x33, 0xa9, 0xe3, 0xd8, 0x93, 0xbc, 0x6f, 0x9d, 0xa1, 0xb4, 0xae, 0xdb, 0xda, 0xd1, - 0xb6, 0x84, 0xd4, 0x6d, 0xbd, 0x4d, 0x4a, 0xa9, 0x5a, 0x4e, 0x76, 0x5a, 0x9a, 0x56, 0x94, 0xa6, - 0xae, 0x04, 0x12, 0x08, 0x99, 0xb1, 0x77, 0xe2, 0x2c, 0xb2, 0x77, 0xdd, 0x9d, 0x49, 0xd3, 0x28, - 0x4a, 0x0f, 0x3d, 0x21, 0x71, 0x01, 0x71, 0xa2, 0x20, 0xe0, 0xc0, 0xa1, 0xa8, 0x20, 0x55, 0x02, - 0x89, 0x5e, 0x10, 0xd7, 0x1c, 0x2b, 0xb8, 0x70, 0xb2, 0x20, 0x45, 0x2a, 0xea, 0x9f, 0xd0, 0x13, - 0xda, 0xf9, 0xe1, 0xdd, 0xb5, 0xbd, 0xb6, 0x1b, 0x7c, 0xe0, 0x12, 0xad, 0x77, 0x9f, 0x67, 0xe6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x13, 0x1a, 0xd3, 0xe1, - 0xad, 0xc4, 0xc0, 0x67, 0x92, 0xea, 0xb2, 0xe8, 0xea, 0x1b, 0x6d, 0xe5, 0x7a, 0x13, 0x7d, 0x09, - 0xe0, 0xa4, 0xbf, 0x94, 0x86, 0xd6, 0xbc, 0x2e, 0xcd, 0x41, 0x68, 0xcd, 0xeb, 0x56, 0x9b, 0xb5, - 0xd3, 0x1e, 0x6d, 0x16, 0xcd, 0xf6, 0x38, 0x81, 0x65, 0xd7, 0x5b, 0x11, 0x16, 0x16, 0xb7, 0xfe, - 0x4c, 0x8f, 0xdc, 0xdb, 0x4e, 0x8f, 0x6c, 0x6d, 0xa7, 0xc1, 0xa3, 0xed, 0x34, 0xf8, 0x63, 0x3b, - 0x0d, 0x3e, 0x7e, 0x9c, 0x1e, 0x79, 0xf4, 0x38, 0x3d, 0xf2, 0xfb, 0xe3, 0xf4, 0xc8, 0x3b, 0x33, - 0xbe, 0xeb, 0xdb, 0x82, 0x4d, 0xeb, 0x6f, 0xab, 0x51, 0x0d, 0xfd, 0x96, 0x18, 0x9d, 0xff, 0x6f, - 0xb6, 0x1c, 0xe5, 0xff, 0x07, 0x3d, 0xf5, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x22, 0x05, 0x98, - 0xc8, 0x02, 0x16, 0x00, 0x00, + // 1546 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0x41, 0x6f, 0x13, 0x47, + 0x14, 0xc7, 0x33, 0xc1, 0x71, 0xec, 0x49, 0x5a, 0x9c, 0x69, 0x0a, 0xc6, 0x80, 0x1d, 0x2d, 0x10, + 0x82, 0x21, 0x5e, 0x12, 0x4a, 0x11, 0xf4, 0x64, 0x07, 0x4a, 0x40, 0xa5, 0x04, 0x23, 0xb5, 0x52, + 0xab, 0xca, 0x1d, 0x7b, 0x27, 0xce, 0x56, 0xf6, 0xae, 0xd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a, 0xfd, 0x38, 0xc7, 0xdd, 0xe5, 0x48, 0x2c, 0x92, 0x18, 0xb9, 0x1c, + 0x89, 0x8d, 0x24, 0xa2, 0xca, 0x1d, 0x00, 0x27, 0x3c, 0x2b, 0x23, 0xb4, 0xbb, 0x64, 0x27, 0x46, + 0x5b, 0x3b, 0xfb, 0xa8, 0x05, 0x7c, 0x70, 0xc5, 0xef, 0x54, 0x69, 0x97, 0xbc, 0x10, 0x93, 0x47, + 0x6d, 0x31, 0x56, 0x11, 0x6d, 0xe8, 0x80, 0x88, 0x1a, 0x27, 0x32, 0x63, 0xcf, 0x9a, 0x19, 0xfe, + 0xee, 0xc4, 0x85, 0x38, 0x7f, 0xdf, 0xf7, 0x30, 0x50, 0xb9, 0xda, 0xed, 0x69, 0x0c, 0xec, 0x38, + 0x8d, 0x3d, 0x00, 0x10, 0x79, 0x7b, 0x17, 0x53, 0x7c, 0x0b, 0xc2, 0xd6, 0x14, 0x65, 0xfe, 0x0a, + 0x33, 0x47, 0x8f, 0xc8, 0x71, 0x39, 0xc9, 0x01, 0x66, 0x33, 0x0c, 0xf7, 0x72, 0xd8, 0x25, 0xdd, + 0x30, 0x88, 0xd6, 0x43, 0x90, 0x9d, 0xe7, 0xf5, 0x4f, 0x81, 0x28, 0xf7, 0xda, 0xc6, 0x10, 0xb2, + 0x4c, 0xc3, 0x98, 0xd8, 0x35, 0x8e, 0x28, 0x91, 0xc2, 0xd8, 0x76, 0x33, 0x33, 0xea, 0x6c, 0x1b, + 0x5a, 0x1c, 0x75, 0x76, 0xcc, 0x00, 0x27, 0x3c, 0x29, 0x56, 0x67, 0x09, 0x5b, 0xb8, 0x2e, 0xe7, + 0xaa, 0x14, 0xe1, 0x2b, 0x6d, 0x5f, 0x05, 0xdd, 0x1b, 0x30, 0xda, 0xe0, 0x5f, 0x44, 0x3c, 0x24, + 0xbb, 0x17, 0xcc, 0xf1, 0x68, 0x3b, 0x71, 0x1c, 0x17, 0x3b, 0x10, 0xd2, 0x5d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39, 0xbd, 0xf3, 0x7f, 0x96, 0xcb, 0x51, 0xfe, 0x2f, 0xee, 0xa9, 0x7f, 0x03, 0x00, 0x00, + 0xff, 0xff, 0xd8, 0x64, 0xd3, 0xb3, 0xc0, 0x16, 0x00, 0x00, } func (this *QueryContractInfoResponse) Equal(that interface{}) bool { @@ -1424,10 +1470,12 @@ type QueryClient interface { RawContractState(ctx context.Context, in *QueryRawContractStateRequest, opts ...grpc.CallOption) (*QueryRawContractStateResponse, error) // SmartContractState get smart query result from the contract SmartContractState(ctx context.Context, in *QuerySmartContractStateRequest, opts ...grpc.CallOption) (*QuerySmartContractStateResponse, error) - // Code gets the binary code and metadata for a singe wasm code + // Code gets the binary code and metadata for a single wasm code Code(ctx context.Context, in *QueryCodeRequest, opts ...grpc.CallOption) (*QueryCodeResponse, error) // Codes gets the metadata for all stored wasm codes Codes(ctx context.Context, in *QueryCodesRequest, opts ...grpc.CallOption) (*QueryCodesResponse, error) + // CodeInfo gets the metadata for a single wasm code + CodeInfo(ctx context.Context, in *QueryCodeInfoRequest, opts ...grpc.CallOption) (*CodeInfoResponse, error) // PinnedCodes gets the pinned code ids PinnedCodes(ctx context.Context, in *QueryPinnedCodesRequest, opts ...grpc.CallOption) (*QueryPinnedCodesResponse, error) // Params gets the module params @@ -1518,6 +1566,15 @@ func (c *queryClient) Codes(ctx context.Context, in *QueryCodesRequest, opts ... return out, nil } +func (c *queryClient) CodeInfo(ctx context.Context, in *QueryCodeInfoRequest, opts ...grpc.CallOption) (*CodeInfoResponse, error) { + out := new(CodeInfoResponse) + err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/CodeInfo", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) PinnedCodes(ctx context.Context, in *QueryPinnedCodesRequest, opts ...grpc.CallOption) (*QueryPinnedCodesResponse, error) { out := new(QueryPinnedCodesResponse) err := c.cc.Invoke(ctx, "/cosmwasm.wasm.v1.Query/PinnedCodes", in, out, opts...) @@ -1568,10 +1625,12 @@ type QueryServer interface { RawContractState(context.Context, *QueryRawContractStateRequest) (*QueryRawContractStateResponse, error) // SmartContractState get smart query result from the contract SmartContractState(context.Context, *QuerySmartContractStateRequest) (*QuerySmartContractStateResponse, error) - // Code gets the binary code and metadata for a singe wasm code + // Code gets the binary code and metadata for a single wasm code Code(context.Context, *QueryCodeRequest) (*QueryCodeResponse, error) // Codes gets the metadata for all stored wasm codes Codes(context.Context, *QueryCodesRequest) (*QueryCodesResponse, error) + // CodeInfo gets the metadata for a single wasm code + CodeInfo(context.Context, *QueryCodeInfoRequest) (*CodeInfoResponse, error) // PinnedCodes gets the pinned code ids PinnedCodes(context.Context, *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error) // Params gets the module params @@ -1617,6 +1676,10 @@ func (*UnimplementedQueryServer) Codes(ctx context.Context, req *QueryCodesReque return nil, status.Errorf(codes.Unimplemented, "method Codes not implemented") } +func (*UnimplementedQueryServer) CodeInfo(ctx context.Context, req *QueryCodeInfoRequest) (*CodeInfoResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CodeInfo not implemented") +} + func (*UnimplementedQueryServer) PinnedCodes(ctx context.Context, req *QueryPinnedCodesRequest) (*QueryPinnedCodesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PinnedCodes not implemented") } @@ -1781,6 +1844,24 @@ func _Query_Codes_Handler(srv interface{}, ctx context.Context, dec func(interfa return interceptor(ctx, in, info, handler) } +func _Query_CodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCodeInfoRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).CodeInfo(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/cosmwasm.wasm.v1.Query/CodeInfo", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).CodeInfo(ctx, req.(*QueryCodeInfoRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_PinnedCodes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryPinnedCodesRequest) if err := dec(in); err != nil { @@ -1889,6 +1970,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Codes", Handler: _Query_Codes_Handler, }, + { + MethodName: "CodeInfo", + Handler: _Query_CodeInfo_Handler, + }, { MethodName: "PinnedCodes", Handler: _Query_PinnedCodes_Handler, @@ -2408,6 +2493,34 @@ func (m *QueryCodeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryCodeInfoRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryCodeInfoRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCodeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CodeId != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.CodeId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *CodeInfoResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -3116,6 +3229,18 @@ func (m *QueryCodeRequest) Size() (n int) { return n } +func (m *QueryCodeInfoRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.CodeId != 0 { + n += 1 + sovQuery(uint64(m.CodeId)) + } + return n +} + func (m *CodeInfoResponse) Size() (n int) { if m == nil { return 0 @@ -4700,6 +4825,76 @@ func (m *QueryCodeRequest) Unmarshal(dAtA []byte) error { return nil } +func (m *QueryCodeInfoRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCodeInfoRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCodeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CodeId", wireType) + } + m.CodeId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.CodeId |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + func (m *CodeInfoResponse) Unmarshal(dAtA []byte) 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 8994570341..9a40fc2a87 100644 --- a/x/wasm/types/query.pb.gw.go +++ b/x/wasm/types/query.pb.gw.go @@ -52,6 +52,7 @@ func request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.Marshal } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -77,6 +78,7 @@ func local_request_Query_ContractInfo_0(ctx context.Context, marshaler runtime.M } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -104,6 +106,7 @@ func request_Query_ContractHistory_0(ctx context.Context, marshaler runtime.Mars } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -136,6 +139,7 @@ func local_request_Query_ContractHistory_0(ctx context.Context, marshaler runtim } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -170,6 +174,7 @@ func request_Query_ContractsByCode_0(ctx context.Context, marshaler runtime.Mars } protoReq.CodeId, err = runtime.Uint64(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) } @@ -202,6 +207,7 @@ func local_request_Query_ContractsByCode_0(ctx context.Context, marshaler runtim } protoReq.CodeId, err = runtime.Uint64(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) } @@ -236,6 +242,7 @@ func request_Query_AllContractState_0(ctx context.Context, marshaler runtime.Mar } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -268,6 +275,7 @@ func local_request_Query_AllContractState_0(ctx context.Context, marshaler runti } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -300,6 +308,7 @@ func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Mar } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -310,6 +319,7 @@ func request_Query_RawContractState_0(ctx context.Context, marshaler runtime.Mar } protoReq.QueryData, err = runtime.Bytes(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } @@ -335,6 +345,7 @@ func local_request_Query_RawContractState_0(ctx context.Context, marshaler runti } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -345,6 +356,7 @@ func local_request_Query_RawContractState_0(ctx context.Context, marshaler runti } protoReq.QueryData, err = runtime.Bytes(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } @@ -370,6 +382,7 @@ func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.M } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -380,6 +393,7 @@ func request_Query_SmartContractState_0(ctx context.Context, marshaler runtime.M } protoReq.QueryData, err = runtime.Bytes(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } @@ -405,6 +419,7 @@ func local_request_Query_SmartContractState_0(ctx context.Context, marshaler run } protoReq.Address, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) } @@ -415,6 +430,7 @@ func local_request_Query_SmartContractState_0(ctx context.Context, marshaler run } protoReq.QueryData, err = runtime.Bytes(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "query_data", err) } @@ -440,6 +456,7 @@ func request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler, clie } protoReq.CodeId, err = runtime.Uint64(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) } @@ -465,6 +482,7 @@ func local_request_Query_Code_0(ctx context.Context, marshaler runtime.Marshaler } protoReq.CodeId, err = runtime.Uint64(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) } @@ -505,6 +523,58 @@ func local_request_Query_Codes_0(ctx context.Context, marshaler runtime.Marshale return msg, metadata, err } +func request_Query_CodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["code_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "code_id") + } + + protoReq.CodeId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) + } + + msg, err := client.CodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err +} + +func local_request_Query_CodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryCodeInfoRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["code_id"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "code_id") + } + + protoReq.CodeId, err = runtime.Uint64(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "code_id", err) + } + + msg, err := server.CodeInfo(ctx, &protoReq) + return msg, metadata, err +} + 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) { @@ -572,6 +642,7 @@ func request_Query_ContractsByCreator_0(ctx context.Context, marshaler runtime.M } protoReq.CreatorAddress, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "creator_address", err) } @@ -604,6 +675,7 @@ func local_request_Query_ContractsByCreator_0(ctx context.Context, marshaler run } protoReq.CreatorAddress, err = runtime.String(val) + if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "creator_address", err) } @@ -832,6 +904,28 @@ 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_CodeInfo_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 { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_CodeInfo_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) + return + } + + forward_Query_CodeInfo_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) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1112,6 +1206,25 @@ 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_CodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_CodeInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_CodeInfo_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) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1208,6 +1321,8 @@ var ( pattern_Query_Codes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cosmwasm", "wasm", "v1", "code"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_CodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cosmwasm", "wasm", "v1", "code-info", "code_id"}, "", runtime.AssumeColonVerbOpt(false))) + 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(false))) @@ -1234,6 +1349,8 @@ var ( forward_Query_Codes_0 = runtime.ForwardResponseMessage + forward_Query_CodeInfo_0 = runtime.ForwardResponseMessage + forward_Query_PinnedCodes_0 = runtime.ForwardResponseMessage forward_Query_Params_0 = runtime.ForwardResponseMessage