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