github.com/InjectiveLabs/sdk-go@v1.53.0/chain/auction/types/genesis.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/auction/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 auction module's genesis state. 27 type GenesisState struct { 28 // params defines all the parameters of related to auction. 29 Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` 30 // current auction round 31 AuctionRound uint64 `protobuf:"varint,2,opt,name=auction_round,json=auctionRound,proto3" json:"auction_round,omitempty"` 32 // current highest bid 33 HighestBid *Bid `protobuf:"bytes,3,opt,name=highest_bid,json=highestBid,proto3" json:"highest_bid,omitempty"` 34 // auction ending timestamp 35 AuctionEndingTimestamp int64 `protobuf:"varint,4,opt,name=auction_ending_timestamp,json=auctionEndingTimestamp,proto3" json:"auction_ending_timestamp,omitempty"` 36 // last auction result 37 LastAuctionResult *LastAuctionResult `protobuf:"bytes,5,opt,name=last_auction_result,json=lastAuctionResult,proto3" json:"last_auction_result,omitempty"` 38 } 39 40 func (m *GenesisState) Reset() { *m = GenesisState{} } 41 func (m *GenesisState) String() string { return proto.CompactTextString(m) } 42 func (*GenesisState) ProtoMessage() {} 43 func (*GenesisState) Descriptor() ([]byte, []int) { 44 return fileDescriptor_56f095f457353f49, []int{0} 45 } 46 func (m *GenesisState) XXX_Unmarshal(b []byte) error { 47 return m.Unmarshal(b) 48 } 49 func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 50 if deterministic { 51 return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) 52 } else { 53 b = b[:cap(b)] 54 n, err := m.MarshalToSizedBuffer(b) 55 if err != nil { 56 return nil, err 57 } 58 return b[:n], nil 59 } 60 } 61 func (m *GenesisState) XXX_Merge(src proto.Message) { 62 xxx_messageInfo_GenesisState.Merge(m, src) 63 } 64 func (m *GenesisState) XXX_Size() int { 65 return m.Size() 66 } 67 func (m *GenesisState) XXX_DiscardUnknown() { 68 xxx_messageInfo_GenesisState.DiscardUnknown(m) 69 } 70 71 var xxx_messageInfo_GenesisState proto.InternalMessageInfo 72 73 func (m *GenesisState) GetParams() Params { 74 if m != nil { 75 return m.Params 76 } 77 return Params{} 78 } 79 80 func (m *GenesisState) GetAuctionRound() uint64 { 81 if m != nil { 82 return m.AuctionRound 83 } 84 return 0 85 } 86 87 func (m *GenesisState) GetHighestBid() *Bid { 88 if m != nil { 89 return m.HighestBid 90 } 91 return nil 92 } 93 94 func (m *GenesisState) GetAuctionEndingTimestamp() int64 { 95 if m != nil { 96 return m.AuctionEndingTimestamp 97 } 98 return 0 99 } 100 101 func (m *GenesisState) GetLastAuctionResult() *LastAuctionResult { 102 if m != nil { 103 return m.LastAuctionResult 104 } 105 return nil 106 } 107 108 func init() { 109 proto.RegisterType((*GenesisState)(nil), "injective.auction.v1beta1.GenesisState") 110 } 111 112 func init() { 113 proto.RegisterFile("injective/auction/v1beta1/genesis.proto", fileDescriptor_56f095f457353f49) 114 } 115 116 var fileDescriptor_56f095f457353f49 = []byte{ 117 // 350 bytes of a gzipped FileDescriptorProto 118 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xc1, 0x4a, 0xeb, 0x40, 119 0x14, 0x86, 0x93, 0xb6, 0xb7, 0x8b, 0x69, 0xef, 0xe2, 0xe6, 0x8a, 0xc4, 0x2e, 0x62, 0xd5, 0x85, 120 0x5d, 0x68, 0x42, 0x75, 0xe3, 0xae, 0x18, 0x10, 0x11, 0x2a, 0x48, 0x74, 0x25, 0x42, 0x98, 0x24, 121 0xc3, 0x64, 0x24, 0x99, 0x09, 0x99, 0x93, 0x82, 0x6f, 0xe1, 0x63, 0x75, 0x23, 0x74, 0xe9, 0x4a, 122 0xa4, 0x7d, 0x11, 0xe9, 0x74, 0x12, 0x44, 0xb0, 0xbb, 0x33, 0xff, 0xf9, 0xcf, 0xf9, 0xfe, 0xe1, 123 0xa0, 0x63, 0xc6, 0x9f, 0x49, 0x0c, 0x6c, 0x46, 0x3c, 0x5c, 0xc5, 0xc0, 0x04, 0xf7, 0x66, 0xe3, 124 0x88, 0x00, 0x1e, 0x7b, 0x94, 0x70, 0x22, 0x99, 0x74, 0x8b, 0x52, 0x80, 0xb0, 0xf6, 0x1a, 0xa3, 125 0xab, 0x8d, 0xae, 0x36, 0x0e, 0xb6, 0xec, 0xa8, 0xad, 0x6a, 0xc7, 0x60, 0x87, 0x0a, 0x2a, 0x54, 126 0xe9, 0xad, 0xab, 0x8d, 0x7a, 0xf8, 0xd6, 0x42, 0xfd, 0xeb, 0x0d, 0xeb, 0x1e, 0x30, 0x10, 0x6b, 127 0x82, 0xba, 0x05, 0x2e, 0x71, 0x2e, 0x6d, 0x73, 0x68, 0x8e, 0x7a, 0x67, 0x07, 0xee, 0xaf, 0x6c, 128 0xf7, 0x4e, 0x19, 0xfd, 0xce, 0xfc, 0x63, 0xdf, 0x08, 0xf4, 0x98, 0x75, 0x84, 0xfe, 0x6a, 0x5f, 129 0x58, 0x8a, 0x8a, 0x27, 0x76, 0x6b, 0x68, 0x8e, 0x3a, 0x41, 0x5f, 0x8b, 0xc1, 0x5a, 0xb3, 0x26, 130 0xa8, 0x97, 0x32, 0x9a, 0x12, 0x09, 0x61, 0xc4, 0x12, 0xbb, 0xad, 0x50, 0xce, 0x16, 0x94, 0xcf, 131 0x92, 0x00, 0xe9, 0x11, 0x9f, 0x25, 0xd6, 0x05, 0xb2, 0x6b, 0x0a, 0xe1, 0x09, 0xe3, 0x34, 0x04, 132 0x96, 0x13, 0x09, 0x38, 0x2f, 0xec, 0xce, 0xd0, 0x1c, 0xb5, 0x83, 0x5d, 0xdd, 0xbf, 0x52, 0xed, 133 0x87, 0xba, 0x6b, 0x3d, 0xa1, 0xff, 0x19, 0x96, 0x10, 0x36, 0x21, 0x89, 0xac, 0x32, 0xb0, 0xff, 134 0xa8, 0x08, 0x27, 0x5b, 0x22, 0x4c, 0xb1, 0x84, 0x4b, 0xfd, 0x09, 0x35, 0x13, 0xfc, 0xcb, 0x7e, 135 0x4a, 0x3e, 0x9d, 0x2f, 0x1d, 0x73, 0xb1, 0x74, 0xcc, 0xcf, 0xa5, 0x63, 0xbe, 0xae, 0x1c, 0x63, 136 0xb1, 0x72, 0x8c, 0xf7, 0x95, 0x63, 0x3c, 0xde, 0x52, 0x06, 0x69, 0x15, 0xb9, 0xb1, 0xc8, 0xbd, 137 0x9b, 0x1a, 0x32, 0xc5, 0x91, 0xf4, 0x1a, 0xe4, 0x69, 0x2c, 0x4a, 0xf2, 0xfd, 0x99, 0x62, 0xc6, 138 0xbd, 0x5c, 0x24, 0x55, 0x46, 0x64, 0x73, 0x5e, 0x78, 0x29, 0x88, 0x8c, 0xba, 0xea, 0x7e, 0xe7, 139 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x91, 0x86, 0x72, 0xfe, 0x44, 0x02, 0x00, 0x00, 140 } 141 142 func (m *GenesisState) Marshal() (dAtA []byte, err error) { 143 size := m.Size() 144 dAtA = make([]byte, size) 145 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 146 if err != nil { 147 return nil, err 148 } 149 return dAtA[:n], nil 150 } 151 152 func (m *GenesisState) MarshalTo(dAtA []byte) (int, error) { 153 size := m.Size() 154 return m.MarshalToSizedBuffer(dAtA[:size]) 155 } 156 157 func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { 158 i := len(dAtA) 159 _ = i 160 var l int 161 _ = l 162 if m.LastAuctionResult != nil { 163 { 164 size, err := m.LastAuctionResult.MarshalToSizedBuffer(dAtA[:i]) 165 if err != nil { 166 return 0, err 167 } 168 i -= size 169 i = encodeVarintGenesis(dAtA, i, uint64(size)) 170 } 171 i-- 172 dAtA[i] = 0x2a 173 } 174 if m.AuctionEndingTimestamp != 0 { 175 i = encodeVarintGenesis(dAtA, i, uint64(m.AuctionEndingTimestamp)) 176 i-- 177 dAtA[i] = 0x20 178 } 179 if m.HighestBid != nil { 180 { 181 size, err := m.HighestBid.MarshalToSizedBuffer(dAtA[:i]) 182 if err != nil { 183 return 0, err 184 } 185 i -= size 186 i = encodeVarintGenesis(dAtA, i, uint64(size)) 187 } 188 i-- 189 dAtA[i] = 0x1a 190 } 191 if m.AuctionRound != 0 { 192 i = encodeVarintGenesis(dAtA, i, uint64(m.AuctionRound)) 193 i-- 194 dAtA[i] = 0x10 195 } 196 { 197 size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) 198 if err != nil { 199 return 0, err 200 } 201 i -= size 202 i = encodeVarintGenesis(dAtA, i, uint64(size)) 203 } 204 i-- 205 dAtA[i] = 0xa 206 return len(dAtA) - i, nil 207 } 208 209 func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { 210 offset -= sovGenesis(v) 211 base := offset 212 for v >= 1<<7 { 213 dAtA[offset] = uint8(v&0x7f | 0x80) 214 v >>= 7 215 offset++ 216 } 217 dAtA[offset] = uint8(v) 218 return base 219 } 220 func (m *GenesisState) Size() (n int) { 221 if m == nil { 222 return 0 223 } 224 var l int 225 _ = l 226 l = m.Params.Size() 227 n += 1 + l + sovGenesis(uint64(l)) 228 if m.AuctionRound != 0 { 229 n += 1 + sovGenesis(uint64(m.AuctionRound)) 230 } 231 if m.HighestBid != nil { 232 l = m.HighestBid.Size() 233 n += 1 + l + sovGenesis(uint64(l)) 234 } 235 if m.AuctionEndingTimestamp != 0 { 236 n += 1 + sovGenesis(uint64(m.AuctionEndingTimestamp)) 237 } 238 if m.LastAuctionResult != nil { 239 l = m.LastAuctionResult.Size() 240 n += 1 + l + sovGenesis(uint64(l)) 241 } 242 return n 243 } 244 245 func sovGenesis(x uint64) (n int) { 246 return (math_bits.Len64(x|1) + 6) / 7 247 } 248 func sozGenesis(x uint64) (n int) { 249 return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 250 } 251 func (m *GenesisState) Unmarshal(dAtA []byte) error { 252 l := len(dAtA) 253 iNdEx := 0 254 for iNdEx < l { 255 preIndex := iNdEx 256 var wire uint64 257 for shift := uint(0); ; shift += 7 { 258 if shift >= 64 { 259 return ErrIntOverflowGenesis 260 } 261 if iNdEx >= l { 262 return io.ErrUnexpectedEOF 263 } 264 b := dAtA[iNdEx] 265 iNdEx++ 266 wire |= uint64(b&0x7F) << shift 267 if b < 0x80 { 268 break 269 } 270 } 271 fieldNum := int32(wire >> 3) 272 wireType := int(wire & 0x7) 273 if wireType == 4 { 274 return fmt.Errorf("proto: GenesisState: wiretype end group for non-group") 275 } 276 if fieldNum <= 0 { 277 return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) 278 } 279 switch fieldNum { 280 case 1: 281 if wireType != 2 { 282 return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) 283 } 284 var msglen int 285 for shift := uint(0); ; shift += 7 { 286 if shift >= 64 { 287 return ErrIntOverflowGenesis 288 } 289 if iNdEx >= l { 290 return io.ErrUnexpectedEOF 291 } 292 b := dAtA[iNdEx] 293 iNdEx++ 294 msglen |= int(b&0x7F) << shift 295 if b < 0x80 { 296 break 297 } 298 } 299 if msglen < 0 { 300 return ErrInvalidLengthGenesis 301 } 302 postIndex := iNdEx + msglen 303 if postIndex < 0 { 304 return ErrInvalidLengthGenesis 305 } 306 if postIndex > l { 307 return io.ErrUnexpectedEOF 308 } 309 if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 310 return err 311 } 312 iNdEx = postIndex 313 case 2: 314 if wireType != 0 { 315 return fmt.Errorf("proto: wrong wireType = %d for field AuctionRound", wireType) 316 } 317 m.AuctionRound = 0 318 for shift := uint(0); ; shift += 7 { 319 if shift >= 64 { 320 return ErrIntOverflowGenesis 321 } 322 if iNdEx >= l { 323 return io.ErrUnexpectedEOF 324 } 325 b := dAtA[iNdEx] 326 iNdEx++ 327 m.AuctionRound |= uint64(b&0x7F) << shift 328 if b < 0x80 { 329 break 330 } 331 } 332 case 3: 333 if wireType != 2 { 334 return fmt.Errorf("proto: wrong wireType = %d for field HighestBid", wireType) 335 } 336 var msglen int 337 for shift := uint(0); ; shift += 7 { 338 if shift >= 64 { 339 return ErrIntOverflowGenesis 340 } 341 if iNdEx >= l { 342 return io.ErrUnexpectedEOF 343 } 344 b := dAtA[iNdEx] 345 iNdEx++ 346 msglen |= int(b&0x7F) << shift 347 if b < 0x80 { 348 break 349 } 350 } 351 if msglen < 0 { 352 return ErrInvalidLengthGenesis 353 } 354 postIndex := iNdEx + msglen 355 if postIndex < 0 { 356 return ErrInvalidLengthGenesis 357 } 358 if postIndex > l { 359 return io.ErrUnexpectedEOF 360 } 361 if m.HighestBid == nil { 362 m.HighestBid = &Bid{} 363 } 364 if err := m.HighestBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 365 return err 366 } 367 iNdEx = postIndex 368 case 4: 369 if wireType != 0 { 370 return fmt.Errorf("proto: wrong wireType = %d for field AuctionEndingTimestamp", wireType) 371 } 372 m.AuctionEndingTimestamp = 0 373 for shift := uint(0); ; shift += 7 { 374 if shift >= 64 { 375 return ErrIntOverflowGenesis 376 } 377 if iNdEx >= l { 378 return io.ErrUnexpectedEOF 379 } 380 b := dAtA[iNdEx] 381 iNdEx++ 382 m.AuctionEndingTimestamp |= int64(b&0x7F) << shift 383 if b < 0x80 { 384 break 385 } 386 } 387 case 5: 388 if wireType != 2 { 389 return fmt.Errorf("proto: wrong wireType = %d for field LastAuctionResult", wireType) 390 } 391 var msglen int 392 for shift := uint(0); ; shift += 7 { 393 if shift >= 64 { 394 return ErrIntOverflowGenesis 395 } 396 if iNdEx >= l { 397 return io.ErrUnexpectedEOF 398 } 399 b := dAtA[iNdEx] 400 iNdEx++ 401 msglen |= int(b&0x7F) << shift 402 if b < 0x80 { 403 break 404 } 405 } 406 if msglen < 0 { 407 return ErrInvalidLengthGenesis 408 } 409 postIndex := iNdEx + msglen 410 if postIndex < 0 { 411 return ErrInvalidLengthGenesis 412 } 413 if postIndex > l { 414 return io.ErrUnexpectedEOF 415 } 416 if m.LastAuctionResult == nil { 417 m.LastAuctionResult = &LastAuctionResult{} 418 } 419 if err := m.LastAuctionResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 420 return err 421 } 422 iNdEx = postIndex 423 default: 424 iNdEx = preIndex 425 skippy, err := skipGenesis(dAtA[iNdEx:]) 426 if err != nil { 427 return err 428 } 429 if (skippy < 0) || (iNdEx+skippy) < 0 { 430 return ErrInvalidLengthGenesis 431 } 432 if (iNdEx + skippy) > l { 433 return io.ErrUnexpectedEOF 434 } 435 iNdEx += skippy 436 } 437 } 438 439 if iNdEx > l { 440 return io.ErrUnexpectedEOF 441 } 442 return nil 443 } 444 func skipGenesis(dAtA []byte) (n int, err error) { 445 l := len(dAtA) 446 iNdEx := 0 447 depth := 0 448 for iNdEx < l { 449 var wire uint64 450 for shift := uint(0); ; shift += 7 { 451 if shift >= 64 { 452 return 0, ErrIntOverflowGenesis 453 } 454 if iNdEx >= l { 455 return 0, io.ErrUnexpectedEOF 456 } 457 b := dAtA[iNdEx] 458 iNdEx++ 459 wire |= (uint64(b) & 0x7F) << shift 460 if b < 0x80 { 461 break 462 } 463 } 464 wireType := int(wire & 0x7) 465 switch wireType { 466 case 0: 467 for shift := uint(0); ; shift += 7 { 468 if shift >= 64 { 469 return 0, ErrIntOverflowGenesis 470 } 471 if iNdEx >= l { 472 return 0, io.ErrUnexpectedEOF 473 } 474 iNdEx++ 475 if dAtA[iNdEx-1] < 0x80 { 476 break 477 } 478 } 479 case 1: 480 iNdEx += 8 481 case 2: 482 var length int 483 for shift := uint(0); ; shift += 7 { 484 if shift >= 64 { 485 return 0, ErrIntOverflowGenesis 486 } 487 if iNdEx >= l { 488 return 0, io.ErrUnexpectedEOF 489 } 490 b := dAtA[iNdEx] 491 iNdEx++ 492 length |= (int(b) & 0x7F) << shift 493 if b < 0x80 { 494 break 495 } 496 } 497 if length < 0 { 498 return 0, ErrInvalidLengthGenesis 499 } 500 iNdEx += length 501 case 3: 502 depth++ 503 case 4: 504 if depth == 0 { 505 return 0, ErrUnexpectedEndOfGroupGenesis 506 } 507 depth-- 508 case 5: 509 iNdEx += 4 510 default: 511 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 512 } 513 if iNdEx < 0 { 514 return 0, ErrInvalidLengthGenesis 515 } 516 if depth == 0 { 517 return iNdEx, nil 518 } 519 } 520 return 0, io.ErrUnexpectedEOF 521 } 522 523 var ( 524 ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") 525 ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") 526 ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") 527 )