Add service provider auctions #59

Merged
nabarun merged 29 commits from deep-stack/laconicd:iv-service-provider-auction into main 2024-09-25 12:38:50 +00:00
7 changed files with 465 additions and 434 deletions
Showing only changes of commit 7bc108fd7f - Show all commits

View File

@ -3850,6 +3850,7 @@ type Params struct {
// Reveal fees // Reveal fees
RevealFee *v1beta1.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"` RevealFee *v1beta1.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"`
// Minimum acceptable bid amount // Minimum acceptable bid amount
// Only applicable in vickrey auctions
MinimumBid *v1beta1.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"` MinimumBid *v1beta1.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"`
} }
@ -3915,7 +3916,7 @@ type Auction struct {
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Auction's kind (vickrey | provider) // Auction kind (vickrey | provider)
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
// Address of the creator of the auction // Address of the creator of the auction
@ -3931,19 +3932,24 @@ type Auction struct {
CommitFee *v1beta1.Coin `protobuf:"bytes,8,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"` CommitFee *v1beta1.Coin `protobuf:"bytes,8,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"`
RevealFee *v1beta1.Coin `protobuf:"bytes,9,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"` RevealFee *v1beta1.Coin `protobuf:"bytes,9,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"`
// Minimum acceptable bid amount for a valid commit // Minimum acceptable bid amount for a valid commit
// Only applicable in vickrey auctions
MinimumBid *v1beta1.Coin `protobuf:"bytes,10,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"` MinimumBid *v1beta1.Coin `protobuf:"bytes,10,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"`
// Addresses of the winners (one for vickrey auctions and can be multiple for // Addresses of the winners
// provider auctions) // (single winner for vickrey auction)
// (multiple winners for provider auctions)
WinnerAddresses []string `protobuf:"bytes,11,rep,name=winner_addresses,json=winnerAddresses,proto3" json:"winner_addresses,omitempty"` WinnerAddresses []string `protobuf:"bytes,11,rep,name=winner_addresses,json=winnerAddresses,proto3" json:"winner_addresses,omitempty"`
// Winning bids, i.e., the best bids // Winning bids, i.e. the best bids
WinningBids []*v1beta1.Coin `protobuf:"bytes,12,rep,name=winning_bids,json=winningBids,proto3" json:"winning_bids,omitempty"` WinningBids []*v1beta1.Coin `protobuf:"bytes,12,rep,name=winning_bids,json=winningBids,proto3" json:"winning_bids,omitempty"`
// Amount the winner pays (vickrey auction) or gets paid (provider auction), // Auction winning price
// i.e. the second best bid // vickrey auction: second highest bid, paid by the winner
// provider auction: higest bid amongst winning_bids, paid by auction creator
// to each winner
WinningPrice *v1beta1.Coin `protobuf:"bytes,13,opt,name=winning_price,json=winningPrice,proto3" json:"winning_price,omitempty"` WinningPrice *v1beta1.Coin `protobuf:"bytes,13,opt,name=winning_price,json=winningPrice,proto3" json:"winning_price,omitempty"`
// Maximum acceptable bid amount for a valid commit for service provider // Maximum acceptable bid amount for a valid commit
// auctions // Only applicable in provider auctions
MaxPrice *v1beta1.Coin `protobuf:"bytes,14,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"` MaxPrice *v1beta1.Coin `protobuf:"bytes,14,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"`
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
NumProviders int32 `protobuf:"varint,15,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"` NumProviders int32 `protobuf:"varint,15,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"`
} }

View File

