github.com/Finschia/finschia-sdk@v0.49.1/x/fswap/types/query.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/fswap/v1/query.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 types "github.com/Finschia/finschia-sdk/types" 10 query "github.com/Finschia/finschia-sdk/types/query" 11 _ "github.com/gogo/protobuf/gogoproto" 12 grpc1 "github.com/gogo/protobuf/grpc" 13 proto "github.com/gogo/protobuf/proto" 14 _ "google.golang.org/genproto/googleapis/api/annotations" 15 grpc "google.golang.org/grpc" 16 codes "google.golang.org/grpc/codes" 17 status "google.golang.org/grpc/status" 18 io "io" 19 math "math" 20 math_bits "math/bits" 21 ) 22 23 // Reference imports to suppress errors if they are not otherwise used. 24 var _ = proto.Marshal 25 var _ = fmt.Errorf 26 var _ = math.Inf 27 28 // This is a compile-time assertion to ensure that this generated file 29 // is compatible with the proto package it is being compiled against. 30 // A compilation error at this line likely means your copy of the 31 // proto package needs to be updated. 32 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 33 34 type QuerySwappedRequest struct { 35 FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` 36 ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` 37 } 38 39 func (m *QuerySwappedRequest) Reset() { *m = QuerySwappedRequest{} } 40 func (m *QuerySwappedRequest) String() string { return proto.CompactTextString(m) } 41 func (*QuerySwappedRequest) ProtoMessage() {} 42 func (*QuerySwappedRequest) Descriptor() ([]byte, []int) { 43 return fileDescriptor_01deae9da7816d6a, []int{0} 44 } 45 func (m *QuerySwappedRequest) XXX_Unmarshal(b []byte) error { 46 return m.Unmarshal(b) 47 } 48 func (m *QuerySwappedRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 49 if deterministic { 50 return xxx_messageInfo_QuerySwappedRequest.Marshal(b, m, deterministic) 51 } else { 52 b = b[:cap(b)] 53 n, err := m.MarshalToSizedBuffer(b) 54 if err != nil { 55 return nil, err 56 } 57 return b[:n], nil 58 } 59 } 60 func (m *QuerySwappedRequest) XXX_Merge(src proto.Message) { 61 xxx_messageInfo_QuerySwappedRequest.Merge(m, src) 62 } 63 func (m *QuerySwappedRequest) XXX_Size() int { 64 return m.Size() 65 } 66 func (m *QuerySwappedRequest) XXX_DiscardUnknown() { 67 xxx_messageInfo_QuerySwappedRequest.DiscardUnknown(m) 68 } 69 70 var xxx_messageInfo_QuerySwappedRequest proto.InternalMessageInfo 71 72 func (m *QuerySwappedRequest) GetFromDenom() string { 73 if m != nil { 74 return m.FromDenom 75 } 76 return "" 77 } 78 79 func (m *QuerySwappedRequest) GetToDenom() string { 80 if m != nil { 81 return m.ToDenom 82 } 83 return "" 84 } 85 86 type QuerySwappedResponse struct { 87 FromCoinAmount types.Coin `protobuf:"bytes,1,opt,name=from_coin_amount,json=fromCoinAmount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coin" json:"from_coin_amount"` 88 ToCoinAmount types.Coin `protobuf:"bytes,2,opt,name=to_coin_amount,json=toCoinAmount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coin" json:"to_coin_amount"` 89 } 90 91 func (m *QuerySwappedResponse) Reset() { *m = QuerySwappedResponse{} } 92 func (m *QuerySwappedResponse) String() string { return proto.CompactTextString(m) } 93 func (*QuerySwappedResponse) ProtoMessage() {} 94 func (*QuerySwappedResponse) Descriptor() ([]byte, []int) { 95 return fileDescriptor_01deae9da7816d6a, []int{1} 96 } 97 func (m *QuerySwappedResponse) XXX_Unmarshal(b []byte) error { 98 return m.Unmarshal(b) 99 } 100 func (m *QuerySwappedResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 101 if deterministic { 102 return xxx_messageInfo_QuerySwappedResponse.Marshal(b, m, deterministic) 103 } else { 104 b = b[:cap(b)] 105 n, err := m.MarshalToSizedBuffer(b) 106 if err != nil { 107 return nil, err 108 } 109 return b[:n], nil 110 } 111 } 112 func (m *QuerySwappedResponse) XXX_Merge(src proto.Message) { 113 xxx_messageInfo_QuerySwappedResponse.Merge(m, src) 114 } 115 func (m *QuerySwappedResponse) XXX_Size() int { 116 return m.Size() 117 } 118 func (m *QuerySwappedResponse) XXX_DiscardUnknown() { 119 xxx_messageInfo_QuerySwappedResponse.DiscardUnknown(m) 120 } 121 122 var xxx_messageInfo_QuerySwappedResponse proto.InternalMessageInfo 123 124 func (m *QuerySwappedResponse) GetFromCoinAmount() types.Coin { 125 if m != nil { 126 return m.FromCoinAmount 127 } 128 return types.Coin{} 129 } 130 131 func (m *QuerySwappedResponse) GetToCoinAmount() types.Coin { 132 if m != nil { 133 return m.ToCoinAmount 134 } 135 return types.Coin{} 136 } 137 138 type QueryTotalSwappableToCoinAmountRequest struct { 139 FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` 140 ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` 141 } 142 143 func (m *QueryTotalSwappableToCoinAmountRequest) Reset() { 144 *m = QueryTotalSwappableToCoinAmountRequest{} 145 } 146 func (m *QueryTotalSwappableToCoinAmountRequest) String() string { return proto.CompactTextString(m) } 147 func (*QueryTotalSwappableToCoinAmountRequest) ProtoMessage() {} 148 func (*QueryTotalSwappableToCoinAmountRequest) Descriptor() ([]byte, []int) { 149 return fileDescriptor_01deae9da7816d6a, []int{2} 150 } 151 func (m *QueryTotalSwappableToCoinAmountRequest) XXX_Unmarshal(b []byte) error { 152 return m.Unmarshal(b) 153 } 154 func (m *QueryTotalSwappableToCoinAmountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 155 if deterministic { 156 return xxx_messageInfo_QueryTotalSwappableToCoinAmountRequest.Marshal(b, m, deterministic) 157 } else { 158 b = b[:cap(b)] 159 n, err := m.MarshalToSizedBuffer(b) 160 if err != nil { 161 return nil, err 162 } 163 return b[:n], nil 164 } 165 } 166 func (m *QueryTotalSwappableToCoinAmountRequest) XXX_Merge(src proto.Message) { 167 xxx_messageInfo_QueryTotalSwappableToCoinAmountRequest.Merge(m, src) 168 } 169 func (m *QueryTotalSwappableToCoinAmountRequest) XXX_Size() int { 170 return m.Size() 171 } 172 func (m *QueryTotalSwappableToCoinAmountRequest) XXX_DiscardUnknown() { 173 xxx_messageInfo_QueryTotalSwappableToCoinAmountRequest.DiscardUnknown(m) 174 } 175 176 var xxx_messageInfo_QueryTotalSwappableToCoinAmountRequest proto.InternalMessageInfo 177 178 func (m *QueryTotalSwappableToCoinAmountRequest) GetFromDenom() string { 179 if m != nil { 180 return m.FromDenom 181 } 182 return "" 183 } 184 185 func (m *QueryTotalSwappableToCoinAmountRequest) GetToDenom() string { 186 if m != nil { 187 return m.ToDenom 188 } 189 return "" 190 } 191 192 type QueryTotalSwappableToCoinAmountResponse struct { 193 SwappableAmount types.Coin `protobuf:"bytes,1,opt,name=swappable_amount,json=swappableAmount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coin" json:"swappable_amount"` 194 } 195 196 func (m *QueryTotalSwappableToCoinAmountResponse) Reset() { 197 *m = QueryTotalSwappableToCoinAmountResponse{} 198 } 199 func (m *QueryTotalSwappableToCoinAmountResponse) String() string { return proto.CompactTextString(m) } 200 func (*QueryTotalSwappableToCoinAmountResponse) ProtoMessage() {} 201 func (*QueryTotalSwappableToCoinAmountResponse) Descriptor() ([]byte, []int) { 202 return fileDescriptor_01deae9da7816d6a, []int{3} 203 } 204 func (m *QueryTotalSwappableToCoinAmountResponse) XXX_Unmarshal(b []byte) error { 205 return m.Unmarshal(b) 206 } 207 func (m *QueryTotalSwappableToCoinAmountResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 208 if deterministic { 209 return xxx_messageInfo_QueryTotalSwappableToCoinAmountResponse.Marshal(b, m, deterministic) 210 } else { 211 b = b[:cap(b)] 212 n, err := m.MarshalToSizedBuffer(b) 213 if err != nil { 214 return nil, err 215 } 216 return b[:n], nil 217 } 218 } 219 func (m *QueryTotalSwappableToCoinAmountResponse) XXX_Merge(src proto.Message) { 220 xxx_messageInfo_QueryTotalSwappableToCoinAmountResponse.Merge(m, src) 221 } 222 func (m *QueryTotalSwappableToCoinAmountResponse) XXX_Size() int { 223 return m.Size() 224 } 225 func (m *QueryTotalSwappableToCoinAmountResponse) XXX_DiscardUnknown() { 226 xxx_messageInfo_QueryTotalSwappableToCoinAmountResponse.DiscardUnknown(m) 227 } 228 229 var xxx_messageInfo_QueryTotalSwappableToCoinAmountResponse proto.InternalMessageInfo 230 231 func (m *QueryTotalSwappableToCoinAmountResponse) GetSwappableAmount() types.Coin { 232 if m != nil { 233 return m.SwappableAmount 234 } 235 return types.Coin{} 236 } 237 238 type QuerySwapRequest struct { 239 FromDenom string `protobuf:"bytes,1,opt,name=from_denom,json=fromDenom,proto3" json:"from_denom,omitempty"` 240 ToDenom string `protobuf:"bytes,2,opt,name=to_denom,json=toDenom,proto3" json:"to_denom,omitempty"` 241 } 242 243 func (m *QuerySwapRequest) Reset() { *m = QuerySwapRequest{} } 244 func (m *QuerySwapRequest) String() string { return proto.CompactTextString(m) } 245 func (*QuerySwapRequest) ProtoMessage() {} 246 func (*QuerySwapRequest) Descriptor() ([]byte, []int) { 247 return fileDescriptor_01deae9da7816d6a, []int{4} 248 } 249 func (m *QuerySwapRequest) XXX_Unmarshal(b []byte) error { 250 return m.Unmarshal(b) 251 } 252 func (m *QuerySwapRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 253 if deterministic { 254 return xxx_messageInfo_QuerySwapRequest.Marshal(b, m, deterministic) 255 } else { 256 b = b[:cap(b)] 257 n, err := m.MarshalToSizedBuffer(b) 258 if err != nil { 259 return nil, err 260 } 261 return b[:n], nil 262 } 263 } 264 func (m *QuerySwapRequest) XXX_Merge(src proto.Message) { 265 xxx_messageInfo_QuerySwapRequest.Merge(m, src) 266 } 267 func (m *QuerySwapRequest) XXX_Size() int { 268 return m.Size() 269 } 270 func (m *QuerySwapRequest) XXX_DiscardUnknown() { 271 xxx_messageInfo_QuerySwapRequest.DiscardUnknown(m) 272 } 273 274 var xxx_messageInfo_QuerySwapRequest proto.InternalMessageInfo 275 276 func (m *QuerySwapRequest) GetFromDenom() string { 277 if m != nil { 278 return m.FromDenom 279 } 280 return "" 281 } 282 283 func (m *QuerySwapRequest) GetToDenom() string { 284 if m != nil { 285 return m.ToDenom 286 } 287 return "" 288 } 289 290 type QuerySwapResponse struct { 291 Swap Swap `protobuf:"bytes,1,opt,name=swap,proto3" json:"swap"` 292 } 293 294 func (m *QuerySwapResponse) Reset() { *m = QuerySwapResponse{} } 295 func (m *QuerySwapResponse) String() string { return proto.CompactTextString(m) } 296 func (*QuerySwapResponse) ProtoMessage() {} 297 func (*QuerySwapResponse) Descriptor() ([]byte, []int) { 298 return fileDescriptor_01deae9da7816d6a, []int{5} 299 } 300 func (m *QuerySwapResponse) XXX_Unmarshal(b []byte) error { 301 return m.Unmarshal(b) 302 } 303 func (m *QuerySwapResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 304 if deterministic { 305 return xxx_messageInfo_QuerySwapResponse.Marshal(b, m, deterministic) 306 } else { 307 b = b[:cap(b)] 308 n, err := m.MarshalToSizedBuffer(b) 309 if err != nil { 310 return nil, err 311 } 312 return b[:n], nil 313 } 314 } 315 func (m *QuerySwapResponse) XXX_Merge(src proto.Message) { 316 xxx_messageInfo_QuerySwapResponse.Merge(m, src) 317 } 318 func (m *QuerySwapResponse) XXX_Size() int { 319 return m.Size() 320 } 321 func (m *QuerySwapResponse) XXX_DiscardUnknown() { 322 xxx_messageInfo_QuerySwapResponse.DiscardUnknown(m) 323 } 324 325 var xxx_messageInfo_QuerySwapResponse proto.InternalMessageInfo 326 327 func (m *QuerySwapResponse) GetSwap() Swap { 328 if m != nil { 329 return m.Swap 330 } 331 return Swap{} 332 } 333 334 type QuerySwapsRequest struct { 335 Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` 336 } 337 338 func (m *QuerySwapsRequest) Reset() { *m = QuerySwapsRequest{} } 339 func (m *QuerySwapsRequest) String() string { return proto.CompactTextString(m) } 340 func (*QuerySwapsRequest) ProtoMessage() {} 341 func (*QuerySwapsRequest) Descriptor() ([]byte, []int) { 342 return fileDescriptor_01deae9da7816d6a, []int{6} 343 } 344 func (m *QuerySwapsRequest) XXX_Unmarshal(b []byte) error { 345 return m.Unmarshal(b) 346 } 347 func (m *QuerySwapsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 348 if deterministic { 349 return xxx_messageInfo_QuerySwapsRequest.Marshal(b, m, deterministic) 350 } else { 351 b = b[:cap(b)] 352 n, err := m.MarshalToSizedBuffer(b) 353 if err != nil { 354 return nil, err 355 } 356 return b[:n], nil 357 } 358 } 359 func (m *QuerySwapsRequest) XXX_Merge(src proto.Message) { 360 xxx_messageInfo_QuerySwapsRequest.Merge(m, src) 361 } 362 func (m *QuerySwapsRequest) XXX_Size() int { 363 return m.Size() 364 } 365 func (m *QuerySwapsRequest) XXX_DiscardUnknown() { 366 xxx_messageInfo_QuerySwapsRequest.DiscardUnknown(m) 367 } 368 369 var xxx_messageInfo_QuerySwapsRequest proto.InternalMessageInfo 370 371 func (m *QuerySwapsRequest) GetPagination() *query.PageRequest { 372 if m != nil { 373 return m.Pagination 374 } 375 return nil 376 } 377 378 type QuerySwapsResponse struct { 379 Swaps []Swap `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps"` 380 Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 381 } 382 383 func (m *QuerySwapsResponse) Reset() { *m = QuerySwapsResponse{} } 384 func (m *QuerySwapsResponse) String() string { return proto.CompactTextString(m) } 385 func (*QuerySwapsResponse) ProtoMessage() {} 386 func (*QuerySwapsResponse) Descriptor() ([]byte, []int) { 387 return fileDescriptor_01deae9da7816d6a, []int{7} 388 } 389 func (m *QuerySwapsResponse) XXX_Unmarshal(b []byte) error { 390 return m.Unmarshal(b) 391 } 392 func (m *QuerySwapsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 393 if deterministic { 394 return xxx_messageInfo_QuerySwapsResponse.Marshal(b, m, deterministic) 395 } else { 396 b = b[:cap(b)] 397 n, err := m.MarshalToSizedBuffer(b) 398 if err != nil { 399 return nil, err 400 } 401 return b[:n], nil 402 } 403 } 404 func (m *QuerySwapsResponse) XXX_Merge(src proto.Message) { 405 xxx_messageInfo_QuerySwapsResponse.Merge(m, src) 406 } 407 func (m *QuerySwapsResponse) XXX_Size() int { 408 return m.Size() 409 } 410 func (m *QuerySwapsResponse) XXX_DiscardUnknown() { 411 xxx_messageInfo_QuerySwapsResponse.DiscardUnknown(m) 412 } 413 414 var xxx_messageInfo_QuerySwapsResponse proto.InternalMessageInfo 415 416 func (m *QuerySwapsResponse) GetSwaps() []Swap { 417 if m != nil { 418 return m.Swaps 419 } 420 return nil 421 } 422 423 func (m *QuerySwapsResponse) GetPagination() *query.PageResponse { 424 if m != nil { 425 return m.Pagination 426 } 427 return nil 428 } 429 430 func init() { 431 proto.RegisterType((*QuerySwappedRequest)(nil), "lbm.fswap.v1.QuerySwappedRequest") 432 proto.RegisterType((*QuerySwappedResponse)(nil), "lbm.fswap.v1.QuerySwappedResponse") 433 proto.RegisterType((*QueryTotalSwappableToCoinAmountRequest)(nil), "lbm.fswap.v1.QueryTotalSwappableToCoinAmountRequest") 434 proto.RegisterType((*QueryTotalSwappableToCoinAmountResponse)(nil), "lbm.fswap.v1.QueryTotalSwappableToCoinAmountResponse") 435 proto.RegisterType((*QuerySwapRequest)(nil), "lbm.fswap.v1.QuerySwapRequest") 436 proto.RegisterType((*QuerySwapResponse)(nil), "lbm.fswap.v1.QuerySwapResponse") 437 proto.RegisterType((*QuerySwapsRequest)(nil), "lbm.fswap.v1.QuerySwapsRequest") 438 proto.RegisterType((*QuerySwapsResponse)(nil), "lbm.fswap.v1.QuerySwapsResponse") 439 } 440 441 func init() { proto.RegisterFile("lbm/fswap/v1/query.proto", fileDescriptor_01deae9da7816d6a) } 442 443 var fileDescriptor_01deae9da7816d6a = []byte{ 444 // 634 bytes of a gzipped FileDescriptorProto 445 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x41, 0x4f, 0x13, 0x41, 446 0x14, 0xee, 0xd6, 0x22, 0x32, 0x12, 0xc4, 0x01, 0x22, 0xac, 0xb2, 0xe0, 0x1e, 0xc0, 0x28, 0xce, 447 0xa4, 0x80, 0x3f, 0x00, 0x34, 0xe8, 0xc1, 0x44, 0xad, 0x9c, 0xf4, 0xd0, 0xcc, 0xb6, 0xd3, 0x65, 448 0x63, 0x77, 0xdf, 0xd2, 0x99, 0x16, 0x7a, 0xf5, 0x60, 0xbc, 0x98, 0x98, 0xf8, 0x17, 0x3c, 0xf9, 449 0x27, 0xbc, 0x72, 0x24, 0xf1, 0xe2, 0x49, 0x4d, 0xeb, 0x0f, 0x31, 0x33, 0x3b, 0x4b, 0x77, 0x03, 450 0xa5, 0x31, 0x84, 0xdb, 0x64, 0xdf, 0xf7, 0xbe, 0xef, 0x9b, 0x2f, 0xef, 0xcd, 0xa2, 0xf9, 0xa6, 451 0x17, 0xd2, 0x86, 0x38, 0x60, 0x31, 0xed, 0x94, 0xe9, 0x7e, 0x9b, 0xb7, 0xba, 0x24, 0x6e, 0x81, 452 0x04, 0x3c, 0xd9, 0xf4, 0x42, 0xa2, 0x2b, 0xa4, 0x53, 0xb6, 0xef, 0xf8, 0x00, 0x7e, 0x93, 0x53, 453 0x16, 0x07, 0x94, 0x45, 0x11, 0x48, 0x26, 0x03, 0x88, 0x44, 0x82, 0xb5, 0x67, 0x7d, 0xf0, 0x41, 454 0x1f, 0xa9, 0x3a, 0x99, 0xaf, 0xf7, 0x6b, 0x20, 0x42, 0x10, 0xd4, 0x63, 0x82, 0x27, 0xd4, 0xb4, 455 0x53, 0xf6, 0xb8, 0x64, 0x65, 0x1a, 0x33, 0x3f, 0x88, 0x34, 0x85, 0xc1, 0x3a, 0x59, 0x6c, 0x8a, 456 0xaa, 0x41, 0x90, 0xd6, 0xf3, 0x3e, 0x13, 0x5b, 0xba, 0xe2, 0xbe, 0x40, 0x33, 0xaf, 0x14, 0xf7, 457 0xeb, 0x03, 0x16, 0xc7, 0xbc, 0x5e, 0xe1, 0xfb, 0x6d, 0x2e, 0x24, 0x5e, 0x44, 0xa8, 0xd1, 0x82, 458 0xb0, 0x5a, 0xe7, 0x11, 0x84, 0xf3, 0xd6, 0xb2, 0x75, 0x6f, 0xa2, 0x32, 0xa1, 0xbe, 0x3c, 0x51, 459 0x1f, 0xf0, 0x02, 0xba, 0x26, 0xc1, 0x14, 0x8b, 0xba, 0x38, 0x2e, 0x41, 0x97, 0xdc, 0x0f, 0x45, 460 0x34, 0x9b, 0x67, 0x14, 0x31, 0x44, 0x82, 0xe3, 0x43, 0x34, 0xad, 0x29, 0x95, 0xad, 0x2a, 0x0b, 461 0xa1, 0x1d, 0x49, 0x4d, 0x7c, 0x7d, 0x7d, 0x81, 0x24, 0xf6, 0x89, 0xb2, 0x4f, 0x8c, 0x7d, 0xf2, 462 0x18, 0x82, 0x68, 0x7b, 0xe3, 0xe8, 0xd7, 0x52, 0xe1, 0xdb, 0xef, 0xa5, 0x07, 0x7e, 0x20, 0xf7, 463 0xda, 0x1e, 0xa9, 0x41, 0x48, 0x77, 0x82, 0x48, 0xd4, 0xf6, 0x02, 0x46, 0x1b, 0xe6, 0xf0, 0x50, 464 0xd4, 0xdf, 0x51, 0xd9, 0x8d, 0xb9, 0xd0, 0x4d, 0x95, 0x29, 0xa5, 0xa3, 0x4e, 0x5b, 0x5a, 0x05, 465 0x4b, 0x34, 0x25, 0x21, 0xa7, 0x5b, 0xbc, 0x14, 0xdd, 0x49, 0x09, 0x03, 0x55, 0xd7, 0x43, 0x2b, 466 0x3a, 0x87, 0x5d, 0x90, 0xac, 0xa9, 0xc3, 0x60, 0x5e, 0x93, 0xef, 0x66, 0x20, 0x17, 0x0f, 0xfb, 467 0xab, 0x85, 0x56, 0x47, 0x8a, 0x98, 0xfc, 0xbb, 0x68, 0x5a, 0xa4, 0x80, 0xcb, 0xcd, 0xff, 0xc6, 468 0x89, 0x8e, 0x89, 0xe2, 0x39, 0x9a, 0x3e, 0x19, 0x89, 0x8b, 0x5f, 0x7a, 0x0b, 0xdd, 0xcc, 0xb0, 469 0x99, 0xdb, 0xad, 0xa1, 0x92, 0x52, 0x35, 0x37, 0xc2, 0x24, 0xbb, 0x7e, 0x44, 0x21, 0xb7, 0x4b, 470 0xea, 0x2a, 0x15, 0x8d, 0x72, 0xdf, 0x66, 0x28, 0x44, 0xea, 0x68, 0x07, 0xa1, 0xc1, 0x62, 0x19, 471 0xa2, 0x95, 0x5c, 0x34, 0xc9, 0x82, 0xa7, 0x01, 0xbd, 0x64, 0x3e, 0x37, 0xbd, 0x95, 0x4c, 0xa7, 472 0xfb, 0xc9, 0x42, 0x38, 0xcb, 0x6e, 0x1c, 0x12, 0x34, 0xa6, 0xb4, 0xc5, 0xbc, 0xb5, 0x7c, 0xe5, 473 0x5c, 0x8b, 0x09, 0x0c, 0x3f, 0xcd, 0xd9, 0x49, 0x26, 0x76, 0x75, 0xa4, 0x9d, 0x44, 0x2c, 0xeb, 474 0x67, 0xfd, 0x63, 0x09, 0x8d, 0x69, 0x3f, 0x18, 0xd0, 0xb8, 0xd9, 0x4a, 0x7c, 0x37, 0x2f, 0x7f, 475 0xc6, 0x1b, 0x60, 0xbb, 0xe7, 0x41, 0x12, 0x1d, 0x77, 0xf1, 0xfd, 0x8f, 0xbf, 0x5f, 0x8a, 0xb7, 476 0xf0, 0x1c, 0xcd, 0xbd, 0x30, 0xc2, 0xa8, 0x7c, 0xb7, 0x90, 0x3d, 0x7c, 0x34, 0xf1, 0xe6, 0x19, 477 0x0a, 0x23, 0xd7, 0xc5, 0x7e, 0xf4, 0x9f, 0x5d, 0xc6, 0xea, 0xa6, 0xb6, 0x4a, 0xf0, 0x5a, 0xde, 478 0xaa, 0x54, 0x9d, 0xd5, 0xc1, 0x66, 0xe4, 0x5f, 0x0a, 0x5c, 0x43, 0x25, 0x45, 0x8b, 0x9d, 0x21, 479 0x61, 0xa4, 0xa6, 0x96, 0x86, 0xd6, 0x8d, 0xbc, 0xad, 0xe5, 0x67, 0x31, 0x3e, 0x9d, 0x14, 0xf6, 480 0xd1, 0x98, 0x9e, 0x15, 0x3c, 0x8c, 0x25, 0x9d, 0x51, 0x7b, 0x79, 0x38, 0xc0, 0xe8, 0xdc, 0xd6, 481 0x3a, 0x73, 0x78, 0xe6, 0xb4, 0x8e, 0xd8, 0x7e, 0x76, 0xd4, 0x73, 0xac, 0xe3, 0x9e, 0x63, 0xfd, 482 0xe9, 0x39, 0xd6, 0xe7, 0xbe, 0x53, 0x38, 0xee, 0x3b, 0x85, 0x9f, 0x7d, 0xa7, 0xf0, 0x86, 0x8c, 483 0x5c, 0xf0, 0x43, 0x43, 0xa6, 0x17, 0xdd, 0xbb, 0xaa, 0x7f, 0x1f, 0x1b, 0xff, 0x02, 0x00, 0x00, 484 0xff, 0xff, 0x24, 0x59, 0x9e, 0xa9, 0x02, 0x07, 0x00, 0x00, 485 } 486 487 // Reference imports to suppress errors if they are not otherwise used. 488 var _ context.Context 489 var _ grpc.ClientConn 490 491 // This is a compile-time assertion to ensure that this generated file 492 // is compatible with the grpc package it is being compiled against. 493 const _ = grpc.SupportPackageIsVersion4 494 495 // QueryClient is the client API for Query service. 496 // 497 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 498 type QueryClient interface { 499 // Swapped queries the current swapped status that includes a burnt amount of from-coin and a minted amount of 500 // to-coin. 501 Swapped(ctx context.Context, in *QuerySwappedRequest, opts ...grpc.CallOption) (*QuerySwappedResponse, error) 502 // TotalSwappableToCoinAmount queries the current swappable amount for to-coin. 503 TotalSwappableToCoinAmount(ctx context.Context, in *QueryTotalSwappableToCoinAmountRequest, opts ...grpc.CallOption) (*QueryTotalSwappableToCoinAmountResponse, error) 504 // Swap queries a swap 505 Swap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error) 506 // Swaps queries all the swap that registered 507 Swaps(ctx context.Context, in *QuerySwapsRequest, opts ...grpc.CallOption) (*QuerySwapsResponse, error) 508 } 509 510 type queryClient struct { 511 cc grpc1.ClientConn 512 } 513 514 func NewQueryClient(cc grpc1.ClientConn) QueryClient { 515 return &queryClient{cc} 516 } 517 518 func (c *queryClient) Swapped(ctx context.Context, in *QuerySwappedRequest, opts ...grpc.CallOption) (*QuerySwappedResponse, error) { 519 out := new(QuerySwappedResponse) 520 err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/Swapped", in, out, opts...) 521 if err != nil { 522 return nil, err 523 } 524 return out, nil 525 } 526 527 func (c *queryClient) TotalSwappableToCoinAmount(ctx context.Context, in *QueryTotalSwappableToCoinAmountRequest, opts ...grpc.CallOption) (*QueryTotalSwappableToCoinAmountResponse, error) { 528 out := new(QueryTotalSwappableToCoinAmountResponse) 529 err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/TotalSwappableToCoinAmount", in, out, opts...) 530 if err != nil { 531 return nil, err 532 } 533 return out, nil 534 } 535 536 func (c *queryClient) Swap(ctx context.Context, in *QuerySwapRequest, opts ...grpc.CallOption) (*QuerySwapResponse, error) { 537 out := new(QuerySwapResponse) 538 err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/Swap", in, out, opts...) 539 if err != nil { 540 return nil, err 541 } 542 return out, nil 543 } 544 545 func (c *queryClient) Swaps(ctx context.Context, in *QuerySwapsRequest, opts ...grpc.CallOption) (*QuerySwapsResponse, error) { 546 out := new(QuerySwapsResponse) 547 err := c.cc.Invoke(ctx, "/lbm.fswap.v1.Query/Swaps", in, out, opts...) 548 if err != nil { 549 return nil, err 550 } 551 return out, nil 552 } 553 554 // QueryServer is the server API for Query service. 555 type QueryServer interface { 556 // Swapped queries the current swapped status that includes a burnt amount of from-coin and a minted amount of 557 // to-coin. 558 Swapped(context.Context, *QuerySwappedRequest) (*QuerySwappedResponse, error) 559 // TotalSwappableToCoinAmount queries the current swappable amount for to-coin. 560 TotalSwappableToCoinAmount(context.Context, *QueryTotalSwappableToCoinAmountRequest) (*QueryTotalSwappableToCoinAmountResponse, error) 561 // Swap queries a swap 562 Swap(context.Context, *QuerySwapRequest) (*QuerySwapResponse, error) 563 // Swaps queries all the swap that registered 564 Swaps(context.Context, *QuerySwapsRequest) (*QuerySwapsResponse, error) 565 } 566 567 // UnimplementedQueryServer can be embedded to have forward compatible implementations. 568 type UnimplementedQueryServer struct { 569 } 570 571 func (*UnimplementedQueryServer) Swapped(ctx context.Context, req *QuerySwappedRequest) (*QuerySwappedResponse, error) { 572 return nil, status.Errorf(codes.Unimplemented, "method Swapped not implemented") 573 } 574 func (*UnimplementedQueryServer) TotalSwappableToCoinAmount(ctx context.Context, req *QueryTotalSwappableToCoinAmountRequest) (*QueryTotalSwappableToCoinAmountResponse, error) { 575 return nil, status.Errorf(codes.Unimplemented, "method TotalSwappableToCoinAmount not implemented") 576 } 577 func (*UnimplementedQueryServer) Swap(ctx context.Context, req *QuerySwapRequest) (*QuerySwapResponse, error) { 578 return nil, status.Errorf(codes.Unimplemented, "method Swap not implemented") 579 } 580 func (*UnimplementedQueryServer) Swaps(ctx context.Context, req *QuerySwapsRequest) (*QuerySwapsResponse, error) { 581 return nil, status.Errorf(codes.Unimplemented, "method Swaps not implemented") 582 } 583 584 func RegisterQueryServer(s grpc1.Server, srv QueryServer) { 585 s.RegisterService(&_Query_serviceDesc, srv) 586 } 587 588 func _Query_Swapped_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 589 in := new(QuerySwappedRequest) 590 if err := dec(in); err != nil { 591 return nil, err 592 } 593 if interceptor == nil { 594 return srv.(QueryServer).Swapped(ctx, in) 595 } 596 info := &grpc.UnaryServerInfo{ 597 Server: srv, 598 FullMethod: "/lbm.fswap.v1.Query/Swapped", 599 } 600 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 601 return srv.(QueryServer).Swapped(ctx, req.(*QuerySwappedRequest)) 602 } 603 return interceptor(ctx, in, info, handler) 604 } 605 606 func _Query_TotalSwappableToCoinAmount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 607 in := new(QueryTotalSwappableToCoinAmountRequest) 608 if err := dec(in); err != nil { 609 return nil, err 610 } 611 if interceptor == nil { 612 return srv.(QueryServer).TotalSwappableToCoinAmount(ctx, in) 613 } 614 info := &grpc.UnaryServerInfo{ 615 Server: srv, 616 FullMethod: "/lbm.fswap.v1.Query/TotalSwappableToCoinAmount", 617 } 618 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 619 return srv.(QueryServer).TotalSwappableToCoinAmount(ctx, req.(*QueryTotalSwappableToCoinAmountRequest)) 620 } 621 return interceptor(ctx, in, info, handler) 622 } 623 624 func _Query_Swap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 625 in := new(QuerySwapRequest) 626 if err := dec(in); err != nil { 627 return nil, err 628 } 629 if interceptor == nil { 630 return srv.(QueryServer).Swap(ctx, in) 631 } 632 info := &grpc.UnaryServerInfo{ 633 Server: srv, 634 FullMethod: "/lbm.fswap.v1.Query/Swap", 635 } 636 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 637 return srv.(QueryServer).Swap(ctx, req.(*QuerySwapRequest)) 638 } 639 return interceptor(ctx, in, info, handler) 640 } 641 642 func _Query_Swaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 643 in := new(QuerySwapsRequest) 644 if err := dec(in); err != nil { 645 return nil, err 646 } 647 if interceptor == nil { 648 return srv.(QueryServer).Swaps(ctx, in) 649 } 650 info := &grpc.UnaryServerInfo{ 651 Server: srv, 652 FullMethod: "/lbm.fswap.v1.Query/Swaps", 653 } 654 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 655 return srv.(QueryServer).Swaps(ctx, req.(*QuerySwapsRequest)) 656 } 657 return interceptor(ctx, in, info, handler) 658 } 659 660 var _Query_serviceDesc = grpc.ServiceDesc{ 661 ServiceName: "lbm.fswap.v1.Query", 662 HandlerType: (*QueryServer)(nil), 663 Methods: []grpc.MethodDesc{ 664 { 665 MethodName: "Swapped", 666 Handler: _Query_Swapped_Handler, 667 }, 668 { 669 MethodName: "TotalSwappableToCoinAmount", 670 Handler: _Query_TotalSwappableToCoinAmount_Handler, 671 }, 672 { 673 MethodName: "Swap", 674 Handler: _Query_Swap_Handler, 675 }, 676 { 677 MethodName: "Swaps", 678 Handler: _Query_Swaps_Handler, 679 }, 680 }, 681 Streams: []grpc.StreamDesc{}, 682 Metadata: "lbm/fswap/v1/query.proto", 683 } 684 685 func (m *QuerySwappedRequest) Marshal() (dAtA []byte, err error) { 686 size := m.Size() 687 dAtA = make([]byte, size) 688 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 689 if err != nil { 690 return nil, err 691 } 692 return dAtA[:n], nil 693 } 694 695 func (m *QuerySwappedRequest) MarshalTo(dAtA []byte) (int, error) { 696 size := m.Size() 697 return m.MarshalToSizedBuffer(dAtA[:size]) 698 } 699 700 func (m *QuerySwappedRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 701 i := len(dAtA) 702 _ = i 703 var l int 704 _ = l 705 if len(m.ToDenom) > 0 { 706 i -= len(m.ToDenom) 707 copy(dAtA[i:], m.ToDenom) 708 i = encodeVarintQuery(dAtA, i, uint64(len(m.ToDenom))) 709 i-- 710 dAtA[i] = 0x12 711 } 712 if len(m.FromDenom) > 0 { 713 i -= len(m.FromDenom) 714 copy(dAtA[i:], m.FromDenom) 715 i = encodeVarintQuery(dAtA, i, uint64(len(m.FromDenom))) 716 i-- 717 dAtA[i] = 0xa 718 } 719 return len(dAtA) - i, nil 720 } 721 722 func (m *QuerySwappedResponse) Marshal() (dAtA []byte, err error) { 723 size := m.Size() 724 dAtA = make([]byte, size) 725 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 726 if err != nil { 727 return nil, err 728 } 729 return dAtA[:n], nil 730 } 731 732 func (m *QuerySwappedResponse) MarshalTo(dAtA []byte) (int, error) { 733 size := m.Size() 734 return m.MarshalToSizedBuffer(dAtA[:size]) 735 } 736 737 func (m *QuerySwappedResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 738 i := len(dAtA) 739 _ = i 740 var l int 741 _ = l 742 { 743 size, err := m.ToCoinAmount.MarshalToSizedBuffer(dAtA[:i]) 744 if err != nil { 745 return 0, err 746 } 747 i -= size 748 i = encodeVarintQuery(dAtA, i, uint64(size)) 749 } 750 i-- 751 dAtA[i] = 0x12 752 { 753 size, err := m.FromCoinAmount.MarshalToSizedBuffer(dAtA[:i]) 754 if err != nil { 755 return 0, err 756 } 757 i -= size 758 i = encodeVarintQuery(dAtA, i, uint64(size)) 759 } 760 i-- 761 dAtA[i] = 0xa 762 return len(dAtA) - i, nil 763 } 764 765 func (m *QueryTotalSwappableToCoinAmountRequest) Marshal() (dAtA []byte, err error) { 766 size := m.Size() 767 dAtA = make([]byte, size) 768 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 769 if err != nil { 770 return nil, err 771 } 772 return dAtA[:n], nil 773 } 774 775 func (m *QueryTotalSwappableToCoinAmountRequest) MarshalTo(dAtA []byte) (int, error) { 776 size := m.Size() 777 return m.MarshalToSizedBuffer(dAtA[:size]) 778 } 779 780 func (m *QueryTotalSwappableToCoinAmountRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 781 i := len(dAtA) 782 _ = i 783 var l int 784 _ = l 785 if len(m.ToDenom) > 0 { 786 i -= len(m.ToDenom) 787 copy(dAtA[i:], m.ToDenom) 788 i = encodeVarintQuery(dAtA, i, uint64(len(m.ToDenom))) 789 i-- 790 dAtA[i] = 0x12 791 } 792 if len(m.FromDenom) > 0 { 793 i -= len(m.FromDenom) 794 copy(dAtA[i:], m.FromDenom) 795 i = encodeVarintQuery(dAtA, i, uint64(len(m.FromDenom))) 796 i-- 797 dAtA[i] = 0xa 798 } 799 return len(dAtA) - i, nil 800 } 801 802 func (m *QueryTotalSwappableToCoinAmountResponse) Marshal() (dAtA []byte, err error) { 803 size := m.Size() 804 dAtA = make([]byte, size) 805 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 806 if err != nil { 807 return nil, err 808 } 809 return dAtA[:n], nil 810 } 811 812 func (m *QueryTotalSwappableToCoinAmountResponse) MarshalTo(dAtA []byte) (int, error) { 813 size := m.Size() 814 return m.MarshalToSizedBuffer(dAtA[:size]) 815 } 816 817 func (m *QueryTotalSwappableToCoinAmountResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 818 i := len(dAtA) 819 _ = i 820 var l int 821 _ = l 822 { 823 size, err := m.SwappableAmount.MarshalToSizedBuffer(dAtA[:i]) 824 if err != nil { 825 return 0, err 826 } 827 i -= size 828 i = encodeVarintQuery(dAtA, i, uint64(size)) 829 } 830 i-- 831 dAtA[i] = 0xa 832 return len(dAtA) - i, nil 833 } 834 835 func (m *QuerySwapRequest) Marshal() (dAtA []byte, err error) { 836 size := m.Size() 837 dAtA = make([]byte, size) 838 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 839 if err != nil { 840 return nil, err 841 } 842 return dAtA[:n], nil 843 } 844 845 func (m *QuerySwapRequest) MarshalTo(dAtA []byte) (int, error) { 846 size := m.Size() 847 return m.MarshalToSizedBuffer(dAtA[:size]) 848 } 849 850 func (m *QuerySwapRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 851 i := len(dAtA) 852 _ = i 853 var l int 854 _ = l 855 if len(m.ToDenom) > 0 { 856 i -= len(m.ToDenom) 857 copy(dAtA[i:], m.ToDenom) 858 i = encodeVarintQuery(dAtA, i, uint64(len(m.ToDenom))) 859 i-- 860 dAtA[i] = 0x12 861 } 862 if len(m.FromDenom) > 0 { 863 i -= len(m.FromDenom) 864 copy(dAtA[i:], m.FromDenom) 865 i = encodeVarintQuery(dAtA, i, uint64(len(m.FromDenom))) 866 i-- 867 dAtA[i] = 0xa 868 } 869 return len(dAtA) - i, nil 870 } 871 872 func (m *QuerySwapResponse) Marshal() (dAtA []byte, err error) { 873 size := m.Size() 874 dAtA = make([]byte, size) 875 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 876 if err != nil { 877 return nil, err 878 } 879 return dAtA[:n], nil 880 } 881 882 func (m *QuerySwapResponse) MarshalTo(dAtA []byte) (int, error) { 883 size := m.Size() 884 return m.MarshalToSizedBuffer(dAtA[:size]) 885 } 886 887 func (m *QuerySwapResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 888 i := len(dAtA) 889 _ = i 890 var l int 891 _ = l 892 { 893 size, err := m.Swap.MarshalToSizedBuffer(dAtA[:i]) 894 if err != nil { 895 return 0, err 896 } 897 i -= size 898 i = encodeVarintQuery(dAtA, i, uint64(size)) 899 } 900 i-- 901 dAtA[i] = 0xa 902 return len(dAtA) - i, nil 903 } 904 905 func (m *QuerySwapsRequest) Marshal() (dAtA []byte, err error) { 906 size := m.Size() 907 dAtA = make([]byte, size) 908 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 909 if err != nil { 910 return nil, err 911 } 912 return dAtA[:n], nil 913 } 914 915 func (m *QuerySwapsRequest) MarshalTo(dAtA []byte) (int, error) { 916 size := m.Size() 917 return m.MarshalToSizedBuffer(dAtA[:size]) 918 } 919 920 func (m *QuerySwapsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 921 i := len(dAtA) 922 _ = i 923 var l int 924 _ = l 925 if m.Pagination != nil { 926 { 927 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 928 if err != nil { 929 return 0, err 930 } 931 i -= size 932 i = encodeVarintQuery(dAtA, i, uint64(size)) 933 } 934 i-- 935 dAtA[i] = 0xa 936 } 937 return len(dAtA) - i, nil 938 } 939 940 func (m *QuerySwapsResponse) Marshal() (dAtA []byte, err error) { 941 size := m.Size() 942 dAtA = make([]byte, size) 943 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 944 if err != nil { 945 return nil, err 946 } 947 return dAtA[:n], nil 948 } 949 950 func (m *QuerySwapsResponse) MarshalTo(dAtA []byte) (int, error) { 951 size := m.Size() 952 return m.MarshalToSizedBuffer(dAtA[:size]) 953 } 954 955 func (m *QuerySwapsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 956 i := len(dAtA) 957 _ = i 958 var l int 959 _ = l 960 if m.Pagination != nil { 961 { 962 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 963 if err != nil { 964 return 0, err 965 } 966 i -= size 967 i = encodeVarintQuery(dAtA, i, uint64(size)) 968 } 969 i-- 970 dAtA[i] = 0x12 971 } 972 if len(m.Swaps) > 0 { 973 for iNdEx := len(m.Swaps) - 1; iNdEx >= 0; iNdEx-- { 974 { 975 size, err := m.Swaps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 976 if err != nil { 977 return 0, err 978 } 979 i -= size 980 i = encodeVarintQuery(dAtA, i, uint64(size)) 981 } 982 i-- 983 dAtA[i] = 0xa 984 } 985 } 986 return len(dAtA) - i, nil 987 } 988 989 func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { 990 offset -= sovQuery(v) 991 base := offset 992 for v >= 1<<7 { 993 dAtA[offset] = uint8(v&0x7f | 0x80) 994 v >>= 7 995 offset++ 996 } 997 dAtA[offset] = uint8(v) 998 return base 999 } 1000 func (m *QuerySwappedRequest) Size() (n int) { 1001 if m == nil { 1002 return 0 1003 } 1004 var l int 1005 _ = l 1006 l = len(m.FromDenom) 1007 if l > 0 { 1008 n += 1 + l + sovQuery(uint64(l)) 1009 } 1010 l = len(m.ToDenom) 1011 if l > 0 { 1012 n += 1 + l + sovQuery(uint64(l)) 1013 } 1014 return n 1015 } 1016 1017 func (m *QuerySwappedResponse) Size() (n int) { 1018 if m == nil { 1019 return 0 1020 } 1021 var l int 1022 _ = l 1023 l = m.FromCoinAmount.Size() 1024 n += 1 + l + sovQuery(uint64(l)) 1025 l = m.ToCoinAmount.Size() 1026 n += 1 + l + sovQuery(uint64(l)) 1027 return n 1028 } 1029 1030 func (m *QueryTotalSwappableToCoinAmountRequest) Size() (n int) { 1031 if m == nil { 1032 return 0 1033 } 1034 var l int 1035 _ = l 1036 l = len(m.FromDenom) 1037 if l > 0 { 1038 n += 1 + l + sovQuery(uint64(l)) 1039 } 1040 l = len(m.ToDenom) 1041 if l > 0 { 1042 n += 1 + l + sovQuery(uint64(l)) 1043 } 1044 return n 1045 } 1046 1047 func (m *QueryTotalSwappableToCoinAmountResponse) Size() (n int) { 1048 if m == nil { 1049 return 0 1050 } 1051 var l int 1052 _ = l 1053 l = m.SwappableAmount.Size() 1054 n += 1 + l + sovQuery(uint64(l)) 1055 return n 1056 } 1057 1058 func (m *QuerySwapRequest) Size() (n int) { 1059 if m == nil { 1060 return 0 1061 } 1062 var l int 1063 _ = l 1064 l = len(m.FromDenom) 1065 if l > 0 { 1066 n += 1 + l + sovQuery(uint64(l)) 1067 } 1068 l = len(m.ToDenom) 1069 if l > 0 { 1070 n += 1 + l + sovQuery(uint64(l)) 1071 } 1072 return n 1073 } 1074 1075 func (m *QuerySwapResponse) Size() (n int) { 1076 if m == nil { 1077 return 0 1078 } 1079 var l int 1080 _ = l 1081 l = m.Swap.Size() 1082 n += 1 + l + sovQuery(uint64(l)) 1083 return n 1084 } 1085 1086 func (m *QuerySwapsRequest) Size() (n int) { 1087 if m == nil { 1088 return 0 1089 } 1090 var l int 1091 _ = l 1092 if m.Pagination != nil { 1093 l = m.Pagination.Size() 1094 n += 1 + l + sovQuery(uint64(l)) 1095 } 1096 return n 1097 } 1098 1099 func (m *QuerySwapsResponse) Size() (n int) { 1100 if m == nil { 1101 return 0 1102 } 1103 var l int 1104 _ = l 1105 if len(m.Swaps) > 0 { 1106 for _, e := range m.Swaps { 1107 l = e.Size() 1108 n += 1 + l + sovQuery(uint64(l)) 1109 } 1110 } 1111 if m.Pagination != nil { 1112 l = m.Pagination.Size() 1113 n += 1 + l + sovQuery(uint64(l)) 1114 } 1115 return n 1116 } 1117 1118 func sovQuery(x uint64) (n int) { 1119 return (math_bits.Len64(x|1) + 6) / 7 1120 } 1121 func sozQuery(x uint64) (n int) { 1122 return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1123 } 1124 func (m *QuerySwappedRequest) Unmarshal(dAtA []byte) error { 1125 l := len(dAtA) 1126 iNdEx := 0 1127 for iNdEx < l { 1128 preIndex := iNdEx 1129 var wire uint64 1130 for shift := uint(0); ; shift += 7 { 1131 if shift >= 64 { 1132 return ErrIntOverflowQuery 1133 } 1134 if iNdEx >= l { 1135 return io.ErrUnexpectedEOF 1136 } 1137 b := dAtA[iNdEx] 1138 iNdEx++ 1139 wire |= uint64(b&0x7F) << shift 1140 if b < 0x80 { 1141 break 1142 } 1143 } 1144 fieldNum := int32(wire >> 3) 1145 wireType := int(wire & 0x7) 1146 if wireType == 4 { 1147 return fmt.Errorf("proto: QuerySwappedRequest: wiretype end group for non-group") 1148 } 1149 if fieldNum <= 0 { 1150 return fmt.Errorf("proto: QuerySwappedRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1151 } 1152 switch fieldNum { 1153 case 1: 1154 if wireType != 2 { 1155 return fmt.Errorf("proto: wrong wireType = %d for field FromDenom", wireType) 1156 } 1157 var stringLen uint64 1158 for shift := uint(0); ; shift += 7 { 1159 if shift >= 64 { 1160 return ErrIntOverflowQuery 1161 } 1162 if iNdEx >= l { 1163 return io.ErrUnexpectedEOF 1164 } 1165 b := dAtA[iNdEx] 1166 iNdEx++ 1167 stringLen |= uint64(b&0x7F) << shift 1168 if b < 0x80 { 1169 break 1170 } 1171 } 1172 intStringLen := int(stringLen) 1173 if intStringLen < 0 { 1174 return ErrInvalidLengthQuery 1175 } 1176 postIndex := iNdEx + intStringLen 1177 if postIndex < 0 { 1178 return ErrInvalidLengthQuery 1179 } 1180 if postIndex > l { 1181 return io.ErrUnexpectedEOF 1182 } 1183 m.FromDenom = string(dAtA[iNdEx:postIndex]) 1184 iNdEx = postIndex 1185 case 2: 1186 if wireType != 2 { 1187 return fmt.Errorf("proto: wrong wireType = %d for field ToDenom", wireType) 1188 } 1189 var stringLen uint64 1190 for shift := uint(0); ; shift += 7 { 1191 if shift >= 64 { 1192 return ErrIntOverflowQuery 1193 } 1194 if iNdEx >= l { 1195 return io.ErrUnexpectedEOF 1196 } 1197 b := dAtA[iNdEx] 1198 iNdEx++ 1199 stringLen |= uint64(b&0x7F) << shift 1200 if b < 0x80 { 1201 break 1202 } 1203 } 1204 intStringLen := int(stringLen) 1205 if intStringLen < 0 { 1206 return ErrInvalidLengthQuery 1207 } 1208 postIndex := iNdEx + intStringLen 1209 if postIndex < 0 { 1210 return ErrInvalidLengthQuery 1211 } 1212 if postIndex > l { 1213 return io.ErrUnexpectedEOF 1214 } 1215 m.ToDenom = string(dAtA[iNdEx:postIndex]) 1216 iNdEx = postIndex 1217 default: 1218 iNdEx = preIndex 1219 skippy, err := skipQuery(dAtA[iNdEx:]) 1220 if err != nil { 1221 return err 1222 } 1223 if (skippy < 0) || (iNdEx+skippy) < 0 { 1224 return ErrInvalidLengthQuery 1225 } 1226 if (iNdEx + skippy) > l { 1227 return io.ErrUnexpectedEOF 1228 } 1229 iNdEx += skippy 1230 } 1231 } 1232 1233 if iNdEx > l { 1234 return io.ErrUnexpectedEOF 1235 } 1236 return nil 1237 } 1238 func (m *QuerySwappedResponse) Unmarshal(dAtA []byte) error { 1239 l := len(dAtA) 1240 iNdEx := 0 1241 for iNdEx < l { 1242 preIndex := iNdEx 1243 var wire uint64 1244 for shift := uint(0); ; shift += 7 { 1245 if shift >= 64 { 1246 return ErrIntOverflowQuery 1247 } 1248 if iNdEx >= l { 1249 return io.ErrUnexpectedEOF 1250 } 1251 b := dAtA[iNdEx] 1252 iNdEx++ 1253 wire |= uint64(b&0x7F) << shift 1254 if b < 0x80 { 1255 break 1256 } 1257 } 1258 fieldNum := int32(wire >> 3) 1259 wireType := int(wire & 0x7) 1260 if wireType == 4 { 1261 return fmt.Errorf("proto: QuerySwappedResponse: wiretype end group for non-group") 1262 } 1263 if fieldNum <= 0 { 1264 return fmt.Errorf("proto: QuerySwappedResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1265 } 1266 switch fieldNum { 1267 case 1: 1268 if wireType != 2 { 1269 return fmt.Errorf("proto: wrong wireType = %d for field FromCoinAmount", wireType) 1270 } 1271 var msglen int 1272 for shift := uint(0); ; shift += 7 { 1273 if shift >= 64 { 1274 return ErrIntOverflowQuery 1275 } 1276 if iNdEx >= l { 1277 return io.ErrUnexpectedEOF 1278 } 1279 b := dAtA[iNdEx] 1280 iNdEx++ 1281 msglen |= int(b&0x7F) << shift 1282 if b < 0x80 { 1283 break 1284 } 1285 } 1286 if msglen < 0 { 1287 return ErrInvalidLengthQuery 1288 } 1289 postIndex := iNdEx + msglen 1290 if postIndex < 0 { 1291 return ErrInvalidLengthQuery 1292 } 1293 if postIndex > l { 1294 return io.ErrUnexpectedEOF 1295 } 1296 if err := m.FromCoinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1297 return err 1298 } 1299 iNdEx = postIndex 1300 case 2: 1301 if wireType != 2 { 1302 return fmt.Errorf("proto: wrong wireType = %d for field ToCoinAmount", wireType) 1303 } 1304 var msglen int 1305 for shift := uint(0); ; shift += 7 { 1306 if shift >= 64 { 1307 return ErrIntOverflowQuery 1308 } 1309 if iNdEx >= l { 1310 return io.ErrUnexpectedEOF 1311 } 1312 b := dAtA[iNdEx] 1313 iNdEx++ 1314 msglen |= int(b&0x7F) << shift 1315 if b < 0x80 { 1316 break 1317 } 1318 } 1319 if msglen < 0 { 1320 return ErrInvalidLengthQuery 1321 } 1322 postIndex := iNdEx + msglen 1323 if postIndex < 0 { 1324 return ErrInvalidLengthQuery 1325 } 1326 if postIndex > l { 1327 return io.ErrUnexpectedEOF 1328 } 1329 if err := m.ToCoinAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1330 return err 1331 } 1332 iNdEx = postIndex 1333 default: 1334 iNdEx = preIndex 1335 skippy, err := skipQuery(dAtA[iNdEx:]) 1336 if err != nil { 1337 return err 1338 } 1339 if (skippy < 0) || (iNdEx+skippy) < 0 { 1340 return ErrInvalidLengthQuery 1341 } 1342 if (iNdEx + skippy) > l { 1343 return io.ErrUnexpectedEOF 1344 } 1345 iNdEx += skippy 1346 } 1347 } 1348 1349 if iNdEx > l { 1350 return io.ErrUnexpectedEOF 1351 } 1352 return nil 1353 } 1354 func (m *QueryTotalSwappableToCoinAmountRequest) Unmarshal(dAtA []byte) error { 1355 l := len(dAtA) 1356 iNdEx := 0 1357 for iNdEx < l { 1358 preIndex := iNdEx 1359 var wire uint64 1360 for shift := uint(0); ; shift += 7 { 1361 if shift >= 64 { 1362 return ErrIntOverflowQuery 1363 } 1364 if iNdEx >= l { 1365 return io.ErrUnexpectedEOF 1366 } 1367 b := dAtA[iNdEx] 1368 iNdEx++ 1369 wire |= uint64(b&0x7F) << shift 1370 if b < 0x80 { 1371 break 1372 } 1373 } 1374 fieldNum := int32(wire >> 3) 1375 wireType := int(wire & 0x7) 1376 if wireType == 4 { 1377 return fmt.Errorf("proto: QueryTotalSwappableToCoinAmountRequest: wiretype end group for non-group") 1378 } 1379 if fieldNum <= 0 { 1380 return fmt.Errorf("proto: QueryTotalSwappableToCoinAmountRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1381 } 1382 switch fieldNum { 1383 case 1: 1384 if wireType != 2 { 1385 return fmt.Errorf("proto: wrong wireType = %d for field FromDenom", wireType) 1386 } 1387 var stringLen uint64 1388 for shift := uint(0); ; shift += 7 { 1389 if shift >= 64 { 1390 return ErrIntOverflowQuery 1391 } 1392 if iNdEx >= l { 1393 return io.ErrUnexpectedEOF 1394 } 1395 b := dAtA[iNdEx] 1396 iNdEx++ 1397 stringLen |= uint64(b&0x7F) << shift 1398 if b < 0x80 { 1399 break 1400 } 1401 } 1402 intStringLen := int(stringLen) 1403 if intStringLen < 0 { 1404 return ErrInvalidLengthQuery 1405 } 1406 postIndex := iNdEx + intStringLen 1407 if postIndex < 0 { 1408 return ErrInvalidLengthQuery 1409 } 1410 if postIndex > l { 1411 return io.ErrUnexpectedEOF 1412 } 1413 m.FromDenom = string(dAtA[iNdEx:postIndex]) 1414 iNdEx = postIndex 1415 case 2: 1416 if wireType != 2 { 1417 return fmt.Errorf("proto: wrong wireType = %d for field ToDenom", wireType) 1418 } 1419 var stringLen uint64 1420 for shift := uint(0); ; shift += 7 { 1421 if shift >= 64 { 1422 return ErrIntOverflowQuery 1423 } 1424 if iNdEx >= l { 1425 return io.ErrUnexpectedEOF 1426 } 1427 b := dAtA[iNdEx] 1428 iNdEx++ 1429 stringLen |= uint64(b&0x7F) << shift 1430 if b < 0x80 { 1431 break 1432 } 1433 } 1434 intStringLen := int(stringLen) 1435 if intStringLen < 0 { 1436 return ErrInvalidLengthQuery 1437 } 1438 postIndex := iNdEx + intStringLen 1439 if postIndex < 0 { 1440 return ErrInvalidLengthQuery 1441 } 1442 if postIndex > l { 1443 return io.ErrUnexpectedEOF 1444 } 1445 m.ToDenom = string(dAtA[iNdEx:postIndex]) 1446 iNdEx = postIndex 1447 default: 1448 iNdEx = preIndex 1449 skippy, err := skipQuery(dAtA[iNdEx:]) 1450 if err != nil { 1451 return err 1452 } 1453 if (skippy < 0) || (iNdEx+skippy) < 0 { 1454 return ErrInvalidLengthQuery 1455 } 1456 if (iNdEx + skippy) > l { 1457 return io.ErrUnexpectedEOF 1458 } 1459 iNdEx += skippy 1460 } 1461 } 1462 1463 if iNdEx > l { 1464 return io.ErrUnexpectedEOF 1465 } 1466 return nil 1467 } 1468 func (m *QueryTotalSwappableToCoinAmountResponse) Unmarshal(dAtA []byte) error { 1469 l := len(dAtA) 1470 iNdEx := 0 1471 for iNdEx < l { 1472 preIndex := iNdEx 1473 var wire uint64 1474 for shift := uint(0); ; shift += 7 { 1475 if shift >= 64 { 1476 return ErrIntOverflowQuery 1477 } 1478 if iNdEx >= l { 1479 return io.ErrUnexpectedEOF 1480 } 1481 b := dAtA[iNdEx] 1482 iNdEx++ 1483 wire |= uint64(b&0x7F) << shift 1484 if b < 0x80 { 1485 break 1486 } 1487 } 1488 fieldNum := int32(wire >> 3) 1489 wireType := int(wire & 0x7) 1490 if wireType == 4 { 1491 return fmt.Errorf("proto: QueryTotalSwappableToCoinAmountResponse: wiretype end group for non-group") 1492 } 1493 if fieldNum <= 0 { 1494 return fmt.Errorf("proto: QueryTotalSwappableToCoinAmountResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1495 } 1496 switch fieldNum { 1497 case 1: 1498 if wireType != 2 { 1499 return fmt.Errorf("proto: wrong wireType = %d for field SwappableAmount", wireType) 1500 } 1501 var msglen int 1502 for shift := uint(0); ; shift += 7 { 1503 if shift >= 64 { 1504 return ErrIntOverflowQuery 1505 } 1506 if iNdEx >= l { 1507 return io.ErrUnexpectedEOF 1508 } 1509 b := dAtA[iNdEx] 1510 iNdEx++ 1511 msglen |= int(b&0x7F) << shift 1512 if b < 0x80 { 1513 break 1514 } 1515 } 1516 if msglen < 0 { 1517 return ErrInvalidLengthQuery 1518 } 1519 postIndex := iNdEx + msglen 1520 if postIndex < 0 { 1521 return ErrInvalidLengthQuery 1522 } 1523 if postIndex > l { 1524 return io.ErrUnexpectedEOF 1525 } 1526 if err := m.SwappableAmount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1527 return err 1528 } 1529 iNdEx = postIndex 1530 default: 1531 iNdEx = preIndex 1532 skippy, err := skipQuery(dAtA[iNdEx:]) 1533 if err != nil { 1534 return err 1535 } 1536 if (skippy < 0) || (iNdEx+skippy) < 0 { 1537 return ErrInvalidLengthQuery 1538 } 1539 if (iNdEx + skippy) > l { 1540 return io.ErrUnexpectedEOF 1541 } 1542 iNdEx += skippy 1543 } 1544 } 1545 1546 if iNdEx > l { 1547 return io.ErrUnexpectedEOF 1548 } 1549 return nil 1550 } 1551 func (m *QuerySwapRequest) Unmarshal(dAtA []byte) error { 1552 l := len(dAtA) 1553 iNdEx := 0 1554 for iNdEx < l { 1555 preIndex := iNdEx 1556 var wire uint64 1557 for shift := uint(0); ; shift += 7 { 1558 if shift >= 64 { 1559 return ErrIntOverflowQuery 1560 } 1561 if iNdEx >= l { 1562 return io.ErrUnexpectedEOF 1563 } 1564 b := dAtA[iNdEx] 1565 iNdEx++ 1566 wire |= uint64(b&0x7F) << shift 1567 if b < 0x80 { 1568 break 1569 } 1570 } 1571 fieldNum := int32(wire >> 3) 1572 wireType := int(wire & 0x7) 1573 if wireType == 4 { 1574 return fmt.Errorf("proto: QuerySwapRequest: wiretype end group for non-group") 1575 } 1576 if fieldNum <= 0 { 1577 return fmt.Errorf("proto: QuerySwapRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1578 } 1579 switch fieldNum { 1580 case 1: 1581 if wireType != 2 { 1582 return fmt.Errorf("proto: wrong wireType = %d for field FromDenom", wireType) 1583 } 1584 var stringLen uint64 1585 for shift := uint(0); ; shift += 7 { 1586 if shift >= 64 { 1587 return ErrIntOverflowQuery 1588 } 1589 if iNdEx >= l { 1590 return io.ErrUnexpectedEOF 1591 } 1592 b := dAtA[iNdEx] 1593 iNdEx++ 1594 stringLen |= uint64(b&0x7F) << shift 1595 if b < 0x80 { 1596 break 1597 } 1598 } 1599 intStringLen := int(stringLen) 1600 if intStringLen < 0 { 1601 return ErrInvalidLengthQuery 1602 } 1603 postIndex := iNdEx + intStringLen 1604 if postIndex < 0 { 1605 return ErrInvalidLengthQuery 1606 } 1607 if postIndex > l { 1608 return io.ErrUnexpectedEOF 1609 } 1610 m.FromDenom = string(dAtA[iNdEx:postIndex]) 1611 iNdEx = postIndex 1612 case 2: 1613 if wireType != 2 { 1614 return fmt.Errorf("proto: wrong wireType = %d for field ToDenom", wireType) 1615 } 1616 var stringLen uint64 1617 for shift := uint(0); ; shift += 7 { 1618 if shift >= 64 { 1619 return ErrIntOverflowQuery 1620 } 1621 if iNdEx >= l { 1622 return io.ErrUnexpectedEOF 1623 } 1624 b := dAtA[iNdEx] 1625 iNdEx++ 1626 stringLen |= uint64(b&0x7F) << shift 1627 if b < 0x80 { 1628 break 1629 } 1630 } 1631 intStringLen := int(stringLen) 1632 if intStringLen < 0 { 1633 return ErrInvalidLengthQuery 1634 } 1635 postIndex := iNdEx + intStringLen 1636 if postIndex < 0 { 1637 return ErrInvalidLengthQuery 1638 } 1639 if postIndex > l { 1640 return io.ErrUnexpectedEOF 1641 } 1642 m.ToDenom = string(dAtA[iNdEx:postIndex]) 1643 iNdEx = postIndex 1644 default: 1645 iNdEx = preIndex 1646 skippy, err := skipQuery(dAtA[iNdEx:]) 1647 if err != nil { 1648 return err 1649 } 1650 if (skippy < 0) || (iNdEx+skippy) < 0 { 1651 return ErrInvalidLengthQuery 1652 } 1653 if (iNdEx + skippy) > l { 1654 return io.ErrUnexpectedEOF 1655 } 1656 iNdEx += skippy 1657 } 1658 } 1659 1660 if iNdEx > l { 1661 return io.ErrUnexpectedEOF 1662 } 1663 return nil 1664 } 1665 func (m *QuerySwapResponse) Unmarshal(dAtA []byte) error { 1666 l := len(dAtA) 1667 iNdEx := 0 1668 for iNdEx < l { 1669 preIndex := iNdEx 1670 var wire uint64 1671 for shift := uint(0); ; shift += 7 { 1672 if shift >= 64 { 1673 return ErrIntOverflowQuery 1674 } 1675 if iNdEx >= l { 1676 return io.ErrUnexpectedEOF 1677 } 1678 b := dAtA[iNdEx] 1679 iNdEx++ 1680 wire |= uint64(b&0x7F) << shift 1681 if b < 0x80 { 1682 break 1683 } 1684 } 1685 fieldNum := int32(wire >> 3) 1686 wireType := int(wire & 0x7) 1687 if wireType == 4 { 1688 return fmt.Errorf("proto: QuerySwapResponse: wiretype end group for non-group") 1689 } 1690 if fieldNum <= 0 { 1691 return fmt.Errorf("proto: QuerySwapResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1692 } 1693 switch fieldNum { 1694 case 1: 1695 if wireType != 2 { 1696 return fmt.Errorf("proto: wrong wireType = %d for field Swap", wireType) 1697 } 1698 var msglen int 1699 for shift := uint(0); ; shift += 7 { 1700 if shift >= 64 { 1701 return ErrIntOverflowQuery 1702 } 1703 if iNdEx >= l { 1704 return io.ErrUnexpectedEOF 1705 } 1706 b := dAtA[iNdEx] 1707 iNdEx++ 1708 msglen |= int(b&0x7F) << shift 1709 if b < 0x80 { 1710 break 1711 } 1712 } 1713 if msglen < 0 { 1714 return ErrInvalidLengthQuery 1715 } 1716 postIndex := iNdEx + msglen 1717 if postIndex < 0 { 1718 return ErrInvalidLengthQuery 1719 } 1720 if postIndex > l { 1721 return io.ErrUnexpectedEOF 1722 } 1723 if err := m.Swap.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1724 return err 1725 } 1726 iNdEx = postIndex 1727 default: 1728 iNdEx = preIndex 1729 skippy, err := skipQuery(dAtA[iNdEx:]) 1730 if err != nil { 1731 return err 1732 } 1733 if (skippy < 0) || (iNdEx+skippy) < 0 { 1734 return ErrInvalidLengthQuery 1735 } 1736 if (iNdEx + skippy) > l { 1737 return io.ErrUnexpectedEOF 1738 } 1739 iNdEx += skippy 1740 } 1741 } 1742 1743 if iNdEx > l { 1744 return io.ErrUnexpectedEOF 1745 } 1746 return nil 1747 } 1748 func (m *QuerySwapsRequest) Unmarshal(dAtA []byte) error { 1749 l := len(dAtA) 1750 iNdEx := 0 1751 for iNdEx < l { 1752 preIndex := iNdEx 1753 var wire uint64 1754 for shift := uint(0); ; shift += 7 { 1755 if shift >= 64 { 1756 return ErrIntOverflowQuery 1757 } 1758 if iNdEx >= l { 1759 return io.ErrUnexpectedEOF 1760 } 1761 b := dAtA[iNdEx] 1762 iNdEx++ 1763 wire |= uint64(b&0x7F) << shift 1764 if b < 0x80 { 1765 break 1766 } 1767 } 1768 fieldNum := int32(wire >> 3) 1769 wireType := int(wire & 0x7) 1770 if wireType == 4 { 1771 return fmt.Errorf("proto: QuerySwapsRequest: wiretype end group for non-group") 1772 } 1773 if fieldNum <= 0 { 1774 return fmt.Errorf("proto: QuerySwapsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1775 } 1776 switch fieldNum { 1777 case 1: 1778 if wireType != 2 { 1779 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1780 } 1781 var msglen int 1782 for shift := uint(0); ; shift += 7 { 1783 if shift >= 64 { 1784 return ErrIntOverflowQuery 1785 } 1786 if iNdEx >= l { 1787 return io.ErrUnexpectedEOF 1788 } 1789 b := dAtA[iNdEx] 1790 iNdEx++ 1791 msglen |= int(b&0x7F) << shift 1792 if b < 0x80 { 1793 break 1794 } 1795 } 1796 if msglen < 0 { 1797 return ErrInvalidLengthQuery 1798 } 1799 postIndex := iNdEx + msglen 1800 if postIndex < 0 { 1801 return ErrInvalidLengthQuery 1802 } 1803 if postIndex > l { 1804 return io.ErrUnexpectedEOF 1805 } 1806 if m.Pagination == nil { 1807 m.Pagination = &query.PageRequest{} 1808 } 1809 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1810 return err 1811 } 1812 iNdEx = postIndex 1813 default: 1814 iNdEx = preIndex 1815 skippy, err := skipQuery(dAtA[iNdEx:]) 1816 if err != nil { 1817 return err 1818 } 1819 if (skippy < 0) || (iNdEx+skippy) < 0 { 1820 return ErrInvalidLengthQuery 1821 } 1822 if (iNdEx + skippy) > l { 1823 return io.ErrUnexpectedEOF 1824 } 1825 iNdEx += skippy 1826 } 1827 } 1828 1829 if iNdEx > l { 1830 return io.ErrUnexpectedEOF 1831 } 1832 return nil 1833 } 1834 func (m *QuerySwapsResponse) Unmarshal(dAtA []byte) error { 1835 l := len(dAtA) 1836 iNdEx := 0 1837 for iNdEx < l { 1838 preIndex := iNdEx 1839 var wire uint64 1840 for shift := uint(0); ; shift += 7 { 1841 if shift >= 64 { 1842 return ErrIntOverflowQuery 1843 } 1844 if iNdEx >= l { 1845 return io.ErrUnexpectedEOF 1846 } 1847 b := dAtA[iNdEx] 1848 iNdEx++ 1849 wire |= uint64(b&0x7F) << shift 1850 if b < 0x80 { 1851 break 1852 } 1853 } 1854 fieldNum := int32(wire >> 3) 1855 wireType := int(wire & 0x7) 1856 if wireType == 4 { 1857 return fmt.Errorf("proto: QuerySwapsResponse: wiretype end group for non-group") 1858 } 1859 if fieldNum <= 0 { 1860 return fmt.Errorf("proto: QuerySwapsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1861 } 1862 switch fieldNum { 1863 case 1: 1864 if wireType != 2 { 1865 return fmt.Errorf("proto: wrong wireType = %d for field Swaps", wireType) 1866 } 1867 var msglen int 1868 for shift := uint(0); ; shift += 7 { 1869 if shift >= 64 { 1870 return ErrIntOverflowQuery 1871 } 1872 if iNdEx >= l { 1873 return io.ErrUnexpectedEOF 1874 } 1875 b := dAtA[iNdEx] 1876 iNdEx++ 1877 msglen |= int(b&0x7F) << shift 1878 if b < 0x80 { 1879 break 1880 } 1881 } 1882 if msglen < 0 { 1883 return ErrInvalidLengthQuery 1884 } 1885 postIndex := iNdEx + msglen 1886 if postIndex < 0 { 1887 return ErrInvalidLengthQuery 1888 } 1889 if postIndex > l { 1890 return io.ErrUnexpectedEOF 1891 } 1892 m.Swaps = append(m.Swaps, Swap{}) 1893 if err := m.Swaps[len(m.Swaps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1894 return err 1895 } 1896 iNdEx = postIndex 1897 case 2: 1898 if wireType != 2 { 1899 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1900 } 1901 var msglen int 1902 for shift := uint(0); ; shift += 7 { 1903 if shift >= 64 { 1904 return ErrIntOverflowQuery 1905 } 1906 if iNdEx >= l { 1907 return io.ErrUnexpectedEOF 1908 } 1909 b := dAtA[iNdEx] 1910 iNdEx++ 1911 msglen |= int(b&0x7F) << shift 1912 if b < 0x80 { 1913 break 1914 } 1915 } 1916 if msglen < 0 { 1917 return ErrInvalidLengthQuery 1918 } 1919 postIndex := iNdEx + msglen 1920 if postIndex < 0 { 1921 return ErrInvalidLengthQuery 1922 } 1923 if postIndex > l { 1924 return io.ErrUnexpectedEOF 1925 } 1926 if m.Pagination == nil { 1927 m.Pagination = &query.PageResponse{} 1928 } 1929 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1930 return err 1931 } 1932 iNdEx = postIndex 1933 default: 1934 iNdEx = preIndex 1935 skippy, err := skipQuery(dAtA[iNdEx:]) 1936 if err != nil { 1937 return err 1938 } 1939 if (skippy < 0) || (iNdEx+skippy) < 0 { 1940 return ErrInvalidLengthQuery 1941 } 1942 if (iNdEx + skippy) > l { 1943 return io.ErrUnexpectedEOF 1944 } 1945 iNdEx += skippy 1946 } 1947 } 1948 1949 if iNdEx > l { 1950 return io.ErrUnexpectedEOF 1951 } 1952 return nil 1953 } 1954 func skipQuery(dAtA []byte) (n int, err error) { 1955 l := len(dAtA) 1956 iNdEx := 0 1957 depth := 0 1958 for iNdEx < l { 1959 var wire uint64 1960 for shift := uint(0); ; shift += 7 { 1961 if shift >= 64 { 1962 return 0, ErrIntOverflowQuery 1963 } 1964 if iNdEx >= l { 1965 return 0, io.ErrUnexpectedEOF 1966 } 1967 b := dAtA[iNdEx] 1968 iNdEx++ 1969 wire |= (uint64(b) & 0x7F) << shift 1970 if b < 0x80 { 1971 break 1972 } 1973 } 1974 wireType := int(wire & 0x7) 1975 switch wireType { 1976 case 0: 1977 for shift := uint(0); ; shift += 7 { 1978 if shift >= 64 { 1979 return 0, ErrIntOverflowQuery 1980 } 1981 if iNdEx >= l { 1982 return 0, io.ErrUnexpectedEOF 1983 } 1984 iNdEx++ 1985 if dAtA[iNdEx-1] < 0x80 { 1986 break 1987 } 1988 } 1989 case 1: 1990 iNdEx += 8 1991 case 2: 1992 var length int 1993 for shift := uint(0); ; shift += 7 { 1994 if shift >= 64 { 1995 return 0, ErrIntOverflowQuery 1996 } 1997 if iNdEx >= l { 1998 return 0, io.ErrUnexpectedEOF 1999 } 2000 b := dAtA[iNdEx] 2001 iNdEx++ 2002 length |= (int(b) & 0x7F) << shift 2003 if b < 0x80 { 2004 break 2005 } 2006 } 2007 if length < 0 { 2008 return 0, ErrInvalidLengthQuery 2009 } 2010 iNdEx += length 2011 case 3: 2012 depth++ 2013 case 4: 2014 if depth == 0 { 2015 return 0, ErrUnexpectedEndOfGroupQuery 2016 } 2017 depth-- 2018 case 5: 2019 iNdEx += 4 2020 default: 2021 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2022 } 2023 if iNdEx < 0 { 2024 return 0, ErrInvalidLengthQuery 2025 } 2026 if depth == 0 { 2027 return iNdEx, nil 2028 } 2029 } 2030 return 0, io.ErrUnexpectedEOF 2031 } 2032 2033 var ( 2034 ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") 2035 ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") 2036 ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") 2037 )