github.com/Finschia/finschia-sdk@v0.48.1/x/collection/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/collection/v1/genesis.proto 3 4 package collection 5 6 import ( 7 fmt "fmt" 8 types "github.com/Finschia/finschia-sdk/codec/types" 9 github_com_Finschia_finschia_sdk_types "github.com/Finschia/finschia-sdk/types" 10 _ "github.com/gogo/protobuf/gogoproto" 11 proto "github.com/gogo/protobuf/proto" 12 _ "github.com/regen-network/cosmos-proto" 13 io "io" 14 math "math" 15 math_bits "math/bits" 16 ) 17 18 // Reference imports to suppress errors if they are not otherwise used. 19 var _ = proto.Marshal 20 var _ = fmt.Errorf 21 var _ = math.Inf 22 23 // This is a compile-time assertion to ensure that this generated file 24 // is compatible with the proto package it is being compiled against. 25 // A compilation error at this line likely means your copy of the 26 // proto package needs to be updated. 27 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 28 29 // GenesisState defines the collection module's genesis state. 30 type GenesisState struct { 31 // params defines all the paramaters of the module. 32 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 33 // contracts defines the metadata of the contracts. 34 Contracts []Contract `protobuf:"bytes,2,rep,name=contracts,proto3" json:"contracts"` 35 // next ids for token classes. 36 NextClassIds []NextClassIDs `protobuf:"bytes,3,rep,name=next_class_ids,json=nextClassIds,proto3" json:"next_class_ids"` 37 // classes defines the metadata of the tokens. 38 Classes []ContractClasses `protobuf:"bytes,4,rep,name=classes,proto3" json:"classes"` 39 // next ids for (non-fungible) tokens. 40 NextTokenIds []ContractNextTokenIDs `protobuf:"bytes,5,rep,name=next_token_ids,json=nextTokenIds,proto3" json:"next_token_ids"` 41 // balances is an array containing the balances of all the accounts. 42 Balances []ContractBalances `protobuf:"bytes,6,rep,name=balances,proto3" json:"balances"` 43 // nfts is an array containing the nfts. 44 Nfts []ContractNFTs `protobuf:"bytes,7,rep,name=nfts,proto3" json:"nfts"` 45 // parents represents the parents of (non-fungible) tokens. 46 Parents []ContractTokenRelations `protobuf:"bytes,8,rep,name=parents,proto3" json:"parents"` 47 // grants defines the grant information. 48 Grants []ContractGrants `protobuf:"bytes,9,rep,name=grants,proto3" json:"grants"` 49 // authorizations defines the approve information. 50 Authorizations []ContractAuthorizations `protobuf:"bytes,10,rep,name=authorizations,proto3" json:"authorizations"` 51 // supplies represents the total supplies of tokens. 52 Supplies []ContractStatistics `protobuf:"bytes,11,rep,name=supplies,proto3" json:"supplies"` 53 // burnts represents the total amount of burnt tokens. 54 Burnts []ContractStatistics `protobuf:"bytes,12,rep,name=burnts,proto3" json:"burnts"` 55 } 56 57 func (m *GenesisState) Reset() { *m = GenesisState{} } 58 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 59 func (*GenesisState) ProtoMessage() {} 60 func (*GenesisState) Descriptor() ([]byte, []int) { 61 return fileDescriptor_2b8b3f666cffb1ec, []int{0} 62 } 63 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 64 return m.Unmarshal(b) 65 } 66 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 67 if deterministic { 68 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 69 } else { 70 b = b[:cap(b)] 71 n, err := m.MarshalToSizedBuffer(b) 72 if err != nil { 73 return nil, err 74 } 75 return b[:n], nil 76 } 77 } 78 func (m *GenesisState) XXX_Merge(src proto.Message) { 79 xxx_messageInfo_GenesisState.Merge(m, src) 80 } 81 func (m *GenesisState) XXX_Size() int { 82 return m.Size() 83 } 84 func (m *GenesisState) XXX_DiscardUnknown() { 85 xxx_messageInfo_GenesisState.DiscardUnknown(m) 86 } 87 88 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 89 90 func (m *GenesisState) GetParams() Params { 91 if m != nil { 92 return m.Params 93 } 94 return Params{} 95 } 96 97 func (m *GenesisState) GetContracts() []Contract { 98 if m != nil { 99 return m.Contracts 100 } 101 return nil 102 } 103 104 func (m *GenesisState) GetNextClassIds() []NextClassIDs { 105 if m != nil { 106 return m.NextClassIds 107 } 108 return nil 109 } 110 111 func (m *GenesisState) GetClasses() []ContractClasses { 112 if m != nil { 113 return m.Classes 114 } 115 return nil 116 } 117 118 func (m *GenesisState) GetNextTokenIds() []ContractNextTokenIDs { 119 if m != nil { 120 return m.NextTokenIds 121 } 122 return nil 123 } 124 125 func (m *GenesisState) GetBalances() []ContractBalances { 126 if m != nil { 127 return m.Balances 128 } 129 return nil 130 } 131 132 func (m *GenesisState) GetNfts() []ContractNFTs { 133 if m != nil { 134 return m.Nfts 135 } 136 return nil 137 } 138 139 func (m *GenesisState) GetParents() []ContractTokenRelations { 140 if m != nil { 141 return m.Parents 142 } 143 return nil 144 } 145 146 func (m *GenesisState) GetGrants() []ContractGrants { 147 if m != nil { 148 return m.Grants 149 } 150 return nil 151 } 152 153 func (m *GenesisState) GetAuthorizations() []ContractAuthorizations { 154 if m != nil { 155 return m.Authorizations 156 } 157 return nil 158 } 159 160 func (m *GenesisState) GetSupplies() []ContractStatistics { 161 if m != nil { 162 return m.Supplies 163 } 164 return nil 165 } 166 167 func (m *GenesisState) GetBurnts() []ContractStatistics { 168 if m != nil { 169 return m.Burnts 170 } 171 return nil 172 } 173 174 // ContractBalances defines balances belong to a contract. 175 // genesis state. 176 type ContractBalances struct { 177 // contract id associated with the contract. 178 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 179 // balances 180 Balances []Balance `protobuf:"bytes,2,rep,name=balances,proto3" json:"balances"` 181 } 182 183 func (m *ContractBalances) Reset() { *m = ContractBalances{} } 184 func (m *ContractBalances) String() string { return proto.CompactTextString(m) } 185 func (*ContractBalances) ProtoMessage() {} 186 func (*ContractBalances) Descriptor() ([]byte, []int) { 187 return fileDescriptor_2b8b3f666cffb1ec, []int{1} 188 } 189 func (m *ContractBalances) XXX_Unmarshal(b []byte) error { 190 return m.Unmarshal(b) 191 } 192 func (m *ContractBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 193 if deterministic { 194 return xxx_messageInfo_ContractBalances.Marshal(b, m, deterministic) 195 } else { 196 b = b[:cap(b)] 197 n, err := m.MarshalToSizedBuffer(b) 198 if err != nil { 199 return nil, err 200 } 201 return b[:n], nil 202 } 203 } 204 func (m *ContractBalances) XXX_Merge(src proto.Message) { 205 xxx_messageInfo_ContractBalances.Merge(m, src) 206 } 207 func (m *ContractBalances) XXX_Size() int { 208 return m.Size() 209 } 210 func (m *ContractBalances) XXX_DiscardUnknown() { 211 xxx_messageInfo_ContractBalances.DiscardUnknown(m) 212 } 213 214 var xxx_messageInfo_ContractBalances proto.InternalMessageInfo 215 216 func (m *ContractBalances) GetContractId() string { 217 if m != nil { 218 return m.ContractId 219 } 220 return "" 221 } 222 223 func (m *ContractBalances) GetBalances() []Balance { 224 if m != nil { 225 return m.Balances 226 } 227 return nil 228 } 229 230 // ContractStatistics defines statistics belong to a contract. 231 type ContractStatistics struct { 232 // contract id associated with the contract. 233 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 234 // statistics 235 Statistics []ClassStatistics `protobuf:"bytes,2,rep,name=statistics,proto3" json:"statistics"` 236 } 237 238 func (m *ContractStatistics) Reset() { *m = ContractStatistics{} } 239 func (m *ContractStatistics) String() string { return proto.CompactTextString(m) } 240 func (*ContractStatistics) ProtoMessage() {} 241 func (*ContractStatistics) Descriptor() ([]byte, []int) { 242 return fileDescriptor_2b8b3f666cffb1ec, []int{2} 243 } 244 func (m *ContractStatistics) XXX_Unmarshal(b []byte) error { 245 return m.Unmarshal(b) 246 } 247 func (m *ContractStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 248 if deterministic { 249 return xxx_messageInfo_ContractStatistics.Marshal(b, m, deterministic) 250 } else { 251 b = b[:cap(b)] 252 n, err := m.MarshalToSizedBuffer(b) 253 if err != nil { 254 return nil, err 255 } 256 return b[:n], nil 257 } 258 } 259 func (m *ContractStatistics) XXX_Merge(src proto.Message) { 260 xxx_messageInfo_ContractStatistics.Merge(m, src) 261 } 262 func (m *ContractStatistics) XXX_Size() int { 263 return m.Size() 264 } 265 func (m *ContractStatistics) XXX_DiscardUnknown() { 266 xxx_messageInfo_ContractStatistics.DiscardUnknown(m) 267 } 268 269 var xxx_messageInfo_ContractStatistics proto.InternalMessageInfo 270 271 func (m *ContractStatistics) GetContractId() string { 272 if m != nil { 273 return m.ContractId 274 } 275 return "" 276 } 277 278 func (m *ContractStatistics) GetStatistics() []ClassStatistics { 279 if m != nil { 280 return m.Statistics 281 } 282 return nil 283 } 284 285 // ClassStatistics defines statistics belong to a token class. 286 type ClassStatistics struct { 287 // class id associated with the token class. 288 ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` 289 // statistics 290 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"` 291 } 292 293 func (m *ClassStatistics) Reset() { *m = ClassStatistics{} } 294 func (m *ClassStatistics) String() string { return proto.CompactTextString(m) } 295 func (*ClassStatistics) ProtoMessage() {} 296 func (*ClassStatistics) Descriptor() ([]byte, []int) { 297 return fileDescriptor_2b8b3f666cffb1ec, []int{3} 298 } 299 func (m *ClassStatistics) XXX_Unmarshal(b []byte) error { 300 return m.Unmarshal(b) 301 } 302 func (m *ClassStatistics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 303 if deterministic { 304 return xxx_messageInfo_ClassStatistics.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 *ClassStatistics) XXX_Merge(src proto.Message) { 315 xxx_messageInfo_ClassStatistics.Merge(m, src) 316 } 317 func (m *ClassStatistics) XXX_Size() int { 318 return m.Size() 319 } 320 func (m *ClassStatistics) XXX_DiscardUnknown() { 321 xxx_messageInfo_ClassStatistics.DiscardUnknown(m) 322 } 323 324 var xxx_messageInfo_ClassStatistics proto.InternalMessageInfo 325 326 func (m *ClassStatistics) GetClassId() string { 327 if m != nil { 328 return m.ClassId 329 } 330 return "" 331 } 332 333 // Balance defines a balance of an address. 334 type Balance struct { 335 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` 336 Amount Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=Coins" json:"amount"` 337 } 338 339 func (m *Balance) Reset() { *m = Balance{} } 340 func (m *Balance) String() string { return proto.CompactTextString(m) } 341 func (*Balance) ProtoMessage() {} 342 func (*Balance) Descriptor() ([]byte, []int) { 343 return fileDescriptor_2b8b3f666cffb1ec, []int{4} 344 } 345 func (m *Balance) XXX_Unmarshal(b []byte) error { 346 return m.Unmarshal(b) 347 } 348 func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 349 if deterministic { 350 return xxx_messageInfo_Balance.Marshal(b, m, deterministic) 351 } else { 352 b = b[:cap(b)] 353 n, err := m.MarshalToSizedBuffer(b) 354 if err != nil { 355 return nil, err 356 } 357 return b[:n], nil 358 } 359 } 360 func (m *Balance) XXX_Merge(src proto.Message) { 361 xxx_messageInfo_Balance.Merge(m, src) 362 } 363 func (m *Balance) XXX_Size() int { 364 return m.Size() 365 } 366 func (m *Balance) XXX_DiscardUnknown() { 367 xxx_messageInfo_Balance.DiscardUnknown(m) 368 } 369 370 var xxx_messageInfo_Balance proto.InternalMessageInfo 371 372 func (m *Balance) GetAddress() string { 373 if m != nil { 374 return m.Address 375 } 376 return "" 377 } 378 379 func (m *Balance) GetAmount() Coins { 380 if m != nil { 381 return m.Amount 382 } 383 return nil 384 } 385 386 // ContractClasses defines token classes belong to a contract. 387 type ContractClasses struct { 388 // contract id associated with the contract. 389 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 390 // classes 391 Classes []types.Any `protobuf:"bytes,2,rep,name=classes,proto3" json:"classes"` 392 } 393 394 func (m *ContractClasses) Reset() { *m = ContractClasses{} } 395 func (m *ContractClasses) String() string { return proto.CompactTextString(m) } 396 func (*ContractClasses) ProtoMessage() {} 397 func (*ContractClasses) Descriptor() ([]byte, []int) { 398 return fileDescriptor_2b8b3f666cffb1ec, []int{5} 399 } 400 func (m *ContractClasses) XXX_Unmarshal(b []byte) error { 401 return m.Unmarshal(b) 402 } 403 func (m *ContractClasses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 404 if deterministic { 405 return xxx_messageInfo_ContractClasses.Marshal(b, m, deterministic) 406 } else { 407 b = b[:cap(b)] 408 n, err := m.MarshalToSizedBuffer(b) 409 if err != nil { 410 return nil, err 411 } 412 return b[:n], nil 413 } 414 } 415 func (m *ContractClasses) XXX_Merge(src proto.Message) { 416 xxx_messageInfo_ContractClasses.Merge(m, src) 417 } 418 func (m *ContractClasses) XXX_Size() int { 419 return m.Size() 420 } 421 func (m *ContractClasses) XXX_DiscardUnknown() { 422 xxx_messageInfo_ContractClasses.DiscardUnknown(m) 423 } 424 425 var xxx_messageInfo_ContractClasses proto.InternalMessageInfo 426 427 func (m *ContractClasses) GetContractId() string { 428 if m != nil { 429 return m.ContractId 430 } 431 return "" 432 } 433 434 func (m *ContractClasses) GetClasses() []types.Any { 435 if m != nil { 436 return m.Classes 437 } 438 return nil 439 } 440 441 // ContractNFTs defines token classes belong to a contract. 442 type ContractNFTs struct { 443 // contract id associated with the contract. 444 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 445 // nfts 446 Nfts []NFT `protobuf:"bytes,2,rep,name=nfts,proto3" json:"nfts"` 447 } 448 449 func (m *ContractNFTs) Reset() { *m = ContractNFTs{} } 450 func (m *ContractNFTs) String() string { return proto.CompactTextString(m) } 451 func (*ContractNFTs) ProtoMessage() {} 452 func (*ContractNFTs) Descriptor() ([]byte, []int) { 453 return fileDescriptor_2b8b3f666cffb1ec, []int{6} 454 } 455 func (m *ContractNFTs) XXX_Unmarshal(b []byte) error { 456 return m.Unmarshal(b) 457 } 458 func (m *ContractNFTs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 459 if deterministic { 460 return xxx_messageInfo_ContractNFTs.Marshal(b, m, deterministic) 461 } else { 462 b = b[:cap(b)] 463 n, err := m.MarshalToSizedBuffer(b) 464 if err != nil { 465 return nil, err 466 } 467 return b[:n], nil 468 } 469 } 470 func (m *ContractNFTs) XXX_Merge(src proto.Message) { 471 xxx_messageInfo_ContractNFTs.Merge(m, src) 472 } 473 func (m *ContractNFTs) XXX_Size() int { 474 return m.Size() 475 } 476 func (m *ContractNFTs) XXX_DiscardUnknown() { 477 xxx_messageInfo_ContractNFTs.DiscardUnknown(m) 478 } 479 480 var xxx_messageInfo_ContractNFTs proto.InternalMessageInfo 481 482 func (m *ContractNFTs) GetContractId() string { 483 if m != nil { 484 return m.ContractId 485 } 486 return "" 487 } 488 489 func (m *ContractNFTs) GetNfts() []NFT { 490 if m != nil { 491 return m.Nfts 492 } 493 return nil 494 } 495 496 // ContractAuthorizations defines authorizations belong to a contract. 497 type ContractAuthorizations struct { 498 // contract id associated with the contract. 499 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 500 // authorizations 501 Authorizations []Authorization `protobuf:"bytes,2,rep,name=authorizations,proto3" json:"authorizations"` 502 } 503 504 func (m *ContractAuthorizations) Reset() { *m = ContractAuthorizations{} } 505 func (m *ContractAuthorizations) String() string { return proto.CompactTextString(m) } 506 func (*ContractAuthorizations) ProtoMessage() {} 507 func (*ContractAuthorizations) Descriptor() ([]byte, []int) { 508 return fileDescriptor_2b8b3f666cffb1ec, []int{7} 509 } 510 func (m *ContractAuthorizations) XXX_Unmarshal(b []byte) error { 511 return m.Unmarshal(b) 512 } 513 func (m *ContractAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 514 if deterministic { 515 return xxx_messageInfo_ContractAuthorizations.Marshal(b, m, deterministic) 516 } else { 517 b = b[:cap(b)] 518 n, err := m.MarshalToSizedBuffer(b) 519 if err != nil { 520 return nil, err 521 } 522 return b[:n], nil 523 } 524 } 525 func (m *ContractAuthorizations) XXX_Merge(src proto.Message) { 526 xxx_messageInfo_ContractAuthorizations.Merge(m, src) 527 } 528 func (m *ContractAuthorizations) XXX_Size() int { 529 return m.Size() 530 } 531 func (m *ContractAuthorizations) XXX_DiscardUnknown() { 532 xxx_messageInfo_ContractAuthorizations.DiscardUnknown(m) 533 } 534 535 var xxx_messageInfo_ContractAuthorizations proto.InternalMessageInfo 536 537 func (m *ContractAuthorizations) GetContractId() string { 538 if m != nil { 539 return m.ContractId 540 } 541 return "" 542 } 543 544 func (m *ContractAuthorizations) GetAuthorizations() []Authorization { 545 if m != nil { 546 return m.Authorizations 547 } 548 return nil 549 } 550 551 // ContractGrant defines grants belong to a contract. 552 type ContractGrants struct { 553 // contract id associated with the contract. 554 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 555 // grants 556 Grants []Grant `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants"` 557 } 558 559 func (m *ContractGrants) Reset() { *m = ContractGrants{} } 560 func (m *ContractGrants) String() string { return proto.CompactTextString(m) } 561 func (*ContractGrants) ProtoMessage() {} 562 func (*ContractGrants) Descriptor() ([]byte, []int) { 563 return fileDescriptor_2b8b3f666cffb1ec, []int{8} 564 } 565 func (m *ContractGrants) XXX_Unmarshal(b []byte) error { 566 return m.Unmarshal(b) 567 } 568 func (m *ContractGrants) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 569 if deterministic { 570 return xxx_messageInfo_ContractGrants.Marshal(b, m, deterministic) 571 } else { 572 b = b[:cap(b)] 573 n, err := m.MarshalToSizedBuffer(b) 574 if err != nil { 575 return nil, err 576 } 577 return b[:n], nil 578 } 579 } 580 func (m *ContractGrants) XXX_Merge(src proto.Message) { 581 xxx_messageInfo_ContractGrants.Merge(m, src) 582 } 583 func (m *ContractGrants) XXX_Size() int { 584 return m.Size() 585 } 586 func (m *ContractGrants) XXX_DiscardUnknown() { 587 xxx_messageInfo_ContractGrants.DiscardUnknown(m) 588 } 589 590 var xxx_messageInfo_ContractGrants proto.InternalMessageInfo 591 592 func (m *ContractGrants) GetContractId() string { 593 if m != nil { 594 return m.ContractId 595 } 596 return "" 597 } 598 599 func (m *ContractGrants) GetGrants() []Grant { 600 if m != nil { 601 return m.Grants 602 } 603 return nil 604 } 605 606 // NextClassIDs defines the next class ids of the contract. 607 type NextClassIDs struct { 608 // contract id associated with the contract. 609 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 610 // id for the fungible tokens. 611 Fungible github_com_Finschia_finschia_sdk_types.Uint `protobuf:"bytes,2,opt,name=fungible,proto3,customtype=github.com/Finschia/finschia-sdk/types.Uint" json:"fungible"` 612 // id for the non-fungible tokens. 613 NonFungible github_com_Finschia_finschia_sdk_types.Uint `protobuf:"bytes,3,opt,name=non_fungible,json=nonFungible,proto3,customtype=github.com/Finschia/finschia-sdk/types.Uint" json:"non_fungible"` 614 } 615 616 func (m *NextClassIDs) Reset() { *m = NextClassIDs{} } 617 func (m *NextClassIDs) String() string { return proto.CompactTextString(m) } 618 func (*NextClassIDs) ProtoMessage() {} 619 func (*NextClassIDs) Descriptor() ([]byte, []int) { 620 return fileDescriptor_2b8b3f666cffb1ec, []int{9} 621 } 622 func (m *NextClassIDs) XXX_Unmarshal(b []byte) error { 623 return m.Unmarshal(b) 624 } 625 func (m *NextClassIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 626 if deterministic { 627 return xxx_messageInfo_NextClassIDs.Marshal(b, m, deterministic) 628 } else { 629 b = b[:cap(b)] 630 n, err := m.MarshalToSizedBuffer(b) 631 if err != nil { 632 return nil, err 633 } 634 return b[:n], nil 635 } 636 } 637 func (m *NextClassIDs) XXX_Merge(src proto.Message) { 638 xxx_messageInfo_NextClassIDs.Merge(m, src) 639 } 640 func (m *NextClassIDs) XXX_Size() int { 641 return m.Size() 642 } 643 func (m *NextClassIDs) XXX_DiscardUnknown() { 644 xxx_messageInfo_NextClassIDs.DiscardUnknown(m) 645 } 646 647 var xxx_messageInfo_NextClassIDs proto.InternalMessageInfo 648 649 func (m *NextClassIDs) GetContractId() string { 650 if m != nil { 651 return m.ContractId 652 } 653 return "" 654 } 655 656 // ContractNextTokenIDs defines the next token ids belong to a contract. 657 type ContractNextTokenIDs struct { 658 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 659 TokenIds []NextTokenID `protobuf:"bytes,2,rep,name=token_ids,json=tokenIds,proto3" json:"token_ids"` 660 } 661 662 func (m *ContractNextTokenIDs) Reset() { *m = ContractNextTokenIDs{} } 663 func (m *ContractNextTokenIDs) String() string { return proto.CompactTextString(m) } 664 func (*ContractNextTokenIDs) ProtoMessage() {} 665 func (*ContractNextTokenIDs) Descriptor() ([]byte, []int) { 666 return fileDescriptor_2b8b3f666cffb1ec, []int{10} 667 } 668 func (m *ContractNextTokenIDs) XXX_Unmarshal(b []byte) error { 669 return m.Unmarshal(b) 670 } 671 func (m *ContractNextTokenIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 672 if deterministic { 673 return xxx_messageInfo_ContractNextTokenIDs.Marshal(b, m, deterministic) 674 } else { 675 b = b[:cap(b)] 676 n, err := m.MarshalToSizedBuffer(b) 677 if err != nil { 678 return nil, err 679 } 680 return b[:n], nil 681 } 682 } 683 func (m *ContractNextTokenIDs) XXX_Merge(src proto.Message) { 684 xxx_messageInfo_ContractNextTokenIDs.Merge(m, src) 685 } 686 func (m *ContractNextTokenIDs) XXX_Size() int { 687 return m.Size() 688 } 689 func (m *ContractNextTokenIDs) XXX_DiscardUnknown() { 690 xxx_messageInfo_ContractNextTokenIDs.DiscardUnknown(m) 691 } 692 693 var xxx_messageInfo_ContractNextTokenIDs proto.InternalMessageInfo 694 695 func (m *ContractNextTokenIDs) GetContractId() string { 696 if m != nil { 697 return m.ContractId 698 } 699 return "" 700 } 701 702 func (m *ContractNextTokenIDs) GetTokenIds() []NextTokenID { 703 if m != nil { 704 return m.TokenIds 705 } 706 return nil 707 } 708 709 // NextTokenID defines the next (non-fungible) token id of the token class. 710 type NextTokenID struct { 711 // class id associated with the token class. 712 ClassId string `protobuf:"bytes,1,opt,name=class_id,json=classId,proto3" json:"class_id,omitempty"` 713 // id for the token. 714 Id github_com_Finschia_finschia_sdk_types.Uint `protobuf:"bytes,2,opt,name=id,proto3,customtype=github.com/Finschia/finschia-sdk/types.Uint" json:"id"` 715 } 716 717 func (m *NextTokenID) Reset() { *m = NextTokenID{} } 718 func (m *NextTokenID) String() string { return proto.CompactTextString(m) } 719 func (*NextTokenID) ProtoMessage() {} 720 func (*NextTokenID) Descriptor() ([]byte, []int) { 721 return fileDescriptor_2b8b3f666cffb1ec, []int{11} 722 } 723 func (m *NextTokenID) XXX_Unmarshal(b []byte) error { 724 return m.Unmarshal(b) 725 } 726 func (m *NextTokenID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 727 if deterministic { 728 return xxx_messageInfo_NextTokenID.Marshal(b, m, deterministic) 729 } else { 730 b = b[:cap(b)] 731 n, err := m.MarshalToSizedBuffer(b) 732 if err != nil { 733 return nil, err 734 } 735 return b[:n], nil 736 } 737 } 738 func (m *NextTokenID) XXX_Merge(src proto.Message) { 739 xxx_messageInfo_NextTokenID.Merge(m, src) 740 } 741 func (m *NextTokenID) XXX_Size() int { 742 return m.Size() 743 } 744 func (m *NextTokenID) XXX_DiscardUnknown() { 745 xxx_messageInfo_NextTokenID.DiscardUnknown(m) 746 } 747 748 var xxx_messageInfo_NextTokenID proto.InternalMessageInfo 749 750 func (m *NextTokenID) GetClassId() string { 751 if m != nil { 752 return m.ClassId 753 } 754 return "" 755 } 756 757 // ContractTokenRelations defines token relations belong to a contract. 758 type ContractTokenRelations struct { 759 // contract id associated with the contract. 760 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 761 // relations 762 Relations []TokenRelation `protobuf:"bytes,2,rep,name=relations,proto3" json:"relations"` 763 } 764 765 func (m *ContractTokenRelations) Reset() { *m = ContractTokenRelations{} } 766 func (m *ContractTokenRelations) String() string { return proto.CompactTextString(m) } 767 func (*ContractTokenRelations) ProtoMessage() {} 768 func (*ContractTokenRelations) Descriptor() ([]byte, []int) { 769 return fileDescriptor_2b8b3f666cffb1ec, []int{12} 770 } 771 func (m *ContractTokenRelations) XXX_Unmarshal(b []byte) error { 772 return m.Unmarshal(b) 773 } 774 func (m *ContractTokenRelations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 775 if deterministic { 776 return xxx_messageInfo_ContractTokenRelations.Marshal(b, m, deterministic) 777 } else { 778 b = b[:cap(b)] 779 n, err := m.MarshalToSizedBuffer(b) 780 if err != nil { 781 return nil, err 782 } 783 return b[:n], nil 784 } 785 } 786 func (m *ContractTokenRelations) XXX_Merge(src proto.Message) { 787 xxx_messageInfo_ContractTokenRelations.Merge(m, src) 788 } 789 func (m *ContractTokenRelations) XXX_Size() int { 790 return m.Size() 791 } 792 func (m *ContractTokenRelations) XXX_DiscardUnknown() { 793 xxx_messageInfo_ContractTokenRelations.DiscardUnknown(m) 794 } 795 796 var xxx_messageInfo_ContractTokenRelations proto.InternalMessageInfo 797 798 func (m *ContractTokenRelations) GetContractId() string { 799 if m != nil { 800 return m.ContractId 801 } 802 return "" 803 } 804 805 func (m *ContractTokenRelations) GetRelations() []TokenRelation { 806 if m != nil { 807 return m.Relations 808 } 809 return nil 810 } 811 812 // TokenRelation defines relations between two tokens. 813 type TokenRelation struct { 814 // self 815 Self string `protobuf:"bytes,1,opt,name=self,proto3" json:"self,omitempty"` 816 // other 817 Other string `protobuf:"bytes,2,opt,name=other,proto3" json:"other,omitempty"` 818 } 819 820 func (m *TokenRelation) Reset() { *m = TokenRelation{} } 821 func (m *TokenRelation) String() string { return proto.CompactTextString(m) } 822 func (*TokenRelation) ProtoMessage() {} 823 func (*TokenRelation) Descriptor() ([]byte, []int) { 824 return fileDescriptor_2b8b3f666cffb1ec, []int{13} 825 } 826 func (m *TokenRelation) XXX_Unmarshal(b []byte) error { 827 return m.Unmarshal(b) 828 } 829 func (m *TokenRelation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 830 if deterministic { 831 return xxx_messageInfo_TokenRelation.Marshal(b, m, deterministic) 832 } else { 833 b = b[:cap(b)] 834 n, err := m.MarshalToSizedBuffer(b) 835 if err != nil { 836 return nil, err 837 } 838 return b[:n], nil 839 } 840 } 841 func (m *TokenRelation) XXX_Merge(src proto.Message) { 842 xxx_messageInfo_TokenRelation.Merge(m, src) 843 } 844 func (m *TokenRelation) XXX_Size() int { 845 return m.Size() 846 } 847 func (m *TokenRelation) XXX_DiscardUnknown() { 848 xxx_messageInfo_TokenRelation.DiscardUnknown(m) 849 } 850 851 var xxx_messageInfo_TokenRelation proto.InternalMessageInfo 852 853 func (m *TokenRelation) GetSelf() string { 854 if m != nil { 855 return m.Self 856 } 857 return "" 858 } 859 860 func (m *TokenRelation) GetOther() string { 861 if m != nil { 862 return m.Other 863 } 864 return "" 865 } 866 867 func init() { 868 proto.RegisterType((*GenesisState)(nil), "lbm.collection.v1.GenesisState") 869 proto.RegisterType((*ContractBalances)(nil), "lbm.collection.v1.ContractBalances") 870 proto.RegisterType((*ContractStatistics)(nil), "lbm.collection.v1.ContractStatistics") 871 proto.RegisterType((*ClassStatistics)(nil), "lbm.collection.v1.ClassStatistics") 872 proto.RegisterType((*Balance)(nil), "lbm.collection.v1.Balance") 873 proto.RegisterType((*ContractClasses)(nil), "lbm.collection.v1.ContractClasses") 874 proto.RegisterType((*ContractNFTs)(nil), "lbm.collection.v1.ContractNFTs") 875 proto.RegisterType((*ContractAuthorizations)(nil), "lbm.collection.v1.ContractAuthorizations") 876 proto.RegisterType((*ContractGrants)(nil), "lbm.collection.v1.ContractGrants") 877 proto.RegisterType((*NextClassIDs)(nil), "lbm.collection.v1.NextClassIDs") 878 proto.RegisterType((*ContractNextTokenIDs)(nil), "lbm.collection.v1.ContractNextTokenIDs") 879 proto.RegisterType((*NextTokenID)(nil), "lbm.collection.v1.NextTokenID") 880 proto.RegisterType((*ContractTokenRelations)(nil), "lbm.collection.v1.ContractTokenRelations") 881 proto.RegisterType((*TokenRelation)(nil), "lbm.collection.v1.TokenRelation") 882 } 883 884 func init() { proto.RegisterFile("lbm/collection/v1/genesis.proto", fileDescriptor_2b8b3f666cffb1ec) } 885 886 var fileDescriptor_2b8b3f666cffb1ec = []byte{ 887 // 919 bytes of a gzipped FileDescriptorProto 888 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4f, 0x6f, 0x1b, 0x45, 889 0x14, 0x8f, 0x13, 0xc7, 0x7f, 0x9e, 0xdd, 0x14, 0x46, 0x51, 0xd9, 0x04, 0xc9, 0x0e, 0x8b, 0x10, 890 0x05, 0x94, 0x5d, 0x9a, 0x4a, 0xa0, 0x22, 0x44, 0x15, 0xbb, 0x24, 0x18, 0xa4, 0x82, 0xdc, 0x00, 891 0x12, 0x17, 0x6b, 0xbc, 0x3b, 0x76, 0x46, 0x5d, 0xcf, 0x98, 0x9d, 0x71, 0x94, 0xf4, 0xd2, 0x33, 892 0x37, 0x3e, 0x02, 0x67, 0xce, 0x7c, 0x88, 0x8a, 0x53, 0x8f, 0x15, 0x87, 0x82, 0x92, 0x0b, 0x1f, 893 0x03, 0xed, 0xcc, 0xec, 0x7a, 0x6d, 0x6f, 0x76, 0x81, 0xde, 0x76, 0x66, 0x7e, 0x7f, 0xde, 0x3c, 894 0xbf, 0xf7, 0xc6, 0xd0, 0x0e, 0x86, 0x13, 0xd7, 0xe3, 0x41, 0x40, 0x3c, 0x49, 0x39, 0x73, 0xcf, 895 0xee, 0xb8, 0x63, 0xc2, 0x88, 0xa0, 0xc2, 0x99, 0x86, 0x5c, 0x72, 0xf4, 0x7a, 0x30, 0x9c, 0x38, 896 0x73, 0x80, 0x73, 0x76, 0x67, 0x77, 0x67, 0xcc, 0xf9, 0x38, 0x20, 0xae, 0x02, 0x0c, 0x67, 0x23, 897 0x17, 0xb3, 0x0b, 0x8d, 0xde, 0xdd, 0x1e, 0xf3, 0x31, 0x57, 0x9f, 0x6e, 0xf4, 0x65, 0x76, 0x77, 898 0x3c, 0x2e, 0x26, 0x5c, 0x0c, 0xf4, 0x81, 0x5e, 0x98, 0x23, 0x7b, 0xd5, 0x3f, 0x65, 0xa6, 0x30, 899 0xf6, 0x55, 0x05, 0x9a, 0xc7, 0x3a, 0xa8, 0x47, 0x12, 0x4b, 0x82, 0x3e, 0x86, 0xca, 0x14, 0x87, 900 0x78, 0x22, 0xac, 0xd2, 0x5e, 0xe9, 0x76, 0xe3, 0x60, 0xc7, 0x59, 0x09, 0xd2, 0xf9, 0x46, 0x01, 901 0x3a, 0xe5, 0x67, 0x2f, 0xdb, 0x6b, 0x7d, 0x03, 0x47, 0xf7, 0xa1, 0xee, 0x71, 0x26, 0x43, 0xec, 902 0x49, 0x61, 0xad, 0xef, 0x6d, 0xdc, 0x6e, 0x1c, 0xbc, 0x99, 0xc1, 0xed, 0x1a, 0x8c, 0x61, 0xcf, 903 0x39, 0xe8, 0x2b, 0xd8, 0x62, 0xe4, 0x5c, 0x0e, 0xbc, 0x00, 0x0b, 0x31, 0xa0, 0xbe, 0xb0, 0x36, 904 0x94, 0x4a, 0x3b, 0x43, 0xe5, 0x21, 0x39, 0x97, 0xdd, 0x08, 0xd7, 0x7b, 0x10, 0xc7, 0xd1, 0x64, 905 0xc9, 0x9e, 0x2f, 0x50, 0x07, 0xaa, 0x4a, 0x87, 0x08, 0xab, 0xac, 0x54, 0xec, 0x9c, 0x58, 0xba, 906 0x1a, 0x69, 0x84, 0x62, 0x22, 0x7a, 0x64, 0x02, 0x92, 0xfc, 0x31, 0x61, 0x2a, 0xa0, 0x4d, 0x25, 907 0xf5, 0x6e, 0x8e, 0x54, 0x14, 0xd8, 0x49, 0x84, 0x5f, 0x0a, 0x4c, 0xef, 0xf9, 0x02, 0x7d, 0x0e, 908 0xb5, 0x21, 0x0e, 0x30, 0xf3, 0x88, 0xb0, 0x2a, 0x4a, 0xee, 0xed, 0xbc, 0x2c, 0x19, 0xa8, 0x91, 909 0x4a, 0xa8, 0xe8, 0x1e, 0x94, 0xd9, 0x48, 0x0a, 0xab, 0x7a, 0x6d, 0x8a, 0x92, 0x88, 0x8e, 0x4e, 910 0x62, 0xba, 0xa2, 0xa0, 0x1e, 0x54, 0xa7, 0x38, 0x24, 0x4c, 0x0a, 0xab, 0xa6, 0xd8, 0xef, 0xe5, 911 0xb0, 0x55, 0xdc, 0x7d, 0x12, 0xe0, 0xe8, 0x20, 0xc9, 0x90, 0xe1, 0xa3, 0xfb, 0x50, 0x19, 0x87, 912 0x38, 0x52, 0xaa, 0x2b, 0xa5, 0xb7, 0x72, 0x94, 0x8e, 0x15, 0x30, 0x2e, 0x1a, 0x4d, 0x43, 0xdf, 913 0xc3, 0x16, 0x9e, 0xc9, 0x53, 0x1e, 0xd2, 0x27, 0xda, 0xc1, 0x82, 0xc2, 0x90, 0x0e, 0x17, 0x08, 914 0x46, 0x70, 0x49, 0x06, 0x1d, 0x43, 0x4d, 0xcc, 0xa6, 0xd3, 0x80, 0x12, 0x61, 0x35, 0x94, 0xe4, 915 0x3b, 0x39, 0x92, 0x51, 0xe9, 0x53, 0x21, 0xa9, 0x97, 0x24, 0x3a, 0x26, 0xa3, 0x2e, 0x54, 0x86, 916 0xb3, 0x30, 0xba, 0x62, 0xf3, 0xbf, 0xcb, 0x18, 0xaa, 0xfd, 0x23, 0xbc, 0xb6, 0xfc, 0x8b, 0xa2, 917 0x36, 0x34, 0xe2, 0xda, 0x1f, 0x50, 0x5f, 0x75, 0x5b, 0xbd, 0x0f, 0xf1, 0x56, 0xcf, 0x47, 0x9f, 918 0xa6, 0x2a, 0x45, 0xf7, 0xd3, 0x6e, 0x86, 0xb7, 0xd1, 0x5b, 0x2e, 0x10, 0xfb, 0x29, 0xa0, 0xd5, 919 0xb0, 0x8a, 0x4d, 0xbf, 0x00, 0x10, 0x09, 0xdc, 0xd8, 0x66, 0xb6, 0x4e, 0xd4, 0x23, 0x2b, 0xf7, 920 0x4d, 0x71, 0xed, 0x73, 0xb8, 0xb9, 0x04, 0x42, 0x3b, 0x50, 0x8b, 0x9b, 0xdb, 0x58, 0xeb, 0x5e, 921 0xeb, 0xf9, 0xe8, 0x4b, 0xa8, 0xe0, 0x09, 0x9f, 0x31, 0x69, 0xad, 0x47, 0x07, 0x9d, 0x83, 0x48, 922 0xef, 0x8f, 0x97, 0xed, 0xf7, 0xc7, 0x54, 0x9e, 0xce, 0x86, 0x8e, 0xc7, 0x27, 0xee, 0x11, 0x65, 923 0xc2, 0x3b, 0xa5, 0xd8, 0x1d, 0x99, 0x8f, 0x7d, 0xe1, 0x3f, 0x76, 0xe5, 0xc5, 0x94, 0x08, 0xa7, 924 0xc7, 0x64, 0xdf, 0x28, 0xd8, 0x14, 0xaa, 0x26, 0x2b, 0xc8, 0x82, 0x2a, 0xf6, 0xfd, 0x90, 0x08, 925 0x11, 0x1b, 0x9a, 0x25, 0xfa, 0x2c, 0x65, 0x18, 0x5d, 0xf2, 0x8d, 0xcc, 0xdf, 0x95, 0xb2, 0xce, 926 0x8d, 0x28, 0x92, 0x5f, 0xff, 0x6c, 0x6f, 0x46, 0x2b, 0x11, 0x9b, 0x7c, 0x52, 0xfe, 0xfb, 0x97, 927 0x76, 0xc9, 0x3e, 0x83, 0x9b, 0x4b, 0x43, 0xa4, 0x38, 0xc5, 0xa9, 0xd1, 0xa4, 0xad, 0xb7, 0x1d, 928 0x3d, 0xf4, 0x9d, 0x78, 0xe8, 0x3b, 0x87, 0xec, 0xa2, 0x83, 0x22, 0xdf, 0xdf, 0x7f, 0xdb, 0x07, 929 0xd5, 0x82, 0x4a, 0x3d, 0x19, 0x4d, 0x36, 0x86, 0x66, 0xba, 0xbf, 0x8b, 0x4d, 0x3f, 0x34, 0xf3, 930 0x42, 0x3b, 0xde, 0xca, 0x1a, 0xa9, 0x47, 0x27, 0xe9, 0x31, 0x61, 0xff, 0x54, 0x82, 0x5b, 0xd9, 931 0x2d, 0x57, 0xec, 0xf6, 0x70, 0xa5, 0xad, 0xb5, 0xef, 0x5e, 0x86, 0xef, 0x82, 0x76, 0x76, 0x37, 932 0xdb, 0x14, 0xb6, 0x16, 0xc7, 0x48, 0x71, 0x08, 0x1f, 0x25, 0xa3, 0x49, 0x5b, 0x5b, 0x19, 0xd6, 933 0x4a, 0x6b, 0x71, 0x22, 0xd9, 0x2f, 0x4a, 0xd0, 0x4c, 0xbf, 0x2e, 0xc5, 0x4e, 0x5f, 0x43, 0x6d, 934 0x34, 0x63, 0x63, 0x3a, 0x0c, 0x88, 0x29, 0xde, 0xbb, 0xa6, 0x78, 0x3f, 0xf8, 0x97, 0xc5, 0xfb, 935 0x2d, 0x65, 0xb2, 0x9f, 0x88, 0xa0, 0xef, 0xa0, 0xc9, 0x38, 0x1b, 0x24, 0xa2, 0x1b, 0xff, 0x5f, 936 0xb4, 0xc1, 0x38, 0x3b, 0x32, 0x3a, 0xf6, 0x13, 0xd8, 0xce, 0x7a, 0xa6, 0x8a, 0x6f, 0x78, 0x08, 937 0xf5, 0xf9, 0x1b, 0xa8, 0xd3, 0xd9, 0xba, 0xe6, 0x51, 0x36, 0xa2, 0xf1, 0x38, 0x92, 0xe6, 0xd9, 938 0xb3, 0x27, 0xd0, 0x48, 0x1d, 0xe7, 0x4d, 0x82, 0x2e, 0xac, 0x53, 0xff, 0x55, 0x12, 0xb9, 0x4e, 939 0x7d, 0xfb, 0xe9, 0xbc, 0x76, 0x17, 0x5f, 0xb0, 0xe2, 0xcb, 0x3e, 0x80, 0x7a, 0x18, 0xa3, 0x73, 940 0xca, 0x76, 0x41, 0x36, 0xfe, 0x33, 0x93, 0x10, 0xed, 0x7b, 0x70, 0x63, 0x01, 0x81, 0x10, 0x94, 941 0x05, 0x09, 0x46, 0xc6, 0x50, 0x7d, 0xa3, 0x6d, 0xd8, 0xe4, 0xf2, 0x94, 0x84, 0xfa, 0xb6, 0x7d, 942 0xbd, 0xe8, 0x1c, 0x3f, 0xbb, 0x6c, 0x95, 0x9e, 0x5f, 0xb6, 0x4a, 0x7f, 0x5d, 0xb6, 0x4a, 0x3f, 943 0x5f, 0xb5, 0xd6, 0x9e, 0x5f, 0xb5, 0xd6, 0x5e, 0x5c, 0xb5, 0xd6, 0x7e, 0xd8, 0x2f, 0x4c, 0xc3, 944 0x79, 0xea, 0x1f, 0xde, 0xb0, 0xa2, 0xe6, 0xc9, 0xdd, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x75, 945 0x7b, 0xf5, 0x84, 0x88, 0x0a, 0x00, 0x00, 946 } 947 948 func (this *Balance) Equal(that interface{}) bool { 949 if that == nil { 950 return this == nil 951 } 952 953 that1, ok := that.(*Balance) 954 if !ok { 955 that2, ok := that.(Balance) 956 if ok { 957 that1 = &that2 958 } else { 959 return false 960 } 961 } 962 if that1 == nil { 963 return this == nil 964 } else if this == nil { 965 return false 966 } 967 if this.Address != that1.Address { 968 return false 969 } 970 if len(this.Amount) != len(that1.Amount) { 971 return false 972 } 973 for i := range this.Amount { 974 if !this.Amount[i].Equal(&that1.Amount[i]) { 975 return false 976 } 977 } 978 return true 979 } 980 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 981 size := m.Size() 982 dAtA = make([]byte, size) 983 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 984 if err != nil { 985 return nil, err 986 } 987 return dAtA[:n], nil 988 } 989 990 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 991 size := m.Size() 992 return m.MarshalToSizedBuffer(dAtA[:size]) 993 } 994 995 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 996 i := len(dAtA) 997 _ = i 998 var l int 999 _ = l 1000 if len(m.Burnts) > 0 { 1001 for iNdEx := len(m.Burnts) - 1; iNdEx >= 0; iNdEx-- { 1002 { 1003 size, err := m.Burnts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1004 if err != nil { 1005 return 0, err 1006 } 1007 i -= size 1008 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1009 } 1010 i-- 1011 dAtA[i] = 0x62 1012 } 1013 } 1014 if len(m.Supplies) > 0 { 1015 for iNdEx := len(m.Supplies) - 1; iNdEx >= 0; iNdEx-- { 1016 { 1017 size, err := m.Supplies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1018 if err != nil { 1019 return 0, err 1020 } 1021 i -= size 1022 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1023 } 1024 i-- 1025 dAtA[i] = 0x5a 1026 } 1027 } 1028 if len(m.Authorizations) > 0 { 1029 for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { 1030 { 1031 size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1032 if err != nil { 1033 return 0, err 1034 } 1035 i -= size 1036 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1037 } 1038 i-- 1039 dAtA[i] = 0x52 1040 } 1041 } 1042 if len(m.Grants) > 0 { 1043 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 1044 { 1045 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1046 if err != nil { 1047 return 0, err 1048 } 1049 i -= size 1050 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1051 } 1052 i-- 1053 dAtA[i] = 0x4a 1054 } 1055 } 1056 if len(m.Parents) > 0 { 1057 for iNdEx := len(m.Parents) - 1; iNdEx >= 0; iNdEx-- { 1058 { 1059 size, err := m.Parents[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1060 if err != nil { 1061 return 0, err 1062 } 1063 i -= size 1064 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1065 } 1066 i-- 1067 dAtA[i] = 0x42 1068 } 1069 } 1070 if len(m.Nfts) > 0 { 1071 for iNdEx := len(m.Nfts) - 1; iNdEx >= 0; iNdEx-- { 1072 { 1073 size, err := m.Nfts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1074 if err != nil { 1075 return 0, err 1076 } 1077 i -= size 1078 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1079 } 1080 i-- 1081 dAtA[i] = 0x3a 1082 } 1083 } 1084 if len(m.Balances) > 0 { 1085 for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { 1086 { 1087 size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1088 if err != nil { 1089 return 0, err 1090 } 1091 i -= size 1092 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1093 } 1094 i-- 1095 dAtA[i] = 0x32 1096 } 1097 } 1098 if len(m.NextTokenIds) > 0 { 1099 for iNdEx := len(m.NextTokenIds) - 1; iNdEx >= 0; iNdEx-- { 1100 { 1101 size, err := m.NextTokenIds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1102 if err != nil { 1103 return 0, err 1104 } 1105 i -= size 1106 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1107 } 1108 i-- 1109 dAtA[i] = 0x2a 1110 } 1111 } 1112 if len(m.Classes) > 0 { 1113 for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- { 1114 { 1115 size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1116 if err != nil { 1117 return 0, err 1118 } 1119 i -= size 1120 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1121 } 1122 i-- 1123 dAtA[i] = 0x22 1124 } 1125 } 1126 if len(m.NextClassIds) > 0 { 1127 for iNdEx := len(m.NextClassIds) - 1; iNdEx >= 0; iNdEx-- { 1128 { 1129 size, err := m.NextClassIds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1130 if err != nil { 1131 return 0, err 1132 } 1133 i -= size 1134 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1135 } 1136 i-- 1137 dAtA[i] = 0x1a 1138 } 1139 } 1140 if len(m.Contracts) > 0 { 1141 for iNdEx := len(m.Contracts) - 1; iNdEx >= 0; iNdEx-- { 1142 { 1143 size, err := m.Contracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1144 if err != nil { 1145 return 0, err 1146 } 1147 i -= size 1148 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1149 } 1150 i-- 1151 dAtA[i] = 0x12 1152 } 1153 } 1154 { 1155 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 1156 if err != nil { 1157 return 0, err 1158 } 1159 i -= size 1160 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1161 } 1162 i-- 1163 dAtA[i] = 0xa 1164 return len(dAtA) - i, nil 1165 } 1166 1167 func (m *ContractBalances) Marshal() (dAtA []byte, err error) { 1168 size := m.Size() 1169 dAtA = make([]byte, size) 1170 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1171 if err != nil { 1172 return nil, err 1173 } 1174 return dAtA[:n], nil 1175 } 1176 1177 func (m *ContractBalances) MarshalTo(dAtA []byte) (int, error) { 1178 size := m.Size() 1179 return m.MarshalToSizedBuffer(dAtA[:size]) 1180 } 1181 1182 func (m *ContractBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1183 i := len(dAtA) 1184 _ = i 1185 var l int 1186 _ = l 1187 if len(m.Balances) > 0 { 1188 for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { 1189 { 1190 size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1191 if err != nil { 1192 return 0, err 1193 } 1194 i -= size 1195 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1196 } 1197 i-- 1198 dAtA[i] = 0x12 1199 } 1200 } 1201 if len(m.ContractId) > 0 { 1202 i -= len(m.ContractId) 1203 copy(dAtA[i:], m.ContractId) 1204 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1205 i-- 1206 dAtA[i] = 0xa 1207 } 1208 return len(dAtA) - i, nil 1209 } 1210 1211 func (m *ContractStatistics) Marshal() (dAtA []byte, err error) { 1212 size := m.Size() 1213 dAtA = make([]byte, size) 1214 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1215 if err != nil { 1216 return nil, err 1217 } 1218 return dAtA[:n], nil 1219 } 1220 1221 func (m *ContractStatistics) MarshalTo(dAtA []byte) (int, error) { 1222 size := m.Size() 1223 return m.MarshalToSizedBuffer(dAtA[:size]) 1224 } 1225 1226 func (m *ContractStatistics) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1227 i := len(dAtA) 1228 _ = i 1229 var l int 1230 _ = l 1231 if len(m.Statistics) > 0 { 1232 for iNdEx := len(m.Statistics) - 1; iNdEx >= 0; iNdEx-- { 1233 { 1234 size, err := m.Statistics[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1235 if err != nil { 1236 return 0, err 1237 } 1238 i -= size 1239 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1240 } 1241 i-- 1242 dAtA[i] = 0x12 1243 } 1244 } 1245 if len(m.ContractId) > 0 { 1246 i -= len(m.ContractId) 1247 copy(dAtA[i:], m.ContractId) 1248 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1249 i-- 1250 dAtA[i] = 0xa 1251 } 1252 return len(dAtA) - i, nil 1253 } 1254 1255 func (m *ClassStatistics) Marshal() (dAtA []byte, err error) { 1256 size := m.Size() 1257 dAtA = make([]byte, size) 1258 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1259 if err != nil { 1260 return nil, err 1261 } 1262 return dAtA[:n], nil 1263 } 1264 1265 func (m *ClassStatistics) MarshalTo(dAtA []byte) (int, error) { 1266 size := m.Size() 1267 return m.MarshalToSizedBuffer(dAtA[:size]) 1268 } 1269 1270 func (m *ClassStatistics) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1271 i := len(dAtA) 1272 _ = i 1273 var l int 1274 _ = l 1275 { 1276 size := m.Amount.Size() 1277 i -= size 1278 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 1279 return 0, err 1280 } 1281 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1282 } 1283 i-- 1284 dAtA[i] = 0x12 1285 if len(m.ClassId) > 0 { 1286 i -= len(m.ClassId) 1287 copy(dAtA[i:], m.ClassId) 1288 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ClassId))) 1289 i-- 1290 dAtA[i] = 0xa 1291 } 1292 return len(dAtA) - i, nil 1293 } 1294 1295 func (m *Balance) Marshal() (dAtA []byte, err error) { 1296 size := m.Size() 1297 dAtA = make([]byte, size) 1298 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1299 if err != nil { 1300 return nil, err 1301 } 1302 return dAtA[:n], nil 1303 } 1304 1305 func (m *Balance) MarshalTo(dAtA []byte) (int, error) { 1306 size := m.Size() 1307 return m.MarshalToSizedBuffer(dAtA[:size]) 1308 } 1309 1310 func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1311 i := len(dAtA) 1312 _ = i 1313 var l int 1314 _ = l 1315 if len(m.Amount) > 0 { 1316 for iNdEx := len(m.Amount) - 1; iNdEx >= 0; iNdEx-- { 1317 { 1318 size, err := m.Amount[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1319 if err != nil { 1320 return 0, err 1321 } 1322 i -= size 1323 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1324 } 1325 i-- 1326 dAtA[i] = 0x12 1327 } 1328 } 1329 if len(m.Address) > 0 { 1330 i -= len(m.Address) 1331 copy(dAtA[i:], m.Address) 1332 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) 1333 i-- 1334 dAtA[i] = 0xa 1335 } 1336 return len(dAtA) - i, nil 1337 } 1338 1339 func (m *ContractClasses) Marshal() (dAtA []byte, err error) { 1340 size := m.Size() 1341 dAtA = make([]byte, size) 1342 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1343 if err != nil { 1344 return nil, err 1345 } 1346 return dAtA[:n], nil 1347 } 1348 1349 func (m *ContractClasses) MarshalTo(dAtA []byte) (int, error) { 1350 size := m.Size() 1351 return m.MarshalToSizedBuffer(dAtA[:size]) 1352 } 1353 1354 func (m *ContractClasses) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1355 i := len(dAtA) 1356 _ = i 1357 var l int 1358 _ = l 1359 if len(m.Classes) > 0 { 1360 for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- { 1361 { 1362 size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1363 if err != nil { 1364 return 0, err 1365 } 1366 i -= size 1367 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1368 } 1369 i-- 1370 dAtA[i] = 0x12 1371 } 1372 } 1373 if len(m.ContractId) > 0 { 1374 i -= len(m.ContractId) 1375 copy(dAtA[i:], m.ContractId) 1376 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1377 i-- 1378 dAtA[i] = 0xa 1379 } 1380 return len(dAtA) - i, nil 1381 } 1382 1383 func (m *ContractNFTs) Marshal() (dAtA []byte, err error) { 1384 size := m.Size() 1385 dAtA = make([]byte, size) 1386 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1387 if err != nil { 1388 return nil, err 1389 } 1390 return dAtA[:n], nil 1391 } 1392 1393 func (m *ContractNFTs) MarshalTo(dAtA []byte) (int, error) { 1394 size := m.Size() 1395 return m.MarshalToSizedBuffer(dAtA[:size]) 1396 } 1397 1398 func (m *ContractNFTs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1399 i := len(dAtA) 1400 _ = i 1401 var l int 1402 _ = l 1403 if len(m.Nfts) > 0 { 1404 for iNdEx := len(m.Nfts) - 1; iNdEx >= 0; iNdEx-- { 1405 { 1406 size, err := m.Nfts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1407 if err != nil { 1408 return 0, err 1409 } 1410 i -= size 1411 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1412 } 1413 i-- 1414 dAtA[i] = 0x12 1415 } 1416 } 1417 if len(m.ContractId) > 0 { 1418 i -= len(m.ContractId) 1419 copy(dAtA[i:], m.ContractId) 1420 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1421 i-- 1422 dAtA[i] = 0xa 1423 } 1424 return len(dAtA) - i, nil 1425 } 1426 1427 func (m *ContractAuthorizations) Marshal() (dAtA []byte, err error) { 1428 size := m.Size() 1429 dAtA = make([]byte, size) 1430 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1431 if err != nil { 1432 return nil, err 1433 } 1434 return dAtA[:n], nil 1435 } 1436 1437 func (m *ContractAuthorizations) MarshalTo(dAtA []byte) (int, error) { 1438 size := m.Size() 1439 return m.MarshalToSizedBuffer(dAtA[:size]) 1440 } 1441 1442 func (m *ContractAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1443 i := len(dAtA) 1444 _ = i 1445 var l int 1446 _ = l 1447 if len(m.Authorizations) > 0 { 1448 for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { 1449 { 1450 size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1451 if err != nil { 1452 return 0, err 1453 } 1454 i -= size 1455 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1456 } 1457 i-- 1458 dAtA[i] = 0x12 1459 } 1460 } 1461 if len(m.ContractId) > 0 { 1462 i -= len(m.ContractId) 1463 copy(dAtA[i:], m.ContractId) 1464 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1465 i-- 1466 dAtA[i] = 0xa 1467 } 1468 return len(dAtA) - i, nil 1469 } 1470 1471 func (m *ContractGrants) Marshal() (dAtA []byte, err error) { 1472 size := m.Size() 1473 dAtA = make([]byte, size) 1474 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1475 if err != nil { 1476 return nil, err 1477 } 1478 return dAtA[:n], nil 1479 } 1480 1481 func (m *ContractGrants) MarshalTo(dAtA []byte) (int, error) { 1482 size := m.Size() 1483 return m.MarshalToSizedBuffer(dAtA[:size]) 1484 } 1485 1486 func (m *ContractGrants) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1487 i := len(dAtA) 1488 _ = i 1489 var l int 1490 _ = l 1491 if len(m.Grants) > 0 { 1492 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 1493 { 1494 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1495 if err != nil { 1496 return 0, err 1497 } 1498 i -= size 1499 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1500 } 1501 i-- 1502 dAtA[i] = 0x12 1503 } 1504 } 1505 if len(m.ContractId) > 0 { 1506 i -= len(m.ContractId) 1507 copy(dAtA[i:], m.ContractId) 1508 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1509 i-- 1510 dAtA[i] = 0xa 1511 } 1512 return len(dAtA) - i, nil 1513 } 1514 1515 func (m *NextClassIDs) Marshal() (dAtA []byte, err error) { 1516 size := m.Size() 1517 dAtA = make([]byte, size) 1518 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1519 if err != nil { 1520 return nil, err 1521 } 1522 return dAtA[:n], nil 1523 } 1524 1525 func (m *NextClassIDs) MarshalTo(dAtA []byte) (int, error) { 1526 size := m.Size() 1527 return m.MarshalToSizedBuffer(dAtA[:size]) 1528 } 1529 1530 func (m *NextClassIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1531 i := len(dAtA) 1532 _ = i 1533 var l int 1534 _ = l 1535 { 1536 size := m.NonFungible.Size() 1537 i -= size 1538 if _, err := m.NonFungible.MarshalTo(dAtA[i:]); err != nil { 1539 return 0, err 1540 } 1541 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1542 } 1543 i-- 1544 dAtA[i] = 0x1a 1545 { 1546 size := m.Fungible.Size() 1547 i -= size 1548 if _, err := m.Fungible.MarshalTo(dAtA[i:]); err != nil { 1549 return 0, err 1550 } 1551 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1552 } 1553 i-- 1554 dAtA[i] = 0x12 1555 if len(m.ContractId) > 0 { 1556 i -= len(m.ContractId) 1557 copy(dAtA[i:], m.ContractId) 1558 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1559 i-- 1560 dAtA[i] = 0xa 1561 } 1562 return len(dAtA) - i, nil 1563 } 1564 1565 func (m *ContractNextTokenIDs) Marshal() (dAtA []byte, err error) { 1566 size := m.Size() 1567 dAtA = make([]byte, size) 1568 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1569 if err != nil { 1570 return nil, err 1571 } 1572 return dAtA[:n], nil 1573 } 1574 1575 func (m *ContractNextTokenIDs) MarshalTo(dAtA []byte) (int, error) { 1576 size := m.Size() 1577 return m.MarshalToSizedBuffer(dAtA[:size]) 1578 } 1579 1580 func (m *ContractNextTokenIDs) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1581 i := len(dAtA) 1582 _ = i 1583 var l int 1584 _ = l 1585 if len(m.TokenIds) > 0 { 1586 for iNdEx := len(m.TokenIds) - 1; iNdEx >= 0; iNdEx-- { 1587 { 1588 size, err := m.TokenIds[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1589 if err != nil { 1590 return 0, err 1591 } 1592 i -= size 1593 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1594 } 1595 i-- 1596 dAtA[i] = 0x12 1597 } 1598 } 1599 if len(m.ContractId) > 0 { 1600 i -= len(m.ContractId) 1601 copy(dAtA[i:], m.ContractId) 1602 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1603 i-- 1604 dAtA[i] = 0xa 1605 } 1606 return len(dAtA) - i, nil 1607 } 1608 1609 func (m *NextTokenID) Marshal() (dAtA []byte, err error) { 1610 size := m.Size() 1611 dAtA = make([]byte, size) 1612 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1613 if err != nil { 1614 return nil, err 1615 } 1616 return dAtA[:n], nil 1617 } 1618 1619 func (m *NextTokenID) MarshalTo(dAtA []byte) (int, error) { 1620 size := m.Size() 1621 return m.MarshalToSizedBuffer(dAtA[:size]) 1622 } 1623 1624 func (m *NextTokenID) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1625 i := len(dAtA) 1626 _ = i 1627 var l int 1628 _ = l 1629 { 1630 size := m.Id.Size() 1631 i -= size 1632 if _, err := m.Id.MarshalTo(dAtA[i:]); err != nil { 1633 return 0, err 1634 } 1635 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1636 } 1637 i-- 1638 dAtA[i] = 0x12 1639 if len(m.ClassId) > 0 { 1640 i -= len(m.ClassId) 1641 copy(dAtA[i:], m.ClassId) 1642 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ClassId))) 1643 i-- 1644 dAtA[i] = 0xa 1645 } 1646 return len(dAtA) - i, nil 1647 } 1648 1649 func (m *ContractTokenRelations) Marshal() (dAtA []byte, err error) { 1650 size := m.Size() 1651 dAtA = make([]byte, size) 1652 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1653 if err != nil { 1654 return nil, err 1655 } 1656 return dAtA[:n], nil 1657 } 1658 1659 func (m *ContractTokenRelations) MarshalTo(dAtA []byte) (int, error) { 1660 size := m.Size() 1661 return m.MarshalToSizedBuffer(dAtA[:size]) 1662 } 1663 1664 func (m *ContractTokenRelations) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1665 i := len(dAtA) 1666 _ = i 1667 var l int 1668 _ = l 1669 if len(m.Relations) > 0 { 1670 for iNdEx := len(m.Relations) - 1; iNdEx >= 0; iNdEx-- { 1671 { 1672 size, err := m.Relations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 1673 if err != nil { 1674 return 0, err 1675 } 1676 i -= size 1677 i = encodeVarintGenesis(dAtA, i, uint64(size)) 1678 } 1679 i-- 1680 dAtA[i] = 0x12 1681 } 1682 } 1683 if len(m.ContractId) > 0 { 1684 i -= len(m.ContractId) 1685 copy(dAtA[i:], m.ContractId) 1686 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 1687 i-- 1688 dAtA[i] = 0xa 1689 } 1690 return len(dAtA) - i, nil 1691 } 1692 1693 func (m *TokenRelation) Marshal() (dAtA []byte, err error) { 1694 size := m.Size() 1695 dAtA = make([]byte, size) 1696 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 1697 if err != nil { 1698 return nil, err 1699 } 1700 return dAtA[:n], nil 1701 } 1702 1703 func (m *TokenRelation) MarshalTo(dAtA []byte) (int, error) { 1704 size := m.Size() 1705 return m.MarshalToSizedBuffer(dAtA[:size]) 1706 } 1707 1708 func (m *TokenRelation) MarshalToSizedBuffer(dAtA []byte) (int, error) { 1709 i := len(dAtA) 1710 _ = i 1711 var l int 1712 _ = l 1713 if len(m.Other) > 0 { 1714 i -= len(m.Other) 1715 copy(dAtA[i:], m.Other) 1716 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Other))) 1717 i-- 1718 dAtA[i] = 0x12 1719 } 1720 if len(m.Self) > 0 { 1721 i -= len(m.Self) 1722 copy(dAtA[i:], m.Self) 1723 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Self))) 1724 i-- 1725 dAtA[i] = 0xa 1726 } 1727 return len(dAtA) - i, nil 1728 } 1729 1730 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 1731 offset -= sovGenesis(v) 1732 base := offset 1733 for v >= 1<<7 { 1734 dAtA[offset] = uint8(v&0x7f | 0x80) 1735 v >>= 7 1736 offset++ 1737 } 1738 dAtA[offset] = uint8(v) 1739 return base 1740 } 1741 func (m *GenesisState) Size() (n int) { 1742 if m == nil { 1743 return 0 1744 } 1745 var l int 1746 _ = l 1747 l = m.Params.Size() 1748 n += 1 + l + sovGenesis(uint64(l)) 1749 if len(m.Contracts) > 0 { 1750 for _, e := range m.Contracts { 1751 l = e.Size() 1752 n += 1 + l + sovGenesis(uint64(l)) 1753 } 1754 } 1755 if len(m.NextClassIds) > 0 { 1756 for _, e := range m.NextClassIds { 1757 l = e.Size() 1758 n += 1 + l + sovGenesis(uint64(l)) 1759 } 1760 } 1761 if len(m.Classes) > 0 { 1762 for _, e := range m.Classes { 1763 l = e.Size() 1764 n += 1 + l + sovGenesis(uint64(l)) 1765 } 1766 } 1767 if len(m.NextTokenIds) > 0 { 1768 for _, e := range m.NextTokenIds { 1769 l = e.Size() 1770 n += 1 + l + sovGenesis(uint64(l)) 1771 } 1772 } 1773 if len(m.Balances) > 0 { 1774 for _, e := range m.Balances { 1775 l = e.Size() 1776 n += 1 + l + sovGenesis(uint64(l)) 1777 } 1778 } 1779 if len(m.Nfts) > 0 { 1780 for _, e := range m.Nfts { 1781 l = e.Size() 1782 n += 1 + l + sovGenesis(uint64(l)) 1783 } 1784 } 1785 if len(m.Parents) > 0 { 1786 for _, e := range m.Parents { 1787 l = e.Size() 1788 n += 1 + l + sovGenesis(uint64(l)) 1789 } 1790 } 1791 if len(m.Grants) > 0 { 1792 for _, e := range m.Grants { 1793 l = e.Size() 1794 n += 1 + l + sovGenesis(uint64(l)) 1795 } 1796 } 1797 if len(m.Authorizations) > 0 { 1798 for _, e := range m.Authorizations { 1799 l = e.Size() 1800 n += 1 + l + sovGenesis(uint64(l)) 1801 } 1802 } 1803 if len(m.Supplies) > 0 { 1804 for _, e := range m.Supplies { 1805 l = e.Size() 1806 n += 1 + l + sovGenesis(uint64(l)) 1807 } 1808 } 1809 if len(m.Burnts) > 0 { 1810 for _, e := range m.Burnts { 1811 l = e.Size() 1812 n += 1 + l + sovGenesis(uint64(l)) 1813 } 1814 } 1815 return n 1816 } 1817 1818 func (m *ContractBalances) Size() (n int) { 1819 if m == nil { 1820 return 0 1821 } 1822 var l int 1823 _ = l 1824 l = len(m.ContractId) 1825 if l > 0 { 1826 n += 1 + l + sovGenesis(uint64(l)) 1827 } 1828 if len(m.Balances) > 0 { 1829 for _, e := range m.Balances { 1830 l = e.Size() 1831 n += 1 + l + sovGenesis(uint64(l)) 1832 } 1833 } 1834 return n 1835 } 1836 1837 func (m *ContractStatistics) Size() (n int) { 1838 if m == nil { 1839 return 0 1840 } 1841 var l int 1842 _ = l 1843 l = len(m.ContractId) 1844 if l > 0 { 1845 n += 1 + l + sovGenesis(uint64(l)) 1846 } 1847 if len(m.Statistics) > 0 { 1848 for _, e := range m.Statistics { 1849 l = e.Size() 1850 n += 1 + l + sovGenesis(uint64(l)) 1851 } 1852 } 1853 return n 1854 } 1855 1856 func (m *ClassStatistics) Size() (n int) { 1857 if m == nil { 1858 return 0 1859 } 1860 var l int 1861 _ = l 1862 l = len(m.ClassId) 1863 if l > 0 { 1864 n += 1 + l + sovGenesis(uint64(l)) 1865 } 1866 l = m.Amount.Size() 1867 n += 1 + l + sovGenesis(uint64(l)) 1868 return n 1869 } 1870 1871 func (m *Balance) Size() (n int) { 1872 if m == nil { 1873 return 0 1874 } 1875 var l int 1876 _ = l 1877 l = len(m.Address) 1878 if l > 0 { 1879 n += 1 + l + sovGenesis(uint64(l)) 1880 } 1881 if len(m.Amount) > 0 { 1882 for _, e := range m.Amount { 1883 l = e.Size() 1884 n += 1 + l + sovGenesis(uint64(l)) 1885 } 1886 } 1887 return n 1888 } 1889 1890 func (m *ContractClasses) Size() (n int) { 1891 if m == nil { 1892 return 0 1893 } 1894 var l int 1895 _ = l 1896 l = len(m.ContractId) 1897 if l > 0 { 1898 n += 1 + l + sovGenesis(uint64(l)) 1899 } 1900 if len(m.Classes) > 0 { 1901 for _, e := range m.Classes { 1902 l = e.Size() 1903 n += 1 + l + sovGenesis(uint64(l)) 1904 } 1905 } 1906 return n 1907 } 1908 1909 func (m *ContractNFTs) Size() (n int) { 1910 if m == nil { 1911 return 0 1912 } 1913 var l int 1914 _ = l 1915 l = len(m.ContractId) 1916 if l > 0 { 1917 n += 1 + l + sovGenesis(uint64(l)) 1918 } 1919 if len(m.Nfts) > 0 { 1920 for _, e := range m.Nfts { 1921 l = e.Size() 1922 n += 1 + l + sovGenesis(uint64(l)) 1923 } 1924 } 1925 return n 1926 } 1927 1928 func (m *ContractAuthorizations) Size() (n int) { 1929 if m == nil { 1930 return 0 1931 } 1932 var l int 1933 _ = l 1934 l = len(m.ContractId) 1935 if l > 0 { 1936 n += 1 + l + sovGenesis(uint64(l)) 1937 } 1938 if len(m.Authorizations) > 0 { 1939 for _, e := range m.Authorizations { 1940 l = e.Size() 1941 n += 1 + l + sovGenesis(uint64(l)) 1942 } 1943 } 1944 return n 1945 } 1946 1947 func (m *ContractGrants) Size() (n int) { 1948 if m == nil { 1949 return 0 1950 } 1951 var l int 1952 _ = l 1953 l = len(m.ContractId) 1954 if l > 0 { 1955 n += 1 + l + sovGenesis(uint64(l)) 1956 } 1957 if len(m.Grants) > 0 { 1958 for _, e := range m.Grants { 1959 l = e.Size() 1960 n += 1 + l + sovGenesis(uint64(l)) 1961 } 1962 } 1963 return n 1964 } 1965 1966 func (m *NextClassIDs) Size() (n int) { 1967 if m == nil { 1968 return 0 1969 } 1970 var l int 1971 _ = l 1972 l = len(m.ContractId) 1973 if l > 0 { 1974 n += 1 + l + sovGenesis(uint64(l)) 1975 } 1976 l = m.Fungible.Size() 1977 n += 1 + l + sovGenesis(uint64(l)) 1978 l = m.NonFungible.Size() 1979 n += 1 + l + sovGenesis(uint64(l)) 1980 return n 1981 } 1982 1983 func (m *ContractNextTokenIDs) Size() (n int) { 1984 if m == nil { 1985 return 0 1986 } 1987 var l int 1988 _ = l 1989 l = len(m.ContractId) 1990 if l > 0 { 1991 n += 1 + l + sovGenesis(uint64(l)) 1992 } 1993 if len(m.TokenIds) > 0 { 1994 for _, e := range m.TokenIds { 1995 l = e.Size() 1996 n += 1 + l + sovGenesis(uint64(l)) 1997 } 1998 } 1999 return n 2000 } 2001 2002 func (m *NextTokenID) Size() (n int) { 2003 if m == nil { 2004 return 0 2005 } 2006 var l int 2007 _ = l 2008 l = len(m.ClassId) 2009 if l > 0 { 2010 n += 1 + l + sovGenesis(uint64(l)) 2011 } 2012 l = m.Id.Size() 2013 n += 1 + l + sovGenesis(uint64(l)) 2014 return n 2015 } 2016 2017 func (m *ContractTokenRelations) Size() (n int) { 2018 if m == nil { 2019 return 0 2020 } 2021 var l int 2022 _ = l 2023 l = len(m.ContractId) 2024 if l > 0 { 2025 n += 1 + l + sovGenesis(uint64(l)) 2026 } 2027 if len(m.Relations) > 0 { 2028 for _, e := range m.Relations { 2029 l = e.Size() 2030 n += 1 + l + sovGenesis(uint64(l)) 2031 } 2032 } 2033 return n 2034 } 2035 2036 func (m *TokenRelation) Size() (n int) { 2037 if m == nil { 2038 return 0 2039 } 2040 var l int 2041 _ = l 2042 l = len(m.Self) 2043 if l > 0 { 2044 n += 1 + l + sovGenesis(uint64(l)) 2045 } 2046 l = len(m.Other) 2047 if l > 0 { 2048 n += 1 + l + sovGenesis(uint64(l)) 2049 } 2050 return n 2051 } 2052 2053 func sovGenesis(x uint64) (n int) { 2054 return (math_bits.Len64(x|1) + 6) / 7 2055 } 2056 func sozGenesis(x uint64) (n int) { 2057 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 2058 } 2059 func (m *GenesisState) Unmarshal(dAtA []byte) error { 2060 l := len(dAtA) 2061 iNdEx := 0 2062 for iNdEx < l { 2063 preIndex := iNdEx 2064 var wire uint64 2065 for shift := uint(0); ; shift += 7 { 2066 if shift >= 64 { 2067 return ErrIntOverflowGenesis 2068 } 2069 if iNdEx >= l { 2070 return io.ErrUnexpectedEOF 2071 } 2072 b := dAtA[iNdEx] 2073 iNdEx++ 2074 wire |= uint64(b&0x7F) << shift 2075 if b < 0x80 { 2076 break 2077 } 2078 } 2079 fieldNum := int32(wire >> 3) 2080 wireType := int(wire & 0x7) 2081 if wireType == 4 { 2082 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 2083 } 2084 if fieldNum <= 0 { 2085 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 2086 } 2087 switch fieldNum { 2088 case 1: 2089 if wireType != 2 { 2090 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 2091 } 2092 var msglen int 2093 for shift := uint(0); ; shift += 7 { 2094 if shift >= 64 { 2095 return ErrIntOverflowGenesis 2096 } 2097 if iNdEx >= l { 2098 return io.ErrUnexpectedEOF 2099 } 2100 b := dAtA[iNdEx] 2101 iNdEx++ 2102 msglen |= int(b&0x7F) << shift 2103 if b < 0x80 { 2104 break 2105 } 2106 } 2107 if msglen < 0 { 2108 return ErrInvalidLengthGenesis 2109 } 2110 postIndex := iNdEx + msglen 2111 if postIndex < 0 { 2112 return ErrInvalidLengthGenesis 2113 } 2114 if postIndex > l { 2115 return io.ErrUnexpectedEOF 2116 } 2117 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2118 return err 2119 } 2120 iNdEx = postIndex 2121 case 2: 2122 if wireType != 2 { 2123 return fmt.Errorf("proto: wrong wireType = %d for field Contracts", wireType) 2124 } 2125 var msglen int 2126 for shift := uint(0); ; shift += 7 { 2127 if shift >= 64 { 2128 return ErrIntOverflowGenesis 2129 } 2130 if iNdEx >= l { 2131 return io.ErrUnexpectedEOF 2132 } 2133 b := dAtA[iNdEx] 2134 iNdEx++ 2135 msglen |= int(b&0x7F) << shift 2136 if b < 0x80 { 2137 break 2138 } 2139 } 2140 if msglen < 0 { 2141 return ErrInvalidLengthGenesis 2142 } 2143 postIndex := iNdEx + msglen 2144 if postIndex < 0 { 2145 return ErrInvalidLengthGenesis 2146 } 2147 if postIndex > l { 2148 return io.ErrUnexpectedEOF 2149 } 2150 m.Contracts = append(m.Contracts, Contract{}) 2151 if err := m.Contracts[len(m.Contracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2152 return err 2153 } 2154 iNdEx = postIndex 2155 case 3: 2156 if wireType != 2 { 2157 return fmt.Errorf("proto: wrong wireType = %d for field NextClassIds", wireType) 2158 } 2159 var msglen int 2160 for shift := uint(0); ; shift += 7 { 2161 if shift >= 64 { 2162 return ErrIntOverflowGenesis 2163 } 2164 if iNdEx >= l { 2165 return io.ErrUnexpectedEOF 2166 } 2167 b := dAtA[iNdEx] 2168 iNdEx++ 2169 msglen |= int(b&0x7F) << shift 2170 if b < 0x80 { 2171 break 2172 } 2173 } 2174 if msglen < 0 { 2175 return ErrInvalidLengthGenesis 2176 } 2177 postIndex := iNdEx + msglen 2178 if postIndex < 0 { 2179 return ErrInvalidLengthGenesis 2180 } 2181 if postIndex > l { 2182 return io.ErrUnexpectedEOF 2183 } 2184 m.NextClassIds = append(m.NextClassIds, NextClassIDs{}) 2185 if err := m.NextClassIds[len(m.NextClassIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2186 return err 2187 } 2188 iNdEx = postIndex 2189 case 4: 2190 if wireType != 2 { 2191 return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) 2192 } 2193 var msglen int 2194 for shift := uint(0); ; shift += 7 { 2195 if shift >= 64 { 2196 return ErrIntOverflowGenesis 2197 } 2198 if iNdEx >= l { 2199 return io.ErrUnexpectedEOF 2200 } 2201 b := dAtA[iNdEx] 2202 iNdEx++ 2203 msglen |= int(b&0x7F) << shift 2204 if b < 0x80 { 2205 break 2206 } 2207 } 2208 if msglen < 0 { 2209 return ErrInvalidLengthGenesis 2210 } 2211 postIndex := iNdEx + msglen 2212 if postIndex < 0 { 2213 return ErrInvalidLengthGenesis 2214 } 2215 if postIndex > l { 2216 return io.ErrUnexpectedEOF 2217 } 2218 m.Classes = append(m.Classes, ContractClasses{}) 2219 if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2220 return err 2221 } 2222 iNdEx = postIndex 2223 case 5: 2224 if wireType != 2 { 2225 return fmt.Errorf("proto: wrong wireType = %d for field NextTokenIds", wireType) 2226 } 2227 var msglen int 2228 for shift := uint(0); ; shift += 7 { 2229 if shift >= 64 { 2230 return ErrIntOverflowGenesis 2231 } 2232 if iNdEx >= l { 2233 return io.ErrUnexpectedEOF 2234 } 2235 b := dAtA[iNdEx] 2236 iNdEx++ 2237 msglen |= int(b&0x7F) << shift 2238 if b < 0x80 { 2239 break 2240 } 2241 } 2242 if msglen < 0 { 2243 return ErrInvalidLengthGenesis 2244 } 2245 postIndex := iNdEx + msglen 2246 if postIndex < 0 { 2247 return ErrInvalidLengthGenesis 2248 } 2249 if postIndex > l { 2250 return io.ErrUnexpectedEOF 2251 } 2252 m.NextTokenIds = append(m.NextTokenIds, ContractNextTokenIDs{}) 2253 if err := m.NextTokenIds[len(m.NextTokenIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2254 return err 2255 } 2256 iNdEx = postIndex 2257 case 6: 2258 if wireType != 2 { 2259 return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) 2260 } 2261 var msglen int 2262 for shift := uint(0); ; shift += 7 { 2263 if shift >= 64 { 2264 return ErrIntOverflowGenesis 2265 } 2266 if iNdEx >= l { 2267 return io.ErrUnexpectedEOF 2268 } 2269 b := dAtA[iNdEx] 2270 iNdEx++ 2271 msglen |= int(b&0x7F) << shift 2272 if b < 0x80 { 2273 break 2274 } 2275 } 2276 if msglen < 0 { 2277 return ErrInvalidLengthGenesis 2278 } 2279 postIndex := iNdEx + msglen 2280 if postIndex < 0 { 2281 return ErrInvalidLengthGenesis 2282 } 2283 if postIndex > l { 2284 return io.ErrUnexpectedEOF 2285 } 2286 m.Balances = append(m.Balances, ContractBalances{}) 2287 if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2288 return err 2289 } 2290 iNdEx = postIndex 2291 case 7: 2292 if wireType != 2 { 2293 return fmt.Errorf("proto: wrong wireType = %d for field Nfts", wireType) 2294 } 2295 var msglen int 2296 for shift := uint(0); ; shift += 7 { 2297 if shift >= 64 { 2298 return ErrIntOverflowGenesis 2299 } 2300 if iNdEx >= l { 2301 return io.ErrUnexpectedEOF 2302 } 2303 b := dAtA[iNdEx] 2304 iNdEx++ 2305 msglen |= int(b&0x7F) << shift 2306 if b < 0x80 { 2307 break 2308 } 2309 } 2310 if msglen < 0 { 2311 return ErrInvalidLengthGenesis 2312 } 2313 postIndex := iNdEx + msglen 2314 if postIndex < 0 { 2315 return ErrInvalidLengthGenesis 2316 } 2317 if postIndex > l { 2318 return io.ErrUnexpectedEOF 2319 } 2320 m.Nfts = append(m.Nfts, ContractNFTs{}) 2321 if err := m.Nfts[len(m.Nfts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2322 return err 2323 } 2324 iNdEx = postIndex 2325 case 8: 2326 if wireType != 2 { 2327 return fmt.Errorf("proto: wrong wireType = %d for field Parents", wireType) 2328 } 2329 var msglen int 2330 for shift := uint(0); ; shift += 7 { 2331 if shift >= 64 { 2332 return ErrIntOverflowGenesis 2333 } 2334 if iNdEx >= l { 2335 return io.ErrUnexpectedEOF 2336 } 2337 b := dAtA[iNdEx] 2338 iNdEx++ 2339 msglen |= int(b&0x7F) << shift 2340 if b < 0x80 { 2341 break 2342 } 2343 } 2344 if msglen < 0 { 2345 return ErrInvalidLengthGenesis 2346 } 2347 postIndex := iNdEx + msglen 2348 if postIndex < 0 { 2349 return ErrInvalidLengthGenesis 2350 } 2351 if postIndex > l { 2352 return io.ErrUnexpectedEOF 2353 } 2354 m.Parents = append(m.Parents, ContractTokenRelations{}) 2355 if err := m.Parents[len(m.Parents)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2356 return err 2357 } 2358 iNdEx = postIndex 2359 case 9: 2360 if wireType != 2 { 2361 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 2362 } 2363 var msglen int 2364 for shift := uint(0); ; shift += 7 { 2365 if shift >= 64 { 2366 return ErrIntOverflowGenesis 2367 } 2368 if iNdEx >= l { 2369 return io.ErrUnexpectedEOF 2370 } 2371 b := dAtA[iNdEx] 2372 iNdEx++ 2373 msglen |= int(b&0x7F) << shift 2374 if b < 0x80 { 2375 break 2376 } 2377 } 2378 if msglen < 0 { 2379 return ErrInvalidLengthGenesis 2380 } 2381 postIndex := iNdEx + msglen 2382 if postIndex < 0 { 2383 return ErrInvalidLengthGenesis 2384 } 2385 if postIndex > l { 2386 return io.ErrUnexpectedEOF 2387 } 2388 m.Grants = append(m.Grants, ContractGrants{}) 2389 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2390 return err 2391 } 2392 iNdEx = postIndex 2393 case 10: 2394 if wireType != 2 { 2395 return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType) 2396 } 2397 var msglen int 2398 for shift := uint(0); ; shift += 7 { 2399 if shift >= 64 { 2400 return ErrIntOverflowGenesis 2401 } 2402 if iNdEx >= l { 2403 return io.ErrUnexpectedEOF 2404 } 2405 b := dAtA[iNdEx] 2406 iNdEx++ 2407 msglen |= int(b&0x7F) << shift 2408 if b < 0x80 { 2409 break 2410 } 2411 } 2412 if msglen < 0 { 2413 return ErrInvalidLengthGenesis 2414 } 2415 postIndex := iNdEx + msglen 2416 if postIndex < 0 { 2417 return ErrInvalidLengthGenesis 2418 } 2419 if postIndex > l { 2420 return io.ErrUnexpectedEOF 2421 } 2422 m.Authorizations = append(m.Authorizations, ContractAuthorizations{}) 2423 if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2424 return err 2425 } 2426 iNdEx = postIndex 2427 case 11: 2428 if wireType != 2 { 2429 return fmt.Errorf("proto: wrong wireType = %d for field Supplies", wireType) 2430 } 2431 var msglen int 2432 for shift := uint(0); ; shift += 7 { 2433 if shift >= 64 { 2434 return ErrIntOverflowGenesis 2435 } 2436 if iNdEx >= l { 2437 return io.ErrUnexpectedEOF 2438 } 2439 b := dAtA[iNdEx] 2440 iNdEx++ 2441 msglen |= int(b&0x7F) << shift 2442 if b < 0x80 { 2443 break 2444 } 2445 } 2446 if msglen < 0 { 2447 return ErrInvalidLengthGenesis 2448 } 2449 postIndex := iNdEx + msglen 2450 if postIndex < 0 { 2451 return ErrInvalidLengthGenesis 2452 } 2453 if postIndex > l { 2454 return io.ErrUnexpectedEOF 2455 } 2456 m.Supplies = append(m.Supplies, ContractStatistics{}) 2457 if err := m.Supplies[len(m.Supplies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2458 return err 2459 } 2460 iNdEx = postIndex 2461 case 12: 2462 if wireType != 2 { 2463 return fmt.Errorf("proto: wrong wireType = %d for field Burnts", wireType) 2464 } 2465 var msglen int 2466 for shift := uint(0); ; shift += 7 { 2467 if shift >= 64 { 2468 return ErrIntOverflowGenesis 2469 } 2470 if iNdEx >= l { 2471 return io.ErrUnexpectedEOF 2472 } 2473 b := dAtA[iNdEx] 2474 iNdEx++ 2475 msglen |= int(b&0x7F) << shift 2476 if b < 0x80 { 2477 break 2478 } 2479 } 2480 if msglen < 0 { 2481 return ErrInvalidLengthGenesis 2482 } 2483 postIndex := iNdEx + msglen 2484 if postIndex < 0 { 2485 return ErrInvalidLengthGenesis 2486 } 2487 if postIndex > l { 2488 return io.ErrUnexpectedEOF 2489 } 2490 m.Burnts = append(m.Burnts, ContractStatistics{}) 2491 if err := m.Burnts[len(m.Burnts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2492 return err 2493 } 2494 iNdEx = postIndex 2495 default: 2496 iNdEx = preIndex 2497 skippy, err := skipGenesis(dAtA[iNdEx:]) 2498 if err != nil { 2499 return err 2500 } 2501 if (skippy < 0) || (iNdEx+skippy) < 0 { 2502 return ErrInvalidLengthGenesis 2503 } 2504 if (iNdEx + skippy) > l { 2505 return io.ErrUnexpectedEOF 2506 } 2507 iNdEx += skippy 2508 } 2509 } 2510 2511 if iNdEx > l { 2512 return io.ErrUnexpectedEOF 2513 } 2514 return nil 2515 } 2516 func (m *ContractBalances) Unmarshal(dAtA []byte) error { 2517 l := len(dAtA) 2518 iNdEx := 0 2519 for iNdEx < l { 2520 preIndex := iNdEx 2521 var wire uint64 2522 for shift := uint(0); ; shift += 7 { 2523 if shift >= 64 { 2524 return ErrIntOverflowGenesis 2525 } 2526 if iNdEx >= l { 2527 return io.ErrUnexpectedEOF 2528 } 2529 b := dAtA[iNdEx] 2530 iNdEx++ 2531 wire |= uint64(b&0x7F) << shift 2532 if b < 0x80 { 2533 break 2534 } 2535 } 2536 fieldNum := int32(wire >> 3) 2537 wireType := int(wire & 0x7) 2538 if wireType == 4 { 2539 return fmt.Errorf("proto: ContractBalances: wiretype end group for non-group") 2540 } 2541 if fieldNum <= 0 { 2542 return fmt.Errorf("proto: ContractBalances: illegal tag %d (wire type %d)", fieldNum, wire) 2543 } 2544 switch fieldNum { 2545 case 1: 2546 if wireType != 2 { 2547 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2548 } 2549 var stringLen uint64 2550 for shift := uint(0); ; shift += 7 { 2551 if shift >= 64 { 2552 return ErrIntOverflowGenesis 2553 } 2554 if iNdEx >= l { 2555 return io.ErrUnexpectedEOF 2556 } 2557 b := dAtA[iNdEx] 2558 iNdEx++ 2559 stringLen |= uint64(b&0x7F) << shift 2560 if b < 0x80 { 2561 break 2562 } 2563 } 2564 intStringLen := int(stringLen) 2565 if intStringLen < 0 { 2566 return ErrInvalidLengthGenesis 2567 } 2568 postIndex := iNdEx + intStringLen 2569 if postIndex < 0 { 2570 return ErrInvalidLengthGenesis 2571 } 2572 if postIndex > l { 2573 return io.ErrUnexpectedEOF 2574 } 2575 m.ContractId = string(dAtA[iNdEx:postIndex]) 2576 iNdEx = postIndex 2577 case 2: 2578 if wireType != 2 { 2579 return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) 2580 } 2581 var msglen int 2582 for shift := uint(0); ; shift += 7 { 2583 if shift >= 64 { 2584 return ErrIntOverflowGenesis 2585 } 2586 if iNdEx >= l { 2587 return io.ErrUnexpectedEOF 2588 } 2589 b := dAtA[iNdEx] 2590 iNdEx++ 2591 msglen |= int(b&0x7F) << shift 2592 if b < 0x80 { 2593 break 2594 } 2595 } 2596 if msglen < 0 { 2597 return ErrInvalidLengthGenesis 2598 } 2599 postIndex := iNdEx + msglen 2600 if postIndex < 0 { 2601 return ErrInvalidLengthGenesis 2602 } 2603 if postIndex > l { 2604 return io.ErrUnexpectedEOF 2605 } 2606 m.Balances = append(m.Balances, Balance{}) 2607 if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2608 return err 2609 } 2610 iNdEx = postIndex 2611 default: 2612 iNdEx = preIndex 2613 skippy, err := skipGenesis(dAtA[iNdEx:]) 2614 if err != nil { 2615 return err 2616 } 2617 if (skippy < 0) || (iNdEx+skippy) < 0 { 2618 return ErrInvalidLengthGenesis 2619 } 2620 if (iNdEx + skippy) > l { 2621 return io.ErrUnexpectedEOF 2622 } 2623 iNdEx += skippy 2624 } 2625 } 2626 2627 if iNdEx > l { 2628 return io.ErrUnexpectedEOF 2629 } 2630 return nil 2631 } 2632 func (m *ContractStatistics) Unmarshal(dAtA []byte) error { 2633 l := len(dAtA) 2634 iNdEx := 0 2635 for iNdEx < l { 2636 preIndex := iNdEx 2637 var wire uint64 2638 for shift := uint(0); ; shift += 7 { 2639 if shift >= 64 { 2640 return ErrIntOverflowGenesis 2641 } 2642 if iNdEx >= l { 2643 return io.ErrUnexpectedEOF 2644 } 2645 b := dAtA[iNdEx] 2646 iNdEx++ 2647 wire |= uint64(b&0x7F) << shift 2648 if b < 0x80 { 2649 break 2650 } 2651 } 2652 fieldNum := int32(wire >> 3) 2653 wireType := int(wire & 0x7) 2654 if wireType == 4 { 2655 return fmt.Errorf("proto: ContractStatistics: wiretype end group for non-group") 2656 } 2657 if fieldNum <= 0 { 2658 return fmt.Errorf("proto: ContractStatistics: illegal tag %d (wire type %d)", fieldNum, wire) 2659 } 2660 switch fieldNum { 2661 case 1: 2662 if wireType != 2 { 2663 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2664 } 2665 var stringLen uint64 2666 for shift := uint(0); ; shift += 7 { 2667 if shift >= 64 { 2668 return ErrIntOverflowGenesis 2669 } 2670 if iNdEx >= l { 2671 return io.ErrUnexpectedEOF 2672 } 2673 b := dAtA[iNdEx] 2674 iNdEx++ 2675 stringLen |= uint64(b&0x7F) << shift 2676 if b < 0x80 { 2677 break 2678 } 2679 } 2680 intStringLen := int(stringLen) 2681 if intStringLen < 0 { 2682 return ErrInvalidLengthGenesis 2683 } 2684 postIndex := iNdEx + intStringLen 2685 if postIndex < 0 { 2686 return ErrInvalidLengthGenesis 2687 } 2688 if postIndex > l { 2689 return io.ErrUnexpectedEOF 2690 } 2691 m.ContractId = string(dAtA[iNdEx:postIndex]) 2692 iNdEx = postIndex 2693 case 2: 2694 if wireType != 2 { 2695 return fmt.Errorf("proto: wrong wireType = %d for field Statistics", wireType) 2696 } 2697 var msglen int 2698 for shift := uint(0); ; shift += 7 { 2699 if shift >= 64 { 2700 return ErrIntOverflowGenesis 2701 } 2702 if iNdEx >= l { 2703 return io.ErrUnexpectedEOF 2704 } 2705 b := dAtA[iNdEx] 2706 iNdEx++ 2707 msglen |= int(b&0x7F) << shift 2708 if b < 0x80 { 2709 break 2710 } 2711 } 2712 if msglen < 0 { 2713 return ErrInvalidLengthGenesis 2714 } 2715 postIndex := iNdEx + msglen 2716 if postIndex < 0 { 2717 return ErrInvalidLengthGenesis 2718 } 2719 if postIndex > l { 2720 return io.ErrUnexpectedEOF 2721 } 2722 m.Statistics = append(m.Statistics, ClassStatistics{}) 2723 if err := m.Statistics[len(m.Statistics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2724 return err 2725 } 2726 iNdEx = postIndex 2727 default: 2728 iNdEx = preIndex 2729 skippy, err := skipGenesis(dAtA[iNdEx:]) 2730 if err != nil { 2731 return err 2732 } 2733 if (skippy < 0) || (iNdEx+skippy) < 0 { 2734 return ErrInvalidLengthGenesis 2735 } 2736 if (iNdEx + skippy) > l { 2737 return io.ErrUnexpectedEOF 2738 } 2739 iNdEx += skippy 2740 } 2741 } 2742 2743 if iNdEx > l { 2744 return io.ErrUnexpectedEOF 2745 } 2746 return nil 2747 } 2748 func (m *ClassStatistics) Unmarshal(dAtA []byte) error { 2749 l := len(dAtA) 2750 iNdEx := 0 2751 for iNdEx < l { 2752 preIndex := iNdEx 2753 var wire uint64 2754 for shift := uint(0); ; shift += 7 { 2755 if shift >= 64 { 2756 return ErrIntOverflowGenesis 2757 } 2758 if iNdEx >= l { 2759 return io.ErrUnexpectedEOF 2760 } 2761 b := dAtA[iNdEx] 2762 iNdEx++ 2763 wire |= uint64(b&0x7F) << shift 2764 if b < 0x80 { 2765 break 2766 } 2767 } 2768 fieldNum := int32(wire >> 3) 2769 wireType := int(wire & 0x7) 2770 if wireType == 4 { 2771 return fmt.Errorf("proto: ClassStatistics: wiretype end group for non-group") 2772 } 2773 if fieldNum <= 0 { 2774 return fmt.Errorf("proto: ClassStatistics: illegal tag %d (wire type %d)", fieldNum, wire) 2775 } 2776 switch fieldNum { 2777 case 1: 2778 if wireType != 2 { 2779 return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) 2780 } 2781 var stringLen uint64 2782 for shift := uint(0); ; shift += 7 { 2783 if shift >= 64 { 2784 return ErrIntOverflowGenesis 2785 } 2786 if iNdEx >= l { 2787 return io.ErrUnexpectedEOF 2788 } 2789 b := dAtA[iNdEx] 2790 iNdEx++ 2791 stringLen |= uint64(b&0x7F) << shift 2792 if b < 0x80 { 2793 break 2794 } 2795 } 2796 intStringLen := int(stringLen) 2797 if intStringLen < 0 { 2798 return ErrInvalidLengthGenesis 2799 } 2800 postIndex := iNdEx + intStringLen 2801 if postIndex < 0 { 2802 return ErrInvalidLengthGenesis 2803 } 2804 if postIndex > l { 2805 return io.ErrUnexpectedEOF 2806 } 2807 m.ClassId = string(dAtA[iNdEx:postIndex]) 2808 iNdEx = postIndex 2809 case 2: 2810 if wireType != 2 { 2811 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2812 } 2813 var stringLen uint64 2814 for shift := uint(0); ; shift += 7 { 2815 if shift >= 64 { 2816 return ErrIntOverflowGenesis 2817 } 2818 if iNdEx >= l { 2819 return io.ErrUnexpectedEOF 2820 } 2821 b := dAtA[iNdEx] 2822 iNdEx++ 2823 stringLen |= uint64(b&0x7F) << shift 2824 if b < 0x80 { 2825 break 2826 } 2827 } 2828 intStringLen := int(stringLen) 2829 if intStringLen < 0 { 2830 return ErrInvalidLengthGenesis 2831 } 2832 postIndex := iNdEx + intStringLen 2833 if postIndex < 0 { 2834 return ErrInvalidLengthGenesis 2835 } 2836 if postIndex > l { 2837 return io.ErrUnexpectedEOF 2838 } 2839 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2840 return err 2841 } 2842 iNdEx = postIndex 2843 default: 2844 iNdEx = preIndex 2845 skippy, err := skipGenesis(dAtA[iNdEx:]) 2846 if err != nil { 2847 return err 2848 } 2849 if (skippy < 0) || (iNdEx+skippy) < 0 { 2850 return ErrInvalidLengthGenesis 2851 } 2852 if (iNdEx + skippy) > l { 2853 return io.ErrUnexpectedEOF 2854 } 2855 iNdEx += skippy 2856 } 2857 } 2858 2859 if iNdEx > l { 2860 return io.ErrUnexpectedEOF 2861 } 2862 return nil 2863 } 2864 func (m *Balance) Unmarshal(dAtA []byte) error { 2865 l := len(dAtA) 2866 iNdEx := 0 2867 for iNdEx < l { 2868 preIndex := iNdEx 2869 var wire uint64 2870 for shift := uint(0); ; shift += 7 { 2871 if shift >= 64 { 2872 return ErrIntOverflowGenesis 2873 } 2874 if iNdEx >= l { 2875 return io.ErrUnexpectedEOF 2876 } 2877 b := dAtA[iNdEx] 2878 iNdEx++ 2879 wire |= uint64(b&0x7F) << shift 2880 if b < 0x80 { 2881 break 2882 } 2883 } 2884 fieldNum := int32(wire >> 3) 2885 wireType := int(wire & 0x7) 2886 if wireType == 4 { 2887 return fmt.Errorf("proto: Balance: wiretype end group for non-group") 2888 } 2889 if fieldNum <= 0 { 2890 return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) 2891 } 2892 switch fieldNum { 2893 case 1: 2894 if wireType != 2 { 2895 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 2896 } 2897 var stringLen uint64 2898 for shift := uint(0); ; shift += 7 { 2899 if shift >= 64 { 2900 return ErrIntOverflowGenesis 2901 } 2902 if iNdEx >= l { 2903 return io.ErrUnexpectedEOF 2904 } 2905 b := dAtA[iNdEx] 2906 iNdEx++ 2907 stringLen |= uint64(b&0x7F) << shift 2908 if b < 0x80 { 2909 break 2910 } 2911 } 2912 intStringLen := int(stringLen) 2913 if intStringLen < 0 { 2914 return ErrInvalidLengthGenesis 2915 } 2916 postIndex := iNdEx + intStringLen 2917 if postIndex < 0 { 2918 return ErrInvalidLengthGenesis 2919 } 2920 if postIndex > l { 2921 return io.ErrUnexpectedEOF 2922 } 2923 m.Address = string(dAtA[iNdEx:postIndex]) 2924 iNdEx = postIndex 2925 case 2: 2926 if wireType != 2 { 2927 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2928 } 2929 var msglen int 2930 for shift := uint(0); ; shift += 7 { 2931 if shift >= 64 { 2932 return ErrIntOverflowGenesis 2933 } 2934 if iNdEx >= l { 2935 return io.ErrUnexpectedEOF 2936 } 2937 b := dAtA[iNdEx] 2938 iNdEx++ 2939 msglen |= int(b&0x7F) << shift 2940 if b < 0x80 { 2941 break 2942 } 2943 } 2944 if msglen < 0 { 2945 return ErrInvalidLengthGenesis 2946 } 2947 postIndex := iNdEx + msglen 2948 if postIndex < 0 { 2949 return ErrInvalidLengthGenesis 2950 } 2951 if postIndex > l { 2952 return io.ErrUnexpectedEOF 2953 } 2954 m.Amount = append(m.Amount, Coin{}) 2955 if err := m.Amount[len(m.Amount)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2956 return err 2957 } 2958 iNdEx = postIndex 2959 default: 2960 iNdEx = preIndex 2961 skippy, err := skipGenesis(dAtA[iNdEx:]) 2962 if err != nil { 2963 return err 2964 } 2965 if (skippy < 0) || (iNdEx+skippy) < 0 { 2966 return ErrInvalidLengthGenesis 2967 } 2968 if (iNdEx + skippy) > l { 2969 return io.ErrUnexpectedEOF 2970 } 2971 iNdEx += skippy 2972 } 2973 } 2974 2975 if iNdEx > l { 2976 return io.ErrUnexpectedEOF 2977 } 2978 return nil 2979 } 2980 func (m *ContractClasses) Unmarshal(dAtA []byte) error { 2981 l := len(dAtA) 2982 iNdEx := 0 2983 for iNdEx < l { 2984 preIndex := iNdEx 2985 var wire uint64 2986 for shift := uint(0); ; shift += 7 { 2987 if shift >= 64 { 2988 return ErrIntOverflowGenesis 2989 } 2990 if iNdEx >= l { 2991 return io.ErrUnexpectedEOF 2992 } 2993 b := dAtA[iNdEx] 2994 iNdEx++ 2995 wire |= uint64(b&0x7F) << shift 2996 if b < 0x80 { 2997 break 2998 } 2999 } 3000 fieldNum := int32(wire >> 3) 3001 wireType := int(wire & 0x7) 3002 if wireType == 4 { 3003 return fmt.Errorf("proto: ContractClasses: wiretype end group for non-group") 3004 } 3005 if fieldNum <= 0 { 3006 return fmt.Errorf("proto: ContractClasses: illegal tag %d (wire type %d)", fieldNum, wire) 3007 } 3008 switch fieldNum { 3009 case 1: 3010 if wireType != 2 { 3011 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3012 } 3013 var stringLen uint64 3014 for shift := uint(0); ; shift += 7 { 3015 if shift >= 64 { 3016 return ErrIntOverflowGenesis 3017 } 3018 if iNdEx >= l { 3019 return io.ErrUnexpectedEOF 3020 } 3021 b := dAtA[iNdEx] 3022 iNdEx++ 3023 stringLen |= uint64(b&0x7F) << shift 3024 if b < 0x80 { 3025 break 3026 } 3027 } 3028 intStringLen := int(stringLen) 3029 if intStringLen < 0 { 3030 return ErrInvalidLengthGenesis 3031 } 3032 postIndex := iNdEx + intStringLen 3033 if postIndex < 0 { 3034 return ErrInvalidLengthGenesis 3035 } 3036 if postIndex > l { 3037 return io.ErrUnexpectedEOF 3038 } 3039 m.ContractId = string(dAtA[iNdEx:postIndex]) 3040 iNdEx = postIndex 3041 case 2: 3042 if wireType != 2 { 3043 return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) 3044 } 3045 var msglen int 3046 for shift := uint(0); ; shift += 7 { 3047 if shift >= 64 { 3048 return ErrIntOverflowGenesis 3049 } 3050 if iNdEx >= l { 3051 return io.ErrUnexpectedEOF 3052 } 3053 b := dAtA[iNdEx] 3054 iNdEx++ 3055 msglen |= int(b&0x7F) << shift 3056 if b < 0x80 { 3057 break 3058 } 3059 } 3060 if msglen < 0 { 3061 return ErrInvalidLengthGenesis 3062 } 3063 postIndex := iNdEx + msglen 3064 if postIndex < 0 { 3065 return ErrInvalidLengthGenesis 3066 } 3067 if postIndex > l { 3068 return io.ErrUnexpectedEOF 3069 } 3070 m.Classes = append(m.Classes, types.Any{}) 3071 if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3072 return err 3073 } 3074 iNdEx = postIndex 3075 default: 3076 iNdEx = preIndex 3077 skippy, err := skipGenesis(dAtA[iNdEx:]) 3078 if err != nil { 3079 return err 3080 } 3081 if (skippy < 0) || (iNdEx+skippy) < 0 { 3082 return ErrInvalidLengthGenesis 3083 } 3084 if (iNdEx + skippy) > l { 3085 return io.ErrUnexpectedEOF 3086 } 3087 iNdEx += skippy 3088 } 3089 } 3090 3091 if iNdEx > l { 3092 return io.ErrUnexpectedEOF 3093 } 3094 return nil 3095 } 3096 func (m *ContractNFTs) Unmarshal(dAtA []byte) error { 3097 l := len(dAtA) 3098 iNdEx := 0 3099 for iNdEx < l { 3100 preIndex := iNdEx 3101 var wire uint64 3102 for shift := uint(0); ; shift += 7 { 3103 if shift >= 64 { 3104 return ErrIntOverflowGenesis 3105 } 3106 if iNdEx >= l { 3107 return io.ErrUnexpectedEOF 3108 } 3109 b := dAtA[iNdEx] 3110 iNdEx++ 3111 wire |= uint64(b&0x7F) << shift 3112 if b < 0x80 { 3113 break 3114 } 3115 } 3116 fieldNum := int32(wire >> 3) 3117 wireType := int(wire & 0x7) 3118 if wireType == 4 { 3119 return fmt.Errorf("proto: ContractNFTs: wiretype end group for non-group") 3120 } 3121 if fieldNum <= 0 { 3122 return fmt.Errorf("proto: ContractNFTs: illegal tag %d (wire type %d)", fieldNum, wire) 3123 } 3124 switch fieldNum { 3125 case 1: 3126 if wireType != 2 { 3127 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3128 } 3129 var stringLen uint64 3130 for shift := uint(0); ; shift += 7 { 3131 if shift >= 64 { 3132 return ErrIntOverflowGenesis 3133 } 3134 if iNdEx >= l { 3135 return io.ErrUnexpectedEOF 3136 } 3137 b := dAtA[iNdEx] 3138 iNdEx++ 3139 stringLen |= uint64(b&0x7F) << shift 3140 if b < 0x80 { 3141 break 3142 } 3143 } 3144 intStringLen := int(stringLen) 3145 if intStringLen < 0 { 3146 return ErrInvalidLengthGenesis 3147 } 3148 postIndex := iNdEx + intStringLen 3149 if postIndex < 0 { 3150 return ErrInvalidLengthGenesis 3151 } 3152 if postIndex > l { 3153 return io.ErrUnexpectedEOF 3154 } 3155 m.ContractId = string(dAtA[iNdEx:postIndex]) 3156 iNdEx = postIndex 3157 case 2: 3158 if wireType != 2 { 3159 return fmt.Errorf("proto: wrong wireType = %d for field Nfts", wireType) 3160 } 3161 var msglen int 3162 for shift := uint(0); ; shift += 7 { 3163 if shift >= 64 { 3164 return ErrIntOverflowGenesis 3165 } 3166 if iNdEx >= l { 3167 return io.ErrUnexpectedEOF 3168 } 3169 b := dAtA[iNdEx] 3170 iNdEx++ 3171 msglen |= int(b&0x7F) << shift 3172 if b < 0x80 { 3173 break 3174 } 3175 } 3176 if msglen < 0 { 3177 return ErrInvalidLengthGenesis 3178 } 3179 postIndex := iNdEx + msglen 3180 if postIndex < 0 { 3181 return ErrInvalidLengthGenesis 3182 } 3183 if postIndex > l { 3184 return io.ErrUnexpectedEOF 3185 } 3186 m.Nfts = append(m.Nfts, NFT{}) 3187 if err := m.Nfts[len(m.Nfts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3188 return err 3189 } 3190 iNdEx = postIndex 3191 default: 3192 iNdEx = preIndex 3193 skippy, err := skipGenesis(dAtA[iNdEx:]) 3194 if err != nil { 3195 return err 3196 } 3197 if (skippy < 0) || (iNdEx+skippy) < 0 { 3198 return ErrInvalidLengthGenesis 3199 } 3200 if (iNdEx + skippy) > l { 3201 return io.ErrUnexpectedEOF 3202 } 3203 iNdEx += skippy 3204 } 3205 } 3206 3207 if iNdEx > l { 3208 return io.ErrUnexpectedEOF 3209 } 3210 return nil 3211 } 3212 func (m *ContractAuthorizations) Unmarshal(dAtA []byte) error { 3213 l := len(dAtA) 3214 iNdEx := 0 3215 for iNdEx < l { 3216 preIndex := iNdEx 3217 var wire uint64 3218 for shift := uint(0); ; shift += 7 { 3219 if shift >= 64 { 3220 return ErrIntOverflowGenesis 3221 } 3222 if iNdEx >= l { 3223 return io.ErrUnexpectedEOF 3224 } 3225 b := dAtA[iNdEx] 3226 iNdEx++ 3227 wire |= uint64(b&0x7F) << shift 3228 if b < 0x80 { 3229 break 3230 } 3231 } 3232 fieldNum := int32(wire >> 3) 3233 wireType := int(wire & 0x7) 3234 if wireType == 4 { 3235 return fmt.Errorf("proto: ContractAuthorizations: wiretype end group for non-group") 3236 } 3237 if fieldNum <= 0 { 3238 return fmt.Errorf("proto: ContractAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire) 3239 } 3240 switch fieldNum { 3241 case 1: 3242 if wireType != 2 { 3243 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3244 } 3245 var stringLen uint64 3246 for shift := uint(0); ; shift += 7 { 3247 if shift >= 64 { 3248 return ErrIntOverflowGenesis 3249 } 3250 if iNdEx >= l { 3251 return io.ErrUnexpectedEOF 3252 } 3253 b := dAtA[iNdEx] 3254 iNdEx++ 3255 stringLen |= uint64(b&0x7F) << shift 3256 if b < 0x80 { 3257 break 3258 } 3259 } 3260 intStringLen := int(stringLen) 3261 if intStringLen < 0 { 3262 return ErrInvalidLengthGenesis 3263 } 3264 postIndex := iNdEx + intStringLen 3265 if postIndex < 0 { 3266 return ErrInvalidLengthGenesis 3267 } 3268 if postIndex > l { 3269 return io.ErrUnexpectedEOF 3270 } 3271 m.ContractId = string(dAtA[iNdEx:postIndex]) 3272 iNdEx = postIndex 3273 case 2: 3274 if wireType != 2 { 3275 return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType) 3276 } 3277 var msglen int 3278 for shift := uint(0); ; shift += 7 { 3279 if shift >= 64 { 3280 return ErrIntOverflowGenesis 3281 } 3282 if iNdEx >= l { 3283 return io.ErrUnexpectedEOF 3284 } 3285 b := dAtA[iNdEx] 3286 iNdEx++ 3287 msglen |= int(b&0x7F) << shift 3288 if b < 0x80 { 3289 break 3290 } 3291 } 3292 if msglen < 0 { 3293 return ErrInvalidLengthGenesis 3294 } 3295 postIndex := iNdEx + msglen 3296 if postIndex < 0 { 3297 return ErrInvalidLengthGenesis 3298 } 3299 if postIndex > l { 3300 return io.ErrUnexpectedEOF 3301 } 3302 m.Authorizations = append(m.Authorizations, Authorization{}) 3303 if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3304 return err 3305 } 3306 iNdEx = postIndex 3307 default: 3308 iNdEx = preIndex 3309 skippy, err := skipGenesis(dAtA[iNdEx:]) 3310 if err != nil { 3311 return err 3312 } 3313 if (skippy < 0) || (iNdEx+skippy) < 0 { 3314 return ErrInvalidLengthGenesis 3315 } 3316 if (iNdEx + skippy) > l { 3317 return io.ErrUnexpectedEOF 3318 } 3319 iNdEx += skippy 3320 } 3321 } 3322 3323 if iNdEx > l { 3324 return io.ErrUnexpectedEOF 3325 } 3326 return nil 3327 } 3328 func (m *ContractGrants) Unmarshal(dAtA []byte) error { 3329 l := len(dAtA) 3330 iNdEx := 0 3331 for iNdEx < l { 3332 preIndex := iNdEx 3333 var wire uint64 3334 for shift := uint(0); ; shift += 7 { 3335 if shift >= 64 { 3336 return ErrIntOverflowGenesis 3337 } 3338 if iNdEx >= l { 3339 return io.ErrUnexpectedEOF 3340 } 3341 b := dAtA[iNdEx] 3342 iNdEx++ 3343 wire |= uint64(b&0x7F) << shift 3344 if b < 0x80 { 3345 break 3346 } 3347 } 3348 fieldNum := int32(wire >> 3) 3349 wireType := int(wire & 0x7) 3350 if wireType == 4 { 3351 return fmt.Errorf("proto: ContractGrants: wiretype end group for non-group") 3352 } 3353 if fieldNum <= 0 { 3354 return fmt.Errorf("proto: ContractGrants: illegal tag %d (wire type %d)", fieldNum, wire) 3355 } 3356 switch fieldNum { 3357 case 1: 3358 if wireType != 2 { 3359 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3360 } 3361 var stringLen uint64 3362 for shift := uint(0); ; shift += 7 { 3363 if shift >= 64 { 3364 return ErrIntOverflowGenesis 3365 } 3366 if iNdEx >= l { 3367 return io.ErrUnexpectedEOF 3368 } 3369 b := dAtA[iNdEx] 3370 iNdEx++ 3371 stringLen |= uint64(b&0x7F) << shift 3372 if b < 0x80 { 3373 break 3374 } 3375 } 3376 intStringLen := int(stringLen) 3377 if intStringLen < 0 { 3378 return ErrInvalidLengthGenesis 3379 } 3380 postIndex := iNdEx + intStringLen 3381 if postIndex < 0 { 3382 return ErrInvalidLengthGenesis 3383 } 3384 if postIndex > l { 3385 return io.ErrUnexpectedEOF 3386 } 3387 m.ContractId = string(dAtA[iNdEx:postIndex]) 3388 iNdEx = postIndex 3389 case 2: 3390 if wireType != 2 { 3391 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 3392 } 3393 var msglen int 3394 for shift := uint(0); ; shift += 7 { 3395 if shift >= 64 { 3396 return ErrIntOverflowGenesis 3397 } 3398 if iNdEx >= l { 3399 return io.ErrUnexpectedEOF 3400 } 3401 b := dAtA[iNdEx] 3402 iNdEx++ 3403 msglen |= int(b&0x7F) << shift 3404 if b < 0x80 { 3405 break 3406 } 3407 } 3408 if msglen < 0 { 3409 return ErrInvalidLengthGenesis 3410 } 3411 postIndex := iNdEx + msglen 3412 if postIndex < 0 { 3413 return ErrInvalidLengthGenesis 3414 } 3415 if postIndex > l { 3416 return io.ErrUnexpectedEOF 3417 } 3418 m.Grants = append(m.Grants, Grant{}) 3419 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3420 return err 3421 } 3422 iNdEx = postIndex 3423 default: 3424 iNdEx = preIndex 3425 skippy, err := skipGenesis(dAtA[iNdEx:]) 3426 if err != nil { 3427 return err 3428 } 3429 if (skippy < 0) || (iNdEx+skippy) < 0 { 3430 return ErrInvalidLengthGenesis 3431 } 3432 if (iNdEx + skippy) > l { 3433 return io.ErrUnexpectedEOF 3434 } 3435 iNdEx += skippy 3436 } 3437 } 3438 3439 if iNdEx > l { 3440 return io.ErrUnexpectedEOF 3441 } 3442 return nil 3443 } 3444 func (m *NextClassIDs) Unmarshal(dAtA []byte) error { 3445 l := len(dAtA) 3446 iNdEx := 0 3447 for iNdEx < l { 3448 preIndex := iNdEx 3449 var wire uint64 3450 for shift := uint(0); ; shift += 7 { 3451 if shift >= 64 { 3452 return ErrIntOverflowGenesis 3453 } 3454 if iNdEx >= l { 3455 return io.ErrUnexpectedEOF 3456 } 3457 b := dAtA[iNdEx] 3458 iNdEx++ 3459 wire |= uint64(b&0x7F) << shift 3460 if b < 0x80 { 3461 break 3462 } 3463 } 3464 fieldNum := int32(wire >> 3) 3465 wireType := int(wire & 0x7) 3466 if wireType == 4 { 3467 return fmt.Errorf("proto: NextClassIDs: wiretype end group for non-group") 3468 } 3469 if fieldNum <= 0 { 3470 return fmt.Errorf("proto: NextClassIDs: illegal tag %d (wire type %d)", fieldNum, wire) 3471 } 3472 switch fieldNum { 3473 case 1: 3474 if wireType != 2 { 3475 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3476 } 3477 var stringLen uint64 3478 for shift := uint(0); ; shift += 7 { 3479 if shift >= 64 { 3480 return ErrIntOverflowGenesis 3481 } 3482 if iNdEx >= l { 3483 return io.ErrUnexpectedEOF 3484 } 3485 b := dAtA[iNdEx] 3486 iNdEx++ 3487 stringLen |= uint64(b&0x7F) << shift 3488 if b < 0x80 { 3489 break 3490 } 3491 } 3492 intStringLen := int(stringLen) 3493 if intStringLen < 0 { 3494 return ErrInvalidLengthGenesis 3495 } 3496 postIndex := iNdEx + intStringLen 3497 if postIndex < 0 { 3498 return ErrInvalidLengthGenesis 3499 } 3500 if postIndex > l { 3501 return io.ErrUnexpectedEOF 3502 } 3503 m.ContractId = string(dAtA[iNdEx:postIndex]) 3504 iNdEx = postIndex 3505 case 2: 3506 if wireType != 2 { 3507 return fmt.Errorf("proto: wrong wireType = %d for field Fungible", wireType) 3508 } 3509 var stringLen uint64 3510 for shift := uint(0); ; shift += 7 { 3511 if shift >= 64 { 3512 return ErrIntOverflowGenesis 3513 } 3514 if iNdEx >= l { 3515 return io.ErrUnexpectedEOF 3516 } 3517 b := dAtA[iNdEx] 3518 iNdEx++ 3519 stringLen |= uint64(b&0x7F) << shift 3520 if b < 0x80 { 3521 break 3522 } 3523 } 3524 intStringLen := int(stringLen) 3525 if intStringLen < 0 { 3526 return ErrInvalidLengthGenesis 3527 } 3528 postIndex := iNdEx + intStringLen 3529 if postIndex < 0 { 3530 return ErrInvalidLengthGenesis 3531 } 3532 if postIndex > l { 3533 return io.ErrUnexpectedEOF 3534 } 3535 if err := m.Fungible.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3536 return err 3537 } 3538 iNdEx = postIndex 3539 case 3: 3540 if wireType != 2 { 3541 return fmt.Errorf("proto: wrong wireType = %d for field NonFungible", wireType) 3542 } 3543 var stringLen uint64 3544 for shift := uint(0); ; shift += 7 { 3545 if shift >= 64 { 3546 return ErrIntOverflowGenesis 3547 } 3548 if iNdEx >= l { 3549 return io.ErrUnexpectedEOF 3550 } 3551 b := dAtA[iNdEx] 3552 iNdEx++ 3553 stringLen |= uint64(b&0x7F) << shift 3554 if b < 0x80 { 3555 break 3556 } 3557 } 3558 intStringLen := int(stringLen) 3559 if intStringLen < 0 { 3560 return ErrInvalidLengthGenesis 3561 } 3562 postIndex := iNdEx + intStringLen 3563 if postIndex < 0 { 3564 return ErrInvalidLengthGenesis 3565 } 3566 if postIndex > l { 3567 return io.ErrUnexpectedEOF 3568 } 3569 if err := m.NonFungible.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3570 return err 3571 } 3572 iNdEx = postIndex 3573 default: 3574 iNdEx = preIndex 3575 skippy, err := skipGenesis(dAtA[iNdEx:]) 3576 if err != nil { 3577 return err 3578 } 3579 if (skippy < 0) || (iNdEx+skippy) < 0 { 3580 return ErrInvalidLengthGenesis 3581 } 3582 if (iNdEx + skippy) > l { 3583 return io.ErrUnexpectedEOF 3584 } 3585 iNdEx += skippy 3586 } 3587 } 3588 3589 if iNdEx > l { 3590 return io.ErrUnexpectedEOF 3591 } 3592 return nil 3593 } 3594 func (m *ContractNextTokenIDs) Unmarshal(dAtA []byte) error { 3595 l := len(dAtA) 3596 iNdEx := 0 3597 for iNdEx < l { 3598 preIndex := iNdEx 3599 var wire uint64 3600 for shift := uint(0); ; shift += 7 { 3601 if shift >= 64 { 3602 return ErrIntOverflowGenesis 3603 } 3604 if iNdEx >= l { 3605 return io.ErrUnexpectedEOF 3606 } 3607 b := dAtA[iNdEx] 3608 iNdEx++ 3609 wire |= uint64(b&0x7F) << shift 3610 if b < 0x80 { 3611 break 3612 } 3613 } 3614 fieldNum := int32(wire >> 3) 3615 wireType := int(wire & 0x7) 3616 if wireType == 4 { 3617 return fmt.Errorf("proto: ContractNextTokenIDs: wiretype end group for non-group") 3618 } 3619 if fieldNum <= 0 { 3620 return fmt.Errorf("proto: ContractNextTokenIDs: illegal tag %d (wire type %d)", fieldNum, wire) 3621 } 3622 switch fieldNum { 3623 case 1: 3624 if wireType != 2 { 3625 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3626 } 3627 var stringLen uint64 3628 for shift := uint(0); ; shift += 7 { 3629 if shift >= 64 { 3630 return ErrIntOverflowGenesis 3631 } 3632 if iNdEx >= l { 3633 return io.ErrUnexpectedEOF 3634 } 3635 b := dAtA[iNdEx] 3636 iNdEx++ 3637 stringLen |= uint64(b&0x7F) << shift 3638 if b < 0x80 { 3639 break 3640 } 3641 } 3642 intStringLen := int(stringLen) 3643 if intStringLen < 0 { 3644 return ErrInvalidLengthGenesis 3645 } 3646 postIndex := iNdEx + intStringLen 3647 if postIndex < 0 { 3648 return ErrInvalidLengthGenesis 3649 } 3650 if postIndex > l { 3651 return io.ErrUnexpectedEOF 3652 } 3653 m.ContractId = string(dAtA[iNdEx:postIndex]) 3654 iNdEx = postIndex 3655 case 2: 3656 if wireType != 2 { 3657 return fmt.Errorf("proto: wrong wireType = %d for field TokenIds", wireType) 3658 } 3659 var msglen int 3660 for shift := uint(0); ; shift += 7 { 3661 if shift >= 64 { 3662 return ErrIntOverflowGenesis 3663 } 3664 if iNdEx >= l { 3665 return io.ErrUnexpectedEOF 3666 } 3667 b := dAtA[iNdEx] 3668 iNdEx++ 3669 msglen |= int(b&0x7F) << shift 3670 if b < 0x80 { 3671 break 3672 } 3673 } 3674 if msglen < 0 { 3675 return ErrInvalidLengthGenesis 3676 } 3677 postIndex := iNdEx + msglen 3678 if postIndex < 0 { 3679 return ErrInvalidLengthGenesis 3680 } 3681 if postIndex > l { 3682 return io.ErrUnexpectedEOF 3683 } 3684 m.TokenIds = append(m.TokenIds, NextTokenID{}) 3685 if err := m.TokenIds[len(m.TokenIds)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3686 return err 3687 } 3688 iNdEx = postIndex 3689 default: 3690 iNdEx = preIndex 3691 skippy, err := skipGenesis(dAtA[iNdEx:]) 3692 if err != nil { 3693 return err 3694 } 3695 if (skippy < 0) || (iNdEx+skippy) < 0 { 3696 return ErrInvalidLengthGenesis 3697 } 3698 if (iNdEx + skippy) > l { 3699 return io.ErrUnexpectedEOF 3700 } 3701 iNdEx += skippy 3702 } 3703 } 3704 3705 if iNdEx > l { 3706 return io.ErrUnexpectedEOF 3707 } 3708 return nil 3709 } 3710 func (m *NextTokenID) Unmarshal(dAtA []byte) error { 3711 l := len(dAtA) 3712 iNdEx := 0 3713 for iNdEx < l { 3714 preIndex := iNdEx 3715 var wire uint64 3716 for shift := uint(0); ; shift += 7 { 3717 if shift >= 64 { 3718 return ErrIntOverflowGenesis 3719 } 3720 if iNdEx >= l { 3721 return io.ErrUnexpectedEOF 3722 } 3723 b := dAtA[iNdEx] 3724 iNdEx++ 3725 wire |= uint64(b&0x7F) << shift 3726 if b < 0x80 { 3727 break 3728 } 3729 } 3730 fieldNum := int32(wire >> 3) 3731 wireType := int(wire & 0x7) 3732 if wireType == 4 { 3733 return fmt.Errorf("proto: NextTokenID: wiretype end group for non-group") 3734 } 3735 if fieldNum <= 0 { 3736 return fmt.Errorf("proto: NextTokenID: illegal tag %d (wire type %d)", fieldNum, wire) 3737 } 3738 switch fieldNum { 3739 case 1: 3740 if wireType != 2 { 3741 return fmt.Errorf("proto: wrong wireType = %d for field ClassId", wireType) 3742 } 3743 var stringLen uint64 3744 for shift := uint(0); ; shift += 7 { 3745 if shift >= 64 { 3746 return ErrIntOverflowGenesis 3747 } 3748 if iNdEx >= l { 3749 return io.ErrUnexpectedEOF 3750 } 3751 b := dAtA[iNdEx] 3752 iNdEx++ 3753 stringLen |= uint64(b&0x7F) << shift 3754 if b < 0x80 { 3755 break 3756 } 3757 } 3758 intStringLen := int(stringLen) 3759 if intStringLen < 0 { 3760 return ErrInvalidLengthGenesis 3761 } 3762 postIndex := iNdEx + intStringLen 3763 if postIndex < 0 { 3764 return ErrInvalidLengthGenesis 3765 } 3766 if postIndex > l { 3767 return io.ErrUnexpectedEOF 3768 } 3769 m.ClassId = string(dAtA[iNdEx:postIndex]) 3770 iNdEx = postIndex 3771 case 2: 3772 if wireType != 2 { 3773 return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) 3774 } 3775 var stringLen uint64 3776 for shift := uint(0); ; shift += 7 { 3777 if shift >= 64 { 3778 return ErrIntOverflowGenesis 3779 } 3780 if iNdEx >= l { 3781 return io.ErrUnexpectedEOF 3782 } 3783 b := dAtA[iNdEx] 3784 iNdEx++ 3785 stringLen |= uint64(b&0x7F) << shift 3786 if b < 0x80 { 3787 break 3788 } 3789 } 3790 intStringLen := int(stringLen) 3791 if intStringLen < 0 { 3792 return ErrInvalidLengthGenesis 3793 } 3794 postIndex := iNdEx + intStringLen 3795 if postIndex < 0 { 3796 return ErrInvalidLengthGenesis 3797 } 3798 if postIndex > l { 3799 return io.ErrUnexpectedEOF 3800 } 3801 if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3802 return err 3803 } 3804 iNdEx = postIndex 3805 default: 3806 iNdEx = preIndex 3807 skippy, err := skipGenesis(dAtA[iNdEx:]) 3808 if err != nil { 3809 return err 3810 } 3811 if (skippy < 0) || (iNdEx+skippy) < 0 { 3812 return ErrInvalidLengthGenesis 3813 } 3814 if (iNdEx + skippy) > l { 3815 return io.ErrUnexpectedEOF 3816 } 3817 iNdEx += skippy 3818 } 3819 } 3820 3821 if iNdEx > l { 3822 return io.ErrUnexpectedEOF 3823 } 3824 return nil 3825 } 3826 func (m *ContractTokenRelations) Unmarshal(dAtA []byte) error { 3827 l := len(dAtA) 3828 iNdEx := 0 3829 for iNdEx < l { 3830 preIndex := iNdEx 3831 var wire uint64 3832 for shift := uint(0); ; shift += 7 { 3833 if shift >= 64 { 3834 return ErrIntOverflowGenesis 3835 } 3836 if iNdEx >= l { 3837 return io.ErrUnexpectedEOF 3838 } 3839 b := dAtA[iNdEx] 3840 iNdEx++ 3841 wire |= uint64(b&0x7F) << shift 3842 if b < 0x80 { 3843 break 3844 } 3845 } 3846 fieldNum := int32(wire >> 3) 3847 wireType := int(wire & 0x7) 3848 if wireType == 4 { 3849 return fmt.Errorf("proto: ContractTokenRelations: wiretype end group for non-group") 3850 } 3851 if fieldNum <= 0 { 3852 return fmt.Errorf("proto: ContractTokenRelations: illegal tag %d (wire type %d)", fieldNum, wire) 3853 } 3854 switch fieldNum { 3855 case 1: 3856 if wireType != 2 { 3857 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 3858 } 3859 var stringLen uint64 3860 for shift := uint(0); ; shift += 7 { 3861 if shift >= 64 { 3862 return ErrIntOverflowGenesis 3863 } 3864 if iNdEx >= l { 3865 return io.ErrUnexpectedEOF 3866 } 3867 b := dAtA[iNdEx] 3868 iNdEx++ 3869 stringLen |= uint64(b&0x7F) << shift 3870 if b < 0x80 { 3871 break 3872 } 3873 } 3874 intStringLen := int(stringLen) 3875 if intStringLen < 0 { 3876 return ErrInvalidLengthGenesis 3877 } 3878 postIndex := iNdEx + intStringLen 3879 if postIndex < 0 { 3880 return ErrInvalidLengthGenesis 3881 } 3882 if postIndex > l { 3883 return io.ErrUnexpectedEOF 3884 } 3885 m.ContractId = string(dAtA[iNdEx:postIndex]) 3886 iNdEx = postIndex 3887 case 2: 3888 if wireType != 2 { 3889 return fmt.Errorf("proto: wrong wireType = %d for field Relations", wireType) 3890 } 3891 var msglen int 3892 for shift := uint(0); ; shift += 7 { 3893 if shift >= 64 { 3894 return ErrIntOverflowGenesis 3895 } 3896 if iNdEx >= l { 3897 return io.ErrUnexpectedEOF 3898 } 3899 b := dAtA[iNdEx] 3900 iNdEx++ 3901 msglen |= int(b&0x7F) << shift 3902 if b < 0x80 { 3903 break 3904 } 3905 } 3906 if msglen < 0 { 3907 return ErrInvalidLengthGenesis 3908 } 3909 postIndex := iNdEx + msglen 3910 if postIndex < 0 { 3911 return ErrInvalidLengthGenesis 3912 } 3913 if postIndex > l { 3914 return io.ErrUnexpectedEOF 3915 } 3916 m.Relations = append(m.Relations, TokenRelation{}) 3917 if err := m.Relations[len(m.Relations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 3918 return err 3919 } 3920 iNdEx = postIndex 3921 default: 3922 iNdEx = preIndex 3923 skippy, err := skipGenesis(dAtA[iNdEx:]) 3924 if err != nil { 3925 return err 3926 } 3927 if (skippy < 0) || (iNdEx+skippy) < 0 { 3928 return ErrInvalidLengthGenesis 3929 } 3930 if (iNdEx + skippy) > l { 3931 return io.ErrUnexpectedEOF 3932 } 3933 iNdEx += skippy 3934 } 3935 } 3936 3937 if iNdEx > l { 3938 return io.ErrUnexpectedEOF 3939 } 3940 return nil 3941 } 3942 func (m *TokenRelation) Unmarshal(dAtA []byte) error { 3943 l := len(dAtA) 3944 iNdEx := 0 3945 for iNdEx < l { 3946 preIndex := iNdEx 3947 var wire uint64 3948 for shift := uint(0); ; shift += 7 { 3949 if shift >= 64 { 3950 return ErrIntOverflowGenesis 3951 } 3952 if iNdEx >= l { 3953 return io.ErrUnexpectedEOF 3954 } 3955 b := dAtA[iNdEx] 3956 iNdEx++ 3957 wire |= uint64(b&0x7F) << shift 3958 if b < 0x80 { 3959 break 3960 } 3961 } 3962 fieldNum := int32(wire >> 3) 3963 wireType := int(wire & 0x7) 3964 if wireType == 4 { 3965 return fmt.Errorf("proto: TokenRelation: wiretype end group for non-group") 3966 } 3967 if fieldNum <= 0 { 3968 return fmt.Errorf("proto: TokenRelation: illegal tag %d (wire type %d)", fieldNum, wire) 3969 } 3970 switch fieldNum { 3971 case 1: 3972 if wireType != 2 { 3973 return fmt.Errorf("proto: wrong wireType = %d for field Self", wireType) 3974 } 3975 var stringLen uint64 3976 for shift := uint(0); ; shift += 7 { 3977 if shift >= 64 { 3978 return ErrIntOverflowGenesis 3979 } 3980 if iNdEx >= l { 3981 return io.ErrUnexpectedEOF 3982 } 3983 b := dAtA[iNdEx] 3984 iNdEx++ 3985 stringLen |= uint64(b&0x7F) << shift 3986 if b < 0x80 { 3987 break 3988 } 3989 } 3990 intStringLen := int(stringLen) 3991 if intStringLen < 0 { 3992 return ErrInvalidLengthGenesis 3993 } 3994 postIndex := iNdEx + intStringLen 3995 if postIndex < 0 { 3996 return ErrInvalidLengthGenesis 3997 } 3998 if postIndex > l { 3999 return io.ErrUnexpectedEOF 4000 } 4001 m.Self = string(dAtA[iNdEx:postIndex]) 4002 iNdEx = postIndex 4003 case 2: 4004 if wireType != 2 { 4005 return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType) 4006 } 4007 var stringLen uint64 4008 for shift := uint(0); ; shift += 7 { 4009 if shift >= 64 { 4010 return ErrIntOverflowGenesis 4011 } 4012 if iNdEx >= l { 4013 return io.ErrUnexpectedEOF 4014 } 4015 b := dAtA[iNdEx] 4016 iNdEx++ 4017 stringLen |= uint64(b&0x7F) << shift 4018 if b < 0x80 { 4019 break 4020 } 4021 } 4022 intStringLen := int(stringLen) 4023 if intStringLen < 0 { 4024 return ErrInvalidLengthGenesis 4025 } 4026 postIndex := iNdEx + intStringLen 4027 if postIndex < 0 { 4028 return ErrInvalidLengthGenesis 4029 } 4030 if postIndex > l { 4031 return io.ErrUnexpectedEOF 4032 } 4033 m.Other = string(dAtA[iNdEx:postIndex]) 4034 iNdEx = postIndex 4035 default: 4036 iNdEx = preIndex 4037 skippy, err := skipGenesis(dAtA[iNdEx:]) 4038 if err != nil { 4039 return err 4040 } 4041 if (skippy < 0) || (iNdEx+skippy) < 0 { 4042 return ErrInvalidLengthGenesis 4043 } 4044 if (iNdEx + skippy) > l { 4045 return io.ErrUnexpectedEOF 4046 } 4047 iNdEx += skippy 4048 } 4049 } 4050 4051 if iNdEx > l { 4052 return io.ErrUnexpectedEOF 4053 } 4054 return nil 4055 } 4056 func skipGenesis(dAtA []byte) (n int, err error) { 4057 l := len(dAtA) 4058 iNdEx := 0 4059 depth := 0 4060 for iNdEx < l { 4061 var wire uint64 4062 for shift := uint(0); ; shift += 7 { 4063 if shift >= 64 { 4064 return 0, ErrIntOverflowGenesis 4065 } 4066 if iNdEx >= l { 4067 return 0, io.ErrUnexpectedEOF 4068 } 4069 b := dAtA[iNdEx] 4070 iNdEx++ 4071 wire |= (uint64(b) & 0x7F) << shift 4072 if b < 0x80 { 4073 break 4074 } 4075 } 4076 wireType := int(wire & 0x7) 4077 switch wireType { 4078 case 0: 4079 for shift := uint(0); ; shift += 7 { 4080 if shift >= 64 { 4081 return 0, ErrIntOverflowGenesis 4082 } 4083 if iNdEx >= l { 4084 return 0, io.ErrUnexpectedEOF 4085 } 4086 iNdEx++ 4087 if dAtA[iNdEx-1] < 0x80 { 4088 break 4089 } 4090 } 4091 case 1: 4092 iNdEx += 8 4093 case 2: 4094 var length int 4095 for shift := uint(0); ; shift += 7 { 4096 if shift >= 64 { 4097 return 0, ErrIntOverflowGenesis 4098 } 4099 if iNdEx >= l { 4100 return 0, io.ErrUnexpectedEOF 4101 } 4102 b := dAtA[iNdEx] 4103 iNdEx++ 4104 length |= (int(b) & 0x7F) << shift 4105 if b < 0x80 { 4106 break 4107 } 4108 } 4109 if length < 0 { 4110 return 0, ErrInvalidLengthGenesis 4111 } 4112 iNdEx += length 4113 case 3: 4114 depth++ 4115 case 4: 4116 if depth == 0 { 4117 return 0, ErrUnexpectedEndOfGroupGenesis 4118 } 4119 depth-- 4120 case 5: 4121 iNdEx += 4 4122 default: 4123 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 4124 } 4125 if iNdEx < 0 { 4126 return 0, ErrInvalidLengthGenesis 4127 } 4128 if depth == 0 { 4129 return iNdEx, nil 4130 } 4131 } 4132 return 0, io.ErrUnexpectedEOF 4133 } 4134 4135 var ( 4136 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 4137 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 4138 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 4139 )