github.com/InjectiveLabs/sdk-go@v1.53.0/chain/auction/types/auction.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: injective/auction/v1beta1/auction.proto 3 4 package types 5 6 import ( 7 cosmossdk_io_math "cosmossdk.io/math" 8 fmt "fmt" 9 github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types" 10 types "github.com/cosmos/cosmos-sdk/types" 11 _ "github.com/cosmos/cosmos-sdk/types/tx/amino" 12 _ "github.com/cosmos/gogoproto/gogoproto" 13 proto "github.com/cosmos/gogoproto/proto" 14 io "io" 15 math "math" 16 math_bits "math/bits" 17 ) 18 19 // Reference imports to suppress errors if they are not otherwise used. 20 var _ = proto.Marshal 21 var _ = fmt.Errorf 22 var _ = math.Inf 23 24 // This is a compile-time assertion to ensure that this generated file 25 // is compatible with the proto package it is being compiled against. 26 // A compilation error at this line likely means your copy of the 27 // proto package needs to be updated. 28 const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package 29 30 type Params struct { 31 // auction_period_duration defines the auction period duration 32 AuctionPeriod int64 `protobuf:"varint,1,opt,name=auction_period,json=auctionPeriod,proto3" json:"auction_period,omitempty"` 33 // min_next_bid_increment_rate defines the minimum increment rate for new bids 34 MinNextBidIncrementRate cosmossdk_io_math.LegacyDec `protobuf:"bytes,2,opt,name=min_next_bid_increment_rate,json=minNextBidIncrementRate,proto3,customtype=cosmossdk.io/math.LegacyDec" json:"min_next_bid_increment_rate"` 35 } 36 37 func (m *Params) Reset() { *m = Params{} } 38 func (m *Params) String() string { return proto.CompactTextString(m) } 39 func (*Params) ProtoMessage() {} 40 func (*Params) Descriptor() ([]byte, []int) { 41 return fileDescriptor_49edfee5f1ef4b5a, []int{0} 42 } 43 func (m *Params) XXX_Unmarshal(b []byte) error { 44 return m.Unmarshal(b) 45 } 46 func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 if deterministic { 48 return xxx_messageInfo_Params.Marshal(b, m, deterministic) 49 } else { 50 b = b[:cap(b)] 51 n, err := m.MarshalToSizedBuffer(b) 52 if err != nil { 53 return nil, err 54 } 55 return b[:n], nil 56 } 57 } 58 func (m *Params) XXX_Merge(src proto.Message) { 59 xxx_messageInfo_Params.Merge(m, src) 60 } 61 func (m *Params) XXX_Size() int { 62 return m.Size() 63 } 64 func (m *Params) XXX_DiscardUnknown() { 65 xxx_messageInfo_Params.DiscardUnknown(m) 66 } 67 68 var xxx_messageInfo_Params proto.InternalMessageInfo 69 70 func (m *Params) GetAuctionPeriod() int64 { 71 if m != nil { 72 return m.AuctionPeriod 73 } 74 return 0 75 } 76 77 type Bid struct { 78 Bidder string `protobuf:"bytes,1,opt,name=bidder,proto3" json:"bidder" yaml:"bidder"` 79 Amount github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` 80 } 81 82 func (m *Bid) Reset() { *m = Bid{} } 83 func (m *Bid) String() string { return proto.CompactTextString(m) } 84 func (*Bid) ProtoMessage() {} 85 func (*Bid) Descriptor() ([]byte, []int) { 86 return fileDescriptor_49edfee5f1ef4b5a, []int{1} 87 } 88 func (m *Bid) XXX_Unmarshal(b []byte) error { 89 return m.Unmarshal(b) 90 } 91 func (m *Bid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 92 if deterministic { 93 return xxx_messageInfo_Bid.Marshal(b, m, deterministic) 94 } else { 95 b = b[:cap(b)] 96 n, err := m.MarshalToSizedBuffer(b) 97 if err != nil { 98 return nil, err 99 } 100 return b[:n], nil 101 } 102 } 103 func (m *Bid) XXX_Merge(src proto.Message) { 104 xxx_messageInfo_Bid.Merge(m, src) 105 } 106 func (m *Bid) XXX_Size() int { 107 return m.Size() 108 } 109 func (m *Bid) XXX_DiscardUnknown() { 110 xxx_messageInfo_Bid.DiscardUnknown(m) 111 } 112 113 var xxx_messageInfo_Bid proto.InternalMessageInfo 114 115 func (m *Bid) GetBidder() string { 116 if m != nil { 117 return m.Bidder 118 } 119 return "" 120 } 121 122 type LastAuctionResult struct { 123 // winner describes the address of the winner 124 Winner string `protobuf:"bytes,1,opt,name=winner,proto3" json:"winner,omitempty"` 125 // amount describes the amount the winner get from the auction 126 Amount github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` 127 // round defines the round number of auction 128 Round uint64 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 129 } 130 131 func (m *LastAuctionResult) Reset() { *m = LastAuctionResult{} } 132 func (m *LastAuctionResult) String() string { return proto.CompactTextString(m) } 133 func (*LastAuctionResult) ProtoMessage() {} 134 func (*LastAuctionResult) Descriptor() ([]byte, []int) { 135 return fileDescriptor_49edfee5f1ef4b5a, []int{2} 136 } 137 func (m *LastAuctionResult) XXX_Unmarshal(b []byte) error { 138 return m.Unmarshal(b) 139 } 140 func (m *LastAuctionResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 141 if deterministic { 142 return xxx_messageInfo_LastAuctionResult.Marshal(b, m, deterministic) 143 } else { 144 b = b[:cap(b)] 145 n, err := m.MarshalToSizedBuffer(b) 146 if err != nil { 147 return nil, err 148 } 149 return b[:n], nil 150 } 151 } 152 func (m *LastAuctionResult) XXX_Merge(src proto.Message) { 153 xxx_messageInfo_LastAuctionResult.Merge(m, src) 154 } 155 func (m *LastAuctionResult) XXX_Size() int { 156 return m.Size() 157 } 158 func (m *LastAuctionResult) XXX_DiscardUnknown() { 159 xxx_messageInfo_LastAuctionResult.DiscardUnknown(m) 160 } 161 162 var xxx_messageInfo_LastAuctionResult proto.InternalMessageInfo 163 164 func (m *LastAuctionResult) GetWinner() string { 165 if m != nil { 166 return m.Winner 167 } 168 return "" 169 } 170 171 func (m *LastAuctionResult) GetRound() uint64 { 172 if m != nil { 173 return m.Round 174 } 175 return 0 176 } 177 178 type EventBid struct { 179 // bidder describes the address of bidder 180 Bidder string `protobuf:"bytes,1,opt,name=bidder,proto3" json:"bidder,omitempty"` 181 // amount describes the amount the bidder put on the auction 182 Amount github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` 183 // round defines the round number of auction 184 Round uint64 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 185 } 186 187 func (m *EventBid) Reset() { *m = EventBid{} } 188 func (m *EventBid) String() string { return proto.CompactTextString(m) } 189 func (*EventBid) ProtoMessage() {} 190 func (*EventBid) Descriptor() ([]byte, []int) { 191 return fileDescriptor_49edfee5f1ef4b5a, []int{3} 192 } 193 func (m *EventBid) XXX_Unmarshal(b []byte) error { 194 return m.Unmarshal(b) 195 } 196 func (m *EventBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 197 if deterministic { 198 return xxx_messageInfo_EventBid.Marshal(b, m, deterministic) 199 } else { 200 b = b[:cap(b)] 201 n, err := m.MarshalToSizedBuffer(b) 202 if err != nil { 203 return nil, err 204 } 205 return b[:n], nil 206 } 207 } 208 func (m *EventBid) XXX_Merge(src proto.Message) { 209 xxx_messageInfo_EventBid.Merge(m, src) 210 } 211 func (m *EventBid) XXX_Size() int { 212 return m.Size() 213 } 214 func (m *EventBid) XXX_DiscardUnknown() { 215 xxx_messageInfo_EventBid.DiscardUnknown(m) 216 } 217 218 var xxx_messageInfo_EventBid proto.InternalMessageInfo 219 220 func (m *EventBid) GetBidder() string { 221 if m != nil { 222 return m.Bidder 223 } 224 return "" 225 } 226 227 func (m *EventBid) GetRound() uint64 { 228 if m != nil { 229 return m.Round 230 } 231 return 0 232 } 233 234 type EventAuctionResult struct { 235 // winner describes the address of the winner 236 Winner string `protobuf:"bytes,1,opt,name=winner,proto3" json:"winner,omitempty"` 237 // amount describes the amount the winner get from the auction 238 Amount github_com_cosmos_cosmos_sdk_types.Coin `protobuf:"bytes,2,opt,name=amount,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Coin" json:"amount"` 239 // round defines the round number of auction 240 Round uint64 `protobuf:"varint,3,opt,name=round,proto3" json:"round,omitempty"` 241 } 242 243 func (m *EventAuctionResult) Reset() { *m = EventAuctionResult{} } 244 func (m *EventAuctionResult) String() string { return proto.CompactTextString(m) } 245 func (*EventAuctionResult) ProtoMessage() {} 246 func (*EventAuctionResult) Descriptor() ([]byte, []int) { 247 return fileDescriptor_49edfee5f1ef4b5a, []int{4} 248 } 249 func (m *EventAuctionResult) XXX_Unmarshal(b []byte) error { 250 return m.Unmarshal(b) 251 } 252 func (m *EventAuctionResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 253 if deterministic { 254 return xxx_messageInfo_EventAuctionResult.Marshal(b, m, deterministic) 255 } else { 256 b = b[:cap(b)] 257 n, err := m.MarshalToSizedBuffer(b) 258 if err != nil { 259 return nil, err 260 } 261 return b[:n], nil 262 } 263 } 264 func (m *EventAuctionResult) XXX_Merge(src proto.Message) { 265 xxx_messageInfo_EventAuctionResult.Merge(m, src) 266 } 267 func (m *EventAuctionResult) XXX_Size() int { 268 return m.Size() 269 } 270 func (m *EventAuctionResult) XXX_DiscardUnknown() { 271 xxx_messageInfo_EventAuctionResult.DiscardUnknown(m) 272 } 273 274 var xxx_messageInfo_EventAuctionResult proto.InternalMessageInfo 275 276 func (m *EventAuctionResult) GetWinner() string { 277 if m != nil { 278 return m.Winner 279 } 280 return "" 281 } 282 283 func (m *EventAuctionResult) GetRound() uint64 { 284 if m != nil { 285 return m.Round 286 } 287 return 0 288 } 289 290 type EventAuctionStart struct { 291 // round defines the round number of auction 292 Round uint64 `protobuf:"varint,1,opt,name=round,proto3" json:"round,omitempty"` 293 // ending_timestamp describes auction end time 294 EndingTimestamp int64 `protobuf:"varint,2,opt,name=ending_timestamp,json=endingTimestamp,proto3" json:"ending_timestamp,omitempty"` 295 // new_basket describes auction module balance at the time of new auction 296 // start 297 NewBasket github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,3,rep,name=new_basket,json=newBasket,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"new_basket"` 298 } 299 300 func (m *EventAuctionStart) Reset() { *m = EventAuctionStart{} } 301 func (m *EventAuctionStart) String() string { return proto.CompactTextString(m) } 302 func (*EventAuctionStart) ProtoMessage() {} 303 func (*EventAuctionStart) Descriptor() ([]byte, []int) { 304 return fileDescriptor_49edfee5f1ef4b5a, []int{5} 305 } 306 func (m *EventAuctionStart) XXX_Unmarshal(b []byte) error { 307 return m.Unmarshal(b) 308 } 309 func (m *EventAuctionStart) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 310 if deterministic { 311 return xxx_messageInfo_EventAuctionStart.Marshal(b, m, deterministic) 312 } else { 313 b = b[:cap(b)] 314 n, err := m.MarshalToSizedBuffer(b) 315 if err != nil { 316 return nil, err 317 } 318 return b[:n], nil 319 } 320 } 321 func (m *EventAuctionStart) XXX_Merge(src proto.Message) { 322 xxx_messageInfo_EventAuctionStart.Merge(m, src) 323 } 324 func (m *EventAuctionStart) XXX_Size() int { 325 return m.Size() 326 } 327 func (m *EventAuctionStart) XXX_DiscardUnknown() { 328 xxx_messageInfo_EventAuctionStart.DiscardUnknown(m) 329 } 330 331 var xxx_messageInfo_EventAuctionStart proto.InternalMessageInfo 332 333 func (m *EventAuctionStart) GetRound() uint64 { 334 if m != nil { 335 return m.Round 336 } 337 return 0 338 } 339 340 func (m *EventAuctionStart) GetEndingTimestamp() int64 { 341 if m != nil { 342 return m.EndingTimestamp 343 } 344 return 0 345 } 346 347 func (m *EventAuctionStart) GetNewBasket() github_com_cosmos_cosmos_sdk_types.Coins { 348 if m != nil { 349 return m.NewBasket 350 } 351 return nil 352 } 353 354 func init() { 355 proto.RegisterType((*Params)(nil), "injective.auction.v1beta1.Params") 356 proto.RegisterType((*Bid)(nil), "injective.auction.v1beta1.Bid") 357 proto.RegisterType((*LastAuctionResult)(nil), "injective.auction.v1beta1.LastAuctionResult") 358 proto.RegisterType((*EventBid)(nil), "injective.auction.v1beta1.EventBid") 359 proto.RegisterType((*EventAuctionResult)(nil), "injective.auction.v1beta1.EventAuctionResult") 360 proto.RegisterType((*EventAuctionStart)(nil), "injective.auction.v1beta1.EventAuctionStart") 361 } 362 363 func init() { 364 proto.RegisterFile("injective/auction/v1beta1/auction.proto", fileDescriptor_49edfee5f1ef4b5a) 365 } 366 367 var fileDescriptor_49edfee5f1ef4b5a = []byte{ 368 // 567 bytes of a gzipped FileDescriptorProto 369 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x94, 0xbf, 0x6f, 0xd3, 0x40, 370 0x14, 0xc7, 0x73, 0x18, 0x22, 0x7a, 0xa8, 0x40, 0xad, 0x8a, 0xa6, 0xad, 0x64, 0x47, 0x46, 0xa8, 371 0x01, 0xa9, 0x3e, 0x4a, 0xb7, 0x6e, 0x18, 0x10, 0xaa, 0x14, 0x50, 0x65, 0x98, 0x58, 0xac, 0xb3, 372 0xfd, 0xe4, 0x5c, 0x93, 0xbb, 0x8b, 0x7c, 0xe7, 0xa4, 0x19, 0x11, 0x5b, 0x59, 0xf8, 0x13, 0x98, 373 0x61, 0xe1, 0x4f, 0x60, 0xec, 0xd8, 0x11, 0x31, 0x04, 0x94, 0x0c, 0x20, 0x46, 0xfe, 0x02, 0x14, 374 0xff, 0x88, 0xbc, 0x20, 0x31, 0x74, 0x60, 0x49, 0xfc, 0xbe, 0xf7, 0xee, 0xfb, 0x3e, 0xef, 0x49, 375 0xf7, 0xf0, 0x0e, 0x13, 0xc7, 0x10, 0x69, 0x36, 0x02, 0x42, 0xb3, 0x48, 0x33, 0x29, 0xc8, 0x68, 376 0x2f, 0x04, 0x4d, 0xf7, 0xaa, 0xd8, 0x1d, 0xa6, 0x52, 0x4b, 0x73, 0x73, 0x99, 0xe8, 0x56, 0x07, 377 0x65, 0xe2, 0xd6, 0x7a, 0x22, 0x13, 0x99, 0x67, 0x91, 0xc5, 0x57, 0x71, 0x61, 0xcb, 0x8a, 0xa4, 378 0xe2, 0x52, 0x91, 0x90, 0x2a, 0x58, 0x7a, 0x46, 0x92, 0x95, 0x86, 0x5b, 0x6b, 0x94, 0x33, 0x21, 379 0x49, 0xfe, 0x5b, 0x48, 0xce, 0x47, 0x84, 0x9b, 0x47, 0x34, 0xa5, 0x5c, 0x99, 0x77, 0xf0, 0xf5, 380 0xb2, 0x4c, 0x30, 0x84, 0x94, 0xc9, 0xb8, 0x85, 0xda, 0xa8, 0x63, 0xf8, 0xab, 0xa5, 0x7a, 0x94, 381 0x8b, 0x26, 0xc5, 0xdb, 0x9c, 0x89, 0x40, 0xc0, 0x89, 0x0e, 0x42, 0x16, 0x07, 0x4c, 0x44, 0x29, 382 0x70, 0x10, 0x3a, 0x48, 0xa9, 0x86, 0xd6, 0xa5, 0x36, 0xea, 0xac, 0x78, 0xb7, 0xcf, 0xa6, 0x76, 383 0xe3, 0xeb, 0xd4, 0xde, 0x2e, 0x88, 0x54, 0xdc, 0x77, 0x99, 0x24, 0x9c, 0xea, 0x9e, 0xdb, 0x85, 384 0x84, 0x46, 0x93, 0xc7, 0x10, 0xf9, 0x1b, 0x9c, 0x89, 0xe7, 0x70, 0xa2, 0x3d, 0x16, 0x1f, 0x56, 385 0x26, 0x3e, 0xd5, 0x70, 0xb0, 0xf1, 0xf3, 0xbd, 0x8d, 0x4e, 0x7f, 0x7c, 0xba, 0x57, 0x01, 0x91, 386 0x02, 0xd1, 0x79, 0x83, 0xb0, 0xe1, 0xb1, 0xd8, 0xdc, 0xc7, 0xcd, 0x90, 0xc5, 0x31, 0xa4, 0x39, 387 0xe2, 0x8a, 0xb7, 0xfd, 0x6b, 0x6a, 0x97, 0xca, 0xef, 0xa9, 0xbd, 0x3a, 0xa1, 0x7c, 0x70, 0xe0, 388 0x14, 0xb1, 0xe3, 0x97, 0x07, 0xe6, 0x53, 0xdc, 0xa4, 0x5c, 0x66, 0x42, 0x97, 0x8c, 0xa4, 0x64, 389 0xdc, 0x49, 0x98, 0xee, 0x65, 0xa1, 0x1b, 0x49, 0x4e, 0xca, 0x01, 0x16, 0x7f, 0xbb, 0x2a, 0xee, 390 0x13, 0x3d, 0x19, 0x82, 0x72, 0x1f, 0x49, 0x26, 0xfc, 0xf2, 0xba, 0x73, 0x8a, 0xf0, 0x5a, 0x97, 391 0x2a, 0xfd, 0xb0, 0x80, 0xf3, 0x41, 0x65, 0x03, 0x6d, 0xde, 0xc2, 0xcd, 0x31, 0x13, 0xa2, 0x62, 392 0xf2, 0xcb, 0xe8, 0xc2, 0xca, 0x9a, 0xeb, 0xf8, 0x4a, 0x2a, 0x33, 0x11, 0xb7, 0x8c, 0x36, 0xea, 393 0x5c, 0xf6, 0x8b, 0xc0, 0x79, 0x8d, 0xf0, 0xd5, 0x27, 0x23, 0x10, 0x8b, 0x29, 0x2e, 0x18, 0xea, 394 0x73, 0xb9, 0xf0, 0xd6, 0xff, 0xc2, 0xf0, 0x16, 0x61, 0x33, 0x67, 0xf8, 0x2f, 0x26, 0xf2, 0x19, 395 0xe1, 0xb5, 0x3a, 0xcd, 0x0b, 0x4d, 0xd3, 0x5a, 0x2e, 0xaa, 0xe5, 0x9a, 0x77, 0xf1, 0x4d, 0x10, 396 0x31, 0x13, 0x49, 0xa0, 0x19, 0x07, 0xa5, 0x29, 0x1f, 0xe6, 0x50, 0x86, 0x7f, 0xa3, 0xd0, 0x5f, 397 0x56, 0xb2, 0x79, 0x8c, 0xb1, 0x80, 0x71, 0x10, 0x52, 0xd5, 0x07, 0xdd, 0x32, 0xda, 0x46, 0xe7, 398 0xda, 0x83, 0x4d, 0xb7, 0x00, 0x74, 0x17, 0x2f, 0xae, 0x7a, 0x9c, 0x39, 0xa3, 0x77, 0x7f, 0xd1, 399 0xd4, 0x87, 0x6f, 0x76, 0xe7, 0x1f, 0x9b, 0x52, 0xfe, 0x8a, 0x80, 0xb1, 0x97, 0xbb, 0x7b, 0xc9, 400 0xd9, 0xcc, 0x42, 0xe7, 0x33, 0x0b, 0x7d, 0x9f, 0x59, 0xe8, 0xdd, 0xdc, 0x6a, 0x9c, 0xcf, 0xad, 401 0xc6, 0x97, 0xb9, 0xd5, 0x78, 0xf5, 0xac, 0x66, 0x77, 0x58, 0xad, 0x87, 0x2e, 0x0d, 0x15, 0x59, 402 0x2e, 0x8b, 0xdd, 0x48, 0xa6, 0x50, 0x0f, 0x7b, 0x94, 0x09, 0xc2, 0x65, 0x9c, 0x0d, 0x40, 0x2d, 403 0x57, 0x4e, 0x5e, 0x39, 0x6c, 0xe6, 0x5b, 0x60, 0xff, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x65, 404 0x8c, 0x47, 0xe7, 0x94, 0x04, 0x00, 0x00, 405 } 406 407 func (this *Params) Equal(that interface{}) bool { 408 if that == nil { 409 return this == nil 410 } 411 412 that1, ok := that.(*Params) 413 if !ok { 414 that2, ok := that.(Params) 415 if ok { 416 that1 = &that2 417 } else { 418 return false 419 } 420 } 421 if that1 == nil { 422 return this == nil 423 } else if this == nil { 424 return false 425 } 426 if this.AuctionPeriod != that1.AuctionPeriod { 427 return false 428 } 429 if !this.MinNextBidIncrementRate.Equal(that1.MinNextBidIncrementRate) { 430 return false 431 } 432 return true 433 } 434 func (m *Params) Marshal() (dAtA []byte, err error) { 435 size := m.Size() 436 dAtA = make([]byte, size) 437 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 438 if err != nil { 439 return nil, err 440 } 441 return dAtA[:n], nil 442 } 443 444 func (m *Params) MarshalTo(dAtA []byte) (int, error) { 445 size := m.Size() 446 return m.MarshalToSizedBuffer(dAtA[:size]) 447 } 448 449 func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { 450 i := len(dAtA) 451 _ = i 452 var l int 453 _ = l 454 { 455 size := m.MinNextBidIncrementRate.Size() 456 i -= size 457 if _, err := m.MinNextBidIncrementRate.MarshalTo(dAtA[i:]); err != nil { 458 return 0, err 459 } 460 i = encodeVarintAuction(dAtA, i, uint64(size)) 461 } 462 i-- 463 dAtA[i] = 0x12 464 if m.AuctionPeriod != 0 { 465 i = encodeVarintAuction(dAtA, i, uint64(m.AuctionPeriod)) 466 i-- 467 dAtA[i] = 0x8 468 } 469 return len(dAtA) - i, nil 470 } 471 472 func (m *Bid) Marshal() (dAtA []byte, err error) { 473 size := m.Size() 474 dAtA = make([]byte, size) 475 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 476 if err != nil { 477 return nil, err 478 } 479 return dAtA[:n], nil 480 } 481 482 func (m *Bid) MarshalTo(dAtA []byte) (int, error) { 483 size := m.Size() 484 return m.MarshalToSizedBuffer(dAtA[:size]) 485 } 486 487 func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) { 488 i := len(dAtA) 489 _ = i 490 var l int 491 _ = l 492 { 493 size := m.Amount.Size() 494 i -= size 495 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 496 return 0, err 497 } 498 i = encodeVarintAuction(dAtA, i, uint64(size)) 499 } 500 i-- 501 dAtA[i] = 0x12 502 if len(m.Bidder) > 0 { 503 i -= len(m.Bidder) 504 copy(dAtA[i:], m.Bidder) 505 i = encodeVarintAuction(dAtA, i, uint64(len(m.Bidder))) 506 i-- 507 dAtA[i] = 0xa 508 } 509 return len(dAtA) - i, nil 510 } 511 512 func (m *LastAuctionResult) Marshal() (dAtA []byte, err error) { 513 size := m.Size() 514 dAtA = make([]byte, size) 515 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 516 if err != nil { 517 return nil, err 518 } 519 return dAtA[:n], nil 520 } 521 522 func (m *LastAuctionResult) MarshalTo(dAtA []byte) (int, error) { 523 size := m.Size() 524 return m.MarshalToSizedBuffer(dAtA[:size]) 525 } 526 527 func (m *LastAuctionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { 528 i := len(dAtA) 529 _ = i 530 var l int 531 _ = l 532 if m.Round != 0 { 533 i = encodeVarintAuction(dAtA, i, uint64(m.Round)) 534 i-- 535 dAtA[i] = 0x18 536 } 537 { 538 size := m.Amount.Size() 539 i -= size 540 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 541 return 0, err 542 } 543 i = encodeVarintAuction(dAtA, i, uint64(size)) 544 } 545 i-- 546 dAtA[i] = 0x12 547 if len(m.Winner) > 0 { 548 i -= len(m.Winner) 549 copy(dAtA[i:], m.Winner) 550 i = encodeVarintAuction(dAtA, i, uint64(len(m.Winner))) 551 i-- 552 dAtA[i] = 0xa 553 } 554 return len(dAtA) - i, nil 555 } 556 557 func (m *EventBid) Marshal() (dAtA []byte, err error) { 558 size := m.Size() 559 dAtA = make([]byte, size) 560 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 561 if err != nil { 562 return nil, err 563 } 564 return dAtA[:n], nil 565 } 566 567 func (m *EventBid) MarshalTo(dAtA []byte) (int, error) { 568 size := m.Size() 569 return m.MarshalToSizedBuffer(dAtA[:size]) 570 } 571 572 func (m *EventBid) MarshalToSizedBuffer(dAtA []byte) (int, error) { 573 i := len(dAtA) 574 _ = i 575 var l int 576 _ = l 577 if m.Round != 0 { 578 i = encodeVarintAuction(dAtA, i, uint64(m.Round)) 579 i-- 580 dAtA[i] = 0x18 581 } 582 { 583 size := m.Amount.Size() 584 i -= size 585 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 586 return 0, err 587 } 588 i = encodeVarintAuction(dAtA, i, uint64(size)) 589 } 590 i-- 591 dAtA[i] = 0x12 592 if len(m.Bidder) > 0 { 593 i -= len(m.Bidder) 594 copy(dAtA[i:], m.Bidder) 595 i = encodeVarintAuction(dAtA, i, uint64(len(m.Bidder))) 596 i-- 597 dAtA[i] = 0xa 598 } 599 return len(dAtA) - i, nil 600 } 601 602 func (m *EventAuctionResult) Marshal() (dAtA []byte, err error) { 603 size := m.Size() 604 dAtA = make([]byte, size) 605 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 606 if err != nil { 607 return nil, err 608 } 609 return dAtA[:n], nil 610 } 611 612 func (m *EventAuctionResult) MarshalTo(dAtA []byte) (int, error) { 613 size := m.Size() 614 return m.MarshalToSizedBuffer(dAtA[:size]) 615 } 616 617 func (m *EventAuctionResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { 618 i := len(dAtA) 619 _ = i 620 var l int 621 _ = l 622 if m.Round != 0 { 623 i = encodeVarintAuction(dAtA, i, uint64(m.Round)) 624 i-- 625 dAtA[i] = 0x18 626 } 627 { 628 size := m.Amount.Size() 629 i -= size 630 if _, err := m.Amount.MarshalTo(dAtA[i:]); err != nil { 631 return 0, err 632 } 633 i = encodeVarintAuction(dAtA, i, uint64(size)) 634 } 635 i-- 636 dAtA[i] = 0x12 637 if len(m.Winner) > 0 { 638 i -= len(m.Winner) 639 copy(dAtA[i:], m.Winner) 640 i = encodeVarintAuction(dAtA, i, uint64(len(m.Winner))) 641 i-- 642 dAtA[i] = 0xa 643 } 644 return len(dAtA) - i, nil 645 } 646 647 func (m *EventAuctionStart) Marshal() (dAtA []byte, err error) { 648 size := m.Size() 649 dAtA = make([]byte, size) 650 n, err := m.MarshalToSizedBuffer(dAtA[:size]) 651 if err != nil { 652 return nil, err 653 } 654 return dAtA[:n], nil 655 } 656 657 func (m *EventAuctionStart) MarshalTo(dAtA []byte) (int, error) { 658 size := m.Size() 659 return m.MarshalToSizedBuffer(dAtA[:size]) 660 } 661 662 func (m *EventAuctionStart) MarshalToSizedBuffer(dAtA []byte) (int, error) { 663 i := len(dAtA) 664 _ = i 665 var l int 666 _ = l 667 if len(m.NewBasket) > 0 { 668 for iNdEx := len(m.NewBasket) - 1; iNdEx >= 0; iNdEx-- { 669 { 670 size, err := m.NewBasket[iNdEx].MarshalToSizedBuffer(dAtA[:i]) 671 if err != nil { 672 return 0, err 673 } 674 i -= size 675 i = encodeVarintAuction(dAtA, i, uint64(size)) 676 } 677 i-- 678 dAtA[i] = 0x1a 679 } 680 } 681 if m.EndingTimestamp != 0 { 682 i = encodeVarintAuction(dAtA, i, uint64(m.EndingTimestamp)) 683 i-- 684 dAtA[i] = 0x10 685 } 686 if m.Round != 0 { 687 i = encodeVarintAuction(dAtA, i, uint64(m.Round)) 688 i-- 689 dAtA[i] = 0x8 690 } 691 return len(dAtA) - i, nil 692 } 693 694 func encodeVarintAuction(dAtA []byte, offset int, v uint64) int { 695 offset -= sovAuction(v) 696 base := offset 697 for v >= 1<<7 { 698 dAtA[offset] = uint8(v&0x7f | 0x80) 699 v >>= 7 700 offset++ 701 } 702 dAtA[offset] = uint8(v) 703 return base 704 } 705 func (m *Params) Size() (n int) { 706 if m == nil { 707 return 0 708 } 709 var l int 710 _ = l 711 if m.AuctionPeriod != 0 { 712 n += 1 + sovAuction(uint64(m.AuctionPeriod)) 713 } 714 l = m.MinNextBidIncrementRate.Size() 715 n += 1 + l + sovAuction(uint64(l)) 716 return n 717 } 718 719 func (m *Bid) Size() (n int) { 720 if m == nil { 721 return 0 722 } 723 var l int 724 _ = l 725 l = len(m.Bidder) 726 if l > 0 { 727 n += 1 + l + sovAuction(uint64(l)) 728 } 729 l = m.Amount.Size() 730 n += 1 + l + sovAuction(uint64(l)) 731 return n 732 } 733 734 func (m *LastAuctionResult) Size() (n int) { 735 if m == nil { 736 return 0 737 } 738 var l int 739 _ = l 740 l = len(m.Winner) 741 if l > 0 { 742 n += 1 + l + sovAuction(uint64(l)) 743 } 744 l = m.Amount.Size() 745 n += 1 + l + sovAuction(uint64(l)) 746 if m.Round != 0 { 747 n += 1 + sovAuction(uint64(m.Round)) 748 } 749 return n 750 } 751 752 func (m *EventBid) Size() (n int) { 753 if m == nil { 754 return 0 755 } 756 var l int 757 _ = l 758 l = len(m.Bidder) 759 if l > 0 { 760 n += 1 + l + sovAuction(uint64(l)) 761 } 762 l = m.Amount.Size() 763 n += 1 + l + sovAuction(uint64(l)) 764 if m.Round != 0 { 765 n += 1 + sovAuction(uint64(m.Round)) 766 } 767 return n 768 } 769 770 func (m *EventAuctionResult) Size() (n int) { 771 if m == nil { 772 return 0 773 } 774 var l int 775 _ = l 776 l = len(m.Winner) 777 if l > 0 { 778 n += 1 + l + sovAuction(uint64(l)) 779 } 780 l = m.Amount.Size() 781 n += 1 + l + sovAuction(uint64(l)) 782 if m.Round != 0 { 783 n += 1 + sovAuction(uint64(m.Round)) 784 } 785 return n 786 } 787 788 func (m *EventAuctionStart) Size() (n int) { 789 if m == nil { 790 return 0 791 } 792 var l int 793 _ = l 794 if m.Round != 0 { 795 n += 1 + sovAuction(uint64(m.Round)) 796 } 797 if m.EndingTimestamp != 0 { 798 n += 1 + sovAuction(uint64(m.EndingTimestamp)) 799 } 800 if len(m.NewBasket) > 0 { 801 for _, e := range m.NewBasket { 802 l = e.Size() 803 n += 1 + l + sovAuction(uint64(l)) 804 } 805 } 806 return n 807 } 808 809 func sovAuction(x uint64) (n int) { 810 return (math_bits.Len64(x|1) + 6) / 7 811 } 812 func sozAuction(x uint64) (n int) { 813 return sovAuction(uint64((x << 1) ^ uint64((int64(x) >> 63)))) 814 } 815 func (m *Params) Unmarshal(dAtA []byte) error { 816 l := len(dAtA) 817 iNdEx := 0 818 for iNdEx < l { 819 preIndex := iNdEx 820 var wire uint64 821 for shift := uint(0); ; shift += 7 { 822 if shift >= 64 { 823 return ErrIntOverflowAuction 824 } 825 if iNdEx >= l { 826 return io.ErrUnexpectedEOF 827 } 828 b := dAtA[iNdEx] 829 iNdEx++ 830 wire |= uint64(b&0x7F) << shift 831 if b < 0x80 { 832 break 833 } 834 } 835 fieldNum := int32(wire >> 3) 836 wireType := int(wire & 0x7) 837 if wireType == 4 { 838 return fmt.Errorf("proto: Params: wiretype end group for non-group") 839 } 840 if fieldNum <= 0 { 841 return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) 842 } 843 switch fieldNum { 844 case 1: 845 if wireType != 0 { 846 return fmt.Errorf("proto: wrong wireType = %d for field AuctionPeriod", wireType) 847 } 848 m.AuctionPeriod = 0 849 for shift := uint(0); ; shift += 7 { 850 if shift >= 64 { 851 return ErrIntOverflowAuction 852 } 853 if iNdEx >= l { 854 return io.ErrUnexpectedEOF 855 } 856 b := dAtA[iNdEx] 857 iNdEx++ 858 m.AuctionPeriod |= int64(b&0x7F) << shift 859 if b < 0x80 { 860 break 861 } 862 } 863 case 2: 864 if wireType != 2 { 865 return fmt.Errorf("proto: wrong wireType = %d for field MinNextBidIncrementRate", wireType) 866 } 867 var stringLen uint64 868 for shift := uint(0); ; shift += 7 { 869 if shift >= 64 { 870 return ErrIntOverflowAuction 871 } 872 if iNdEx >= l { 873 return io.ErrUnexpectedEOF 874 } 875 b := dAtA[iNdEx] 876 iNdEx++ 877 stringLen |= uint64(b&0x7F) << shift 878 if b < 0x80 { 879 break 880 } 881 } 882 intStringLen := int(stringLen) 883 if intStringLen < 0 { 884 return ErrInvalidLengthAuction 885 } 886 postIndex := iNdEx + intStringLen 887 if postIndex < 0 { 888 return ErrInvalidLengthAuction 889 } 890 if postIndex > l { 891 return io.ErrUnexpectedEOF 892 } 893 if err := m.MinNextBidIncrementRate.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 894 return err 895 } 896 iNdEx = postIndex 897 default: 898 iNdEx = preIndex 899 skippy, err := skipAuction(dAtA[iNdEx:]) 900 if err != nil { 901 return err 902 } 903 if (skippy < 0) || (iNdEx+skippy) < 0 { 904 return ErrInvalidLengthAuction 905 } 906 if (iNdEx + skippy) > l { 907 return io.ErrUnexpectedEOF 908 } 909 iNdEx += skippy 910 } 911 } 912 913 if iNdEx > l { 914 return io.ErrUnexpectedEOF 915 } 916 return nil 917 } 918 func (m *Bid) Unmarshal(dAtA []byte) error { 919 l := len(dAtA) 920 iNdEx := 0 921 for iNdEx < l { 922 preIndex := iNdEx 923 var wire uint64 924 for shift := uint(0); ; shift += 7 { 925 if shift >= 64 { 926 return ErrIntOverflowAuction 927 } 928 if iNdEx >= l { 929 return io.ErrUnexpectedEOF 930 } 931 b := dAtA[iNdEx] 932 iNdEx++ 933 wire |= uint64(b&0x7F) << shift 934 if b < 0x80 { 935 break 936 } 937 } 938 fieldNum := int32(wire >> 3) 939 wireType := int(wire & 0x7) 940 if wireType == 4 { 941 return fmt.Errorf("proto: Bid: wiretype end group for non-group") 942 } 943 if fieldNum <= 0 { 944 return fmt.Errorf("proto: Bid: illegal tag %d (wire type %d)", fieldNum, wire) 945 } 946 switch fieldNum { 947 case 1: 948 if wireType != 2 { 949 return fmt.Errorf("proto: wrong wireType = %d for field Bidder", wireType) 950 } 951 var stringLen uint64 952 for shift := uint(0); ; shift += 7 { 953 if shift >= 64 { 954 return ErrIntOverflowAuction 955 } 956 if iNdEx >= l { 957 return io.ErrUnexpectedEOF 958 } 959 b := dAtA[iNdEx] 960 iNdEx++ 961 stringLen |= uint64(b&0x7F) << shift 962 if b < 0x80 { 963 break 964 } 965 } 966 intStringLen := int(stringLen) 967 if intStringLen < 0 { 968 return ErrInvalidLengthAuction 969 } 970 postIndex := iNdEx + intStringLen 971 if postIndex < 0 { 972 return ErrInvalidLengthAuction 973 } 974 if postIndex > l { 975 return io.ErrUnexpectedEOF 976 } 977 m.Bidder = string(dAtA[iNdEx:postIndex]) 978 iNdEx = postIndex 979 case 2: 980 if wireType != 2 { 981 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 982 } 983 var stringLen uint64 984 for shift := uint(0); ; shift += 7 { 985 if shift >= 64 { 986 return ErrIntOverflowAuction 987 } 988 if iNdEx >= l { 989 return io.ErrUnexpectedEOF 990 } 991 b := dAtA[iNdEx] 992 iNdEx++ 993 stringLen |= uint64(b&0x7F) << shift 994 if b < 0x80 { 995 break 996 } 997 } 998 intStringLen := int(stringLen) 999 if intStringLen < 0 { 1000 return ErrInvalidLengthAuction 1001 } 1002 postIndex := iNdEx + intStringLen 1003 if postIndex < 0 { 1004 return ErrInvalidLengthAuction 1005 } 1006 if postIndex > l { 1007 return io.ErrUnexpectedEOF 1008 } 1009 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1010 return err 1011 } 1012 iNdEx = postIndex 1013 default: 1014 iNdEx = preIndex 1015 skippy, err := skipAuction(dAtA[iNdEx:]) 1016 if err != nil { 1017 return err 1018 } 1019 if (skippy < 0) || (iNdEx+skippy) < 0 { 1020 return ErrInvalidLengthAuction 1021 } 1022 if (iNdEx + skippy) > l { 1023 return io.ErrUnexpectedEOF 1024 } 1025 iNdEx += skippy 1026 } 1027 } 1028 1029 if iNdEx > l { 1030 return io.ErrUnexpectedEOF 1031 } 1032 return nil 1033 } 1034 func (m *LastAuctionResult) Unmarshal(dAtA []byte) error { 1035 l := len(dAtA) 1036 iNdEx := 0 1037 for iNdEx < l { 1038 preIndex := iNdEx 1039 var wire uint64 1040 for shift := uint(0); ; shift += 7 { 1041 if shift >= 64 { 1042 return ErrIntOverflowAuction 1043 } 1044 if iNdEx >= l { 1045 return io.ErrUnexpectedEOF 1046 } 1047 b := dAtA[iNdEx] 1048 iNdEx++ 1049 wire |= uint64(b&0x7F) << shift 1050 if b < 0x80 { 1051 break 1052 } 1053 } 1054 fieldNum := int32(wire >> 3) 1055 wireType := int(wire & 0x7) 1056 if wireType == 4 { 1057 return fmt.Errorf("proto: LastAuctionResult: wiretype end group for non-group") 1058 } 1059 if fieldNum <= 0 { 1060 return fmt.Errorf("proto: LastAuctionResult: illegal tag %d (wire type %d)", fieldNum, wire) 1061 } 1062 switch fieldNum { 1063 case 1: 1064 if wireType != 2 { 1065 return fmt.Errorf("proto: wrong wireType = %d for field Winner", wireType) 1066 } 1067 var stringLen uint64 1068 for shift := uint(0); ; shift += 7 { 1069 if shift >= 64 { 1070 return ErrIntOverflowAuction 1071 } 1072 if iNdEx >= l { 1073 return io.ErrUnexpectedEOF 1074 } 1075 b := dAtA[iNdEx] 1076 iNdEx++ 1077 stringLen |= uint64(b&0x7F) << shift 1078 if b < 0x80 { 1079 break 1080 } 1081 } 1082 intStringLen := int(stringLen) 1083 if intStringLen < 0 { 1084 return ErrInvalidLengthAuction 1085 } 1086 postIndex := iNdEx + intStringLen 1087 if postIndex < 0 { 1088 return ErrInvalidLengthAuction 1089 } 1090 if postIndex > l { 1091 return io.ErrUnexpectedEOF 1092 } 1093 m.Winner = string(dAtA[iNdEx:postIndex]) 1094 iNdEx = postIndex 1095 case 2: 1096 if wireType != 2 { 1097 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1098 } 1099 var stringLen uint64 1100 for shift := uint(0); ; shift += 7 { 1101 if shift >= 64 { 1102 return ErrIntOverflowAuction 1103 } 1104 if iNdEx >= l { 1105 return io.ErrUnexpectedEOF 1106 } 1107 b := dAtA[iNdEx] 1108 iNdEx++ 1109 stringLen |= uint64(b&0x7F) << shift 1110 if b < 0x80 { 1111 break 1112 } 1113 } 1114 intStringLen := int(stringLen) 1115 if intStringLen < 0 { 1116 return ErrInvalidLengthAuction 1117 } 1118 postIndex := iNdEx + intStringLen 1119 if postIndex < 0 { 1120 return ErrInvalidLengthAuction 1121 } 1122 if postIndex > l { 1123 return io.ErrUnexpectedEOF 1124 } 1125 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1126 return err 1127 } 1128 iNdEx = postIndex 1129 case 3: 1130 if wireType != 0 { 1131 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1132 } 1133 m.Round = 0 1134 for shift := uint(0); ; shift += 7 { 1135 if shift >= 64 { 1136 return ErrIntOverflowAuction 1137 } 1138 if iNdEx >= l { 1139 return io.ErrUnexpectedEOF 1140 } 1141 b := dAtA[iNdEx] 1142 iNdEx++ 1143 m.Round |= uint64(b&0x7F) << shift 1144 if b < 0x80 { 1145 break 1146 } 1147 } 1148 default: 1149 iNdEx = preIndex 1150 skippy, err := skipAuction(dAtA[iNdEx:]) 1151 if err != nil { 1152 return err 1153 } 1154 if (skippy < 0) || (iNdEx+skippy) < 0 { 1155 return ErrInvalidLengthAuction 1156 } 1157 if (iNdEx + skippy) > l { 1158 return io.ErrUnexpectedEOF 1159 } 1160 iNdEx += skippy 1161 } 1162 } 1163 1164 if iNdEx > l { 1165 return io.ErrUnexpectedEOF 1166 } 1167 return nil 1168 } 1169 func (m *EventBid) Unmarshal(dAtA []byte) error { 1170 l := len(dAtA) 1171 iNdEx := 0 1172 for iNdEx < l { 1173 preIndex := iNdEx 1174 var wire uint64 1175 for shift := uint(0); ; shift += 7 { 1176 if shift >= 64 { 1177 return ErrIntOverflowAuction 1178 } 1179 if iNdEx >= l { 1180 return io.ErrUnexpectedEOF 1181 } 1182 b := dAtA[iNdEx] 1183 iNdEx++ 1184 wire |= uint64(b&0x7F) << shift 1185 if b < 0x80 { 1186 break 1187 } 1188 } 1189 fieldNum := int32(wire >> 3) 1190 wireType := int(wire & 0x7) 1191 if wireType == 4 { 1192 return fmt.Errorf("proto: EventBid: wiretype end group for non-group") 1193 } 1194 if fieldNum <= 0 { 1195 return fmt.Errorf("proto: EventBid: illegal tag %d (wire type %d)", fieldNum, wire) 1196 } 1197 switch fieldNum { 1198 case 1: 1199 if wireType != 2 { 1200 return fmt.Errorf("proto: wrong wireType = %d for field Bidder", wireType) 1201 } 1202 var stringLen uint64 1203 for shift := uint(0); ; shift += 7 { 1204 if shift >= 64 { 1205 return ErrIntOverflowAuction 1206 } 1207 if iNdEx >= l { 1208 return io.ErrUnexpectedEOF 1209 } 1210 b := dAtA[iNdEx] 1211 iNdEx++ 1212 stringLen |= uint64(b&0x7F) << shift 1213 if b < 0x80 { 1214 break 1215 } 1216 } 1217 intStringLen := int(stringLen) 1218 if intStringLen < 0 { 1219 return ErrInvalidLengthAuction 1220 } 1221 postIndex := iNdEx + intStringLen 1222 if postIndex < 0 { 1223 return ErrInvalidLengthAuction 1224 } 1225 if postIndex > l { 1226 return io.ErrUnexpectedEOF 1227 } 1228 m.Bidder = string(dAtA[iNdEx:postIndex]) 1229 iNdEx = postIndex 1230 case 2: 1231 if wireType != 2 { 1232 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1233 } 1234 var stringLen uint64 1235 for shift := uint(0); ; shift += 7 { 1236 if shift >= 64 { 1237 return ErrIntOverflowAuction 1238 } 1239 if iNdEx >= l { 1240 return io.ErrUnexpectedEOF 1241 } 1242 b := dAtA[iNdEx] 1243 iNdEx++ 1244 stringLen |= uint64(b&0x7F) << shift 1245 if b < 0x80 { 1246 break 1247 } 1248 } 1249 intStringLen := int(stringLen) 1250 if intStringLen < 0 { 1251 return ErrInvalidLengthAuction 1252 } 1253 postIndex := iNdEx + intStringLen 1254 if postIndex < 0 { 1255 return ErrInvalidLengthAuction 1256 } 1257 if postIndex > l { 1258 return io.ErrUnexpectedEOF 1259 } 1260 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1261 return err 1262 } 1263 iNdEx = postIndex 1264 case 3: 1265 if wireType != 0 { 1266 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1267 } 1268 m.Round = 0 1269 for shift := uint(0); ; shift += 7 { 1270 if shift >= 64 { 1271 return ErrIntOverflowAuction 1272 } 1273 if iNdEx >= l { 1274 return io.ErrUnexpectedEOF 1275 } 1276 b := dAtA[iNdEx] 1277 iNdEx++ 1278 m.Round |= uint64(b&0x7F) << shift 1279 if b < 0x80 { 1280 break 1281 } 1282 } 1283 default: 1284 iNdEx = preIndex 1285 skippy, err := skipAuction(dAtA[iNdEx:]) 1286 if err != nil { 1287 return err 1288 } 1289 if (skippy < 0) || (iNdEx+skippy) < 0 { 1290 return ErrInvalidLengthAuction 1291 } 1292 if (iNdEx + skippy) > l { 1293 return io.ErrUnexpectedEOF 1294 } 1295 iNdEx += skippy 1296 } 1297 } 1298 1299 if iNdEx > l { 1300 return io.ErrUnexpectedEOF 1301 } 1302 return nil 1303 } 1304 func (m *EventAuctionResult) Unmarshal(dAtA []byte) error { 1305 l := len(dAtA) 1306 iNdEx := 0 1307 for iNdEx < l { 1308 preIndex := iNdEx 1309 var wire uint64 1310 for shift := uint(0); ; shift += 7 { 1311 if shift >= 64 { 1312 return ErrIntOverflowAuction 1313 } 1314 if iNdEx >= l { 1315 return io.ErrUnexpectedEOF 1316 } 1317 b := dAtA[iNdEx] 1318 iNdEx++ 1319 wire |= uint64(b&0x7F) << shift 1320 if b < 0x80 { 1321 break 1322 } 1323 } 1324 fieldNum := int32(wire >> 3) 1325 wireType := int(wire & 0x7) 1326 if wireType == 4 { 1327 return fmt.Errorf("proto: EventAuctionResult: wiretype end group for non-group") 1328 } 1329 if fieldNum <= 0 { 1330 return fmt.Errorf("proto: EventAuctionResult: illegal tag %d (wire type %d)", fieldNum, wire) 1331 } 1332 switch fieldNum { 1333 case 1: 1334 if wireType != 2 { 1335 return fmt.Errorf("proto: wrong wireType = %d for field Winner", wireType) 1336 } 1337 var stringLen uint64 1338 for shift := uint(0); ; shift += 7 { 1339 if shift >= 64 { 1340 return ErrIntOverflowAuction 1341 } 1342 if iNdEx >= l { 1343 return io.ErrUnexpectedEOF 1344 } 1345 b := dAtA[iNdEx] 1346 iNdEx++ 1347 stringLen |= uint64(b&0x7F) << shift 1348 if b < 0x80 { 1349 break 1350 } 1351 } 1352 intStringLen := int(stringLen) 1353 if intStringLen < 0 { 1354 return ErrInvalidLengthAuction 1355 } 1356 postIndex := iNdEx + intStringLen 1357 if postIndex < 0 { 1358 return ErrInvalidLengthAuction 1359 } 1360 if postIndex > l { 1361 return io.ErrUnexpectedEOF 1362 } 1363 m.Winner = string(dAtA[iNdEx:postIndex]) 1364 iNdEx = postIndex 1365 case 2: 1366 if wireType != 2 { 1367 return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) 1368 } 1369 var stringLen uint64 1370 for shift := uint(0); ; shift += 7 { 1371 if shift >= 64 { 1372 return ErrIntOverflowAuction 1373 } 1374 if iNdEx >= l { 1375 return io.ErrUnexpectedEOF 1376 } 1377 b := dAtA[iNdEx] 1378 iNdEx++ 1379 stringLen |= uint64(b&0x7F) << shift 1380 if b < 0x80 { 1381 break 1382 } 1383 } 1384 intStringLen := int(stringLen) 1385 if intStringLen < 0 { 1386 return ErrInvalidLengthAuction 1387 } 1388 postIndex := iNdEx + intStringLen 1389 if postIndex < 0 { 1390 return ErrInvalidLengthAuction 1391 } 1392 if postIndex > l { 1393 return io.ErrUnexpectedEOF 1394 } 1395 if err := m.Amount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1396 return err 1397 } 1398 iNdEx = postIndex 1399 case 3: 1400 if wireType != 0 { 1401 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1402 } 1403 m.Round = 0 1404 for shift := uint(0); ; shift += 7 { 1405 if shift >= 64 { 1406 return ErrIntOverflowAuction 1407 } 1408 if iNdEx >= l { 1409 return io.ErrUnexpectedEOF 1410 } 1411 b := dAtA[iNdEx] 1412 iNdEx++ 1413 m.Round |= uint64(b&0x7F) << shift 1414 if b < 0x80 { 1415 break 1416 } 1417 } 1418 default: 1419 iNdEx = preIndex 1420 skippy, err := skipAuction(dAtA[iNdEx:]) 1421 if err != nil { 1422 return err 1423 } 1424 if (skippy < 0) || (iNdEx+skippy) < 0 { 1425 return ErrInvalidLengthAuction 1426 } 1427 if (iNdEx + skippy) > l { 1428 return io.ErrUnexpectedEOF 1429 } 1430 iNdEx += skippy 1431 } 1432 } 1433 1434 if iNdEx > l { 1435 return io.ErrUnexpectedEOF 1436 } 1437 return nil 1438 } 1439 func (m *EventAuctionStart) Unmarshal(dAtA []byte) error { 1440 l := len(dAtA) 1441 iNdEx := 0 1442 for iNdEx < l { 1443 preIndex := iNdEx 1444 var wire uint64 1445 for shift := uint(0); ; shift += 7 { 1446 if shift >= 64 { 1447 return ErrIntOverflowAuction 1448 } 1449 if iNdEx >= l { 1450 return io.ErrUnexpectedEOF 1451 } 1452 b := dAtA[iNdEx] 1453 iNdEx++ 1454 wire |= uint64(b&0x7F) << shift 1455 if b < 0x80 { 1456 break 1457 } 1458 } 1459 fieldNum := int32(wire >> 3) 1460 wireType := int(wire & 0x7) 1461 if wireType == 4 { 1462 return fmt.Errorf("proto: EventAuctionStart: wiretype end group for non-group") 1463 } 1464 if fieldNum <= 0 { 1465 return fmt.Errorf("proto: EventAuctionStart: illegal tag %d (wire type %d)", fieldNum, wire) 1466 } 1467 switch fieldNum { 1468 case 1: 1469 if wireType != 0 { 1470 return fmt.Errorf("proto: wrong wireType = %d for field Round", wireType) 1471 } 1472 m.Round = 0 1473 for shift := uint(0); ; shift += 7 { 1474 if shift >= 64 { 1475 return ErrIntOverflowAuction 1476 } 1477 if iNdEx >= l { 1478 return io.ErrUnexpectedEOF 1479 } 1480 b := dAtA[iNdEx] 1481 iNdEx++ 1482 m.Round |= uint64(b&0x7F) << shift 1483 if b < 0x80 { 1484 break 1485 } 1486 } 1487 case 2: 1488 if wireType != 0 { 1489 return fmt.Errorf("proto: wrong wireType = %d for field EndingTimestamp", wireType) 1490 } 1491 m.EndingTimestamp = 0 1492 for shift := uint(0); ; shift += 7 { 1493 if shift >= 64 { 1494 return ErrIntOverflowAuction 1495 } 1496 if iNdEx >= l { 1497 return io.ErrUnexpectedEOF 1498 } 1499 b := dAtA[iNdEx] 1500 iNdEx++ 1501 m.EndingTimestamp |= int64(b&0x7F) << shift 1502 if b < 0x80 { 1503 break 1504 } 1505 } 1506 case 3: 1507 if wireType != 2 { 1508 return fmt.Errorf("proto: wrong wireType = %d for field NewBasket", wireType) 1509 } 1510 var msglen int 1511 for shift := uint(0); ; shift += 7 { 1512 if shift >= 64 { 1513 return ErrIntOverflowAuction 1514 } 1515 if iNdEx >= l { 1516 return io.ErrUnexpectedEOF 1517 } 1518 b := dAtA[iNdEx] 1519 iNdEx++ 1520 msglen |= int(b&0x7F) << shift 1521 if b < 0x80 { 1522 break 1523 } 1524 } 1525 if msglen < 0 { 1526 return ErrInvalidLengthAuction 1527 } 1528 postIndex := iNdEx + msglen 1529 if postIndex < 0 { 1530 return ErrInvalidLengthAuction 1531 } 1532 if postIndex > l { 1533 return io.ErrUnexpectedEOF 1534 } 1535 m.NewBasket = append(m.NewBasket, types.Coin{}) 1536 if err := m.NewBasket[len(m.NewBasket)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { 1537 return err 1538 } 1539 iNdEx = postIndex 1540 default: 1541 iNdEx = preIndex 1542 skippy, err := skipAuction(dAtA[iNdEx:]) 1543 if err != nil { 1544 return err 1545 } 1546 if (skippy < 0) || (iNdEx+skippy) < 0 { 1547 return ErrInvalidLengthAuction 1548 } 1549 if (iNdEx + skippy) > l { 1550 return io.ErrUnexpectedEOF 1551 } 1552 iNdEx += skippy 1553 } 1554 } 1555 1556 if iNdEx > l { 1557 return io.ErrUnexpectedEOF 1558 } 1559 return nil 1560 } 1561 func skipAuction(dAtA []byte) (n int, err error) { 1562 l := len(dAtA) 1563 iNdEx := 0 1564 depth := 0 1565 for iNdEx < l { 1566 var wire uint64 1567 for shift := uint(0); ; shift += 7 { 1568 if shift >= 64 { 1569 return 0, ErrIntOverflowAuction 1570 } 1571 if iNdEx >= l { 1572 return 0, io.ErrUnexpectedEOF 1573 } 1574 b := dAtA[iNdEx] 1575 iNdEx++ 1576 wire |= (uint64(b) & 0x7F) << shift 1577 if b < 0x80 { 1578 break 1579 } 1580 } 1581 wireType := int(wire & 0x7) 1582 switch wireType { 1583 case 0: 1584 for shift := uint(0); ; shift += 7 { 1585 if shift >= 64 { 1586 return 0, ErrIntOverflowAuction 1587 } 1588 if iNdEx >= l { 1589 return 0, io.ErrUnexpectedEOF 1590 } 1591 iNdEx++ 1592 if dAtA[iNdEx-1] < 0x80 { 1593 break 1594 } 1595 } 1596 case 1: 1597 iNdEx += 8 1598 case 2: 1599 var length int 1600 for shift := uint(0); ; shift += 7 { 1601 if shift >= 64 { 1602 return 0, ErrIntOverflowAuction 1603 } 1604 if iNdEx >= l { 1605 return 0, io.ErrUnexpectedEOF 1606 } 1607 b := dAtA[iNdEx] 1608 iNdEx++ 1609 length |= (int(b) & 0x7F) << shift 1610 if b < 0x80 { 1611 break 1612 } 1613 } 1614 if length < 0 { 1615 return 0, ErrInvalidLengthAuction 1616 } 1617 iNdEx += length 1618 case 3: 1619 depth++ 1620 case 4: 1621 if depth == 0 { 1622 return 0, ErrUnexpectedEndOfGroupAuction 1623 } 1624 depth-- 1625 case 5: 1626 iNdEx += 4 1627 default: 1628 return 0, fmt.Errorf("proto: illegal wireType %d", wireType) 1629 } 1630 if iNdEx < 0 { 1631 return 0, ErrInvalidLengthAuction 1632 } 1633 if depth == 0 { 1634 return iNdEx, nil 1635 } 1636 } 1637 return 0, io.ErrUnexpectedEOF 1638 } 1639 1640 var ( 1641 ErrInvalidLengthAuction = fmt.Errorf("proto: negative length found during unmarshaling") 1642 ErrIntOverflowAuction = fmt.Errorf("proto: integer overflow") 1643 ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group") 1644 )