github.com/InjectiveLabs/sdk-go@v1.53.0/chain/wasmx/types/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/wasmx/v1/query.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/cosmos/gogoproto/gogoproto" 10 grpc1 "github.com/cosmos/gogoproto/grpc" 11 proto "github.com/cosmos/gogoproto/proto" 12 _ "google.golang.org/genproto/googleapis/api/annotations" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 io "io" 17 math "math" 18 math_bits "math/bits" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // QueryWasmxParamsRequest is the request type for the Query/WasmxParams RPC 33 // method. 34 type QueryWasmxParamsRequest struct { 35 } 36 37 func (m *QueryWasmxParamsRequest) Reset() { *m = QueryWasmxParamsRequest{} } 38 func (m *QueryWasmxParamsRequest) String() string { return proto.CompactTextString(m) } 39 func (*QueryWasmxParamsRequest) ProtoMessage() {} 40 func (*QueryWasmxParamsRequest) Descriptor() ([]byte, []int) { 41 return fileDescriptor_660c5209971a3cd4, []int{0} 42 } 43 func (m *QueryWasmxParamsRequest) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45 } 46 func (m *QueryWasmxParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_QueryWasmxParamsRequest.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalToSizedBuffer(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57 } 58 func (m *QueryWasmxParamsRequest) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_QueryWasmxParamsRequest.Merge(m, src) 60 } 61 func (m *QueryWasmxParamsRequest) XXX_Size() int { 62 return m.Size() 63 } 64 func (m *QueryWasmxParamsRequest) XXX_DiscardUnknown() { 65 xxx_messageInfo_QueryWasmxParamsRequest.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_QueryWasmxParamsRequest proto.InternalMessageInfo 69 70 // QueryWasmxParamsRequest is the response type for the Query/WasmxParams RPC 71 // method. 72 type QueryWasmxParamsResponse struct { 73 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 74 } 75 76 func (m *QueryWasmxParamsResponse) Reset() { *m = QueryWasmxParamsResponse{} } 77 func (m *QueryWasmxParamsResponse) String() string { return proto.CompactTextString(m) } 78 func (*QueryWasmxParamsResponse) ProtoMessage() {} 79 func (*QueryWasmxParamsResponse) Descriptor() ([]byte, []int) { 80 return fileDescriptor_660c5209971a3cd4, []int{1} 81 } 82 func (m *QueryWasmxParamsResponse) XXX_Unmarshal(b []byte) error { 83 return m.Unmarshal(b) 84 } 85 func (m *QueryWasmxParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 86 if deterministic { 87 return xxx_messageInfo_QueryWasmxParamsResponse.Marshal(b, m, deterministic) 88 } else { 89 b = b[:cap(b)] 90 n, err := m.MarshalToSizedBuffer(b) 91 if err != nil { 92 return nil, err 93 } 94 return b[:n], nil 95 } 96 } 97 func (m *QueryWasmxParamsResponse) XXX_Merge(src proto.Message) { 98 xxx_messageInfo_QueryWasmxParamsResponse.Merge(m, src) 99 } 100 func (m *QueryWasmxParamsResponse) XXX_Size() int { 101 return m.Size() 102 } 103 func (m *QueryWasmxParamsResponse) XXX_DiscardUnknown() { 104 xxx_messageInfo_QueryWasmxParamsResponse.DiscardUnknown(m) 105 } 106 107 var xxx_messageInfo_QueryWasmxParamsResponse proto.InternalMessageInfo 108 109 func (m *QueryWasmxParamsResponse) GetParams() Params { 110 if m != nil { 111 return m.Params 112 } 113 return Params{} 114 } 115 116 // QueryModuleStateRequest is the request type for the Query/WasmxModuleState 117 // RPC method. 118 type QueryModuleStateRequest struct { 119 } 120 121 func (m *QueryModuleStateRequest) Reset() { *m = QueryModuleStateRequest{} } 122 func (m *QueryModuleStateRequest) String() string { return proto.CompactTextString(m) } 123 func (*QueryModuleStateRequest) ProtoMessage() {} 124 func (*QueryModuleStateRequest) Descriptor() ([]byte, []int) { 125 return fileDescriptor_660c5209971a3cd4, []int{2} 126 } 127 func (m *QueryModuleStateRequest) XXX_Unmarshal(b []byte) error { 128 return m.Unmarshal(b) 129 } 130 func (m *QueryModuleStateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 131 if deterministic { 132 return xxx_messageInfo_QueryModuleStateRequest.Marshal(b, m, deterministic) 133 } else { 134 b = b[:cap(b)] 135 n, err := m.MarshalToSizedBuffer(b) 136 if err != nil { 137 return nil, err 138 } 139 return b[:n], nil 140 } 141 } 142 func (m *QueryModuleStateRequest) XXX_Merge(src proto.Message) { 143 xxx_messageInfo_QueryModuleStateRequest.Merge(m, src) 144 } 145 func (m *QueryModuleStateRequest) XXX_Size() int { 146 return m.Size() 147 } 148 func (m *QueryModuleStateRequest) XXX_DiscardUnknown() { 149 xxx_messageInfo_QueryModuleStateRequest.DiscardUnknown(m) 150 } 151 152 var xxx_messageInfo_QueryModuleStateRequest proto.InternalMessageInfo 153 154 // QueryModuleStateResponse is the response type for the Query/WasmxModuleState 155 // RPC method. 156 type QueryModuleStateResponse struct { 157 State *GenesisState `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` 158 } 159 160 func (m *QueryModuleStateResponse) Reset() { *m = QueryModuleStateResponse{} } 161 func (m *QueryModuleStateResponse) String() string { return proto.CompactTextString(m) } 162 func (*QueryModuleStateResponse) ProtoMessage() {} 163 func (*QueryModuleStateResponse) Descriptor() ([]byte, []int) { 164 return fileDescriptor_660c5209971a3cd4, []int{3} 165 } 166 func (m *QueryModuleStateResponse) XXX_Unmarshal(b []byte) error { 167 return m.Unmarshal(b) 168 } 169 func (m *QueryModuleStateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 170 if deterministic { 171 return xxx_messageInfo_QueryModuleStateResponse.Marshal(b, m, deterministic) 172 } else { 173 b = b[:cap(b)] 174 n, err := m.MarshalToSizedBuffer(b) 175 if err != nil { 176 return nil, err 177 } 178 return b[:n], nil 179 } 180 } 181 func (m *QueryModuleStateResponse) XXX_Merge(src proto.Message) { 182 xxx_messageInfo_QueryModuleStateResponse.Merge(m, src) 183 } 184 func (m *QueryModuleStateResponse) XXX_Size() int { 185 return m.Size() 186 } 187 func (m *QueryModuleStateResponse) XXX_DiscardUnknown() { 188 xxx_messageInfo_QueryModuleStateResponse.DiscardUnknown(m) 189 } 190 191 var xxx_messageInfo_QueryModuleStateResponse proto.InternalMessageInfo 192 193 func (m *QueryModuleStateResponse) GetState() *GenesisState { 194 if m != nil { 195 return m.State 196 } 197 return nil 198 } 199 200 // Contract registration info 201 type QueryContractRegistrationInfoRequest struct { 202 ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` 203 } 204 205 func (m *QueryContractRegistrationInfoRequest) Reset() { *m = QueryContractRegistrationInfoRequest{} } 206 func (m *QueryContractRegistrationInfoRequest) String() string { return proto.CompactTextString(m) } 207 func (*QueryContractRegistrationInfoRequest) ProtoMessage() {} 208 func (*QueryContractRegistrationInfoRequest) Descriptor() ([]byte, []int) { 209 return fileDescriptor_660c5209971a3cd4, []int{4} 210 } 211 func (m *QueryContractRegistrationInfoRequest) XXX_Unmarshal(b []byte) error { 212 return m.Unmarshal(b) 213 } 214 func (m *QueryContractRegistrationInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 215 if deterministic { 216 return xxx_messageInfo_QueryContractRegistrationInfoRequest.Marshal(b, m, deterministic) 217 } else { 218 b = b[:cap(b)] 219 n, err := m.MarshalToSizedBuffer(b) 220 if err != nil { 221 return nil, err 222 } 223 return b[:n], nil 224 } 225 } 226 func (m *QueryContractRegistrationInfoRequest) XXX_Merge(src proto.Message) { 227 xxx_messageInfo_QueryContractRegistrationInfoRequest.Merge(m, src) 228 } 229 func (m *QueryContractRegistrationInfoRequest) XXX_Size() int { 230 return m.Size() 231 } 232 func (m *QueryContractRegistrationInfoRequest) XXX_DiscardUnknown() { 233 xxx_messageInfo_QueryContractRegistrationInfoRequest.DiscardUnknown(m) 234 } 235 236 var xxx_messageInfo_QueryContractRegistrationInfoRequest proto.InternalMessageInfo 237 238 func (m *QueryContractRegistrationInfoRequest) GetContractAddress() string { 239 if m != nil { 240 return m.ContractAddress 241 } 242 return "" 243 } 244 245 type QueryContractRegistrationInfoResponse struct { 246 Contract *RegisteredContract `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` 247 } 248 249 func (m *QueryContractRegistrationInfoResponse) Reset() { *m = QueryContractRegistrationInfoResponse{} } 250 func (m *QueryContractRegistrationInfoResponse) String() string { return proto.CompactTextString(m) } 251 func (*QueryContractRegistrationInfoResponse) ProtoMessage() {} 252 func (*QueryContractRegistrationInfoResponse) Descriptor() ([]byte, []int) { 253 return fileDescriptor_660c5209971a3cd4, []int{5} 254 } 255 func (m *QueryContractRegistrationInfoResponse) XXX_Unmarshal(b []byte) error { 256 return m.Unmarshal(b) 257 } 258 func (m *QueryContractRegistrationInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 259 if deterministic { 260 return xxx_messageInfo_QueryContractRegistrationInfoResponse.Marshal(b, m, deterministic) 261 } else { 262 b = b[:cap(b)] 263 n, err := m.MarshalToSizedBuffer(b) 264 if err != nil { 265 return nil, err 266 } 267 return b[:n], nil 268 } 269 } 270 func (m *QueryContractRegistrationInfoResponse) XXX_Merge(src proto.Message) { 271 xxx_messageInfo_QueryContractRegistrationInfoResponse.Merge(m, src) 272 } 273 func (m *QueryContractRegistrationInfoResponse) XXX_Size() int { 274 return m.Size() 275 } 276 func (m *QueryContractRegistrationInfoResponse) XXX_DiscardUnknown() { 277 xxx_messageInfo_QueryContractRegistrationInfoResponse.DiscardUnknown(m) 278 } 279 280 var xxx_messageInfo_QueryContractRegistrationInfoResponse proto.InternalMessageInfo 281 282 func (m *QueryContractRegistrationInfoResponse) GetContract() *RegisteredContract { 283 if m != nil { 284 return m.Contract 285 } 286 return nil 287 } 288 289 func init() { 290 proto.RegisterType((*QueryWasmxParamsRequest)(nil), "injective.wasmx.v1.QueryWasmxParamsRequest") 291 proto.RegisterType((*QueryWasmxParamsResponse)(nil), "injective.wasmx.v1.QueryWasmxParamsResponse") 292 proto.RegisterType((*QueryModuleStateRequest)(nil), "injective.wasmx.v1.QueryModuleStateRequest") 293 proto.RegisterType((*QueryModuleStateResponse)(nil), "injective.wasmx.v1.QueryModuleStateResponse") 294 proto.RegisterType((*QueryContractRegistrationInfoRequest)(nil), "injective.wasmx.v1.QueryContractRegistrationInfoRequest") 295 proto.RegisterType((*QueryContractRegistrationInfoResponse)(nil), "injective.wasmx.v1.QueryContractRegistrationInfoResponse") 296 } 297 298 func init() { proto.RegisterFile("injective/wasmx/v1/query.proto", fileDescriptor_660c5209971a3cd4) } 299 300 var fileDescriptor_660c5209971a3cd4 = []byte{ 301 // 499 bytes of a gzipped FileDescriptorProto 302 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4f, 0x6b, 0x13, 0x41, 303 0x14, 0xcf, 0x4a, 0x5b, 0x74, 0x7a, 0xb0, 0x0c, 0x82, 0x71, 0x29, 0x6b, 0x18, 0x54, 0x2a, 0xea, 304 0x0e, 0xad, 0x20, 0xd1, 0x93, 0xc6, 0x83, 0x14, 0x15, 0xec, 0x2a, 0x08, 0x5e, 0xc2, 0x64, 0xf3, 305 0xba, 0x1d, 0x6d, 0x66, 0xb6, 0x33, 0x93, 0x68, 0x11, 0x2f, 0xe2, 0xd1, 0x83, 0xe0, 0xc1, 0xaf, 306 0xd4, 0x63, 0xc5, 0x8b, 0x27, 0x91, 0xc4, 0x0f, 0x22, 0x99, 0x99, 0x8d, 0xd1, 0x4c, 0x5a, 0xe9, 307 0x6d, 0xf6, 0xbd, 0xf7, 0xfb, 0xf3, 0xfe, 0xb0, 0x28, 0xe1, 0xe2, 0x25, 0xe4, 0x86, 0x0f, 0x80, 308 0xbe, 0x66, 0xba, 0xf7, 0x86, 0x0e, 0xd6, 0xe9, 0x5e, 0x1f, 0xd4, 0x7e, 0x5a, 0x2a, 0x69, 0x24, 309 0xc6, 0x93, 0x7c, 0x6a, 0xf3, 0xe9, 0x60, 0x3d, 0x5e, 0x2d, 0xa4, 0x2c, 0x76, 0x81, 0xb2, 0x92, 310 0x53, 0x26, 0x84, 0x34, 0xcc, 0x70, 0x29, 0xb4, 0x43, 0xc4, 0x21, 0x46, 0x07, 0x75, 0xf9, 0x46, 311 0x20, 0x5f, 0x80, 0x00, 0xcd, 0x2b, 0x86, 0x73, 0x85, 0x2c, 0xa4, 0x7d, 0xd2, 0xf1, 0xcb, 0x45, 312 0xc9, 0x05, 0x74, 0x7e, 0x6b, 0x6c, 0xec, 0xf9, 0x18, 0xf4, 0x84, 0x29, 0xd6, 0xd3, 0x19, 0xec, 313 0xf5, 0x41, 0x1b, 0xf2, 0x0c, 0xd5, 0x67, 0x53, 0xba, 0x94, 0x42, 0x03, 0x6e, 0xa2, 0xa5, 0xd2, 314 0x46, 0xea, 0x51, 0x23, 0x5a, 0x5b, 0xde, 0x88, 0xd3, 0xd9, 0x8e, 0x52, 0x87, 0x69, 0x2d, 0x1c, 315 0xfc, 0xb8, 0x58, 0xcb, 0x7c, 0xfd, 0x44, 0xf0, 0xb1, 0xec, 0xf6, 0x77, 0xe1, 0xa9, 0x61, 0x06, 316 0x2a, 0xc1, 0xcc, 0x0b, 0xfe, 0x95, 0xf2, 0x82, 0xb7, 0xd0, 0xa2, 0x1e, 0x07, 0xbc, 0x5e, 0x23, 317 0xa4, 0xf7, 0xc0, 0xf5, 0xeb, 0x80, 0xae, 0x9c, 0x6c, 0xa1, 0x4b, 0x96, 0xf3, 0xbe, 0x14, 0x46, 318 0xb1, 0xdc, 0x64, 0x50, 0x70, 0x6d, 0x94, 0x9d, 0xed, 0xa6, 0xd8, 0x96, 0x5e, 0x1b, 0x5f, 0x45, 319 0x2b, 0xb9, 0x2f, 0x69, 0xb3, 0x6e, 0x57, 0x81, 0x76, 0xad, 0x9d, 0xc9, 0xce, 0x56, 0xf1, 0x7b, 320 0x2e, 0x4c, 0x5e, 0xa1, 0xcb, 0xc7, 0x50, 0x7a, 0xcf, 0x2d, 0x74, 0xba, 0xc2, 0x7a, 0xdb, 0x57, 321 0x42, 0xb6, 0x1d, 0x1e, 0x14, 0x74, 0x27, 0x8c, 0x13, 0xdc, 0xc6, 0x87, 0x05, 0xb4, 0x68, 0xd5, 322 0xf0, 0xc7, 0x08, 0x2d, 0x4f, 0xad, 0x02, 0x5f, 0x0b, 0x71, 0xcd, 0xd9, 0x65, 0x7c, 0xfd, 0xff, 323 0x8a, 0x9d, 0x71, 0x42, 0xde, 0x7f, 0xfb, 0xf5, 0xf9, 0xd4, 0x2a, 0x8e, 0x69, 0xe0, 0xaa, 0xdc, 324 0x1e, 0xf1, 0xd7, 0x08, 0xd5, 0xe7, 0x4d, 0x00, 0x37, 0xe7, 0xca, 0x1d, 0xb3, 0x87, 0xf8, 0xf6, 325 0x09, 0x90, 0xde, 0xf5, 0x5d, 0xeb, 0xfa, 0x0e, 0x6e, 0x86, 0x5c, 0xab, 0x29, 0x54, 0x9b, 0x8b, 326 0x6d, 0x49, 0xdf, 0xfe, 0xbb, 0xef, 0x77, 0xf8, 0x4b, 0x84, 0x56, 0xec, 0x3c, 0xa6, 0x2e, 0xf0, 327 0x88, 0x39, 0xcf, 0x9e, 0xf0, 0x11, 0x73, 0x0e, 0x1c, 0x35, 0x59, 0xb3, 0x8e, 0x09, 0x6e, 0x84, 328 0x1c, 0xf7, 0x2c, 0xa0, 0x6d, 0xcf, 0xb8, 0x05, 0x07, 0xc3, 0x24, 0x3a, 0x1c, 0x26, 0xd1, 0xcf, 329 0x61, 0x12, 0x7d, 0x1a, 0x25, 0xb5, 0xc3, 0x51, 0x52, 0xfb, 0x3e, 0x4a, 0x6a, 0x2f, 0x1e, 0x16, 330 0xdc, 0xec, 0xf4, 0x3b, 0x69, 0x2e, 0x7b, 0x74, 0xb3, 0x62, 0x79, 0xc4, 0x3a, 0xfa, 0x0f, 0xe7, 331 0x8d, 0x5c, 0x2a, 0x98, 0xfe, 0xdc, 0x61, 0x5c, 0x78, 0x7e, 0xed, 0x05, 0xcd, 0x7e, 0x09, 0xba, 332 0xb3, 0x64, 0x7f, 0x0a, 0x37, 0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf3, 0x06, 0x07, 0x17, 0xc0, 333 0x04, 0x00, 0x00, 334 } 335 336 // Reference imports to suppress errors if they are not otherwise used. 337 var _ context.Context 338 var _ grpc.ClientConn 339 340 // This is a compile-time assertion to ensure that this generated file 341 // is compatible with the grpc package it is being compiled against. 342 const _ = grpc.SupportPackageIsVersion4 343 344 // QueryClient is the client API for Query service. 345 // 346 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 347 type QueryClient interface { 348 // Retrieves wasmx params 349 WasmxParams(ctx context.Context, in *QueryWasmxParamsRequest, opts ...grpc.CallOption) (*QueryWasmxParamsResponse, error) 350 // Retrieves contract registration info 351 ContractRegistrationInfo(ctx context.Context, in *QueryContractRegistrationInfoRequest, opts ...grpc.CallOption) (*QueryContractRegistrationInfoResponse, error) 352 // Retrieves the entire wasmx module's state 353 WasmxModuleState(ctx context.Context, in *QueryModuleStateRequest, opts ...grpc.CallOption) (*QueryModuleStateResponse, error) 354 } 355 356 type queryClient struct { 357 cc grpc1.ClientConn 358 } 359 360 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 361 return &queryClient{cc} 362 } 363 364 func (c *queryClient) WasmxParams(ctx context.Context, in *QueryWasmxParamsRequest, opts ...grpc.CallOption) (*QueryWasmxParamsResponse, error) { 365 out := new(QueryWasmxParamsResponse) 366 err := c.cc.Invoke(ctx, "/injective.wasmx.v1.Query/WasmxParams", in, out, opts...) 367 if err != nil { 368 return nil, err 369 } 370 return out, nil 371 } 372 373 func (c *queryClient) ContractRegistrationInfo(ctx context.Context, in *QueryContractRegistrationInfoRequest, opts ...grpc.CallOption) (*QueryContractRegistrationInfoResponse, error) { 374 out := new(QueryContractRegistrationInfoResponse) 375 err := c.cc.Invoke(ctx, "/injective.wasmx.v1.Query/ContractRegistrationInfo", in, out, opts...) 376 if err != nil { 377 return nil, err 378 } 379 return out, nil 380 } 381 382 func (c *queryClient) WasmxModuleState(ctx context.Context, in *QueryModuleStateRequest, opts ...grpc.CallOption) (*QueryModuleStateResponse, error) { 383 out := new(QueryModuleStateResponse) 384 err := c.cc.Invoke(ctx, "/injective.wasmx.v1.Query/WasmxModuleState", in, out, opts...) 385 if err != nil { 386 return nil, err 387 } 388 return out, nil 389 } 390 391 // QueryServer is the server API for Query service. 392 type QueryServer interface { 393 // Retrieves wasmx params 394 WasmxParams(context.Context, *QueryWasmxParamsRequest) (*QueryWasmxParamsResponse, error) 395 // Retrieves contract registration info 396 ContractRegistrationInfo(context.Context, *QueryContractRegistrationInfoRequest) (*QueryContractRegistrationInfoResponse, error) 397 // Retrieves the entire wasmx module's state 398 WasmxModuleState(context.Context, *QueryModuleStateRequest) (*QueryModuleStateResponse, error) 399 } 400 401 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 402 type UnimplementedQueryServer struct { 403 } 404 405 func (*UnimplementedQueryServer) WasmxParams(ctx context.Context, req *QueryWasmxParamsRequest) (*QueryWasmxParamsResponse, error) { 406 return nil, status.Errorf(codes.Unimplemented, "method WasmxParams not implemented") 407 } 408 func (*UnimplementedQueryServer) ContractRegistrationInfo(ctx context.Context, req *QueryContractRegistrationInfoRequest) (*QueryContractRegistrationInfoResponse, error) { 409 return nil, status.Errorf(codes.Unimplemented, "method ContractRegistrationInfo not implemented") 410 } 411 func (*UnimplementedQueryServer) WasmxModuleState(ctx context.Context, req *QueryModuleStateRequest) (*QueryModuleStateResponse, error) { 412 return nil, status.Errorf(codes.Unimplemented, "method WasmxModuleState not implemented") 413 } 414 415 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 416 s.RegisterService(&_Query_serviceDesc, srv) 417 } 418 419 func _Query_WasmxParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 420 in := new(QueryWasmxParamsRequest) 421 if err := dec(in); err != nil { 422 return nil, err 423 } 424 if interceptor == nil { 425 return srv.(QueryServer).WasmxParams(ctx, in) 426 } 427 info := &grpc.UnaryServerInfo{ 428 Server: srv, 429 FullMethod: "/injective.wasmx.v1.Query/WasmxParams", 430 } 431 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 432 return srv.(QueryServer).WasmxParams(ctx, req.(*QueryWasmxParamsRequest)) 433 } 434 return interceptor(ctx, in, info, handler) 435 } 436 437 func _Query_ContractRegistrationInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 438 in := new(QueryContractRegistrationInfoRequest) 439 if err := dec(in); err != nil { 440 return nil, err 441 } 442 if interceptor == nil { 443 return srv.(QueryServer).ContractRegistrationInfo(ctx, in) 444 } 445 info := &grpc.UnaryServerInfo{ 446 Server: srv, 447 FullMethod: "/injective.wasmx.v1.Query/ContractRegistrationInfo", 448 } 449 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 450 return srv.(QueryServer).ContractRegistrationInfo(ctx, req.(*QueryContractRegistrationInfoRequest)) 451 } 452 return interceptor(ctx, in, info, handler) 453 } 454 455 func _Query_WasmxModuleState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 456 in := new(QueryModuleStateRequest) 457 if err := dec(in); err != nil { 458 return nil, err 459 } 460 if interceptor == nil { 461 return srv.(QueryServer).WasmxModuleState(ctx, in) 462 } 463 info := &grpc.UnaryServerInfo{ 464 Server: srv, 465 FullMethod: "/injective.wasmx.v1.Query/WasmxModuleState", 466 } 467 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 468 return srv.(QueryServer).WasmxModuleState(ctx, req.(*QueryModuleStateRequest)) 469 } 470 return interceptor(ctx, in, info, handler) 471 } 472 473 var _Query_serviceDesc = grpc.ServiceDesc{ 474 ServiceName: "injective.wasmx.v1.Query", 475 HandlerType: (*QueryServer)(nil), 476 Methods: []grpc.MethodDesc{ 477 { 478 MethodName: "WasmxParams", 479 Handler: _Query_WasmxParams_Handler, 480 }, 481 { 482 MethodName: "ContractRegistrationInfo", 483 Handler: _Query_ContractRegistrationInfo_Handler, 484 }, 485 { 486 MethodName: "WasmxModuleState", 487 Handler: _Query_WasmxModuleState_Handler, 488 }, 489 }, 490 Streams: []grpc.StreamDesc{}, 491 Metadata: "injective/wasmx/v1/query.proto", 492 } 493 494 func (m *QueryWasmxParamsRequest) Marshal() (dAtA []byte, err error) { 495 size := m.Size() 496 dAtA = make([]byte, size) 497 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 498 if err != nil { 499 return nil, err 500 } 501 return dAtA[:n], nil 502 } 503 504 func (m *QueryWasmxParamsRequest) MarshalTo(dAtA []byte) (int, error) { 505 size := m.Size() 506 return m.MarshalToSizedBuffer(dAtA[:size]) 507 } 508 509 func (m *QueryWasmxParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 510 i := len(dAtA) 511 _ = i 512 var l int 513 _ = l 514 return len(dAtA) - i, nil 515 } 516 517 func (m *QueryWasmxParamsResponse) Marshal() (dAtA []byte, err error) { 518 size := m.Size() 519 dAtA = make([]byte, size) 520 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 521 if err != nil { 522 return nil, err 523 } 524 return dAtA[:n], nil 525 } 526 527 func (m *QueryWasmxParamsResponse) MarshalTo(dAtA []byte) (int, error) { 528 size := m.Size() 529 return m.MarshalToSizedBuffer(dAtA[:size]) 530 } 531 532 func (m *QueryWasmxParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 533 i := len(dAtA) 534 _ = i 535 var l int 536 _ = l 537 { 538 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 539 if err != nil { 540 return 0, err 541 } 542 i -= size 543 i = encodeVarintQuery(dAtA, i, uint64(size)) 544 } 545 i-- 546 dAtA[i] = 0xa 547 return len(dAtA) - i, nil 548 } 549 550 func (m *QueryModuleStateRequest) Marshal() (dAtA []byte, err error) { 551 size := m.Size() 552 dAtA = make([]byte, size) 553 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 554 if err != nil { 555 return nil, err 556 } 557 return dAtA[:n], nil 558 } 559 560 func (m *QueryModuleStateRequest) MarshalTo(dAtA []byte) (int, error) { 561 size := m.Size() 562 return m.MarshalToSizedBuffer(dAtA[:size]) 563 } 564 565 func (m *QueryModuleStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 566 i := len(dAtA) 567 _ = i 568 var l int 569 _ = l 570 return len(dAtA) - i, nil 571 } 572 573 func (m *QueryModuleStateResponse) Marshal() (dAtA []byte, err error) { 574 size := m.Size() 575 dAtA = make([]byte, size) 576 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 577 if err != nil { 578 return nil, err 579 } 580 return dAtA[:n], nil 581 } 582 583 func (m *QueryModuleStateResponse) MarshalTo(dAtA []byte) (int, error) { 584 size := m.Size() 585 return m.MarshalToSizedBuffer(dAtA[:size]) 586 } 587 588 func (m *QueryModuleStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 589 i := len(dAtA) 590 _ = i 591 var l int 592 _ = l 593 if m.State != nil { 594 { 595 size, err := m.State.MarshalToSizedBuffer(dAtA[:i]) 596 if err != nil { 597 return 0, err 598 } 599 i -= size 600 i = encodeVarintQuery(dAtA, i, uint64(size)) 601 } 602 i-- 603 dAtA[i] = 0xa 604 } 605 return len(dAtA) - i, nil 606 } 607 608 func (m *QueryContractRegistrationInfoRequest) Marshal() (dAtA []byte, err error) { 609 size := m.Size() 610 dAtA = make([]byte, size) 611 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 612 if err != nil { 613 return nil, err 614 } 615 return dAtA[:n], nil 616 } 617 618 func (m *QueryContractRegistrationInfoRequest) MarshalTo(dAtA []byte) (int, error) { 619 size := m.Size() 620 return m.MarshalToSizedBuffer(dAtA[:size]) 621 } 622 623 func (m *QueryContractRegistrationInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 624 i := len(dAtA) 625 _ = i 626 var l int 627 _ = l 628 if len(m.ContractAddress) > 0 { 629 i -= len(m.ContractAddress) 630 copy(dAtA[i:], m.ContractAddress) 631 i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractAddress))) 632 i-- 633 dAtA[i] = 0xa 634 } 635 return len(dAtA) - i, nil 636 } 637 638 func (m *QueryContractRegistrationInfoResponse) Marshal() (dAtA []byte, err error) { 639 size := m.Size() 640 dAtA = make([]byte, size) 641 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 642 if err != nil { 643 return nil, err 644 } 645 return dAtA[:n], nil 646 } 647 648 func (m *QueryContractRegistrationInfoResponse) MarshalTo(dAtA []byte) (int, error) { 649 size := m.Size() 650 return m.MarshalToSizedBuffer(dAtA[:size]) 651 } 652 653 func (m *QueryContractRegistrationInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 654 i := len(dAtA) 655 _ = i 656 var l int 657 _ = l 658 if m.Contract != nil { 659 { 660 size, err := m.Contract.MarshalToSizedBuffer(dAtA[:i]) 661 if err != nil { 662 return 0, err 663 } 664 i -= size 665 i = encodeVarintQuery(dAtA, i, uint64(size)) 666 } 667 i-- 668 dAtA[i] = 0xa 669 } 670 return len(dAtA) - i, nil 671 } 672 673 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 674 offset -= sovQuery(v) 675 base := offset 676 for v >= 1<<7 { 677 dAtA[offset] = uint8(v&0x7f | 0x80) 678 v >>= 7 679 offset++ 680 } 681 dAtA[offset] = uint8(v) 682 return base 683 } 684 func (m *QueryWasmxParamsRequest) Size() (n int) { 685 if m == nil { 686 return 0 687 } 688 var l int 689 _ = l 690 return n 691 } 692 693 func (m *QueryWasmxParamsResponse) Size() (n int) { 694 if m == nil { 695 return 0 696 } 697 var l int 698 _ = l 699 l = m.Params.Size() 700 n += 1 + l + sovQuery(uint64(l)) 701 return n 702 } 703 704 func (m *QueryModuleStateRequest) Size() (n int) { 705 if m == nil { 706 return 0 707 } 708 var l int 709 _ = l 710 return n 711 } 712 713 func (m *QueryModuleStateResponse) Size() (n int) { 714 if m == nil { 715 return 0 716 } 717 var l int 718 _ = l 719 if m.State != nil { 720 l = m.State.Size() 721 n += 1 + l + sovQuery(uint64(l)) 722 } 723 return n 724 } 725 726 func (m *QueryContractRegistrationInfoRequest) Size() (n int) { 727 if m == nil { 728 return 0 729 } 730 var l int 731 _ = l 732 l = len(m.ContractAddress) 733 if l > 0 { 734 n += 1 + l + sovQuery(uint64(l)) 735 } 736 return n 737 } 738 739 func (m *QueryContractRegistrationInfoResponse) Size() (n int) { 740 if m == nil { 741 return 0 742 } 743 var l int 744 _ = l 745 if m.Contract != nil { 746 l = m.Contract.Size() 747 n += 1 + l + sovQuery(uint64(l)) 748 } 749 return n 750 } 751 752 func sovQuery(x uint64) (n int) { 753 return (math_bits.Len64(x|1) + 6) / 7 754 } 755 func sozQuery(x uint64) (n int) { 756 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 757 } 758 func (m *QueryWasmxParamsRequest) Unmarshal(dAtA []byte) error { 759 l := len(dAtA) 760 iNdEx := 0 761 for iNdEx < l { 762 preIndex := iNdEx 763 var wire uint64 764 for shift := uint(0); ; shift += 7 { 765 if shift >= 64 { 766 return ErrIntOverflowQuery 767 } 768 if iNdEx >= l { 769 return io.ErrUnexpectedEOF 770 } 771 b := dAtA[iNdEx] 772 iNdEx++ 773 wire |= uint64(b&0x7F) << shift 774 if b < 0x80 { 775 break 776 } 777 } 778 fieldNum := int32(wire >> 3) 779 wireType := int(wire & 0x7) 780 if wireType == 4 { 781 return fmt.Errorf("proto: QueryWasmxParamsRequest: wiretype end group for non-group") 782 } 783 if fieldNum <= 0 { 784 return fmt.Errorf("proto: QueryWasmxParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 785 } 786 switch fieldNum { 787 default: 788 iNdEx = preIndex 789 skippy, err := skipQuery(dAtA[iNdEx:]) 790 if err != nil { 791 return err 792 } 793 if (skippy < 0) || (iNdEx+skippy) < 0 { 794 return ErrInvalidLengthQuery 795 } 796 if (iNdEx + skippy) > l { 797 return io.ErrUnexpectedEOF 798 } 799 iNdEx += skippy 800 } 801 } 802 803 if iNdEx > l { 804 return io.ErrUnexpectedEOF 805 } 806 return nil 807 } 808 func (m *QueryWasmxParamsResponse) Unmarshal(dAtA []byte) error { 809 l := len(dAtA) 810 iNdEx := 0 811 for iNdEx < l { 812 preIndex := iNdEx 813 var wire uint64 814 for shift := uint(0); ; shift += 7 { 815 if shift >= 64 { 816 return ErrIntOverflowQuery 817 } 818 if iNdEx >= l { 819 return io.ErrUnexpectedEOF 820 } 821 b := dAtA[iNdEx] 822 iNdEx++ 823 wire |= uint64(b&0x7F) << shift 824 if b < 0x80 { 825 break 826 } 827 } 828 fieldNum := int32(wire >> 3) 829 wireType := int(wire & 0x7) 830 if wireType == 4 { 831 return fmt.Errorf("proto: QueryWasmxParamsResponse: wiretype end group for non-group") 832 } 833 if fieldNum <= 0 { 834 return fmt.Errorf("proto: QueryWasmxParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 835 } 836 switch fieldNum { 837 case 1: 838 if wireType != 2 { 839 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 840 } 841 var msglen int 842 for shift := uint(0); ; shift += 7 { 843 if shift >= 64 { 844 return ErrIntOverflowQuery 845 } 846 if iNdEx >= l { 847 return io.ErrUnexpectedEOF 848 } 849 b := dAtA[iNdEx] 850 iNdEx++ 851 msglen |= int(b&0x7F) << shift 852 if b < 0x80 { 853 break 854 } 855 } 856 if msglen < 0 { 857 return ErrInvalidLengthQuery 858 } 859 postIndex := iNdEx + msglen 860 if postIndex < 0 { 861 return ErrInvalidLengthQuery 862 } 863 if postIndex > l { 864 return io.ErrUnexpectedEOF 865 } 866 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 867 return err 868 } 869 iNdEx = postIndex 870 default: 871 iNdEx = preIndex 872 skippy, err := skipQuery(dAtA[iNdEx:]) 873 if err != nil { 874 return err 875 } 876 if (skippy < 0) || (iNdEx+skippy) < 0 { 877 return ErrInvalidLengthQuery 878 } 879 if (iNdEx + skippy) > l { 880 return io.ErrUnexpectedEOF 881 } 882 iNdEx += skippy 883 } 884 } 885 886 if iNdEx > l { 887 return io.ErrUnexpectedEOF 888 } 889 return nil 890 } 891 func (m *QueryModuleStateRequest) Unmarshal(dAtA []byte) error { 892 l := len(dAtA) 893 iNdEx := 0 894 for iNdEx < l { 895 preIndex := iNdEx 896 var wire uint64 897 for shift := uint(0); ; shift += 7 { 898 if shift >= 64 { 899 return ErrIntOverflowQuery 900 } 901 if iNdEx >= l { 902 return io.ErrUnexpectedEOF 903 } 904 b := dAtA[iNdEx] 905 iNdEx++ 906 wire |= uint64(b&0x7F) << shift 907 if b < 0x80 { 908 break 909 } 910 } 911 fieldNum := int32(wire >> 3) 912 wireType := int(wire & 0x7) 913 if wireType == 4 { 914 return fmt.Errorf("proto: QueryModuleStateRequest: wiretype end group for non-group") 915 } 916 if fieldNum <= 0 { 917 return fmt.Errorf("proto: QueryModuleStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 918 } 919 switch fieldNum { 920 default: 921 iNdEx = preIndex 922 skippy, err := skipQuery(dAtA[iNdEx:]) 923 if err != nil { 924 return err 925 } 926 if (skippy < 0) || (iNdEx+skippy) < 0 { 927 return ErrInvalidLengthQuery 928 } 929 if (iNdEx + skippy) > l { 930 return io.ErrUnexpectedEOF 931 } 932 iNdEx += skippy 933 } 934 } 935 936 if iNdEx > l { 937 return io.ErrUnexpectedEOF 938 } 939 return nil 940 } 941 func (m *QueryModuleStateResponse) Unmarshal(dAtA []byte) error { 942 l := len(dAtA) 943 iNdEx := 0 944 for iNdEx < l { 945 preIndex := iNdEx 946 var wire uint64 947 for shift := uint(0); ; shift += 7 { 948 if shift >= 64 { 949 return ErrIntOverflowQuery 950 } 951 if iNdEx >= l { 952 return io.ErrUnexpectedEOF 953 } 954 b := dAtA[iNdEx] 955 iNdEx++ 956 wire |= uint64(b&0x7F) << shift 957 if b < 0x80 { 958 break 959 } 960 } 961 fieldNum := int32(wire >> 3) 962 wireType := int(wire & 0x7) 963 if wireType == 4 { 964 return fmt.Errorf("proto: QueryModuleStateResponse: wiretype end group for non-group") 965 } 966 if fieldNum <= 0 { 967 return fmt.Errorf("proto: QueryModuleStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 968 } 969 switch fieldNum { 970 case 1: 971 if wireType != 2 { 972 return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) 973 } 974 var msglen int 975 for shift := uint(0); ; shift += 7 { 976 if shift >= 64 { 977 return ErrIntOverflowQuery 978 } 979 if iNdEx >= l { 980 return io.ErrUnexpectedEOF 981 } 982 b := dAtA[iNdEx] 983 iNdEx++ 984 msglen |= int(b&0x7F) << shift 985 if b < 0x80 { 986 break 987 } 988 } 989 if msglen < 0 { 990 return ErrInvalidLengthQuery 991 } 992 postIndex := iNdEx + msglen 993 if postIndex < 0 { 994 return ErrInvalidLengthQuery 995 } 996 if postIndex > l { 997 return io.ErrUnexpectedEOF 998 } 999 if m.State == nil { 1000 m.State = &GenesisState{} 1001 } 1002 if err := m.State.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1003 return err 1004 } 1005 iNdEx = postIndex 1006 default: 1007 iNdEx = preIndex 1008 skippy, err := skipQuery(dAtA[iNdEx:]) 1009 if err != nil { 1010 return err 1011 } 1012 if (skippy < 0) || (iNdEx+skippy) < 0 { 1013 return ErrInvalidLengthQuery 1014 } 1015 if (iNdEx + skippy) > l { 1016 return io.ErrUnexpectedEOF 1017 } 1018 iNdEx += skippy 1019 } 1020 } 1021 1022 if iNdEx > l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 return nil 1026 } 1027 func (m *QueryContractRegistrationInfoRequest) Unmarshal(dAtA []byte) error { 1028 l := len(dAtA) 1029 iNdEx := 0 1030 for iNdEx < l { 1031 preIndex := iNdEx 1032 var wire uint64 1033 for shift := uint(0); ; shift += 7 { 1034 if shift >= 64 { 1035 return ErrIntOverflowQuery 1036 } 1037 if iNdEx >= l { 1038 return io.ErrUnexpectedEOF 1039 } 1040 b := dAtA[iNdEx] 1041 iNdEx++ 1042 wire |= uint64(b&0x7F) << shift 1043 if b < 0x80 { 1044 break 1045 } 1046 } 1047 fieldNum := int32(wire >> 3) 1048 wireType := int(wire & 0x7) 1049 if wireType == 4 { 1050 return fmt.Errorf("proto: QueryContractRegistrationInfoRequest: wiretype end group for non-group") 1051 } 1052 if fieldNum <= 0 { 1053 return fmt.Errorf("proto: QueryContractRegistrationInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1054 } 1055 switch fieldNum { 1056 case 1: 1057 if wireType != 2 { 1058 return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) 1059 } 1060 var stringLen uint64 1061 for shift := uint(0); ; shift += 7 { 1062 if shift >= 64 { 1063 return ErrIntOverflowQuery 1064 } 1065 if iNdEx >= l { 1066 return io.ErrUnexpectedEOF 1067 } 1068 b := dAtA[iNdEx] 1069 iNdEx++ 1070 stringLen |= uint64(b&0x7F) << shift 1071 if b < 0x80 { 1072 break 1073 } 1074 } 1075 intStringLen := int(stringLen) 1076 if intStringLen < 0 { 1077 return ErrInvalidLengthQuery 1078 } 1079 postIndex := iNdEx + intStringLen 1080 if postIndex < 0 { 1081 return ErrInvalidLengthQuery 1082 } 1083 if postIndex > l { 1084 return io.ErrUnexpectedEOF 1085 } 1086 m.ContractAddress = string(dAtA[iNdEx:postIndex]) 1087 iNdEx = postIndex 1088 default: 1089 iNdEx = preIndex 1090 skippy, err := skipQuery(dAtA[iNdEx:]) 1091 if err != nil { 1092 return err 1093 } 1094 if (skippy < 0) || (iNdEx+skippy) < 0 { 1095 return ErrInvalidLengthQuery 1096 } 1097 if (iNdEx + skippy) > l { 1098 return io.ErrUnexpectedEOF 1099 } 1100 iNdEx += skippy 1101 } 1102 } 1103 1104 if iNdEx > l { 1105 return io.ErrUnexpectedEOF 1106 } 1107 return nil 1108 } 1109 func (m *QueryContractRegistrationInfoResponse) Unmarshal(dAtA []byte) error { 1110 l := len(dAtA) 1111 iNdEx := 0 1112 for iNdEx < l { 1113 preIndex := iNdEx 1114 var wire uint64 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return ErrIntOverflowQuery 1118 } 1119 if iNdEx >= l { 1120 return io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 wire |= uint64(b&0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 fieldNum := int32(wire >> 3) 1130 wireType := int(wire & 0x7) 1131 if wireType == 4 { 1132 return fmt.Errorf("proto: QueryContractRegistrationInfoResponse: wiretype end group for non-group") 1133 } 1134 if fieldNum <= 0 { 1135 return fmt.Errorf("proto: QueryContractRegistrationInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1136 } 1137 switch fieldNum { 1138 case 1: 1139 if wireType != 2 { 1140 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 1141 } 1142 var msglen int 1143 for shift := uint(0); ; shift += 7 { 1144 if shift >= 64 { 1145 return ErrIntOverflowQuery 1146 } 1147 if iNdEx >= l { 1148 return io.ErrUnexpectedEOF 1149 } 1150 b := dAtA[iNdEx] 1151 iNdEx++ 1152 msglen |= int(b&0x7F) << shift 1153 if b < 0x80 { 1154 break 1155 } 1156 } 1157 if msglen < 0 { 1158 return ErrInvalidLengthQuery 1159 } 1160 postIndex := iNdEx + msglen 1161 if postIndex < 0 { 1162 return ErrInvalidLengthQuery 1163 } 1164 if postIndex > l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 if m.Contract == nil { 1168 m.Contract = &RegisteredContract{} 1169 } 1170 if err := m.Contract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1171 return err 1172 } 1173 iNdEx = postIndex 1174 default: 1175 iNdEx = preIndex 1176 skippy, err := skipQuery(dAtA[iNdEx:]) 1177 if err != nil { 1178 return err 1179 } 1180 if (skippy < 0) || (iNdEx+skippy) < 0 { 1181 return ErrInvalidLengthQuery 1182 } 1183 if (iNdEx + skippy) > l { 1184 return io.ErrUnexpectedEOF 1185 } 1186 iNdEx += skippy 1187 } 1188 } 1189 1190 if iNdEx > l { 1191 return io.ErrUnexpectedEOF 1192 } 1193 return nil 1194 } 1195 func skipQuery(dAtA []byte) (n int, err error) { 1196 l := len(dAtA) 1197 iNdEx := 0 1198 depth := 0 1199 for iNdEx < l { 1200 var wire uint64 1201 for shift := uint(0); ; shift += 7 { 1202 if shift >= 64 { 1203 return 0, ErrIntOverflowQuery 1204 } 1205 if iNdEx >= l { 1206 return 0, io.ErrUnexpectedEOF 1207 } 1208 b := dAtA[iNdEx] 1209 iNdEx++ 1210 wire |= (uint64(b) & 0x7F) << shift 1211 if b < 0x80 { 1212 break 1213 } 1214 } 1215 wireType := int(wire & 0x7) 1216 switch wireType { 1217 case 0: 1218 for shift := uint(0); ; shift += 7 { 1219 if shift >= 64 { 1220 return 0, ErrIntOverflowQuery 1221 } 1222 if iNdEx >= l { 1223 return 0, io.ErrUnexpectedEOF 1224 } 1225 iNdEx++ 1226 if dAtA[iNdEx-1] < 0x80 { 1227 break 1228 } 1229 } 1230 case 1: 1231 iNdEx += 8 1232 case 2: 1233 var length int 1234 for shift := uint(0); ; shift += 7 { 1235 if shift >= 64 { 1236 return 0, ErrIntOverflowQuery 1237 } 1238 if iNdEx >= l { 1239 return 0, io.ErrUnexpectedEOF 1240 } 1241 b := dAtA[iNdEx] 1242 iNdEx++ 1243 length |= (int(b) & 0x7F) << shift 1244 if b < 0x80 { 1245 break 1246 } 1247 } 1248 if length < 0 { 1249 return 0, ErrInvalidLengthQuery 1250 } 1251 iNdEx += length 1252 case 3: 1253 depth++ 1254 case 4: 1255 if depth == 0 { 1256 return 0, ErrUnexpectedEndOfGroupQuery 1257 } 1258 depth-- 1259 case 5: 1260 iNdEx += 4 1261 default: 1262 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1263 } 1264 if iNdEx < 0 { 1265 return 0, ErrInvalidLengthQuery 1266 } 1267 if depth == 0 { 1268 return iNdEx, nil 1269 } 1270 } 1271 return 0, io.ErrUnexpectedEOF 1272 } 1273 1274 var ( 1275 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 1276 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 1277 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 1278 )