github.com/Finschia/finschia-sdk@v0.48.1/x/token/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/token/v1/genesis.proto 3 4 package token 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 io "io" 12 math "math" 13 math_bits "math/bits" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 26 27 // GenesisState defines the token module's genesis state. 28 type GenesisState struct { 29 // params defines all the paramaters of the module. 30 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 31 // class_state is the class keeper's genesis state. 32 ClassState *ClassGenesisState `protobuf:"bytes,2,opt,name=class_state,json=classState,proto3" json:"class_state,omitempty"` 33 // balances is an array containing the balances of all the accounts. 34 Balances []ContractBalances `protobuf:"bytes,3,rep,name=balances,proto3" json:"balances"` 35 // classes defines the metadata of the differents tokens. 36 Classes []Contract `protobuf:"bytes,4,rep,name=classes,proto3" json:"classes"` 37 // grants defines the grant information. 38 Grants []ContractGrants `protobuf:"bytes,5,rep,name=grants,proto3" json:"grants"` 39 // authorizations defines the approve information. 40 Authorizations []ContractAuthorizations `protobuf:"bytes,6,rep,name=authorizations,proto3" json:"authorizations"` 41 // supplies represents the total supplies of tokens. 42 Supplies []ContractCoin `protobuf:"bytes,7,rep,name=supplies,proto3" json:"supplies"` 43 // mints represents the total mints of tokens. 44 Mints []ContractCoin `protobuf:"bytes,8,rep,name=mints,proto3" json:"mints"` 45 // burns represents the total burns of tokens. 46 Burns []ContractCoin `protobuf:"bytes,9,rep,name=burns,proto3" json:"burns"` 47 } 48 49 func (m *GenesisState) Reset() { *m = GenesisState{} } 50 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 51 func (*GenesisState) ProtoMessage() {} 52 func (*GenesisState) Descriptor() ([]byte, []int) { 53 return fileDescriptor_4528f1ba25ef9938, []int{0} 54 } 55 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 56 return m.Unmarshal(b) 57 } 58 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 59 if deterministic { 60 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 61 } else { 62 b = b[:cap(b)] 63 n, err := m.MarshalToSizedBuffer(b) 64 if err != nil { 65 return nil, err 66 } 67 return b[:n], nil 68 } 69 } 70 func (m *GenesisState) XXX_Merge(src proto.Message) { 71 xxx_messageInfo_GenesisState.Merge(m, src) 72 } 73 func (m *GenesisState) XXX_Size() int { 74 return m.Size() 75 } 76 func (m *GenesisState) XXX_DiscardUnknown() { 77 xxx_messageInfo_GenesisState.DiscardUnknown(m) 78 } 79 80 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 81 82 func (m *GenesisState) GetParams() Params { 83 if m != nil { 84 return m.Params 85 } 86 return Params{} 87 } 88 89 func (m *GenesisState) GetClassState() *ClassGenesisState { 90 if m != nil { 91 return m.ClassState 92 } 93 return nil 94 } 95 96 func (m *GenesisState) GetBalances() []ContractBalances { 97 if m != nil { 98 return m.Balances 99 } 100 return nil 101 } 102 103 func (m *GenesisState) GetClasses() []Contract { 104 if m != nil { 105 return m.Classes 106 } 107 return nil 108 } 109 110 func (m *GenesisState) GetGrants() []ContractGrants { 111 if m != nil { 112 return m.Grants 113 } 114 return nil 115 } 116 117 func (m *GenesisState) GetAuthorizations() []ContractAuthorizations { 118 if m != nil { 119 return m.Authorizations 120 } 121 return nil 122 } 123 124 func (m *GenesisState) GetSupplies() []ContractCoin { 125 if m != nil { 126 return m.Supplies 127 } 128 return nil 129 } 130 131 func (m *GenesisState) GetMints() []ContractCoin { 132 if m != nil { 133 return m.Mints 134 } 135 return nil 136 } 137 138 func (m *GenesisState) GetBurns() []ContractCoin { 139 if m != nil { 140 return m.Burns 141 } 142 return nil 143 } 144 145 // ClassGenesisState defines the classs keeper's genesis state. 146 type ClassGenesisState struct { 147 // nonce is the next class nonce to issue. 148 Nonce github_com_Finschia_finschia_sdk_types.Uint `protobuf:"bytes,1,opt,name=nonce,proto3,customtype=github.com/Finschia/finschia-sdk/types.Uint" json:"nonce"` 149 // ids represents the issued ids. 150 Ids []string `protobuf:"bytes,2,rep,name=ids,proto3" json:"ids,omitempty"` 151 } 152 153 func (m *ClassGenesisState) Reset() { *m = ClassGenesisState{} } 154 func (m *ClassGenesisState) String() string { return proto.CompactTextString(m) } 155 func (*ClassGenesisState) ProtoMessage() {} 156 func (*ClassGenesisState) Descriptor() ([]byte, []int) { 157 return fileDescriptor_4528f1ba25ef9938, []int{1} 158 } 159 func (m *ClassGenesisState) XXX_Unmarshal(b []byte) error { 160 return m.Unmarshal(b) 161 } 162 func (m *ClassGenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 163 if deterministic { 164 return xxx_messageInfo_ClassGenesisState.Marshal(b, m, deterministic) 165 } else { 166 b = b[:cap(b)] 167 n, err := m.MarshalToSizedBuffer(b) 168 if err != nil { 169 return nil, err 170 } 171 return b[:n], nil 172 } 173 } 174 func (m *ClassGenesisState) XXX_Merge(src proto.Message) { 175 xxx_messageInfo_ClassGenesisState.Merge(m, src) 176 } 177 func (m *ClassGenesisState) XXX_Size() int { 178 return m.Size() 179 } 180 func (m *ClassGenesisState) XXX_DiscardUnknown() { 181 xxx_messageInfo_ClassGenesisState.DiscardUnknown(m) 182 } 183 184 var xxx_messageInfo_ClassGenesisState proto.InternalMessageInfo 185 186 func (m *ClassGenesisState) GetIds() []string { 187 if m != nil { 188 return m.Ids 189 } 190 return nil 191 } 192 193 // ContractBalances defines balances belong to a contract. 194 // genesis state. 195 type ContractBalances struct { 196 // contract id associated with the token class. 197 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 198 // balances of the contract. 199 Balances []Balance `protobuf:"bytes,2,rep,name=balances,proto3" json:"balances"` 200 } 201 202 func (m *ContractBalances) Reset() { *m = ContractBalances{} } 203 func (m *ContractBalances) String() string { return proto.CompactTextString(m) } 204 func (*ContractBalances) ProtoMessage() {} 205 func (*ContractBalances) Descriptor() ([]byte, []int) { 206 return fileDescriptor_4528f1ba25ef9938, []int{2} 207 } 208 func (m *ContractBalances) XXX_Unmarshal(b []byte) error { 209 return m.Unmarshal(b) 210 } 211 func (m *ContractBalances) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 212 if deterministic { 213 return xxx_messageInfo_ContractBalances.Marshal(b, m, deterministic) 214 } else { 215 b = b[:cap(b)] 216 n, err := m.MarshalToSizedBuffer(b) 217 if err != nil { 218 return nil, err 219 } 220 return b[:n], nil 221 } 222 } 223 func (m *ContractBalances) XXX_Merge(src proto.Message) { 224 xxx_messageInfo_ContractBalances.Merge(m, src) 225 } 226 func (m *ContractBalances) XXX_Size() int { 227 return m.Size() 228 } 229 func (m *ContractBalances) XXX_DiscardUnknown() { 230 xxx_messageInfo_ContractBalances.DiscardUnknown(m) 231 } 232 233 var xxx_messageInfo_ContractBalances proto.InternalMessageInfo 234 235 func (m *ContractBalances) GetContractId() string { 236 if m != nil { 237 return m.ContractId 238 } 239 return "" 240 } 241 242 func (m *ContractBalances) GetBalances() []Balance { 243 if m != nil { 244 return m.Balances 245 } 246 return nil 247 } 248 249 // Balance defines a balance of an address. 250 type Balance struct { 251 // address of the holder. 252 Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` 253 // amount of the balance. 254 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"` 255 } 256 257 func (m *Balance) Reset() { *m = Balance{} } 258 func (m *Balance) String() string { return proto.CompactTextString(m) } 259 func (*Balance) ProtoMessage() {} 260 func (*Balance) Descriptor() ([]byte, []int) { 261 return fileDescriptor_4528f1ba25ef9938, []int{3} 262 } 263 func (m *Balance) XXX_Unmarshal(b []byte) error { 264 return m.Unmarshal(b) 265 } 266 func (m *Balance) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 267 if deterministic { 268 return xxx_messageInfo_Balance.Marshal(b, m, deterministic) 269 } else { 270 b = b[:cap(b)] 271 n, err := m.MarshalToSizedBuffer(b) 272 if err != nil { 273 return nil, err 274 } 275 return b[:n], nil 276 } 277 } 278 func (m *Balance) XXX_Merge(src proto.Message) { 279 xxx_messageInfo_Balance.Merge(m, src) 280 } 281 func (m *Balance) XXX_Size() int { 282 return m.Size() 283 } 284 func (m *Balance) XXX_DiscardUnknown() { 285 xxx_messageInfo_Balance.DiscardUnknown(m) 286 } 287 288 var xxx_messageInfo_Balance proto.InternalMessageInfo 289 290 func (m *Balance) GetAddress() string { 291 if m != nil { 292 return m.Address 293 } 294 return "" 295 } 296 297 // ContractAuthorizations defines authorizations belong to a contract. 298 type ContractAuthorizations struct { 299 // contract id associated with the token class. 300 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 301 // authorizations of the contract. 302 Authorizations []Authorization `protobuf:"bytes,2,rep,name=authorizations,proto3" json:"authorizations"` 303 } 304 305 func (m *ContractAuthorizations) Reset() { *m = ContractAuthorizations{} } 306 func (m *ContractAuthorizations) String() string { return proto.CompactTextString(m) } 307 func (*ContractAuthorizations) ProtoMessage() {} 308 func (*ContractAuthorizations) Descriptor() ([]byte, []int) { 309 return fileDescriptor_4528f1ba25ef9938, []int{4} 310 } 311 func (m *ContractAuthorizations) XXX_Unmarshal(b []byte) error { 312 return m.Unmarshal(b) 313 } 314 func (m *ContractAuthorizations) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 315 if deterministic { 316 return xxx_messageInfo_ContractAuthorizations.Marshal(b, m, deterministic) 317 } else { 318 b = b[:cap(b)] 319 n, err := m.MarshalToSizedBuffer(b) 320 if err != nil { 321 return nil, err 322 } 323 return b[:n], nil 324 } 325 } 326 func (m *ContractAuthorizations) XXX_Merge(src proto.Message) { 327 xxx_messageInfo_ContractAuthorizations.Merge(m, src) 328 } 329 func (m *ContractAuthorizations) XXX_Size() int { 330 return m.Size() 331 } 332 func (m *ContractAuthorizations) XXX_DiscardUnknown() { 333 xxx_messageInfo_ContractAuthorizations.DiscardUnknown(m) 334 } 335 336 var xxx_messageInfo_ContractAuthorizations proto.InternalMessageInfo 337 338 func (m *ContractAuthorizations) GetContractId() string { 339 if m != nil { 340 return m.ContractId 341 } 342 return "" 343 } 344 345 func (m *ContractAuthorizations) GetAuthorizations() []Authorization { 346 if m != nil { 347 return m.Authorizations 348 } 349 return nil 350 } 351 352 // ContractGrant defines grants belong to a contract. 353 type ContractGrants struct { 354 // contract id associated with the token class. 355 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 356 // grants of the contract. 357 Grants []Grant `protobuf:"bytes,2,rep,name=grants,proto3" json:"grants"` 358 } 359 360 func (m *ContractGrants) Reset() { *m = ContractGrants{} } 361 func (m *ContractGrants) String() string { return proto.CompactTextString(m) } 362 func (*ContractGrants) ProtoMessage() {} 363 func (*ContractGrants) Descriptor() ([]byte, []int) { 364 return fileDescriptor_4528f1ba25ef9938, []int{5} 365 } 366 func (m *ContractGrants) XXX_Unmarshal(b []byte) error { 367 return m.Unmarshal(b) 368 } 369 func (m *ContractGrants) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 370 if deterministic { 371 return xxx_messageInfo_ContractGrants.Marshal(b, m, deterministic) 372 } else { 373 b = b[:cap(b)] 374 n, err := m.MarshalToSizedBuffer(b) 375 if err != nil { 376 return nil, err 377 } 378 return b[:n], nil 379 } 380 } 381 func (m *ContractGrants) XXX_Merge(src proto.Message) { 382 xxx_messageInfo_ContractGrants.Merge(m, src) 383 } 384 func (m *ContractGrants) XXX_Size() int { 385 return m.Size() 386 } 387 func (m *ContractGrants) XXX_DiscardUnknown() { 388 xxx_messageInfo_ContractGrants.DiscardUnknown(m) 389 } 390 391 var xxx_messageInfo_ContractGrants proto.InternalMessageInfo 392 393 func (m *ContractGrants) GetContractId() string { 394 if m != nil { 395 return m.ContractId 396 } 397 return "" 398 } 399 400 func (m *ContractGrants) GetGrants() []Grant { 401 if m != nil { 402 return m.Grants 403 } 404 return nil 405 } 406 407 type ContractCoin struct { 408 // contract id associated with the token class. 409 ContractId string `protobuf:"bytes,1,opt,name=contract_id,json=contractId,proto3" json:"contract_id,omitempty"` 410 // amount of the token. 411 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"` 412 } 413 414 func (m *ContractCoin) Reset() { *m = ContractCoin{} } 415 func (m *ContractCoin) String() string { return proto.CompactTextString(m) } 416 func (*ContractCoin) ProtoMessage() {} 417 func (*ContractCoin) Descriptor() ([]byte, []int) { 418 return fileDescriptor_4528f1ba25ef9938, []int{6} 419 } 420 func (m *ContractCoin) XXX_Unmarshal(b []byte) error { 421 return m.Unmarshal(b) 422 } 423 func (m *ContractCoin) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 424 if deterministic { 425 return xxx_messageInfo_ContractCoin.Marshal(b, m, deterministic) 426 } else { 427 b = b[:cap(b)] 428 n, err := m.MarshalToSizedBuffer(b) 429 if err != nil { 430 return nil, err 431 } 432 return b[:n], nil 433 } 434 } 435 func (m *ContractCoin) XXX_Merge(src proto.Message) { 436 xxx_messageInfo_ContractCoin.Merge(m, src) 437 } 438 func (m *ContractCoin) XXX_Size() int { 439 return m.Size() 440 } 441 func (m *ContractCoin) XXX_DiscardUnknown() { 442 xxx_messageInfo_ContractCoin.DiscardUnknown(m) 443 } 444 445 var xxx_messageInfo_ContractCoin proto.InternalMessageInfo 446 447 func (m *ContractCoin) GetContractId() string { 448 if m != nil { 449 return m.ContractId 450 } 451 return "" 452 } 453 454 func init() { 455 proto.RegisterType((*GenesisState)(nil), "lbm.token.v1.GenesisState") 456 proto.RegisterType((*ClassGenesisState)(nil), "lbm.token.v1.ClassGenesisState") 457 proto.RegisterType((*ContractBalances)(nil), "lbm.token.v1.ContractBalances") 458 proto.RegisterType((*Balance)(nil), "lbm.token.v1.Balance") 459 proto.RegisterType((*ContractAuthorizations)(nil), "lbm.token.v1.ContractAuthorizations") 460 proto.RegisterType((*ContractGrants)(nil), "lbm.token.v1.ContractGrants") 461 proto.RegisterType((*ContractCoin)(nil), "lbm.token.v1.ContractCoin") 462 } 463 464 func init() { proto.RegisterFile("lbm/token/v1/genesis.proto", fileDescriptor_4528f1ba25ef9938) } 465 466 var fileDescriptor_4528f1ba25ef9938 = []byte{ 467 // 579 bytes of a gzipped FileDescriptorProto 468 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xcd, 0x6e, 0xd3, 0x40, 469 0x14, 0x85, 0xe3, 0x26, 0x4d, 0x9a, 0x9b, 0xaa, 0x2a, 0x43, 0xa9, 0xac, 0x80, 0x9c, 0xca, 0x62, 470 0x11, 0x81, 0xb0, 0x95, 0x54, 0x2a, 0x52, 0xc5, 0xa2, 0xb8, 0x12, 0x55, 0x58, 0x21, 0x23, 0x36, 471 0x6c, 0xaa, 0xf1, 0x0f, 0xc9, 0xa8, 0xf6, 0x8c, 0xe5, 0x19, 0x57, 0xfc, 0x6c, 0x79, 0x00, 0x1e, 472 0x81, 0x07, 0xe1, 0x01, 0xba, 0xec, 0x12, 0xb1, 0xa8, 0x50, 0xb2, 0xe1, 0x31, 0x90, 0x67, 0xec, 473 0x2a, 0x4e, 0x83, 0x92, 0x05, 0xbb, 0x89, 0xef, 0x39, 0xdf, 0xcd, 0xb1, 0x8f, 0x0d, 0xdd, 0xc8, 474 0x8b, 0x6d, 0xc1, 0x2e, 0x42, 0x6a, 0x5f, 0x0e, 0xec, 0x71, 0x48, 0x43, 0x4e, 0xb8, 0x95, 0xa4, 475 0x4c, 0x30, 0xb4, 0x1d, 0x79, 0xb1, 0x25, 0x67, 0xd6, 0xe5, 0xa0, 0xbb, 0x37, 0x66, 0x63, 0x26, 476 0x07, 0x76, 0x7e, 0x52, 0x9a, 0xae, 0x5e, 0xf1, 0x2b, 0xb1, 0x9c, 0x98, 0x3f, 0x1a, 0xb0, 0x7d, 477 0xa6, 0x78, 0x6f, 0x05, 0x16, 0x21, 0x1a, 0x42, 0x33, 0xc1, 0x29, 0x8e, 0xb9, 0xae, 0x1d, 0x68, 478 0xfd, 0xce, 0x70, 0xcf, 0x9a, 0xe7, 0x5b, 0x6f, 0xe4, 0xcc, 0x69, 0x5c, 0xdd, 0xf4, 0x6a, 0x6e, 479 0xa1, 0x44, 0x27, 0xd0, 0xf1, 0x23, 0xcc, 0xf9, 0x39, 0xcf, 0x11, 0xfa, 0x86, 0x34, 0xf6, 0xaa, 480 0xc6, 0xd3, 0x5c, 0x30, 0xbf, 0xc9, 0x05, 0xe9, 0x51, 0x5b, 0x4f, 0x60, 0xcb, 0xc3, 0x11, 0xa6, 481 0x7e, 0xc8, 0xf5, 0xfa, 0x41, 0xbd, 0xdf, 0x19, 0x1a, 0x0b, 0x76, 0x46, 0x45, 0x8a, 0x7d, 0xe1, 482 0x14, 0xaa, 0xe2, 0x1f, 0xdc, 0xba, 0xd0, 0x11, 0xb4, 0x24, 0x2f, 0xe4, 0x7a, 0x43, 0x02, 0xf6, 483 0xff, 0x01, 0x50, 0xc6, 0x52, 0x8c, 0x8e, 0xa1, 0x39, 0x4e, 0x31, 0x15, 0x5c, 0xdf, 0x94, 0xb6, 484 0x47, 0xcb, 0x6d, 0x67, 0x52, 0x53, 0xe6, 0x56, 0x0e, 0xe4, 0xc2, 0x0e, 0xce, 0xc4, 0x84, 0xa5, 485 0xe4, 0x33, 0x16, 0x84, 0x51, 0xae, 0x37, 0x25, 0xe3, 0xf1, 0x72, 0xc6, 0xcb, 0x8a, 0xb6, 0x60, 486 0x2d, 0x10, 0xd0, 0x0b, 0xd8, 0xe2, 0x59, 0x92, 0x44, 0x24, 0xe4, 0x7a, 0x4b, 0xd2, 0xba, 0xcb, 487 0x69, 0xa7, 0x8c, 0xd0, 0xf2, 0x2e, 0x94, 0x0e, 0x74, 0x04, 0x9b, 0x31, 0xc9, 0xc3, 0x6c, 0xad, 488 0x69, 0x55, 0xf2, 0xdc, 0xe7, 0x65, 0x29, 0xe5, 0x7a, 0x7b, 0x5d, 0x9f, 0x94, 0x9b, 0x09, 0xdc, 489 0xbb, 0xf3, 0x60, 0xd1, 0x08, 0x36, 0x29, 0xa3, 0x7e, 0x28, 0x1b, 0xd4, 0x76, 0x0e, 0x73, 0xc3, 490 0xaf, 0x9b, 0xde, 0xd3, 0x31, 0x11, 0x93, 0xcc, 0xb3, 0x7c, 0x16, 0xdb, 0xaf, 0x08, 0xe5, 0xfe, 491 0x84, 0x60, 0xfb, 0x43, 0x71, 0x78, 0xc6, 0x83, 0x0b, 0x5b, 0x7c, 0x4a, 0x42, 0x6e, 0xbd, 0x23, 492 0x54, 0xb8, 0x8a, 0x80, 0x76, 0xa1, 0x4e, 0x02, 0xae, 0x6f, 0x1c, 0xd4, 0xfb, 0x6d, 0x37, 0x3f, 493 0x9a, 0x11, 0xec, 0x2e, 0x76, 0x01, 0xf5, 0xa0, 0xe3, 0x17, 0xd7, 0xce, 0x49, 0xa0, 0xd6, 0xba, 494 0x50, 0x5e, 0x1a, 0x05, 0xe8, 0xf9, 0x5c, 0xbd, 0x36, 0x64, 0xc2, 0x07, 0xd5, 0x84, 0x05, 0x6a, 495 0xb1, 0x55, 0x66, 0x06, 0xad, 0x62, 0x84, 0x74, 0x68, 0xe1, 0x20, 0x48, 0x43, 0xce, 0x8b, 0x05, 496 0xe5, 0x4f, 0xf4, 0x1a, 0x9a, 0x38, 0x66, 0x19, 0x15, 0xb2, 0xf9, 0x6d, 0x67, 0x58, 0x04, 0x7e, 497 0xb2, 0x66, 0xe0, 0x11, 0x15, 0x6e, 0x41, 0x38, 0x6e, 0xfc, 0xf9, 0xde, 0xd3, 0xcc, 0xaf, 0x1a, 498 0xec, 0x2f, 0x6f, 0xcd, 0xea, 0xac, 0xa3, 0x3b, 0xa5, 0x54, 0x89, 0x1f, 0x56, 0x13, 0x57, 0xb0, 499 0xcb, 0xbb, 0x68, 0x06, 0xb0, 0x53, 0xed, 0xff, 0xea, 0xed, 0x83, 0xdb, 0xd7, 0x49, 0x6d, 0xbd, 500 0x5f, 0xdd, 0x2a, 0x31, 0xd5, 0xb7, 0xc8, 0xfc, 0x02, 0xdb, 0xf3, 0x05, 0x5b, 0xbd, 0xe3, 0x3f, 501 0xde, 0x6f, 0xc7, 0xb9, 0x9a, 0x1a, 0xda, 0xf5, 0xd4, 0xd0, 0x7e, 0x4f, 0x0d, 0xed, 0xdb, 0xcc, 502 0xa8, 0x5d, 0xcf, 0x8c, 0xda, 0xcf, 0x99, 0x51, 0x7b, 0xdf, 0x5f, 0x49, 0xfb, 0xa8, 0xbe, 0xa4, 503 0x5e, 0x53, 0x7e, 0x4a, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x03, 0xc1, 0x84, 0x15, 0xa6, 504 0x05, 0x00, 0x00, 505 } 506 507 func (this *Balance) Equal(that interface{}) bool { 508 if that == nil { 509 return this == nil 510 } 511 512 that1, ok := that.(*Balance) 513 if !ok { 514 that2, ok := that.(Balance) 515 if ok { 516 that1 = &that2 517 } else { 518 return false 519 } 520 } 521 if that1 == nil { 522 return this == nil 523 } else if this == nil { 524 return false 525 } 526 if this.Address != that1.Address { 527 return false 528 } 529 if !this.Amount.Equal(that1.Amount) { 530 return false 531 } 532 return true 533 } 534 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 535 size := m.Size() 536 dAtA = make([]byte, size) 537 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 538 if err != nil { 539 return nil, err 540 } 541 return dAtA[:n], nil 542 } 543 544 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 545 size := m.Size() 546 return m.MarshalToSizedBuffer(dAtA[:size]) 547 } 548 549 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 550 i := len(dAtA) 551 _ = i 552 var l int 553 _ = l 554 if len(m.Burns) > 0 { 555 for iNdEx := len(m.Burns) - 1; iNdEx >= 0; iNdEx-- { 556 { 557 size, err := m.Burns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 558 if err != nil { 559 return 0, err 560 } 561 i -= size 562 i = encodeVarintGenesis(dAtA, i, uint64(size)) 563 } 564 i-- 565 dAtA[i] = 0x4a 566 } 567 } 568 if len(m.Mints) > 0 { 569 for iNdEx := len(m.Mints) - 1; iNdEx >= 0; iNdEx-- { 570 { 571 size, err := m.Mints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 572 if err != nil { 573 return 0, err 574 } 575 i -= size 576 i = encodeVarintGenesis(dAtA, i, uint64(size)) 577 } 578 i-- 579 dAtA[i] = 0x42 580 } 581 } 582 if len(m.Supplies) > 0 { 583 for iNdEx := len(m.Supplies) - 1; iNdEx >= 0; iNdEx-- { 584 { 585 size, err := m.Supplies[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 586 if err != nil { 587 return 0, err 588 } 589 i -= size 590 i = encodeVarintGenesis(dAtA, i, uint64(size)) 591 } 592 i-- 593 dAtA[i] = 0x3a 594 } 595 } 596 if len(m.Authorizations) > 0 { 597 for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { 598 { 599 size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 600 if err != nil { 601 return 0, err 602 } 603 i -= size 604 i = encodeVarintGenesis(dAtA, i, uint64(size)) 605 } 606 i-- 607 dAtA[i] = 0x32 608 } 609 } 610 if len(m.Grants) > 0 { 611 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 612 { 613 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 614 if err != nil { 615 return 0, err 616 } 617 i -= size 618 i = encodeVarintGenesis(dAtA, i, uint64(size)) 619 } 620 i-- 621 dAtA[i] = 0x2a 622 } 623 } 624 if len(m.Classes) > 0 { 625 for iNdEx := len(m.Classes) - 1; iNdEx >= 0; iNdEx-- { 626 { 627 size, err := m.Classes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 628 if err != nil { 629 return 0, err 630 } 631 i -= size 632 i = encodeVarintGenesis(dAtA, i, uint64(size)) 633 } 634 i-- 635 dAtA[i] = 0x22 636 } 637 } 638 if len(m.Balances) > 0 { 639 for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { 640 { 641 size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 642 if err != nil { 643 return 0, err 644 } 645 i -= size 646 i = encodeVarintGenesis(dAtA, i, uint64(size)) 647 } 648 i-- 649 dAtA[i] = 0x1a 650 } 651 } 652 if m.ClassState != nil { 653 { 654 size, err := m.ClassState.MarshalToSizedBuffer(dAtA[:i]) 655 if err != nil { 656 return 0, err 657 } 658 i -= size 659 i = encodeVarintGenesis(dAtA, i, uint64(size)) 660 } 661 i-- 662 dAtA[i] = 0x12 663 } 664 { 665 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 666 if err != nil { 667 return 0, err 668 } 669 i -= size 670 i = encodeVarintGenesis(dAtA, i, uint64(size)) 671 } 672 i-- 673 dAtA[i] = 0xa 674 return len(dAtA) - i, nil 675 } 676 677 func (m *ClassGenesisState) Marshal() (dAtA []byte, err error) { 678 size := m.Size() 679 dAtA = make([]byte, size) 680 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 681 if err != nil { 682 return nil, err 683 } 684 return dAtA[:n], nil 685 } 686 687 func (m *ClassGenesisState) MarshalTo(dAtA []byte) (int, error) { 688 size := m.Size() 689 return m.MarshalToSizedBuffer(dAtA[:size]) 690 } 691 692 func (m *ClassGenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 693 i := len(dAtA) 694 _ = i 695 var l int 696 _ = l 697 if len(m.Ids) > 0 { 698 for iNdEx := len(m.Ids) - 1; iNdEx >= 0; iNdEx-- { 699 i -= len(m.Ids[iNdEx]) 700 copy(dAtA[i:], m.Ids[iNdEx]) 701 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Ids[iNdEx]))) 702 i-- 703 dAtA[i] = 0x12 704 } 705 } 706 { 707 size := m.Nonce.Size() 708 i -= size 709 if _, err := m.Nonce.MarshalTo(dAtA[i:]); err != nil { 710 return 0, err 711 } 712 i = encodeVarintGenesis(dAtA, i, uint64(size)) 713 } 714 i-- 715 dAtA[i] = 0xa 716 return len(dAtA) - i, nil 717 } 718 719 func (m *ContractBalances) Marshal() (dAtA []byte, err error) { 720 size := m.Size() 721 dAtA = make([]byte, size) 722 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 723 if err != nil { 724 return nil, err 725 } 726 return dAtA[:n], nil 727 } 728 729 func (m *ContractBalances) MarshalTo(dAtA []byte) (int, error) { 730 size := m.Size() 731 return m.MarshalToSizedBuffer(dAtA[:size]) 732 } 733 734 func (m *ContractBalances) MarshalToSizedBuffer(dAtA []byte) (int, error) { 735 i := len(dAtA) 736 _ = i 737 var l int 738 _ = l 739 if len(m.Balances) > 0 { 740 for iNdEx := len(m.Balances) - 1; iNdEx >= 0; iNdEx-- { 741 { 742 size, err := m.Balances[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 743 if err != nil { 744 return 0, err 745 } 746 i -= size 747 i = encodeVarintGenesis(dAtA, i, uint64(size)) 748 } 749 i-- 750 dAtA[i] = 0x12 751 } 752 } 753 if len(m.ContractId) > 0 { 754 i -= len(m.ContractId) 755 copy(dAtA[i:], m.ContractId) 756 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 757 i-- 758 dAtA[i] = 0xa 759 } 760 return len(dAtA) - i, nil 761 } 762 763 func (m *Balance) Marshal() (dAtA []byte, err error) { 764 size := m.Size() 765 dAtA = make([]byte, size) 766 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 767 if err != nil { 768 return nil, err 769 } 770 return dAtA[:n], nil 771 } 772 773 func (m *Balance) MarshalTo(dAtA []byte) (int, error) { 774 size := m.Size() 775 return m.MarshalToSizedBuffer(dAtA[:size]) 776 } 777 778 func (m *Balance) MarshalToSizedBuffer(dAtA []byte) (int, error) { 779 i := len(dAtA) 780 _ = i 781 var l int 782 _ = l 783 { 784 size := m.Amount.Size() 785 i -= size 786 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 787 return 0, err 788 } 789 i = encodeVarintGenesis(dAtA, i, uint64(size)) 790 } 791 i-- 792 dAtA[i] = 0x12 793 if len(m.Address) > 0 { 794 i -= len(m.Address) 795 copy(dAtA[i:], m.Address) 796 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Address))) 797 i-- 798 dAtA[i] = 0xa 799 } 800 return len(dAtA) - i, nil 801 } 802 803 func (m *ContractAuthorizations) Marshal() (dAtA []byte, err error) { 804 size := m.Size() 805 dAtA = make([]byte, size) 806 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 807 if err != nil { 808 return nil, err 809 } 810 return dAtA[:n], nil 811 } 812 813 func (m *ContractAuthorizations) MarshalTo(dAtA []byte) (int, error) { 814 size := m.Size() 815 return m.MarshalToSizedBuffer(dAtA[:size]) 816 } 817 818 func (m *ContractAuthorizations) MarshalToSizedBuffer(dAtA []byte) (int, error) { 819 i := len(dAtA) 820 _ = i 821 var l int 822 _ = l 823 if len(m.Authorizations) > 0 { 824 for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { 825 { 826 size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 827 if err != nil { 828 return 0, err 829 } 830 i -= size 831 i = encodeVarintGenesis(dAtA, i, uint64(size)) 832 } 833 i-- 834 dAtA[i] = 0x12 835 } 836 } 837 if len(m.ContractId) > 0 { 838 i -= len(m.ContractId) 839 copy(dAtA[i:], m.ContractId) 840 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 841 i-- 842 dAtA[i] = 0xa 843 } 844 return len(dAtA) - i, nil 845 } 846 847 func (m *ContractGrants) Marshal() (dAtA []byte, err error) { 848 size := m.Size() 849 dAtA = make([]byte, size) 850 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 851 if err != nil { 852 return nil, err 853 } 854 return dAtA[:n], nil 855 } 856 857 func (m *ContractGrants) MarshalTo(dAtA []byte) (int, error) { 858 size := m.Size() 859 return m.MarshalToSizedBuffer(dAtA[:size]) 860 } 861 862 func (m *ContractGrants) MarshalToSizedBuffer(dAtA []byte) (int, error) { 863 i := len(dAtA) 864 _ = i 865 var l int 866 _ = l 867 if len(m.Grants) > 0 { 868 for iNdEx := len(m.Grants) - 1; iNdEx >= 0; iNdEx-- { 869 { 870 size, err := m.Grants[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 871 if err != nil { 872 return 0, err 873 } 874 i -= size 875 i = encodeVarintGenesis(dAtA, i, uint64(size)) 876 } 877 i-- 878 dAtA[i] = 0x12 879 } 880 } 881 if len(m.ContractId) > 0 { 882 i -= len(m.ContractId) 883 copy(dAtA[i:], m.ContractId) 884 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 885 i-- 886 dAtA[i] = 0xa 887 } 888 return len(dAtA) - i, nil 889 } 890 891 func (m *ContractCoin) Marshal() (dAtA []byte, err error) { 892 size := m.Size() 893 dAtA = make([]byte, size) 894 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 895 if err != nil { 896 return nil, err 897 } 898 return dAtA[:n], nil 899 } 900 901 func (m *ContractCoin) MarshalTo(dAtA []byte) (int, error) { 902 size := m.Size() 903 return m.MarshalToSizedBuffer(dAtA[:size]) 904 } 905 906 func (m *ContractCoin) MarshalToSizedBuffer(dAtA []byte) (int, error) { 907 i := len(dAtA) 908 _ = i 909 var l int 910 _ = l 911 { 912 size := m.Amount.Size() 913 i -= size 914 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 915 return 0, err 916 } 917 i = encodeVarintGenesis(dAtA, i, uint64(size)) 918 } 919 i-- 920 dAtA[i] = 0x12 921 if len(m.ContractId) > 0 { 922 i -= len(m.ContractId) 923 copy(dAtA[i:], m.ContractId) 924 i = encodeVarintGenesis(dAtA, i, uint64(len(m.ContractId))) 925 i-- 926 dAtA[i] = 0xa 927 } 928 return len(dAtA) - i, nil 929 } 930 931 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 932 offset -= sovGenesis(v) 933 base := offset 934 for v >= 1<<7 { 935 dAtA[offset] = uint8(v&0x7f | 0x80) 936 v >>= 7 937 offset++ 938 } 939 dAtA[offset] = uint8(v) 940 return base 941 } 942 func (m *GenesisState) Size() (n int) { 943 if m == nil { 944 return 0 945 } 946 var l int 947 _ = l 948 l = m.Params.Size() 949 n += 1 + l + sovGenesis(uint64(l)) 950 if m.ClassState != nil { 951 l = m.ClassState.Size() 952 n += 1 + l + sovGenesis(uint64(l)) 953 } 954 if len(m.Balances) > 0 { 955 for _, e := range m.Balances { 956 l = e.Size() 957 n += 1 + l + sovGenesis(uint64(l)) 958 } 959 } 960 if len(m.Classes) > 0 { 961 for _, e := range m.Classes { 962 l = e.Size() 963 n += 1 + l + sovGenesis(uint64(l)) 964 } 965 } 966 if len(m.Grants) > 0 { 967 for _, e := range m.Grants { 968 l = e.Size() 969 n += 1 + l + sovGenesis(uint64(l)) 970 } 971 } 972 if len(m.Authorizations) > 0 { 973 for _, e := range m.Authorizations { 974 l = e.Size() 975 n += 1 + l + sovGenesis(uint64(l)) 976 } 977 } 978 if len(m.Supplies) > 0 { 979 for _, e := range m.Supplies { 980 l = e.Size() 981 n += 1 + l + sovGenesis(uint64(l)) 982 } 983 } 984 if len(m.Mints) > 0 { 985 for _, e := range m.Mints { 986 l = e.Size() 987 n += 1 + l + sovGenesis(uint64(l)) 988 } 989 } 990 if len(m.Burns) > 0 { 991 for _, e := range m.Burns { 992 l = e.Size() 993 n += 1 + l + sovGenesis(uint64(l)) 994 } 995 } 996 return n 997 } 998 999 func (m *ClassGenesisState) Size() (n int) { 1000 if m == nil { 1001 return 0 1002 } 1003 var l int 1004 _ = l 1005 l = m.Nonce.Size() 1006 n += 1 + l + sovGenesis(uint64(l)) 1007 if len(m.Ids) > 0 { 1008 for _, s := range m.Ids { 1009 l = len(s) 1010 n += 1 + l + sovGenesis(uint64(l)) 1011 } 1012 } 1013 return n 1014 } 1015 1016 func (m *ContractBalances) Size() (n int) { 1017 if m == nil { 1018 return 0 1019 } 1020 var l int 1021 _ = l 1022 l = len(m.ContractId) 1023 if l > 0 { 1024 n += 1 + l + sovGenesis(uint64(l)) 1025 } 1026 if len(m.Balances) > 0 { 1027 for _, e := range m.Balances { 1028 l = e.Size() 1029 n += 1 + l + sovGenesis(uint64(l)) 1030 } 1031 } 1032 return n 1033 } 1034 1035 func (m *Balance) Size() (n int) { 1036 if m == nil { 1037 return 0 1038 } 1039 var l int 1040 _ = l 1041 l = len(m.Address) 1042 if l > 0 { 1043 n += 1 + l + sovGenesis(uint64(l)) 1044 } 1045 l = m.Amount.Size() 1046 n += 1 + l + sovGenesis(uint64(l)) 1047 return n 1048 } 1049 1050 func (m *ContractAuthorizations) Size() (n int) { 1051 if m == nil { 1052 return 0 1053 } 1054 var l int 1055 _ = l 1056 l = len(m.ContractId) 1057 if l > 0 { 1058 n += 1 + l + sovGenesis(uint64(l)) 1059 } 1060 if len(m.Authorizations) > 0 { 1061 for _, e := range m.Authorizations { 1062 l = e.Size() 1063 n += 1 + l + sovGenesis(uint64(l)) 1064 } 1065 } 1066 return n 1067 } 1068 1069 func (m *ContractGrants) Size() (n int) { 1070 if m == nil { 1071 return 0 1072 } 1073 var l int 1074 _ = l 1075 l = len(m.ContractId) 1076 if l > 0 { 1077 n += 1 + l + sovGenesis(uint64(l)) 1078 } 1079 if len(m.Grants) > 0 { 1080 for _, e := range m.Grants { 1081 l = e.Size() 1082 n += 1 + l + sovGenesis(uint64(l)) 1083 } 1084 } 1085 return n 1086 } 1087 1088 func (m *ContractCoin) Size() (n int) { 1089 if m == nil { 1090 return 0 1091 } 1092 var l int 1093 _ = l 1094 l = len(m.ContractId) 1095 if l > 0 { 1096 n += 1 + l + sovGenesis(uint64(l)) 1097 } 1098 l = m.Amount.Size() 1099 n += 1 + l + sovGenesis(uint64(l)) 1100 return n 1101 } 1102 1103 func sovGenesis(x uint64) (n int) { 1104 return (math_bits.Len64(x|1) + 6) / 7 1105 } 1106 func sozGenesis(x uint64) (n int) { 1107 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 1108 } 1109 func (m *GenesisState) Unmarshal(dAtA []byte) error { 1110 l := len(dAtA) 1111 iNdEx := 0 1112 for iNdEx < l { 1113 preIndex := iNdEx 1114 var wire uint64 1115 for shift := uint(0); ; shift += 7 { 1116 if shift >= 64 { 1117 return ErrIntOverflowGenesis 1118 } 1119 if iNdEx >= l { 1120 return io.ErrUnexpectedEOF 1121 } 1122 b := dAtA[iNdEx] 1123 iNdEx++ 1124 wire |= uint64(b&0x7F) << shift 1125 if b < 0x80 { 1126 break 1127 } 1128 } 1129 fieldNum := int32(wire >> 3) 1130 wireType := int(wire & 0x7) 1131 if wireType == 4 { 1132 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 1133 } 1134 if fieldNum <= 0 { 1135 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 1136 } 1137 switch fieldNum { 1138 case 1: 1139 if wireType != 2 { 1140 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 1141 } 1142 var msglen int 1143 for shift := uint(0); ; shift += 7 { 1144 if shift >= 64 { 1145 return ErrIntOverflowGenesis 1146 } 1147 if iNdEx >= l { 1148 return io.ErrUnexpectedEOF 1149 } 1150 b := dAtA[iNdEx] 1151 iNdEx++ 1152 msglen |= int(b&0x7F) << shift 1153 if b < 0x80 { 1154 break 1155 } 1156 } 1157 if msglen < 0 { 1158 return ErrInvalidLengthGenesis 1159 } 1160 postIndex := iNdEx + msglen 1161 if postIndex < 0 { 1162 return ErrInvalidLengthGenesis 1163 } 1164 if postIndex > l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1168 return err 1169 } 1170 iNdEx = postIndex 1171 case 2: 1172 if wireType != 2 { 1173 return fmt.Errorf("proto: wrong wireType = %d for field ClassState", wireType) 1174 } 1175 var msglen int 1176 for shift := uint(0); ; shift += 7 { 1177 if shift >= 64 { 1178 return ErrIntOverflowGenesis 1179 } 1180 if iNdEx >= l { 1181 return io.ErrUnexpectedEOF 1182 } 1183 b := dAtA[iNdEx] 1184 iNdEx++ 1185 msglen |= int(b&0x7F) << shift 1186 if b < 0x80 { 1187 break 1188 } 1189 } 1190 if msglen < 0 { 1191 return ErrInvalidLengthGenesis 1192 } 1193 postIndex := iNdEx + msglen 1194 if postIndex < 0 { 1195 return ErrInvalidLengthGenesis 1196 } 1197 if postIndex > l { 1198 return io.ErrUnexpectedEOF 1199 } 1200 if m.ClassState == nil { 1201 m.ClassState = &ClassGenesisState{} 1202 } 1203 if err := m.ClassState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1204 return err 1205 } 1206 iNdEx = postIndex 1207 case 3: 1208 if wireType != 2 { 1209 return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) 1210 } 1211 var msglen int 1212 for shift := uint(0); ; shift += 7 { 1213 if shift >= 64 { 1214 return ErrIntOverflowGenesis 1215 } 1216 if iNdEx >= l { 1217 return io.ErrUnexpectedEOF 1218 } 1219 b := dAtA[iNdEx] 1220 iNdEx++ 1221 msglen |= int(b&0x7F) << shift 1222 if b < 0x80 { 1223 break 1224 } 1225 } 1226 if msglen < 0 { 1227 return ErrInvalidLengthGenesis 1228 } 1229 postIndex := iNdEx + msglen 1230 if postIndex < 0 { 1231 return ErrInvalidLengthGenesis 1232 } 1233 if postIndex > l { 1234 return io.ErrUnexpectedEOF 1235 } 1236 m.Balances = append(m.Balances, ContractBalances{}) 1237 if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1238 return err 1239 } 1240 iNdEx = postIndex 1241 case 4: 1242 if wireType != 2 { 1243 return fmt.Errorf("proto: wrong wireType = %d for field Classes", wireType) 1244 } 1245 var msglen int 1246 for shift := uint(0); ; shift += 7 { 1247 if shift >= 64 { 1248 return ErrIntOverflowGenesis 1249 } 1250 if iNdEx >= l { 1251 return io.ErrUnexpectedEOF 1252 } 1253 b := dAtA[iNdEx] 1254 iNdEx++ 1255 msglen |= int(b&0x7F) << shift 1256 if b < 0x80 { 1257 break 1258 } 1259 } 1260 if msglen < 0 { 1261 return ErrInvalidLengthGenesis 1262 } 1263 postIndex := iNdEx + msglen 1264 if postIndex < 0 { 1265 return ErrInvalidLengthGenesis 1266 } 1267 if postIndex > l { 1268 return io.ErrUnexpectedEOF 1269 } 1270 m.Classes = append(m.Classes, Contract{}) 1271 if err := m.Classes[len(m.Classes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1272 return err 1273 } 1274 iNdEx = postIndex 1275 case 5: 1276 if wireType != 2 { 1277 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 1278 } 1279 var msglen int 1280 for shift := uint(0); ; shift += 7 { 1281 if shift >= 64 { 1282 return ErrIntOverflowGenesis 1283 } 1284 if iNdEx >= l { 1285 return io.ErrUnexpectedEOF 1286 } 1287 b := dAtA[iNdEx] 1288 iNdEx++ 1289 msglen |= int(b&0x7F) << shift 1290 if b < 0x80 { 1291 break 1292 } 1293 } 1294 if msglen < 0 { 1295 return ErrInvalidLengthGenesis 1296 } 1297 postIndex := iNdEx + msglen 1298 if postIndex < 0 { 1299 return ErrInvalidLengthGenesis 1300 } 1301 if postIndex > l { 1302 return io.ErrUnexpectedEOF 1303 } 1304 m.Grants = append(m.Grants, ContractGrants{}) 1305 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1306 return err 1307 } 1308 iNdEx = postIndex 1309 case 6: 1310 if wireType != 2 { 1311 return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType) 1312 } 1313 var msglen int 1314 for shift := uint(0); ; shift += 7 { 1315 if shift >= 64 { 1316 return ErrIntOverflowGenesis 1317 } 1318 if iNdEx >= l { 1319 return io.ErrUnexpectedEOF 1320 } 1321 b := dAtA[iNdEx] 1322 iNdEx++ 1323 msglen |= int(b&0x7F) << shift 1324 if b < 0x80 { 1325 break 1326 } 1327 } 1328 if msglen < 0 { 1329 return ErrInvalidLengthGenesis 1330 } 1331 postIndex := iNdEx + msglen 1332 if postIndex < 0 { 1333 return ErrInvalidLengthGenesis 1334 } 1335 if postIndex > l { 1336 return io.ErrUnexpectedEOF 1337 } 1338 m.Authorizations = append(m.Authorizations, ContractAuthorizations{}) 1339 if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1340 return err 1341 } 1342 iNdEx = postIndex 1343 case 7: 1344 if wireType != 2 { 1345 return fmt.Errorf("proto: wrong wireType = %d for field Supplies", wireType) 1346 } 1347 var msglen int 1348 for shift := uint(0); ; shift += 7 { 1349 if shift >= 64 { 1350 return ErrIntOverflowGenesis 1351 } 1352 if iNdEx >= l { 1353 return io.ErrUnexpectedEOF 1354 } 1355 b := dAtA[iNdEx] 1356 iNdEx++ 1357 msglen |= int(b&0x7F) << shift 1358 if b < 0x80 { 1359 break 1360 } 1361 } 1362 if msglen < 0 { 1363 return ErrInvalidLengthGenesis 1364 } 1365 postIndex := iNdEx + msglen 1366 if postIndex < 0 { 1367 return ErrInvalidLengthGenesis 1368 } 1369 if postIndex > l { 1370 return io.ErrUnexpectedEOF 1371 } 1372 m.Supplies = append(m.Supplies, ContractCoin{}) 1373 if err := m.Supplies[len(m.Supplies)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1374 return err 1375 } 1376 iNdEx = postIndex 1377 case 8: 1378 if wireType != 2 { 1379 return fmt.Errorf("proto: wrong wireType = %d for field Mints", wireType) 1380 } 1381 var msglen int 1382 for shift := uint(0); ; shift += 7 { 1383 if shift >= 64 { 1384 return ErrIntOverflowGenesis 1385 } 1386 if iNdEx >= l { 1387 return io.ErrUnexpectedEOF 1388 } 1389 b := dAtA[iNdEx] 1390 iNdEx++ 1391 msglen |= int(b&0x7F) << shift 1392 if b < 0x80 { 1393 break 1394 } 1395 } 1396 if msglen < 0 { 1397 return ErrInvalidLengthGenesis 1398 } 1399 postIndex := iNdEx + msglen 1400 if postIndex < 0 { 1401 return ErrInvalidLengthGenesis 1402 } 1403 if postIndex > l { 1404 return io.ErrUnexpectedEOF 1405 } 1406 m.Mints = append(m.Mints, ContractCoin{}) 1407 if err := m.Mints[len(m.Mints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1408 return err 1409 } 1410 iNdEx = postIndex 1411 case 9: 1412 if wireType != 2 { 1413 return fmt.Errorf("proto: wrong wireType = %d for field Burns", wireType) 1414 } 1415 var msglen int 1416 for shift := uint(0); ; shift += 7 { 1417 if shift >= 64 { 1418 return ErrIntOverflowGenesis 1419 } 1420 if iNdEx >= l { 1421 return io.ErrUnexpectedEOF 1422 } 1423 b := dAtA[iNdEx] 1424 iNdEx++ 1425 msglen |= int(b&0x7F) << shift 1426 if b < 0x80 { 1427 break 1428 } 1429 } 1430 if msglen < 0 { 1431 return ErrInvalidLengthGenesis 1432 } 1433 postIndex := iNdEx + msglen 1434 if postIndex < 0 { 1435 return ErrInvalidLengthGenesis 1436 } 1437 if postIndex > l { 1438 return io.ErrUnexpectedEOF 1439 } 1440 m.Burns = append(m.Burns, ContractCoin{}) 1441 if err := m.Burns[len(m.Burns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1442 return err 1443 } 1444 iNdEx = postIndex 1445 default: 1446 iNdEx = preIndex 1447 skippy, err := skipGenesis(dAtA[iNdEx:]) 1448 if err != nil { 1449 return err 1450 } 1451 if (skippy < 0) || (iNdEx+skippy) < 0 { 1452 return ErrInvalidLengthGenesis 1453 } 1454 if (iNdEx + skippy) > l { 1455 return io.ErrUnexpectedEOF 1456 } 1457 iNdEx += skippy 1458 } 1459 } 1460 1461 if iNdEx > l { 1462 return io.ErrUnexpectedEOF 1463 } 1464 return nil 1465 } 1466 func (m *ClassGenesisState) Unmarshal(dAtA []byte) error { 1467 l := len(dAtA) 1468 iNdEx := 0 1469 for iNdEx < l { 1470 preIndex := iNdEx 1471 var wire uint64 1472 for shift := uint(0); ; shift += 7 { 1473 if shift >= 64 { 1474 return ErrIntOverflowGenesis 1475 } 1476 if iNdEx >= l { 1477 return io.ErrUnexpectedEOF 1478 } 1479 b := dAtA[iNdEx] 1480 iNdEx++ 1481 wire |= uint64(b&0x7F) << shift 1482 if b < 0x80 { 1483 break 1484 } 1485 } 1486 fieldNum := int32(wire >> 3) 1487 wireType := int(wire & 0x7) 1488 if wireType == 4 { 1489 return fmt.Errorf("proto: ClassGenesisState: wiretype end group for non-group") 1490 } 1491 if fieldNum <= 0 { 1492 return fmt.Errorf("proto: ClassGenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 1493 } 1494 switch fieldNum { 1495 case 1: 1496 if wireType != 2 { 1497 return fmt.Errorf("proto: wrong wireType = %d for field Nonce", wireType) 1498 } 1499 var stringLen uint64 1500 for shift := uint(0); ; shift += 7 { 1501 if shift >= 64 { 1502 return ErrIntOverflowGenesis 1503 } 1504 if iNdEx >= l { 1505 return io.ErrUnexpectedEOF 1506 } 1507 b := dAtA[iNdEx] 1508 iNdEx++ 1509 stringLen |= uint64(b&0x7F) << shift 1510 if b < 0x80 { 1511 break 1512 } 1513 } 1514 intStringLen := int(stringLen) 1515 if intStringLen < 0 { 1516 return ErrInvalidLengthGenesis 1517 } 1518 postIndex := iNdEx + intStringLen 1519 if postIndex < 0 { 1520 return ErrInvalidLengthGenesis 1521 } 1522 if postIndex > l { 1523 return io.ErrUnexpectedEOF 1524 } 1525 if err := m.Nonce.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1526 return err 1527 } 1528 iNdEx = postIndex 1529 case 2: 1530 if wireType != 2 { 1531 return fmt.Errorf("proto: wrong wireType = %d for field Ids", wireType) 1532 } 1533 var stringLen uint64 1534 for shift := uint(0); ; shift += 7 { 1535 if shift >= 64 { 1536 return ErrIntOverflowGenesis 1537 } 1538 if iNdEx >= l { 1539 return io.ErrUnexpectedEOF 1540 } 1541 b := dAtA[iNdEx] 1542 iNdEx++ 1543 stringLen |= uint64(b&0x7F) << shift 1544 if b < 0x80 { 1545 break 1546 } 1547 } 1548 intStringLen := int(stringLen) 1549 if intStringLen < 0 { 1550 return ErrInvalidLengthGenesis 1551 } 1552 postIndex := iNdEx + intStringLen 1553 if postIndex < 0 { 1554 return ErrInvalidLengthGenesis 1555 } 1556 if postIndex > l { 1557 return io.ErrUnexpectedEOF 1558 } 1559 m.Ids = append(m.Ids, string(dAtA[iNdEx:postIndex])) 1560 iNdEx = postIndex 1561 default: 1562 iNdEx = preIndex 1563 skippy, err := skipGenesis(dAtA[iNdEx:]) 1564 if err != nil { 1565 return err 1566 } 1567 if (skippy < 0) || (iNdEx+skippy) < 0 { 1568 return ErrInvalidLengthGenesis 1569 } 1570 if (iNdEx + skippy) > l { 1571 return io.ErrUnexpectedEOF 1572 } 1573 iNdEx += skippy 1574 } 1575 } 1576 1577 if iNdEx > l { 1578 return io.ErrUnexpectedEOF 1579 } 1580 return nil 1581 } 1582 func (m *ContractBalances) Unmarshal(dAtA []byte) error { 1583 l := len(dAtA) 1584 iNdEx := 0 1585 for iNdEx < l { 1586 preIndex := iNdEx 1587 var wire uint64 1588 for shift := uint(0); ; shift += 7 { 1589 if shift >= 64 { 1590 return ErrIntOverflowGenesis 1591 } 1592 if iNdEx >= l { 1593 return io.ErrUnexpectedEOF 1594 } 1595 b := dAtA[iNdEx] 1596 iNdEx++ 1597 wire |= uint64(b&0x7F) << shift 1598 if b < 0x80 { 1599 break 1600 } 1601 } 1602 fieldNum := int32(wire >> 3) 1603 wireType := int(wire & 0x7) 1604 if wireType == 4 { 1605 return fmt.Errorf("proto: ContractBalances: wiretype end group for non-group") 1606 } 1607 if fieldNum <= 0 { 1608 return fmt.Errorf("proto: ContractBalances: illegal tag %d (wire type %d)", fieldNum, wire) 1609 } 1610 switch fieldNum { 1611 case 1: 1612 if wireType != 2 { 1613 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 1614 } 1615 var stringLen uint64 1616 for shift := uint(0); ; shift += 7 { 1617 if shift >= 64 { 1618 return ErrIntOverflowGenesis 1619 } 1620 if iNdEx >= l { 1621 return io.ErrUnexpectedEOF 1622 } 1623 b := dAtA[iNdEx] 1624 iNdEx++ 1625 stringLen |= uint64(b&0x7F) << shift 1626 if b < 0x80 { 1627 break 1628 } 1629 } 1630 intStringLen := int(stringLen) 1631 if intStringLen < 0 { 1632 return ErrInvalidLengthGenesis 1633 } 1634 postIndex := iNdEx + intStringLen 1635 if postIndex < 0 { 1636 return ErrInvalidLengthGenesis 1637 } 1638 if postIndex > l { 1639 return io.ErrUnexpectedEOF 1640 } 1641 m.ContractId = string(dAtA[iNdEx:postIndex]) 1642 iNdEx = postIndex 1643 case 2: 1644 if wireType != 2 { 1645 return fmt.Errorf("proto: wrong wireType = %d for field Balances", wireType) 1646 } 1647 var msglen int 1648 for shift := uint(0); ; shift += 7 { 1649 if shift >= 64 { 1650 return ErrIntOverflowGenesis 1651 } 1652 if iNdEx >= l { 1653 return io.ErrUnexpectedEOF 1654 } 1655 b := dAtA[iNdEx] 1656 iNdEx++ 1657 msglen |= int(b&0x7F) << shift 1658 if b < 0x80 { 1659 break 1660 } 1661 } 1662 if msglen < 0 { 1663 return ErrInvalidLengthGenesis 1664 } 1665 postIndex := iNdEx + msglen 1666 if postIndex < 0 { 1667 return ErrInvalidLengthGenesis 1668 } 1669 if postIndex > l { 1670 return io.ErrUnexpectedEOF 1671 } 1672 m.Balances = append(m.Balances, Balance{}) 1673 if err := m.Balances[len(m.Balances)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1674 return err 1675 } 1676 iNdEx = postIndex 1677 default: 1678 iNdEx = preIndex 1679 skippy, err := skipGenesis(dAtA[iNdEx:]) 1680 if err != nil { 1681 return err 1682 } 1683 if (skippy < 0) || (iNdEx+skippy) < 0 { 1684 return ErrInvalidLengthGenesis 1685 } 1686 if (iNdEx + skippy) > l { 1687 return io.ErrUnexpectedEOF 1688 } 1689 iNdEx += skippy 1690 } 1691 } 1692 1693 if iNdEx > l { 1694 return io.ErrUnexpectedEOF 1695 } 1696 return nil 1697 } 1698 func (m *Balance) Unmarshal(dAtA []byte) error { 1699 l := len(dAtA) 1700 iNdEx := 0 1701 for iNdEx < l { 1702 preIndex := iNdEx 1703 var wire uint64 1704 for shift := uint(0); ; shift += 7 { 1705 if shift >= 64 { 1706 return ErrIntOverflowGenesis 1707 } 1708 if iNdEx >= l { 1709 return io.ErrUnexpectedEOF 1710 } 1711 b := dAtA[iNdEx] 1712 iNdEx++ 1713 wire |= uint64(b&0x7F) << shift 1714 if b < 0x80 { 1715 break 1716 } 1717 } 1718 fieldNum := int32(wire >> 3) 1719 wireType := int(wire & 0x7) 1720 if wireType == 4 { 1721 return fmt.Errorf("proto: Balance: wiretype end group for non-group") 1722 } 1723 if fieldNum <= 0 { 1724 return fmt.Errorf("proto: Balance: illegal tag %d (wire type %d)", fieldNum, wire) 1725 } 1726 switch fieldNum { 1727 case 1: 1728 if wireType != 2 { 1729 return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) 1730 } 1731 var stringLen uint64 1732 for shift := uint(0); ; shift += 7 { 1733 if shift >= 64 { 1734 return ErrIntOverflowGenesis 1735 } 1736 if iNdEx >= l { 1737 return io.ErrUnexpectedEOF 1738 } 1739 b := dAtA[iNdEx] 1740 iNdEx++ 1741 stringLen |= uint64(b&0x7F) << shift 1742 if b < 0x80 { 1743 break 1744 } 1745 } 1746 intStringLen := int(stringLen) 1747 if intStringLen < 0 { 1748 return ErrInvalidLengthGenesis 1749 } 1750 postIndex := iNdEx + intStringLen 1751 if postIndex < 0 { 1752 return ErrInvalidLengthGenesis 1753 } 1754 if postIndex > l { 1755 return io.ErrUnexpectedEOF 1756 } 1757 m.Address = string(dAtA[iNdEx:postIndex]) 1758 iNdEx = postIndex 1759 case 2: 1760 if wireType != 2 { 1761 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1762 } 1763 var stringLen uint64 1764 for shift := uint(0); ; shift += 7 { 1765 if shift >= 64 { 1766 return ErrIntOverflowGenesis 1767 } 1768 if iNdEx >= l { 1769 return io.ErrUnexpectedEOF 1770 } 1771 b := dAtA[iNdEx] 1772 iNdEx++ 1773 stringLen |= uint64(b&0x7F) << shift 1774 if b < 0x80 { 1775 break 1776 } 1777 } 1778 intStringLen := int(stringLen) 1779 if intStringLen < 0 { 1780 return ErrInvalidLengthGenesis 1781 } 1782 postIndex := iNdEx + intStringLen 1783 if postIndex < 0 { 1784 return ErrInvalidLengthGenesis 1785 } 1786 if postIndex > l { 1787 return io.ErrUnexpectedEOF 1788 } 1789 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1790 return err 1791 } 1792 iNdEx = postIndex 1793 default: 1794 iNdEx = preIndex 1795 skippy, err := skipGenesis(dAtA[iNdEx:]) 1796 if err != nil { 1797 return err 1798 } 1799 if (skippy < 0) || (iNdEx+skippy) < 0 { 1800 return ErrInvalidLengthGenesis 1801 } 1802 if (iNdEx + skippy) > l { 1803 return io.ErrUnexpectedEOF 1804 } 1805 iNdEx += skippy 1806 } 1807 } 1808 1809 if iNdEx > l { 1810 return io.ErrUnexpectedEOF 1811 } 1812 return nil 1813 } 1814 func (m *ContractAuthorizations) Unmarshal(dAtA []byte) error { 1815 l := len(dAtA) 1816 iNdEx := 0 1817 for iNdEx < l { 1818 preIndex := iNdEx 1819 var wire uint64 1820 for shift := uint(0); ; shift += 7 { 1821 if shift >= 64 { 1822 return ErrIntOverflowGenesis 1823 } 1824 if iNdEx >= l { 1825 return io.ErrUnexpectedEOF 1826 } 1827 b := dAtA[iNdEx] 1828 iNdEx++ 1829 wire |= uint64(b&0x7F) << shift 1830 if b < 0x80 { 1831 break 1832 } 1833 } 1834 fieldNum := int32(wire >> 3) 1835 wireType := int(wire & 0x7) 1836 if wireType == 4 { 1837 return fmt.Errorf("proto: ContractAuthorizations: wiretype end group for non-group") 1838 } 1839 if fieldNum <= 0 { 1840 return fmt.Errorf("proto: ContractAuthorizations: illegal tag %d (wire type %d)", fieldNum, wire) 1841 } 1842 switch fieldNum { 1843 case 1: 1844 if wireType != 2 { 1845 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 1846 } 1847 var stringLen uint64 1848 for shift := uint(0); ; shift += 7 { 1849 if shift >= 64 { 1850 return ErrIntOverflowGenesis 1851 } 1852 if iNdEx >= l { 1853 return io.ErrUnexpectedEOF 1854 } 1855 b := dAtA[iNdEx] 1856 iNdEx++ 1857 stringLen |= uint64(b&0x7F) << shift 1858 if b < 0x80 { 1859 break 1860 } 1861 } 1862 intStringLen := int(stringLen) 1863 if intStringLen < 0 { 1864 return ErrInvalidLengthGenesis 1865 } 1866 postIndex := iNdEx + intStringLen 1867 if postIndex < 0 { 1868 return ErrInvalidLengthGenesis 1869 } 1870 if postIndex > l { 1871 return io.ErrUnexpectedEOF 1872 } 1873 m.ContractId = string(dAtA[iNdEx:postIndex]) 1874 iNdEx = postIndex 1875 case 2: 1876 if wireType != 2 { 1877 return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType) 1878 } 1879 var msglen int 1880 for shift := uint(0); ; shift += 7 { 1881 if shift >= 64 { 1882 return ErrIntOverflowGenesis 1883 } 1884 if iNdEx >= l { 1885 return io.ErrUnexpectedEOF 1886 } 1887 b := dAtA[iNdEx] 1888 iNdEx++ 1889 msglen |= int(b&0x7F) << shift 1890 if b < 0x80 { 1891 break 1892 } 1893 } 1894 if msglen < 0 { 1895 return ErrInvalidLengthGenesis 1896 } 1897 postIndex := iNdEx + msglen 1898 if postIndex < 0 { 1899 return ErrInvalidLengthGenesis 1900 } 1901 if postIndex > l { 1902 return io.ErrUnexpectedEOF 1903 } 1904 m.Authorizations = append(m.Authorizations, Authorization{}) 1905 if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1906 return err 1907 } 1908 iNdEx = postIndex 1909 default: 1910 iNdEx = preIndex 1911 skippy, err := skipGenesis(dAtA[iNdEx:]) 1912 if err != nil { 1913 return err 1914 } 1915 if (skippy < 0) || (iNdEx+skippy) < 0 { 1916 return ErrInvalidLengthGenesis 1917 } 1918 if (iNdEx + skippy) > l { 1919 return io.ErrUnexpectedEOF 1920 } 1921 iNdEx += skippy 1922 } 1923 } 1924 1925 if iNdEx > l { 1926 return io.ErrUnexpectedEOF 1927 } 1928 return nil 1929 } 1930 func (m *ContractGrants) Unmarshal(dAtA []byte) error { 1931 l := len(dAtA) 1932 iNdEx := 0 1933 for iNdEx < l { 1934 preIndex := iNdEx 1935 var wire uint64 1936 for shift := uint(0); ; shift += 7 { 1937 if shift >= 64 { 1938 return ErrIntOverflowGenesis 1939 } 1940 if iNdEx >= l { 1941 return io.ErrUnexpectedEOF 1942 } 1943 b := dAtA[iNdEx] 1944 iNdEx++ 1945 wire |= uint64(b&0x7F) << shift 1946 if b < 0x80 { 1947 break 1948 } 1949 } 1950 fieldNum := int32(wire >> 3) 1951 wireType := int(wire & 0x7) 1952 if wireType == 4 { 1953 return fmt.Errorf("proto: ContractGrants: wiretype end group for non-group") 1954 } 1955 if fieldNum <= 0 { 1956 return fmt.Errorf("proto: ContractGrants: illegal tag %d (wire type %d)", fieldNum, wire) 1957 } 1958 switch fieldNum { 1959 case 1: 1960 if wireType != 2 { 1961 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 1962 } 1963 var stringLen uint64 1964 for shift := uint(0); ; shift += 7 { 1965 if shift >= 64 { 1966 return ErrIntOverflowGenesis 1967 } 1968 if iNdEx >= l { 1969 return io.ErrUnexpectedEOF 1970 } 1971 b := dAtA[iNdEx] 1972 iNdEx++ 1973 stringLen |= uint64(b&0x7F) << shift 1974 if b < 0x80 { 1975 break 1976 } 1977 } 1978 intStringLen := int(stringLen) 1979 if intStringLen < 0 { 1980 return ErrInvalidLengthGenesis 1981 } 1982 postIndex := iNdEx + intStringLen 1983 if postIndex < 0 { 1984 return ErrInvalidLengthGenesis 1985 } 1986 if postIndex > l { 1987 return io.ErrUnexpectedEOF 1988 } 1989 m.ContractId = string(dAtA[iNdEx:postIndex]) 1990 iNdEx = postIndex 1991 case 2: 1992 if wireType != 2 { 1993 return fmt.Errorf("proto: wrong wireType = %d for field Grants", wireType) 1994 } 1995 var msglen int 1996 for shift := uint(0); ; shift += 7 { 1997 if shift >= 64 { 1998 return ErrIntOverflowGenesis 1999 } 2000 if iNdEx >= l { 2001 return io.ErrUnexpectedEOF 2002 } 2003 b := dAtA[iNdEx] 2004 iNdEx++ 2005 msglen |= int(b&0x7F) << shift 2006 if b < 0x80 { 2007 break 2008 } 2009 } 2010 if msglen < 0 { 2011 return ErrInvalidLengthGenesis 2012 } 2013 postIndex := iNdEx + msglen 2014 if postIndex < 0 { 2015 return ErrInvalidLengthGenesis 2016 } 2017 if postIndex > l { 2018 return io.ErrUnexpectedEOF 2019 } 2020 m.Grants = append(m.Grants, Grant{}) 2021 if err := m.Grants[len(m.Grants)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2022 return err 2023 } 2024 iNdEx = postIndex 2025 default: 2026 iNdEx = preIndex 2027 skippy, err := skipGenesis(dAtA[iNdEx:]) 2028 if err != nil { 2029 return err 2030 } 2031 if (skippy < 0) || (iNdEx+skippy) < 0 { 2032 return ErrInvalidLengthGenesis 2033 } 2034 if (iNdEx + skippy) > l { 2035 return io.ErrUnexpectedEOF 2036 } 2037 iNdEx += skippy 2038 } 2039 } 2040 2041 if iNdEx > l { 2042 return io.ErrUnexpectedEOF 2043 } 2044 return nil 2045 } 2046 func (m *ContractCoin) Unmarshal(dAtA []byte) error { 2047 l := len(dAtA) 2048 iNdEx := 0 2049 for iNdEx < l { 2050 preIndex := iNdEx 2051 var wire uint64 2052 for shift := uint(0); ; shift += 7 { 2053 if shift >= 64 { 2054 return ErrIntOverflowGenesis 2055 } 2056 if iNdEx >= l { 2057 return io.ErrUnexpectedEOF 2058 } 2059 b := dAtA[iNdEx] 2060 iNdEx++ 2061 wire |= uint64(b&0x7F) << shift 2062 if b < 0x80 { 2063 break 2064 } 2065 } 2066 fieldNum := int32(wire >> 3) 2067 wireType := int(wire & 0x7) 2068 if wireType == 4 { 2069 return fmt.Errorf("proto: ContractCoin: wiretype end group for non-group") 2070 } 2071 if fieldNum <= 0 { 2072 return fmt.Errorf("proto: ContractCoin: illegal tag %d (wire type %d)", fieldNum, wire) 2073 } 2074 switch fieldNum { 2075 case 1: 2076 if wireType != 2 { 2077 return fmt.Errorf("proto: wrong wireType = %d for field ContractId", wireType) 2078 } 2079 var stringLen uint64 2080 for shift := uint(0); ; shift += 7 { 2081 if shift >= 64 { 2082 return ErrIntOverflowGenesis 2083 } 2084 if iNdEx >= l { 2085 return io.ErrUnexpectedEOF 2086 } 2087 b := dAtA[iNdEx] 2088 iNdEx++ 2089 stringLen |= uint64(b&0x7F) << shift 2090 if b < 0x80 { 2091 break 2092 } 2093 } 2094 intStringLen := int(stringLen) 2095 if intStringLen < 0 { 2096 return ErrInvalidLengthGenesis 2097 } 2098 postIndex := iNdEx + intStringLen 2099 if postIndex < 0 { 2100 return ErrInvalidLengthGenesis 2101 } 2102 if postIndex > l { 2103 return io.ErrUnexpectedEOF 2104 } 2105 m.ContractId = string(dAtA[iNdEx:postIndex]) 2106 iNdEx = postIndex 2107 case 2: 2108 if wireType != 2 { 2109 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 2110 } 2111 var stringLen uint64 2112 for shift := uint(0); ; shift += 7 { 2113 if shift >= 64 { 2114 return ErrIntOverflowGenesis 2115 } 2116 if iNdEx >= l { 2117 return io.ErrUnexpectedEOF 2118 } 2119 b := dAtA[iNdEx] 2120 iNdEx++ 2121 stringLen |= uint64(b&0x7F) << shift 2122 if b < 0x80 { 2123 break 2124 } 2125 } 2126 intStringLen := int(stringLen) 2127 if intStringLen < 0 { 2128 return ErrInvalidLengthGenesis 2129 } 2130 postIndex := iNdEx + intStringLen 2131 if postIndex < 0 { 2132 return ErrInvalidLengthGenesis 2133 } 2134 if postIndex > l { 2135 return io.ErrUnexpectedEOF 2136 } 2137 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 2138 return err 2139 } 2140 iNdEx = postIndex 2141 default: 2142 iNdEx = preIndex 2143 skippy, err := skipGenesis(dAtA[iNdEx:]) 2144 if err != nil { 2145 return err 2146 } 2147 if (skippy < 0) || (iNdEx+skippy) < 0 { 2148 return ErrInvalidLengthGenesis 2149 } 2150 if (iNdEx + skippy) > l { 2151 return io.ErrUnexpectedEOF 2152 } 2153 iNdEx += skippy 2154 } 2155 } 2156 2157 if iNdEx > l { 2158 return io.ErrUnexpectedEOF 2159 } 2160 return nil 2161 } 2162 func skipGenesis(dAtA []byte) (n int, err error) { 2163 l := len(dAtA) 2164 iNdEx := 0 2165 depth := 0 2166 for iNdEx < l { 2167 var wire uint64 2168 for shift := uint(0); ; shift += 7 { 2169 if shift >= 64 { 2170 return 0, ErrIntOverflowGenesis 2171 } 2172 if iNdEx >= l { 2173 return 0, io.ErrUnexpectedEOF 2174 } 2175 b := dAtA[iNdEx] 2176 iNdEx++ 2177 wire |= (uint64(b) & 0x7F) << shift 2178 if b < 0x80 { 2179 break 2180 } 2181 } 2182 wireType := int(wire & 0x7) 2183 switch wireType { 2184 case 0: 2185 for shift := uint(0); ; shift += 7 { 2186 if shift >= 64 { 2187 return 0, ErrIntOverflowGenesis 2188 } 2189 if iNdEx >= l { 2190 return 0, io.ErrUnexpectedEOF 2191 } 2192 iNdEx++ 2193 if dAtA[iNdEx-1] < 0x80 { 2194 break 2195 } 2196 } 2197 case 1: 2198 iNdEx += 8 2199 case 2: 2200 var length int 2201 for shift := uint(0); ; shift += 7 { 2202 if shift >= 64 { 2203 return 0, ErrIntOverflowGenesis 2204 } 2205 if iNdEx >= l { 2206 return 0, io.ErrUnexpectedEOF 2207 } 2208 b := dAtA[iNdEx] 2209 iNdEx++ 2210 length |= (int(b) & 0x7F) << shift 2211 if b < 0x80 { 2212 break 2213 } 2214 } 2215 if length < 0 { 2216 return 0, ErrInvalidLengthGenesis 2217 } 2218 iNdEx += length 2219 case 3: 2220 depth++ 2221 case 4: 2222 if depth == 0 { 2223 return 0, ErrUnexpectedEndOfGroupGenesis 2224 } 2225 depth-- 2226 case 5: 2227 iNdEx += 4 2228 default: 2229 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 2230 } 2231 if iNdEx < 0 { 2232 return 0, ErrInvalidLengthGenesis 2233 } 2234 if depth == 0 { 2235 return iNdEx, nil 2236 } 2237 } 2238 return 0, io.ErrUnexpectedEOF 2239 } 2240 2241 var ( 2242 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 2243 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 2244 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 2245 )