github.com/Finschia/finschia-sdk@v0.48.1/x/bank/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: cosmos/bank/v1beta1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 10 types "github.com/Finschia/finschia-sdk/types" 11 _ "github.com/gogo/protobuf/gogoproto" 12 grpc1 "github.com/gogo/protobuf/grpc" 13 proto "github.com/gogo/protobuf/proto" 14 grpc "google.golang.org/grpc" 15 codes "google.golang.org/grpc/codes" 16 status "google.golang.org/grpc/status" 17 io "io" 18 math "math" 19 math_bits "math/bits" 20 ) 21 22 // Reference imports to suppress errors if they are not otherwise used. 23 var _ = proto.Marshal 24 var _ = fmt.Errorf 25 var _ = math.Inf 26 27 // This is a compile-time assertion to ensure that this generated file 28 // is compatible with the proto package it is being compiled against. 29 // A compilation error at this line likely means your copy of the 30 // proto package needs to be updated. 31 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 32 33 // MsgSend represents a message to send coins from one account to another. 34 type MsgSend struct { 35 FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` 36 ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` 37 Amount github_com_Finschia_finschia_sdk_types.Coins `protobuf:"bytes,3,rep,name=amount,proto3,castrepeated=github.com/Finschia/finschia-sdk/types.Coins" json:"amount"` 38 } 39 40 func (m *MsgSend) Reset() { *m = MsgSend{} } 41 func (m *MsgSend) String() string { return proto.CompactTextString(m) } 42 func (*MsgSend) ProtoMessage() {} 43 func (*MsgSend) Descriptor() ([]byte, []int) { 44 return fileDescriptor_1d8cb1613481f5b7, []int{0} 45 } 46 func (m *MsgSend) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *MsgSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_MsgSend.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *MsgSend) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_MsgSend.Merge(m, src) 63 } 64 func (m *MsgSend) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *MsgSend) XXX_DiscardUnknown() { 68 xxx_messageInfo_MsgSend.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_MsgSend proto.InternalMessageInfo 72 73 // MsgSendResponse defines the Msg/Send response type. 74 type MsgSendResponse struct { 75 } 76 77 func (m *MsgSendResponse) Reset() { *m = MsgSendResponse{} } 78 func (m *MsgSendResponse) String() string { return proto.CompactTextString(m) } 79 func (*MsgSendResponse) ProtoMessage() {} 80 func (*MsgSendResponse) Descriptor() ([]byte, []int) { 81 return fileDescriptor_1d8cb1613481f5b7, []int{1} 82 } 83 func (m *MsgSendResponse) XXX_Unmarshal(b []byte) error { 84 return m.Unmarshal(b) 85 } 86 func (m *MsgSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 87 if deterministic { 88 return xxx_messageInfo_MsgSendResponse.Marshal(b, m, deterministic) 89 } else { 90 b = b[:cap(b)] 91 n, err := m.MarshalToSizedBuffer(b) 92 if err != nil { 93 return nil, err 94 } 95 return b[:n], nil 96 } 97 } 98 func (m *MsgSendResponse) XXX_Merge(src proto.Message) { 99 xxx_messageInfo_MsgSendResponse.Merge(m, src) 100 } 101 func (m *MsgSendResponse) XXX_Size() int { 102 return m.Size() 103 } 104 func (m *MsgSendResponse) XXX_DiscardUnknown() { 105 xxx_messageInfo_MsgSendResponse.DiscardUnknown(m) 106 } 107 108 var xxx_messageInfo_MsgSendResponse proto.InternalMessageInfo 109 110 // MsgMultiSend represents an arbitrary multi-in, multi-out send message. 111 type MsgMultiSend struct { 112 Inputs []Input `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs"` 113 Outputs []Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs"` 114 } 115 116 func (m *MsgMultiSend) Reset() { *m = MsgMultiSend{} } 117 func (m *MsgMultiSend) String() string { return proto.CompactTextString(m) } 118 func (*MsgMultiSend) ProtoMessage() {} 119 func (*MsgMultiSend) Descriptor() ([]byte, []int) { 120 return fileDescriptor_1d8cb1613481f5b7, []int{2} 121 } 122 func (m *MsgMultiSend) XXX_Unmarshal(b []byte) error { 123 return m.Unmarshal(b) 124 } 125 func (m *MsgMultiSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 126 if deterministic { 127 return xxx_messageInfo_MsgMultiSend.Marshal(b, m, deterministic) 128 } else { 129 b = b[:cap(b)] 130 n, err := m.MarshalToSizedBuffer(b) 131 if err != nil { 132 return nil, err 133 } 134 return b[:n], nil 135 } 136 } 137 func (m *MsgMultiSend) XXX_Merge(src proto.Message) { 138 xxx_messageInfo_MsgMultiSend.Merge(m, src) 139 } 140 func (m *MsgMultiSend) XXX_Size() int { 141 return m.Size() 142 } 143 func (m *MsgMultiSend) XXX_DiscardUnknown() { 144 xxx_messageInfo_MsgMultiSend.DiscardUnknown(m) 145 } 146 147 var xxx_messageInfo_MsgMultiSend proto.InternalMessageInfo 148 149 func (m *MsgMultiSend) GetInputs() []Input { 150 if m != nil { 151 return m.Inputs 152 } 153 return nil 154 } 155 156 func (m *MsgMultiSend) GetOutputs() []Output { 157 if m != nil { 158 return m.Outputs 159 } 160 return nil 161 } 162 163 // MsgMultiSendResponse defines the Msg/MultiSend response type. 164 type MsgMultiSendResponse struct { 165 } 166 167 func (m *MsgMultiSendResponse) Reset() { *m = MsgMultiSendResponse{} } 168 func (m *MsgMultiSendResponse) String() string { return proto.CompactTextString(m) } 169 func (*MsgMultiSendResponse) ProtoMessage() {} 170 func (*MsgMultiSendResponse) Descriptor() ([]byte, []int) { 171 return fileDescriptor_1d8cb1613481f5b7, []int{3} 172 } 173 func (m *MsgMultiSendResponse) XXX_Unmarshal(b []byte) error { 174 return m.Unmarshal(b) 175 } 176 func (m *MsgMultiSendResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 177 if deterministic { 178 return xxx_messageInfo_MsgMultiSendResponse.Marshal(b, m, deterministic) 179 } else { 180 b = b[:cap(b)] 181 n, err := m.MarshalToSizedBuffer(b) 182 if err != nil { 183 return nil, err 184 } 185 return b[:n], nil 186 } 187 } 188 func (m *MsgMultiSendResponse) XXX_Merge(src proto.Message) { 189 xxx_messageInfo_MsgMultiSendResponse.Merge(m, src) 190 } 191 func (m *MsgMultiSendResponse) XXX_Size() int { 192 return m.Size() 193 } 194 func (m *MsgMultiSendResponse) XXX_DiscardUnknown() { 195 xxx_messageInfo_MsgMultiSendResponse.DiscardUnknown(m) 196 } 197 198 var xxx_messageInfo_MsgMultiSendResponse proto.InternalMessageInfo 199 200 func init() { 201 proto.RegisterType((*MsgSend)(nil), "cosmos.bank.v1beta1.MsgSend") 202 proto.RegisterType((*MsgSendResponse)(nil), "cosmos.bank.v1beta1.MsgSendResponse") 203 proto.RegisterType((*MsgMultiSend)(nil), "cosmos.bank.v1beta1.MsgMultiSend") 204 proto.RegisterType((*MsgMultiSendResponse)(nil), "cosmos.bank.v1beta1.MsgMultiSendResponse") 205 } 206 207 func init() { proto.RegisterFile("cosmos/bank/v1beta1/tx.proto", fileDescriptor_1d8cb1613481f5b7) } 208 209 var fileDescriptor_1d8cb1613481f5b7 = []byte{ 210 // 447 bytes of a gzipped FileDescriptorProto 211 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4d, 0x8b, 0xd3, 0x40, 212 0x1c, 0xc6, 0x33, 0xdb, 0xd2, 0xb5, 0xb3, 0x0b, 0xb2, 0xd9, 0x55, 0xd7, 0xb8, 0x24, 0x6b, 0xf0, 213 0x50, 0xc1, 0x4e, 0x68, 0xed, 0x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x68, 0xeb, 0xe5, 0x7c, 236 0xa5, 0x82, 0xc5, 0x4a, 0x05, 0x3f, 0x57, 0x2a, 0xf8, 0xb2, 0x56, 0xa5, 0xc5, 0x5a, 0x95, 0xbe, 237 0xaf, 0x55, 0xe9, 0x7d, 0xfb, 0xe0, 0x06, 0x27, 0xf9, 0x73, 0x15, 0x8b, 0xf4, 0x1a, 0xe2, 0xa1, 238 0x3e, 0xfe, 0x13, 0x00, 0x00, 0xff, 0xff, 0x27, 0x8a, 0x0c, 0x05, 0x33, 0x03, 0x00, 0x00, 239 } 240 241 // Reference imports to suppress errors if they are not otherwise used. 242 var _ context.Context 243 var _ grpc.ClientConn 244 245 // This is a compile-time assertion to ensure that this generated file 246 // is compatible with the grpc package it is being compiled against. 247 const _ = grpc.SupportPackageIsVersion4 248 249 // MsgClient is the client API for Msg service. 250 // 251 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 252 type MsgClient interface { 253 // Send defines a method for sending coins from one account to another account. 254 Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) 255 // MultiSend defines a method for sending coins from some accounts to other accounts. 256 MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) 257 } 258 259 type msgClient struct { 260 cc grpc1.ClientConn 261 } 262 263 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 264 return &msgClient{cc} 265 } 266 267 func (c *msgClient) Send(ctx context.Context, in *MsgSend, opts ...grpc.CallOption) (*MsgSendResponse, error) { 268 out := new(MsgSendResponse) 269 err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Msg/Send", in, out, opts...) 270 if err != nil { 271 return nil, err 272 } 273 return out, nil 274 } 275 276 func (c *msgClient) MultiSend(ctx context.Context, in *MsgMultiSend, opts ...grpc.CallOption) (*MsgMultiSendResponse, error) { 277 out := new(MsgMultiSendResponse) 278 err := c.cc.Invoke(ctx, "/cosmos.bank.v1beta1.Msg/MultiSend", in, out, opts...) 279 if err != nil { 280 return nil, err 281 } 282 return out, nil 283 } 284 285 // MsgServer is the server API for Msg service. 286 type MsgServer interface { 287 // Send defines a method for sending coins from one account to another account. 288 Send(context.Context, *MsgSend) (*MsgSendResponse, error) 289 // MultiSend defines a method for sending coins from some accounts to other accounts. 290 MultiSend(context.Context, *MsgMultiSend) (*MsgMultiSendResponse, error) 291 } 292 293 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 294 type UnimplementedMsgServer struct { 295 } 296 297 func (*UnimplementedMsgServer) Send(ctx context.Context, req *MsgSend) (*MsgSendResponse, error) { 298 return nil, status.Errorf(codes.Unimplemented, "method Send not implemented") 299 } 300 func (*UnimplementedMsgServer) MultiSend(ctx context.Context, req *MsgMultiSend) (*MsgMultiSendResponse, error) { 301 return nil, status.Errorf(codes.Unimplemented, "method MultiSend not implemented") 302 } 303 304 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 305 s.RegisterService(&_Msg_serviceDesc, srv) 306 } 307 308 func _Msg_Send_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 309 in := new(MsgSend) 310 if err := dec(in); err != nil { 311 return nil, err 312 } 313 if interceptor == nil { 314 return srv.(MsgServer).Send(ctx, in) 315 } 316 info := &grpc.UnaryServerInfo{ 317 Server: srv, 318 FullMethod: "/cosmos.bank.v1beta1.Msg/Send", 319 } 320 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 321 return srv.(MsgServer).Send(ctx, req.(*MsgSend)) 322 } 323 return interceptor(ctx, in, info, handler) 324 } 325 326 func _Msg_MultiSend_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 327 in := new(MsgMultiSend) 328 if err := dec(in); err != nil { 329 return nil, err 330 } 331 if interceptor == nil { 332 return srv.(MsgServer).MultiSend(ctx, in) 333 } 334 info := &grpc.UnaryServerInfo{ 335 Server: srv, 336 FullMethod: "/cosmos.bank.v1beta1.Msg/MultiSend", 337 } 338 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 339 return srv.(MsgServer).MultiSend(ctx, req.(*MsgMultiSend)) 340 } 341 return interceptor(ctx, in, info, handler) 342 } 343 344 var _Msg_serviceDesc = grpc.ServiceDesc{ 345 ServiceName: "cosmos.bank.v1beta1.Msg", 346 HandlerType: (*MsgServer)(nil), 347 Methods: []grpc.MethodDesc{ 348 { 349 MethodName: "Send", 350 Handler: _Msg_Send_Handler, 351 }, 352 { 353 MethodName: "MultiSend", 354 Handler: _Msg_MultiSend_Handler, 355 }, 356 }, 357 Streams: []grpc.StreamDesc{}, 358 Metadata: "cosmos/bank/v1beta1/tx.proto", 359 } 360 361 func (m *MsgSend) Marshal() (dAtA []byte, err error) { 362 size := m.Size() 363 dAtA = make([]byte, size) 364 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 365 if err != nil { 366 return nil, err 367 } 368 return dAtA[:n], nil 369 } 370 371 func (m *MsgSend) MarshalTo(dAtA []byte) (int, error) { 372 size := m.Size() 373 return m.MarshalToSizedBuffer(dAtA[:size]) 374 } 375 376 func (m *MsgSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { 377 i := len(dAtA) 378 _ = i 379 var l int 380 _ = l 381 if len(m.Amount) > 0 { 382 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 383 { 384 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 385 if err != nil { 386 return 0, err 387 } 388 i -= size 389 i = encodeVarintTx(dAtA, i, uint64(size)) 390 } 391 i-- 392 dAtA[i] = 0x1a 393 } 394 } 395 if len(m.ToAddress) > 0 { 396 i -= len(m.ToAddress) 397 copy(dAtA[i:], m.ToAddress) 398 i = encodeVarintTx(dAtA, i, uint64(len(m.ToAddress))) 399 i-- 400 dAtA[i] = 0x12 401 } 402 if len(m.FromAddress) > 0 { 403 i -= len(m.FromAddress) 404 copy(dAtA[i:], m.FromAddress) 405 i = encodeVarintTx(dAtA, i, uint64(len(m.FromAddress))) 406 i-- 407 dAtA[i] = 0xa 408 } 409 return len(dAtA) - i, nil 410 } 411 412 func (m *MsgSendResponse) Marshal() (dAtA []byte, err error) { 413 size := m.Size() 414 dAtA = make([]byte, size) 415 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 416 if err != nil { 417 return nil, err 418 } 419 return dAtA[:n], nil 420 } 421 422 func (m *MsgSendResponse) MarshalTo(dAtA []byte) (int, error) { 423 size := m.Size() 424 return m.MarshalToSizedBuffer(dAtA[:size]) 425 } 426 427 func (m *MsgSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 428 i := len(dAtA) 429 _ = i 430 var l int 431 _ = l 432 return len(dAtA) - i, nil 433 } 434 435 func (m *MsgMultiSend) Marshal() (dAtA []byte, err error) { 436 size := m.Size() 437 dAtA = make([]byte, size) 438 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 439 if err != nil { 440 return nil, err 441 } 442 return dAtA[:n], nil 443 } 444 445 func (m *MsgMultiSend) MarshalTo(dAtA []byte) (int, error) { 446 size := m.Size() 447 return m.MarshalToSizedBuffer(dAtA[:size]) 448 } 449 450 func (m *MsgMultiSend) MarshalToSizedBuffer(dAtA []byte) (int, error) { 451 i := len(dAtA) 452 _ = i 453 var l int 454 _ = l 455 if len(m.Outputs) > 0 { 456 for iNdEx := len(m.Outputs) - 1; iNdEx >= 0; iNdEx-- { 457 { 458 size, err := m.Outputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 459 if err != nil { 460 return 0, err 461 } 462 i -= size 463 i = encodeVarintTx(dAtA, i, uint64(size)) 464 } 465 i-- 466 dAtA[i] = 0x12 467 } 468 } 469 if len(m.Inputs) > 0 { 470 for iNdEx := len(m.Inputs) - 1; iNdEx >= 0; iNdEx-- { 471 { 472 size, err := m.Inputs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 473 if err != nil { 474 return 0, err 475 } 476 i -= size 477 i = encodeVarintTx(dAtA, i, uint64(size)) 478 } 479 i-- 480 dAtA[i] = 0xa 481 } 482 } 483 return len(dAtA) - i, nil 484 } 485 486 func (m *MsgMultiSendResponse) Marshal() (dAtA []byte, err error) { 487 size := m.Size() 488 dAtA = make([]byte, size) 489 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 490 if err != nil { 491 return nil, err 492 } 493 return dAtA[:n], nil 494 } 495 496 func (m *MsgMultiSendResponse) MarshalTo(dAtA []byte) (int, error) { 497 size := m.Size() 498 return m.MarshalToSizedBuffer(dAtA[:size]) 499 } 500 501 func (m *MsgMultiSendResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 502 i := len(dAtA) 503 _ = i 504 var l int 505 _ = l 506 return len(dAtA) - i, nil 507 } 508 509 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 510 offset -= sovTx(v) 511 base := offset 512 for v >= 1<<7 { 513 dAtA[offset] = uint8(v&0x7f | 0x80) 514 v >>= 7 515 offset++ 516 } 517 dAtA[offset] = uint8(v) 518 return base 519 } 520 func (m *MsgSend) Size() (n int) { 521 if m == nil { 522 return 0 523 } 524 var l int 525 _ = l 526 l = len(m.FromAddress) 527 if l > 0 { 528 n += 1 + l + sovTx(uint64(l)) 529 } 530 l = len(m.ToAddress) 531 if l > 0 { 532 n += 1 + l + sovTx(uint64(l)) 533 } 534 if len(m.Amount) > 0 { 535 for _, e := range m.Amount { 536 l = e.Size() 537 n += 1 + l + sovTx(uint64(l)) 538 } 539 } 540 return n 541 } 542 543 func (m *MsgSendResponse) Size() (n int) { 544 if m == nil { 545 return 0 546 } 547 var l int 548 _ = l 549 return n 550 } 551 552 func (m *MsgMultiSend) Size() (n int) { 553 if m == nil { 554 return 0 555 } 556 var l int 557 _ = l 558 if len(m.Inputs) > 0 { 559 for _, e := range m.Inputs { 560 l = e.Size() 561 n += 1 + l + sovTx(uint64(l)) 562 } 563 } 564 if len(m.Outputs) > 0 { 565 for _, e := range m.Outputs { 566 l = e.Size() 567 n += 1 + l + sovTx(uint64(l)) 568 } 569 } 570 return n 571 } 572 573 func (m *MsgMultiSendResponse) Size() (n int) { 574 if m == nil { 575 return 0 576 } 577 var l int 578 _ = l 579 return n 580 } 581 582 func sovTx(x uint64) (n int) { 583 return (math_bits.Len64(x|1) + 6) / 7 584 } 585 func sozTx(x uint64) (n int) { 586 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 587 } 588 func (m *MsgSend) Unmarshal(dAtA []byte) error { 589 l := len(dAtA) 590 iNdEx := 0 591 for iNdEx < l { 592 preIndex := iNdEx 593 var wire uint64 594 for shift := uint(0); ; shift += 7 { 595 if shift >= 64 { 596 return ErrIntOverflowTx 597 } 598 if iNdEx >= l { 599 return io.ErrUnexpectedEOF 600 } 601 b := dAtA[iNdEx] 602 iNdEx++ 603 wire |= uint64(b&0x7F) << shift 604 if b < 0x80 { 605 break 606 } 607 } 608 fieldNum := int32(wire >> 3) 609 wireType := int(wire & 0x7) 610 if wireType == 4 { 611 return fmt.Errorf("proto: MsgSend: wiretype end group for non-group") 612 } 613 if fieldNum <= 0 { 614 return fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) 615 } 616 switch fieldNum { 617 case 1: 618 if wireType != 2 { 619 return fmt.Errorf("proto: wrong wireType = %d for field FromAddress", wireType) 620 } 621 var stringLen uint64 622 for shift := uint(0); ; shift += 7 { 623 if shift >= 64 { 624 return ErrIntOverflowTx 625 } 626 if iNdEx >= l { 627 return io.ErrUnexpectedEOF 628 } 629 b := dAtA[iNdEx] 630 iNdEx++ 631 stringLen |= uint64(b&0x7F) << shift 632 if b < 0x80 { 633 break 634 } 635 } 636 intStringLen := int(stringLen) 637 if intStringLen < 0 { 638 return ErrInvalidLengthTx 639 } 640 postIndex := iNdEx + intStringLen 641 if postIndex < 0 { 642 return ErrInvalidLengthTx 643 } 644 if postIndex > l { 645 return io.ErrUnexpectedEOF 646 } 647 m.FromAddress = string(dAtA[iNdEx:postIndex]) 648 iNdEx = postIndex 649 case 2: 650 if wireType != 2 { 651 return fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) 652 } 653 var stringLen uint64 654 for shift := uint(0); ; shift += 7 { 655 if shift >= 64 { 656 return ErrIntOverflowTx 657 } 658 if iNdEx >= l { 659 return io.ErrUnexpectedEOF 660 } 661 b := dAtA[iNdEx] 662 iNdEx++ 663 stringLen |= uint64(b&0x7F) << shift 664 if b < 0x80 { 665 break 666 } 667 } 668 intStringLen := int(stringLen) 669 if intStringLen < 0 { 670 return ErrInvalidLengthTx 671 } 672 postIndex := iNdEx + intStringLen 673 if postIndex < 0 { 674 return ErrInvalidLengthTx 675 } 676 if postIndex > l { 677 return io.ErrUnexpectedEOF 678 } 679 m.ToAddress = string(dAtA[iNdEx:postIndex]) 680 iNdEx = postIndex 681 case 3: 682 if wireType != 2 { 683 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 684 } 685 var msglen int 686 for shift := uint(0); ; shift += 7 { 687 if shift >= 64 { 688 return ErrIntOverflowTx 689 } 690 if iNdEx >= l { 691 return io.ErrUnexpectedEOF 692 } 693 b := dAtA[iNdEx] 694 iNdEx++ 695 msglen |= int(b&0x7F) << shift 696 if b < 0x80 { 697 break 698 } 699 } 700 if msglen < 0 { 701 return ErrInvalidLengthTx 702 } 703 postIndex := iNdEx + msglen 704 if postIndex < 0 { 705 return ErrInvalidLengthTx 706 } 707 if postIndex > l { 708 return io.ErrUnexpectedEOF 709 } 710 m.Amount = append(m.Amount, types.Coin{}) 711 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 712 return err 713 } 714 iNdEx = postIndex 715 default: 716 iNdEx = preIndex 717 skippy, err := skipTx(dAtA[iNdEx:]) 718 if err != nil { 719 return err 720 } 721 if (skippy < 0) || (iNdEx+skippy) < 0 { 722 return ErrInvalidLengthTx 723 } 724 if (iNdEx + skippy) > l { 725 return io.ErrUnexpectedEOF 726 } 727 iNdEx += skippy 728 } 729 } 730 731 if iNdEx > l { 732 return io.ErrUnexpectedEOF 733 } 734 return nil 735 } 736 func (m *MsgSendResponse) Unmarshal(dAtA []byte) error { 737 l := len(dAtA) 738 iNdEx := 0 739 for iNdEx < l { 740 preIndex := iNdEx 741 var wire uint64 742 for shift := uint(0); ; shift += 7 { 743 if shift >= 64 { 744 return ErrIntOverflowTx 745 } 746 if iNdEx >= l { 747 return io.ErrUnexpectedEOF 748 } 749 b := dAtA[iNdEx] 750 iNdEx++ 751 wire |= uint64(b&0x7F) << shift 752 if b < 0x80 { 753 break 754 } 755 } 756 fieldNum := int32(wire >> 3) 757 wireType := int(wire & 0x7) 758 if wireType == 4 { 759 return fmt.Errorf("proto: MsgSendResponse: wiretype end group for non-group") 760 } 761 if fieldNum <= 0 { 762 return fmt.Errorf("proto: MsgSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) 763 } 764 switch fieldNum { 765 default: 766 iNdEx = preIndex 767 skippy, err := skipTx(dAtA[iNdEx:]) 768 if err != nil { 769 return err 770 } 771 if (skippy < 0) || (iNdEx+skippy) < 0 { 772 return ErrInvalidLengthTx 773 } 774 if (iNdEx + skippy) > l { 775 return io.ErrUnexpectedEOF 776 } 777 iNdEx += skippy 778 } 779 } 780 781 if iNdEx > l { 782 return io.ErrUnexpectedEOF 783 } 784 return nil 785 } 786 func (m *MsgMultiSend) Unmarshal(dAtA []byte) error { 787 l := len(dAtA) 788 iNdEx := 0 789 for iNdEx < l { 790 preIndex := iNdEx 791 var wire uint64 792 for shift := uint(0); ; shift += 7 { 793 if shift >= 64 { 794 return ErrIntOverflowTx 795 } 796 if iNdEx >= l { 797 return io.ErrUnexpectedEOF 798 } 799 b := dAtA[iNdEx] 800 iNdEx++ 801 wire |= uint64(b&0x7F) << shift 802 if b < 0x80 { 803 break 804 } 805 } 806 fieldNum := int32(wire >> 3) 807 wireType := int(wire & 0x7) 808 if wireType == 4 { 809 return fmt.Errorf("proto: MsgMultiSend: wiretype end group for non-group") 810 } 811 if fieldNum <= 0 { 812 return fmt.Errorf("proto: MsgMultiSend: illegal tag %d (wire type %d)", fieldNum, wire) 813 } 814 switch fieldNum { 815 case 1: 816 if wireType != 2 { 817 return fmt.Errorf("proto: wrong wireType = %d for field Inputs", wireType) 818 } 819 var msglen int 820 for shift := uint(0); ; shift += 7 { 821 if shift >= 64 { 822 return ErrIntOverflowTx 823 } 824 if iNdEx >= l { 825 return io.ErrUnexpectedEOF 826 } 827 b := dAtA[iNdEx] 828 iNdEx++ 829 msglen |= int(b&0x7F) << shift 830 if b < 0x80 { 831 break 832 } 833 } 834 if msglen < 0 { 835 return ErrInvalidLengthTx 836 } 837 postIndex := iNdEx + msglen 838 if postIndex < 0 { 839 return ErrInvalidLengthTx 840 } 841 if postIndex > l { 842 return io.ErrUnexpectedEOF 843 } 844 m.Inputs = append(m.Inputs, Input{}) 845 if err := m.Inputs[len(m.Inputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 846 return err 847 } 848 iNdEx = postIndex 849 case 2: 850 if wireType != 2 { 851 return fmt.Errorf("proto: wrong wireType = %d for field Outputs", wireType) 852 } 853 var msglen int 854 for shift := uint(0); ; shift += 7 { 855 if shift >= 64 { 856 return ErrIntOverflowTx 857 } 858 if iNdEx >= l { 859 return io.ErrUnexpectedEOF 860 } 861 b := dAtA[iNdEx] 862 iNdEx++ 863 msglen |= int(b&0x7F) << shift 864 if b < 0x80 { 865 break 866 } 867 } 868 if msglen < 0 { 869 return ErrInvalidLengthTx 870 } 871 postIndex := iNdEx + msglen 872 if postIndex < 0 { 873 return ErrInvalidLengthTx 874 } 875 if postIndex > l { 876 return io.ErrUnexpectedEOF 877 } 878 m.Outputs = append(m.Outputs, Output{}) 879 if err := m.Outputs[len(m.Outputs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 880 return err 881 } 882 iNdEx = postIndex 883 default: 884 iNdEx = preIndex 885 skippy, err := skipTx(dAtA[iNdEx:]) 886 if err != nil { 887 return err 888 } 889 if (skippy < 0) || (iNdEx+skippy) < 0 { 890 return ErrInvalidLengthTx 891 } 892 if (iNdEx + skippy) > l { 893 return io.ErrUnexpectedEOF 894 } 895 iNdEx += skippy 896 } 897 } 898 899 if iNdEx > l { 900 return io.ErrUnexpectedEOF 901 } 902 return nil 903 } 904 func (m *MsgMultiSendResponse) Unmarshal(dAtA []byte) error { 905 l := len(dAtA) 906 iNdEx := 0 907 for iNdEx < l { 908 preIndex := iNdEx 909 var wire uint64 910 for shift := uint(0); ; shift += 7 { 911 if shift >= 64 { 912 return ErrIntOverflowTx 913 } 914 if iNdEx >= l { 915 return io.ErrUnexpectedEOF 916 } 917 b := dAtA[iNdEx] 918 iNdEx++ 919 wire |= uint64(b&0x7F) << shift 920 if b < 0x80 { 921 break 922 } 923 } 924 fieldNum := int32(wire >> 3) 925 wireType := int(wire & 0x7) 926 if wireType == 4 { 927 return fmt.Errorf("proto: MsgMultiSendResponse: wiretype end group for non-group") 928 } 929 if fieldNum <= 0 { 930 return fmt.Errorf("proto: MsgMultiSendResponse: illegal tag %d (wire type %d)", fieldNum, wire) 931 } 932 switch fieldNum { 933 default: 934 iNdEx = preIndex 935 skippy, err := skipTx(dAtA[iNdEx:]) 936 if err != nil { 937 return err 938 } 939 if (skippy < 0) || (iNdEx+skippy) < 0 { 940 return ErrInvalidLengthTx 941 } 942 if (iNdEx + skippy) > l { 943 return io.ErrUnexpectedEOF 944 } 945 iNdEx += skippy 946 } 947 } 948 949 if iNdEx > l { 950 return io.ErrUnexpectedEOF 951 } 952 return nil 953 } 954 func skipTx(dAtA []byte) (n int, err error) { 955 l := len(dAtA) 956 iNdEx := 0 957 depth := 0 958 for iNdEx < l { 959 var wire uint64 960 for shift := uint(0); ; shift += 7 { 961 if shift >= 64 { 962 return 0, ErrIntOverflowTx 963 } 964 if iNdEx >= l { 965 return 0, io.ErrUnexpectedEOF 966 } 967 b := dAtA[iNdEx] 968 iNdEx++ 969 wire |= (uint64(b) & 0x7F) << shift 970 if b < 0x80 { 971 break 972 } 973 } 974 wireType := int(wire & 0x7) 975 switch wireType { 976 case 0: 977 for shift := uint(0); ; shift += 7 { 978 if shift >= 64 { 979 return 0, ErrIntOverflowTx 980 } 981 if iNdEx >= l { 982 return 0, io.ErrUnexpectedEOF 983 } 984 iNdEx++ 985 if dAtA[iNdEx-1] < 0x80 { 986 break 987 } 988 } 989 case 1: 990 iNdEx += 8 991 case 2: 992 var length int 993 for shift := uint(0); ; shift += 7 { 994 if shift >= 64 { 995 return 0, ErrIntOverflowTx 996 } 997 if iNdEx >= l { 998 return 0, io.ErrUnexpectedEOF 999 } 1000 b := dAtA[iNdEx] 1001 iNdEx++ 1002 length |= (int(b) & 0x7F) << shift 1003 if b < 0x80 { 1004 break 1005 } 1006 } 1007 if length < 0 { 1008 return 0, ErrInvalidLengthTx 1009 } 1010 iNdEx += length 1011 case 3: 1012 depth++ 1013 case 4: 1014 if depth == 0 { 1015 return 0, ErrUnexpectedEndOfGroupTx 1016 } 1017 depth-- 1018 case 5: 1019 iNdEx += 4 1020 default: 1021 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1022 } 1023 if iNdEx < 0 { 1024 return 0, ErrInvalidLengthTx 1025 } 1026 if depth == 0 { 1027 return iNdEx, nil 1028 } 1029 } 1030 return 0, io.ErrUnexpectedEOF 1031 } 1032 1033 var ( 1034 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 1035 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 1036 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 1037 )