github.com/Finschia/finschia-sdk@v0.48.1/x/foundation/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: lbm/foundation/v1/genesis.proto 3 4 package foundation 5 6 import ( 7 fmt "fmt" 8 types "github.com/Finschia/finschia-sdk/codec/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 // GenesisState defines the foundation module's genesis state. 29 type GenesisState struct { 30 // params defines the module parameters at genesis. 31 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 32 // foundation is the foundation info. 33 Foundation FoundationInfo `protobuf:"bytes,2,opt,name=foundation,proto3" json:"foundation"` 34 // members is the list of the foundation members. 35 Members []Member `protobuf:"bytes,3,rep,name=members,proto3" json:"members"` 36 // it is used to get the next proposal ID. 37 PreviousProposalId uint64 `protobuf:"varint,4,opt,name=previous_proposal_id,json=previousProposalId,proto3" json:"previous_proposal_id,omitempty"` 38 // proposals is the list of proposals. 39 Proposals []Proposal `protobuf:"bytes,5,rep,name=proposals,proto3" json:"proposals"` 40 // votes is the list of votes. 41 Votes []Vote `protobuf:"bytes,6,rep,name=votes,proto3" json:"votes"` 42 // grants 43 Authorizations []GrantAuthorization `protobuf:"bytes,7,rep,name=authorizations,proto3" json:"authorizations"` 44 // pool 45 Pool Pool `protobuf:"bytes,8,opt,name=pool,proto3" json:"pool"` 46 Censorships []Censorship `protobuf:"bytes,10,rep,name=censorships,proto3" json:"censorships"` 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_c5e13dd78b24d473, []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 // GrantAuthorization defines authorization grant to grantee via route. 83 type GrantAuthorization struct { 84 Grantee string `protobuf:"bytes,1,opt,name=grantee,proto3" json:"grantee,omitempty"` 85 Authorization *types.Any `protobuf:"bytes,2,opt,name=authorization,proto3" json:"authorization,omitempty"` 86 } 87 88 func (m *GrantAuthorization) Reset() { *m = GrantAuthorization{} } 89 func (m *GrantAuthorization) String() string { return proto.CompactTextString(m) } 90 func (*GrantAuthorization) ProtoMessage() {} 91 func (*GrantAuthorization) Descriptor() ([]byte, []int) { 92 return fileDescriptor_c5e13dd78b24d473, []int{1} 93 } 94 func (m *GrantAuthorization) XXX_Unmarshal(b []byte) error { 95 return m.Unmarshal(b) 96 } 97 func (m *GrantAuthorization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 98 if deterministic { 99 return xxx_messageInfo_GrantAuthorization.Marshal(b, m, deterministic) 100 } else { 101 b = b[:cap(b)] 102 n, err := m.MarshalToSizedBuffer(b) 103 if err != nil { 104 return nil, err 105 } 106 return b[:n], nil 107 } 108 } 109 func (m *GrantAuthorization) XXX_Merge(src proto.Message) { 110 xxx_messageInfo_GrantAuthorization.Merge(m, src) 111 } 112 func (m *GrantAuthorization) XXX_Size() int { 113 return m.Size() 114 } 115 func (m *GrantAuthorization) XXX_DiscardUnknown() { 116 xxx_messageInfo_GrantAuthorization.DiscardUnknown(m) 117 } 118 119 var xxx_messageInfo_GrantAuthorization proto.InternalMessageInfo 120 121 func init() { 122 proto.RegisterType((*GenesisState)(nil), "lbm.foundation.v1.GenesisState") 123 proto.RegisterType((*GrantAuthorization)(nil), "lbm.foundation.v1.GrantAuthorization") 124 } 125 126 func init() { proto.RegisterFile("lbm/foundation/v1/genesis.proto", fileDescriptor_c5e13dd78b24d473) } 127 128 var fileDescriptor_c5e13dd78b24d473 = []byte{ 129 // 517 bytes of a gzipped FileDescriptorProto 130 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x93, 0x3f, 0x6f, 0xd3, 0x40, 131 0x18, 0x87, 0x6d, 0xea, 0xe6, 0xcf, 0x15, 0x10, 0x9c, 0x22, 0x71, 0x2d, 0xc2, 0x09, 0x91, 0x90, 132 0xba, 0xc4, 0x26, 0x74, 0x40, 0x94, 0xa1, 0x6a, 0x10, 0x8d, 0x0a, 0x42, 0x8a, 0x52, 0x89, 0x81, 133 0xa5, 0xb2, 0x93, 0x8b, 0x73, 0x22, 0xbe, 0xd7, 0xf2, 0x9d, 0x23, 0x0a, 0x5f, 0x80, 0x91, 0x8f, 134 0xd0, 0x91, 0x15, 0x89, 0x0f, 0x51, 0x31, 0x55, 0x4c, 0x4c, 0x08, 0x25, 0x0b, 0x1f, 0x03, 0xe5, 135 0x7c, 0x6e, 0x1c, 0x62, 0x06, 0x36, 0x5f, 0xde, 0xe7, 0x79, 0xdf, 0xdf, 0x9d, 0xde, 0xa0, 0xfa, 136 0xc4, 0x0f, 0xdd, 0x11, 0x24, 0x7c, 0xe8, 0x49, 0x06, 0xdc, 0x9d, 0xb6, 0xdd, 0x80, 0x72, 0x2a, 137 0x98, 0x70, 0xa2, 0x18, 0x24, 0xe0, 0xdb, 0x13, 0x3f, 0x74, 0x96, 0x80, 0x33, 0x6d, 0xef, 0xd4, 138 0x02, 0x08, 0x40, 0x55, 0xdd, 0xc5, 0x57, 0x0a, 0xee, 0x34, 0xd7, 0x3b, 0xe5, 0xb4, 0x94, 0xd9, 139 0x1e, 0x80, 0x08, 0x41, 0x9c, 0xa6, 0x72, 0x7a, 0xc8, 0x4a, 0x01, 0x40, 0x30, 0xa1, 0xae, 0x3a, 140 0xf9, 0xc9, 0xc8, 0xf5, 0xf8, 0x59, 0x5a, 0x6a, 0x7e, 0xb7, 0xd0, 0xf5, 0x6e, 0x1a, 0xea, 0x44, 141 0x7a, 0x92, 0xe2, 0xc7, 0xa8, 0x14, 0x79, 0xb1, 0x17, 0x0a, 0x62, 0x36, 0xcc, 0xdd, 0xad, 0x47, 142 0xdb, 0xce, 0x5a, 0x48, 0xa7, 0xa7, 0x80, 0x8e, 0x75, 0xf1, 0xb3, 0x6e, 0xf4, 0x35, 0x8e, 0xbb, 143 0x08, 0x2d, 0x29, 0x72, 0x4d, 0xc9, 0xf7, 0x0b, 0xe4, 0xa3, 0xab, 0xd3, 0x31, 0x1f, 0x81, 0x6e, 144 0x92, 0x53, 0xf1, 0x13, 0x54, 0x0e, 0x69, 0xe8, 0xd3, 0x58, 0x90, 0x8d, 0xc6, 0xc6, 0x3f, 0x22, 145 0xbc, 0x52, 0x84, 0xb6, 0x33, 0x1e, 0x3f, 0x44, 0xb5, 0x28, 0xa6, 0x53, 0x06, 0x89, 0x7a, 0x87, 146 0x08, 0x84, 0x37, 0x39, 0x65, 0x43, 0x62, 0x35, 0xcc, 0x5d, 0xab, 0x8f, 0xb3, 0x5a, 0x4f, 0x97, 147 0x8e, 0x87, 0xf8, 0x00, 0x55, 0x33, 0x50, 0x90, 0x4d, 0x35, 0xee, 0x6e, 0xd1, 0x8d, 0x35, 0xa3, 148 0x07, 0x2e, 0x1d, 0xbc, 0x87, 0x36, 0xa7, 0x20, 0xa9, 0x20, 0x25, 0x25, 0xdf, 0x29, 0x90, 0x5f, 149 0x83, 0xa4, 0x5a, 0x4c, 0x59, 0x7c, 0x82, 0x6e, 0x7a, 0x89, 0x1c, 0x43, 0xcc, 0xde, 0x2b, 0x4a, 150 0x90, 0xb2, 0xb2, 0x1f, 0x14, 0xd8, 0xdd, 0xd8, 0xe3, 0xf2, 0x30, 0x4f, 0xeb, 0x5e, 0x7f, 0xb5, 151 0xc0, 0x6d, 0x64, 0x45, 0x00, 0x13, 0x52, 0x51, 0x4f, 0x5f, 0x14, 0xa4, 0x07, 0x90, 0xdd, 0x40, 152 0xa1, 0xf8, 0x39, 0xda, 0x1a, 0x50, 0x2e, 0x20, 0x16, 0x63, 0x16, 0x09, 0x82, 0x54, 0x88, 0x7b, 153 0x05, 0xe6, 0xb3, 0x2b, 0x4a, 0xfb, 0x79, 0x6f, 0xbf, 0xf2, 0xf1, 0xbc, 0x6e, 0xfc, 0x3e, 0xaf, 154 0x1b, 0x2f, 0xac, 0x4a, 0xf5, 0x16, 0x6a, 0x7e, 0x31, 0x11, 0x5e, 0x8f, 0x8d, 0x09, 0x2a, 0x07, 155 0x8b, 0x5f, 0x29, 0x55, 0xbb, 0x55, 0xed, 0x67, 0x47, 0xfc, 0x01, 0xdd, 0x58, 0xb9, 0x8c, 0x5e, 156 0x9f, 0x9a, 0x93, 0x2e, 0xae, 0x93, 0x2d, 0xae, 0x73, 0xc8, 0xcf, 0x3a, 0x07, 0xdf, 0xbe, 0xb6, 157 0x9e, 0x06, 0x4c, 0x8e, 0x13, 0xdf, 0x19, 0x40, 0xe8, 0x1e, 0x31, 0x2e, 0x06, 0x63, 0xe6, 0xb9, 158 0x23, 0xfd, 0xd1, 0x12, 0xc3, 0xb7, 0xee, 0xbb, 0xfc, 0x3f, 0x64, 0x25, 0x47, 0x7f, 0x75, 0xd6, 159 0xbe, 0xb5, 0x48, 0xdf, 0x79, 0xf9, 0x79, 0x66, 0x9b, 0x17, 0x33, 0xdb, 0xbc, 0x9c, 0xd9, 0xe6, 160 0xaf, 0x99, 0x6d, 0x7e, 0x9a, 0xdb, 0xc6, 0xe5, 0xdc, 0x36, 0x7e, 0xcc, 0x6d, 0xe3, 0x4d, 0xeb, 161 0xbf, 0xe6, 0xf9, 0x25, 0x15, 0x78, 0xef, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0x37, 0xe3, 162 0x2e, 0x02, 0x04, 0x00, 0x00, 163 } 164 165 func (this *GrantAuthorization) Equal(that interface{}) bool { 166 if that == nil { 167 return this == nil 168 } 169 170 that1, ok := that.(*GrantAuthorization) 171 if !ok { 172 that2, ok := that.(GrantAuthorization) 173 if ok { 174 that1 = &that2 175 } else { 176 return false 177 } 178 } 179 if that1 == nil { 180 return this == nil 181 } else if this == nil { 182 return false 183 } 184 if this.Grantee != that1.Grantee { 185 return false 186 } 187 if !this.Authorization.Equal(that1.Authorization) { 188 return false 189 } 190 return true 191 } 192 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 193 size := m.Size() 194 dAtA = make([]byte, size) 195 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 196 if err != nil { 197 return nil, err 198 } 199 return dAtA[:n], nil 200 } 201 202 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 203 size := m.Size() 204 return m.MarshalToSizedBuffer(dAtA[:size]) 205 } 206 207 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 208 i := len(dAtA) 209 _ = i 210 var l int 211 _ = l 212 if len(m.Censorships) > 0 { 213 for iNdEx := len(m.Censorships) - 1; iNdEx >= 0; iNdEx-- { 214 { 215 size, err := m.Censorships[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 216 if err != nil { 217 return 0, err 218 } 219 i -= size 220 i = encodeVarintGenesis(dAtA, i, uint64(size)) 221 } 222 i-- 223 dAtA[i] = 0x52 224 } 225 } 226 { 227 size, err := m.Pool.MarshalToSizedBuffer(dAtA[:i]) 228 if err != nil { 229 return 0, err 230 } 231 i -= size 232 i = encodeVarintGenesis(dAtA, i, uint64(size)) 233 } 234 i-- 235 dAtA[i] = 0x42 236 if len(m.Authorizations) > 0 { 237 for iNdEx := len(m.Authorizations) - 1; iNdEx >= 0; iNdEx-- { 238 { 239 size, err := m.Authorizations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 240 if err != nil { 241 return 0, err 242 } 243 i -= size 244 i = encodeVarintGenesis(dAtA, i, uint64(size)) 245 } 246 i-- 247 dAtA[i] = 0x3a 248 } 249 } 250 if len(m.Votes) > 0 { 251 for iNdEx := len(m.Votes) - 1; iNdEx >= 0; iNdEx-- { 252 { 253 size, err := m.Votes[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 254 if err != nil { 255 return 0, err 256 } 257 i -= size 258 i = encodeVarintGenesis(dAtA, i, uint64(size)) 259 } 260 i-- 261 dAtA[i] = 0x32 262 } 263 } 264 if len(m.Proposals) > 0 { 265 for iNdEx := len(m.Proposals) - 1; iNdEx >= 0; iNdEx-- { 266 { 267 size, err := m.Proposals[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 268 if err != nil { 269 return 0, err 270 } 271 i -= size 272 i = encodeVarintGenesis(dAtA, i, uint64(size)) 273 } 274 i-- 275 dAtA[i] = 0x2a 276 } 277 } 278 if m.PreviousProposalId != 0 { 279 i = encodeVarintGenesis(dAtA, i, uint64(m.PreviousProposalId)) 280 i-- 281 dAtA[i] = 0x20 282 } 283 if len(m.Members) > 0 { 284 for iNdEx := len(m.Members) - 1; iNdEx >= 0; iNdEx-- { 285 { 286 size, err := m.Members[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 287 if err != nil { 288 return 0, err 289 } 290 i -= size 291 i = encodeVarintGenesis(dAtA, i, uint64(size)) 292 } 293 i-- 294 dAtA[i] = 0x1a 295 } 296 } 297 { 298 size, err := m.Foundation.MarshalToSizedBuffer(dAtA[:i]) 299 if err != nil { 300 return 0, err 301 } 302 i -= size 303 i = encodeVarintGenesis(dAtA, i, uint64(size)) 304 } 305 i-- 306 dAtA[i] = 0x12 307 { 308 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 309 if err != nil { 310 return 0, err 311 } 312 i -= size 313 i = encodeVarintGenesis(dAtA, i, uint64(size)) 314 } 315 i-- 316 dAtA[i] = 0xa 317 return len(dAtA) - i, nil 318 } 319 320 func (m *GrantAuthorization) Marshal() (dAtA []byte, err error) { 321 size := m.Size() 322 dAtA = make([]byte, size) 323 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 324 if err != nil { 325 return nil, err 326 } 327 return dAtA[:n], nil 328 } 329 330 func (m *GrantAuthorization) MarshalTo(dAtA []byte) (int, error) { 331 size := m.Size() 332 return m.MarshalToSizedBuffer(dAtA[:size]) 333 } 334 335 func (m *GrantAuthorization) MarshalToSizedBuffer(dAtA []byte) (int, error) { 336 i := len(dAtA) 337 _ = i 338 var l int 339 _ = l 340 if m.Authorization != nil { 341 { 342 size, err := m.Authorization.MarshalToSizedBuffer(dAtA[:i]) 343 if err != nil { 344 return 0, err 345 } 346 i -= size 347 i = encodeVarintGenesis(dAtA, i, uint64(size)) 348 } 349 i-- 350 dAtA[i] = 0x12 351 } 352 if len(m.Grantee) > 0 { 353 i -= len(m.Grantee) 354 copy(dAtA[i:], m.Grantee) 355 i = encodeVarintGenesis(dAtA, i, uint64(len(m.Grantee))) 356 i-- 357 dAtA[i] = 0xa 358 } 359 return len(dAtA) - i, nil 360 } 361 362 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 363 offset -= sovGenesis(v) 364 base := offset 365 for v >= 1<<7 { 366 dAtA[offset] = uint8(v&0x7f | 0x80) 367 v >>= 7 368 offset++ 369 } 370 dAtA[offset] = uint8(v) 371 return base 372 } 373 func (m *GenesisState) Size() (n int) { 374 if m == nil { 375 return 0 376 } 377 var l int 378 _ = l 379 l = m.Params.Size() 380 n += 1 + l + sovGenesis(uint64(l)) 381 l = m.Foundation.Size() 382 n += 1 + l + sovGenesis(uint64(l)) 383 if len(m.Members) > 0 { 384 for _, e := range m.Members { 385 l = e.Size() 386 n += 1 + l + sovGenesis(uint64(l)) 387 } 388 } 389 if m.PreviousProposalId != 0 { 390 n += 1 + sovGenesis(uint64(m.PreviousProposalId)) 391 } 392 if len(m.Proposals) > 0 { 393 for _, e := range m.Proposals { 394 l = e.Size() 395 n += 1 + l + sovGenesis(uint64(l)) 396 } 397 } 398 if len(m.Votes) > 0 { 399 for _, e := range m.Votes { 400 l = e.Size() 401 n += 1 + l + sovGenesis(uint64(l)) 402 } 403 } 404 if len(m.Authorizations) > 0 { 405 for _, e := range m.Authorizations { 406 l = e.Size() 407 n += 1 + l + sovGenesis(uint64(l)) 408 } 409 } 410 l = m.Pool.Size() 411 n += 1 + l + sovGenesis(uint64(l)) 412 if len(m.Censorships) > 0 { 413 for _, e := range m.Censorships { 414 l = e.Size() 415 n += 1 + l + sovGenesis(uint64(l)) 416 } 417 } 418 return n 419 } 420 421 func (m *GrantAuthorization) Size() (n int) { 422 if m == nil { 423 return 0 424 } 425 var l int 426 _ = l 427 l = len(m.Grantee) 428 if l > 0 { 429 n += 1 + l + sovGenesis(uint64(l)) 430 } 431 if m.Authorization != nil { 432 l = m.Authorization.Size() 433 n += 1 + l + sovGenesis(uint64(l)) 434 } 435 return n 436 } 437 438 func sovGenesis(x uint64) (n int) { 439 return (math_bits.Len64(x|1) + 6) / 7 440 } 441 func sozGenesis(x uint64) (n int) { 442 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 443 } 444 func (m *GenesisState) Unmarshal(dAtA []byte) error { 445 l := len(dAtA) 446 iNdEx := 0 447 for iNdEx < l { 448 preIndex := iNdEx 449 var wire uint64 450 for shift := uint(0); ; shift += 7 { 451 if shift >= 64 { 452 return ErrIntOverflowGenesis 453 } 454 if iNdEx >= l { 455 return io.ErrUnexpectedEOF 456 } 457 b := dAtA[iNdEx] 458 iNdEx++ 459 wire |= uint64(b&0x7F) << shift 460 if b < 0x80 { 461 break 462 } 463 } 464 fieldNum := int32(wire >> 3) 465 wireType := int(wire & 0x7) 466 if wireType == 4 { 467 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 468 } 469 if fieldNum <= 0 { 470 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 471 } 472 switch fieldNum { 473 case 1: 474 if wireType != 2 { 475 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 476 } 477 var msglen int 478 for shift := uint(0); ; shift += 7 { 479 if shift >= 64 { 480 return ErrIntOverflowGenesis 481 } 482 if iNdEx >= l { 483 return io.ErrUnexpectedEOF 484 } 485 b := dAtA[iNdEx] 486 iNdEx++ 487 msglen |= int(b&0x7F) << shift 488 if b < 0x80 { 489 break 490 } 491 } 492 if msglen < 0 { 493 return ErrInvalidLengthGenesis 494 } 495 postIndex := iNdEx + msglen 496 if postIndex < 0 { 497 return ErrInvalidLengthGenesis 498 } 499 if postIndex > l { 500 return io.ErrUnexpectedEOF 501 } 502 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 503 return err 504 } 505 iNdEx = postIndex 506 case 2: 507 if wireType != 2 { 508 return fmt.Errorf("proto: wrong wireType = %d for field Foundation", wireType) 509 } 510 var msglen int 511 for shift := uint(0); ; shift += 7 { 512 if shift >= 64 { 513 return ErrIntOverflowGenesis 514 } 515 if iNdEx >= l { 516 return io.ErrUnexpectedEOF 517 } 518 b := dAtA[iNdEx] 519 iNdEx++ 520 msglen |= int(b&0x7F) << shift 521 if b < 0x80 { 522 break 523 } 524 } 525 if msglen < 0 { 526 return ErrInvalidLengthGenesis 527 } 528 postIndex := iNdEx + msglen 529 if postIndex < 0 { 530 return ErrInvalidLengthGenesis 531 } 532 if postIndex > l { 533 return io.ErrUnexpectedEOF 534 } 535 if err := m.Foundation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 536 return err 537 } 538 iNdEx = postIndex 539 case 3: 540 if wireType != 2 { 541 return fmt.Errorf("proto: wrong wireType = %d for field Members", wireType) 542 } 543 var msglen int 544 for shift := uint(0); ; shift += 7 { 545 if shift >= 64 { 546 return ErrIntOverflowGenesis 547 } 548 if iNdEx >= l { 549 return io.ErrUnexpectedEOF 550 } 551 b := dAtA[iNdEx] 552 iNdEx++ 553 msglen |= int(b&0x7F) << shift 554 if b < 0x80 { 555 break 556 } 557 } 558 if msglen < 0 { 559 return ErrInvalidLengthGenesis 560 } 561 postIndex := iNdEx + msglen 562 if postIndex < 0 { 563 return ErrInvalidLengthGenesis 564 } 565 if postIndex > l { 566 return io.ErrUnexpectedEOF 567 } 568 m.Members = append(m.Members, Member{}) 569 if err := m.Members[len(m.Members)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 570 return err 571 } 572 iNdEx = postIndex 573 case 4: 574 if wireType != 0 { 575 return fmt.Errorf("proto: wrong wireType = %d for field PreviousProposalId", wireType) 576 } 577 m.PreviousProposalId = 0 578 for shift := uint(0); ; shift += 7 { 579 if shift >= 64 { 580 return ErrIntOverflowGenesis 581 } 582 if iNdEx >= l { 583 return io.ErrUnexpectedEOF 584 } 585 b := dAtA[iNdEx] 586 iNdEx++ 587 m.PreviousProposalId |= uint64(b&0x7F) << shift 588 if b < 0x80 { 589 break 590 } 591 } 592 case 5: 593 if wireType != 2 { 594 return fmt.Errorf("proto: wrong wireType = %d for field Proposals", wireType) 595 } 596 var msglen int 597 for shift := uint(0); ; shift += 7 { 598 if shift >= 64 { 599 return ErrIntOverflowGenesis 600 } 601 if iNdEx >= l { 602 return io.ErrUnexpectedEOF 603 } 604 b := dAtA[iNdEx] 605 iNdEx++ 606 msglen |= int(b&0x7F) << shift 607 if b < 0x80 { 608 break 609 } 610 } 611 if msglen < 0 { 612 return ErrInvalidLengthGenesis 613 } 614 postIndex := iNdEx + msglen 615 if postIndex < 0 { 616 return ErrInvalidLengthGenesis 617 } 618 if postIndex > l { 619 return io.ErrUnexpectedEOF 620 } 621 m.Proposals = append(m.Proposals, Proposal{}) 622 if err := m.Proposals[len(m.Proposals)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 623 return err 624 } 625 iNdEx = postIndex 626 case 6: 627 if wireType != 2 { 628 return fmt.Errorf("proto: wrong wireType = %d for field Votes", wireType) 629 } 630 var msglen int 631 for shift := uint(0); ; shift += 7 { 632 if shift >= 64 { 633 return ErrIntOverflowGenesis 634 } 635 if iNdEx >= l { 636 return io.ErrUnexpectedEOF 637 } 638 b := dAtA[iNdEx] 639 iNdEx++ 640 msglen |= int(b&0x7F) << shift 641 if b < 0x80 { 642 break 643 } 644 } 645 if msglen < 0 { 646 return ErrInvalidLengthGenesis 647 } 648 postIndex := iNdEx + msglen 649 if postIndex < 0 { 650 return ErrInvalidLengthGenesis 651 } 652 if postIndex > l { 653 return io.ErrUnexpectedEOF 654 } 655 m.Votes = append(m.Votes, Vote{}) 656 if err := m.Votes[len(m.Votes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 657 return err 658 } 659 iNdEx = postIndex 660 case 7: 661 if wireType != 2 { 662 return fmt.Errorf("proto: wrong wireType = %d for field Authorizations", wireType) 663 } 664 var msglen int 665 for shift := uint(0); ; shift += 7 { 666 if shift >= 64 { 667 return ErrIntOverflowGenesis 668 } 669 if iNdEx >= l { 670 return io.ErrUnexpectedEOF 671 } 672 b := dAtA[iNdEx] 673 iNdEx++ 674 msglen |= int(b&0x7F) << shift 675 if b < 0x80 { 676 break 677 } 678 } 679 if msglen < 0 { 680 return ErrInvalidLengthGenesis 681 } 682 postIndex := iNdEx + msglen 683 if postIndex < 0 { 684 return ErrInvalidLengthGenesis 685 } 686 if postIndex > l { 687 return io.ErrUnexpectedEOF 688 } 689 m.Authorizations = append(m.Authorizations, GrantAuthorization{}) 690 if err := m.Authorizations[len(m.Authorizations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 691 return err 692 } 693 iNdEx = postIndex 694 case 8: 695 if wireType != 2 { 696 return fmt.Errorf("proto: wrong wireType = %d for field Pool", wireType) 697 } 698 var msglen int 699 for shift := uint(0); ; shift += 7 { 700 if shift >= 64 { 701 return ErrIntOverflowGenesis 702 } 703 if iNdEx >= l { 704 return io.ErrUnexpectedEOF 705 } 706 b := dAtA[iNdEx] 707 iNdEx++ 708 msglen |= int(b&0x7F) << shift 709 if b < 0x80 { 710 break 711 } 712 } 713 if msglen < 0 { 714 return ErrInvalidLengthGenesis 715 } 716 postIndex := iNdEx + msglen 717 if postIndex < 0 { 718 return ErrInvalidLengthGenesis 719 } 720 if postIndex > l { 721 return io.ErrUnexpectedEOF 722 } 723 if err := m.Pool.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 724 return err 725 } 726 iNdEx = postIndex 727 case 10: 728 if wireType != 2 { 729 return fmt.Errorf("proto: wrong wireType = %d for field Censorships", wireType) 730 } 731 var msglen int 732 for shift := uint(0); ; shift += 7 { 733 if shift >= 64 { 734 return ErrIntOverflowGenesis 735 } 736 if iNdEx >= l { 737 return io.ErrUnexpectedEOF 738 } 739 b := dAtA[iNdEx] 740 iNdEx++ 741 msglen |= int(b&0x7F) << shift 742 if b < 0x80 { 743 break 744 } 745 } 746 if msglen < 0 { 747 return ErrInvalidLengthGenesis 748 } 749 postIndex := iNdEx + msglen 750 if postIndex < 0 { 751 return ErrInvalidLengthGenesis 752 } 753 if postIndex > l { 754 return io.ErrUnexpectedEOF 755 } 756 m.Censorships = append(m.Censorships, Censorship{}) 757 if err := m.Censorships[len(m.Censorships)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 758 return err 759 } 760 iNdEx = postIndex 761 default: 762 iNdEx = preIndex 763 skippy, err := skipGenesis(dAtA[iNdEx:]) 764 if err != nil { 765 return err 766 } 767 if (skippy < 0) || (iNdEx+skippy) < 0 { 768 return ErrInvalidLengthGenesis 769 } 770 if (iNdEx + skippy) > l { 771 return io.ErrUnexpectedEOF 772 } 773 iNdEx += skippy 774 } 775 } 776 777 if iNdEx > l { 778 return io.ErrUnexpectedEOF 779 } 780 return nil 781 } 782 func (m *GrantAuthorization) Unmarshal(dAtA []byte) error { 783 l := len(dAtA) 784 iNdEx := 0 785 for iNdEx < l { 786 preIndex := iNdEx 787 var wire uint64 788 for shift := uint(0); ; shift += 7 { 789 if shift >= 64 { 790 return ErrIntOverflowGenesis 791 } 792 if iNdEx >= l { 793 return io.ErrUnexpectedEOF 794 } 795 b := dAtA[iNdEx] 796 iNdEx++ 797 wire |= uint64(b&0x7F) << shift 798 if b < 0x80 { 799 break 800 } 801 } 802 fieldNum := int32(wire >> 3) 803 wireType := int(wire & 0x7) 804 if wireType == 4 { 805 return fmt.Errorf("proto: GrantAuthorization: wiretype end group for non-group") 806 } 807 if fieldNum <= 0 { 808 return fmt.Errorf("proto: GrantAuthorization: illegal tag %d (wire type %d)", fieldNum, wire) 809 } 810 switch fieldNum { 811 case 1: 812 if wireType != 2 { 813 return fmt.Errorf("proto: wrong wireType = %d for field Grantee", wireType) 814 } 815 var stringLen uint64 816 for shift := uint(0); ; shift += 7 { 817 if shift >= 64 { 818 return ErrIntOverflowGenesis 819 } 820 if iNdEx >= l { 821 return io.ErrUnexpectedEOF 822 } 823 b := dAtA[iNdEx] 824 iNdEx++ 825 stringLen |= uint64(b&0x7F) << shift 826 if b < 0x80 { 827 break 828 } 829 } 830 intStringLen := int(stringLen) 831 if intStringLen < 0 { 832 return ErrInvalidLengthGenesis 833 } 834 postIndex := iNdEx + intStringLen 835 if postIndex < 0 { 836 return ErrInvalidLengthGenesis 837 } 838 if postIndex > l { 839 return io.ErrUnexpectedEOF 840 } 841 m.Grantee = string(dAtA[iNdEx:postIndex]) 842 iNdEx = postIndex 843 case 2: 844 if wireType != 2 { 845 return fmt.Errorf("proto: wrong wireType = %d for field Authorization", wireType) 846 } 847 var msglen int 848 for shift := uint(0); ; shift += 7 { 849 if shift >= 64 { 850 return ErrIntOverflowGenesis 851 } 852 if iNdEx >= l { 853 return io.ErrUnexpectedEOF 854 } 855 b := dAtA[iNdEx] 856 iNdEx++ 857 msglen |= int(b&0x7F) << shift 858 if b < 0x80 { 859 break 860 } 861 } 862 if msglen < 0 { 863 return ErrInvalidLengthGenesis 864 } 865 postIndex := iNdEx + msglen 866 if postIndex < 0 { 867 return ErrInvalidLengthGenesis 868 } 869 if postIndex > l { 870 return io.ErrUnexpectedEOF 871 } 872 if m.Authorization == nil { 873 m.Authorization = &types.Any{} 874 } 875 if err := m.Authorization.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 876 return err 877 } 878 iNdEx = postIndex 879 default: 880 iNdEx = preIndex 881 skippy, err := skipGenesis(dAtA[iNdEx:]) 882 if err != nil { 883 return err 884 } 885 if (skippy < 0) || (iNdEx+skippy) < 0 { 886 return ErrInvalidLengthGenesis 887 } 888 if (iNdEx + skippy) > l { 889 return io.ErrUnexpectedEOF 890 } 891 iNdEx += skippy 892 } 893 } 894 895 if iNdEx > l { 896 return io.ErrUnexpectedEOF 897 } 898 return nil 899 } 900 func skipGenesis(dAtA []byte) (n int, err error) { 901 l := len(dAtA) 902 iNdEx := 0 903 depth := 0 904 for iNdEx < l { 905 var wire uint64 906 for shift := uint(0); ; shift += 7 { 907 if shift >= 64 { 908 return 0, ErrIntOverflowGenesis 909 } 910 if iNdEx >= l { 911 return 0, io.ErrUnexpectedEOF 912 } 913 b := dAtA[iNdEx] 914 iNdEx++ 915 wire |= (uint64(b) & 0x7F) << shift 916 if b < 0x80 { 917 break 918 } 919 } 920 wireType := int(wire & 0x7) 921 switch wireType { 922 case 0: 923 for shift := uint(0); ; shift += 7 { 924 if shift >= 64 { 925 return 0, ErrIntOverflowGenesis 926 } 927 if iNdEx >= l { 928 return 0, io.ErrUnexpectedEOF 929 } 930 iNdEx++ 931 if dAtA[iNdEx-1] < 0x80 { 932 break 933 } 934 } 935 case 1: 936 iNdEx += 8 937 case 2: 938 var length int 939 for shift := uint(0); ; shift += 7 { 940 if shift >= 64 { 941 return 0, ErrIntOverflowGenesis 942 } 943 if iNdEx >= l { 944 return 0, io.ErrUnexpectedEOF 945 } 946 b := dAtA[iNdEx] 947 iNdEx++ 948 length |= (int(b) & 0x7F) << shift 949 if b < 0x80 { 950 break 951 } 952 } 953 if length < 0 { 954 return 0, ErrInvalidLengthGenesis 955 } 956 iNdEx += length 957 case 3: 958 depth++ 959 case 4: 960 if depth == 0 { 961 return 0, ErrUnexpectedEndOfGroupGenesis 962 } 963 depth-- 964 case 5: 965 iNdEx += 4 966 default: 967 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 968 } 969 if iNdEx < 0 { 970 return 0, ErrInvalidLengthGenesis 971 } 972 if depth == 0 { 973 return iNdEx, nil 974 } 975 } 976 return 0, io.ErrUnexpectedEOF 977 } 978 979 var ( 980 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 981 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 982 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 983 )