github.com/Finschia/finschia-sdk@v0.48.1/types/tx/service.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/tx/v1beta1/service.proto 3 4 package tx 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 golang_proto "github.com/golang/protobuf/proto" 15 types1 "github.com/tendermint/tendermint/proto/tendermint/types" 16 _ "google.golang.org/genproto/googleapis/api/annotations" 17 grpc "google.golang.org/grpc" 18 codes "google.golang.org/grpc/codes" 19 status "google.golang.org/grpc/status" 20 io "io" 21 math "math" 22 math_bits "math/bits" 23 ) 24 25 // Reference imports to suppress errors if they are not otherwise used. 26 var _ = proto.Marshal 27 var _ = golang_proto.Marshal 28 var _ = fmt.Errorf 29 var _ = math.Inf 30 31 // This is a compile-time assertion to ensure that this generated file 32 // is compatible with the proto package it is being compiled against. 33 // A compilation error at this line likely means your copy of the 34 // proto package needs to be updated. 35 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 36 37 // OrderBy defines the sorting order 38 type OrderBy int32 39 40 const ( 41 // ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. 42 OrderBy_ORDER_BY_UNSPECIFIED OrderBy = 0 43 // ORDER_BY_ASC defines ascending order 44 OrderBy_ORDER_BY_ASC OrderBy = 1 45 // ORDER_BY_DESC defines descending order 46 OrderBy_ORDER_BY_DESC OrderBy = 2 47 ) 48 49 var OrderBy_name = map[int32]string{ 50 0: "ORDER_BY_UNSPECIFIED", 51 1: "ORDER_BY_ASC", 52 2: "ORDER_BY_DESC", 53 } 54 55 var OrderBy_value = map[string]int32{ 56 "ORDER_BY_UNSPECIFIED": 0, 57 "ORDER_BY_ASC": 1, 58 "ORDER_BY_DESC": 2, 59 } 60 61 func (x OrderBy) String() string { 62 return proto.EnumName(OrderBy_name, int32(x)) 63 } 64 65 func (OrderBy) EnumDescriptor() ([]byte, []int) { 66 return fileDescriptor_e0b00a618705eca7, []int{0} 67 } 68 69 // BroadcastMode specifies the broadcast mode for the TxService.Broadcast RPC method. 70 type BroadcastMode int32 71 72 const ( 73 // zero-value for mode ordering 74 BroadcastMode_BROADCAST_MODE_UNSPECIFIED BroadcastMode = 0 75 // DEPRECATED: use BROADCAST_MODE_SYNC instead, 76 BroadcastMode_BROADCAST_MODE_BLOCK BroadcastMode = 1 // Deprecated: Do not use. 77 // BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for 78 // a CheckTx execution response only. 79 BroadcastMode_BROADCAST_MODE_SYNC BroadcastMode = 2 80 // BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns 81 // immediately. 82 BroadcastMode_BROADCAST_MODE_ASYNC BroadcastMode = 3 83 ) 84 85 var BroadcastMode_name = map[int32]string{ 86 0: "BROADCAST_MODE_UNSPECIFIED", 87 1: "BROADCAST_MODE_BLOCK", 88 2: "BROADCAST_MODE_SYNC", 89 3: "BROADCAST_MODE_ASYNC", 90 } 91 92 var BroadcastMode_value = map[string]int32{ 93 "BROADCAST_MODE_UNSPECIFIED": 0, 94 "BROADCAST_MODE_BLOCK": 1, 95 "BROADCAST_MODE_SYNC": 2, 96 "BROADCAST_MODE_ASYNC": 3, 97 } 98 99 func (x BroadcastMode) String() string { 100 return proto.EnumName(BroadcastMode_name, int32(x)) 101 } 102 103 func (BroadcastMode) EnumDescriptor() ([]byte, []int) { 104 return fileDescriptor_e0b00a618705eca7, []int{1} 105 } 106 107 // GetTxsEventRequest is the request type for the Service.TxsByEvents 108 // RPC method. 109 type GetTxsEventRequest struct { 110 // events is the list of transaction event type. 111 Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` 112 // pagination defines a pagination for the request. 113 Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 114 OrderBy OrderBy `protobuf:"varint,3,opt,name=order_by,json=orderBy,proto3,enum=cosmos.tx.v1beta1.OrderBy" json:"order_by,omitempty"` 115 } 116 117 func (m *GetTxsEventRequest) Reset() { *m = GetTxsEventRequest{} } 118 func (m *GetTxsEventRequest) String() string { return proto.CompactTextString(m) } 119 func (*GetTxsEventRequest) ProtoMessage() {} 120 func (*GetTxsEventRequest) Descriptor() ([]byte, []int) { 121 return fileDescriptor_e0b00a618705eca7, []int{0} 122 } 123 func (m *GetTxsEventRequest) XXX_Unmarshal(b []byte) error { 124 return m.Unmarshal(b) 125 } 126 func (m *GetTxsEventRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 127 if deterministic { 128 return xxx_messageInfo_GetTxsEventRequest.Marshal(b, m, deterministic) 129 } else { 130 b = b[:cap(b)] 131 n, err := m.MarshalToSizedBuffer(b) 132 if err != nil { 133 return nil, err 134 } 135 return b[:n], nil 136 } 137 } 138 func (m *GetTxsEventRequest) XXX_Merge(src proto.Message) { 139 xxx_messageInfo_GetTxsEventRequest.Merge(m, src) 140 } 141 func (m *GetTxsEventRequest) XXX_Size() int { 142 return m.Size() 143 } 144 func (m *GetTxsEventRequest) XXX_DiscardUnknown() { 145 xxx_messageInfo_GetTxsEventRequest.DiscardUnknown(m) 146 } 147 148 var xxx_messageInfo_GetTxsEventRequest proto.InternalMessageInfo 149 150 func (m *GetTxsEventRequest) GetEvents() []string { 151 if m != nil { 152 return m.Events 153 } 154 return nil 155 } 156 157 func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { 158 if m != nil { 159 return m.Pagination 160 } 161 return nil 162 } 163 164 func (m *GetTxsEventRequest) GetOrderBy() OrderBy { 165 if m != nil { 166 return m.OrderBy 167 } 168 return OrderBy_ORDER_BY_UNSPECIFIED 169 } 170 171 // GetTxsEventResponse is the response type for the Service.TxsByEvents 172 // RPC method. 173 type GetTxsEventResponse struct { 174 // txs is the list of queried transactions. 175 Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` 176 // tx_responses is the list of queried TxResponses. 177 TxResponses []*types.TxResponse `protobuf:"bytes,2,rep,name=tx_responses,json=txResponses,proto3" json:"tx_responses,omitempty"` 178 // pagination defines a pagination for the response. 179 Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` 180 } 181 182 func (m *GetTxsEventResponse) Reset() { *m = GetTxsEventResponse{} } 183 func (m *GetTxsEventResponse) String() string { return proto.CompactTextString(m) } 184 func (*GetTxsEventResponse) ProtoMessage() {} 185 func (*GetTxsEventResponse) Descriptor() ([]byte, []int) { 186 return fileDescriptor_e0b00a618705eca7, []int{1} 187 } 188 func (m *GetTxsEventResponse) XXX_Unmarshal(b []byte) error { 189 return m.Unmarshal(b) 190 } 191 func (m *GetTxsEventResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 192 if deterministic { 193 return xxx_messageInfo_GetTxsEventResponse.Marshal(b, m, deterministic) 194 } else { 195 b = b[:cap(b)] 196 n, err := m.MarshalToSizedBuffer(b) 197 if err != nil { 198 return nil, err 199 } 200 return b[:n], nil 201 } 202 } 203 func (m *GetTxsEventResponse) XXX_Merge(src proto.Message) { 204 xxx_messageInfo_GetTxsEventResponse.Merge(m, src) 205 } 206 func (m *GetTxsEventResponse) XXX_Size() int { 207 return m.Size() 208 } 209 func (m *GetTxsEventResponse) XXX_DiscardUnknown() { 210 xxx_messageInfo_GetTxsEventResponse.DiscardUnknown(m) 211 } 212 213 var xxx_messageInfo_GetTxsEventResponse proto.InternalMessageInfo 214 215 func (m *GetTxsEventResponse) GetTxs() []*Tx { 216 if m != nil { 217 return m.Txs 218 } 219 return nil 220 } 221 222 func (m *GetTxsEventResponse) GetTxResponses() []*types.TxResponse { 223 if m != nil { 224 return m.TxResponses 225 } 226 return nil 227 } 228 229 func (m *GetTxsEventResponse) GetPagination() *query.PageResponse { 230 if m != nil { 231 return m.Pagination 232 } 233 return nil 234 } 235 236 // BroadcastTxRequest is the request type for the Service.BroadcastTxRequest 237 // RPC method. 238 type BroadcastTxRequest struct { 239 // tx_bytes is the raw transaction. 240 TxBytes []byte `protobuf:"bytes,1,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` 241 Mode BroadcastMode `protobuf:"varint,2,opt,name=mode,proto3,enum=cosmos.tx.v1beta1.BroadcastMode" json:"mode,omitempty"` 242 } 243 244 func (m *BroadcastTxRequest) Reset() { *m = BroadcastTxRequest{} } 245 func (m *BroadcastTxRequest) String() string { return proto.CompactTextString(m) } 246 func (*BroadcastTxRequest) ProtoMessage() {} 247 func (*BroadcastTxRequest) Descriptor() ([]byte, []int) { 248 return fileDescriptor_e0b00a618705eca7, []int{2} 249 } 250 func (m *BroadcastTxRequest) XXX_Unmarshal(b []byte) error { 251 return m.Unmarshal(b) 252 } 253 func (m *BroadcastTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 254 if deterministic { 255 return xxx_messageInfo_BroadcastTxRequest.Marshal(b, m, deterministic) 256 } else { 257 b = b[:cap(b)] 258 n, err := m.MarshalToSizedBuffer(b) 259 if err != nil { 260 return nil, err 261 } 262 return b[:n], nil 263 } 264 } 265 func (m *BroadcastTxRequest) XXX_Merge(src proto.Message) { 266 xxx_messageInfo_BroadcastTxRequest.Merge(m, src) 267 } 268 func (m *BroadcastTxRequest) XXX_Size() int { 269 return m.Size() 270 } 271 func (m *BroadcastTxRequest) XXX_DiscardUnknown() { 272 xxx_messageInfo_BroadcastTxRequest.DiscardUnknown(m) 273 } 274 275 var xxx_messageInfo_BroadcastTxRequest proto.InternalMessageInfo 276 277 func (m *BroadcastTxRequest) GetTxBytes() []byte { 278 if m != nil { 279 return m.TxBytes 280 } 281 return nil 282 } 283 284 func (m *BroadcastTxRequest) GetMode() BroadcastMode { 285 if m != nil { 286 return m.Mode 287 } 288 return BroadcastMode_BROADCAST_MODE_UNSPECIFIED 289 } 290 291 // BroadcastTxResponse is the response type for the 292 // Service.BroadcastTx method. 293 type BroadcastTxResponse struct { 294 // tx_response is the queried TxResponses. 295 TxResponse *types.TxResponse `protobuf:"bytes,1,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"` 296 } 297 298 func (m *BroadcastTxResponse) Reset() { *m = BroadcastTxResponse{} } 299 func (m *BroadcastTxResponse) String() string { return proto.CompactTextString(m) } 300 func (*BroadcastTxResponse) ProtoMessage() {} 301 func (*BroadcastTxResponse) Descriptor() ([]byte, []int) { 302 return fileDescriptor_e0b00a618705eca7, []int{3} 303 } 304 func (m *BroadcastTxResponse) XXX_Unmarshal(b []byte) error { 305 return m.Unmarshal(b) 306 } 307 func (m *BroadcastTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 308 if deterministic { 309 return xxx_messageInfo_BroadcastTxResponse.Marshal(b, m, deterministic) 310 } else { 311 b = b[:cap(b)] 312 n, err := m.MarshalToSizedBuffer(b) 313 if err != nil { 314 return nil, err 315 } 316 return b[:n], nil 317 } 318 } 319 func (m *BroadcastTxResponse) XXX_Merge(src proto.Message) { 320 xxx_messageInfo_BroadcastTxResponse.Merge(m, src) 321 } 322 func (m *BroadcastTxResponse) XXX_Size() int { 323 return m.Size() 324 } 325 func (m *BroadcastTxResponse) XXX_DiscardUnknown() { 326 xxx_messageInfo_BroadcastTxResponse.DiscardUnknown(m) 327 } 328 329 var xxx_messageInfo_BroadcastTxResponse proto.InternalMessageInfo 330 331 func (m *BroadcastTxResponse) GetTxResponse() *types.TxResponse { 332 if m != nil { 333 return m.TxResponse 334 } 335 return nil 336 } 337 338 // SimulateRequest is the request type for the Service.Simulate 339 // RPC method. 340 type SimulateRequest struct { 341 // tx is the transaction to simulate. 342 // Deprecated. Send raw tx bytes instead. 343 Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` // Deprecated: Do not use. 344 // tx_bytes is the raw transaction. 345 // 346 // Since: cosmos-sdk 0.43 347 TxBytes []byte `protobuf:"bytes,2,opt,name=tx_bytes,json=txBytes,proto3" json:"tx_bytes,omitempty"` 348 } 349 350 func (m *SimulateRequest) Reset() { *m = SimulateRequest{} } 351 func (m *SimulateRequest) String() string { return proto.CompactTextString(m) } 352 func (*SimulateRequest) ProtoMessage() {} 353 func (*SimulateRequest) Descriptor() ([]byte, []int) { 354 return fileDescriptor_e0b00a618705eca7, []int{4} 355 } 356 func (m *SimulateRequest) XXX_Unmarshal(b []byte) error { 357 return m.Unmarshal(b) 358 } 359 func (m *SimulateRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 360 if deterministic { 361 return xxx_messageInfo_SimulateRequest.Marshal(b, m, deterministic) 362 } else { 363 b = b[:cap(b)] 364 n, err := m.MarshalToSizedBuffer(b) 365 if err != nil { 366 return nil, err 367 } 368 return b[:n], nil 369 } 370 } 371 func (m *SimulateRequest) XXX_Merge(src proto.Message) { 372 xxx_messageInfo_SimulateRequest.Merge(m, src) 373 } 374 func (m *SimulateRequest) XXX_Size() int { 375 return m.Size() 376 } 377 func (m *SimulateRequest) XXX_DiscardUnknown() { 378 xxx_messageInfo_SimulateRequest.DiscardUnknown(m) 379 } 380 381 var xxx_messageInfo_SimulateRequest proto.InternalMessageInfo 382 383 // Deprecated: Do not use. 384 func (m *SimulateRequest) GetTx() *Tx { 385 if m != nil { 386 return m.Tx 387 } 388 return nil 389 } 390 391 func (m *SimulateRequest) GetTxBytes() []byte { 392 if m != nil { 393 return m.TxBytes 394 } 395 return nil 396 } 397 398 // SimulateResponse is the response type for the 399 // Service.SimulateRPC method. 400 type SimulateResponse struct { 401 // gas_info is the information about gas used in the simulation. 402 GasInfo *types.GasInfo `protobuf:"bytes,1,opt,name=gas_info,json=gasInfo,proto3" json:"gas_info,omitempty"` 403 // result is the result of the simulation. 404 Result *types.Result `protobuf:"bytes,2,opt,name=result,proto3" json:"result,omitempty"` 405 } 406 407 func (m *SimulateResponse) Reset() { *m = SimulateResponse{} } 408 func (m *SimulateResponse) String() string { return proto.CompactTextString(m) } 409 func (*SimulateResponse) ProtoMessage() {} 410 func (*SimulateResponse) Descriptor() ([]byte, []int) { 411 return fileDescriptor_e0b00a618705eca7, []int{5} 412 } 413 func (m *SimulateResponse) XXX_Unmarshal(b []byte) error { 414 return m.Unmarshal(b) 415 } 416 func (m *SimulateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 417 if deterministic { 418 return xxx_messageInfo_SimulateResponse.Marshal(b, m, deterministic) 419 } else { 420 b = b[:cap(b)] 421 n, err := m.MarshalToSizedBuffer(b) 422 if err != nil { 423 return nil, err 424 } 425 return b[:n], nil 426 } 427 } 428 func (m *SimulateResponse) XXX_Merge(src proto.Message) { 429 xxx_messageInfo_SimulateResponse.Merge(m, src) 430 } 431 func (m *SimulateResponse) XXX_Size() int { 432 return m.Size() 433 } 434 func (m *SimulateResponse) XXX_DiscardUnknown() { 435 xxx_messageInfo_SimulateResponse.DiscardUnknown(m) 436 } 437 438 var xxx_messageInfo_SimulateResponse proto.InternalMessageInfo 439 440 func (m *SimulateResponse) GetGasInfo() *types.GasInfo { 441 if m != nil { 442 return m.GasInfo 443 } 444 return nil 445 } 446 447 func (m *SimulateResponse) GetResult() *types.Result { 448 if m != nil { 449 return m.Result 450 } 451 return nil 452 } 453 454 // GetTxRequest is the request type for the Service.GetTx 455 // RPC method. 456 type GetTxRequest struct { 457 // hash is the tx hash to query, encoded as a hex string. 458 Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` 459 } 460 461 func (m *GetTxRequest) Reset() { *m = GetTxRequest{} } 462 func (m *GetTxRequest) String() string { return proto.CompactTextString(m) } 463 func (*GetTxRequest) ProtoMessage() {} 464 func (*GetTxRequest) Descriptor() ([]byte, []int) { 465 return fileDescriptor_e0b00a618705eca7, []int{6} 466 } 467 func (m *GetTxRequest) XXX_Unmarshal(b []byte) error { 468 return m.Unmarshal(b) 469 } 470 func (m *GetTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 471 if deterministic { 472 return xxx_messageInfo_GetTxRequest.Marshal(b, m, deterministic) 473 } else { 474 b = b[:cap(b)] 475 n, err := m.MarshalToSizedBuffer(b) 476 if err != nil { 477 return nil, err 478 } 479 return b[:n], nil 480 } 481 } 482 func (m *GetTxRequest) XXX_Merge(src proto.Message) { 483 xxx_messageInfo_GetTxRequest.Merge(m, src) 484 } 485 func (m *GetTxRequest) XXX_Size() int { 486 return m.Size() 487 } 488 func (m *GetTxRequest) XXX_DiscardUnknown() { 489 xxx_messageInfo_GetTxRequest.DiscardUnknown(m) 490 } 491 492 var xxx_messageInfo_GetTxRequest proto.InternalMessageInfo 493 494 func (m *GetTxRequest) GetHash() string { 495 if m != nil { 496 return m.Hash 497 } 498 return "" 499 } 500 501 // GetTxResponse is the response type for the Service.GetTx method. 502 type GetTxResponse struct { 503 // tx is the queried transaction. 504 Tx *Tx `protobuf:"bytes,1,opt,name=tx,proto3" json:"tx,omitempty"` 505 // tx_response is the queried TxResponses. 506 TxResponse *types.TxResponse `protobuf:"bytes,2,opt,name=tx_response,json=txResponse,proto3" json:"tx_response,omitempty"` 507 } 508 509 func (m *GetTxResponse) Reset() { *m = GetTxResponse{} } 510 func (m *GetTxResponse) String() string { return proto.CompactTextString(m) } 511 func (*GetTxResponse) ProtoMessage() {} 512 func (*GetTxResponse) Descriptor() ([]byte, []int) { 513 return fileDescriptor_e0b00a618705eca7, []int{7} 514 } 515 func (m *GetTxResponse) XXX_Unmarshal(b []byte) error { 516 return m.Unmarshal(b) 517 } 518 func (m *GetTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 519 if deterministic { 520 return xxx_messageInfo_GetTxResponse.Marshal(b, m, deterministic) 521 } else { 522 b = b[:cap(b)] 523 n, err := m.MarshalToSizedBuffer(b) 524 if err != nil { 525 return nil, err 526 } 527 return b[:n], nil 528 } 529 } 530 func (m *GetTxResponse) XXX_Merge(src proto.Message) { 531 xxx_messageInfo_GetTxResponse.Merge(m, src) 532 } 533 func (m *GetTxResponse) XXX_Size() int { 534 return m.Size() 535 } 536 func (m *GetTxResponse) XXX_DiscardUnknown() { 537 xxx_messageInfo_GetTxResponse.DiscardUnknown(m) 538 } 539 540 var xxx_messageInfo_GetTxResponse proto.InternalMessageInfo 541 542 func (m *GetTxResponse) GetTx() *Tx { 543 if m != nil { 544 return m.Tx 545 } 546 return nil 547 } 548 549 func (m *GetTxResponse) GetTxResponse() *types.TxResponse { 550 if m != nil { 551 return m.TxResponse 552 } 553 return nil 554 } 555 556 // GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs 557 // RPC method. 558 // 559 // Since: cosmos-sdk 0.45.2 560 type GetBlockWithTxsRequest struct { 561 // height is the height of the block to query. 562 Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` 563 // pagination defines a pagination for the request. 564 Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` 565 } 566 567 func (m *GetBlockWithTxsRequest) Reset() { *m = GetBlockWithTxsRequest{} } 568 func (m *GetBlockWithTxsRequest) String() string { return proto.CompactTextString(m) } 569 func (*GetBlockWithTxsRequest) ProtoMessage() {} 570 func (*GetBlockWithTxsRequest) Descriptor() ([]byte, []int) { 571 return fileDescriptor_e0b00a618705eca7, []int{8} 572 } 573 func (m *GetBlockWithTxsRequest) XXX_Unmarshal(b []byte) error { 574 return m.Unmarshal(b) 575 } 576 func (m *GetBlockWithTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 577 if deterministic { 578 return xxx_messageInfo_GetBlockWithTxsRequest.Marshal(b, m, deterministic) 579 } else { 580 b = b[:cap(b)] 581 n, err := m.MarshalToSizedBuffer(b) 582 if err != nil { 583 return nil, err 584 } 585 return b[:n], nil 586 } 587 } 588 func (m *GetBlockWithTxsRequest) XXX_Merge(src proto.Message) { 589 xxx_messageInfo_GetBlockWithTxsRequest.Merge(m, src) 590 } 591 func (m *GetBlockWithTxsRequest) XXX_Size() int { 592 return m.Size() 593 } 594 func (m *GetBlockWithTxsRequest) XXX_DiscardUnknown() { 595 xxx_messageInfo_GetBlockWithTxsRequest.DiscardUnknown(m) 596 } 597 598 var xxx_messageInfo_GetBlockWithTxsRequest proto.InternalMessageInfo 599 600 func (m *GetBlockWithTxsRequest) GetHeight() int64 { 601 if m != nil { 602 return m.Height 603 } 604 return 0 605 } 606 607 func (m *GetBlockWithTxsRequest) GetPagination() *query.PageRequest { 608 if m != nil { 609 return m.Pagination 610 } 611 return nil 612 } 613 614 // GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. 615 // 616 // Since: cosmos-sdk 0.45.2 617 type GetBlockWithTxsResponse struct { 618 // txs are the transactions in the block. 619 Txs []*Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` 620 BlockId *types1.BlockID `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` 621 Block *types1.Block `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"` 622 // pagination defines a pagination for the response. 623 Pagination *query.PageResponse `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` 624 } 625 626 func (m *GetBlockWithTxsResponse) Reset() { *m = GetBlockWithTxsResponse{} } 627 func (m *GetBlockWithTxsResponse) String() string { return proto.CompactTextString(m) } 628 func (*GetBlockWithTxsResponse) ProtoMessage() {} 629 func (*GetBlockWithTxsResponse) Descriptor() ([]byte, []int) { 630 return fileDescriptor_e0b00a618705eca7, []int{9} 631 } 632 func (m *GetBlockWithTxsResponse) XXX_Unmarshal(b []byte) error { 633 return m.Unmarshal(b) 634 } 635 func (m *GetBlockWithTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 636 if deterministic { 637 return xxx_messageInfo_GetBlockWithTxsResponse.Marshal(b, m, deterministic) 638 } else { 639 b = b[:cap(b)] 640 n, err := m.MarshalToSizedBuffer(b) 641 if err != nil { 642 return nil, err 643 } 644 return b[:n], nil 645 } 646 } 647 func (m *GetBlockWithTxsResponse) XXX_Merge(src proto.Message) { 648 xxx_messageInfo_GetBlockWithTxsResponse.Merge(m, src) 649 } 650 func (m *GetBlockWithTxsResponse) XXX_Size() int { 651 return m.Size() 652 } 653 func (m *GetBlockWithTxsResponse) XXX_DiscardUnknown() { 654 xxx_messageInfo_GetBlockWithTxsResponse.DiscardUnknown(m) 655 } 656 657 var xxx_messageInfo_GetBlockWithTxsResponse proto.InternalMessageInfo 658 659 func (m *GetBlockWithTxsResponse) GetTxs() []*Tx { 660 if m != nil { 661 return m.Txs 662 } 663 return nil 664 } 665 666 func (m *GetBlockWithTxsResponse) GetBlockId() *types1.BlockID { 667 if m != nil { 668 return m.BlockId 669 } 670 return nil 671 } 672 673 func (m *GetBlockWithTxsResponse) GetBlock() *types1.Block { 674 if m != nil { 675 return m.Block 676 } 677 return nil 678 } 679 680 func (m *GetBlockWithTxsResponse) GetPagination() *query.PageResponse { 681 if m != nil { 682 return m.Pagination 683 } 684 return nil 685 } 686 687 func init() { 688 proto.RegisterEnum("cosmos.tx.v1beta1.OrderBy", OrderBy_name, OrderBy_value) 689 golang_proto.RegisterEnum("cosmos.tx.v1beta1.OrderBy", OrderBy_name, OrderBy_value) 690 proto.RegisterEnum("cosmos.tx.v1beta1.BroadcastMode", BroadcastMode_name, BroadcastMode_value) 691 golang_proto.RegisterEnum("cosmos.tx.v1beta1.BroadcastMode", BroadcastMode_name, BroadcastMode_value) 692 proto.RegisterType((*GetTxsEventRequest)(nil), "cosmos.tx.v1beta1.GetTxsEventRequest") 693 golang_proto.RegisterType((*GetTxsEventRequest)(nil), "cosmos.tx.v1beta1.GetTxsEventRequest") 694 proto.RegisterType((*GetTxsEventResponse)(nil), "cosmos.tx.v1beta1.GetTxsEventResponse") 695 golang_proto.RegisterType((*GetTxsEventResponse)(nil), "cosmos.tx.v1beta1.GetTxsEventResponse") 696 proto.RegisterType((*BroadcastTxRequest)(nil), "cosmos.tx.v1beta1.BroadcastTxRequest") 697 golang_proto.RegisterType((*BroadcastTxRequest)(nil), "cosmos.tx.v1beta1.BroadcastTxRequest") 698 proto.RegisterType((*BroadcastTxResponse)(nil), "cosmos.tx.v1beta1.BroadcastTxResponse") 699 golang_proto.RegisterType((*BroadcastTxResponse)(nil), "cosmos.tx.v1beta1.BroadcastTxResponse") 700 proto.RegisterType((*SimulateRequest)(nil), "cosmos.tx.v1beta1.SimulateRequest") 701 golang_proto.RegisterType((*SimulateRequest)(nil), "cosmos.tx.v1beta1.SimulateRequest") 702 proto.RegisterType((*SimulateResponse)(nil), "cosmos.tx.v1beta1.SimulateResponse") 703 golang_proto.RegisterType((*SimulateResponse)(nil), "cosmos.tx.v1beta1.SimulateResponse") 704 proto.RegisterType((*GetTxRequest)(nil), "cosmos.tx.v1beta1.GetTxRequest") 705 golang_proto.RegisterType((*GetTxRequest)(nil), "cosmos.tx.v1beta1.GetTxRequest") 706 proto.RegisterType((*GetTxResponse)(nil), "cosmos.tx.v1beta1.GetTxResponse") 707 golang_proto.RegisterType((*GetTxResponse)(nil), "cosmos.tx.v1beta1.GetTxResponse") 708 proto.RegisterType((*GetBlockWithTxsRequest)(nil), "cosmos.tx.v1beta1.GetBlockWithTxsRequest") 709 golang_proto.RegisterType((*GetBlockWithTxsRequest)(nil), "cosmos.tx.v1beta1.GetBlockWithTxsRequest") 710 proto.RegisterType((*GetBlockWithTxsResponse)(nil), "cosmos.tx.v1beta1.GetBlockWithTxsResponse") 711 golang_proto.RegisterType((*GetBlockWithTxsResponse)(nil), "cosmos.tx.v1beta1.GetBlockWithTxsResponse") 712 } 713 714 func init() { proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) } 715 func init() { 716 golang_proto.RegisterFile("cosmos/tx/v1beta1/service.proto", fileDescriptor_e0b00a618705eca7) 717 } 718 719 var fileDescriptor_e0b00a618705eca7 = []byte{ 720 // 988 bytes of a gzipped FileDescriptorProto 721 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4f, 0x6f, 0x1b, 0x45, 722 0x14, 0xcf, 0xae, 0x93, 0xd8, 0x7d, 0x4e, 0x5a, 0x77, 0x12, 0x12, 0xd7, 0x0d, 0x8e, 0xbb, 0x25, 723 0xff, 0x2c, 0x65, 0x57, 0x35, 0x45, 0x42, 0x88, 0x4b, 0xfc, 0x27, 0xc6, 0x82, 0xd6, 0xd5, 0x38, 724 0xa8, 0x2a, 0x42, 0xb2, 0xd6, 0xf6, 0x64, 0xbd, 0x6a, 0xbc, 0xe3, 0x78, 0xc6, 0xd1, 0x5a, 0x21, 725 0x02, 0x71, 0xe4, 0x84, 0xe0, 0xc0, 0x87, 0xe0, 0x4b, 0x70, 0xe4, 0x18, 0x89, 0x0b, 0x47, 0x94, 726 0xf0, 0x01, 0xf8, 0x08, 0x68, 0x67, 0xc7, 0xf6, 0xda, 0x59, 0x37, 0xa5, 0xe2, 0x62, 0xbd, 0xf1, 727 0xfb, 0xbd, 0xf7, 0x7e, 0xf3, 0x66, 0x7e, 0x6f, 0x16, 0x36, 0x9b, 0x94, 0x75, 0x28, 0x33, 0xb8, 728 0x6b, 0x9c, 0x3d, 0x69, 0x10, 0x6e, 0x3e, 0x31, 0x18, 0xe9, 0x9d, 0xd9, 0x4d, 0xa2, 0x77, 0x7b, 729 0x94, 0x53, 0x74, 0xdf, 0x07, 0xe8, 0xdc, 0xd5, 0x25, 0x20, 0xb5, 0x61, 0x51, 0x6a, 0x9d, 0x10, 730 0xc3, 0xec, 0xda, 0x86, 0xe9, 0x38, 0x94, 0x9b, 0xdc, 0xa6, 0x0e, 0xf3, 0x03, 0x52, 0x8f, 0x65, 731 0xc6, 0x86, 0xc9, 0x88, 0x61, 0x36, 0x9a, 0xf6, 0x28, 0xb1, 0xb7, 0x90, 0xa0, 0xd4, 0xcd, 0xb2, 732 0xdc, 0x95, 0xbe, 0x55, 0x8b, 0x5a, 0x54, 0x98, 0x86, 0x67, 0xc9, 0x7f, 0xb3, 0xc1, 0xb4, 0xa7, 733 0x7d, 0xd2, 0x1b, 0x8c, 0x22, 0xbb, 0xa6, 0x65, 0x3b, 0x82, 0x83, 0xc4, 0x6e, 0x70, 0xe2, 0xb4, 734 0x48, 0xaf, 0x63, 0x3b, 0xdc, 0xe0, 0x83, 0x2e, 0x61, 0x46, 0xe3, 0x84, 0x36, 0x5f, 0xcf, 0xf4, 735 0x8a, 0x5f, 0xdf, 0xab, 0xfd, 0xaa, 0x00, 0x2a, 0x13, 0x7e, 0xe4, 0xb2, 0xd2, 0x19, 0x71, 0x38, 736 0x26, 0xa7, 0x7d, 0xc2, 0x38, 0x5a, 0x83, 0x45, 0xe2, 0xad, 0x59, 0x52, 0xc9, 0x44, 0x76, 0xef, 737 0x60, 0xb9, 0x42, 0x87, 0x00, 0xe3, 0xf2, 0x49, 0x35, 0xa3, 0xec, 0xc6, 0x73, 0xdb, 0xba, 0xec, 738 0x99, 0xc7, 0x55, 0x17, 0x5c, 0x87, 0xbd, 0xd3, 0x5f, 0x98, 0x16, 0x91, 0x39, 0x71, 0x20, 0x12, 739 0x7d, 0x04, 0x31, 0xda, 0x6b, 0x91, 0x5e, 0xbd, 0x31, 0x48, 0x46, 0x32, 0xca, 0xee, 0xdd, 0x5c, 740 0x4a, 0xbf, 0xd1, 0x79, 0xbd, 0xea, 0x41, 0xf2, 0x03, 0x1c, 0xa5, 0xbe, 0xa1, 0x5d, 0x2a, 0xb0, 741 0x32, 0xc1, 0x96, 0x75, 0xa9, 0xc3, 0x08, 0xda, 0x81, 0x08, 0x77, 0x7d, 0xae, 0xf1, 0xdc, 0x7b, 742 0x21, 0x99, 0x8e, 0x5c, 0xec, 0x21, 0x50, 0x19, 0x96, 0xb8, 0x5b, 0xef, 0xc9, 0x38, 0x96, 0x54, 743 0x45, 0xc4, 0x07, 0x13, 0x3b, 0x10, 0xe7, 0x16, 0x08, 0x94, 0x60, 0x1c, 0xe7, 0x23, 0xdb, 0x4b, 744 0x14, 0x6c, 0x44, 0x44, 0x34, 0x62, 0xe7, 0xd6, 0x46, 0xc8, 0x4c, 0x81, 0x50, 0x8d, 0x00, 0xca, 745 0xf7, 0xa8, 0xd9, 0x6a, 0x9a, 0x8c, 0x7b, 0xc5, 0xfc, 0xfe, 0x3f, 0x80, 0x18, 0x77, 0xeb, 0x8d, 746 0x01, 0x27, 0xde, 0xae, 0x94, 0xdd, 0x25, 0x1c, 0xe5, 0x6e, 0xde, 0x5b, 0xa2, 0xa7, 0x30, 0xdf, 747 0xa1, 0x2d, 0x22, 0x9a, 0x7f, 0x37, 0x97, 0x09, 0xd9, 0xec, 0x28, 0xdf, 0x33, 0xda, 0x22, 0x58, 748 0xa0, 0xb5, 0xaf, 0x61, 0x65, 0xa2, 0x8c, 0x6c, 0x5c, 0x09, 0xe2, 0x81, 0x7e, 0x88, 0x52, 0x6f, 749 0xdb, 0x0e, 0x18, 0xb7, 0x43, 0x7b, 0x09, 0xf7, 0x6a, 0x76, 0xa7, 0x7f, 0x62, 0xf2, 0xe1, 0x69, 750 0xa3, 0x3d, 0x50, 0xb9, 0x2b, 0x13, 0x86, 0x9f, 0x48, 0x5e, 0x4d, 0x2a, 0x58, 0xe5, 0xee, 0xc4, 751 0x66, 0xd5, 0x89, 0xcd, 0x6a, 0x3f, 0x28, 0x90, 0x18, 0x67, 0x96, 0xa4, 0x3f, 0x85, 0x98, 0x65, 752 0xb2, 0xba, 0xed, 0x1c, 0x53, 0x59, 0xe0, 0xd1, 0x6c, 0xc6, 0x65, 0x93, 0x55, 0x9c, 0x63, 0x8a, 753 0xa3, 0x96, 0x6f, 0xa0, 0x8f, 0x61, 0xb1, 0x47, 0x58, 0xff, 0x84, 0xcb, 0xeb, 0x9b, 0x99, 0x1d, 754 0x8b, 0x05, 0x0e, 0x4b, 0xbc, 0xa6, 0xc1, 0x92, 0xb8, 0x7c, 0xc3, 0x2d, 0x22, 0x98, 0x6f, 0x9b, 755 0xac, 0x2d, 0x38, 0xdc, 0xc1, 0xc2, 0xd6, 0x2e, 0x60, 0x59, 0x62, 0x24, 0xd9, 0xad, 0x5b, 0xfb, 756 0x20, 0x7a, 0x30, 0x75, 0x10, 0xea, 0x3b, 0x1e, 0x84, 0x0b, 0x6b, 0x65, 0xc2, 0xf3, 0x9e, 0xfc, 757 0x5f, 0xda, 0xbc, 0x7d, 0xe4, 0xb2, 0x80, 0xa2, 0xdb, 0xc4, 0xb6, 0xda, 0x5c, 0x70, 0x89, 0x60, 758 0xb9, 0xfa, 0xbf, 0x14, 0xad, 0xfd, 0xa3, 0xc0, 0xfa, 0x8d, 0xd2, 0xff, 0x55, 0x9e, 0x4f, 0x21, 759 0x26, 0x46, 0x57, 0xdd, 0x6e, 0x49, 0x2a, 0x0f, 0xf4, 0xf1, 0xf8, 0xd2, 0xfd, 0xc1, 0x25, 0x4a, 760 0x54, 0x8a, 0x38, 0x2a, 0xa0, 0x95, 0x16, 0xda, 0x87, 0x05, 0x61, 0x4a, 0x19, 0xae, 0xcf, 0x08, 761 0xc1, 0x3e, 0x6a, 0x4a, 0xba, 0xf3, 0xef, 0x2c, 0xdd, 0xec, 0x67, 0x10, 0x95, 0x13, 0x0a, 0x25, 762 0x61, 0xb5, 0x8a, 0x8b, 0x25, 0x5c, 0xcf, 0xbf, 0xaa, 0x7f, 0xf9, 0xbc, 0xf6, 0xa2, 0x54, 0xa8, 763 0x1c, 0x56, 0x4a, 0xc5, 0xc4, 0x1c, 0x4a, 0xc0, 0xd2, 0xc8, 0x73, 0x50, 0x2b, 0x24, 0x14, 0x74, 764 0x1f, 0x96, 0x47, 0xff, 0x14, 0x4b, 0xb5, 0x42, 0x42, 0xcd, 0x7e, 0xa7, 0xc0, 0xf2, 0x84, 0x6a, 765 0x51, 0x1a, 0x52, 0x79, 0x5c, 0x3d, 0x28, 0x16, 0x0e, 0x6a, 0x47, 0xf5, 0x67, 0xd5, 0x62, 0x69, 766 0x2a, 0xed, 0x06, 0xac, 0x4e, 0xf9, 0xf3, 0x5f, 0x54, 0x0b, 0x9f, 0x27, 0x94, 0x94, 0x1a, 0x53, 767 0xd0, 0x3a, 0xac, 0x4c, 0x79, 0x6b, 0xaf, 0x9e, 0x17, 0x12, 0xaa, 0xc7, 0x73, 0xca, 0x71, 0x20, 768 0x3c, 0x91, 0xdc, 0x4f, 0x0b, 0x10, 0xad, 0xf9, 0x4f, 0x21, 0x3a, 0x87, 0xd8, 0x50, 0x74, 0x48, 769 0x0b, 0x39, 0xae, 0x29, 0xad, 0xa7, 0x1e, 0xbf, 0x11, 0x23, 0xaf, 0xe6, 0xf6, 0xf7, 0x7f, 0xfc, 770 0xfd, 0xb3, 0x9a, 0xd1, 0x1e, 0x1a, 0x21, 0x6f, 0xb0, 0x04, 0x7f, 0xa2, 0x64, 0xd1, 0x29, 0x2c, 771 0x08, 0x05, 0xa1, 0xcd, 0x90, 0xac, 0x41, 0xfd, 0xa5, 0x32, 0xb3, 0x01, 0xb2, 0xe6, 0x96, 0xa8, 772 0xb9, 0x89, 0xde, 0x37, 0xc2, 0x1e, 0x60, 0x66, 0x9c, 0x7b, 0x9a, 0xbd, 0x40, 0xdf, 0x42, 0x3c, 773 0x30, 0x1c, 0xd1, 0xd6, 0x9b, 0x66, 0xea, 0xb8, 0xfc, 0xf6, 0x6d, 0x30, 0x49, 0xe2, 0x91, 0x20, 774 0xf1, 0x50, 0x5b, 0x0b, 0x27, 0xe1, 0xed, 0xf9, 0x1b, 0x88, 0x07, 0x9e, 0xb5, 0x50, 0x02, 0x37, 775 0x1f, 0xe9, 0x50, 0x02, 0x21, 0xaf, 0xa3, 0x96, 0x16, 0x04, 0x92, 0x68, 0x06, 0x01, 0xf4, 0x8b, 776 0x02, 0xf7, 0xa6, 0xa4, 0x8b, 0xf6, 0xc2, 0x73, 0x87, 0x4c, 0x96, 0x54, 0xf6, 0x6d, 0xa0, 0x92, 777 0xca, 0xbe, 0xa0, 0xb2, 0x83, 0xb6, 0x66, 0x1c, 0x88, 0x50, 0xa8, 0x71, 0xee, 0xcf, 0xa6, 0x8b, 778 0x7c, 0xf9, 0xf7, 0xab, 0xb4, 0x72, 0x79, 0x95, 0x56, 0xfe, 0xba, 0x4a, 0x2b, 0x3f, 0x5e, 0xa7, 779 0xe7, 0x7e, 0xbb, 0x4e, 0x2b, 0x97, 0xd7, 0xe9, 0xb9, 0x3f, 0xaf, 0xd3, 0x73, 0x5f, 0xed, 0x59, 780 0x36, 0x6f, 0xf7, 0x1b, 0x7a, 0x93, 0x76, 0x8c, 0x43, 0xdb, 0x61, 0xcd, 0xb6, 0x6d, 0x1a, 0xc7, 781 0xd2, 0xd8, 0x67, 0xad, 0xd7, 0xc3, 0xef, 0x1d, 0xb7, 0xb1, 0x28, 0xbe, 0x76, 0x3e, 0xfc, 0x37, 782 0x00, 0x00, 0xff, 0xff, 0x76, 0xf6, 0x00, 0xae, 0x00, 0x0a, 0x00, 0x00, 783 } 784 785 // Reference imports to suppress errors if they are not otherwise used. 786 var _ context.Context 787 var _ grpc.ClientConn 788 789 // This is a compile-time assertion to ensure that this generated file 790 // is compatible with the grpc package it is being compiled against. 791 const _ = grpc.SupportPackageIsVersion4 792 793 // ServiceClient is the client API for Service service. 794 // 795 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 796 type ServiceClient interface { 797 // Simulate simulates executing a transaction for estimating gas usage. 798 Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) 799 // GetTx fetches a tx by hash. 800 GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) 801 // BroadcastTx broadcast transaction. 802 BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) 803 // GetTxsEvent fetches txs by event. 804 GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) 805 // GetBlockWithTxs fetches a block with decoded txs. 806 // 807 // Since: cosmos-sdk 0.45.2 808 // WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type 809 // to tendermint block type without `entropy` is returned. 810 // Therefore, verification fails with the tendermint block validation method. 811 // For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. 812 GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) 813 } 814 815 type serviceClient struct { 816 cc grpc1.ClientConn 817 } 818 819 func NewServiceClient(cc grpc1.ClientConn) ServiceClient { 820 return &serviceClient{cc} 821 } 822 823 func (c *serviceClient) Simulate(ctx context.Context, in *SimulateRequest, opts ...grpc.CallOption) (*SimulateResponse, error) { 824 out := new(SimulateResponse) 825 err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/Simulate", in, out, opts...) 826 if err != nil { 827 return nil, err 828 } 829 return out, nil 830 } 831 832 func (c *serviceClient) GetTx(ctx context.Context, in *GetTxRequest, opts ...grpc.CallOption) (*GetTxResponse, error) { 833 out := new(GetTxResponse) 834 err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTx", in, out, opts...) 835 if err != nil { 836 return nil, err 837 } 838 return out, nil 839 } 840 841 func (c *serviceClient) BroadcastTx(ctx context.Context, in *BroadcastTxRequest, opts ...grpc.CallOption) (*BroadcastTxResponse, error) { 842 out := new(BroadcastTxResponse) 843 err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/BroadcastTx", in, out, opts...) 844 if err != nil { 845 return nil, err 846 } 847 return out, nil 848 } 849 850 func (c *serviceClient) GetTxsEvent(ctx context.Context, in *GetTxsEventRequest, opts ...grpc.CallOption) (*GetTxsEventResponse, error) { 851 out := new(GetTxsEventResponse) 852 err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetTxsEvent", in, out, opts...) 853 if err != nil { 854 return nil, err 855 } 856 return out, nil 857 } 858 859 func (c *serviceClient) GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) { 860 out := new(GetBlockWithTxsResponse) 861 err := c.cc.Invoke(ctx, "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", in, out, opts...) 862 if err != nil { 863 return nil, err 864 } 865 return out, nil 866 } 867 868 // ServiceServer is the server API for Service service. 869 type ServiceServer interface { 870 // Simulate simulates executing a transaction for estimating gas usage. 871 Simulate(context.Context, *SimulateRequest) (*SimulateResponse, error) 872 // GetTx fetches a tx by hash. 873 GetTx(context.Context, *GetTxRequest) (*GetTxResponse, error) 874 // BroadcastTx broadcast transaction. 875 BroadcastTx(context.Context, *BroadcastTxRequest) (*BroadcastTxResponse, error) 876 // GetTxsEvent fetches txs by event. 877 GetTxsEvent(context.Context, *GetTxsEventRequest) (*GetTxsEventResponse, error) 878 // GetBlockWithTxs fetches a block with decoded txs. 879 // 880 // Since: cosmos-sdk 0.45.2 881 // WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type 882 // to tendermint block type without `entropy` is returned. 883 // Therefore, verification fails with the tendermint block validation method. 884 // For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. 885 GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) 886 } 887 888 // UnimplementedServiceServer can be embedded to have forward compatible implementations. 889 type UnimplementedServiceServer struct { 890 } 891 892 func (*UnimplementedServiceServer) Simulate(ctx context.Context, req *SimulateRequest) (*SimulateResponse, error) { 893 return nil, status.Errorf(codes.Unimplemented, "method Simulate not implemented") 894 } 895 func (*UnimplementedServiceServer) GetTx(ctx context.Context, req *GetTxRequest) (*GetTxResponse, error) { 896 return nil, status.Errorf(codes.Unimplemented, "method GetTx not implemented") 897 } 898 func (*UnimplementedServiceServer) BroadcastTx(ctx context.Context, req *BroadcastTxRequest) (*BroadcastTxResponse, error) { 899 return nil, status.Errorf(codes.Unimplemented, "method BroadcastTx not implemented") 900 } 901 func (*UnimplementedServiceServer) GetTxsEvent(ctx context.Context, req *GetTxsEventRequest) (*GetTxsEventResponse, error) { 902 return nil, status.Errorf(codes.Unimplemented, "method GetTxsEvent not implemented") 903 } 904 func (*UnimplementedServiceServer) GetBlockWithTxs(ctx context.Context, req *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) { 905 return nil, status.Errorf(codes.Unimplemented, "method GetBlockWithTxs not implemented") 906 } 907 908 func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { 909 s.RegisterService(&_Service_serviceDesc, srv) 910 } 911 912 func _Service_Simulate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 913 in := new(SimulateRequest) 914 if err := dec(in); err != nil { 915 return nil, err 916 } 917 if interceptor == nil { 918 return srv.(ServiceServer).Simulate(ctx, in) 919 } 920 info := &grpc.UnaryServerInfo{ 921 Server: srv, 922 FullMethod: "/cosmos.tx.v1beta1.Service/Simulate", 923 } 924 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 925 return srv.(ServiceServer).Simulate(ctx, req.(*SimulateRequest)) 926 } 927 return interceptor(ctx, in, info, handler) 928 } 929 930 func _Service_GetTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 931 in := new(GetTxRequest) 932 if err := dec(in); err != nil { 933 return nil, err 934 } 935 if interceptor == nil { 936 return srv.(ServiceServer).GetTx(ctx, in) 937 } 938 info := &grpc.UnaryServerInfo{ 939 Server: srv, 940 FullMethod: "/cosmos.tx.v1beta1.Service/GetTx", 941 } 942 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 943 return srv.(ServiceServer).GetTx(ctx, req.(*GetTxRequest)) 944 } 945 return interceptor(ctx, in, info, handler) 946 } 947 948 func _Service_BroadcastTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 949 in := new(BroadcastTxRequest) 950 if err := dec(in); err != nil { 951 return nil, err 952 } 953 if interceptor == nil { 954 return srv.(ServiceServer).BroadcastTx(ctx, in) 955 } 956 info := &grpc.UnaryServerInfo{ 957 Server: srv, 958 FullMethod: "/cosmos.tx.v1beta1.Service/BroadcastTx", 959 } 960 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 961 return srv.(ServiceServer).BroadcastTx(ctx, req.(*BroadcastTxRequest)) 962 } 963 return interceptor(ctx, in, info, handler) 964 } 965 966 func _Service_GetTxsEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 967 in := new(GetTxsEventRequest) 968 if err := dec(in); err != nil { 969 return nil, err 970 } 971 if interceptor == nil { 972 return srv.(ServiceServer).GetTxsEvent(ctx, in) 973 } 974 info := &grpc.UnaryServerInfo{ 975 Server: srv, 976 FullMethod: "/cosmos.tx.v1beta1.Service/GetTxsEvent", 977 } 978 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 979 return srv.(ServiceServer).GetTxsEvent(ctx, req.(*GetTxsEventRequest)) 980 } 981 return interceptor(ctx, in, info, handler) 982 } 983 984 func _Service_GetBlockWithTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 985 in := new(GetBlockWithTxsRequest) 986 if err := dec(in); err != nil { 987 return nil, err 988 } 989 if interceptor == nil { 990 return srv.(ServiceServer).GetBlockWithTxs(ctx, in) 991 } 992 info := &grpc.UnaryServerInfo{ 993 Server: srv, 994 FullMethod: "/cosmos.tx.v1beta1.Service/GetBlockWithTxs", 995 } 996 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 997 return srv.(ServiceServer).GetBlockWithTxs(ctx, req.(*GetBlockWithTxsRequest)) 998 } 999 return interceptor(ctx, in, info, handler) 1000 } 1001 1002 var _Service_serviceDesc = grpc.ServiceDesc{ 1003 ServiceName: "cosmos.tx.v1beta1.Service", 1004 HandlerType: (*ServiceServer)(nil), 1005 Methods: []grpc.MethodDesc{ 1006 { 1007 MethodName: "Simulate", 1008 Handler: _Service_Simulate_Handler, 1009 }, 1010 { 1011 MethodName: "GetTx", 1012 Handler: _Service_GetTx_Handler, 1013 }, 1014 { 1015 MethodName: "BroadcastTx", 1016 Handler: _Service_BroadcastTx_Handler, 1017 }, 1018 { 1019 MethodName: "GetTxsEvent", 1020 Handler: _Service_GetTxsEvent_Handler, 1021 }, 1022 { 1023 MethodName: "GetBlockWithTxs", 1024 Handler: _Service_GetBlockWithTxs_Handler, 1025 }, 1026 }, 1027 Streams: []grpc.StreamDesc{}, 1028 Metadata: "cosmos/tx/v1beta1/service.proto", 1029 } 1030 1031 func (m *GetTxsEventRequest) Marshal() (dAtA []byte, err error) { 1032 size := m.Size() 1033 dAtA = make([]byte, size) 1034 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1035 if err != nil { 1036 return nil, err 1037 } 1038 return dAtA[:n], nil 1039 } 1040 1041 func (m *GetTxsEventRequest) MarshalTo(dAtA []byte) (int, error) { 1042 size := m.Size() 1043 return m.MarshalToSizedBuffer(dAtA[:size]) 1044 } 1045 1046 func (m *GetTxsEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1047 i := len(dAtA) 1048 _ = i 1049 var l int 1050 _ = l 1051 if m.OrderBy != 0 { 1052 i = encodeVarintService(dAtA, i, uint64(m.OrderBy)) 1053 i-- 1054 dAtA[i] = 0x18 1055 } 1056 if m.Pagination != nil { 1057 { 1058 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1059 if err != nil { 1060 return 0, err 1061 } 1062 i -= size 1063 i = encodeVarintService(dAtA, i, uint64(size)) 1064 } 1065 i-- 1066 dAtA[i] = 0x12 1067 } 1068 if len(m.Events) > 0 { 1069 for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { 1070 i -= len(m.Events[iNdEx]) 1071 copy(dAtA[i:], m.Events[iNdEx]) 1072 i = encodeVarintService(dAtA, i, uint64(len(m.Events[iNdEx]))) 1073 i-- 1074 dAtA[i] = 0xa 1075 } 1076 } 1077 return len(dAtA) - i, nil 1078 } 1079 1080 func (m *GetTxsEventResponse) Marshal() (dAtA []byte, err error) { 1081 size := m.Size() 1082 dAtA = make([]byte, size) 1083 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1084 if err != nil { 1085 return nil, err 1086 } 1087 return dAtA[:n], nil 1088 } 1089 1090 func (m *GetTxsEventResponse) MarshalTo(dAtA []byte) (int, error) { 1091 size := m.Size() 1092 return m.MarshalToSizedBuffer(dAtA[:size]) 1093 } 1094 1095 func (m *GetTxsEventResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1096 i := len(dAtA) 1097 _ = i 1098 var l int 1099 _ = l 1100 if m.Pagination != nil { 1101 { 1102 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1103 if err != nil { 1104 return 0, err 1105 } 1106 i -= size 1107 i = encodeVarintService(dAtA, i, uint64(size)) 1108 } 1109 i-- 1110 dAtA[i] = 0x1a 1111 } 1112 if len(m.TxResponses) > 0 { 1113 for iNdEx := len(m.TxResponses) - 1; iNdEx >= 0; iNdEx-- { 1114 { 1115 size, err := m.TxResponses[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1116 if err != nil { 1117 return 0, err 1118 } 1119 i -= size 1120 i = encodeVarintService(dAtA, i, uint64(size)) 1121 } 1122 i-- 1123 dAtA[i] = 0x12 1124 } 1125 } 1126 if len(m.Txs) > 0 { 1127 for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { 1128 { 1129 size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1130 if err != nil { 1131 return 0, err 1132 } 1133 i -= size 1134 i = encodeVarintService(dAtA, i, uint64(size)) 1135 } 1136 i-- 1137 dAtA[i] = 0xa 1138 } 1139 } 1140 return len(dAtA) - i, nil 1141 } 1142 1143 func (m *BroadcastTxRequest) Marshal() (dAtA []byte, err error) { 1144 size := m.Size() 1145 dAtA = make([]byte, size) 1146 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1147 if err != nil { 1148 return nil, err 1149 } 1150 return dAtA[:n], nil 1151 } 1152 1153 func (m *BroadcastTxRequest) MarshalTo(dAtA []byte) (int, error) { 1154 size := m.Size() 1155 return m.MarshalToSizedBuffer(dAtA[:size]) 1156 } 1157 1158 func (m *BroadcastTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1159 i := len(dAtA) 1160 _ = i 1161 var l int 1162 _ = l 1163 if m.Mode != 0 { 1164 i = encodeVarintService(dAtA, i, uint64(m.Mode)) 1165 i-- 1166 dAtA[i] = 0x10 1167 } 1168 if len(m.TxBytes) > 0 { 1169 i -= len(m.TxBytes) 1170 copy(dAtA[i:], m.TxBytes) 1171 i = encodeVarintService(dAtA, i, uint64(len(m.TxBytes))) 1172 i-- 1173 dAtA[i] = 0xa 1174 } 1175 return len(dAtA) - i, nil 1176 } 1177 1178 func (m *BroadcastTxResponse) Marshal() (dAtA []byte, err error) { 1179 size := m.Size() 1180 dAtA = make([]byte, size) 1181 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1182 if err != nil { 1183 return nil, err 1184 } 1185 return dAtA[:n], nil 1186 } 1187 1188 func (m *BroadcastTxResponse) MarshalTo(dAtA []byte) (int, error) { 1189 size := m.Size() 1190 return m.MarshalToSizedBuffer(dAtA[:size]) 1191 } 1192 1193 func (m *BroadcastTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1194 i := len(dAtA) 1195 _ = i 1196 var l int 1197 _ = l 1198 if m.TxResponse != nil { 1199 { 1200 size, err := m.TxResponse.MarshalToSizedBuffer(dAtA[:i]) 1201 if err != nil { 1202 return 0, err 1203 } 1204 i -= size 1205 i = encodeVarintService(dAtA, i, uint64(size)) 1206 } 1207 i-- 1208 dAtA[i] = 0xa 1209 } 1210 return len(dAtA) - i, nil 1211 } 1212 1213 func (m *SimulateRequest) Marshal() (dAtA []byte, err error) { 1214 size := m.Size() 1215 dAtA = make([]byte, size) 1216 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1217 if err != nil { 1218 return nil, err 1219 } 1220 return dAtA[:n], nil 1221 } 1222 1223 func (m *SimulateRequest) MarshalTo(dAtA []byte) (int, error) { 1224 size := m.Size() 1225 return m.MarshalToSizedBuffer(dAtA[:size]) 1226 } 1227 1228 func (m *SimulateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1229 i := len(dAtA) 1230 _ = i 1231 var l int 1232 _ = l 1233 if len(m.TxBytes) > 0 { 1234 i -= len(m.TxBytes) 1235 copy(dAtA[i:], m.TxBytes) 1236 i = encodeVarintService(dAtA, i, uint64(len(m.TxBytes))) 1237 i-- 1238 dAtA[i] = 0x12 1239 } 1240 if m.Tx != nil { 1241 { 1242 size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) 1243 if err != nil { 1244 return 0, err 1245 } 1246 i -= size 1247 i = encodeVarintService(dAtA, i, uint64(size)) 1248 } 1249 i-- 1250 dAtA[i] = 0xa 1251 } 1252 return len(dAtA) - i, nil 1253 } 1254 1255 func (m *SimulateResponse) Marshal() (dAtA []byte, err error) { 1256 size := m.Size() 1257 dAtA = make([]byte, size) 1258 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1259 if err != nil { 1260 return nil, err 1261 } 1262 return dAtA[:n], nil 1263 } 1264 1265 func (m *SimulateResponse) MarshalTo(dAtA []byte) (int, error) { 1266 size := m.Size() 1267 return m.MarshalToSizedBuffer(dAtA[:size]) 1268 } 1269 1270 func (m *SimulateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1271 i := len(dAtA) 1272 _ = i 1273 var l int 1274 _ = l 1275 if m.Result != nil { 1276 { 1277 size, err := m.Result.MarshalToSizedBuffer(dAtA[:i]) 1278 if err != nil { 1279 return 0, err 1280 } 1281 i -= size 1282 i = encodeVarintService(dAtA, i, uint64(size)) 1283 } 1284 i-- 1285 dAtA[i] = 0x12 1286 } 1287 if m.GasInfo != nil { 1288 { 1289 size, err := m.GasInfo.MarshalToSizedBuffer(dAtA[:i]) 1290 if err != nil { 1291 return 0, err 1292 } 1293 i -= size 1294 i = encodeVarintService(dAtA, i, uint64(size)) 1295 } 1296 i-- 1297 dAtA[i] = 0xa 1298 } 1299 return len(dAtA) - i, nil 1300 } 1301 1302 func (m *GetTxRequest) Marshal() (dAtA []byte, err error) { 1303 size := m.Size() 1304 dAtA = make([]byte, size) 1305 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1306 if err != nil { 1307 return nil, err 1308 } 1309 return dAtA[:n], nil 1310 } 1311 1312 func (m *GetTxRequest) MarshalTo(dAtA []byte) (int, error) { 1313 size := m.Size() 1314 return m.MarshalToSizedBuffer(dAtA[:size]) 1315 } 1316 1317 func (m *GetTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1318 i := len(dAtA) 1319 _ = i 1320 var l int 1321 _ = l 1322 if len(m.Hash) > 0 { 1323 i -= len(m.Hash) 1324 copy(dAtA[i:], m.Hash) 1325 i = encodeVarintService(dAtA, i, uint64(len(m.Hash))) 1326 i-- 1327 dAtA[i] = 0xa 1328 } 1329 return len(dAtA) - i, nil 1330 } 1331 1332 func (m *GetTxResponse) Marshal() (dAtA []byte, err error) { 1333 size := m.Size() 1334 dAtA = make([]byte, size) 1335 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1336 if err != nil { 1337 return nil, err 1338 } 1339 return dAtA[:n], nil 1340 } 1341 1342 func (m *GetTxResponse) MarshalTo(dAtA []byte) (int, error) { 1343 size := m.Size() 1344 return m.MarshalToSizedBuffer(dAtA[:size]) 1345 } 1346 1347 func (m *GetTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1348 i := len(dAtA) 1349 _ = i 1350 var l int 1351 _ = l 1352 if m.TxResponse != nil { 1353 { 1354 size, err := m.TxResponse.MarshalToSizedBuffer(dAtA[:i]) 1355 if err != nil { 1356 return 0, err 1357 } 1358 i -= size 1359 i = encodeVarintService(dAtA, i, uint64(size)) 1360 } 1361 i-- 1362 dAtA[i] = 0x12 1363 } 1364 if m.Tx != nil { 1365 { 1366 size, err := m.Tx.MarshalToSizedBuffer(dAtA[:i]) 1367 if err != nil { 1368 return 0, err 1369 } 1370 i -= size 1371 i = encodeVarintService(dAtA, i, uint64(size)) 1372 } 1373 i-- 1374 dAtA[i] = 0xa 1375 } 1376 return len(dAtA) - i, nil 1377 } 1378 1379 func (m *GetBlockWithTxsRequest) Marshal() (dAtA []byte, err error) { 1380 size := m.Size() 1381 dAtA = make([]byte, size) 1382 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1383 if err != nil { 1384 return nil, err 1385 } 1386 return dAtA[:n], nil 1387 } 1388 1389 func (m *GetBlockWithTxsRequest) MarshalTo(dAtA []byte) (int, error) { 1390 size := m.Size() 1391 return m.MarshalToSizedBuffer(dAtA[:size]) 1392 } 1393 1394 func (m *GetBlockWithTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1395 i := len(dAtA) 1396 _ = i 1397 var l int 1398 _ = l 1399 if m.Pagination != nil { 1400 { 1401 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1402 if err != nil { 1403 return 0, err 1404 } 1405 i -= size 1406 i = encodeVarintService(dAtA, i, uint64(size)) 1407 } 1408 i-- 1409 dAtA[i] = 0x12 1410 } 1411 if m.Height != 0 { 1412 i = encodeVarintService(dAtA, i, uint64(m.Height)) 1413 i-- 1414 dAtA[i] = 0x8 1415 } 1416 return len(dAtA) - i, nil 1417 } 1418 1419 func (m *GetBlockWithTxsResponse) Marshal() (dAtA []byte, err error) { 1420 size := m.Size() 1421 dAtA = make([]byte, size) 1422 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1423 if err != nil { 1424 return nil, err 1425 } 1426 return dAtA[:n], nil 1427 } 1428 1429 func (m *GetBlockWithTxsResponse) MarshalTo(dAtA []byte) (int, error) { 1430 size := m.Size() 1431 return m.MarshalToSizedBuffer(dAtA[:size]) 1432 } 1433 1434 func (m *GetBlockWithTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1435 i := len(dAtA) 1436 _ = i 1437 var l int 1438 _ = l 1439 if m.Pagination != nil { 1440 { 1441 size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) 1442 if err != nil { 1443 return 0, err 1444 } 1445 i -= size 1446 i = encodeVarintService(dAtA, i, uint64(size)) 1447 } 1448 i-- 1449 dAtA[i] = 0x22 1450 } 1451 if m.Block != nil { 1452 { 1453 size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) 1454 if err != nil { 1455 return 0, err 1456 } 1457 i -= size 1458 i = encodeVarintService(dAtA, i, uint64(size)) 1459 } 1460 i-- 1461 dAtA[i] = 0x1a 1462 } 1463 if m.BlockId != nil { 1464 { 1465 size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) 1466 if err != nil { 1467 return 0, err 1468 } 1469 i -= size 1470 i = encodeVarintService(dAtA, i, uint64(size)) 1471 } 1472 i-- 1473 dAtA[i] = 0x12 1474 } 1475 if len(m.Txs) > 0 { 1476 for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { 1477 { 1478 size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1479 if err != nil { 1480 return 0, err 1481 } 1482 i -= size 1483 i = encodeVarintService(dAtA, i, uint64(size)) 1484 } 1485 i-- 1486 dAtA[i] = 0xa 1487 } 1488 } 1489 return len(dAtA) - i, nil 1490 } 1491 1492 func encodeVarintService(dAtA []byte, offset int, v uint64) int { 1493 offset -= sovService(v) 1494 base := offset 1495 for v >= 1<<7 { 1496 dAtA[offset] = uint8(v&0x7f | 0x80) 1497 v >>= 7 1498 offset++ 1499 } 1500 dAtA[offset] = uint8(v) 1501 return base 1502 } 1503 func (m *GetTxsEventRequest) Size() (n int) { 1504 if m == nil { 1505 return 0 1506 } 1507 var l int 1508 _ = l 1509 if len(m.Events) > 0 { 1510 for _, s := range m.Events { 1511 l = len(s) 1512 n += 1 + l + sovService(uint64(l)) 1513 } 1514 } 1515 if m.Pagination != nil { 1516 l = m.Pagination.Size() 1517 n += 1 + l + sovService(uint64(l)) 1518 } 1519 if m.OrderBy != 0 { 1520 n += 1 + sovService(uint64(m.OrderBy)) 1521 } 1522 return n 1523 } 1524 1525 func (m *GetTxsEventResponse) Size() (n int) { 1526 if m == nil { 1527 return 0 1528 } 1529 var l int 1530 _ = l 1531 if len(m.Txs) > 0 { 1532 for _, e := range m.Txs { 1533 l = e.Size() 1534 n += 1 + l + sovService(uint64(l)) 1535 } 1536 } 1537 if len(m.TxResponses) > 0 { 1538 for _, e := range m.TxResponses { 1539 l = e.Size() 1540 n += 1 + l + sovService(uint64(l)) 1541 } 1542 } 1543 if m.Pagination != nil { 1544 l = m.Pagination.Size() 1545 n += 1 + l + sovService(uint64(l)) 1546 } 1547 return n 1548 } 1549 1550 func (m *BroadcastTxRequest) Size() (n int) { 1551 if m == nil { 1552 return 0 1553 } 1554 var l int 1555 _ = l 1556 l = len(m.TxBytes) 1557 if l > 0 { 1558 n += 1 + l + sovService(uint64(l)) 1559 } 1560 if m.Mode != 0 { 1561 n += 1 + sovService(uint64(m.Mode)) 1562 } 1563 return n 1564 } 1565 1566 func (m *BroadcastTxResponse) Size() (n int) { 1567 if m == nil { 1568 return 0 1569 } 1570 var l int 1571 _ = l 1572 if m.TxResponse != nil { 1573 l = m.TxResponse.Size() 1574 n += 1 + l + sovService(uint64(l)) 1575 } 1576 return n 1577 } 1578 1579 func (m *SimulateRequest) Size() (n int) { 1580 if m == nil { 1581 return 0 1582 } 1583 var l int 1584 _ = l 1585 if m.Tx != nil { 1586 l = m.Tx.Size() 1587 n += 1 + l + sovService(uint64(l)) 1588 } 1589 l = len(m.TxBytes) 1590 if l > 0 { 1591 n += 1 + l + sovService(uint64(l)) 1592 } 1593 return n 1594 } 1595 1596 func (m *SimulateResponse) Size() (n int) { 1597 if m == nil { 1598 return 0 1599 } 1600 var l int 1601 _ = l 1602 if m.GasInfo != nil { 1603 l = m.GasInfo.Size() 1604 n += 1 + l + sovService(uint64(l)) 1605 } 1606 if m.Result != nil { 1607 l = m.Result.Size() 1608 n += 1 + l + sovService(uint64(l)) 1609 } 1610 return n 1611 } 1612 1613 func (m *GetTxRequest) Size() (n int) { 1614 if m == nil { 1615 return 0 1616 } 1617 var l int 1618 _ = l 1619 l = len(m.Hash) 1620 if l > 0 { 1621 n += 1 + l + sovService(uint64(l)) 1622 } 1623 return n 1624 } 1625 1626 func (m *GetTxResponse) Size() (n int) { 1627 if m == nil { 1628 return 0 1629 } 1630 var l int 1631 _ = l 1632 if m.Tx != nil { 1633 l = m.Tx.Size() 1634 n += 1 + l + sovService(uint64(l)) 1635 } 1636 if m.TxResponse != nil { 1637 l = m.TxResponse.Size() 1638 n += 1 + l + sovService(uint64(l)) 1639 } 1640 return n 1641 } 1642 1643 func (m *GetBlockWithTxsRequest) Size() (n int) { 1644 if m == nil { 1645 return 0 1646 } 1647 var l int 1648 _ = l 1649 if m.Height != 0 { 1650 n += 1 + sovService(uint64(m.Height)) 1651 } 1652 if m.Pagination != nil { 1653 l = m.Pagination.Size() 1654 n += 1 + l + sovService(uint64(l)) 1655 } 1656 return n 1657 } 1658 1659 func (m *GetBlockWithTxsResponse) Size() (n int) { 1660 if m == nil { 1661 return 0 1662 } 1663 var l int 1664 _ = l 1665 if len(m.Txs) > 0 { 1666 for _, e := range m.Txs { 1667 l = e.Size() 1668 n += 1 + l + sovService(uint64(l)) 1669 } 1670 } 1671 if m.BlockId != nil { 1672 l = m.BlockId.Size() 1673 n += 1 + l + sovService(uint64(l)) 1674 } 1675 if m.Block != nil { 1676 l = m.Block.Size() 1677 n += 1 + l + sovService(uint64(l)) 1678 } 1679 if m.Pagination != nil { 1680 l = m.Pagination.Size() 1681 n += 1 + l + sovService(uint64(l)) 1682 } 1683 return n 1684 } 1685 1686 func sovService(x uint64) (n int) { 1687 return (math_bits.Len64(x|1) + 6) / 7 1688 } 1689 func sozService(x uint64) (n int) { 1690 return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1691 } 1692 func (m *GetTxsEventRequest) Unmarshal(dAtA []byte) error { 1693 l := len(dAtA) 1694 iNdEx := 0 1695 for iNdEx < l { 1696 preIndex := iNdEx 1697 var wire uint64 1698 for shift := uint(0); ; shift += 7 { 1699 if shift >= 64 { 1700 return ErrIntOverflowService 1701 } 1702 if iNdEx >= l { 1703 return io.ErrUnexpectedEOF 1704 } 1705 b := dAtA[iNdEx] 1706 iNdEx++ 1707 wire |= uint64(b&0x7F) << shift 1708 if b < 0x80 { 1709 break 1710 } 1711 } 1712 fieldNum := int32(wire >> 3) 1713 wireType := int(wire & 0x7) 1714 if wireType == 4 { 1715 return fmt.Errorf("proto: GetTxsEventRequest: wiretype end group for non-group") 1716 } 1717 if fieldNum <= 0 { 1718 return fmt.Errorf("proto: GetTxsEventRequest: illegal tag %d (wire type %d)", fieldNum, wire) 1719 } 1720 switch fieldNum { 1721 case 1: 1722 if wireType != 2 { 1723 return fmt.Errorf("proto: wrong wireType = %d for field Events", wireType) 1724 } 1725 var stringLen uint64 1726 for shift := uint(0); ; shift += 7 { 1727 if shift >= 64 { 1728 return ErrIntOverflowService 1729 } 1730 if iNdEx >= l { 1731 return io.ErrUnexpectedEOF 1732 } 1733 b := dAtA[iNdEx] 1734 iNdEx++ 1735 stringLen |= uint64(b&0x7F) << shift 1736 if b < 0x80 { 1737 break 1738 } 1739 } 1740 intStringLen := int(stringLen) 1741 if intStringLen < 0 { 1742 return ErrInvalidLengthService 1743 } 1744 postIndex := iNdEx + intStringLen 1745 if postIndex < 0 { 1746 return ErrInvalidLengthService 1747 } 1748 if postIndex > l { 1749 return io.ErrUnexpectedEOF 1750 } 1751 m.Events = append(m.Events, string(dAtA[iNdEx:postIndex])) 1752 iNdEx = postIndex 1753 case 2: 1754 if wireType != 2 { 1755 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1756 } 1757 var msglen int 1758 for shift := uint(0); ; shift += 7 { 1759 if shift >= 64 { 1760 return ErrIntOverflowService 1761 } 1762 if iNdEx >= l { 1763 return io.ErrUnexpectedEOF 1764 } 1765 b := dAtA[iNdEx] 1766 iNdEx++ 1767 msglen |= int(b&0x7F) << shift 1768 if b < 0x80 { 1769 break 1770 } 1771 } 1772 if msglen < 0 { 1773 return ErrInvalidLengthService 1774 } 1775 postIndex := iNdEx + msglen 1776 if postIndex < 0 { 1777 return ErrInvalidLengthService 1778 } 1779 if postIndex > l { 1780 return io.ErrUnexpectedEOF 1781 } 1782 if m.Pagination == nil { 1783 m.Pagination = &query.PageRequest{} 1784 } 1785 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1786 return err 1787 } 1788 iNdEx = postIndex 1789 case 3: 1790 if wireType != 0 { 1791 return fmt.Errorf("proto: wrong wireType = %d for field OrderBy", wireType) 1792 } 1793 m.OrderBy = 0 1794 for shift := uint(0); ; shift += 7 { 1795 if shift >= 64 { 1796 return ErrIntOverflowService 1797 } 1798 if iNdEx >= l { 1799 return io.ErrUnexpectedEOF 1800 } 1801 b := dAtA[iNdEx] 1802 iNdEx++ 1803 m.OrderBy |= OrderBy(b&0x7F) << shift 1804 if b < 0x80 { 1805 break 1806 } 1807 } 1808 default: 1809 iNdEx = preIndex 1810 skippy, err := skipService(dAtA[iNdEx:]) 1811 if err != nil { 1812 return err 1813 } 1814 if (skippy < 0) || (iNdEx+skippy) < 0 { 1815 return ErrInvalidLengthService 1816 } 1817 if (iNdEx + skippy) > l { 1818 return io.ErrUnexpectedEOF 1819 } 1820 iNdEx += skippy 1821 } 1822 } 1823 1824 if iNdEx > l { 1825 return io.ErrUnexpectedEOF 1826 } 1827 return nil 1828 } 1829 func (m *GetTxsEventResponse) Unmarshal(dAtA []byte) error { 1830 l := len(dAtA) 1831 iNdEx := 0 1832 for iNdEx < l { 1833 preIndex := iNdEx 1834 var wire uint64 1835 for shift := uint(0); ; shift += 7 { 1836 if shift >= 64 { 1837 return ErrIntOverflowService 1838 } 1839 if iNdEx >= l { 1840 return io.ErrUnexpectedEOF 1841 } 1842 b := dAtA[iNdEx] 1843 iNdEx++ 1844 wire |= uint64(b&0x7F) << shift 1845 if b < 0x80 { 1846 break 1847 } 1848 } 1849 fieldNum := int32(wire >> 3) 1850 wireType := int(wire & 0x7) 1851 if wireType == 4 { 1852 return fmt.Errorf("proto: GetTxsEventResponse: wiretype end group for non-group") 1853 } 1854 if fieldNum <= 0 { 1855 return fmt.Errorf("proto: GetTxsEventResponse: illegal tag %d (wire type %d)", fieldNum, wire) 1856 } 1857 switch fieldNum { 1858 case 1: 1859 if wireType != 2 { 1860 return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) 1861 } 1862 var msglen int 1863 for shift := uint(0); ; shift += 7 { 1864 if shift >= 64 { 1865 return ErrIntOverflowService 1866 } 1867 if iNdEx >= l { 1868 return io.ErrUnexpectedEOF 1869 } 1870 b := dAtA[iNdEx] 1871 iNdEx++ 1872 msglen |= int(b&0x7F) << shift 1873 if b < 0x80 { 1874 break 1875 } 1876 } 1877 if msglen < 0 { 1878 return ErrInvalidLengthService 1879 } 1880 postIndex := iNdEx + msglen 1881 if postIndex < 0 { 1882 return ErrInvalidLengthService 1883 } 1884 if postIndex > l { 1885 return io.ErrUnexpectedEOF 1886 } 1887 m.Txs = append(m.Txs, &Tx{}) 1888 if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1889 return err 1890 } 1891 iNdEx = postIndex 1892 case 2: 1893 if wireType != 2 { 1894 return fmt.Errorf("proto: wrong wireType = %d for field TxResponses", wireType) 1895 } 1896 var msglen int 1897 for shift := uint(0); ; shift += 7 { 1898 if shift >= 64 { 1899 return ErrIntOverflowService 1900 } 1901 if iNdEx >= l { 1902 return io.ErrUnexpectedEOF 1903 } 1904 b := dAtA[iNdEx] 1905 iNdEx++ 1906 msglen |= int(b&0x7F) << shift 1907 if b < 0x80 { 1908 break 1909 } 1910 } 1911 if msglen < 0 { 1912 return ErrInvalidLengthService 1913 } 1914 postIndex := iNdEx + msglen 1915 if postIndex < 0 { 1916 return ErrInvalidLengthService 1917 } 1918 if postIndex > l { 1919 return io.ErrUnexpectedEOF 1920 } 1921 m.TxResponses = append(m.TxResponses, &types.TxResponse{}) 1922 if err := m.TxResponses[len(m.TxResponses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1923 return err 1924 } 1925 iNdEx = postIndex 1926 case 3: 1927 if wireType != 2 { 1928 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 1929 } 1930 var msglen int 1931 for shift := uint(0); ; shift += 7 { 1932 if shift >= 64 { 1933 return ErrIntOverflowService 1934 } 1935 if iNdEx >= l { 1936 return io.ErrUnexpectedEOF 1937 } 1938 b := dAtA[iNdEx] 1939 iNdEx++ 1940 msglen |= int(b&0x7F) << shift 1941 if b < 0x80 { 1942 break 1943 } 1944 } 1945 if msglen < 0 { 1946 return ErrInvalidLengthService 1947 } 1948 postIndex := iNdEx + msglen 1949 if postIndex < 0 { 1950 return ErrInvalidLengthService 1951 } 1952 if postIndex > l { 1953 return io.ErrUnexpectedEOF 1954 } 1955 if m.Pagination == nil { 1956 m.Pagination = &query.PageResponse{} 1957 } 1958 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1959 return err 1960 } 1961 iNdEx = postIndex 1962 default: 1963 iNdEx = preIndex 1964 skippy, err := skipService(dAtA[iNdEx:]) 1965 if err != nil { 1966 return err 1967 } 1968 if (skippy < 0) || (iNdEx+skippy) < 0 { 1969 return ErrInvalidLengthService 1970 } 1971 if (iNdEx + skippy) > l { 1972 return io.ErrUnexpectedEOF 1973 } 1974 iNdEx += skippy 1975 } 1976 } 1977 1978 if iNdEx > l { 1979 return io.ErrUnexpectedEOF 1980 } 1981 return nil 1982 } 1983 func (m *BroadcastTxRequest) Unmarshal(dAtA []byte) error { 1984 l := len(dAtA) 1985 iNdEx := 0 1986 for iNdEx < l { 1987 preIndex := iNdEx 1988 var wire uint64 1989 for shift := uint(0); ; shift += 7 { 1990 if shift >= 64 { 1991 return ErrIntOverflowService 1992 } 1993 if iNdEx >= l { 1994 return io.ErrUnexpectedEOF 1995 } 1996 b := dAtA[iNdEx] 1997 iNdEx++ 1998 wire |= uint64(b&0x7F) << shift 1999 if b < 0x80 { 2000 break 2001 } 2002 } 2003 fieldNum := int32(wire >> 3) 2004 wireType := int(wire & 0x7) 2005 if wireType == 4 { 2006 return fmt.Errorf("proto: BroadcastTxRequest: wiretype end group for non-group") 2007 } 2008 if fieldNum <= 0 { 2009 return fmt.Errorf("proto: BroadcastTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2010 } 2011 switch fieldNum { 2012 case 1: 2013 if wireType != 2 { 2014 return fmt.Errorf("proto: wrong wireType = %d for field TxBytes", wireType) 2015 } 2016 var byteLen int 2017 for shift := uint(0); ; shift += 7 { 2018 if shift >= 64 { 2019 return ErrIntOverflowService 2020 } 2021 if iNdEx >= l { 2022 return io.ErrUnexpectedEOF 2023 } 2024 b := dAtA[iNdEx] 2025 iNdEx++ 2026 byteLen |= int(b&0x7F) << shift 2027 if b < 0x80 { 2028 break 2029 } 2030 } 2031 if byteLen < 0 { 2032 return ErrInvalidLengthService 2033 } 2034 postIndex := iNdEx + byteLen 2035 if postIndex < 0 { 2036 return ErrInvalidLengthService 2037 } 2038 if postIndex > l { 2039 return io.ErrUnexpectedEOF 2040 } 2041 m.TxBytes = append(m.TxBytes[:0], dAtA[iNdEx:postIndex]...) 2042 if m.TxBytes == nil { 2043 m.TxBytes = []byte{} 2044 } 2045 iNdEx = postIndex 2046 case 2: 2047 if wireType != 0 { 2048 return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) 2049 } 2050 m.Mode = 0 2051 for shift := uint(0); ; shift += 7 { 2052 if shift >= 64 { 2053 return ErrIntOverflowService 2054 } 2055 if iNdEx >= l { 2056 return io.ErrUnexpectedEOF 2057 } 2058 b := dAtA[iNdEx] 2059 iNdEx++ 2060 m.Mode |= BroadcastMode(b&0x7F) << shift 2061 if b < 0x80 { 2062 break 2063 } 2064 } 2065 default: 2066 iNdEx = preIndex 2067 skippy, err := skipService(dAtA[iNdEx:]) 2068 if err != nil { 2069 return err 2070 } 2071 if (skippy < 0) || (iNdEx+skippy) < 0 { 2072 return ErrInvalidLengthService 2073 } 2074 if (iNdEx + skippy) > l { 2075 return io.ErrUnexpectedEOF 2076 } 2077 iNdEx += skippy 2078 } 2079 } 2080 2081 if iNdEx > l { 2082 return io.ErrUnexpectedEOF 2083 } 2084 return nil 2085 } 2086 func (m *BroadcastTxResponse) Unmarshal(dAtA []byte) error { 2087 l := len(dAtA) 2088 iNdEx := 0 2089 for iNdEx < l { 2090 preIndex := iNdEx 2091 var wire uint64 2092 for shift := uint(0); ; shift += 7 { 2093 if shift >= 64 { 2094 return ErrIntOverflowService 2095 } 2096 if iNdEx >= l { 2097 return io.ErrUnexpectedEOF 2098 } 2099 b := dAtA[iNdEx] 2100 iNdEx++ 2101 wire |= uint64(b&0x7F) << shift 2102 if b < 0x80 { 2103 break 2104 } 2105 } 2106 fieldNum := int32(wire >> 3) 2107 wireType := int(wire & 0x7) 2108 if wireType == 4 { 2109 return fmt.Errorf("proto: BroadcastTxResponse: wiretype end group for non-group") 2110 } 2111 if fieldNum <= 0 { 2112 return fmt.Errorf("proto: BroadcastTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2113 } 2114 switch fieldNum { 2115 case 1: 2116 if wireType != 2 { 2117 return fmt.Errorf("proto: wrong wireType = %d for field TxResponse", wireType) 2118 } 2119 var msglen int 2120 for shift := uint(0); ; shift += 7 { 2121 if shift >= 64 { 2122 return ErrIntOverflowService 2123 } 2124 if iNdEx >= l { 2125 return io.ErrUnexpectedEOF 2126 } 2127 b := dAtA[iNdEx] 2128 iNdEx++ 2129 msglen |= int(b&0x7F) << shift 2130 if b < 0x80 { 2131 break 2132 } 2133 } 2134 if msglen < 0 { 2135 return ErrInvalidLengthService 2136 } 2137 postIndex := iNdEx + msglen 2138 if postIndex < 0 { 2139 return ErrInvalidLengthService 2140 } 2141 if postIndex > l { 2142 return io.ErrUnexpectedEOF 2143 } 2144 if m.TxResponse == nil { 2145 m.TxResponse = &types.TxResponse{} 2146 } 2147 if err := m.TxResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2148 return err 2149 } 2150 iNdEx = postIndex 2151 default: 2152 iNdEx = preIndex 2153 skippy, err := skipService(dAtA[iNdEx:]) 2154 if err != nil { 2155 return err 2156 } 2157 if (skippy < 0) || (iNdEx+skippy) < 0 { 2158 return ErrInvalidLengthService 2159 } 2160 if (iNdEx + skippy) > l { 2161 return io.ErrUnexpectedEOF 2162 } 2163 iNdEx += skippy 2164 } 2165 } 2166 2167 if iNdEx > l { 2168 return io.ErrUnexpectedEOF 2169 } 2170 return nil 2171 } 2172 func (m *SimulateRequest) Unmarshal(dAtA []byte) error { 2173 l := len(dAtA) 2174 iNdEx := 0 2175 for iNdEx < l { 2176 preIndex := iNdEx 2177 var wire uint64 2178 for shift := uint(0); ; shift += 7 { 2179 if shift >= 64 { 2180 return ErrIntOverflowService 2181 } 2182 if iNdEx >= l { 2183 return io.ErrUnexpectedEOF 2184 } 2185 b := dAtA[iNdEx] 2186 iNdEx++ 2187 wire |= uint64(b&0x7F) << shift 2188 if b < 0x80 { 2189 break 2190 } 2191 } 2192 fieldNum := int32(wire >> 3) 2193 wireType := int(wire & 0x7) 2194 if wireType == 4 { 2195 return fmt.Errorf("proto: SimulateRequest: wiretype end group for non-group") 2196 } 2197 if fieldNum <= 0 { 2198 return fmt.Errorf("proto: SimulateRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2199 } 2200 switch fieldNum { 2201 case 1: 2202 if wireType != 2 { 2203 return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) 2204 } 2205 var msglen int 2206 for shift := uint(0); ; shift += 7 { 2207 if shift >= 64 { 2208 return ErrIntOverflowService 2209 } 2210 if iNdEx >= l { 2211 return io.ErrUnexpectedEOF 2212 } 2213 b := dAtA[iNdEx] 2214 iNdEx++ 2215 msglen |= int(b&0x7F) << shift 2216 if b < 0x80 { 2217 break 2218 } 2219 } 2220 if msglen < 0 { 2221 return ErrInvalidLengthService 2222 } 2223 postIndex := iNdEx + msglen 2224 if postIndex < 0 { 2225 return ErrInvalidLengthService 2226 } 2227 if postIndex > l { 2228 return io.ErrUnexpectedEOF 2229 } 2230 if m.Tx == nil { 2231 m.Tx = &Tx{} 2232 } 2233 if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2234 return err 2235 } 2236 iNdEx = postIndex 2237 case 2: 2238 if wireType != 2 { 2239 return fmt.Errorf("proto: wrong wireType = %d for field TxBytes", wireType) 2240 } 2241 var byteLen int 2242 for shift := uint(0); ; shift += 7 { 2243 if shift >= 64 { 2244 return ErrIntOverflowService 2245 } 2246 if iNdEx >= l { 2247 return io.ErrUnexpectedEOF 2248 } 2249 b := dAtA[iNdEx] 2250 iNdEx++ 2251 byteLen |= int(b&0x7F) << shift 2252 if b < 0x80 { 2253 break 2254 } 2255 } 2256 if byteLen < 0 { 2257 return ErrInvalidLengthService 2258 } 2259 postIndex := iNdEx + byteLen 2260 if postIndex < 0 { 2261 return ErrInvalidLengthService 2262 } 2263 if postIndex > l { 2264 return io.ErrUnexpectedEOF 2265 } 2266 m.TxBytes = append(m.TxBytes[:0], dAtA[iNdEx:postIndex]...) 2267 if m.TxBytes == nil { 2268 m.TxBytes = []byte{} 2269 } 2270 iNdEx = postIndex 2271 default: 2272 iNdEx = preIndex 2273 skippy, err := skipService(dAtA[iNdEx:]) 2274 if err != nil { 2275 return err 2276 } 2277 if (skippy < 0) || (iNdEx+skippy) < 0 { 2278 return ErrInvalidLengthService 2279 } 2280 if (iNdEx + skippy) > l { 2281 return io.ErrUnexpectedEOF 2282 } 2283 iNdEx += skippy 2284 } 2285 } 2286 2287 if iNdEx > l { 2288 return io.ErrUnexpectedEOF 2289 } 2290 return nil 2291 } 2292 func (m *SimulateResponse) Unmarshal(dAtA []byte) error { 2293 l := len(dAtA) 2294 iNdEx := 0 2295 for iNdEx < l { 2296 preIndex := iNdEx 2297 var wire uint64 2298 for shift := uint(0); ; shift += 7 { 2299 if shift >= 64 { 2300 return ErrIntOverflowService 2301 } 2302 if iNdEx >= l { 2303 return io.ErrUnexpectedEOF 2304 } 2305 b := dAtA[iNdEx] 2306 iNdEx++ 2307 wire |= uint64(b&0x7F) << shift 2308 if b < 0x80 { 2309 break 2310 } 2311 } 2312 fieldNum := int32(wire >> 3) 2313 wireType := int(wire & 0x7) 2314 if wireType == 4 { 2315 return fmt.Errorf("proto: SimulateResponse: wiretype end group for non-group") 2316 } 2317 if fieldNum <= 0 { 2318 return fmt.Errorf("proto: SimulateResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2319 } 2320 switch fieldNum { 2321 case 1: 2322 if wireType != 2 { 2323 return fmt.Errorf("proto: wrong wireType = %d for field GasInfo", wireType) 2324 } 2325 var msglen int 2326 for shift := uint(0); ; shift += 7 { 2327 if shift >= 64 { 2328 return ErrIntOverflowService 2329 } 2330 if iNdEx >= l { 2331 return io.ErrUnexpectedEOF 2332 } 2333 b := dAtA[iNdEx] 2334 iNdEx++ 2335 msglen |= int(b&0x7F) << shift 2336 if b < 0x80 { 2337 break 2338 } 2339 } 2340 if msglen < 0 { 2341 return ErrInvalidLengthService 2342 } 2343 postIndex := iNdEx + msglen 2344 if postIndex < 0 { 2345 return ErrInvalidLengthService 2346 } 2347 if postIndex > l { 2348 return io.ErrUnexpectedEOF 2349 } 2350 if m.GasInfo == nil { 2351 m.GasInfo = &types.GasInfo{} 2352 } 2353 if err := m.GasInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2354 return err 2355 } 2356 iNdEx = postIndex 2357 case 2: 2358 if wireType != 2 { 2359 return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) 2360 } 2361 var msglen int 2362 for shift := uint(0); ; shift += 7 { 2363 if shift >= 64 { 2364 return ErrIntOverflowService 2365 } 2366 if iNdEx >= l { 2367 return io.ErrUnexpectedEOF 2368 } 2369 b := dAtA[iNdEx] 2370 iNdEx++ 2371 msglen |= int(b&0x7F) << shift 2372 if b < 0x80 { 2373 break 2374 } 2375 } 2376 if msglen < 0 { 2377 return ErrInvalidLengthService 2378 } 2379 postIndex := iNdEx + msglen 2380 if postIndex < 0 { 2381 return ErrInvalidLengthService 2382 } 2383 if postIndex > l { 2384 return io.ErrUnexpectedEOF 2385 } 2386 if m.Result == nil { 2387 m.Result = &types.Result{} 2388 } 2389 if err := m.Result.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2390 return err 2391 } 2392 iNdEx = postIndex 2393 default: 2394 iNdEx = preIndex 2395 skippy, err := skipService(dAtA[iNdEx:]) 2396 if err != nil { 2397 return err 2398 } 2399 if (skippy < 0) || (iNdEx+skippy) < 0 { 2400 return ErrInvalidLengthService 2401 } 2402 if (iNdEx + skippy) > l { 2403 return io.ErrUnexpectedEOF 2404 } 2405 iNdEx += skippy 2406 } 2407 } 2408 2409 if iNdEx > l { 2410 return io.ErrUnexpectedEOF 2411 } 2412 return nil 2413 } 2414 func (m *GetTxRequest) Unmarshal(dAtA []byte) error { 2415 l := len(dAtA) 2416 iNdEx := 0 2417 for iNdEx < l { 2418 preIndex := iNdEx 2419 var wire uint64 2420 for shift := uint(0); ; shift += 7 { 2421 if shift >= 64 { 2422 return ErrIntOverflowService 2423 } 2424 if iNdEx >= l { 2425 return io.ErrUnexpectedEOF 2426 } 2427 b := dAtA[iNdEx] 2428 iNdEx++ 2429 wire |= uint64(b&0x7F) << shift 2430 if b < 0x80 { 2431 break 2432 } 2433 } 2434 fieldNum := int32(wire >> 3) 2435 wireType := int(wire & 0x7) 2436 if wireType == 4 { 2437 return fmt.Errorf("proto: GetTxRequest: wiretype end group for non-group") 2438 } 2439 if fieldNum <= 0 { 2440 return fmt.Errorf("proto: GetTxRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2441 } 2442 switch fieldNum { 2443 case 1: 2444 if wireType != 2 { 2445 return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) 2446 } 2447 var stringLen uint64 2448 for shift := uint(0); ; shift += 7 { 2449 if shift >= 64 { 2450 return ErrIntOverflowService 2451 } 2452 if iNdEx >= l { 2453 return io.ErrUnexpectedEOF 2454 } 2455 b := dAtA[iNdEx] 2456 iNdEx++ 2457 stringLen |= uint64(b&0x7F) << shift 2458 if b < 0x80 { 2459 break 2460 } 2461 } 2462 intStringLen := int(stringLen) 2463 if intStringLen < 0 { 2464 return ErrInvalidLengthService 2465 } 2466 postIndex := iNdEx + intStringLen 2467 if postIndex < 0 { 2468 return ErrInvalidLengthService 2469 } 2470 if postIndex > l { 2471 return io.ErrUnexpectedEOF 2472 } 2473 m.Hash = string(dAtA[iNdEx:postIndex]) 2474 iNdEx = postIndex 2475 default: 2476 iNdEx = preIndex 2477 skippy, err := skipService(dAtA[iNdEx:]) 2478 if err != nil { 2479 return err 2480 } 2481 if (skippy < 0) || (iNdEx+skippy) < 0 { 2482 return ErrInvalidLengthService 2483 } 2484 if (iNdEx + skippy) > l { 2485 return io.ErrUnexpectedEOF 2486 } 2487 iNdEx += skippy 2488 } 2489 } 2490 2491 if iNdEx > l { 2492 return io.ErrUnexpectedEOF 2493 } 2494 return nil 2495 } 2496 func (m *GetTxResponse) Unmarshal(dAtA []byte) error { 2497 l := len(dAtA) 2498 iNdEx := 0 2499 for iNdEx < l { 2500 preIndex := iNdEx 2501 var wire uint64 2502 for shift := uint(0); ; shift += 7 { 2503 if shift >= 64 { 2504 return ErrIntOverflowService 2505 } 2506 if iNdEx >= l { 2507 return io.ErrUnexpectedEOF 2508 } 2509 b := dAtA[iNdEx] 2510 iNdEx++ 2511 wire |= uint64(b&0x7F) << shift 2512 if b < 0x80 { 2513 break 2514 } 2515 } 2516 fieldNum := int32(wire >> 3) 2517 wireType := int(wire & 0x7) 2518 if wireType == 4 { 2519 return fmt.Errorf("proto: GetTxResponse: wiretype end group for non-group") 2520 } 2521 if fieldNum <= 0 { 2522 return fmt.Errorf("proto: GetTxResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2523 } 2524 switch fieldNum { 2525 case 1: 2526 if wireType != 2 { 2527 return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType) 2528 } 2529 var msglen int 2530 for shift := uint(0); ; shift += 7 { 2531 if shift >= 64 { 2532 return ErrIntOverflowService 2533 } 2534 if iNdEx >= l { 2535 return io.ErrUnexpectedEOF 2536 } 2537 b := dAtA[iNdEx] 2538 iNdEx++ 2539 msglen |= int(b&0x7F) << shift 2540 if b < 0x80 { 2541 break 2542 } 2543 } 2544 if msglen < 0 { 2545 return ErrInvalidLengthService 2546 } 2547 postIndex := iNdEx + msglen 2548 if postIndex < 0 { 2549 return ErrInvalidLengthService 2550 } 2551 if postIndex > l { 2552 return io.ErrUnexpectedEOF 2553 } 2554 if m.Tx == nil { 2555 m.Tx = &Tx{} 2556 } 2557 if err := m.Tx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2558 return err 2559 } 2560 iNdEx = postIndex 2561 case 2: 2562 if wireType != 2 { 2563 return fmt.Errorf("proto: wrong wireType = %d for field TxResponse", wireType) 2564 } 2565 var msglen int 2566 for shift := uint(0); ; shift += 7 { 2567 if shift >= 64 { 2568 return ErrIntOverflowService 2569 } 2570 if iNdEx >= l { 2571 return io.ErrUnexpectedEOF 2572 } 2573 b := dAtA[iNdEx] 2574 iNdEx++ 2575 msglen |= int(b&0x7F) << shift 2576 if b < 0x80 { 2577 break 2578 } 2579 } 2580 if msglen < 0 { 2581 return ErrInvalidLengthService 2582 } 2583 postIndex := iNdEx + msglen 2584 if postIndex < 0 { 2585 return ErrInvalidLengthService 2586 } 2587 if postIndex > l { 2588 return io.ErrUnexpectedEOF 2589 } 2590 if m.TxResponse == nil { 2591 m.TxResponse = &types.TxResponse{} 2592 } 2593 if err := m.TxResponse.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2594 return err 2595 } 2596 iNdEx = postIndex 2597 default: 2598 iNdEx = preIndex 2599 skippy, err := skipService(dAtA[iNdEx:]) 2600 if err != nil { 2601 return err 2602 } 2603 if (skippy < 0) || (iNdEx+skippy) < 0 { 2604 return ErrInvalidLengthService 2605 } 2606 if (iNdEx + skippy) > l { 2607 return io.ErrUnexpectedEOF 2608 } 2609 iNdEx += skippy 2610 } 2611 } 2612 2613 if iNdEx > l { 2614 return io.ErrUnexpectedEOF 2615 } 2616 return nil 2617 } 2618 func (m *GetBlockWithTxsRequest) Unmarshal(dAtA []byte) error { 2619 l := len(dAtA) 2620 iNdEx := 0 2621 for iNdEx < l { 2622 preIndex := iNdEx 2623 var wire uint64 2624 for shift := uint(0); ; shift += 7 { 2625 if shift >= 64 { 2626 return ErrIntOverflowService 2627 } 2628 if iNdEx >= l { 2629 return io.ErrUnexpectedEOF 2630 } 2631 b := dAtA[iNdEx] 2632 iNdEx++ 2633 wire |= uint64(b&0x7F) << shift 2634 if b < 0x80 { 2635 break 2636 } 2637 } 2638 fieldNum := int32(wire >> 3) 2639 wireType := int(wire & 0x7) 2640 if wireType == 4 { 2641 return fmt.Errorf("proto: GetBlockWithTxsRequest: wiretype end group for non-group") 2642 } 2643 if fieldNum <= 0 { 2644 return fmt.Errorf("proto: GetBlockWithTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) 2645 } 2646 switch fieldNum { 2647 case 1: 2648 if wireType != 0 { 2649 return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) 2650 } 2651 m.Height = 0 2652 for shift := uint(0); ; shift += 7 { 2653 if shift >= 64 { 2654 return ErrIntOverflowService 2655 } 2656 if iNdEx >= l { 2657 return io.ErrUnexpectedEOF 2658 } 2659 b := dAtA[iNdEx] 2660 iNdEx++ 2661 m.Height |= int64(b&0x7F) << shift 2662 if b < 0x80 { 2663 break 2664 } 2665 } 2666 case 2: 2667 if wireType != 2 { 2668 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 2669 } 2670 var msglen int 2671 for shift := uint(0); ; shift += 7 { 2672 if shift >= 64 { 2673 return ErrIntOverflowService 2674 } 2675 if iNdEx >= l { 2676 return io.ErrUnexpectedEOF 2677 } 2678 b := dAtA[iNdEx] 2679 iNdEx++ 2680 msglen |= int(b&0x7F) << shift 2681 if b < 0x80 { 2682 break 2683 } 2684 } 2685 if msglen < 0 { 2686 return ErrInvalidLengthService 2687 } 2688 postIndex := iNdEx + msglen 2689 if postIndex < 0 { 2690 return ErrInvalidLengthService 2691 } 2692 if postIndex > l { 2693 return io.ErrUnexpectedEOF 2694 } 2695 if m.Pagination == nil { 2696 m.Pagination = &query.PageRequest{} 2697 } 2698 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2699 return err 2700 } 2701 iNdEx = postIndex 2702 default: 2703 iNdEx = preIndex 2704 skippy, err := skipService(dAtA[iNdEx:]) 2705 if err != nil { 2706 return err 2707 } 2708 if (skippy < 0) || (iNdEx+skippy) < 0 { 2709 return ErrInvalidLengthService 2710 } 2711 if (iNdEx + skippy) > l { 2712 return io.ErrUnexpectedEOF 2713 } 2714 iNdEx += skippy 2715 } 2716 } 2717 2718 if iNdEx > l { 2719 return io.ErrUnexpectedEOF 2720 } 2721 return nil 2722 } 2723 func (m *GetBlockWithTxsResponse) Unmarshal(dAtA []byte) error { 2724 l := len(dAtA) 2725 iNdEx := 0 2726 for iNdEx < l { 2727 preIndex := iNdEx 2728 var wire uint64 2729 for shift := uint(0); ; shift += 7 { 2730 if shift >= 64 { 2731 return ErrIntOverflowService 2732 } 2733 if iNdEx >= l { 2734 return io.ErrUnexpectedEOF 2735 } 2736 b := dAtA[iNdEx] 2737 iNdEx++ 2738 wire |= uint64(b&0x7F) << shift 2739 if b < 0x80 { 2740 break 2741 } 2742 } 2743 fieldNum := int32(wire >> 3) 2744 wireType := int(wire & 0x7) 2745 if wireType == 4 { 2746 return fmt.Errorf("proto: GetBlockWithTxsResponse: wiretype end group for non-group") 2747 } 2748 if fieldNum <= 0 { 2749 return fmt.Errorf("proto: GetBlockWithTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) 2750 } 2751 switch fieldNum { 2752 case 1: 2753 if wireType != 2 { 2754 return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) 2755 } 2756 var msglen int 2757 for shift := uint(0); ; shift += 7 { 2758 if shift >= 64 { 2759 return ErrIntOverflowService 2760 } 2761 if iNdEx >= l { 2762 return io.ErrUnexpectedEOF 2763 } 2764 b := dAtA[iNdEx] 2765 iNdEx++ 2766 msglen |= int(b&0x7F) << shift 2767 if b < 0x80 { 2768 break 2769 } 2770 } 2771 if msglen < 0 { 2772 return ErrInvalidLengthService 2773 } 2774 postIndex := iNdEx + msglen 2775 if postIndex < 0 { 2776 return ErrInvalidLengthService 2777 } 2778 if postIndex > l { 2779 return io.ErrUnexpectedEOF 2780 } 2781 m.Txs = append(m.Txs, &Tx{}) 2782 if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2783 return err 2784 } 2785 iNdEx = postIndex 2786 case 2: 2787 if wireType != 2 { 2788 return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) 2789 } 2790 var msglen int 2791 for shift := uint(0); ; shift += 7 { 2792 if shift >= 64 { 2793 return ErrIntOverflowService 2794 } 2795 if iNdEx >= l { 2796 return io.ErrUnexpectedEOF 2797 } 2798 b := dAtA[iNdEx] 2799 iNdEx++ 2800 msglen |= int(b&0x7F) << shift 2801 if b < 0x80 { 2802 break 2803 } 2804 } 2805 if msglen < 0 { 2806 return ErrInvalidLengthService 2807 } 2808 postIndex := iNdEx + msglen 2809 if postIndex < 0 { 2810 return ErrInvalidLengthService 2811 } 2812 if postIndex > l { 2813 return io.ErrUnexpectedEOF 2814 } 2815 if m.BlockId == nil { 2816 m.BlockId = &types1.BlockID{} 2817 } 2818 if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2819 return err 2820 } 2821 iNdEx = postIndex 2822 case 3: 2823 if wireType != 2 { 2824 return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) 2825 } 2826 var msglen int 2827 for shift := uint(0); ; shift += 7 { 2828 if shift >= 64 { 2829 return ErrIntOverflowService 2830 } 2831 if iNdEx >= l { 2832 return io.ErrUnexpectedEOF 2833 } 2834 b := dAtA[iNdEx] 2835 iNdEx++ 2836 msglen |= int(b&0x7F) << shift 2837 if b < 0x80 { 2838 break 2839 } 2840 } 2841 if msglen < 0 { 2842 return ErrInvalidLengthService 2843 } 2844 postIndex := iNdEx + msglen 2845 if postIndex < 0 { 2846 return ErrInvalidLengthService 2847 } 2848 if postIndex > l { 2849 return io.ErrUnexpectedEOF 2850 } 2851 if m.Block == nil { 2852 m.Block = &types1.Block{} 2853 } 2854 if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2855 return err 2856 } 2857 iNdEx = postIndex 2858 case 4: 2859 if wireType != 2 { 2860 return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) 2861 } 2862 var msglen int 2863 for shift := uint(0); ; shift += 7 { 2864 if shift >= 64 { 2865 return ErrIntOverflowService 2866 } 2867 if iNdEx >= l { 2868 return io.ErrUnexpectedEOF 2869 } 2870 b := dAtA[iNdEx] 2871 iNdEx++ 2872 msglen |= int(b&0x7F) << shift 2873 if b < 0x80 { 2874 break 2875 } 2876 } 2877 if msglen < 0 { 2878 return ErrInvalidLengthService 2879 } 2880 postIndex := iNdEx + msglen 2881 if postIndex < 0 { 2882 return ErrInvalidLengthService 2883 } 2884 if postIndex > l { 2885 return io.ErrUnexpectedEOF 2886 } 2887 if m.Pagination == nil { 2888 m.Pagination = &query.PageResponse{} 2889 } 2890 if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2891 return err 2892 } 2893 iNdEx = postIndex 2894 default: 2895 iNdEx = preIndex 2896 skippy, err := skipService(dAtA[iNdEx:]) 2897 if err != nil { 2898 return err 2899 } 2900 if (skippy < 0) || (iNdEx+skippy) < 0 { 2901 return ErrInvalidLengthService 2902 } 2903 if (iNdEx + skippy) > l { 2904 return io.ErrUnexpectedEOF 2905 } 2906 iNdEx += skippy 2907 } 2908 } 2909 2910 if iNdEx > l { 2911 return io.ErrUnexpectedEOF 2912 } 2913 return nil 2914 } 2915 func skipService(dAtA []byte) (n int, err error) { 2916 l := len(dAtA) 2917 iNdEx := 0 2918 depth := 0 2919 for iNdEx < l { 2920 var wire uint64 2921 for shift := uint(0); ; shift += 7 { 2922 if shift >= 64 { 2923 return 0, ErrIntOverflowService 2924 } 2925 if iNdEx >= l { 2926 return 0, io.ErrUnexpectedEOF 2927 } 2928 b := dAtA[iNdEx] 2929 iNdEx++ 2930 wire |= (uint64(b) & 0x7F) << shift 2931 if b < 0x80 { 2932 break 2933 } 2934 } 2935 wireType := int(wire & 0x7) 2936 switch wireType { 2937 case 0: 2938 for shift := uint(0); ; shift += 7 { 2939 if shift >= 64 { 2940 return 0, ErrIntOverflowService 2941 } 2942 if iNdEx >= l { 2943 return 0, io.ErrUnexpectedEOF 2944 } 2945 iNdEx++ 2946 if dAtA[iNdEx-1] < 0x80 { 2947 break 2948 } 2949 } 2950 case 1: 2951 iNdEx += 8 2952 case 2: 2953 var length int 2954 for shift := uint(0); ; shift += 7 { 2955 if shift >= 64 { 2956 return 0, ErrIntOverflowService 2957 } 2958 if iNdEx >= l { 2959 return 0, io.ErrUnexpectedEOF 2960 } 2961 b := dAtA[iNdEx] 2962 iNdEx++ 2963 length |= (int(b) & 0x7F) << shift 2964 if b < 0x80 { 2965 break 2966 } 2967 } 2968 if length < 0 { 2969 return 0, ErrInvalidLengthService 2970 } 2971 iNdEx += length 2972 case 3: 2973 depth++ 2974 case 4: 2975 if depth == 0 { 2976 return 0, ErrUnexpectedEndOfGroupService 2977 } 2978 depth-- 2979 case 5: 2980 iNdEx += 4 2981 default: 2982 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2983 } 2984 if iNdEx < 0 { 2985 return 0, ErrInvalidLengthService 2986 } 2987 if depth == 0 { 2988 return iNdEx, nil 2989 } 2990 } 2991 return 0, io.ErrUnexpectedEOF 2992 } 2993 2994 var ( 2995 ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") 2996 ErrIntOverflowService = fmt.Errorf("proto: integer overflow") 2997 ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") 2998 )