@ -20,13 +20,13 @@ import (
var ( var (
md_MsgCreateAuction protoreflect.MessageDescriptor md_MsgCreateAuction protoreflect.MessageDescriptor
fd_MsgCreateAuction_signer protoreflect.FieldDescriptor
fd_MsgCreateAuction_kind protoreflect.FieldDescriptor
fd_MsgCreateAuction_commits_duration protoreflect.FieldDescriptor fd_MsgCreateAuction_commits_duration protoreflect.FieldDescriptor
fd_MsgCreateAuction_reveals_duration protoreflect.FieldDescriptor fd_MsgCreateAuction_reveals_duration protoreflect.FieldDescriptor
fd_MsgCreateAuction_commit_fee protoreflect.FieldDescriptor fd_MsgCreateAuction_commit_fee protoreflect.FieldDescriptor
fd_MsgCreateAuction_reveal_fee protoreflect.FieldDescriptor fd_MsgCreateAuction_reveal_fee protoreflect.FieldDescriptor
fd_MsgCreateAuction_minimum_bid protoreflect.FieldDescriptor fd_MsgCreateAuction_minimum_bid protoreflect.FieldDescriptor
fd_MsgCreateAuction_signer protoreflect.FieldDescriptor
fd_MsgCreateAuction_kind protoreflect.FieldDescriptor
fd_MsgCreateAuction_max_price protoreflect.FieldDescriptor fd_MsgCreateAuction_max_price protoreflect.FieldDescriptor
fd_MsgCreateAuction_num_providers protoreflect.FieldDescriptor fd_MsgCreateAuction_num_providers protoreflect.FieldDescriptor
) )
@ -34,13 +34,13 @@ var (
func init() { func init() {
file_cerc_auction_v1_tx_proto_init() file_cerc_auction_v1_tx_proto_init()
md_MsgCreateAuction = File_cerc_auction_v1_tx_proto.Messages().ByName("MsgCreateAuction") md_MsgCreateAuction = File_cerc_auction_v1_tx_proto.Messages().ByName("MsgCreateAuction")
fd_MsgCreateAuction_signer = md_MsgCreateAuction.Fields().ByName("signer")
fd_MsgCreateAuction_kind = md_MsgCreateAuction.Fields().ByName("kind")
fd_MsgCreateAuction_commits_duration = md_MsgCreateAuction.Fields().ByName("commits_duration") fd_MsgCreateAuction_commits_duration = md_MsgCreateAuction.Fields().ByName("commits_duration")
fd_MsgCreateAuction_reveals_duration = md_MsgCreateAuction.Fields().ByName("reveals_duration") fd_MsgCreateAuction_reveals_duration = md_MsgCreateAuction.Fields().ByName("reveals_duration")
fd_MsgCreateAuction_commit_fee = md_MsgCreateAuction.Fields().ByName("commit_fee") fd_MsgCreateAuction_commit_fee = md_MsgCreateAuction.Fields().ByName("commit_fee")
fd_MsgCreateAuction_reveal_fee = md_MsgCreateAuction.Fields().ByName("reveal_fee") fd_MsgCreateAuction_reveal_fee = md_MsgCreateAuction.Fields().ByName("reveal_fee")
fd_MsgCreateAuction_minimum_bid = md_MsgCreateAuction.Fields().ByName("minimum_bid") fd_MsgCreateAuction_minimum_bid = md_MsgCreateAuction.Fields().ByName("minimum_bid")
fd_MsgCreateAuction_signer = md_MsgCreateAuction.Fields().ByName("signer")
fd_MsgCreateAuction_kind = md_MsgCreateAuction.Fields().ByName("kind")
fd_MsgCreateAuction_max_price = md_MsgCreateAuction.Fields().ByName("max_price") fd_MsgCreateAuction_max_price = md_MsgCreateAuction.Fields().ByName("max_price")
fd_MsgCreateAuction_num_providers = md_MsgCreateAuction.Fields().ByName("num_providers") fd_MsgCreateAuction_num_providers = md_MsgCreateAuction.Fields().ByName("num_providers")
} }
@ -110,6 +110,18 @@ func (x *fastReflection_MsgCreateAuction) Interface() protoreflect.ProtoMessage
// While iterating, mutating operations may only be performed // While iterating, mutating operations may only be performed
// on the current field descriptor. // on the current field descriptor.
func (x *fastReflection_MsgCreateAuction) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { func (x *fastReflection_MsgCreateAuction) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Signer != "" {
value := protoreflect.ValueOfString(x.Signer)
if !f(fd_MsgCreateAuction_signer, value) {
return
}
}
if x.Kind != "" {
value := protoreflect.ValueOfString(x.Kind)
if !f(fd_MsgCreateAuction_kind, value) {
return
}
}
if x.CommitsDuration != nil { if x.CommitsDuration != nil {
value := protoreflect.ValueOfMessage(x.CommitsDuration.ProtoReflect()) value := protoreflect.ValueOfMessage(x.CommitsDuration.ProtoReflect())
if !f(fd_MsgCreateAuction_commits_duration, value) { if !f(fd_MsgCreateAuction_commits_duration, value) {
@ -140,18 +152,6 @@ func (x *fastReflection_MsgCreateAuction) Range(f func(protoreflect.FieldDescrip
return return
} }
} }
if x.Signer != "" {
value := protoreflect.ValueOfString(x.Signer)
if !f(fd_MsgCreateAuction_signer, value) {
return
}
}
if x.Kind != "" {
value := protoreflect.ValueOfString(x.Kind)
if !f(fd_MsgCreateAuction_kind, value) {
return
}
}
if x.MaxPrice != nil { if x.MaxPrice != nil {
value := protoreflect.ValueOfMessage(x.MaxPrice.ProtoReflect()) value := protoreflect.ValueOfMessage(x.MaxPrice.ProtoReflect())
if !f(fd_MsgCreateAuction_max_price, value) { if !f(fd_MsgCreateAuction_max_price, value) {
@ -179,6 +179,10 @@ func (x *fastReflection_MsgCreateAuction) Range(f func(protoreflect.FieldDescrip
// a repeated field is populated if it is non-empty. // a repeated field is populated if it is non-empty.
func (x *fastReflection_MsgCreateAuction) Has(fd protoreflect.FieldDescriptor) bool { func (x *fastReflection_MsgCreateAuction) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.v1.MsgCreateAuction.signer":
return x.Signer != ""
case "cerc.auction.v1.MsgCreateAuction.kind":
return x.Kind != ""
case "cerc.auction.v1.MsgCreateAuction.commits_duration": case "cerc.auction.v1.MsgCreateAuction.commits_duration":
return x.CommitsDuration != nil return x.CommitsDuration != nil
case "cerc.auction.v1.MsgCreateAuction.reveals_duration": case "cerc.auction.v1.MsgCreateAuction.reveals_duration":
@ -189,10 +193,6 @@ func (x *fastReflection_MsgCreateAuction) Has(fd protoreflect.FieldDescriptor) b
return x.RevealFee != nil return x.RevealFee != nil
case "cerc.auction.v1.MsgCreateAuction.minimum_bid": case "cerc.auction.v1.MsgCreateAuction.minimum_bid":
return x.MinimumBid != nil return x.MinimumBid != nil
case "cerc.auction.v1.MsgCreateAuction.signer":
return x.Signer != ""
case "cerc.auction.v1.MsgCreateAuction.kind":
return x.Kind != ""
case "cerc.auction.v1.MsgCreateAuction.max_price": case "cerc.auction.v1.MsgCreateAuction.max_price":
return x.MaxPrice != nil return x.MaxPrice != nil
case "cerc.auction.v1.MsgCreateAuction.num_providers": case "cerc.auction.v1.MsgCreateAuction.num_providers":
@ -213,6 +213,10 @@ func (x *fastReflection_MsgCreateAuction) Has(fd protoreflect.FieldDescriptor) b
// Clear is a mutating operation and unsafe for concurrent use. // Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MsgCreateAuction) Clear(fd protoreflect.FieldDescriptor) { func (x *fastReflection_MsgCreateAuction) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.v1.MsgCreateAuction.signer":
x.Signer = ""
case "cerc.auction.v1.MsgCreateAuction.kind":
x.Kind = ""
case "cerc.auction.v1.MsgCreateAuction.commits_duration": case "cerc.auction.v1.MsgCreateAuction.commits_duration":
x.CommitsDuration = nil x.CommitsDuration = nil
case "cerc.auction.v1.MsgCreateAuction.reveals_duration": case "cerc.auction.v1.MsgCreateAuction.reveals_duration":
@ -223,10 +227,6 @@ func (x *fastReflection_MsgCreateAuction) Clear(fd protoreflect.FieldDescriptor)
x.RevealFee = nil x.RevealFee = nil
case "cerc.auction.v1.MsgCreateAuction.minimum_bid": case "cerc.auction.v1.MsgCreateAuction.minimum_bid":
x.MinimumBid = nil x.MinimumBid = nil
case "cerc.auction.v1.MsgCreateAuction.signer":
x.Signer = ""
case "cerc.auction.v1.MsgCreateAuction.kind":
x.Kind = ""
case "cerc.auction.v1.MsgCreateAuction.max_price": case "cerc.auction.v1.MsgCreateAuction.max_price":
x.MaxPrice = nil x.MaxPrice = nil
case "cerc.auction.v1.MsgCreateAuction.num_providers": case "cerc.auction.v1.MsgCreateAuction.num_providers":
@ -247,6 +247,12 @@ func (x *fastReflection_MsgCreateAuction) Clear(fd protoreflect.FieldDescriptor)
// of the value; to obtain a mutable reference, use Mutable. // of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_MsgCreateAuction) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { func (x *fastReflection_MsgCreateAuction) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() { switch descriptor.FullName() {
case "cerc.auction.v1.MsgCreateAuction.signer":
value := x.Signer
return protoreflect.ValueOfString(value)
case "cerc.auction.v1.MsgCreateAuction.kind":
value := x.Kind
return protoreflect.ValueOfString(value)
case "cerc.auction.v1.MsgCreateAuction.commits_duration": case "cerc.auction.v1.MsgCreateAuction.commits_duration":
value := x.CommitsDuration value := x.CommitsDuration
return protoreflect.ValueOfMessage(value.ProtoReflect()) return protoreflect.ValueOfMessage(value.ProtoReflect())
@ -262,12 +268,6 @@ func (x *fastReflection_MsgCreateAuction) Get(descriptor protoreflect.FieldDescr
case "cerc.auction.v1.MsgCreateAuction.minimum_bid": case "cerc.auction.v1.MsgCreateAuction.minimum_bid":
value := x.MinimumBid value := x.MinimumBid
return protoreflect.ValueOfMessage(value.ProtoReflect()) return protoreflect.ValueOfMessage(value.ProtoReflect())
case "cerc.auction.v1.MsgCreateAuction.signer":
value := x.Signer
return protoreflect.ValueOfString(value)
case "cerc.auction.v1.MsgCreateAuction.kind":
value := x.Kind
return protoreflect.ValueOfString(value)
case "cerc.auction.v1.MsgCreateAuction.max_price": case "cerc.auction.v1.MsgCreateAuction.max_price":
value := x.MaxPrice value := x.MaxPrice
return protoreflect.ValueOfMessage(value.ProtoReflect()) return protoreflect.ValueOfMessage(value.ProtoReflect())
@ -294,6 +294,10 @@ func (x *fastReflection_MsgCreateAuction) Get(descriptor protoreflect.FieldDescr
// Set is a mutating operation and unsafe for concurrent use. // Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_MsgCreateAuction) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { func (x *fastReflection_MsgCreateAuction) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.v1.MsgCreateAuction.signer":
x.Signer = value.Interface().(string)
case "cerc.auction.v1.MsgCreateAuction.kind":
x.Kind = value.Interface().(string)
case "cerc.auction.v1.MsgCreateAuction.commits_duration": case "cerc.auction.v1.MsgCreateAuction.commits_duration":
x.CommitsDuration = value.Message().Interface().(*durationpb.Duration) x.CommitsDuration = value.Message().Interface().(*durationpb.Duration)
case "cerc.auction.v1.MsgCreateAuction.reveals_duration": case "cerc.auction.v1.MsgCreateAuction.reveals_duration":
@ -304,10 +308,6 @@ func (x *fastReflection_MsgCreateAuction) Set(fd protoreflect.FieldDescriptor, v
x.RevealFee = value.Message().Interface().(*v1beta1.Coin) x.RevealFee = value.Message().Interface().(*v1beta1.Coin)
case "cerc.auction.v1.MsgCreateAuction.minimum_bid": case "cerc.auction.v1.MsgCreateAuction.minimum_bid":
x.MinimumBid = value.Message().Interface().(*v1beta1.Coin) x.MinimumBid = value.Message().Interface().(*v1beta1.Coin)
case "cerc.auction.v1.MsgCreateAuction.signer":
x.Signer = value.Interface().(string)
case "cerc.auction.v1.MsgCreateAuction.kind":
x.Kind = value.Interface().(string)
case "cerc.auction.v1.MsgCreateAuction.max_price": case "cerc.auction.v1.MsgCreateAuction.max_price":
x.MaxPrice = value.Message().Interface().(*v1beta1.Coin) x.MaxPrice = value.Message().Interface().(*v1beta1.Coin)
case "cerc.auction.v1.MsgCreateAuction.num_providers": case "cerc.auction.v1.MsgCreateAuction.num_providers":
@ -381,6 +381,10 @@ func (x *fastReflection_MsgCreateAuction) Mutable(fd protoreflect.FieldDescripto
// For lists, maps, and messages, this returns a new, empty, mutable value. // For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_MsgCreateAuction) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { func (x *fastReflection_MsgCreateAuction) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.v1.MsgCreateAuction.signer":
return protoreflect.ValueOfString("")
case "cerc.auction.v1.MsgCreateAuction.kind":
return protoreflect.ValueOfString("")
case "cerc.auction.v1.MsgCreateAuction.commits_duration": case "cerc.auction.v1.MsgCreateAuction.commits_duration":
m := new(durationpb.Duration) m := new(durationpb.Duration)
return protoreflect.ValueOfMessage(m.ProtoReflect()) return protoreflect.ValueOfMessage(m.ProtoReflect())
@ -396,10 +400,6 @@ func (x *fastReflection_MsgCreateAuction) NewField(fd protoreflect.FieldDescript
case "cerc.auction.v1.MsgCreateAuction.minimum_bid": case "cerc.auction.v1.MsgCreateAuction.minimum_bid":
m := new(v1beta1.Coin) m := new(v1beta1.Coin)
return protoreflect.ValueOfMessage(m.ProtoReflect()) return protoreflect.ValueOfMessage(m.ProtoReflect())
case "cerc.auction.v1.MsgCreateAuction.signer":
return protoreflect.ValueOfString("")
case "cerc.auction.v1.MsgCreateAuction.kind":
return protoreflect.ValueOfString("")
case "cerc.auction.v1.MsgCreateAuction.max_price": case "cerc.auction.v1.MsgCreateAuction.max_price":
m := new(v1beta1.Coin) m := new(v1beta1.Coin)
return protoreflect.ValueOfMessage(m.ProtoReflect()) return protoreflect.ValueOfMessage(m.ProtoReflect())
@ -474,6 +474,14 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
var n int var n int
var l int var l int
_ = l _ = l
l = len(x.Signer)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Kind)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.CommitsDuration != nil { if x.CommitsDuration != nil {
l = options.Size(x.CommitsDuration) l = options.Size(x.CommitsDuration)
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
@ -494,14 +502,6 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
l = options.Size(x.MinimumBid) l = options.Size(x.MinimumBid)
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
l = len(x.Signer)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Kind)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.MaxPrice != nil { if x.MaxPrice != nil {
l = options.Size(x.MaxPrice) l = options.Size(x.MaxPrice)
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
@ -557,20 +557,6 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
} }
if len(x.Kind) > 0 {
i -= len(x.Kind)
copy(dAtA[i:], x.Kind)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kind)))
i--
dAtA[i] = 0x3a
}
if len(x.Signer) > 0 {
i -= len(x.Signer)
copy(dAtA[i:], x.Signer)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer)))
i--
dAtA[i] = 0x32
}
if x.MinimumBid != nil { if x.MinimumBid != nil {
encoded, err := options.Marshal(x.MinimumBid) encoded, err := options.Marshal(x.MinimumBid)
if err != nil { if err != nil {
@ -583,7 +569,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x3a
} }
if x.RevealFee != nil { if x.RevealFee != nil {
encoded, err := options.Marshal(x.RevealFee) encoded, err := options.Marshal(x.RevealFee)
@ -597,7 +583,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x32
} }
if x.CommitFee != nil { if x.CommitFee != nil {
encoded, err := options.Marshal(x.CommitFee) encoded, err := options.Marshal(x.CommitFee)
@ -611,7 +597,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x2a
} }
if x.RevealsDuration != nil { if x.RevealsDuration != nil {
encoded, err := options.Marshal(x.RevealsDuration) encoded, err := options.Marshal(x.RevealsDuration)
@ -625,7 +611,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x22
} }
if x.CommitsDuration != nil { if x.CommitsDuration != nil {
encoded, err := options.Marshal(x.CommitsDuration) encoded, err := options.Marshal(x.CommitsDuration)
@ -639,6 +625,20 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
copy(dAtA[i:], encoded) copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i-- i--
dAtA[i] = 0x1a
}
if len(x.Kind) > 0 {
i -= len(x.Kind)
copy(dAtA[i:], x.Kind)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kind)))
i--
dAtA[i] = 0x12
}
if len(x.Signer) > 0 {
i -= len(x.Signer)
copy(dAtA[i:], x.Signer)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer)))
i--
dAtA[i] = 0xa dAtA[i] = 0xa
} }
if input.Buf != nil { if input.Buf != nil {
@ -691,6 +691,70 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Signer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitsDuration", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitsDuration", wireType)
} }
@ -726,7 +790,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 4:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealsDuration", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealsDuration", wireType)
} }
@ -762,7 +826,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
} }
iNdEx = postIndex iNdEx = postIndex
case 3: case 5:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitFee", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CommitFee", wireType)
} }
@ -798,7 +862,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
} }
iNdEx = postIndex iNdEx = postIndex
case 4: case 6:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealFee", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevealFee", wireType)
} }
@ -834,7 +898,7 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
} }
iNdEx = postIndex iNdEx = postIndex
case 5: case 7:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinimumBid", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MinimumBid", wireType)
} }
@ -870,70 +934,6 @@ func (x *fastReflection_MsgCreateAuction) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
} }
iNdEx = postIndex iNdEx = postIndex
case 6:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Signer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
}
if iNdEx >= l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8: case 8:
if wireType != 2 { if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType)
@ -4299,23 +4299,26 @@ type MsgCreateAuction struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// Duration of the commits phase in seconds
CommitsDuration *durationpb.Duration `protobuf:"bytes,1,opt,name=commits_duration,json=commitsDuration,proto3" json:"commits_duration,omitempty"`
// Duration of the reveals phase in seconds
RevealsDuration *durationpb.Duration `protobuf:"bytes,2,opt,name=reveals_duration,json=revealsDuration,proto3" json:"reveals_duration,omitempty"`
// Commit fees
CommitFee *v1beta1.Coin `protobuf:"bytes,3,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"`
// Reveal fees
RevealFee *v1beta1.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"`
// Minimum acceptable bid amount
MinimumBid *v1beta1.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"`
// Address of the signer // Address of the signer
Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty"` Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"`
// Auction's kind (vickrey | provider) // Auction kind (vickrey | provider)
Kind string `protobuf:"bytes,7,opt,name=kind,proto3" json:"kind,omitempty"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty"`
// Maximum acceptable bid amount (for service provider auctions) // Duration of the commits phase in seconds
CommitsDuration *durationpb.Duration `protobuf:"bytes,3,opt,name=commits_duration,json=commitsDuration,proto3" json:"commits_duration,omitempty"`
// Duration of the reveals phase in seconds
RevealsDuration *durationpb.Duration `protobuf:"bytes,4,opt,name=reveals_duration,json=revealsDuration,proto3" json:"reveals_duration,omitempty"`
// Commit fees
CommitFee *v1beta1.Coin `protobuf:"bytes,5,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee,omitempty"`
// Reveal fees
RevealFee *v1beta1.Coin `protobuf:"bytes,6,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee,omitempty"`
// Minimum acceptable bid amount
// Only applicable in vickrey auctions
MinimumBid *v1beta1.Coin `protobuf:"bytes,7,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid,omitempty"`
// Maximum acceptable bid amount
// Only applicable in provider auctions
MaxPrice *v1beta1.Coin `protobuf:"bytes,8,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"` MaxPrice *v1beta1.Coin `protobuf:"bytes,8,opt,name=max_price,json=maxPrice,proto3" json:"max_price,omitempty"`
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
NumProviders int32 `protobuf:"varint,9,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"` NumProviders int32 `protobuf:"varint,9,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"`
} }
@ -4339,6 +4342,20 @@ func (*MsgCreateAuction) Descriptor() ([]byte, []int) {
return file_cerc_auction_v1_tx_proto_rawDescGZIP(), []int{0} return file_cerc_auction_v1_tx_proto_rawDescGZIP(), []int{0}
} }
func (x *MsgCreateAuction) GetSigner() string {
if x != nil {
return x.Signer
}
return ""
}
func (x *MsgCreateAuction) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *MsgCreateAuction) GetCommitsDuration() *durationpb.Duration { func (x *MsgCreateAuction) GetCommitsDuration() *durationpb.Duration {
if x != nil { if x != nil {
return x.CommitsDuration return x.CommitsDuration
@ -4374,20 +4391,6 @@ func (x *MsgCreateAuction) GetMinimumBid() *v1beta1.Coin {
return nil return nil
} }
func (x *MsgCreateAuction) GetSigner() string {
if x != nil {
return x.Signer
}
return ""
}
func (x *MsgCreateAuction) GetKind() string {
if x != nil {
return x.Kind
}
return ""
}
func (x *MsgCreateAuction) GetMaxPrice() *v1beta1.Coin { func (x *MsgCreateAuction) GetMaxPrice() *v1beta1.Coin {
if x != nil { if x != nil {
return x.MaxPrice return x.MaxPrice
@ -4719,50 +4722,50 @@ var file_cerc_auction_v1_tx_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x22, 0xd6, 0x06, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x74, 0x6f, 0x22, 0xd6, 0x06, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65,
0x69, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6e, 0x3a, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3b, 0xc8, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72,
0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x6d, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b,
0x6d, 0x69, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x79, 0xf2, 0xde, 0x1f, 0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x20,
0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x52, 0x04, 0x6b, 0x69, 0x6e,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x64, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x64, 0x75,
0x69, 0x74, 0x73, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67,
0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44,
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x64,
0x6e, 0x42, 0x3b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63,
0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
0x6e, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x44, 0x75, 0x72,
0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c,
0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b,
0x65, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x03, 0x20, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x3b, 0xc8, 0xde, 0x1f,
0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x2b, 0x00, 0xf2, 0xde, 0x1f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61,
0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x23, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x6c, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x79, 0x61, 0x6d,
0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x5f, 0x64, 0x75, 0x72, 0x61, 0x74,
0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x69, 0x6f, 0x6e, 0x22, 0x98, 0xdf, 0x1f, 0x01, 0x52, 0x0f, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c,
0x6d, 0x69, 0x74, 0x46, 0x65, 0x65, 0x12, 0x65, 0x0a, 0x0a, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x73, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x65, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x69, 0x74, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65,
0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x23, 0x6a, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde,
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x1f, 0x23, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x66,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
0x65, 0x22, 0x52, 0x09, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x69, 0x0a, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x52, 0x09, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x46, 0x65, 0x65,
0x0b, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x12, 0x65, 0x0a, 0x0a, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x06,
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61,
0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x2d, 0xc8, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42,
0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x25, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x2b, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x23, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72,
0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x62, 0x69, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x62, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x6d, 0x69, 0x22, 0x72, 0x65, 0x76, 0x65, 0x61, 0x6c, 0x5f, 0x66, 0x65, 0x65, 0x22, 0x52, 0x09, 0x72, 0x65,
0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x42, 0x69, 0x64, 0x12, 0x37, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x76, 0x65, 0x61, 0x6c, 0x46, 0x65, 0x65, 0x12, 0x69, 0x0a, 0x0b, 0x6d, 0x69, 0x6e, 0x69, 0x6d,
0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f, 0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x75, 0x6d, 0x5f, 0x62, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
0x6f, 0x6e, 0x3a, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74,
0x3a, 0x22, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x22, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x2d, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f,
0x72, 0x12, 0x2f, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x42, 0x25, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x5f, 0x62,
0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x69, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x52, 0x04, 0x6b, 0x69, 0x6d, 0x5f, 0x62, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x42,
0x6e, 0x64, 0x12, 0x61, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x69, 0x64, 0x12, 0x61, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18,
0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62,
0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e,
0x42, 0x29, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x21, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x42, 0x29, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x21, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22,

View File

@ -40,7 +40,8 @@ message Params {
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\"" (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
]; ];
// Minimum acceptable bid amount (for vickrey auctions) // Minimum acceptable bid amount
// Only applicable in vickrey auctions
cosmos.base.v1beta1.Coin minimum_bid = 5 [ cosmos.base.v1beta1.Coin minimum_bid = 5 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\"" (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
@ -53,7 +54,7 @@ message Auction {
string id = 1; string id = 1;
// Auction's kind (vickrey | provider) // Auction kind (vickrey | provider)
string kind = 2 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ]; string kind = 2 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ];
string status = 3; string status = 3;
@ -93,34 +94,42 @@ message Auction {
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\"" (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
]; ];
// Minimum acceptable bid amount for a valid commit (for vickrey auctions) // Minimum acceptable bid amount for a valid commit
// Only applicable in vickrey auctions
cosmos.base.v1beta1.Coin minimum_bid = 10 [ cosmos.base.v1beta1.Coin minimum_bid = 10 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\"" (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
]; ];
// Winner's address for Vickrey auctions, can be multiple for provider auctions // Addresses of the winners
// (single winner for vickrey auction)
// (multiple winners for provider auctions)
repeated string winner_addresses = 11; repeated string winner_addresses = 11;
// Winning bids, i.e., the best bids // Winning bids, i.e. the best bids
repeated cosmos.base.v1beta1.Coin winning_bids = 12 [ repeated cosmos.base.v1beta1.Coin winning_bids = 12 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"winning_bids\" yaml:\"winning_bids\"" (gogoproto.moretags) = "json:\"winning_bids\" yaml:\"winning_bids\""
]; ];
// Amount the winner pays (vickrey auction) or is paid (provider auction) // Auction winning price
// vickrey auction: second highest bid, paid by the winner
// provider auction: higest bid amongst winning_bids, paid by auction creator
// to each winner
cosmos.base.v1beta1.Coin winning_price = 13 [ cosmos.base.v1beta1.Coin winning_price = 13 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\"" (gogoproto.moretags) = "json:\"winning_price\" yaml:\"winning_price\""
]; ];
// Maximum acceptable bid amount (for provider auctions) // Maximum acceptable bid amount for a valid commit
// Only applicable in provider auctions
cosmos.base.v1beta1.Coin max_price = 14 [ cosmos.base.v1beta1.Coin max_price = 14 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\"" (gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\""
]; ];
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
int32 num_providers = 15; int32 num_providers = 15;
} }

View File

@ -41,52 +41,55 @@ message MsgCreateAuction {
option (gogoproto.goproto_getters) = false; option (gogoproto.goproto_getters) = false;
option (cosmos.msg.v1.signer) = "signer"; option (cosmos.msg.v1.signer) = "signer";
// Address of the signer
string signer = 1
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
// Auction kind (vickrey | provider)
string kind = 2 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ];
// Duration of the commits phase in seconds // Duration of the commits phase in seconds
google.protobuf.Duration commits_duration = 1 [ google.protobuf.Duration commits_duration = 3 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.stdduration) = true, (gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\"" (gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
]; ];
// Duration of the reveals phase in seconds // Duration of the reveals phase in seconds
google.protobuf.Duration reveals_duration = 2 [ google.protobuf.Duration reveals_duration = 4 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.stdduration) = true, (gogoproto.stdduration) = true,
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\"" (gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
]; ];
// Commit fees // Commit fees
cosmos.base.v1beta1.Coin commit_fee = 3 [ cosmos.base.v1beta1.Coin commit_fee = 5 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\"" (gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
]; ];
// Reveal fees // Reveal fees
cosmos.base.v1beta1.Coin reveal_fee = 4 [ cosmos.base.v1beta1.Coin reveal_fee = 6 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\"" (gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
]; ];
// Minimum acceptable bid amount (for vickrey auctions) // Minimum acceptable bid amount
cosmos.base.v1beta1.Coin minimum_bid = 5 [ // Only applicable in vickrey auctions
cosmos.base.v1beta1.Coin minimum_bid = 7 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\"" (gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
]; ];
// Address of the signer // Maximum acceptable bid amount
string signer = 6 // Only applicable in provider auctions
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
// Auction's kind (vickrey | provider)
string kind = 7 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ];
// Maximum acceptable bid amount (for provider auctions)
cosmos.base.v1beta1.Coin max_price = 8 [ cosmos.base.v1beta1.Coin max_price = 8 [
(gogoproto.nullable) = false, (gogoproto.nullable) = false,
(gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\"" (gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\""
]; ];
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
int32 num_providers = 9; int32 num_providers = 9;
} }

View File

@ -40,6 +40,7 @@ type Params struct {
// Reveal fees // Reveal fees
RevealFee types.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"` RevealFee types.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"`
// Minimum acceptable bid amount // Minimum acceptable bid amount
// Only applicable in vickrey auctions
MinimumBid types.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"` MinimumBid types.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
} }
@ -113,7 +114,7 @@ func (m *Params) GetMinimumBid() types.Coin {
// Auction represents a sealed-bid on-chain auction // Auction represents a sealed-bid on-chain auction
type Auction struct { type Auction struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Auction's kind (vickrey | provider) // Auction kind (vickrey | provider)
Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty" json:"kind" yaml:"kind"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty" json:"kind" yaml:"kind"`
Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"` Status string `protobuf:"bytes,3,opt,name=status,proto3" json:"status,omitempty"`
// Address of the creator of the auction // Address of the creator of the auction
@ -129,19 +130,24 @@ type Auction struct {
CommitFee types.Coin `protobuf:"bytes,8,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee" json:"commit_fee" yaml:"commit_fee"` CommitFee types.Coin `protobuf:"bytes,8,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee" json:"commit_fee" yaml:"commit_fee"`
RevealFee types.Coin `protobuf:"bytes,9,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"` RevealFee types.Coin `protobuf:"bytes,9,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"`
// Minimum acceptable bid amount for a valid commit // Minimum acceptable bid amount for a valid commit
// Only applicable in vickrey auctions
MinimumBid types.Coin `protobuf:"bytes,10,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"` MinimumBid types.Coin `protobuf:"bytes,10,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
// Addresses of the winners (one for vickrey auctions and can be multiple for // Addresses of the winners
// provider auctions) // (single winner for vickrey auction)
// (multiple winners for provider auctions)
WinnerAddresses []string `protobuf:"bytes,11,rep,name=winner_addresses,json=winnerAddresses,proto3" json:"winner_addresses,omitempty"` WinnerAddresses []string `protobuf:"bytes,11,rep,name=winner_addresses,json=winnerAddresses,proto3" json:"winner_addresses,omitempty"`
// Winning bids, i.e., the best bids // Winning bids, i.e. the best bids
WinningBids []types.Coin `protobuf:"bytes,12,rep,name=winning_bids,json=winningBids,proto3" json:"winning_bids" json:"winning_bids" yaml:"winning_bids"` WinningBids []types.Coin `protobuf:"bytes,12,rep,name=winning_bids,json=winningBids,proto3" json:"winning_bids" json:"winning_bids" yaml:"winning_bids"`
// Amount the winner pays (vickrey auction) or gets paid (provider auction), // Auction winning price
// i.e. the second best bid // vickrey auction: second highest bid, paid by the winner
// provider auction: higest bid amongst winning_bids, paid by auction creator
// to each winner
WinningPrice types.Coin `protobuf:"bytes,13,opt,name=winning_price,json=winningPrice,proto3" json:"winning_price" json:"winning_price" yaml:"winning_price"` WinningPrice types.Coin `protobuf:"bytes,13,opt,name=winning_price,json=winningPrice,proto3" json:"winning_price" json:"winning_price" yaml:"winning_price"`
// Maximum acceptable bid amount for a valid commit for service provider // Maximum acceptable bid amount for a valid commit
// auctions // Only applicable in provider auctions
MaxPrice types.Coin `protobuf:"bytes,14,opt,name=max_price,json=maxPrice,proto3" json:"max_price" json:"max_price" yaml:"max_price"` MaxPrice types.Coin `protobuf:"bytes,14,opt,name=max_price,json=maxPrice,proto3" json:"max_price" json:"max_price" yaml:"max_price"`
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
NumProviders int32 `protobuf:"varint,15,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"` NumProviders int32 `protobuf:"varint,15,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"`
} }

View File

@ -353,6 +353,7 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg auctiontypes.MsgCreateAuction
auction := auctiontypes.Auction{ auction := auctiontypes.Auction{
Id: auctionId, Id: auctionId,
Kind: msg.Kind,
Status: auctiontypes.AuctionStatusCommitPhase, Status: auctiontypes.AuctionStatusCommitPhase,
OwnerAddress: signerAddress.String(), OwnerAddress: signerAddress.String(),
CreateTime: now, CreateTime: now,
@ -362,7 +363,6 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg auctiontypes.MsgCreateAuction
RevealFee: msg.RevealFee, RevealFee: msg.RevealFee,
MinimumBid: msg.MinimumBid, MinimumBid: msg.MinimumBid,
MaxPrice: msg.MaxPrice, MaxPrice: msg.MaxPrice,
Kind: msg.Kind,
NumProviders: msg.NumProviders, NumProviders: msg.NumProviders,
} }
@ -535,8 +535,8 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg auctiontypes.MsgRevealBid) (*auct
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.") return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is lower than minimum bid.")
} }
if auction.Kind == auctiontypes.AuctionKindProvider && bidAmount.IsGTE(auction.MaxPrice) { if auction.Kind == auctiontypes.AuctionKindProvider && auction.MaxPrice.IsLT(bidAmount) {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is higher than maximum price.") return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is higher than max price.")
} }
// Lock bid amount. // Lock bid amount.
@ -714,6 +714,7 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
if highestBid != nil { if highestBid != nil {
auction.WinningBids = []sdk.Coin{highestBid.BidAmount} auction.WinningBids = []sdk.Coin{highestBid.BidAmount}
auction.WinnerAddresses = []string{highestBid.BidderAddress} auction.WinnerAddresses = []string{highestBid.BidderAddress}
// Winner pays 2nd price, if a 2nd price exists. // Winner pays 2nd price, if a 2nd price exists.
auction.WinningPrice = highestBid.BidAmount auction.WinningPrice = highestBid.BidAmount
if secondHighestBid != nil { if secondHighestBid != nil {
@ -721,7 +722,7 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
} }
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner %s.", auction.Id, auction.WinnerAddresses[0])) k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner %s.", auction.Id, auction.WinnerAddresses[0]))
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner bid %s.", auction.Id, auction.WinningBids[0].String())) k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner bid %s.", auction.Id, auction.WinningBids[0].String()))
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner price %s.", auction.Id, auction.WinningPrice.String())) k.Logger(ctx).Info(fmt.Sprintf("Auction %s winning price %s.", auction.Id, auction.WinningPrice.String()))
} else { } else {
k.Logger(ctx).Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id)) k.Logger(ctx).Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id))
} }
@ -755,7 +756,7 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
} }
// Process winner account (if nobody bids, there won't be a winner). // Process winner account (if nobody bids, there won't be a winner).
if len(auction.WinnerAddresses) == 1 { if len(auction.WinnerAddresses) != 0 {
winnerAddress, err := sdk.AccAddressFromBech32(auction.WinnerAddresses[0]) winnerAddress, err := sdk.AccAddressFromBech32(auction.WinnerAddresses[0])
if err != nil { if err != nil {
k.Logger(ctx).Error(fmt.Sprintf("Invalid winner address. %v", err)) k.Logger(ctx).Error(fmt.Sprintf("Invalid winner address. %v", err))
@ -831,9 +832,10 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
return 0 return 0
}) })
// Take best min(len(revealedBids), auction.NumProviders) bids
numWinners := int(auction.NumProviders) numWinners := int(auction.NumProviders)
if len(revealedBids) < numWinners { if len(revealedBids) < numWinners {
numWinners = (len(revealedBids)) numWinners = len(revealedBids)
} }
winnerBids := revealedBids[:numWinners] winnerBids := revealedBids[:numWinners]
@ -846,6 +848,7 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
winnerAddresses[i] = bid.BidderAddress winnerAddresses[i] = bid.BidderAddress
winningBids[i] = bid.BidAmount winningBids[i] = bid.BidAmount
} }
auction.WinnerAddresses = winnerAddresses auction.WinnerAddresses = winnerAddresses
auction.WinningBids = winningBids auction.WinningBids = winningBids
@ -855,7 +858,7 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
for _, bid := range winnerBids { for _, bid := range winnerBids {
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner address: %s, bid amount: %s.", auction.Id, bid.BidderAddress, bid.BidAmount.String())) k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner address: %s, bid amount: %s.", auction.Id, bid.BidderAddress, bid.BidAmount.String()))
} }
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner price %s.", auction.Id, auction.WinningPrice.String())) k.Logger(ctx).Info(fmt.Sprintf("Auction %s winning price %s.", auction.Id, auction.WinningPrice.String()))
} else { } else {
k.Logger(ctx).Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id)) k.Logger(ctx).Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id))
} }
@ -882,6 +885,7 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
} }
// Process winner accounts (if nobody bids, there won't be a winner). // Process winner accounts (if nobody bids, there won't be a winner).
totalLockedAmount := auction.MaxPrice.Amount.Mul(math.NewInt(int64(auction.NumProviders)))
if len(winnerBids) > 0 { if len(winnerBids) > 0 {
for _, bid := range winnerBids { for _, bid := range winnerBids {
winnerAddress, err := sdk.AccAddressFromBech32(bid.BidderAddress) winnerAddress, err := sdk.AccAddressFromBech32(bid.BidderAddress)
@ -896,32 +900,29 @@ func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontype
k.Logger(ctx).Error(fmt.Sprintf("Auction error sending funds to winner: %v", sdkErr)) k.Logger(ctx).Error(fmt.Sprintf("Auction error sending funds to winner: %v", sdkErr))
panic(sdkErr) panic(sdkErr)
} }
} }
// Send back extra amount to auction creator
totalLockedAmount := auction.MaxPrice.Amount.Mul(math.NewInt(int64(auction.NumProviders)))
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(auction.NumProviders)))
extraAmountCoin := sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount.Sub(totalAmountPaid)) // Send back extra amount to auction creator
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(len(winnerBids))))
extraAmount := sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount.Sub(totalAmountPaid))
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount( sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
ctx, ctx,
auctiontypes.ModuleName, auctiontypes.ModuleName,
sdk.AccAddress(auction.OwnerAddress), sdk.AccAddress(auction.OwnerAddress),
sdk.NewCoins(extraAmountCoin), sdk.NewCoins(extraAmount),
) )
if sdkErr != nil { if sdkErr != nil {
k.Logger(ctx).Error(fmt.Sprintf("Auction error returning extra locked amount: %v", sdkErr)) k.Logger(ctx).Error(fmt.Sprintf("Auction error returning extra locked amount: %v", sdkErr))
panic(sdkErr) panic(sdkErr)
} }
} else { } else {
totalLockedAmount := sdk.NewCoin(auction.MaxPrice.Denom, auction.MaxPrice.Amount.Mul(math.NewInt(int64(auction.NumProviders)))) // Return all locked amount in case of no winners
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount( sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
ctx, ctx,
auctiontypes.ModuleName, auctiontypes.ModuleName,
sdk.AccAddress(auction.OwnerAddress), sdk.AccAddress(auction.OwnerAddress),
sdk.NewCoins(totalLockedAmount)) sdk.NewCoins(sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount)))
if sdkErr != nil { if sdkErr != nil {
k.Logger(ctx).Error(fmt.Sprintf("Auction error returning bid amount: %v", sdkErr)) k.Logger(ctx).Error(fmt.Sprintf("Auction error returning bid amount: %v", sdkErr))
panic(sdkErr) panic(sdkErr)

View File

@ -38,23 +38,26 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// MsgCreateAuction defines a create auction message // MsgCreateAuction defines a create auction message
type MsgCreateAuction struct { type MsgCreateAuction struct {
// Duration of the commits phase in seconds
CommitsDuration time.Duration `protobuf:"bytes,1,opt,name=commits_duration,json=commitsDuration,proto3,stdduration" json:"commits_duration" json:"commits_duration" yaml:"commits_duration"`
// Duration of the reveals phase in seconds
RevealsDuration time.Duration `protobuf:"bytes,2,opt,name=reveals_duration,json=revealsDuration,proto3,stdduration" json:"reveals_duration" json:"reveals_duration" yaml:"reveals_duration"`
// Commit fees
CommitFee types.Coin `protobuf:"bytes,3,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee" json:"commit_fee" yaml:"commit_fee"`
// Reveal fees
RevealFee types.Coin `protobuf:"bytes,4,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"`
// Minimum acceptable bid amount
MinimumBid types.Coin `protobuf:"bytes,5,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
// Address of the signer // Address of the signer
Signer string `protobuf:"bytes,6,opt,name=signer,proto3" json:"signer,omitempty" json:"signer" yaml:"signer"` Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty" json:"signer" yaml:"signer"`
// Auction's kind (vickrey | provider) // Auction kind (vickrey | provider)
Kind string `protobuf:"bytes,7,opt,name=kind,proto3" json:"kind,omitempty" json:"kind" yaml:"kind"` Kind string `protobuf:"bytes,2,opt,name=kind,proto3" json:"kind,omitempty" json:"kind" yaml:"kind"`
// Maximum acceptable bid amount (for service provider auctions) // Duration of the commits phase in seconds
CommitsDuration time.Duration `protobuf:"bytes,3,opt,name=commits_duration,json=commitsDuration,proto3,stdduration" json:"commits_duration" json:"commits_duration" yaml:"commits_duration"`
// Duration of the reveals phase in seconds
RevealsDuration time.Duration `protobuf:"bytes,4,opt,name=reveals_duration,json=revealsDuration,proto3,stdduration" json:"reveals_duration" json:"reveals_duration" yaml:"reveals_duration"`
// Commit fees
CommitFee types.Coin `protobuf:"bytes,5,opt,name=commit_fee,json=commitFee,proto3" json:"commit_fee" json:"commit_fee" yaml:"commit_fee"`
// Reveal fees
RevealFee types.Coin `protobuf:"bytes,6,opt,name=reveal_fee,json=revealFee,proto3" json:"reveal_fee" json:"reveal_fee" yaml:"reveal_fee"`
// Minimum acceptable bid amount
// Only applicable in vickrey auctions
MinimumBid types.Coin `protobuf:"bytes,7,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
// Maximum acceptable bid amount
// Only applicable in provider auctions
MaxPrice types.Coin `protobuf:"bytes,8,opt,name=max_price,json=maxPrice,proto3" json:"max_price" json:"max_price" yaml:"max_price"` MaxPrice types.Coin `protobuf:"bytes,8,opt,name=max_price,json=maxPrice,proto3" json:"max_price" json:"max_price" yaml:"max_price"`
// Number of providers to be selected // Number of desired providers (num of auction winners)
// Only applicable in provider auctions
NumProviders int32 `protobuf:"varint,9,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"` NumProviders int32 `protobuf:"varint,9,opt,name=num_providers,json=numProviders,proto3" json:"num_providers,omitempty"`
} }
@ -404,68 +407,68 @@ func init() {
func init() { proto.RegisterFile("cerc/auction/v1/tx.proto", fileDescriptor_70947cda59e835fd) } func init() { proto.RegisterFile("cerc/auction/v1/tx.proto", fileDescriptor_70947cda59e835fd) }
var fileDescriptor_70947cda59e835fd = []byte{ var fileDescriptor_70947cda59e835fd = []byte{
// 964 bytes of a gzipped FileDescriptorProto // 967 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0xc1, 0x6e, 0xdb, 0x46, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02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xab, 0x49, 0x0d, 0x19, 0xe9, 0x13, 0x7c, 0x5a, 0xd0, 0x70, 0xe3, 0x8a, 0x1a, 0xca, 0xf2, 0x39, 0x90, 0x81, 0xe6, 0x37, 0x06, 0xba, 0x13, 0xb2, 0x24, 0xa1, 0x39, 0xef, 0xea, 0x33,
0x05, 0xb4, 0x86, 0x29, 0xbf, 0xd2, 0x00, 0xee, 0x91, 0x06, 0x82, 0x90, 0x92, 0xd5, 0x7e, 0x42, 0x5b, 0xd5, 0xb6, 0xb1, 0xd3, 0xe8, 0xac, 0xb9, 0x4a, 0x14, 0x57, 0x8b, 0xe2, 0x7e, 0x0c, 0x01,
0x88, 0x55, 0x05, 0x72, 0x18, 0xaf, 0x78, 0x17, 0x2e, 0xbc, 0x0b, 0xf7, 0x01, 0xa3, 0xa9, 0xff, 0xfe, 0x87, 0x2f, 0x47, 0x76, 0x65, 0x3c, 0xb2, 0x3d, 0x95, 0xbc, 0x9c, 0x40, 0x83, 0xe6, 0xec,
0x3e, 0x90, 0x6f, 0x16, 0x07, 0x20, 0x52, 0x27, 0x5b, 0x97, 0x9e, 0xa0, 0xae, 0x8c, 0x87, 0x84, 0x3f, 0xfc, 0x61, 0x1b, 0xc1, 0x32, 0x98, 0x75, 0x36, 0x59, 0x43, 0x46, 0x86, 0x04, 0x9f, 0x16,
0x08, 0x1a, 0xc5, 0x2c, 0x69, 0xe6, 0xae, 0x48, 0x33, 0x4e, 0x9d, 0xec, 0x0e, 0x68, 0x94, 0x21, 0x6a, 0x58, 0xb8, 0x66, 0x0d, 0xe5, 0x04, 0xba, 0x86, 0x39, 0xbb, 0xaa, 0x01, 0xcc, 0x93, 0x1a,
0x68, 0x28, 0x5a, 0x48, 0x68, 0x4a, 0x93, 0x5e, 0xd2, 0xee, 0xd0, 0xc8, 0x9a, 0xbf, 0x8c, 0x67, 0x08, 0x42, 0xaa, 0xac, 0xee, 0x13, 0x42, 0xac, 0x45, 0x80, 0xc3, 0x45, 0x8a, 0x5b, 0x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0x15, 0xd4, 0x73, 0xc5, 0x6f, 0x15, 0xc9, 0xc2, 0x3d, 0xca, 0xbc, 0x53, 0x1c, 0xb2, 0x94, 0x86, 0x91,
0x77, 0x6a, 0xf2, 0x9f, 0xc8, 0x07, 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x91, 0xdf, 0x04, 0x3d, 0x77, 0xa6, 0x2b, 0xee, 0xd5, 0xe4, 0xff, 0xc1, 0x7b, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xd2,
0x40, 0x0a, 0x00, 0x00, 0x88, 0x14, 0x9a, 0x40, 0x0a, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -701,20 +704,6 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
} }
i-- i--
dAtA[i] = 0x42 dAtA[i] = 0x42
if len(m.Kind) > 0 {
i -= len(m.Kind)
copy(dAtA[i:], m.Kind)
i = encodeVarintTx(dAtA, i, uint64(len(m.Kind)))
i--
dAtA[i] = 0x3a
}
if len(m.Signer) > 0 {
i -= len(m.Signer)
copy(dAtA[i:], m.Signer)
i = encodeVarintTx(dAtA, i, uint64(len(m.Signer)))
i--
dAtA[i] = 0x32
}
{ {
size, err := m.MinimumBid.MarshalToSizedBuffer(dAtA[:i]) size, err := m.MinimumBid.MarshalToSizedBuffer(dAtA[:i])
if err != nil { if err != nil {
@ -724,7 +713,7 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintTx(dAtA, i, uint64(size)) i = encodeVarintTx(dAtA, i, uint64(size))
} }
i-- i--
dAtA[i] = 0x2a dAtA[i] = 0x3a
{ {
size, err := m.RevealFee.MarshalToSizedBuffer(dAtA[:i]) size, err := m.RevealFee.MarshalToSizedBuffer(dAtA[:i])
if err != nil { if err != nil {
@ -734,7 +723,7 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintTx(dAtA, i, uint64(size)) i = encodeVarintTx(dAtA, i, uint64(size))
} }
i-- i--
dAtA[i] = 0x22 dAtA[i] = 0x32
{ {
size, err := m.CommitFee.MarshalToSizedBuffer(dAtA[:i]) size, err := m.CommitFee.MarshalToSizedBuffer(dAtA[:i])
if err != nil { if err != nil {
@ -744,7 +733,7 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i = encodeVarintTx(dAtA, i, uint64(size)) i = encodeVarintTx(dAtA, i, uint64(size))
} }
i-- i--
dAtA[i] = 0x1a dAtA[i] = 0x2a
n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.RevealsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration):]) n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.RevealsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration):])
if err5 != nil { if err5 != nil {
return 0, err5 return 0, err5
@ -752,7 +741,7 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= n5 i -= n5
i = encodeVarintTx(dAtA, i, uint64(n5)) i = encodeVarintTx(dAtA, i, uint64(n5))
i-- i--
dAtA[i] = 0x12 dAtA[i] = 0x22
n6, err6 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CommitsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration):]) n6, err6 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CommitsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration):])
if err6 != nil { if err6 != nil {
return 0, err6 return 0, err6
@ -760,7 +749,21 @@ func (m *MsgCreateAuction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i -= n6 i -= n6
i = encodeVarintTx(dAtA, i, uint64(n6)) i = encodeVarintTx(dAtA, i, uint64(n6))
i-- i--
dAtA[i] = 0xa dAtA[i] = 0x1a
if len(m.Kind) > 0 {
i -= len(m.Kind)
copy(dAtA[i:], m.Kind)
i = encodeVarintTx(dAtA, i, uint64(len(m.Kind)))
i--
dAtA[i] = 0x12
}
if len(m.Signer) > 0 {
i -= len(m.Signer)
copy(dAtA[i:], m.Signer)
i = encodeVarintTx(dAtA, i, uint64(len(m.Signer)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
@ -1037,6 +1040,14 @@ func (m *MsgCreateAuction) Size() (n int) {
} }
var l int var l int
_ = l _ = l
l = len(m.Signer)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.Kind)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration) l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration)
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration) l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration)
@ -1047,14 +1058,6 @@ func (m *MsgCreateAuction) Size() (n int) {
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
l = m.MinimumBid.Size() l = m.MinimumBid.Size()
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
l = len(m.Signer)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.Kind)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = m.MaxPrice.Size() l = m.MaxPrice.Size()
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
if m.NumProviders != 0 { if m.NumProviders != 0 {
@ -1204,6 +1207,70 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
} }
switch fieldNum { switch fieldNum {
case 1: case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CommitsDuration", wireType) return fmt.Errorf("proto: wrong wireType = %d for field CommitsDuration", wireType)
} }
@ -1236,7 +1303,7 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 2: case 4:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RevealsDuration", wireType) return fmt.Errorf("proto: wrong wireType = %d for field RevealsDuration", wireType)
} }
@ -1269,7 +1336,7 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 3: case 5:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field CommitFee", wireType) return fmt.Errorf("proto: wrong wireType = %d for field CommitFee", wireType)
} }
@ -1302,7 +1369,7 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 4: case 6:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field RevealFee", wireType) return fmt.Errorf("proto: wrong wireType = %d for field RevealFee", wireType)
} }
@ -1335,7 +1402,7 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 5: case 7:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MinimumBid", wireType) return fmt.Errorf("proto: wrong wireType = %d for field MinimumBid", wireType)
} }
@ -1368,70 +1435,6 @@ func (m *MsgCreateAuction) Unmarshal(dAtA []byte) error {
return err return err
} }
iNdEx = postIndex iNdEx = postIndex
case 6:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Signer = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 7:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Kind = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 8: case 8:
if wireType != 2 { if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType) return fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType)