github.com/InjectiveLabs/sdk-go@v1.53.0/chain/tokenfactory/types/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/tokenfactory/v1beta1/genesis.proto 3 4 package types 5 6 import ( 7 fmt "fmt" 8 _ "github.com/cosmos/gogoproto/gogoproto" 9 proto "github.com/cosmos/gogoproto/proto" 10 io "io" 11 math "math" 12 math_bits "math/bits" 13 ) 14 15 // Reference imports to suppress errors if they are not otherwise used. 16 var _ = proto.Marshal 17 var _ = fmt.Errorf 18 var _ = math.Inf 19 20 // This is a compile-time assertion to ensure that this generated file 21 // is compatible with the proto package it is being compiled against. 22 // A compilation error at this line likely means your copy of the 23 // proto package needs to be updated. 24 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 25 26 // GenesisState defines the tokenfactory module's genesis state. 27 type GenesisState struct { 28 // params defines the parameters of the module. 29 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 30 FactoryDenoms []GenesisDenom `protobuf:"bytes,2,rep,name=factory_denoms,json=factoryDenoms,proto3" json:"factory_denoms" yaml:"factory_denoms"` 31 } 32 33 func (m *GenesisState) Reset() { *m = GenesisState{} } 34 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 35 func (*GenesisState) ProtoMessage() {} 36 func (*GenesisState) Descriptor() ([]byte, []int) { 37 return fileDescriptor_a7bae9323951328f, []int{0} 38 } 39 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 40 return m.Unmarshal(b) 41 } 42 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 43 if deterministic { 44 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 45 } else { 46 b = b[:cap(b)] 47 n, err := m.MarshalToSizedBuffer(b) 48 if err != nil { 49 return nil, err 50 } 51 return b[:n], nil 52 } 53 } 54 func (m *GenesisState) XXX_Merge(src proto.Message) { 55 xxx_messageInfo_GenesisState.Merge(m, src) 56 } 57 func (m *GenesisState) XXX_Size() int { 58 return m.Size() 59 } 60 func (m *GenesisState) XXX_DiscardUnknown() { 61 xxx_messageInfo_GenesisState.DiscardUnknown(m) 62 } 63 64 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 65 66 func (m *GenesisState) GetParams() Params { 67 if m != nil { 68 return m.Params 69 } 70 return Params{} 71 } 72 73 func (m *GenesisState) GetFactoryDenoms() []GenesisDenom { 74 if m != nil { 75 return m.FactoryDenoms 76 } 77 return nil 78 } 79 80 // GenesisDenom defines a tokenfactory denom that is defined within genesis 81 // state. The structure contains DenomAuthorityMetadata which defines the 82 // denom's admin. 83 type GenesisDenom struct { 84 Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty" yaml:"denom"` 85 AuthorityMetadata DenomAuthorityMetadata `protobuf:"bytes,2,opt,name=authority_metadata,json=authorityMetadata,proto3" json:"authority_metadata" yaml:"authority_metadata"` 86 Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` 87 Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty" yaml:"symbol"` 88 Decimals uint32 `protobuf:"varint,5,opt,name=decimals,proto3" json:"decimals,omitempty" yaml:"decimals"` 89 } 90 91 func (m *GenesisDenom) Reset() { *m = GenesisDenom{} } 92 func (m *GenesisDenom) String() string { return proto.CompactTextString(m) } 93 func (*GenesisDenom) ProtoMessage() {} 94 func (*GenesisDenom) Descriptor() ([]byte, []int) { 95 return fileDescriptor_a7bae9323951328f, []int{1} 96 } 97 func (m *GenesisDenom) XXX_Unmarshal(b []byte) error { 98 return m.Unmarshal(b) 99 } 100 func (m *GenesisDenom) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 101 if deterministic { 102 return xxx_messageInfo_GenesisDenom.Marshal(b, m, deterministic) 103 } else { 104 b = b[:cap(b)] 105 n, err := m.MarshalToSizedBuffer(b) 106 if err != nil { 107 return nil, err 108 } 109 return b[:n], nil 110 } 111 } 112 func (m *GenesisDenom) XXX_Merge(src proto.Message) { 113 xxx_messageInfo_GenesisDenom.Merge(m, src) 114 } 115 func (m *GenesisDenom) XXX_Size() int { 116 return m.Size() 117 } 118 func (m *GenesisDenom) XXX_DiscardUnknown() { 119 xxx_messageInfo_GenesisDenom.DiscardUnknown(m) 120 } 121 122 var xxx_messageInfo_GenesisDenom proto.InternalMessageInfo 123 124 func (m *GenesisDenom) GetDenom() string { 125 if m != nil { 126 return m.Denom 127 } 128 return "" 129 } 130 131 func (m *GenesisDenom) GetAuthorityMetadata() DenomAuthorityMetadata { 132 if m != nil { 133 return m.AuthorityMetadata 134 } 135 return DenomAuthorityMetadata{} 136 } 137 138 func (m *GenesisDenom) GetName() string { 139 if m != nil { 140 return m.Name 141 } 142 return "" 143 } 144 145 func (m *GenesisDenom) GetSymbol() string { 146 if m != nil { 147 return m.Symbol 148 } 149 return "" 150 } 151 152 func (m *GenesisDenom) GetDecimals() uint32 { 153 if m != nil { 154 return m.Decimals 155 } 156 return 0 157 } 158 159 func init() { 160 proto.RegisterType((*GenesisState)(nil), "injective.tokenfactory.v1beta1.GenesisState") 161 proto.RegisterType((*GenesisDenom)(nil), "injective.tokenfactory.v1beta1.GenesisDenom") 162 } 163 164 func init() { 165 proto.RegisterFile("injective/tokenfactory/v1beta1/genesis.proto", fileDescriptor_a7bae9323951328f) 166 } 167 168 var fileDescriptor_a7bae9323951328f = []byte{ 169 // 455 bytes of a gzipped FileDescriptorProto 170 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6f, 0xd3, 0x30, 171 0x14, 0xc7, 0xeb, 0xae, 0xab, 0xc0, 0x5d, 0x19, 0x33, 0x20, 0x85, 0x49, 0x24, 0xc5, 0x48, 0x53, 172 0x11, 0x23, 0xd6, 0x86, 0xb4, 0xc3, 0x6e, 0x44, 0x95, 0x10, 0x12, 0x48, 0xc8, 0xdc, 0xb8, 0x4c, 173 0x4e, 0x6a, 0xda, 0x40, 0x1c, 0x57, 0xb1, 0x3b, 0x29, 0xdf, 0x80, 0x23, 0x1f, 0x81, 0x8f, 0xd3, 174 0xe3, 0x8e, 0x9c, 0x22, 0xd4, 0x5e, 0x38, 0xe7, 0x13, 0xa0, 0xda, 0x5e, 0xb4, 0x51, 0x69, 0xbd, 175 0xd9, 0xef, 0xfd, 0xfe, 0xef, 0xfd, 0xdf, 0xb3, 0xe1, 0x71, 0x9a, 0x7f, 0xe3, 0x89, 0x4e, 0x2f, 176 0x39, 0xd1, 0xf2, 0x3b, 0xcf, 0xbf, 0xb2, 0x44, 0xcb, 0xa2, 0x24, 0x97, 0x27, 0x31, 0xd7, 0xec, 177 0x84, 0x4c, 0x78, 0xce, 0x55, 0xaa, 0xc2, 0x59, 0x21, 0xb5, 0x44, 0x7e, 0x43, 0x87, 0x37, 0xe9, 178 0xd0, 0xd1, 0x87, 0x8f, 0x27, 0x72, 0x22, 0x0d, 0x4a, 0xd6, 0x27, 0xab, 0x3a, 0x3c, 0xdb, 0xd2, 179 0x83, 0xcd, 0xf5, 0x54, 0x16, 0xa9, 0x2e, 0x3f, 0x72, 0xcd, 0xc6, 0x4c, 0x33, 0xa7, 0x7b, 0xb5, 180 0x45, 0x37, 0x63, 0x05, 0x13, 0xce, 0x1a, 0x5e, 0x00, 0xb8, 0xf7, 0xce, 0x9a, 0xfd, 0xac, 0x99, 181 0xe6, 0x68, 0x04, 0xbb, 0x16, 0xf0, 0xc0, 0x00, 0x0c, 0x7b, 0xa7, 0x47, 0xe1, 0xdd, 0xe6, 0xc3, 182 0x4f, 0x86, 0x8e, 0x3a, 0x8b, 0x2a, 0x68, 0x51, 0xa7, 0x45, 0x05, 0x7c, 0xe0, 0xb8, 0x8b, 0x31, 183 0xcf, 0xa5, 0x50, 0x5e, 0x7b, 0xb0, 0x33, 0xec, 0x9d, 0x1e, 0x6f, 0xab, 0xe6, 0xbc, 0x8c, 0xd6, 184 0xa2, 0xe8, 0xd9, 0xba, 0x66, 0x5d, 0x05, 0x4f, 0x4a, 0x26, 0xb2, 0x73, 0x7c, 0xbb, 0x22, 0xa6, 185 0x7d, 0x17, 0x18, 0xd9, 0xfb, 0xa2, 0xdd, 0x8c, 0x62, 0x22, 0xe8, 0x08, 0xee, 0x1a, 0xd4, 0x4c, 186 0x72, 0x3f, 0x7a, 0x58, 0x57, 0xc1, 0x9e, 0xad, 0x64, 0xc2, 0x98, 0xda, 0x34, 0xfa, 0x01, 0x20, 187 0x6a, 0x96, 0x79, 0x21, 0xdc, 0x36, 0xbd, 0xb6, 0x99, 0xff, 0x6c, 0x9b, 0x63, 0xd3, 0xeb, 0xed, 188 0xff, 0x6f, 0x11, 0x3d, 0x77, 0xde, 0x9f, 0xda, 0x8e, 0x9b, 0xf5, 0x31, 0x3d, 0xd8, 0x78, 0x41, 189 0xf4, 0x02, 0x76, 0x72, 0x26, 0xb8, 0xb7, 0x63, 0x1c, 0xef, 0xd7, 0x55, 0xd0, 0xb3, 0xfa, 0x75, 190 0x14, 0x53, 0x93, 0x44, 0x2f, 0x61, 0x57, 0x95, 0x22, 0x96, 0x99, 0xd7, 0x31, 0xd8, 0x41, 0x5d, 191 0x05, 0x7d, 0x8b, 0xd9, 0x38, 0xa6, 0x0e, 0x40, 0x04, 0xde, 0x1b, 0xf3, 0x24, 0x15, 0x2c, 0x53, 192 0xde, 0xee, 0x00, 0x0c, 0xfb, 0xd1, 0xa3, 0xba, 0x0a, 0xf6, 0xaf, 0xb7, 0x60, 0x33, 0x98, 0x36, 193 0xd0, 0x79, 0xe7, 0xef, 0xaf, 0x00, 0x44, 0xd9, 0x62, 0xe9, 0x83, 0xab, 0xa5, 0x0f, 0xfe, 0x2c, 194 0x7d, 0xf0, 0x73, 0xe5, 0xb7, 0xae, 0x56, 0x7e, 0xeb, 0xf7, 0xca, 0x6f, 0x7d, 0xa1, 0x93, 0x54, 195 0x4f, 0xe7, 0x71, 0x98, 0x48, 0x41, 0xde, 0x5f, 0x2f, 0xe6, 0x03, 0x8b, 0x15, 0x69, 0xd6, 0xf4, 196 0x3a, 0x91, 0x05, 0xbf, 0x79, 0x9d, 0xb2, 0x34, 0x27, 0x42, 0x8e, 0xe7, 0x19, 0x57, 0xb7, 0xbf, 197 0xa4, 0x2e, 0x67, 0x5c, 0xc5, 0x5d, 0xf3, 0x15, 0xdf, 0xfc, 0x0b, 0x00, 0x00, 0xff, 0xff, 0xb1, 198 0x74, 0x8d, 0xe9, 0x55, 0x03, 0x00, 0x00, 199 } 200 201 func (this *GenesisDenom) Equal(that interface{}) bool { 202 if that == nil { 203 return this == nil 204 } 205 206 that1, ok := that.(*GenesisDenom) 207 if !ok { 208 that2, ok := that.(GenesisDenom) 209 if ok { 210 that1 = &that2 211 } else { 212 return false 213 } 214 } 215 if that1 == nil { 216 return this == nil 217 } else if this == nil { 218 return false 219 } 220 if this.Denom != that1.Denom { 221 return false 222 } 223 if !this.AuthorityMetadata.Equal(&that1.AuthorityMetadata) { 224 return false 225 } 226 if this.Name != that1.Name { 227 return false 228 } 229 if this.Symbol != that1.Symbol { 230 return false 231 } 232 if this.Decimals != that1.Decimals { 233 return false 234 } 235 return true 236 } 237 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 238 size := m.Size() 239 dAtA = make([]byte, size) 240 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 241 if err != nil { 242 return nil, err 243 } 244 return dAtA[:n], nil 245 } 246 247 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 248 size := m.Size() 249 return m.MarshalToSizedBuffer(dAtA[:size]) 250 } 251 252 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 253 i := len(dAtA) 254 _ = i 255 var l int 256 _ = l 257 if len(m.FactoryDenoms) > 0 { 258 for iNdEx := len(m.FactoryDenoms) - 1; iNdEx >= 0; iNdEx-- { 259 { 260 size, err := m.FactoryDenoms[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 261 if err != nil { 262 return 0, err 263 } 264 i -= size 265 i = encodeVarintGenesis(dAtA, i, uint64(size)) 266 } 267 i-- 268 dAtA[i] = 0x12 269 } 270 } 271 { 272 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 273 if err != nil { 274 return 0, err 275 } 276 i -= size 277 i = encodeVarintGenesis(dAtA, i, uint64(size)) 278 } 279 i-- 280 dAtA[i] = 0xa 281 return len(dAtA) - i, nil 282 } 283 284 func (m *GenesisDenom) Marshal() (dAtA []byte, err error) { 285 size := m.Size() 286 dAtA = make([]byte, size) 287 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 288 if err != nil { 289 return nil, err 290 } 291 return dAtA[:n], nil 292 } 293 294 func (m *GenesisDenom) MarshalTo(dAtA []byte) (int, error) { 295 size := m.Size() 296 return m.MarshalToSizedBuffer(dAtA[:size]) 297 } 298 299 func (m *GenesisDenom) MarshalToSizedBuffer(dAtA []byte) (int, error) { 300 i := len(dAtA) 301 _ = i 302 var l int 303 _ = l 304 if m.Decimals != 0 { 305 i = encodeVarintGenesis(dAtA, i, uint64(m.Decimals)) 306 i-- 307 dAtA[i] = 0x28 308 } 309 if len(m.Symbol) > 0 { 310 i -= len(m.Symbol) 311 copy(dAtA[i:], m.Symbol) 312 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) 313 i-- 314 dAtA[i] = 0x22 315 } 316 if len(m.Name) > 0 { 317 i -= len(m.Name) 318 copy(dAtA[i:], m.Name) 319 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Name))) 320 i-- 321 dAtA[i] = 0x1a 322 } 323 { 324 size, err := m.AuthorityMetadata.MarshalToSizedBuffer(dAtA[:i]) 325 if err != nil { 326 return 0, err 327 } 328 i -= size 329 i = encodeVarintGenesis(dAtA, i, uint64(size)) 330 } 331 i-- 332 dAtA[i] = 0x12 333 if len(m.Denom) > 0 { 334 i -= len(m.Denom) 335 copy(dAtA[i:], m.Denom) 336 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) 337 i-- 338 dAtA[i] = 0xa 339 } 340 return len(dAtA) - i, nil 341 } 342 343 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 344 offset -= sovGenesis(v) 345 base := offset 346 for v >= 1<<7 { 347 dAtA[offset] = uint8(v&0x7f | 0x80) 348 v >>= 7 349 offset++ 350 } 351 dAtA[offset] = uint8(v) 352 return base 353 } 354 func (m *GenesisState) Size() (n int) { 355 if m == nil { 356 return 0 357 } 358 var l int 359 _ = l 360 l = m.Params.Size() 361 n += 1 + l + sovGenesis(uint64(l)) 362 if len(m.FactoryDenoms) > 0 { 363 for _, e := range m.FactoryDenoms { 364 l = e.Size() 365 n += 1 + l + sovGenesis(uint64(l)) 366 } 367 } 368 return n 369 } 370 371 func (m *GenesisDenom) Size() (n int) { 372 if m == nil { 373 return 0 374 } 375 var l int 376 _ = l 377 l = len(m.Denom) 378 if l > 0 { 379 n += 1 + l + sovGenesis(uint64(l)) 380 } 381 l = m.AuthorityMetadata.Size() 382 n += 1 + l + sovGenesis(uint64(l)) 383 l = len(m.Name) 384 if l > 0 { 385 n += 1 + l + sovGenesis(uint64(l)) 386 } 387 l = len(m.Symbol) 388 if l > 0 { 389 n += 1 + l + sovGenesis(uint64(l)) 390 } 391 if m.Decimals != 0 { 392 n += 1 + sovGenesis(uint64(m.Decimals)) 393 } 394 return n 395 } 396 397 func sovGenesis(x uint64) (n int) { 398 return (math_bits.Len64(x|1) + 6) / 7 399 } 400 func sozGenesis(x uint64) (n int) { 401 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 402 } 403 func (m *GenesisState) Unmarshal(dAtA []byte) error { 404 l := len(dAtA) 405 iNdEx := 0 406 for iNdEx < l { 407 preIndex := iNdEx 408 var wire uint64 409 for shift := uint(0); ; shift += 7 { 410 if shift >= 64 { 411 return ErrIntOverflowGenesis 412 } 413 if iNdEx >= l { 414 return io.ErrUnexpectedEOF 415 } 416 b := dAtA[iNdEx] 417 iNdEx++ 418 wire |= uint64(b&0x7F) << shift 419 if b < 0x80 { 420 break 421 } 422 } 423 fieldNum := int32(wire >> 3) 424 wireType := int(wire & 0x7) 425 if wireType == 4 { 426 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 427 } 428 if fieldNum <= 0 { 429 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 430 } 431 switch fieldNum { 432 case 1: 433 if wireType != 2 { 434 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 435 } 436 var msglen int 437 for shift := uint(0); ; shift += 7 { 438 if shift >= 64 { 439 return ErrIntOverflowGenesis 440 } 441 if iNdEx >= l { 442 return io.ErrUnexpectedEOF 443 } 444 b := dAtA[iNdEx] 445 iNdEx++ 446 msglen |= int(b&0x7F) << shift 447 if b < 0x80 { 448 break 449 } 450 } 451 if msglen < 0 { 452 return ErrInvalidLengthGenesis 453 } 454 postIndex := iNdEx + msglen 455 if postIndex < 0 { 456 return ErrInvalidLengthGenesis 457 } 458 if postIndex > l { 459 return io.ErrUnexpectedEOF 460 } 461 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 462 return err 463 } 464 iNdEx = postIndex 465 case 2: 466 if wireType != 2 { 467 return fmt.Errorf("proto: wrong wireType = %d for field FactoryDenoms", wireType) 468 } 469 var msglen int 470 for shift := uint(0); ; shift += 7 { 471 if shift >= 64 { 472 return ErrIntOverflowGenesis 473 } 474 if iNdEx >= l { 475 return io.ErrUnexpectedEOF 476 } 477 b := dAtA[iNdEx] 478 iNdEx++ 479 msglen |= int(b&0x7F) << shift 480 if b < 0x80 { 481 break 482 } 483 } 484 if msglen < 0 { 485 return ErrInvalidLengthGenesis 486 } 487 postIndex := iNdEx + msglen 488 if postIndex < 0 { 489 return ErrInvalidLengthGenesis 490 } 491 if postIndex > l { 492 return io.ErrUnexpectedEOF 493 } 494 m.FactoryDenoms = append(m.FactoryDenoms, GenesisDenom{}) 495 if err := m.FactoryDenoms[len(m.FactoryDenoms)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 496 return err 497 } 498 iNdEx = postIndex 499 default: 500 iNdEx = preIndex 501 skippy, err := skipGenesis(dAtA[iNdEx:]) 502 if err != nil { 503 return err 504 } 505 if (skippy < 0) || (iNdEx+skippy) < 0 { 506 return ErrInvalidLengthGenesis 507 } 508 if (iNdEx + skippy) > l { 509 return io.ErrUnexpectedEOF 510 } 511 iNdEx += skippy 512 } 513 } 514 515 if iNdEx > l { 516 return io.ErrUnexpectedEOF 517 } 518 return nil 519 } 520 func (m *GenesisDenom) Unmarshal(dAtA []byte) error { 521 l := len(dAtA) 522 iNdEx := 0 523 for iNdEx < l { 524 preIndex := iNdEx 525 var wire uint64 526 for shift := uint(0); ; shift += 7 { 527 if shift >= 64 { 528 return ErrIntOverflowGenesis 529 } 530 if iNdEx >= l { 531 return io.ErrUnexpectedEOF 532 } 533 b := dAtA[iNdEx] 534 iNdEx++ 535 wire |= uint64(b&0x7F) << shift 536 if b < 0x80 { 537 break 538 } 539 } 540 fieldNum := int32(wire >> 3) 541 wireType := int(wire & 0x7) 542 if wireType == 4 { 543 return fmt.Errorf("proto: GenesisDenom: wiretype end group for non-group") 544 } 545 if fieldNum <= 0 { 546 return fmt.Errorf("proto: GenesisDenom: illegal tag %d (wire type %d)", fieldNum, wire) 547 } 548 switch fieldNum { 549 case 1: 550 if wireType != 2 { 551 return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) 552 } 553 var stringLen uint64 554 for shift := uint(0); ; shift += 7 { 555 if shift >= 64 { 556 return ErrIntOverflowGenesis 557 } 558 if iNdEx >= l { 559 return io.ErrUnexpectedEOF 560 } 561 b := dAtA[iNdEx] 562 iNdEx++ 563 stringLen |= uint64(b&0x7F) << shift 564 if b < 0x80 { 565 break 566 } 567 } 568 intStringLen := int(stringLen) 569 if intStringLen < 0 { 570 return ErrInvalidLengthGenesis 571 } 572 postIndex := iNdEx + intStringLen 573 if postIndex < 0 { 574 return ErrInvalidLengthGenesis 575 } 576 if postIndex > l { 577 return io.ErrUnexpectedEOF 578 } 579 m.Denom = string(dAtA[iNdEx:postIndex]) 580 iNdEx = postIndex 581 case 2: 582 if wireType != 2 { 583 return fmt.Errorf("proto: wrong wireType = %d for field AuthorityMetadata", wireType) 584 } 585 var msglen int 586 for shift := uint(0); ; shift += 7 { 587 if shift >= 64 { 588 return ErrIntOverflowGenesis 589 } 590 if iNdEx >= l { 591 return io.ErrUnexpectedEOF 592 } 593 b := dAtA[iNdEx] 594 iNdEx++ 595 msglen |= int(b&0x7F) << shift 596 if b < 0x80 { 597 break 598 } 599 } 600 if msglen < 0 { 601 return ErrInvalidLengthGenesis 602 } 603 postIndex := iNdEx + msglen 604 if postIndex < 0 { 605 return ErrInvalidLengthGenesis 606 } 607 if postIndex > l { 608 return io.ErrUnexpectedEOF 609 } 610 if err := m.AuthorityMetadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 611 return err 612 } 613 iNdEx = postIndex 614 case 3: 615 if wireType != 2 { 616 return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) 617 } 618 var stringLen uint64 619 for shift := uint(0); ; shift += 7 { 620 if shift >= 64 { 621 return ErrIntOverflowGenesis 622 } 623 if iNdEx >= l { 624 return io.ErrUnexpectedEOF 625 } 626 b := dAtA[iNdEx] 627 iNdEx++ 628 stringLen |= uint64(b&0x7F) << shift 629 if b < 0x80 { 630 break 631 } 632 } 633 intStringLen := int(stringLen) 634 if intStringLen < 0 { 635 return ErrInvalidLengthGenesis 636 } 637 postIndex := iNdEx + intStringLen 638 if postIndex < 0 { 639 return ErrInvalidLengthGenesis 640 } 641 if postIndex > l { 642 return io.ErrUnexpectedEOF 643 } 644 m.Name = string(dAtA[iNdEx:postIndex]) 645 iNdEx = postIndex 646 case 4: 647 if wireType != 2 { 648 return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) 649 } 650 var stringLen uint64 651 for shift := uint(0); ; shift += 7 { 652 if shift >= 64 { 653 return ErrIntOverflowGenesis 654 } 655 if iNdEx >= l { 656 return io.ErrUnexpectedEOF 657 } 658 b := dAtA[iNdEx] 659 iNdEx++ 660 stringLen |= uint64(b&0x7F) << shift 661 if b < 0x80 { 662 break 663 } 664 } 665 intStringLen := int(stringLen) 666 if intStringLen < 0 { 667 return ErrInvalidLengthGenesis 668 } 669 postIndex := iNdEx + intStringLen 670 if postIndex < 0 { 671 return ErrInvalidLengthGenesis 672 } 673 if postIndex > l { 674 return io.ErrUnexpectedEOF 675 } 676 m.Symbol = string(dAtA[iNdEx:postIndex]) 677 iNdEx = postIndex 678 case 5: 679 if wireType != 0 { 680 return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) 681 } 682 m.Decimals = 0 683 for shift := uint(0); ; shift += 7 { 684 if shift >= 64 { 685 return ErrIntOverflowGenesis 686 } 687 if iNdEx >= l { 688 return io.ErrUnexpectedEOF 689 } 690 b := dAtA[iNdEx] 691 iNdEx++ 692 m.Decimals |= uint32(b&0x7F) << shift 693 if b < 0x80 { 694 break 695 } 696 } 697 default: 698 iNdEx = preIndex 699 skippy, err := skipGenesis(dAtA[iNdEx:]) 700 if err != nil { 701 return err 702 } 703 if (skippy < 0) || (iNdEx+skippy) < 0 { 704 return ErrInvalidLengthGenesis 705 } 706 if (iNdEx + skippy) > l { 707 return io.ErrUnexpectedEOF 708 } 709 iNdEx += skippy 710 } 711 } 712 713 if iNdEx > l { 714 return io.ErrUnexpectedEOF 715 } 716 return nil 717 } 718 func skipGenesis(dAtA []byte) (n int, err error) { 719 l := len(dAtA) 720 iNdEx := 0 721 depth := 0 722 for iNdEx < l { 723 var wire uint64 724 for shift := uint(0); ; shift += 7 { 725 if shift >= 64 { 726 return 0, ErrIntOverflowGenesis 727 } 728 if iNdEx >= l { 729 return 0, io.ErrUnexpectedEOF 730 } 731 b := dAtA[iNdEx] 732 iNdEx++ 733 wire |= (uint64(b) & 0x7F) << shift 734 if b < 0x80 { 735 break 736 } 737 } 738 wireType := int(wire & 0x7) 739 switch wireType { 740 case 0: 741 for shift := uint(0); ; shift += 7 { 742 if shift >= 64 { 743 return 0, ErrIntOverflowGenesis 744 } 745 if iNdEx >= l { 746 return 0, io.ErrUnexpectedEOF 747 } 748 iNdEx++ 749 if dAtA[iNdEx-1] < 0x80 { 750 break 751 } 752 } 753 case 1: 754 iNdEx += 8 755 case 2: 756 var length int 757 for shift := uint(0); ; shift += 7 { 758 if shift >= 64 { 759 return 0, ErrIntOverflowGenesis 760 } 761 if iNdEx >= l { 762 return 0, io.ErrUnexpectedEOF 763 } 764 b := dAtA[iNdEx] 765 iNdEx++ 766 length |= (int(b) & 0x7F) << shift 767 if b < 0x80 { 768 break 769 } 770 } 771 if length < 0 { 772 return 0, ErrInvalidLengthGenesis 773 } 774 iNdEx += length 775 case 3: 776 depth++ 777 case 4: 778 if depth == 0 { 779 return 0, ErrUnexpectedEndOfGroupGenesis 780 } 781 depth-- 782 case 5: 783 iNdEx += 4 784 default: 785 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 786 } 787 if iNdEx < 0 { 788 return 0, ErrInvalidLengthGenesis 789 } 790 if depth == 0 { 791 return iNdEx, nil 792 } 793 } 794 return 0, io.ErrUnexpectedEOF 795 } 796 797 var ( 798 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 799 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 800 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 801 )