github.com/Finschia/finschia-sdk@v0.49.1/x/fbridge/types/fbridge.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/fbridge/v1/fbridge.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 9 _ "github.com/gogo/protobuf/gogoproto" 10 proto "github.com/gogo/protobuf/proto" 11 github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" 12 _ "google.golang.org/protobuf/types/known/timestamppb" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 time "time" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 var _ = time.Kitchen 24 25 // This is a compile-time assertion to ensure that this generated file 26 // is compatible with the proto package it is being compiled against. 27 // A compilation error at this line likely means your copy of the 28 // proto package needs to be updated. 29 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 30 31 // Role defines the role of the operator, guardian, and judge. 32 type Role int32 33 34 const ( 35 RoleEmpty Role = 0 36 RoleGuardian Role = 1 37 RoleOperator Role = 2 38 RoleJudge Role = 3 39 ) 40 41 var Role_name = map[int32]string{ 42 0: "UNSPECIFIED", 43 1: "GUARDIAN", 44 2: "OPERATOR", 45 3: "JUDGE", 46 } 47 48 var Role_value = map[string]int32{ 49 "UNSPECIFIED": 0, 50 "GUARDIAN": 1, 51 "OPERATOR": 2, 52 "JUDGE": 3, 53 } 54 55 func (x Role) String() string { 56 return proto.EnumName(Role_name, int32(x)) 57 } 58 59 func (Role) EnumDescriptor() ([]byte, []int) { 60 return fileDescriptor_62374d75fc6aa1ba, []int{0} 61 } 62 63 // VoteOption enumerates the valid vote options for a given role proposal. 64 type VoteOption int32 65 66 const ( 67 // VOTE_OPTION_UNSPECIFIED defines a no-op vote option. 68 OptionEmpty VoteOption = 0 69 // VOTE_OPTION_YES defines a yes vote option. 70 OptionYes VoteOption = 1 71 // VOTE_OPTION_NO defines a no vote option. 72 OptionNo VoteOption = 2 73 ) 74 75 var VoteOption_name = map[int32]string{ 76 0: "VOTE_OPTION_UNSPECIFIED", 77 1: "VOTE_OPTION_YES", 78 2: "VOTE_OPTION_NO", 79 } 80 81 var VoteOption_value = map[string]int32{ 82 "VOTE_OPTION_UNSPECIFIED": 0, 83 "VOTE_OPTION_YES": 1, 84 "VOTE_OPTION_NO": 2, 85 } 86 87 func (x VoteOption) String() string { 88 return proto.EnumName(VoteOption_name, int32(x)) 89 } 90 91 func (VoteOption) EnumDescriptor() ([]byte, []int) { 92 return fileDescriptor_62374d75fc6aa1ba, []int{1} 93 } 94 95 type BridgeStatus int32 96 97 const ( 98 // BRIDGE_STATUS_UNSPECIFIED defines an unspecified bridge status. 99 StatusEmpty BridgeStatus = 0 100 // BRIDGE_STATUS_ACTIVE defines an active bridge status. 101 StatusActive BridgeStatus = 1 102 // BRIDGE_STATUS_INACTIVE defines an inactive bridge status. 103 StatusInactive BridgeStatus = 2 104 ) 105 106 var BridgeStatus_name = map[int32]string{ 107 0: "BRIDGE_STATUS_UNSPECIFIED", 108 1: "BRIDGE_STATUS_ACTIVE", 109 2: "BRIDGE_STATUS_INACTIVE", 110 } 111 112 var BridgeStatus_value = map[string]int32{ 113 "BRIDGE_STATUS_UNSPECIFIED": 0, 114 "BRIDGE_STATUS_ACTIVE": 1, 115 "BRIDGE_STATUS_INACTIVE": 2, 116 } 117 118 func (x BridgeStatus) String() string { 119 return proto.EnumName(BridgeStatus_name, int32(x)) 120 } 121 122 func (BridgeStatus) EnumDescriptor() ([]byte, []int) { 123 return fileDescriptor_62374d75fc6aa1ba, []int{2} 124 } 125 126 type Params struct { 127 // ratio of how many operators' confirmations are needed to be valid. 128 OperatorTrustLevel Fraction `protobuf:"bytes,1,opt,name=operator_trust_level,json=operatorTrustLevel,proto3" json:"operator_trust_level"` 129 // ratio of how many guardians' confirmations are needed to be valid. 130 GuardianTrustLevel Fraction `protobuf:"bytes,2,opt,name=guardian_trust_level,json=guardianTrustLevel,proto3" json:"guardian_trust_level"` 131 // ratio of how many judges' confirmations are needed to be valid. 132 JudgeTrustLevel Fraction `protobuf:"bytes,3,opt,name=judge_trust_level,json=judgeTrustLevel,proto3" json:"judge_trust_level"` 133 // default timelock period for each provision (unix timestamp) 134 TimelockPeriod uint64 `protobuf:"varint,4,opt,name=timelock_period,json=timelockPeriod,proto3" json:"timelock_period,omitempty"` 135 // default period of the proposal to update the role 136 ProposalPeriod uint64 `protobuf:"varint,5,opt,name=proposal_period,json=proposalPeriod,proto3" json:"proposal_period,omitempty"` 137 // target denom of the bridge module. This is the base denom of Finschia normally. 138 TargetDenom string `protobuf:"bytes,6,opt,name=target_denom,json=targetDenom,proto3" json:"target_denom,omitempty"` 139 } 140 141 func (m *Params) Reset() { *m = Params{} } 142 func (m *Params) String() string { return proto.CompactTextString(m) } 143 func (*Params) ProtoMessage() {} 144 func (*Params) Descriptor() ([]byte, []int) { 145 return fileDescriptor_62374d75fc6aa1ba, []int{0} 146 } 147 func (m *Params) XXX_Unmarshal(b []byte) error { 148 return m.Unmarshal(b) 149 } 150 func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 151 if deterministic { 152 return xxx_messageInfo_Params.Marshal(b, m, deterministic) 153 } else { 154 b = b[:cap(b)] 155 n, err := m.MarshalToSizedBuffer(b) 156 if err != nil { 157 return nil, err 158 } 159 return b[:n], nil 160 } 161 } 162 func (m *Params) XXX_Merge(src proto.Message) { 163 xxx_messageInfo_Params.Merge(m, src) 164 } 165 func (m *Params) XXX_Size() int { 166 return m.Size() 167 } 168 func (m *Params) XXX_DiscardUnknown() { 169 xxx_messageInfo_Params.DiscardUnknown(m) 170 } 171 172 var xxx_messageInfo_Params proto.InternalMessageInfo 173 174 func (m *Params) GetOperatorTrustLevel() Fraction { 175 if m != nil { 176 return m.OperatorTrustLevel 177 } 178 return Fraction{} 179 } 180 181 func (m *Params) GetGuardianTrustLevel() Fraction { 182 if m != nil { 183 return m.GuardianTrustLevel 184 } 185 return Fraction{} 186 } 187 188 func (m *Params) GetJudgeTrustLevel() Fraction { 189 if m != nil { 190 return m.JudgeTrustLevel 191 } 192 return Fraction{} 193 } 194 195 func (m *Params) GetTimelockPeriod() uint64 { 196 if m != nil { 197 return m.TimelockPeriod 198 } 199 return 0 200 } 201 202 func (m *Params) GetProposalPeriod() uint64 { 203 if m != nil { 204 return m.ProposalPeriod 205 } 206 return 0 207 } 208 209 func (m *Params) GetTargetDenom() string { 210 if m != nil { 211 return m.TargetDenom 212 } 213 return "" 214 } 215 216 // Provision is a struct that represents a provision internally. 217 type ProvisionData struct { 218 // the sequence number of the bridge request 219 Seq uint64 `protobuf:"varint,1,opt,name=seq,proto3" json:"seq,omitempty"` 220 // the amount of token to be claimed 221 Amount github_com_Finschia_finschia_sdk_types.Int `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/Finschia/finschia-sdk/types.Int" json:"amount"` 222 // the sender address on the source chain 223 Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` 224 // the recipient address on the destination chain 225 Receiver string `protobuf:"bytes,4,opt,name=receiver,proto3" json:"receiver,omitempty"` 226 } 227 228 func (m *ProvisionData) Reset() { *m = ProvisionData{} } 229 func (m *ProvisionData) String() string { return proto.CompactTextString(m) } 230 func (*ProvisionData) ProtoMessage() {} 231 func (*ProvisionData) Descriptor() ([]byte, []int) { 232 return fileDescriptor_62374d75fc6aa1ba, []int{1} 233 } 234 func (m *ProvisionData) XXX_Unmarshal(b []byte) error { 235 return m.Unmarshal(b) 236 } 237 func (m *ProvisionData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 238 if deterministic { 239 return xxx_messageInfo_ProvisionData.Marshal(b, m, deterministic) 240 } else { 241 b = b[:cap(b)] 242 n, err := m.MarshalToSizedBuffer(b) 243 if err != nil { 244 return nil, err 245 } 246 return b[:n], nil 247 } 248 } 249 func (m *ProvisionData) XXX_Merge(src proto.Message) { 250 xxx_messageInfo_ProvisionData.Merge(m, src) 251 } 252 func (m *ProvisionData) XXX_Size() int { 253 return m.Size() 254 } 255 func (m *ProvisionData) XXX_DiscardUnknown() { 256 xxx_messageInfo_ProvisionData.DiscardUnknown(m) 257 } 258 259 var xxx_messageInfo_ProvisionData proto.InternalMessageInfo 260 261 func (m *ProvisionData) GetSeq() uint64 { 262 if m != nil { 263 return m.Seq 264 } 265 return 0 266 } 267 268 func (m *ProvisionData) GetSender() string { 269 if m != nil { 270 return m.Sender 271 } 272 return "" 273 } 274 275 func (m *ProvisionData) GetReceiver() string { 276 if m != nil { 277 return m.Receiver 278 } 279 return "" 280 } 281 282 // ProvisionStatus is a struct that represents the status of a provision. 283 // To optimize computational cost, we have collected frequently changing values from provision. 284 type ProvisionStatus struct { 285 // the unix timestamp the provision will be able to be claimed (unix timestamp) 286 TimelockEnd uint64 `protobuf:"varint,1,opt,name=timelock_end,json=timelockEnd,proto3" json:"timelock_end,omitempty"` 287 // a value that tells how many operators have submitted this provision 288 ConfirmCounts int32 `protobuf:"varint,2,opt,name=confirm_counts,json=confirmCounts,proto3" json:"confirm_counts,omitempty"` 289 // whether the provision has been claimed 290 IsClaimed bool `protobuf:"varint,3,opt,name=is_claimed,json=isClaimed,proto3" json:"is_claimed,omitempty"` 291 } 292 293 func (m *ProvisionStatus) Reset() { *m = ProvisionStatus{} } 294 func (m *ProvisionStatus) String() string { return proto.CompactTextString(m) } 295 func (*ProvisionStatus) ProtoMessage() {} 296 func (*ProvisionStatus) Descriptor() ([]byte, []int) { 297 return fileDescriptor_62374d75fc6aa1ba, []int{2} 298 } 299 func (m *ProvisionStatus) XXX_Unmarshal(b []byte) error { 300 return m.Unmarshal(b) 301 } 302 func (m *ProvisionStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 303 if deterministic { 304 return xxx_messageInfo_ProvisionStatus.Marshal(b, m, deterministic) 305 } else { 306 b = b[:cap(b)] 307 n, err := m.MarshalToSizedBuffer(b) 308 if err != nil { 309 return nil, err 310 } 311 return b[:n], nil 312 } 313 } 314 func (m *ProvisionStatus) XXX_Merge(src proto.Message) { 315 xxx_messageInfo_ProvisionStatus.Merge(m, src) 316 } 317 func (m *ProvisionStatus) XXX_Size() int { 318 return m.Size() 319 } 320 func (m *ProvisionStatus) XXX_DiscardUnknown() { 321 xxx_messageInfo_ProvisionStatus.DiscardUnknown(m) 322 } 323 324 var xxx_messageInfo_ProvisionStatus proto.InternalMessageInfo 325 326 func (m *ProvisionStatus) GetTimelockEnd() uint64 { 327 if m != nil { 328 return m.TimelockEnd 329 } 330 return 0 331 } 332 333 func (m *ProvisionStatus) GetConfirmCounts() int32 { 334 if m != nil { 335 return m.ConfirmCounts 336 } 337 return 0 338 } 339 340 func (m *ProvisionStatus) GetIsClaimed() bool { 341 if m != nil { 342 return m.IsClaimed 343 } 344 return false 345 } 346 347 // Fraction defines the protobuf message type for tmmath.Fraction that only 348 // supports positive values. 349 type Fraction struct { 350 Numerator uint64 `protobuf:"varint,1,opt,name=numerator,proto3" json:"numerator,omitempty"` 351 Denominator uint64 `protobuf:"varint,2,opt,name=denominator,proto3" json:"denominator,omitempty"` 352 } 353 354 func (m *Fraction) Reset() { *m = Fraction{} } 355 func (m *Fraction) String() string { return proto.CompactTextString(m) } 356 func (*Fraction) ProtoMessage() {} 357 func (*Fraction) Descriptor() ([]byte, []int) { 358 return fileDescriptor_62374d75fc6aa1ba, []int{3} 359 } 360 func (m *Fraction) XXX_Unmarshal(b []byte) error { 361 return m.Unmarshal(b) 362 } 363 func (m *Fraction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 364 if deterministic { 365 return xxx_messageInfo_Fraction.Marshal(b, m, deterministic) 366 } else { 367 b = b[:cap(b)] 368 n, err := m.MarshalToSizedBuffer(b) 369 if err != nil { 370 return nil, err 371 } 372 return b[:n], nil 373 } 374 } 375 func (m *Fraction) XXX_Merge(src proto.Message) { 376 xxx_messageInfo_Fraction.Merge(m, src) 377 } 378 func (m *Fraction) XXX_Size() int { 379 return m.Size() 380 } 381 func (m *Fraction) XXX_DiscardUnknown() { 382 xxx_messageInfo_Fraction.DiscardUnknown(m) 383 } 384 385 var xxx_messageInfo_Fraction proto.InternalMessageInfo 386 387 func (m *Fraction) GetNumerator() uint64 { 388 if m != nil { 389 return m.Numerator 390 } 391 return 0 392 } 393 394 func (m *Fraction) GetDenominator() uint64 { 395 if m != nil { 396 return m.Denominator 397 } 398 return 0 399 } 400 401 type RolePair struct { 402 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` 403 Role Role `protobuf:"varint,2,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` 404 } 405 406 func (m *RolePair) Reset() { *m = RolePair{} } 407 func (m *RolePair) String() string { return proto.CompactTextString(m) } 408 func (*RolePair) ProtoMessage() {} 409 func (*RolePair) Descriptor() ([]byte, []int) { 410 return fileDescriptor_62374d75fc6aa1ba, []int{4} 411 } 412 func (m *RolePair) XXX_Unmarshal(b []byte) error { 413 return m.Unmarshal(b) 414 } 415 func (m *RolePair) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 416 if deterministic { 417 return xxx_messageInfo_RolePair.Marshal(b, m, deterministic) 418 } else { 419 b = b[:cap(b)] 420 n, err := m.MarshalToSizedBuffer(b) 421 if err != nil { 422 return nil, err 423 } 424 return b[:n], nil 425 } 426 } 427 func (m *RolePair) XXX_Merge(src proto.Message) { 428 xxx_messageInfo_RolePair.Merge(m, src) 429 } 430 func (m *RolePair) XXX_Size() int { 431 return m.Size() 432 } 433 func (m *RolePair) XXX_DiscardUnknown() { 434 xxx_messageInfo_RolePair.DiscardUnknown(m) 435 } 436 437 var xxx_messageInfo_RolePair proto.InternalMessageInfo 438 439 func (m *RolePair) GetAddress() string { 440 if m != nil { 441 return m.Address 442 } 443 return "" 444 } 445 446 func (m *RolePair) GetRole() Role { 447 if m != nil { 448 return m.Role 449 } 450 return RoleEmpty 451 } 452 453 type RoleProposal struct { 454 Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` 455 // the proposer address 456 Proposer string `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty"` 457 // the address to update the role 458 Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` 459 // the role to be updated 460 // - unspecified : 0, used to remove the address from a group 461 // - guardian : 1 462 // - operator : 2 463 // - judge : 3 464 Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=lbm.fbridge.v1.Role" json:"role,omitempty"` 465 // the unix timestamp the proposal will be expired (unix timestamp) 466 ExpiredAt time.Time `protobuf:"bytes,5,opt,name=expired_at,json=expiredAt,proto3,stdtime" json:"expired_at"` 467 } 468 469 func (m *RoleProposal) Reset() { *m = RoleProposal{} } 470 func (m *RoleProposal) String() string { return proto.CompactTextString(m) } 471 func (*RoleProposal) ProtoMessage() {} 472 func (*RoleProposal) Descriptor() ([]byte, []int) { 473 return fileDescriptor_62374d75fc6aa1ba, []int{5} 474 } 475 func (m *RoleProposal) XXX_Unmarshal(b []byte) error { 476 return m.Unmarshal(b) 477 } 478 func (m *RoleProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 479 if deterministic { 480 return xxx_messageInfo_RoleProposal.Marshal(b, m, deterministic) 481 } else { 482 b = b[:cap(b)] 483 n, err := m.MarshalToSizedBuffer(b) 484 if err != nil { 485 return nil, err 486 } 487 return b[:n], nil 488 } 489 } 490 func (m *RoleProposal) XXX_Merge(src proto.Message) { 491 xxx_messageInfo_RoleProposal.Merge(m, src) 492 } 493 func (m *RoleProposal) XXX_Size() int { 494 return m.Size() 495 } 496 func (m *RoleProposal) XXX_DiscardUnknown() { 497 xxx_messageInfo_RoleProposal.DiscardUnknown(m) 498 } 499 500 var xxx_messageInfo_RoleProposal proto.InternalMessageInfo 501 502 func (m *RoleProposal) GetId() uint64 { 503 if m != nil { 504 return m.Id 505 } 506 return 0 507 } 508 509 func (m *RoleProposal) GetProposer() string { 510 if m != nil { 511 return m.Proposer 512 } 513 return "" 514 } 515 516 func (m *RoleProposal) GetTarget() string { 517 if m != nil { 518 return m.Target 519 } 520 return "" 521 } 522 523 func (m *RoleProposal) GetRole() Role { 524 if m != nil { 525 return m.Role 526 } 527 return RoleEmpty 528 } 529 530 func (m *RoleProposal) GetExpiredAt() time.Time { 531 if m != nil { 532 return m.ExpiredAt 533 } 534 return time.Time{} 535 } 536 537 // Vote defines a vote on a role proposal. 538 type Vote struct { 539 ProposalId uint64 `protobuf:"varint,1,opt,name=proposal_id,json=proposalId,proto3" json:"proposal_id,omitempty"` 540 Voter string `protobuf:"bytes,2,opt,name=voter,proto3" json:"voter,omitempty"` 541 Option VoteOption `protobuf:"varint,3,opt,name=option,proto3,enum=lbm.fbridge.v1.VoteOption" json:"option,omitempty"` 542 } 543 544 func (m *Vote) Reset() { *m = Vote{} } 545 func (m *Vote) String() string { return proto.CompactTextString(m) } 546 func (*Vote) ProtoMessage() {} 547 func (*Vote) Descriptor() ([]byte, []int) { 548 return fileDescriptor_62374d75fc6aa1ba, []int{6} 549 } 550 func (m *Vote) XXX_Unmarshal(b []byte) error { 551 return m.Unmarshal(b) 552 } 553 func (m *Vote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 554 if deterministic { 555 return xxx_messageInfo_Vote.Marshal(b, m, deterministic) 556 } else { 557 b = b[:cap(b)] 558 n, err := m.MarshalToSizedBuffer(b) 559 if err != nil { 560 return nil, err 561 } 562 return b[:n], nil 563 } 564 } 565 func (m *Vote) XXX_Merge(src proto.Message) { 566 xxx_messageInfo_Vote.Merge(m, src) 567 } 568 func (m *Vote) XXX_Size() int { 569 return m.Size() 570 } 571 func (m *Vote) XXX_DiscardUnknown() { 572 xxx_messageInfo_Vote.DiscardUnknown(m) 573 } 574 575 var xxx_messageInfo_Vote proto.InternalMessageInfo 576 577 func (m *Vote) GetProposalId() uint64 { 578 if m != nil { 579 return m.ProposalId 580 } 581 return 0 582 } 583 584 func (m *Vote) GetVoter() string { 585 if m != nil { 586 return m.Voter 587 } 588 return "" 589 } 590 591 func (m *Vote) GetOption() VoteOption { 592 if m != nil { 593 return m.Option 594 } 595 return OptionEmpty 596 } 597 598 // RoleMetadata defines the metadata of the role. 599 type RoleMetadata struct { 600 // the number of registered guardians 601 Guardian uint64 `protobuf:"varint,1,opt,name=guardian,proto3" json:"guardian,omitempty"` 602 // the number of the operators 603 Operator uint64 `protobuf:"varint,2,opt,name=operator,proto3" json:"operator,omitempty"` 604 // the number of the judges 605 Judge uint64 `protobuf:"varint,3,opt,name=judge,proto3" json:"judge,omitempty"` 606 } 607 608 func (m *RoleMetadata) Reset() { *m = RoleMetadata{} } 609 func (m *RoleMetadata) String() string { return proto.CompactTextString(m) } 610 func (*RoleMetadata) ProtoMessage() {} 611 func (*RoleMetadata) Descriptor() ([]byte, []int) { 612 return fileDescriptor_62374d75fc6aa1ba, []int{7} 613 } 614 func (m *RoleMetadata) XXX_Unmarshal(b []byte) error { 615 return m.Unmarshal(b) 616 } 617 func (m *RoleMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 618 if deterministic { 619 return xxx_messageInfo_RoleMetadata.Marshal(b, m, deterministic) 620 } else { 621 b = b[:cap(b)] 622 n, err := m.MarshalToSizedBuffer(b) 623 if err != nil { 624 return nil, err 625 } 626 return b[:n], nil 627 } 628 } 629 func (m *RoleMetadata) XXX_Merge(src proto.Message) { 630 xxx_messageInfo_RoleMetadata.Merge(m, src) 631 } 632 func (m *RoleMetadata) XXX_Size() int { 633 return m.Size() 634 } 635 func (m *RoleMetadata) XXX_DiscardUnknown() { 636 xxx_messageInfo_RoleMetadata.DiscardUnknown(m) 637 } 638 639 var xxx_messageInfo_RoleMetadata proto.InternalMessageInfo 640 641 func (m *RoleMetadata) GetGuardian() uint64 { 642 if m != nil { 643 return m.Guardian 644 } 645 return 0 646 } 647 648 func (m *RoleMetadata) GetOperator() uint64 { 649 if m != nil { 650 return m.Operator 651 } 652 return 0 653 } 654 655 func (m *RoleMetadata) GetJudge() uint64 { 656 if m != nil { 657 return m.Judge 658 } 659 return 0 660 } 661 662 // BridgeStatusMetadata defines the metadata of the bridge status. 663 type BridgeStatusMetadata struct { 664 // the number of inactived bridge switch 665 Inactive uint64 `protobuf:"varint,1,opt,name=inactive,proto3" json:"inactive,omitempty"` 666 // the number of activated bridge switch 667 Active uint64 `protobuf:"varint,2,opt,name=active,proto3" json:"active,omitempty"` 668 } 669 670 func (m *BridgeStatusMetadata) Reset() { *m = BridgeStatusMetadata{} } 671 func (m *BridgeStatusMetadata) String() string { return proto.CompactTextString(m) } 672 func (*BridgeStatusMetadata) ProtoMessage() {} 673 func (*BridgeStatusMetadata) Descriptor() ([]byte, []int) { 674 return fileDescriptor_62374d75fc6aa1ba, []int{8} 675 } 676 func (m *BridgeStatusMetadata) XXX_Unmarshal(b []byte) error { 677 return m.Unmarshal(b) 678 } 679 func (m *BridgeStatusMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 680 if deterministic { 681 return xxx_messageInfo_BridgeStatusMetadata.Marshal(b, m, deterministic) 682 } else { 683 b = b[:cap(b)] 684 n, err := m.MarshalToSizedBuffer(b) 685 if err != nil { 686 return nil, err 687 } 688 return b[:n], nil 689 } 690 } 691 func (m *BridgeStatusMetadata) XXX_Merge(src proto.Message) { 692 xxx_messageInfo_BridgeStatusMetadata.Merge(m, src) 693 } 694 func (m *BridgeStatusMetadata) XXX_Size() int { 695 return m.Size() 696 } 697 func (m *BridgeStatusMetadata) XXX_DiscardUnknown() { 698 xxx_messageInfo_BridgeStatusMetadata.DiscardUnknown(m) 699 } 700 701 var xxx_messageInfo_BridgeStatusMetadata proto.InternalMessageInfo 702 703 func (m *BridgeStatusMetadata) GetInactive() uint64 { 704 if m != nil { 705 return m.Inactive 706 } 707 return 0 708 } 709 710 func (m *BridgeStatusMetadata) GetActive() uint64 { 711 if m != nil { 712 return m.Active 713 } 714 return 0 715 } 716 717 func init() { 718 proto.RegisterEnum("lbm.fbridge.v1.Role", Role_name, Role_value) 719 proto.RegisterEnum("lbm.fbridge.v1.VoteOption", VoteOption_name, VoteOption_value) 720 proto.RegisterEnum("lbm.fbridge.v1.BridgeStatus", BridgeStatus_name, BridgeStatus_value) 721 proto.RegisterType((*Params)(nil), "lbm.fbridge.v1.Params") 722 proto.RegisterType((*ProvisionData)(nil), "lbm.fbridge.v1.ProvisionData") 723 proto.RegisterType((*ProvisionStatus)(nil), "lbm.fbridge.v1.ProvisionStatus") 724 proto.RegisterType((*Fraction)(nil), "lbm.fbridge.v1.Fraction") 725 proto.RegisterType((*RolePair)(nil), "lbm.fbridge.v1.RolePair") 726 proto.RegisterType((*RoleProposal)(nil), "lbm.fbridge.v1.RoleProposal") 727 proto.RegisterType((*Vote)(nil), "lbm.fbridge.v1.Vote") 728 proto.RegisterType((*RoleMetadata)(nil), "lbm.fbridge.v1.RoleMetadata") 729 proto.RegisterType((*BridgeStatusMetadata)(nil), "lbm.fbridge.v1.BridgeStatusMetadata") 730 } 731 732 func init() { proto.RegisterFile("lbm/fbridge/v1/fbridge.proto", fileDescriptor_62374d75fc6aa1ba) } 733 734 var fileDescriptor_62374d75fc6aa1ba = []byte{ 735 // 990 bytes of a gzipped FileDescriptorProto 736 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0x4f, 0x8f, 0x22, 0x45, 737 0x14, 0xa7, 0xd9, 0x1e, 0x84, 0xc7, 0x0c, 0x83, 0x15, 0xb2, 0x62, 0x67, 0x05, 0x24, 0x31, 0x4e, 738 0x26, 0xda, 0xb8, 0x78, 0xf3, 0x06, 0x03, 0x33, 0x81, 0x28, 0x90, 0x1a, 0x66, 0x92, 0x35, 0x26, 739 0xa4, 0xa1, 0x6b, 0xd8, 0x72, 0xe9, 0x2e, 0xac, 0x2e, 0x70, 0xd7, 0x0f, 0x60, 0xcc, 0x9c, 0xf6, 740 0x0b, 0x90, 0xac, 0xf1, 0x93, 0x78, 0xdb, 0xe3, 0x1e, 0x8d, 0x87, 0xd5, 0xcc, 0x5c, 0xbc, 0xf8, 741 0x1d, 0x4c, 0x55, 0x75, 0xf5, 0xc0, 0xc6, 0x64, 0xf7, 0x56, 0xef, 0xd5, 0xef, 0xfd, 0xde, 0xef, 742 0xfd, 0xa9, 0x6e, 0x78, 0xb0, 0x98, 0x06, 0x8d, 0xab, 0x29, 0xa7, 0xfe, 0x9c, 0x34, 0xd6, 0x0f, 743 0xcd, 0xd1, 0x5d, 0x72, 0x26, 0x18, 0x2a, 0x2c, 0xa6, 0x81, 0x6b, 0x5c, 0xeb, 0x87, 0x4e, 0x75, 744 0xce, 0xd8, 0x7c, 0x41, 0x1a, 0xea, 0x76, 0xba, 0xba, 0x6a, 0x08, 0x1a, 0x90, 0x48, 0x78, 0xc1, 745 0x52, 0x07, 0x38, 0xa5, 0x39, 0x9b, 0x33, 0x75, 0x6c, 0xc8, 0x93, 0xf6, 0xd6, 0xff, 0x4d, 0x43, 746 0x66, 0xe4, 0x71, 0x2f, 0x88, 0xd0, 0x08, 0x4a, 0x6c, 0x49, 0xb8, 0x27, 0x18, 0x9f, 0x08, 0xbe, 747 0x8a, 0xc4, 0x64, 0x41, 0xd6, 0x64, 0x51, 0xb6, 0x6a, 0xd6, 0x51, 0xbe, 0x59, 0x76, 0x77, 0x13, 748 0xba, 0xa7, 0xdc, 0x9b, 0x09, 0xca, 0xc2, 0xb6, 0xfd, 0xf2, 0x75, 0x35, 0x85, 0x91, 0x89, 0x1d, 749 0xcb, 0xd0, 0xaf, 0x65, 0xa4, 0x64, 0x9c, 0xaf, 0x3c, 0xee, 0x53, 0x2f, 0xdc, 0x61, 0x4c, 0xbf, 750 0x1b, 0xa3, 0x89, 0xdd, 0x62, 0xec, 0xc3, 0xfb, 0xdf, 0xaf, 0xfc, 0x39, 0xd9, 0xa1, 0xbb, 0xf7, 751 0x4e, 0x74, 0x87, 0x2a, 0x70, 0x8b, 0xeb, 0x53, 0x38, 0x94, 0x3d, 0x5a, 0xb0, 0xd9, 0x93, 0xc9, 752 0x92, 0x70, 0xca, 0xfc, 0xb2, 0x5d, 0xb3, 0x8e, 0x6c, 0x5c, 0x30, 0xee, 0x91, 0xf2, 0x4a, 0xe0, 753 0x92, 0xb3, 0x25, 0x8b, 0xbc, 0x85, 0x01, 0xee, 0x69, 0xa0, 0x71, 0xc7, 0xc0, 0x8f, 0x61, 0x5f, 754 0x78, 0x7c, 0x4e, 0xc4, 0xc4, 0x27, 0x21, 0x0b, 0xca, 0x99, 0x9a, 0x75, 0x94, 0xc3, 0x79, 0xed, 755 0xeb, 0x48, 0x57, 0xfd, 0x57, 0x0b, 0x0e, 0x46, 0x9c, 0xad, 0x69, 0x44, 0x59, 0xd8, 0xf1, 0x84, 756 0x87, 0x8a, 0x70, 0x2f, 0x22, 0x3f, 0xa8, 0x2e, 0xdb, 0x58, 0x1e, 0x51, 0x1f, 0x32, 0x5e, 0xc0, 757 0x56, 0xa1, 0x50, 0x8d, 0xca, 0xb5, 0x9b, 0x52, 0xff, 0x9f, 0xaf, 0xab, 0xc7, 0x73, 0x2a, 0x1e, 758 0xaf, 0xa6, 0xee, 0x8c, 0x05, 0x8d, 0x53, 0x1a, 0x46, 0xb3, 0xc7, 0xd4, 0x6b, 0x5c, 0xc5, 0x87, 759 0xcf, 0x23, 0xff, 0x49, 0x43, 0x3c, 0x5b, 0x92, 0xc8, 0xed, 0x85, 0x02, 0xc7, 0x0c, 0xe8, 0x3e, 760 0x64, 0x22, 0x12, 0xfa, 0x84, 0xab, 0x2e, 0xe5, 0x70, 0x6c, 0x21, 0x07, 0xb2, 0x9c, 0xcc, 0x08, 761 0x5d, 0x13, 0xae, 0xaa, 0xce, 0xe1, 0xc4, 0xae, 0xff, 0x04, 0x87, 0x89, 0xc4, 0x73, 0xe1, 0x89, 762 0x55, 0xa4, 0x2a, 0x33, 0xbd, 0x22, 0xa1, 0x1f, 0xab, 0xcd, 0x1b, 0x5f, 0x37, 0xf4, 0xd1, 0x27, 763 0x50, 0x98, 0xb1, 0xf0, 0x8a, 0xf2, 0x60, 0x32, 0x93, 0xa9, 0x23, 0xa5, 0x7e, 0x0f, 0x1f, 0xc4, 764 0xde, 0x13, 0xe5, 0x44, 0x1f, 0x01, 0xd0, 0x68, 0x32, 0x5b, 0x78, 0x34, 0x20, 0xbe, 0x12, 0x95, 765 0xc5, 0x39, 0x1a, 0x9d, 0x68, 0x47, 0xbd, 0x0f, 0x59, 0x33, 0x37, 0xf4, 0x00, 0x72, 0xe1, 0x2a, 766 0xd0, 0x5b, 0x15, 0x67, 0xbc, 0x73, 0xa0, 0x1a, 0xe4, 0x55, 0x97, 0x69, 0xa8, 0xee, 0xd3, 0x5a, 767 0xd1, 0x96, 0xab, 0x3e, 0x80, 0x2c, 0x66, 0x0b, 0x32, 0xf2, 0x28, 0x47, 0x65, 0x78, 0xcf, 0xf3, 768 0x7d, 0x4e, 0xa2, 0x48, 0x31, 0xe5, 0xb0, 0x31, 0xd1, 0x11, 0xd8, 0x9c, 0x2d, 0x88, 0x22, 0x28, 769 0x34, 0x4b, 0x6f, 0x6e, 0x91, 0x64, 0xc0, 0x0a, 0x51, 0xff, 0xdd, 0x82, 0x7d, 0x45, 0x18, 0x4f, 770 0x1d, 0x15, 0x20, 0x4d, 0x4d, 0x2f, 0xd2, 0xd4, 0x97, 0x4d, 0xd5, 0x1b, 0x41, 0xb4, 0x9e, 0x1c, 771 0x4e, 0x6c, 0x39, 0x08, 0xbd, 0x07, 0x66, 0x10, 0xda, 0x4a, 0xd2, 0xdb, 0x6f, 0x4b, 0x8f, 0x4e, 772 0x00, 0xc8, 0xd3, 0x25, 0xe5, 0xc4, 0x9f, 0x78, 0x42, 0x6d, 0x60, 0xbe, 0xe9, 0xb8, 0xfa, 0xd9, 773 0xbb, 0xe6, 0xd9, 0xbb, 0x63, 0xf3, 0xec, 0xdb, 0x59, 0xb9, 0x36, 0xcf, 0xff, 0xaa, 0x5a, 0x38, 774 0x17, 0xc7, 0xb5, 0x44, 0xfd, 0x47, 0xb0, 0x2f, 0x99, 0x20, 0xa8, 0x0a, 0xf9, 0x64, 0xa7, 0x93, 775 0x1a, 0xc0, 0xb8, 0x7a, 0x3e, 0x2a, 0xc1, 0xde, 0x9a, 0x89, 0xa4, 0x10, 0x6d, 0xa0, 0x26, 0x64, 776 0xd8, 0x52, 0x0e, 0x47, 0x55, 0x51, 0x68, 0x3a, 0x6f, 0xea, 0x95, 0xe4, 0x43, 0x85, 0xc0, 0x31, 777 0xf2, 0x2b, 0xfb, 0x9f, 0x17, 0xd5, 0x54, 0xfd, 0x3b, 0xdd, 0xbb, 0x6f, 0x88, 0xf0, 0x7c, 0xb9, 778 0xf6, 0x0e, 0x64, 0xcd, 0xfb, 0x8e, 0xb3, 0x27, 0xb6, 0xbc, 0x33, 0x5f, 0x93, 0x78, 0xae, 0x89, 779 0x2d, 0x75, 0xa9, 0x87, 0xac, 0x04, 0xd8, 0x58, 0x1b, 0xf5, 0x3e, 0x94, 0xda, 0x4a, 0x83, 0xde, 780 0xd7, 0xed, 0x2c, 0x34, 0x94, 0xeb, 0xb4, 0x26, 0x26, 0x8b, 0xb1, 0xe5, 0x44, 0xe2, 0x1b, 0x9d, 781 0x23, 0xb6, 0x8e, 0x7f, 0xb6, 0xc0, 0x96, 0x52, 0x51, 0x05, 0xf2, 0x17, 0x83, 0xf3, 0x51, 0xf7, 782 0xa4, 0x77, 0xda, 0xeb, 0x76, 0x8a, 0x29, 0xe7, 0xe0, 0x7a, 0x53, 0xcb, 0xc9, 0xab, 0x6e, 0xb0, 783 0x14, 0xcf, 0x50, 0x05, 0xb2, 0x67, 0x17, 0x2d, 0xdc, 0xe9, 0xb5, 0x06, 0x45, 0xcb, 0x29, 0x5e, 784 0x6f, 0x6a, 0xaa, 0xc4, 0x33, 0x53, 0x46, 0x05, 0xb2, 0xc3, 0x51, 0x17, 0xb7, 0xc6, 0x43, 0x5c, 785 0x4c, 0xdf, 0xdd, 0x0f, 0x4d, 0x29, 0x65, 0xd8, 0xeb, 0x5f, 0x74, 0xce, 0xba, 0xc5, 0x7b, 0x77, 786 0xcc, 0x7d, 0x59, 0x8e, 0x63, 0xff, 0xf2, 0x5b, 0x25, 0x25, 0x85, 0xc0, 0x5d, 0x3f, 0xd1, 0x67, 787 0xf0, 0xc1, 0xe5, 0x70, 0xdc, 0x9d, 0x0c, 0x47, 0xe3, 0xde, 0x70, 0x30, 0xd9, 0x95, 0x76, 0x78, 788 0xbd, 0xa9, 0xe5, 0x35, 0x50, 0x8b, 0xab, 0xc3, 0xe1, 0x36, 0xfa, 0x51, 0xf7, 0xbc, 0x68, 0xe9, 789 0x34, 0x1a, 0xf5, 0x88, 0x44, 0xa8, 0x06, 0x85, 0x6d, 0xcc, 0x60, 0x58, 0x4c, 0x3b, 0xfb, 0xd7, 790 0x9b, 0x5a, 0x56, 0x43, 0x06, 0x2c, 0x16, 0xf2, 0xc2, 0x82, 0xfd, 0xed, 0xf6, 0x22, 0x17, 0x3e, 791 0x6c, 0xe3, 0x5e, 0xe7, 0xac, 0x3b, 0x39, 0x1f, 0xb7, 0xc6, 0x17, 0xe7, 0xff, 0x27, 0x46, 0x43, 792 0xb5, 0x98, 0x63, 0x28, 0xed, 0xe2, 0x5b, 0x27, 0xe3, 0xde, 0x65, 0xd7, 0x74, 0x4d, 0x43, 0x5b, 793 0x7a, 0x2c, 0x2e, 0xdc, 0xdf, 0xc5, 0xf6, 0x06, 0x31, 0x3a, 0xed, 0xa0, 0xeb, 0x4d, 0xad, 0xa0, 794 0xd1, 0xbd, 0x78, 0x8c, 0x5a, 0x62, 0xbb, 0xff, 0xf2, 0xa6, 0x62, 0xbd, 0xba, 0xa9, 0x58, 0x7f, 795 0xdf, 0x54, 0xac, 0xe7, 0xb7, 0x95, 0xd4, 0xab, 0xdb, 0x4a, 0xea, 0x8f, 0xdb, 0x4a, 0xea, 0xdb, 796 0x2f, 0xde, 0xfa, 0xd5, 0x7c, 0x9a, 0xfc, 0x65, 0xd5, 0xf7, 0x73, 0x9a, 0x51, 0x8f, 0xe9, 0xcb, 797 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfb, 0x54, 0x04, 0x35, 0x81, 0x07, 0x00, 0x00, 798 } 799 800 func (m *Params) Marshal() (dAtA []byte, err error) { 801 size := m.Size() 802 dAtA = make([]byte, size) 803 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 804 if err != nil { 805 return nil, err 806 } 807 return dAtA[:n], nil 808 } 809 810 func (m *Params) MarshalTo(dAtA []byte) (int, error) { 811 size := m.Size() 812 return m.MarshalToSizedBuffer(dAtA[:size]) 813 } 814 815 func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { 816 i := len(dAtA) 817 _ = i 818 var l int 819 _ = l 820 if len(m.TargetDenom) > 0 { 821 i -= len(m.TargetDenom) 822 copy(dAtA[i:], m.TargetDenom) 823 i = encodeVarintFbridge(dAtA, i, uint64(len(m.TargetDenom))) 824 i-- 825 dAtA[i] = 0x32 826 } 827 if m.ProposalPeriod != 0 { 828 i = encodeVarintFbridge(dAtA, i, uint64(m.ProposalPeriod)) 829 i-- 830 dAtA[i] = 0x28 831 } 832 if m.TimelockPeriod != 0 { 833 i = encodeVarintFbridge(dAtA, i, uint64(m.TimelockPeriod)) 834 i-- 835 dAtA[i] = 0x20 836 } 837 { 838 size, err := m.JudgeTrustLevel.MarshalToSizedBuffer(dAtA[:i]) 839 if err != nil { 840 return 0, err 841 } 842 i -= size 843 i = encodeVarintFbridge(dAtA, i, uint64(size)) 844 } 845 i-- 846 dAtA[i] = 0x1a 847 { 848 size, err := m.GuardianTrustLevel.MarshalToSizedBuffer(dAtA[:i]) 849 if err != nil { 850 return 0, err 851 } 852 i -= size 853 i = encodeVarintFbridge(dAtA, i, uint64(size)) 854 } 855 i-- 856 dAtA[i] = 0x12 857 { 858 size, err := m.OperatorTrustLevel.MarshalToSizedBuffer(dAtA[:i]) 859 if err != nil { 860 return 0, err 861 } 862 i -= size 863 i = encodeVarintFbridge(dAtA, i, uint64(size)) 864 } 865 i-- 866 dAtA[i] = 0xa 867 return len(dAtA) - i, nil 868 } 869 870 func (m *ProvisionData) Marshal() (dAtA []byte, err error) { 871 size := m.Size() 872 dAtA = make([]byte, size) 873 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 874 if err != nil { 875 return nil, err 876 } 877 return dAtA[:n], nil 878 } 879 880 func (m *ProvisionData) MarshalTo(dAtA []byte) (int, error) { 881 size := m.Size() 882 return m.MarshalToSizedBuffer(dAtA[:size]) 883 } 884 885 func (m *ProvisionData) MarshalToSizedBuffer(dAtA []byte) (int, error) { 886 i := len(dAtA) 887 _ = i 888 var l int 889 _ = l 890 if len(m.Receiver) > 0 { 891 i -= len(m.Receiver) 892 copy(dAtA[i:], m.Receiver) 893 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Receiver))) 894 i-- 895 dAtA[i] = 0x22 896 } 897 if len(m.Sender) > 0 { 898 i -= len(m.Sender) 899 copy(dAtA[i:], m.Sender) 900 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Sender))) 901 i-- 902 dAtA[i] = 0x1a 903 } 904 { 905 size := m.Amount.Size() 906 i -= size 907 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 908 return 0, err 909 } 910 i = encodeVarintFbridge(dAtA, i, uint64(size)) 911 } 912 i-- 913 dAtA[i] = 0x12 914 if m.Seq != 0 { 915 i = encodeVarintFbridge(dAtA, i, uint64(m.Seq)) 916 i-- 917 dAtA[i] = 0x8 918 } 919 return len(dAtA) - i, nil 920 } 921 922 func (m *ProvisionStatus) Marshal() (dAtA []byte, err error) { 923 size := m.Size() 924 dAtA = make([]byte, size) 925 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 926 if err != nil { 927 return nil, err 928 } 929 return dAtA[:n], nil 930 } 931 932 func (m *ProvisionStatus) MarshalTo(dAtA []byte) (int, error) { 933 size := m.Size() 934 return m.MarshalToSizedBuffer(dAtA[:size]) 935 } 936 937 func (m *ProvisionStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { 938 i := len(dAtA) 939 _ = i 940 var l int 941 _ = l 942 if m.IsClaimed { 943 i-- 944 if m.IsClaimed { 945 dAtA[i] = 1 946 } else { 947 dAtA[i] = 0 948 } 949 i-- 950 dAtA[i] = 0x18 951 } 952 if m.ConfirmCounts != 0 { 953 i = encodeVarintFbridge(dAtA, i, uint64(m.ConfirmCounts)) 954 i-- 955 dAtA[i] = 0x10 956 } 957 if m.TimelockEnd != 0 { 958 i = encodeVarintFbridge(dAtA, i, uint64(m.TimelockEnd)) 959 i-- 960 dAtA[i] = 0x8 961 } 962 return len(dAtA) - i, nil 963 } 964 965 func (m *Fraction) Marshal() (dAtA []byte, err error) { 966 size := m.Size() 967 dAtA = make([]byte, size) 968 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 969 if err != nil { 970 return nil, err 971 } 972 return dAtA[:n], nil 973 } 974 975 func (m *Fraction) MarshalTo(dAtA []byte) (int, error) { 976 size := m.Size() 977 return m.MarshalToSizedBuffer(dAtA[:size]) 978 } 979 980 func (m *Fraction) MarshalToSizedBuffer(dAtA []byte) (int, error) { 981 i := len(dAtA) 982 _ = i 983 var l int 984 _ = l 985 if m.Denominator != 0 { 986 i = encodeVarintFbridge(dAtA, i, uint64(m.Denominator)) 987 i-- 988 dAtA[i] = 0x10 989 } 990 if m.Numerator != 0 { 991 i = encodeVarintFbridge(dAtA, i, uint64(m.Numerator)) 992 i-- 993 dAtA[i] = 0x8 994 } 995 return len(dAtA) - i, nil 996 } 997 998 func (m *RolePair) Marshal() (dAtA []byte, err error) { 999 size := m.Size() 1000 dAtA = make([]byte, size) 1001 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1002 if err != nil { 1003 return nil, err 1004 } 1005 return dAtA[:n], nil 1006 } 1007 1008 func (m *RolePair) MarshalTo(dAtA []byte) (int, error) { 1009 size := m.Size() 1010 return m.MarshalToSizedBuffer(dAtA[:size]) 1011 } 1012 1013 func (m *RolePair) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1014 i := len(dAtA) 1015 _ = i 1016 var l int 1017 _ = l 1018 if m.Role != 0 { 1019 i = encodeVarintFbridge(dAtA, i, uint64(m.Role)) 1020 i-- 1021 dAtA[i] = 0x10 1022 } 1023 if len(m.Address) > 0 { 1024 i -= len(m.Address) 1025 copy(dAtA[i:], m.Address) 1026 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Address))) 1027 i-- 1028 dAtA[i] = 0xa 1029 } 1030 return len(dAtA) - i, nil 1031 } 1032 1033 func (m *RoleProposal) Marshal() (dAtA []byte, err error) { 1034 size := m.Size() 1035 dAtA = make([]byte, size) 1036 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1037 if err != nil { 1038 return nil, err 1039 } 1040 return dAtA[:n], nil 1041 } 1042 1043 func (m *RoleProposal) MarshalTo(dAtA []byte) (int, error) { 1044 size := m.Size() 1045 return m.MarshalToSizedBuffer(dAtA[:size]) 1046 } 1047 1048 func (m *RoleProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1049 i := len(dAtA) 1050 _ = i 1051 var l int 1052 _ = l 1053 n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.ExpiredAt, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiredAt):]) 1054 if err4 != nil { 1055 return 0, err4 1056 } 1057 i -= n4 1058 i = encodeVarintFbridge(dAtA, i, uint64(n4)) 1059 i-- 1060 dAtA[i] = 0x2a 1061 if m.Role != 0 { 1062 i = encodeVarintFbridge(dAtA, i, uint64(m.Role)) 1063 i-- 1064 dAtA[i] = 0x20 1065 } 1066 if len(m.Target) > 0 { 1067 i -= len(m.Target) 1068 copy(dAtA[i:], m.Target) 1069 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Target))) 1070 i-- 1071 dAtA[i] = 0x1a 1072 } 1073 if len(m.Proposer) > 0 { 1074 i -= len(m.Proposer) 1075 copy(dAtA[i:], m.Proposer) 1076 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Proposer))) 1077 i-- 1078 dAtA[i] = 0x12 1079 } 1080 if m.Id != 0 { 1081 i = encodeVarintFbridge(dAtA, i, uint64(m.Id)) 1082 i-- 1083 dAtA[i] = 0x8 1084 } 1085 return len(dAtA) - i, nil 1086 } 1087 1088 func (m *Vote) Marshal() (dAtA []byte, err error) { 1089 size := m.Size() 1090 dAtA = make([]byte, size) 1091 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1092 if err != nil { 1093 return nil, err 1094 } 1095 return dAtA[:n], nil 1096 } 1097 1098 func (m *Vote) MarshalTo(dAtA []byte) (int, error) { 1099 size := m.Size() 1100 return m.MarshalToSizedBuffer(dAtA[:size]) 1101 } 1102 1103 func (m *Vote) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1104 i := len(dAtA) 1105 _ = i 1106 var l int 1107 _ = l 1108 if m.Option != 0 { 1109 i = encodeVarintFbridge(dAtA, i, uint64(m.Option)) 1110 i-- 1111 dAtA[i] = 0x18 1112 } 1113 if len(m.Voter) > 0 { 1114 i -= len(m.Voter) 1115 copy(dAtA[i:], m.Voter) 1116 i = encodeVarintFbridge(dAtA, i, uint64(len(m.Voter))) 1117 i-- 1118 dAtA[i] = 0x12 1119 } 1120 if m.ProposalId != 0 { 1121 i = encodeVarintFbridge(dAtA, i, uint64(m.ProposalId)) 1122 i-- 1123 dAtA[i] = 0x8 1124 } 1125 return len(dAtA) - i, nil 1126 } 1127 1128 func (m *RoleMetadata) Marshal() (dAtA []byte, err error) { 1129 size := m.Size() 1130 dAtA = make([]byte, size) 1131 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1132 if err != nil { 1133 return nil, err 1134 } 1135 return dAtA[:n], nil 1136 } 1137 1138 func (m *RoleMetadata) MarshalTo(dAtA []byte) (int, error) { 1139 size := m.Size() 1140 return m.MarshalToSizedBuffer(dAtA[:size]) 1141 } 1142 1143 func (m *RoleMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1144 i := len(dAtA) 1145 _ = i 1146 var l int 1147 _ = l 1148 if m.Judge != 0 { 1149 i = encodeVarintFbridge(dAtA, i, uint64(m.Judge)) 1150 i-- 1151 dAtA[i] = 0x18 1152 } 1153 if m.Operator != 0 { 1154 i = encodeVarintFbridge(dAtA, i, uint64(m.Operator)) 1155 i-- 1156 dAtA[i] = 0x10 1157 } 1158 if m.Guardian != 0 { 1159 i = encodeVarintFbridge(dAtA, i, uint64(m.Guardian)) 1160 i-- 1161 dAtA[i] = 0x8 1162 } 1163 return len(dAtA) - i, nil 1164 } 1165 1166 func (m *BridgeStatusMetadata) Marshal() (dAtA []byte, err error) { 1167 size := m.Size() 1168 dAtA = make([]byte, size) 1169 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1170 if err != nil { 1171 return nil, err 1172 } 1173 return dAtA[:n], nil 1174 } 1175 1176 func (m *BridgeStatusMetadata) MarshalTo(dAtA []byte) (int, error) { 1177 size := m.Size() 1178 return m.MarshalToSizedBuffer(dAtA[:size]) 1179 } 1180 1181 func (m *BridgeStatusMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1182 i := len(dAtA) 1183 _ = i 1184 var l int 1185 _ = l 1186 if m.Active != 0 { 1187 i = encodeVarintFbridge(dAtA, i, uint64(m.Active)) 1188 i-- 1189 dAtA[i] = 0x10 1190 } 1191 if m.Inactive != 0 { 1192 i = encodeVarintFbridge(dAtA, i, uint64(m.Inactive)) 1193 i-- 1194 dAtA[i] = 0x8 1195 } 1196 return len(dAtA) - i, nil 1197 } 1198 1199 func encodeVarintFbridge(dAtA []byte, offset int, v uint64) int { 1200 offset -= sovFbridge(v) 1201 base := offset 1202 for v >= 1<<7 { 1203 dAtA[offset] = uint8(v&0x7f | 0x80) 1204 v >>= 7 1205 offset++ 1206 } 1207 dAtA[offset] = uint8(v) 1208 return base 1209 } 1210 func (m *Params) Size() (n int) { 1211 if m == nil { 1212 return 0 1213 } 1214 var l int 1215 _ = l 1216 l = m.OperatorTrustLevel.Size() 1217 n += 1 + l + sovFbridge(uint64(l)) 1218 l = m.GuardianTrustLevel.Size() 1219 n += 1 + l + sovFbridge(uint64(l)) 1220 l = m.JudgeTrustLevel.Size() 1221 n += 1 + l + sovFbridge(uint64(l)) 1222 if m.TimelockPeriod != 0 { 1223 n += 1 + sovFbridge(uint64(m.TimelockPeriod)) 1224 } 1225 if m.ProposalPeriod != 0 { 1226 n += 1 + sovFbridge(uint64(m.ProposalPeriod)) 1227 } 1228 l = len(m.TargetDenom) 1229 if l > 0 { 1230 n += 1 + l + sovFbridge(uint64(l)) 1231 } 1232 return n 1233 } 1234 1235 func (m *ProvisionData) Size() (n int) { 1236 if m == nil { 1237 return 0 1238 } 1239 var l int 1240 _ = l 1241 if m.Seq != 0 { 1242 n += 1 + sovFbridge(uint64(m.Seq)) 1243 } 1244 l = m.Amount.Size() 1245 n += 1 + l + sovFbridge(uint64(l)) 1246 l = len(m.Sender) 1247 if l > 0 { 1248 n += 1 + l + sovFbridge(uint64(l)) 1249 } 1250 l = len(m.Receiver) 1251 if l > 0 { 1252 n += 1 + l + sovFbridge(uint64(l)) 1253 } 1254 return n 1255 } 1256 1257 func (m *ProvisionStatus) Size() (n int) { 1258 if m == nil { 1259 return 0 1260 } 1261 var l int 1262 _ = l 1263 if m.TimelockEnd != 0 { 1264 n += 1 + sovFbridge(uint64(m.TimelockEnd)) 1265 } 1266 if m.ConfirmCounts != 0 { 1267 n += 1 + sovFbridge(uint64(m.ConfirmCounts)) 1268 } 1269 if m.IsClaimed { 1270 n += 2 1271 } 1272 return n 1273 } 1274 1275 func (m *Fraction) Size() (n int) { 1276 if m == nil { 1277 return 0 1278 } 1279 var l int 1280 _ = l 1281 if m.Numerator != 0 { 1282 n += 1 + sovFbridge(uint64(m.Numerator)) 1283 } 1284 if m.Denominator != 0 { 1285 n += 1 + sovFbridge(uint64(m.Denominator)) 1286 } 1287 return n 1288 } 1289 1290 func (m *RolePair) Size() (n int) { 1291 if m == nil { 1292 return 0 1293 } 1294 var l int 1295 _ = l 1296 l = len(m.Address) 1297 if l > 0 { 1298 n += 1 + l + sovFbridge(uint64(l)) 1299 } 1300 if m.Role != 0 { 1301 n += 1 + sovFbridge(uint64(m.Role)) 1302 } 1303 return n 1304 } 1305 1306 func (m *RoleProposal) Size() (n int) { 1307 if m == nil { 1308 return 0 1309 } 1310 var l int 1311 _ = l 1312 if m.Id != 0 { 1313 n += 1 + sovFbridge(uint64(m.Id)) 1314 } 1315 l = len(m.Proposer) 1316 if l > 0 { 1317 n += 1 + l + sovFbridge(uint64(l)) 1318 } 1319 l = len(m.Target) 1320 if l > 0 { 1321 n += 1 + l + sovFbridge(uint64(l)) 1322 } 1323 if m.Role != 0 { 1324 n += 1 + sovFbridge(uint64(m.Role)) 1325 } 1326 l = github_com_gogo_protobuf_types.SizeOfStdTime(m.ExpiredAt) 1327 n += 1 + l + sovFbridge(uint64(l)) 1328 return n 1329 } 1330 1331 func (m *Vote) Size() (n int) { 1332 if m == nil { 1333 return 0 1334 } 1335 var l int 1336 _ = l 1337 if m.ProposalId != 0 { 1338 n += 1 + sovFbridge(uint64(m.ProposalId)) 1339 } 1340 l = len(m.Voter) 1341 if l > 0 { 1342 n += 1 + l + sovFbridge(uint64(l)) 1343 } 1344 if m.Option != 0 { 1345 n += 1 + sovFbridge(uint64(m.Option)) 1346 } 1347 return n 1348 } 1349 1350 func (m *RoleMetadata) Size() (n int) { 1351 if m == nil { 1352 return 0 1353 } 1354 var l int 1355 _ = l 1356 if m.Guardian != 0 { 1357 n += 1 + sovFbridge(uint64(m.Guardian)) 1358 } 1359 if m.Operator != 0 { 1360 n += 1 + sovFbridge(uint64(m.Operator)) 1361 } 1362 if m.Judge != 0 { 1363 n += 1 + sovFbridge(uint64(m.Judge)) 1364 } 1365 return n 1366 } 1367 1368 func (m *BridgeStatusMetadata) Size() (n int) { 1369 if m == nil { 1370 return 0 1371 } 1372 var l int 1373 _ = l 1374 if m.Inactive != 0 { 1375 n += 1 + sovFbridge(uint64(m.Inactive)) 1376 } 1377 if m.Active != 0 { 1378 n += 1 + sovFbridge(uint64(m.Active)) 1379 } 1380 return n 1381 } 1382 1383 func sovFbridge(x uint64) (n int) { 1384 return (math_bits.Len64(x|1) + 6) / 7 1385 } 1386 func sozFbridge(x uint64) (n int) { 1387 return sovFbridge(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1388 } 1389 func (m *Params) Unmarshal(dAtA []byte) error { 1390 l := len(dAtA) 1391 iNdEx := 0 1392 for iNdEx < l { 1393 preIndex := iNdEx 1394 var wire uint64 1395 for shift := uint(0); ; shift += 7 { 1396 if shift >= 64 { 1397 return ErrIntOverflowFbridge 1398 } 1399 if iNdEx >= l { 1400 return io.ErrUnexpectedEOF 1401 } 1402 b := dAtA[iNdEx] 1403 iNdEx++ 1404 wire |= uint64(b&0x7F) << shift 1405 if b < 0x80 { 1406 break 1407 } 1408 } 1409 fieldNum := int32(wire >> 3) 1410 wireType := int(wire & 0x7) 1411 if wireType == 4 { 1412 return fmt.Errorf("proto: Params: wiretype end group for non-group") 1413 } 1414 if fieldNum <= 0 { 1415 return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) 1416 } 1417 switch fieldNum { 1418 case 1: 1419 if wireType != 2 { 1420 return fmt.Errorf("proto: wrong wireType = %d for field OperatorTrustLevel", wireType) 1421 } 1422 var msglen int 1423 for shift := uint(0); ; shift += 7 { 1424 if shift >= 64 { 1425 return ErrIntOverflowFbridge 1426 } 1427 if iNdEx >= l { 1428 return io.ErrUnexpectedEOF 1429 } 1430 b := dAtA[iNdEx] 1431 iNdEx++ 1432 msglen |= int(b&0x7F) << shift 1433 if b < 0x80 { 1434 break 1435 } 1436 } 1437 if msglen < 0 { 1438 return ErrInvalidLengthFbridge 1439 } 1440 postIndex := iNdEx + msglen 1441 if postIndex < 0 { 1442 return ErrInvalidLengthFbridge 1443 } 1444 if postIndex > l { 1445 return io.ErrUnexpectedEOF 1446 } 1447 if err := m.OperatorTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1448 return err 1449 } 1450 iNdEx = postIndex 1451 case 2: 1452 if wireType != 2 { 1453 return fmt.Errorf("proto: wrong wireType = %d for field GuardianTrustLevel", wireType) 1454 } 1455 var msglen int 1456 for shift := uint(0); ; shift += 7 { 1457 if shift >= 64 { 1458 return ErrIntOverflowFbridge 1459 } 1460 if iNdEx >= l { 1461 return io.ErrUnexpectedEOF 1462 } 1463 b := dAtA[iNdEx] 1464 iNdEx++ 1465 msglen |= int(b&0x7F) << shift 1466 if b < 0x80 { 1467 break 1468 } 1469 } 1470 if msglen < 0 { 1471 return ErrInvalidLengthFbridge 1472 } 1473 postIndex := iNdEx + msglen 1474 if postIndex < 0 { 1475 return ErrInvalidLengthFbridge 1476 } 1477 if postIndex > l { 1478 return io.ErrUnexpectedEOF 1479 } 1480 if err := m.GuardianTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1481 return err 1482 } 1483 iNdEx = postIndex 1484 case 3: 1485 if wireType != 2 { 1486 return fmt.Errorf("proto: wrong wireType = %d for field JudgeTrustLevel", wireType) 1487 } 1488 var msglen int 1489 for shift := uint(0); ; shift += 7 { 1490 if shift >= 64 { 1491 return ErrIntOverflowFbridge 1492 } 1493 if iNdEx >= l { 1494 return io.ErrUnexpectedEOF 1495 } 1496 b := dAtA[iNdEx] 1497 iNdEx++ 1498 msglen |= int(b&0x7F) << shift 1499 if b < 0x80 { 1500 break 1501 } 1502 } 1503 if msglen < 0 { 1504 return ErrInvalidLengthFbridge 1505 } 1506 postIndex := iNdEx + msglen 1507 if postIndex < 0 { 1508 return ErrInvalidLengthFbridge 1509 } 1510 if postIndex > l { 1511 return io.ErrUnexpectedEOF 1512 } 1513 if err := m.JudgeTrustLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1514 return err 1515 } 1516 iNdEx = postIndex 1517 case 4: 1518 if wireType != 0 { 1519 return fmt.Errorf("proto: wrong wireType = %d for field TimelockPeriod", wireType) 1520 } 1521 m.TimelockPeriod = 0 1522 for shift := uint(0); ; shift += 7 { 1523 if shift >= 64 { 1524 return ErrIntOverflowFbridge 1525 } 1526 if iNdEx >= l { 1527 return io.ErrUnexpectedEOF 1528 } 1529 b := dAtA[iNdEx] 1530 iNdEx++ 1531 m.TimelockPeriod |= uint64(b&0x7F) << shift 1532 if b < 0x80 { 1533 break 1534 } 1535 } 1536 case 5: 1537 if wireType != 0 { 1538 return fmt.Errorf("proto: wrong wireType = %d for field ProposalPeriod", wireType) 1539 } 1540 m.ProposalPeriod = 0 1541 for shift := uint(0); ; shift += 7 { 1542 if shift >= 64 { 1543 return ErrIntOverflowFbridge 1544 } 1545 if iNdEx >= l { 1546 return io.ErrUnexpectedEOF 1547 } 1548 b := dAtA[iNdEx] 1549 iNdEx++ 1550 m.ProposalPeriod |= uint64(b&0x7F) << shift 1551 if b < 0x80 { 1552 break 1553 } 1554 } 1555 case 6: 1556 if wireType != 2 { 1557 return fmt.Errorf("proto: wrong wireType = %d for field TargetDenom", wireType) 1558 } 1559 var stringLen uint64 1560 for shift := uint(0); ; shift += 7 { 1561 if shift >= 64 { 1562 return ErrIntOverflowFbridge 1563 } 1564 if iNdEx >= l { 1565 return io.ErrUnexpectedEOF 1566 } 1567 b := dAtA[iNdEx] 1568 iNdEx++ 1569 stringLen |= uint64(b&0x7F) << shift 1570 if b < 0x80 { 1571 break 1572 } 1573 } 1574 intStringLen := int(stringLen) 1575 if intStringLen < 0 { 1576 return ErrInvalidLengthFbridge 1577 } 1578 postIndex := iNdEx + intStringLen 1579 if postIndex < 0 { 1580 return ErrInvalidLengthFbridge 1581 } 1582 if postIndex > l { 1583 return io.ErrUnexpectedEOF 1584 } 1585 m.TargetDenom = string(dAtA[iNdEx:postIndex]) 1586 iNdEx = postIndex 1587 default: 1588 iNdEx = preIndex 1589 skippy, err := skipFbridge(dAtA[iNdEx:]) 1590 if err != nil { 1591 return err 1592 } 1593 if (skippy < 0) || (iNdEx+skippy) < 0 { 1594 return ErrInvalidLengthFbridge 1595 } 1596 if (iNdEx + skippy) > l { 1597 return io.ErrUnexpectedEOF 1598 } 1599 iNdEx += skippy 1600 } 1601 } 1602 1603 if iNdEx > l { 1604 return io.ErrUnexpectedEOF 1605 } 1606 return nil 1607 } 1608 func (m *ProvisionData) Unmarshal(dAtA []byte) error { 1609 l := len(dAtA) 1610 iNdEx := 0 1611 for iNdEx < l { 1612 preIndex := iNdEx 1613 var wire uint64 1614 for shift := uint(0); ; shift += 7 { 1615 if shift >= 64 { 1616 return ErrIntOverflowFbridge 1617 } 1618 if iNdEx >= l { 1619 return io.ErrUnexpectedEOF 1620 } 1621 b := dAtA[iNdEx] 1622 iNdEx++ 1623 wire |= uint64(b&0x7F) << shift 1624 if b < 0x80 { 1625 break 1626 } 1627 } 1628 fieldNum := int32(wire >> 3) 1629 wireType := int(wire & 0x7) 1630 if wireType == 4 { 1631 return fmt.Errorf("proto: ProvisionData: wiretype end group for non-group") 1632 } 1633 if fieldNum <= 0 { 1634 return fmt.Errorf("proto: ProvisionData: illegal tag %d (wire type %d)", fieldNum, wire) 1635 } 1636 switch fieldNum { 1637 case 1: 1638 if wireType != 0 { 1639 return fmt.Errorf("proto: wrong wireType = %d for field Seq", wireType) 1640 } 1641 m.Seq = 0 1642 for shift := uint(0); ; shift += 7 { 1643 if shift >= 64 { 1644 return ErrIntOverflowFbridge 1645 } 1646 if iNdEx >= l { 1647 return io.ErrUnexpectedEOF 1648 } 1649 b := dAtA[iNdEx] 1650 iNdEx++ 1651 m.Seq |= uint64(b&0x7F) << shift 1652 if b < 0x80 { 1653 break 1654 } 1655 } 1656 case 2: 1657 if wireType != 2 { 1658 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1659 } 1660 var stringLen uint64 1661 for shift := uint(0); ; shift += 7 { 1662 if shift >= 64 { 1663 return ErrIntOverflowFbridge 1664 } 1665 if iNdEx >= l { 1666 return io.ErrUnexpectedEOF 1667 } 1668 b := dAtA[iNdEx] 1669 iNdEx++ 1670 stringLen |= uint64(b&0x7F) << shift 1671 if b < 0x80 { 1672 break 1673 } 1674 } 1675 intStringLen := int(stringLen) 1676 if intStringLen < 0 { 1677 return ErrInvalidLengthFbridge 1678 } 1679 postIndex := iNdEx + intStringLen 1680 if postIndex < 0 { 1681 return ErrInvalidLengthFbridge 1682 } 1683 if postIndex > l { 1684 return io.ErrUnexpectedEOF 1685 } 1686 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1687 return err 1688 } 1689 iNdEx = postIndex 1690 case 3: 1691 if wireType != 2 { 1692 return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) 1693 } 1694 var stringLen uint64 1695 for shift := uint(0); ; shift += 7 { 1696 if shift >= 64 { 1697 return ErrIntOverflowFbridge 1698 } 1699 if iNdEx >= l { 1700 return io.ErrUnexpectedEOF 1701 } 1702 b := dAtA[iNdEx] 1703 iNdEx++ 1704 stringLen |= uint64(b&0x7F) << shift 1705 if b < 0x80 { 1706 break 1707 } 1708 } 1709 intStringLen := int(stringLen) 1710 if intStringLen < 0 { 1711 return ErrInvalidLengthFbridge 1712 } 1713 postIndex := iNdEx + intStringLen 1714 if postIndex < 0 { 1715 return ErrInvalidLengthFbridge 1716 } 1717 if postIndex > l { 1718 return io.ErrUnexpectedEOF 1719 } 1720 m.Sender = string(dAtA[iNdEx:postIndex]) 1721 iNdEx = postIndex 1722 case 4: 1723 if wireType != 2 { 1724 return fmt.Errorf("proto: wrong wireType = %d for field Receiver", wireType) 1725 } 1726 var stringLen uint64 1727 for shift := uint(0); ; shift += 7 { 1728 if shift >= 64 { 1729 return ErrIntOverflowFbridge 1730 } 1731 if iNdEx >= l { 1732 return io.ErrUnexpectedEOF 1733 } 1734 b := dAtA[iNdEx] 1735 iNdEx++ 1736 stringLen |= uint64(b&0x7F) << shift 1737 if b < 0x80 { 1738 break 1739 } 1740 } 1741 intStringLen := int(stringLen) 1742 if intStringLen < 0 { 1743 return ErrInvalidLengthFbridge 1744 } 1745 postIndex := iNdEx + intStringLen 1746 if postIndex < 0 { 1747 return ErrInvalidLengthFbridge 1748 } 1749 if postIndex > l { 1750 return io.ErrUnexpectedEOF 1751 } 1752 m.Receiver = string(dAtA[iNdEx:postIndex]) 1753 iNdEx = postIndex 1754 default: 1755 iNdEx = preIndex 1756 skippy, err := skipFbridge(dAtA[iNdEx:]) 1757 if err != nil { 1758 return err 1759 } 1760 if (skippy < 0) || (iNdEx+skippy) < 0 { 1761 return ErrInvalidLengthFbridge 1762 } 1763 if (iNdEx + skippy) > l { 1764 return io.ErrUnexpectedEOF 1765 } 1766 iNdEx += skippy 1767 } 1768 } 1769 1770 if iNdEx > l { 1771 return io.ErrUnexpectedEOF 1772 } 1773 return nil 1774 } 1775 func (m *ProvisionStatus) Unmarshal(dAtA []byte) error { 1776 l := len(dAtA) 1777 iNdEx := 0 1778 for iNdEx < l { 1779 preIndex := iNdEx 1780 var wire uint64 1781 for shift := uint(0); ; shift += 7 { 1782 if shift >= 64 { 1783 return ErrIntOverflowFbridge 1784 } 1785 if iNdEx >= l { 1786 return io.ErrUnexpectedEOF 1787 } 1788 b := dAtA[iNdEx] 1789 iNdEx++ 1790 wire |= uint64(b&0x7F) << shift 1791 if b < 0x80 { 1792 break 1793 } 1794 } 1795 fieldNum := int32(wire >> 3) 1796 wireType := int(wire & 0x7) 1797 if wireType == 4 { 1798 return fmt.Errorf("proto: ProvisionStatus: wiretype end group for non-group") 1799 } 1800 if fieldNum <= 0 { 1801 return fmt.Errorf("proto: ProvisionStatus: illegal tag %d (wire type %d)", fieldNum, wire) 1802 } 1803 switch fieldNum { 1804 case 1: 1805 if wireType != 0 { 1806 return fmt.Errorf("proto: wrong wireType = %d for field TimelockEnd", wireType) 1807 } 1808 m.TimelockEnd = 0 1809 for shift := uint(0); ; shift += 7 { 1810 if shift >= 64 { 1811 return ErrIntOverflowFbridge 1812 } 1813 if iNdEx >= l { 1814 return io.ErrUnexpectedEOF 1815 } 1816 b := dAtA[iNdEx] 1817 iNdEx++ 1818 m.TimelockEnd |= uint64(b&0x7F) << shift 1819 if b < 0x80 { 1820 break 1821 } 1822 } 1823 case 2: 1824 if wireType != 0 { 1825 return fmt.Errorf("proto: wrong wireType = %d for field ConfirmCounts", wireType) 1826 } 1827 m.ConfirmCounts = 0 1828 for shift := uint(0); ; shift += 7 { 1829 if shift >= 64 { 1830 return ErrIntOverflowFbridge 1831 } 1832 if iNdEx >= l { 1833 return io.ErrUnexpectedEOF 1834 } 1835 b := dAtA[iNdEx] 1836 iNdEx++ 1837 m.ConfirmCounts |= int32(b&0x7F) << shift 1838 if b < 0x80 { 1839 break 1840 } 1841 } 1842 case 3: 1843 if wireType != 0 { 1844 return fmt.Errorf("proto: wrong wireType = %d for field IsClaimed", wireType) 1845 } 1846 var v int 1847 for shift := uint(0); ; shift += 7 { 1848 if shift >= 64 { 1849 return ErrIntOverflowFbridge 1850 } 1851 if iNdEx >= l { 1852 return io.ErrUnexpectedEOF 1853 } 1854 b := dAtA[iNdEx] 1855 iNdEx++ 1856 v |= int(b&0x7F) << shift 1857 if b < 0x80 { 1858 break 1859 } 1860 } 1861 m.IsClaimed = bool(v != 0) 1862 default: 1863 iNdEx = preIndex 1864 skippy, err := skipFbridge(dAtA[iNdEx:]) 1865 if err != nil { 1866 return err 1867 } 1868 if (skippy < 0) || (iNdEx+skippy) < 0 { 1869 return ErrInvalidLengthFbridge 1870 } 1871 if (iNdEx + skippy) > l { 1872 return io.ErrUnexpectedEOF 1873 } 1874 iNdEx += skippy 1875 } 1876 } 1877 1878 if iNdEx > l { 1879 return io.ErrUnexpectedEOF 1880 } 1881 return nil 1882 } 1883 func (m *Fraction) Unmarshal(dAtA []byte) error { 1884 l := len(dAtA) 1885 iNdEx := 0 1886 for iNdEx < l { 1887 preIndex := iNdEx 1888 var wire uint64 1889 for shift := uint(0); ; shift += 7 { 1890 if shift >= 64 { 1891 return ErrIntOverflowFbridge 1892 } 1893 if iNdEx >= l { 1894 return io.ErrUnexpectedEOF 1895 } 1896 b := dAtA[iNdEx] 1897 iNdEx++ 1898 wire |= uint64(b&0x7F) << shift 1899 if b < 0x80 { 1900 break 1901 } 1902 } 1903 fieldNum := int32(wire >> 3) 1904 wireType := int(wire & 0x7) 1905 if wireType == 4 { 1906 return fmt.Errorf("proto: Fraction: wiretype end group for non-group") 1907 } 1908 if fieldNum <= 0 { 1909 return fmt.Errorf("proto: Fraction: illegal tag %d (wire type %d)", fieldNum, wire) 1910 } 1911 switch fieldNum { 1912 case 1: 1913 if wireType != 0 { 1914 return fmt.Errorf("proto: wrong wireType = %d for field Numerator", wireType) 1915 } 1916 m.Numerator = 0 1917 for shift := uint(0); ; shift += 7 { 1918 if shift >= 64 { 1919 return ErrIntOverflowFbridge 1920 } 1921 if iNdEx >= l { 1922 return io.ErrUnexpectedEOF 1923 } 1924 b := dAtA[iNdEx] 1925 iNdEx++ 1926 m.Numerator |= uint64(b&0x7F) << shift 1927 if b < 0x80 { 1928 break 1929 } 1930 } 1931 case 2: 1932 if wireType != 0 { 1933 return fmt.Errorf("proto: wrong wireType = %d for field Denominator", wireType) 1934 } 1935 m.Denominator = 0 1936 for shift := uint(0); ; shift += 7 { 1937 if shift >= 64 { 1938 return ErrIntOverflowFbridge 1939 } 1940 if iNdEx >= l { 1941 return io.ErrUnexpectedEOF 1942 } 1943 b := dAtA[iNdEx] 1944 iNdEx++ 1945 m.Denominator |= uint64(b&0x7F) << shift 1946 if b < 0x80 { 1947 break 1948 } 1949 } 1950 default: 1951 iNdEx = preIndex 1952 skippy, err := skipFbridge(dAtA[iNdEx:]) 1953 if err != nil { 1954 return err 1955 } 1956 if (skippy < 0) || (iNdEx+skippy) < 0 { 1957 return ErrInvalidLengthFbridge 1958 } 1959 if (iNdEx + skippy) > l { 1960 return io.ErrUnexpectedEOF 1961 } 1962 iNdEx += skippy 1963 } 1964 } 1965 1966 if iNdEx > l { 1967 return io.ErrUnexpectedEOF 1968 } 1969 return nil 1970 } 1971 func (m *RolePair) Unmarshal(dAtA []byte) error { 1972 l := len(dAtA) 1973 iNdEx := 0 1974 for iNdEx < l { 1975 preIndex := iNdEx 1976 var wire uint64 1977 for shift := uint(0); ; shift += 7 { 1978 if shift >= 64 { 1979 return ErrIntOverflowFbridge 1980 } 1981 if iNdEx >= l { 1982 return io.ErrUnexpectedEOF 1983 } 1984 b := dAtA[iNdEx] 1985 iNdEx++ 1986 wire |= uint64(b&0x7F) << shift 1987 if b < 0x80 { 1988 break 1989 } 1990 } 1991 fieldNum := int32(wire >> 3) 1992 wireType := int(wire & 0x7) 1993 if wireType == 4 { 1994 return fmt.Errorf("proto: RolePair: wiretype end group for non-group") 1995 } 1996 if fieldNum <= 0 { 1997 return fmt.Errorf("proto: RolePair: illegal tag %d (wire type %d)", fieldNum, wire) 1998 } 1999 switch fieldNum { 2000 case 1: 2001 if wireType != 2 { 2002 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 2003 } 2004 var stringLen uint64 2005 for shift := uint(0); ; shift += 7 { 2006 if shift >= 64 { 2007 return ErrIntOverflowFbridge 2008 } 2009 if iNdEx >= l { 2010 return io.ErrUnexpectedEOF 2011 } 2012 b := dAtA[iNdEx] 2013 iNdEx++ 2014 stringLen |= uint64(b&0x7F) << shift 2015 if b < 0x80 { 2016 break 2017 } 2018 } 2019 intStringLen := int(stringLen) 2020 if intStringLen < 0 { 2021 return ErrInvalidLengthFbridge 2022 } 2023 postIndex := iNdEx + intStringLen 2024 if postIndex < 0 { 2025 return ErrInvalidLengthFbridge 2026 } 2027 if postIndex > l { 2028 return io.ErrUnexpectedEOF 2029 } 2030 m.Address = string(dAtA[iNdEx:postIndex]) 2031 iNdEx = postIndex 2032 case 2: 2033 if wireType != 0 { 2034 return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) 2035 } 2036 m.Role = 0 2037 for shift := uint(0); ; shift += 7 { 2038 if shift >= 64 { 2039 return ErrIntOverflowFbridge 2040 } 2041 if iNdEx >= l { 2042 return io.ErrUnexpectedEOF 2043 } 2044 b := dAtA[iNdEx] 2045 iNdEx++ 2046 m.Role |= Role(b&0x7F) << shift 2047 if b < 0x80 { 2048 break 2049 } 2050 } 2051 default: 2052 iNdEx = preIndex 2053 skippy, err := skipFbridge(dAtA[iNdEx:]) 2054 if err != nil { 2055 return err 2056 } 2057 if (skippy < 0) || (iNdEx+skippy) < 0 { 2058 return ErrInvalidLengthFbridge 2059 } 2060 if (iNdEx + skippy) > l { 2061 return io.ErrUnexpectedEOF 2062 } 2063 iNdEx += skippy 2064 } 2065 } 2066 2067 if iNdEx > l { 2068 return io.ErrUnexpectedEOF 2069 } 2070 return nil 2071 } 2072 func (m *RoleProposal) Unmarshal(dAtA []byte) error { 2073 l := len(dAtA) 2074 iNdEx := 0 2075 for iNdEx < l { 2076 preIndex := iNdEx 2077 var wire uint64 2078 for shift := uint(0); ; shift += 7 { 2079 if shift >= 64 { 2080 return ErrIntOverflowFbridge 2081 } 2082 if iNdEx >= l { 2083 return io.ErrUnexpectedEOF 2084 } 2085 b := dAtA[iNdEx] 2086 iNdEx++ 2087 wire |= uint64(b&0x7F) << shift 2088 if b < 0x80 { 2089 break 2090 } 2091 } 2092 fieldNum := int32(wire >> 3) 2093 wireType := int(wire & 0x7) 2094 if wireType == 4 { 2095 return fmt.Errorf("proto: RoleProposal: wiretype end group for non-group") 2096 } 2097 if fieldNum <= 0 { 2098 return fmt.Errorf("proto: RoleProposal: illegal tag %d (wire type %d)", fieldNum, wire) 2099 } 2100 switch fieldNum { 2101 case 1: 2102 if wireType != 0 { 2103 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 2104 } 2105 m.Id = 0 2106 for shift := uint(0); ; shift += 7 { 2107 if shift >= 64 { 2108 return ErrIntOverflowFbridge 2109 } 2110 if iNdEx >= l { 2111 return io.ErrUnexpectedEOF 2112 } 2113 b := dAtA[iNdEx] 2114 iNdEx++ 2115 m.Id |= uint64(b&0x7F) << shift 2116 if b < 0x80 { 2117 break 2118 } 2119 } 2120 case 2: 2121 if wireType != 2 { 2122 return fmt.Errorf("proto: wrong wireType = %d for field Proposer", wireType) 2123 } 2124 var stringLen uint64 2125 for shift := uint(0); ; shift += 7 { 2126 if shift >= 64 { 2127 return ErrIntOverflowFbridge 2128 } 2129 if iNdEx >= l { 2130 return io.ErrUnexpectedEOF 2131 } 2132 b := dAtA[iNdEx] 2133 iNdEx++ 2134 stringLen |= uint64(b&0x7F) << shift 2135 if b < 0x80 { 2136 break 2137 } 2138 } 2139 intStringLen := int(stringLen) 2140 if intStringLen < 0 { 2141 return ErrInvalidLengthFbridge 2142 } 2143 postIndex := iNdEx + intStringLen 2144 if postIndex < 0 { 2145 return ErrInvalidLengthFbridge 2146 } 2147 if postIndex > l { 2148 return io.ErrUnexpectedEOF 2149 } 2150 m.Proposer = string(dAtA[iNdEx:postIndex]) 2151 iNdEx = postIndex 2152 case 3: 2153 if wireType != 2 { 2154 return fmt.Errorf("proto: wrong wireType = %d for field Target", wireType) 2155 } 2156 var stringLen uint64 2157 for shift := uint(0); ; shift += 7 { 2158 if shift >= 64 { 2159 return ErrIntOverflowFbridge 2160 } 2161 if iNdEx >= l { 2162 return io.ErrUnexpectedEOF 2163 } 2164 b := dAtA[iNdEx] 2165 iNdEx++ 2166 stringLen |= uint64(b&0x7F) << shift 2167 if b < 0x80 { 2168 break 2169 } 2170 } 2171 intStringLen := int(stringLen) 2172 if intStringLen < 0 { 2173 return ErrInvalidLengthFbridge 2174 } 2175 postIndex := iNdEx + intStringLen 2176 if postIndex < 0 { 2177 return ErrInvalidLengthFbridge 2178 } 2179 if postIndex > l { 2180 return io.ErrUnexpectedEOF 2181 } 2182 m.Target = string(dAtA[iNdEx:postIndex]) 2183 iNdEx = postIndex 2184 case 4: 2185 if wireType != 0 { 2186 return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) 2187 } 2188 m.Role = 0 2189 for shift := uint(0); ; shift += 7 { 2190 if shift >= 64 { 2191 return ErrIntOverflowFbridge 2192 } 2193 if iNdEx >= l { 2194 return io.ErrUnexpectedEOF 2195 } 2196 b := dAtA[iNdEx] 2197 iNdEx++ 2198 m.Role |= Role(b&0x7F) << shift 2199 if b < 0x80 { 2200 break 2201 } 2202 } 2203 case 5: 2204 if wireType != 2 { 2205 return fmt.Errorf("proto: wrong wireType = %d for field ExpiredAt", wireType) 2206 } 2207 var msglen int 2208 for shift := uint(0); ; shift += 7 { 2209 if shift >= 64 { 2210 return ErrIntOverflowFbridge 2211 } 2212 if iNdEx >= l { 2213 return io.ErrUnexpectedEOF 2214 } 2215 b := dAtA[iNdEx] 2216 iNdEx++ 2217 msglen |= int(b&0x7F) << shift 2218 if b < 0x80 { 2219 break 2220 } 2221 } 2222 if msglen < 0 { 2223 return ErrInvalidLengthFbridge 2224 } 2225 postIndex := iNdEx + msglen 2226 if postIndex < 0 { 2227 return ErrInvalidLengthFbridge 2228 } 2229 if postIndex > l { 2230 return io.ErrUnexpectedEOF 2231 } 2232 if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.ExpiredAt, dAtA[iNdEx:postIndex]); err != nil { 2233 return err 2234 } 2235 iNdEx = postIndex 2236 default: 2237 iNdEx = preIndex 2238 skippy, err := skipFbridge(dAtA[iNdEx:]) 2239 if err != nil { 2240 return err 2241 } 2242 if (skippy < 0) || (iNdEx+skippy) < 0 { 2243 return ErrInvalidLengthFbridge 2244 } 2245 if (iNdEx + skippy) > l { 2246 return io.ErrUnexpectedEOF 2247 } 2248 iNdEx += skippy 2249 } 2250 } 2251 2252 if iNdEx > l { 2253 return io.ErrUnexpectedEOF 2254 } 2255 return nil 2256 } 2257 func (m *Vote) Unmarshal(dAtA []byte) error { 2258 l := len(dAtA) 2259 iNdEx := 0 2260 for iNdEx < l { 2261 preIndex := iNdEx 2262 var wire uint64 2263 for shift := uint(0); ; shift += 7 { 2264 if shift >= 64 { 2265 return ErrIntOverflowFbridge 2266 } 2267 if iNdEx >= l { 2268 return io.ErrUnexpectedEOF 2269 } 2270 b := dAtA[iNdEx] 2271 iNdEx++ 2272 wire |= uint64(b&0x7F) << shift 2273 if b < 0x80 { 2274 break 2275 } 2276 } 2277 fieldNum := int32(wire >> 3) 2278 wireType := int(wire & 0x7) 2279 if wireType == 4 { 2280 return fmt.Errorf("proto: Vote: wiretype end group for non-group") 2281 } 2282 if fieldNum <= 0 { 2283 return fmt.Errorf("proto: Vote: illegal tag %d (wire type %d)", fieldNum, wire) 2284 } 2285 switch fieldNum { 2286 case 1: 2287 if wireType != 0 { 2288 return fmt.Errorf("proto: wrong wireType = %d for field ProposalId", wireType) 2289 } 2290 m.ProposalId = 0 2291 for shift := uint(0); ; shift += 7 { 2292 if shift >= 64 { 2293 return ErrIntOverflowFbridge 2294 } 2295 if iNdEx >= l { 2296 return io.ErrUnexpectedEOF 2297 } 2298 b := dAtA[iNdEx] 2299 iNdEx++ 2300 m.ProposalId |= uint64(b&0x7F) << shift 2301 if b < 0x80 { 2302 break 2303 } 2304 } 2305 case 2: 2306 if wireType != 2 { 2307 return fmt.Errorf("proto: wrong wireType = %d for field Voter", wireType) 2308 } 2309 var stringLen uint64 2310 for shift := uint(0); ; shift += 7 { 2311 if shift >= 64 { 2312 return ErrIntOverflowFbridge 2313 } 2314 if iNdEx >= l { 2315 return io.ErrUnexpectedEOF 2316 } 2317 b := dAtA[iNdEx] 2318 iNdEx++ 2319 stringLen |= uint64(b&0x7F) << shift 2320 if b < 0x80 { 2321 break 2322 } 2323 } 2324 intStringLen := int(stringLen) 2325 if intStringLen < 0 { 2326 return ErrInvalidLengthFbridge 2327 } 2328 postIndex := iNdEx + intStringLen 2329 if postIndex < 0 { 2330 return ErrInvalidLengthFbridge 2331 } 2332 if postIndex > l { 2333 return io.ErrUnexpectedEOF 2334 } 2335 m.Voter = string(dAtA[iNdEx:postIndex]) 2336 iNdEx = postIndex 2337 case 3: 2338 if wireType != 0 { 2339 return fmt.Errorf("proto: wrong wireType = %d for field Option", wireType) 2340 } 2341 m.Option = 0 2342 for shift := uint(0); ; shift += 7 { 2343 if shift >= 64 { 2344 return ErrIntOverflowFbridge 2345 } 2346 if iNdEx >= l { 2347 return io.ErrUnexpectedEOF 2348 } 2349 b := dAtA[iNdEx] 2350 iNdEx++ 2351 m.Option |= VoteOption(b&0x7F) << shift 2352 if b < 0x80 { 2353 break 2354 } 2355 } 2356 default: 2357 iNdEx = preIndex 2358 skippy, err := skipFbridge(dAtA[iNdEx:]) 2359 if err != nil { 2360 return err 2361 } 2362 if (skippy < 0) || (iNdEx+skippy) < 0 { 2363 return ErrInvalidLengthFbridge 2364 } 2365 if (iNdEx + skippy) > l { 2366 return io.ErrUnexpectedEOF 2367 } 2368 iNdEx += skippy 2369 } 2370 } 2371 2372 if iNdEx > l { 2373 return io.ErrUnexpectedEOF 2374 } 2375 return nil 2376 } 2377 func (m *RoleMetadata) Unmarshal(dAtA []byte) error { 2378 l := len(dAtA) 2379 iNdEx := 0 2380 for iNdEx < l { 2381 preIndex := iNdEx 2382 var wire uint64 2383 for shift := uint(0); ; shift += 7 { 2384 if shift >= 64 { 2385 return ErrIntOverflowFbridge 2386 } 2387 if iNdEx >= l { 2388 return io.ErrUnexpectedEOF 2389 } 2390 b := dAtA[iNdEx] 2391 iNdEx++ 2392 wire |= uint64(b&0x7F) << shift 2393 if b < 0x80 { 2394 break 2395 } 2396 } 2397 fieldNum := int32(wire >> 3) 2398 wireType := int(wire & 0x7) 2399 if wireType == 4 { 2400 return fmt.Errorf("proto: RoleMetadata: wiretype end group for non-group") 2401 } 2402 if fieldNum <= 0 { 2403 return fmt.Errorf("proto: RoleMetadata: illegal tag %d (wire type %d)", fieldNum, wire) 2404 } 2405 switch fieldNum { 2406 case 1: 2407 if wireType != 0 { 2408 return fmt.Errorf("proto: wrong wireType = %d for field Guardian", wireType) 2409 } 2410 m.Guardian = 0 2411 for shift := uint(0); ; shift += 7 { 2412 if shift >= 64 { 2413 return ErrIntOverflowFbridge 2414 } 2415 if iNdEx >= l { 2416 return io.ErrUnexpectedEOF 2417 } 2418 b := dAtA[iNdEx] 2419 iNdEx++ 2420 m.Guardian |= uint64(b&0x7F) << shift 2421 if b < 0x80 { 2422 break 2423 } 2424 } 2425 case 2: 2426 if wireType != 0 { 2427 return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType) 2428 } 2429 m.Operator = 0 2430 for shift := uint(0); ; shift += 7 { 2431 if shift >= 64 { 2432 return ErrIntOverflowFbridge 2433 } 2434 if iNdEx >= l { 2435 return io.ErrUnexpectedEOF 2436 } 2437 b := dAtA[iNdEx] 2438 iNdEx++ 2439 m.Operator |= uint64(b&0x7F) << shift 2440 if b < 0x80 { 2441 break 2442 } 2443 } 2444 case 3: 2445 if wireType != 0 { 2446 return fmt.Errorf("proto: wrong wireType = %d for field Judge", wireType) 2447 } 2448 m.Judge = 0 2449 for shift := uint(0); ; shift += 7 { 2450 if shift >= 64 { 2451 return ErrIntOverflowFbridge 2452 } 2453 if iNdEx >= l { 2454 return io.ErrUnexpectedEOF 2455 } 2456 b := dAtA[iNdEx] 2457 iNdEx++ 2458 m.Judge |= uint64(b&0x7F) << shift 2459 if b < 0x80 { 2460 break 2461 } 2462 } 2463 default: 2464 iNdEx = preIndex 2465 skippy, err := skipFbridge(dAtA[iNdEx:]) 2466 if err != nil { 2467 return err 2468 } 2469 if (skippy < 0) || (iNdEx+skippy) < 0 { 2470 return ErrInvalidLengthFbridge 2471 } 2472 if (iNdEx + skippy) > l { 2473 return io.ErrUnexpectedEOF 2474 } 2475 iNdEx += skippy 2476 } 2477 } 2478 2479 if iNdEx > l { 2480 return io.ErrUnexpectedEOF 2481 } 2482 return nil 2483 } 2484 func (m *BridgeStatusMetadata) Unmarshal(dAtA []byte) error { 2485 l := len(dAtA) 2486 iNdEx := 0 2487 for iNdEx < l { 2488 preIndex := iNdEx 2489 var wire uint64 2490 for shift := uint(0); ; shift += 7 { 2491 if shift >= 64 { 2492 return ErrIntOverflowFbridge 2493 } 2494 if iNdEx >= l { 2495 return io.ErrUnexpectedEOF 2496 } 2497 b := dAtA[iNdEx] 2498 iNdEx++ 2499 wire |= uint64(b&0x7F) << shift 2500 if b < 0x80 { 2501 break 2502 } 2503 } 2504 fieldNum := int32(wire >> 3) 2505 wireType := int(wire & 0x7) 2506 if wireType == 4 { 2507 return fmt.Errorf("proto: BridgeStatusMetadata: wiretype end group for non-group") 2508 } 2509 if fieldNum <= 0 { 2510 return fmt.Errorf("proto: BridgeStatusMetadata: illegal tag %d (wire type %d)", fieldNum, wire) 2511 } 2512 switch fieldNum { 2513 case 1: 2514 if wireType != 0 { 2515 return fmt.Errorf("proto: wrong wireType = %d for field Inactive", wireType) 2516 } 2517 m.Inactive = 0 2518 for shift := uint(0); ; shift += 7 { 2519 if shift >= 64 { 2520 return ErrIntOverflowFbridge 2521 } 2522 if iNdEx >= l { 2523 return io.ErrUnexpectedEOF 2524 } 2525 b := dAtA[iNdEx] 2526 iNdEx++ 2527 m.Inactive |= uint64(b&0x7F) << shift 2528 if b < 0x80 { 2529 break 2530 } 2531 } 2532 case 2: 2533 if wireType != 0 { 2534 return fmt.Errorf("proto: wrong wireType = %d for field Active", wireType) 2535 } 2536 m.Active = 0 2537 for shift := uint(0); ; shift += 7 { 2538 if shift >= 64 { 2539 return ErrIntOverflowFbridge 2540 } 2541 if iNdEx >= l { 2542 return io.ErrUnexpectedEOF 2543 } 2544 b := dAtA[iNdEx] 2545 iNdEx++ 2546 m.Active |= uint64(b&0x7F) << shift 2547 if b < 0x80 { 2548 break 2549 } 2550 } 2551 default: 2552 iNdEx = preIndex 2553 skippy, err := skipFbridge(dAtA[iNdEx:]) 2554 if err != nil { 2555 return err 2556 } 2557 if (skippy < 0) || (iNdEx+skippy) < 0 { 2558 return ErrInvalidLengthFbridge 2559 } 2560 if (iNdEx + skippy) > l { 2561 return io.ErrUnexpectedEOF 2562 } 2563 iNdEx += skippy 2564 } 2565 } 2566 2567 if iNdEx > l { 2568 return io.ErrUnexpectedEOF 2569 } 2570 return nil 2571 } 2572 func skipFbridge(dAtA []byte) (n int, err error) { 2573 l := len(dAtA) 2574 iNdEx := 0 2575 depth := 0 2576 for iNdEx < l { 2577 var wire uint64 2578 for shift := uint(0); ; shift += 7 { 2579 if shift >= 64 { 2580 return 0, ErrIntOverflowFbridge 2581 } 2582 if iNdEx >= l { 2583 return 0, io.ErrUnexpectedEOF 2584 } 2585 b := dAtA[iNdEx] 2586 iNdEx++ 2587 wire |= (uint64(b) & 0x7F) << shift 2588 if b < 0x80 { 2589 break 2590 } 2591 } 2592 wireType := int(wire & 0x7) 2593 switch wireType { 2594 case 0: 2595 for shift := uint(0); ; shift += 7 { 2596 if shift >= 64 { 2597 return 0, ErrIntOverflowFbridge 2598 } 2599 if iNdEx >= l { 2600 return 0, io.ErrUnexpectedEOF 2601 } 2602 iNdEx++ 2603 if dAtA[iNdEx-1] < 0x80 { 2604 break 2605 } 2606 } 2607 case 1: 2608 iNdEx += 8 2609 case 2: 2610 var length int 2611 for shift := uint(0); ; shift += 7 { 2612 if shift >= 64 { 2613 return 0, ErrIntOverflowFbridge 2614 } 2615 if iNdEx >= l { 2616 return 0, io.ErrUnexpectedEOF 2617 } 2618 b := dAtA[iNdEx] 2619 iNdEx++ 2620 length |= (int(b) & 0x7F) << shift 2621 if b < 0x80 { 2622 break 2623 } 2624 } 2625 if length < 0 { 2626 return 0, ErrInvalidLengthFbridge 2627 } 2628 iNdEx += length 2629 case 3: 2630 depth++ 2631 case 4: 2632 if depth == 0 { 2633 return 0, ErrUnexpectedEndOfGroupFbridge 2634 } 2635 depth-- 2636 case 5: 2637 iNdEx += 4 2638 default: 2639 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2640 } 2641 if iNdEx < 0 { 2642 return 0, ErrInvalidLengthFbridge 2643 } 2644 if depth == 0 { 2645 return iNdEx, nil 2646 } 2647 } 2648 return 0, io.ErrUnexpectedEOF 2649 } 2650 2651 var ( 2652 ErrInvalidLengthFbridge = fmt.Errorf("proto: negative length found during unmarshaling") 2653 ErrIntOverflowFbridge = fmt.Errorf("proto: integer overflow") 2654 ErrUnexpectedEndOfGroupFbridge = fmt.Errorf("proto: unexpected end of group") 2655 )