github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/x/vmbridge/types/tx.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: vmbridge/wasm/v1/tx.proto 3 4 package types 5 6 import ( 7 context "context" 8 fmt "fmt" 9 _ "github.com/gogo/protobuf/gogoproto" 10 grpc1 "github.com/gogo/protobuf/grpc" 11 proto "github.com/gogo/protobuf/proto" 12 sdk "github.com/fibonacci-chain/fbc/libs/cosmos-sdk/types" 13 grpc "google.golang.org/grpc" 14 codes "google.golang.org/grpc/codes" 15 status "google.golang.org/grpc/status" 16 io "io" 17 math "math" 18 math_bits "math/bits" 19 ) 20 21 // Reference imports to suppress errors if they are not otherwise used. 22 var _ = proto.Marshal 23 var _ = fmt.Errorf 24 var _ = math.Inf 25 26 // This is a compile-time assertion to ensure that this generated file 27 // is compatible with the proto package it is being compiled against. 28 // A compilation error at this line likely means your copy of the 29 // proto package needs to be updated. 30 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 31 32 // MsgStoreCode submit Wasm code to the system 33 type MsgSendToEvm struct { 34 // Sender is the that actor that signed the messages 35 Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` 36 Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty"` 37 Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` 38 Amount sdk.Int `protobuf:"bytes,4,opt,name=amount,proto3,customtype=Int" json:"amount"` 39 } 40 41 func (m *MsgSendToEvm) Reset() { *m = MsgSendToEvm{} } 42 func (m *MsgSendToEvm) String() string { return proto.CompactTextString(m) } 43 func (*MsgSendToEvm) ProtoMessage() {} 44 func (*MsgSendToEvm) Descriptor() ([]byte, []int) { 45 return fileDescriptor_8bf6605aff77555b, []int{0} 46 } 47 func (m *MsgSendToEvm) XXX_Unmarshal(b []byte) error { 48 return m.Unmarshal(b) 49 } 50 func (m *MsgSendToEvm) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 51 if deterministic { 52 return xxx_messageInfo_MsgSendToEvm.Marshal(b, m, deterministic) 53 } else { 54 b = b[:cap(b)] 55 n, err := m.MarshalToSizedBuffer(b) 56 if err != nil { 57 return nil, err 58 } 59 return b[:n], nil 60 } 61 } 62 func (m *MsgSendToEvm) XXX_Merge(src proto.Message) { 63 xxx_messageInfo_MsgSendToEvm.Merge(m, src) 64 } 65 func (m *MsgSendToEvm) XXX_Size() int { 66 return m.Size() 67 } 68 func (m *MsgSendToEvm) XXX_DiscardUnknown() { 69 xxx_messageInfo_MsgSendToEvm.DiscardUnknown(m) 70 } 71 72 var xxx_messageInfo_MsgSendToEvm proto.InternalMessageInfo 73 74 // MsgStoreCodeResponse returns store result data. 75 type MsgSendToEvmResponse struct { 76 // CodeID is the reference to the stored WASM code 77 Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` 78 } 79 80 func (m *MsgSendToEvmResponse) Reset() { *m = MsgSendToEvmResponse{} } 81 func (m *MsgSendToEvmResponse) String() string { return proto.CompactTextString(m) } 82 func (*MsgSendToEvmResponse) ProtoMessage() {} 83 func (*MsgSendToEvmResponse) Descriptor() ([]byte, []int) { 84 return fileDescriptor_8bf6605aff77555b, []int{1} 85 } 86 func (m *MsgSendToEvmResponse) XXX_Unmarshal(b []byte) error { 87 return m.Unmarshal(b) 88 } 89 func (m *MsgSendToEvmResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 90 if deterministic { 91 return xxx_messageInfo_MsgSendToEvmResponse.Marshal(b, m, deterministic) 92 } else { 93 b = b[:cap(b)] 94 n, err := m.MarshalToSizedBuffer(b) 95 if err != nil { 96 return nil, err 97 } 98 return b[:n], nil 99 } 100 } 101 func (m *MsgSendToEvmResponse) XXX_Merge(src proto.Message) { 102 xxx_messageInfo_MsgSendToEvmResponse.Merge(m, src) 103 } 104 func (m *MsgSendToEvmResponse) XXX_Size() int { 105 return m.Size() 106 } 107 func (m *MsgSendToEvmResponse) XXX_DiscardUnknown() { 108 xxx_messageInfo_MsgSendToEvmResponse.DiscardUnknown(m) 109 } 110 111 var xxx_messageInfo_MsgSendToEvmResponse proto.InternalMessageInfo 112 113 func init() { 114 proto.RegisterType((*MsgSendToEvm)(nil), "vmbridge.wasm.v1.MsgSendToEvm") 115 proto.RegisterType((*MsgSendToEvmResponse)(nil), "vmbridge.wasm.v1.MsgSendToEvmResponse") 116 } 117 118 func init() { proto.RegisterFile("vmbridge/wasm/v1/tx.proto", fileDescriptor_8bf6605aff77555b) } 119 120 var fileDescriptor_8bf6605aff77555b = []byte{ 121 // 287 bytes of a gzipped FileDescriptorProto 122 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0xcb, 0x4d, 0x2a, 123 0xca, 0x4c, 0x49, 0x4f, 0xd5, 0x2f, 0x4f, 0x2c, 0xce, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 124 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x80, 0x49, 0xe9, 0x81, 0xa4, 0xf4, 0xca, 0x0c, 0xa5, 125 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x92, 0xfa, 0x20, 0x16, 0x44, 0x9d, 0x52, 0x2b, 0x23, 0x17, 126 0x8f, 0x6f, 0x71, 0x7a, 0x70, 0x6a, 0x5e, 0x4a, 0x48, 0xbe, 0x6b, 0x59, 0xae, 0x90, 0x18, 0x17, 127 0x5b, 0x71, 0x6a, 0x5e, 0x4a, 0x6a, 0x91, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, 0x94, 0x27, 128 0x24, 0xc5, 0xc5, 0x91, 0x9c, 0x9f, 0x57, 0x52, 0x94, 0x98, 0x5c, 0x22, 0xc1, 0x04, 0x96, 0x81, 129 0xf3, 0x85, 0x64, 0xb8, 0x38, 0x8b, 0x52, 0x93, 0x33, 0x0b, 0x32, 0x53, 0xf3, 0x4a, 0x24, 0x98, 130 0xc1, 0x92, 0x08, 0x01, 0x21, 0x65, 0x2e, 0xb6, 0xc4, 0xdc, 0xfc, 0xd2, 0xbc, 0x12, 0x09, 0x16, 131 0x90, 0x94, 0x13, 0xf7, 0x89, 0x7b, 0xf2, 0x0c, 0xb7, 0xee, 0xc9, 0x33, 0x7b, 0xe6, 0x95, 0x04, 132 0x41, 0xa5, 0x94, 0x0c, 0xb8, 0x44, 0x90, 0x9d, 0x11, 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 133 0x2a, 0x24, 0xc1, 0xc5, 0x5e, 0x5c, 0x9a, 0x9c, 0x9c, 0x5a, 0x5c, 0x0c, 0x76, 0x0f, 0x47, 0x10, 134 0x8c, 0x6b, 0x14, 0xcf, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0x14, 0xc1, 0xc5, 0x07, 0xd7, 0xe5, 0x5a, 135 0x06, 0xb2, 0x4f, 0x4e, 0x0f, 0xdd, 0xef, 0x7a, 0xc8, 0x46, 0x4b, 0xa9, 0xe1, 0x97, 0x87, 0x59, 136 0xed, 0xa4, 0x77, 0xe2, 0xa1, 0x1c, 0xc3, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, 0x3e, 137 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, 0x1e, 0xcb, 0x31, 138 0x44, 0x09, 0x54, 0xe8, 0xc3, 0x43, 0xbf, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x1c, 0xa2, 139 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x84, 0x09, 0xee, 0x61, 0x96, 0x01, 0x00, 0x00, 140 } 141 142 // Reference imports to suppress errors if they are not otherwise used. 143 var _ context.Context 144 var _ grpc.ClientConn 145 146 // This is a compile-time assertion to ensure that this generated file 147 // is compatible with the grpc package it is being compiled against. 148 const _ = grpc.SupportPackageIsVersion4 149 150 // MsgClient is the client API for Msg service. 151 // 152 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 153 type MsgClient interface { 154 // StoreCode to submit Wasm code to the system 155 SendToEvmEvent(ctx context.Context, in *MsgSendToEvm, opts ...grpc.CallOption) (*MsgSendToEvmResponse, error) 156 } 157 158 type msgClient struct { 159 cc grpc1.ClientConn 160 } 161 162 func NewMsgClient(cc grpc1.ClientConn) MsgClient { 163 return &msgClient{cc} 164 } 165 166 func (c *msgClient) SendToEvmEvent(ctx context.Context, in *MsgSendToEvm, opts ...grpc.CallOption) (*MsgSendToEvmResponse, error) { 167 out := new(MsgSendToEvmResponse) 168 err := c.cc.Invoke(ctx, "/vmbridge.wasm.v1.Msg/SendToEvmEvent", in, out, opts...) 169 if err != nil { 170 return nil, err 171 } 172 return out, nil 173 } 174 175 // MsgServer is the server API for Msg service. 176 type MsgServer interface { 177 // StoreCode to submit Wasm code to the system 178 SendToEvmEvent(context.Context, *MsgSendToEvm) (*MsgSendToEvmResponse, error) 179 } 180 181 // UnimplementedMsgServer can be embedded to have forward compatible implementations. 182 type UnimplementedMsgServer struct { 183 } 184 185 func (*UnimplementedMsgServer) SendToEvmEvent(ctx context.Context, req *MsgSendToEvm) (*MsgSendToEvmResponse, error) { 186 return nil, status.Errorf(codes.Unimplemented, "method SendToEvmEvent not implemented") 187 } 188 189 func RegisterMsgServer(s grpc1.Server, srv MsgServer) { 190 s.RegisterService(&_Msg_serviceDesc, srv) 191 } 192 193 func _Msg_SendToEvmEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 194 in := new(MsgSendToEvm) 195 if err := dec(in); err != nil { 196 return nil, err 197 } 198 if interceptor == nil { 199 return srv.(MsgServer).SendToEvmEvent(ctx, in) 200 } 201 info := &grpc.UnaryServerInfo{ 202 Server: srv, 203 FullMethod: "/vmbridge.wasm.v1.Msg/SendToEvmEvent", 204 } 205 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 206 return srv.(MsgServer).SendToEvmEvent(ctx, req.(*MsgSendToEvm)) 207 } 208 return interceptor(ctx, in, info, handler) 209 } 210 211 var _Msg_serviceDesc = grpc.ServiceDesc{ 212 ServiceName: "vmbridge.wasm.v1.Msg", 213 HandlerType: (*MsgServer)(nil), 214 Methods: []grpc.MethodDesc{ 215 { 216 MethodName: "SendToEvmEvent", 217 Handler: _Msg_SendToEvmEvent_Handler, 218 }, 219 }, 220 Streams: []grpc.StreamDesc{}, 221 Metadata: "vmbridge/wasm/v1/tx.proto", 222 } 223 224 func (m *MsgSendToEvm) Marshal() (dAtA []byte, err error) { 225 size := m.Size() 226 dAtA = make([]byte, size) 227 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 228 if err != nil { 229 return nil, err 230 } 231 return dAtA[:n], nil 232 } 233 234 func (m *MsgSendToEvm) MarshalTo(dAtA []byte) (int, error) { 235 size := m.Size() 236 return m.MarshalToSizedBuffer(dAtA[:size]) 237 } 238 239 func (m *MsgSendToEvm) MarshalToSizedBuffer(dAtA []byte) (int, error) { 240 i := len(dAtA) 241 _ = i 242 var l int 243 _ = l 244 { 245 size := m.Amount.Size() 246 i -= size 247 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 248 return 0, err 249 } 250 i = encodeVarintTx(dAtA, i, uint64(size)) 251 } 252 i-- 253 dAtA[i] = 0x22 254 if len(m.Recipient) > 0 { 255 i -= len(m.Recipient) 256 copy(dAtA[i:], m.Recipient) 257 i = encodeVarintTx(dAtA, i, uint64(len(m.Recipient))) 258 i-- 259 dAtA[i] = 0x1a 260 } 261 if len(m.Contract) > 0 { 262 i -= len(m.Contract) 263 copy(dAtA[i:], m.Contract) 264 i = encodeVarintTx(dAtA, i, uint64(len(m.Contract))) 265 i-- 266 dAtA[i] = 0x12 267 } 268 if len(m.Sender) > 0 { 269 i -= len(m.Sender) 270 copy(dAtA[i:], m.Sender) 271 i = encodeVarintTx(dAtA, i, uint64(len(m.Sender))) 272 i-- 273 dAtA[i] = 0xa 274 } 275 return len(dAtA) - i, nil 276 } 277 278 func (m *MsgSendToEvmResponse) Marshal() (dAtA []byte, err error) { 279 size := m.Size() 280 dAtA = make([]byte, size) 281 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 282 if err != nil { 283 return nil, err 284 } 285 return dAtA[:n], nil 286 } 287 288 func (m *MsgSendToEvmResponse) MarshalTo(dAtA []byte) (int, error) { 289 size := m.Size() 290 return m.MarshalToSizedBuffer(dAtA[:size]) 291 } 292 293 func (m *MsgSendToEvmResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { 294 i := len(dAtA) 295 _ = i 296 var l int 297 _ = l 298 if m.Success { 299 i-- 300 if m.Success { 301 dAtA[i] = 1 302 } else { 303 dAtA[i] = 0 304 } 305 i-- 306 dAtA[i] = 0x8 307 } 308 return len(dAtA) - i, nil 309 } 310 311 func encodeVarintTx(dAtA []byte, offset int, v uint64) int { 312 offset -= sovTx(v) 313 base := offset 314 for v >= 1<<7 { 315 dAtA[offset] = uint8(v&0x7f | 0x80) 316 v >>= 7 317 offset++ 318 } 319 dAtA[offset] = uint8(v) 320 return base 321 } 322 func (m *MsgSendToEvm) Size() (n int) { 323 if m == nil { 324 return 0 325 } 326 var l int 327 _ = l 328 l = len(m.Sender) 329 if l > 0 { 330 n += 1 + l + sovTx(uint64(l)) 331 } 332 l = len(m.Contract) 333 if l > 0 { 334 n += 1 + l + sovTx(uint64(l)) 335 } 336 l = len(m.Recipient) 337 if l > 0 { 338 n += 1 + l + sovTx(uint64(l)) 339 } 340 l = m.Amount.Size() 341 n += 1 + l + sovTx(uint64(l)) 342 return n 343 } 344 345 func (m *MsgSendToEvmResponse) Size() (n int) { 346 if m == nil { 347 return 0 348 } 349 var l int 350 _ = l 351 if m.Success { 352 n += 2 353 } 354 return n 355 } 356 357 func sovTx(x uint64) (n int) { 358 return (math_bits.Len64(x|1) + 6) / 7 359 } 360 func sozTx(x uint64) (n int) { 361 return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 362 } 363 func (m *MsgSendToEvm) Unmarshal(dAtA []byte) error { 364 l := len(dAtA) 365 iNdEx := 0 366 for iNdEx < l { 367 preIndex := iNdEx 368 var wire uint64 369 for shift := uint(0); ; shift += 7 { 370 if shift >= 64 { 371 return ErrIntOverflowTx 372 } 373 if iNdEx >= l { 374 return io.ErrUnexpectedEOF 375 } 376 b := dAtA[iNdEx] 377 iNdEx++ 378 wire |= uint64(b&0x7F) << shift 379 if b < 0x80 { 380 break 381 } 382 } 383 fieldNum := int32(wire >> 3) 384 wireType := int(wire & 0x7) 385 if wireType == 4 { 386 return fmt.Errorf("proto: MsgSendToEvm: wiretype end group for non-group") 387 } 388 if fieldNum <= 0 { 389 return fmt.Errorf("proto: MsgSendToEvm: illegal tag %d (wire type %d)", fieldNum, wire) 390 } 391 switch fieldNum { 392 case 1: 393 if wireType != 2 { 394 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 395 } 396 var stringLen uint64 397 for shift := uint(0); ; shift += 7 { 398 if shift >= 64 { 399 return ErrIntOverflowTx 400 } 401 if iNdEx >= l { 402 return io.ErrUnexpectedEOF 403 } 404 b := dAtA[iNdEx] 405 iNdEx++ 406 stringLen |= uint64(b&0x7F) << shift 407 if b < 0x80 { 408 break 409 } 410 } 411 intStringLen := int(stringLen) 412 if intStringLen < 0 { 413 return ErrInvalidLengthTx 414 } 415 postIndex := iNdEx + intStringLen 416 if postIndex < 0 { 417 return ErrInvalidLengthTx 418 } 419 if postIndex > l { 420 return io.ErrUnexpectedEOF 421 } 422 m.Sender = string(dAtA[iNdEx:postIndex]) 423 iNdEx = postIndex 424 case 2: 425 if wireType != 2 { 426 return fmt.Errorf("proto: wrong wireType = %d for field Contract", wireType) 427 } 428 var stringLen uint64 429 for shift := uint(0); ; shift += 7 { 430 if shift >= 64 { 431 return ErrIntOverflowTx 432 } 433 if iNdEx >= l { 434 return io.ErrUnexpectedEOF 435 } 436 b := dAtA[iNdEx] 437 iNdEx++ 438 stringLen |= uint64(b&0x7F) << shift 439 if b < 0x80 { 440 break 441 } 442 } 443 intStringLen := int(stringLen) 444 if intStringLen < 0 { 445 return ErrInvalidLengthTx 446 } 447 postIndex := iNdEx + intStringLen 448 if postIndex < 0 { 449 return ErrInvalidLengthTx 450 } 451 if postIndex > l { 452 return io.ErrUnexpectedEOF 453 } 454 m.Contract = string(dAtA[iNdEx:postIndex]) 455 iNdEx = postIndex 456 case 3: 457 if wireType != 2 { 458 return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) 459 } 460 var stringLen uint64 461 for shift := uint(0); ; shift += 7 { 462 if shift >= 64 { 463 return ErrIntOverflowTx 464 } 465 if iNdEx >= l { 466 return io.ErrUnexpectedEOF 467 } 468 b := dAtA[iNdEx] 469 iNdEx++ 470 stringLen |= uint64(b&0x7F) << shift 471 if b < 0x80 { 472 break 473 } 474 } 475 intStringLen := int(stringLen) 476 if intStringLen < 0 { 477 return ErrInvalidLengthTx 478 } 479 postIndex := iNdEx + intStringLen 480 if postIndex < 0 { 481 return ErrInvalidLengthTx 482 } 483 if postIndex > l { 484 return io.ErrUnexpectedEOF 485 } 486 m.Recipient = string(dAtA[iNdEx:postIndex]) 487 iNdEx = postIndex 488 case 4: 489 if wireType != 2 { 490 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 491 } 492 var stringLen uint64 493 for shift := uint(0); ; shift += 7 { 494 if shift >= 64 { 495 return ErrIntOverflowTx 496 } 497 if iNdEx >= l { 498 return io.ErrUnexpectedEOF 499 } 500 b := dAtA[iNdEx] 501 iNdEx++ 502 stringLen |= uint64(b&0x7F) << shift 503 if b < 0x80 { 504 break 505 } 506 } 507 intStringLen := int(stringLen) 508 if intStringLen < 0 { 509 return ErrInvalidLengthTx 510 } 511 postIndex := iNdEx + intStringLen 512 if postIndex < 0 { 513 return ErrInvalidLengthTx 514 } 515 if postIndex > l { 516 return io.ErrUnexpectedEOF 517 } 518 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 519 return err 520 } 521 iNdEx = postIndex 522 default: 523 iNdEx = preIndex 524 skippy, err := skipTx(dAtA[iNdEx:]) 525 if err != nil { 526 return err 527 } 528 if (skippy < 0) || (iNdEx+skippy) < 0 { 529 return ErrInvalidLengthTx 530 } 531 if (iNdEx + skippy) > l { 532 return io.ErrUnexpectedEOF 533 } 534 iNdEx += skippy 535 } 536 } 537 538 if iNdEx > l { 539 return io.ErrUnexpectedEOF 540 } 541 return nil 542 } 543 func (m *MsgSendToEvmResponse) Unmarshal(dAtA []byte) error { 544 l := len(dAtA) 545 iNdEx := 0 546 for iNdEx < l { 547 preIndex := iNdEx 548 var wire uint64 549 for shift := uint(0); ; shift += 7 { 550 if shift >= 64 { 551 return ErrIntOverflowTx 552 } 553 if iNdEx >= l { 554 return io.ErrUnexpectedEOF 555 } 556 b := dAtA[iNdEx] 557 iNdEx++ 558 wire |= uint64(b&0x7F) << shift 559 if b < 0x80 { 560 break 561 } 562 } 563 fieldNum := int32(wire >> 3) 564 wireType := int(wire & 0x7) 565 if wireType == 4 { 566 return fmt.Errorf("proto: MsgSendToEvmResponse: wiretype end group for non-group") 567 } 568 if fieldNum <= 0 { 569 return fmt.Errorf("proto: MsgSendToEvmResponse: illegal tag %d (wire type %d)", fieldNum, wire) 570 } 571 switch fieldNum { 572 case 1: 573 if wireType != 0 { 574 return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) 575 } 576 var v int 577 for shift := uint(0); ; shift += 7 { 578 if shift >= 64 { 579 return ErrIntOverflowTx 580 } 581 if iNdEx >= l { 582 return io.ErrUnexpectedEOF 583 } 584 b := dAtA[iNdEx] 585 iNdEx++ 586 v |= int(b&0x7F) << shift 587 if b < 0x80 { 588 break 589 } 590 } 591 m.Success = bool(v != 0) 592 default: 593 iNdEx = preIndex 594 skippy, err := skipTx(dAtA[iNdEx:]) 595 if err != nil { 596 return err 597 } 598 if (skippy < 0) || (iNdEx+skippy) < 0 { 599 return ErrInvalidLengthTx 600 } 601 if (iNdEx + skippy) > l { 602 return io.ErrUnexpectedEOF 603 } 604 iNdEx += skippy 605 } 606 } 607 608 if iNdEx > l { 609 return io.ErrUnexpectedEOF 610 } 611 return nil 612 } 613 func skipTx(dAtA []byte) (n int, err error) { 614 l := len(dAtA) 615 iNdEx := 0 616 depth := 0 617 for iNdEx < l { 618 var wire uint64 619 for shift := uint(0); ; shift += 7 { 620 if shift >= 64 { 621 return 0, ErrIntOverflowTx 622 } 623 if iNdEx >= l { 624 return 0, io.ErrUnexpectedEOF 625 } 626 b := dAtA[iNdEx] 627 iNdEx++ 628 wire |= (uint64(b) & 0x7F) << shift 629 if b < 0x80 { 630 break 631 } 632 } 633 wireType := int(wire & 0x7) 634 switch wireType { 635 case 0: 636 for shift := uint(0); ; shift += 7 { 637 if shift >= 64 { 638 return 0, ErrIntOverflowTx 639 } 640 if iNdEx >= l { 641 return 0, io.ErrUnexpectedEOF 642 } 643 iNdEx++ 644 if dAtA[iNdEx-1] < 0x80 { 645 break 646 } 647 } 648 case 1: 649 iNdEx += 8 650 case 2: 651 var length int 652 for shift := uint(0); ; shift += 7 { 653 if shift >= 64 { 654 return 0, ErrIntOverflowTx 655 } 656 if iNdEx >= l { 657 return 0, io.ErrUnexpectedEOF 658 } 659 b := dAtA[iNdEx] 660 iNdEx++ 661 length |= (int(b) & 0x7F) << shift 662 if b < 0x80 { 663 break 664 } 665 } 666 if length < 0 { 667 return 0, ErrInvalidLengthTx 668 } 669 iNdEx += length 670 case 3: 671 depth++ 672 case 4: 673 if depth == 0 { 674 return 0, ErrUnexpectedEndOfGroupTx 675 } 676 depth-- 677 case 5: 678 iNdEx += 4 679 default: 680 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 681 } 682 if iNdEx < 0 { 683 return 0, ErrInvalidLengthTx 684 } 685 if depth == 0 { 686 return iNdEx, nil 687 } 688 } 689 return 0, io.ErrUnexpectedEOF 690 } 691 692 var ( 693 ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") 694 ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") 695 ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") 696 )