Add a method to update auction module params

This commit is contained in:
IshaVenikar 2024-09-02 10:30:02 +05:30 committed by nabarun
parent 779a1021a4
commit a26b05a80f
14 changed files with 1805 additions and 226 deletions

View File

@ -15,11 +15,13 @@ import (
var ( var (
md_Module protoreflect.MessageDescriptor md_Module protoreflect.MessageDescriptor
fd_Module_authority protoreflect.FieldDescriptor
) )
func init() { func init() {
file_cerc_auction_module_v1_module_proto_init() file_cerc_auction_module_v1_module_proto_init()
md_Module = File_cerc_auction_module_v1_module_proto.Messages().ByName("Module") md_Module = File_cerc_auction_module_v1_module_proto.Messages().ByName("Module")
fd_Module_authority = md_Module.Fields().ByName("authority")
} }
var _ protoreflect.Message = (*fastReflection_Module)(nil) var _ protoreflect.Message = (*fastReflection_Module)(nil)
@ -87,6 +89,12 @@ func (x *fastReflection_Module) 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_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Authority != "" {
value := protoreflect.ValueOfString(x.Authority)
if !f(fd_Module_authority, value) {
return
}
}
} }
// Has reports whether a field is populated. // Has reports whether a field is populated.
@ -102,6 +110,8 @@ func (x *fastReflection_Module) Range(f func(protoreflect.FieldDescriptor, proto
// a repeated field is populated if it is non-empty. // a repeated field is populated if it is non-empty.
func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.module.v1.Module.authority":
return x.Authority != ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -118,6 +128,8 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool {
// Clear is a mutating operation and unsafe for concurrent use. // Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.module.v1.Module.authority":
x.Authority = ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -134,6 +146,9 @@ func (x *fastReflection_Module) 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() { switch descriptor.FullName() {
case "cerc.auction.module.v1.Module.authority":
value := x.Authority
return protoreflect.ValueOfString(value)
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -154,6 +169,8 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro
// Set is a mutating operation and unsafe for concurrent use. // Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.module.v1.Module.authority":
x.Authority = value.Interface().(string)
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -174,6 +191,8 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto
// Mutable is a mutating operation and unsafe for concurrent use. // Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.module.v1.Module.authority":
panic(fmt.Errorf("field authority of message cerc.auction.module.v1.Module is not mutable"))
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -187,6 +206,8 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore
// 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() { switch fd.FullName() {
case "cerc.auction.module.v1.Module.authority":
return protoreflect.ValueOfString("")
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.auction.module.v1.Module"))
@ -256,6 +277,10 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
var n int var n int
var l int var l int
_ = l _ = l
l = len(x.Authority)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil { if x.unknownFields != nil {
n += len(x.unknownFields) n += len(x.unknownFields)
} }
@ -285,6 +310,13 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields) i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields) copy(dAtA[i:], x.unknownFields)
} }
if len(x.Authority) > 0 {
i -= len(x.Authority)
copy(dAtA[i:], x.Authority)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority)))
i--
dAtA[i] = 0x12
}
if input.Buf != nil { if input.Buf != nil {
input.Buf = append(input.Buf, dAtA...) input.Buf = append(input.Buf, dAtA...)
} else { } else {
@ -334,6 +366,38 @@ func (x *fastReflection_Module) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire)
} }
switch fieldNum { switch fieldNum {
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:]) skippy, err := runtime.Skip(dAtA[iNdEx:])
@ -388,6 +452,10 @@ type Module struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// authority defines the custom module authority. If not set, defaults to the
// governance module.
Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"`
} }
func (x *Module) Reset() { func (x *Module) Reset() {
@ -410,6 +478,13 @@ func (*Module) Descriptor() ([]byte, []int) {
return file_cerc_auction_module_v1_module_proto_rawDescGZIP(), []int{0} return file_cerc_auction_module_v1_module_proto_rawDescGZIP(), []int{0}
} }
func (x *Module) GetAuthority() string {
if x != nil {
return x.Authority
}
return ""
}
var File_cerc_auction_module_v1_module_proto protoreflect.FileDescriptor var File_cerc_auction_module_v1_module_proto protoreflect.FileDescriptor
var file_cerc_auction_module_v1_module_proto_rawDesc = []byte{ var file_cerc_auction_module_v1_module_proto_rawDesc = []byte{
@ -419,25 +494,27 @@ var file_cerc_auction_module_v1_module_proto_rawDesc = []byte{
0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63,
0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22,
0x37, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2d, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x55, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74,
0x27, 0x0a, 0x25, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75,
0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x78, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2d, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x27, 0x0a,
0x2f, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xe5, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x25, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63,
0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x78, 0x2f, 0x61,
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0xe5, 0x01, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x63,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x65, 0x72, 0x63, 0x2e, 0x61, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x6f, 0x64, 0x75,
0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f,
0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f,
0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x4d, 0xaa, 0x02, 0x16, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x61, 0x75, 0x63, 0x74, 0x69,
0x43, 0x65, 0x72, 0x63, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64,
0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x41, 0x75, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x41, 0x4d, 0xaa, 0x02, 0x16, 0x43, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x72, 0x63, 0x2e, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
0x02, 0x22, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x16, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x41, 0x75, 0x63, 0x74,
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x22,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x41, 0x75, 0x63, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x41, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x4d, 0x6f, 0x64,
0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x74, 0x61, 0xea, 0x02, 0x19, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x41, 0x75, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@ const (
Msg_CreateAuction_FullMethodName = "/cerc.auction.v1.Msg/CreateAuction" Msg_CreateAuction_FullMethodName = "/cerc.auction.v1.Msg/CreateAuction"
Msg_CommitBid_FullMethodName = "/cerc.auction.v1.Msg/CommitBid" Msg_CommitBid_FullMethodName = "/cerc.auction.v1.Msg/CommitBid"
Msg_RevealBid_FullMethodName = "/cerc.auction.v1.Msg/RevealBid" Msg_RevealBid_FullMethodName = "/cerc.auction.v1.Msg/RevealBid"
Msg_UpdateParams_FullMethodName = "/cerc.auction.v1.Msg/UpdateParams"
) )
// MsgClient is the client API for Msg service. // MsgClient is the client API for Msg service.
@ -34,6 +35,9 @@ type MsgClient interface {
CommitBid(ctx context.Context, in *MsgCommitBid, opts ...grpc.CallOption) (*MsgCommitBidResponse, error) CommitBid(ctx context.Context, in *MsgCommitBid, opts ...grpc.CallOption) (*MsgCommitBidResponse, error)
// RevealBid is the command for revealing a bid // RevealBid is the command for revealing a bid
RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grpc.CallOption) (*MsgRevealBidResponse, error) RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grpc.CallOption) (*MsgRevealBidResponse, error)
// UpdateParams defines an operation for updating the x/staking module
// parameters.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
} }
type msgClient struct { type msgClient struct {
@ -71,6 +75,15 @@ func (c *msgClient) RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grp
return out, nil return out, nil
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer // All implementations must embed UnimplementedMsgServer
// for forward compatibility // for forward compatibility
@ -81,6 +94,9 @@ type MsgServer interface {
CommitBid(context.Context, *MsgCommitBid) (*MsgCommitBidResponse, error) CommitBid(context.Context, *MsgCommitBid) (*MsgCommitBidResponse, error)
// RevealBid is the command for revealing a bid // RevealBid is the command for revealing a bid
RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error) RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error)
// UpdateParams defines an operation for updating the x/staking module
// parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
mustEmbedUnimplementedMsgServer() mustEmbedUnimplementedMsgServer()
} }
@ -97,6 +113,9 @@ func (UnimplementedMsgServer) CommitBid(context.Context, *MsgCommitBid) (*MsgCom
func (UnimplementedMsgServer) RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error) { func (UnimplementedMsgServer) RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RevealBid not implemented") return nil, status.Errorf(codes.Unimplemented, "method RevealBid not implemented")
} }
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
@ -164,6 +183,24 @@ func _Msg_RevealBid_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService, // It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy) // and not to be introspected or modified (even as a copy)
@ -183,6 +220,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
MethodName: "RevealBid", MethodName: "RevealBid",
Handler: _Msg_RevealBid_Handler, Handler: _Msg_RevealBid_Handler,
}, },
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "cerc/auction/v1/tx.proto", Metadata: "cerc/auction/v1/tx.proto",

View File

@ -11141,7 +11141,7 @@ type MsgUpdateParams struct {
// authority is the address that controls the module (defaults to x/gov unless // authority is the address that controls the module (defaults to x/gov unless
// overwritten). // overwritten).
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// params defines the x/bond parameters to update. // params defines the x/registry parameters to update.
// //
// NOTE: All parameters must be supplied. // NOTE: All parameters must be supplied.
Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`

View File

@ -10,4 +10,8 @@ message Module {
option (cosmos.app.v1alpha1.module) = { option (cosmos.app.v1alpha1.module) = {
go_import : "git.vdb.to/cerc-io/laconicd/x/auction" go_import : "git.vdb.to/cerc-io/laconicd/x/auction"
}; };
// authority defines the custom module authority. If not set, defaults to the
// governance module.
string authority = 2;
} }

View File

@ -7,6 +7,7 @@ import "gogoproto/gogo.proto";
import "google/api/annotations.proto"; import "google/api/annotations.proto";
import "google/protobuf/duration.proto"; import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto"; import "cosmos/base/v1beta1/coin.proto";
import "cosmos_proto/cosmos.proto";
import "cerc/auction/v1/auction.proto"; import "cerc/auction/v1/auction.proto";
option go_package = "git.vdb.to/cerc-io/laconicd/x/auction"; option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
@ -29,6 +30,10 @@ service Msg {
rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse) { rpc RevealBid(MsgRevealBid) returns (MsgRevealBidResponse) {
option (google.api.http).post = "/cerc/auction/v1/reveal_bid"; option (google.api.http).post = "/cerc/auction/v1/reveal_bid";
}; };
// UpdateParams defines an operation for updating the x/staking module
// parameters.
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
} }
// MsgCreateAuction defines a create auction message // MsgCreateAuction defines a create auction message
@ -134,3 +139,21 @@ message MsgRevealBidResponse {
Auction auction = 1 Auction auction = 1
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ]; [ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
} }
// MsgUpdateParams is the Msg/UpdateParams request type.
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address that controls the module (defaults to x/gov unless
// overwritten).
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// params defines the x/auction parameters to update.
//
// NOTE: All parameters must be supplied.
Params params = 2 [ (gogoproto.nullable) = false ];
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
message MsgUpdateParamsResponse {};

View File

@ -218,7 +218,7 @@ message MsgUpdateParams {
// overwritten). // overwritten).
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
// params defines the x/bond parameters to update. // params defines the x/registry parameters to update.
// //
// NOTE: All parameters must be supplied. // NOTE: All parameters must be supplied.
Params params = 2 [ (gogoproto.nullable) = false ]; Params params = 2 [ (gogoproto.nullable) = false ];

View File

@ -99,7 +99,7 @@ func (tf *TestFixture) Setup() error {
log.NewNopLogger(), log.NewNopLogger(),
) )
auctionKeeper := auctionkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[auctionTypes.StoreKey]), accountKeeper, bankKeeper) auctionKeeper := auctionkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[auctionTypes.StoreKey]), accountKeeper, bankKeeper, authority.String())
bondKeeper := bondkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[bondTypes.StoreKey]), accountKeeper, bankKeeper, authority.String()) bondKeeper := bondkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[bondTypes.StoreKey]), accountKeeper, bankKeeper, authority.String())

View File

@ -67,6 +67,8 @@ type Keeper struct {
// Codecs // Codecs
cdc codec.BinaryCodec cdc codec.BinaryCodec
authority string
// External keepers // External keepers
accountKeeper auth.AccountKeeper accountKeeper auth.AccountKeeper
bankKeeper bank.Keeper bankKeeper bank.Keeper
@ -91,10 +93,17 @@ func NewKeeper(
storeService storetypes.KVStoreService, storeService storetypes.KVStoreService,
accountKeeper auth.AccountKeeper, accountKeeper auth.AccountKeeper,
bankKeeper bank.Keeper, bankKeeper bank.Keeper,
authority string,
) *Keeper { ) *Keeper {
// ensure that authority is a valid AccAddress
if _, err := accountKeeper.AddressCodec().StringToBytes(authority); err != nil {
panic("authority is not a valid acc address")
}
sb := collections.NewSchemaBuilder(storeService) sb := collections.NewSchemaBuilder(storeService)
k := Keeper{ k := Keeper{
cdc: cdc, cdc: cdc,
authority: authority,
accountKeeper: accountKeeper, accountKeeper: accountKeeper,
bankKeeper: bankKeeper, bankKeeper: bankKeeper,
Params: collections.NewItem(sb, auctiontypes.ParamsPrefix, "params", codec.CollValue[auctiontypes.Params](cdc)), Params: collections.NewItem(sb, auctiontypes.ParamsPrefix, "params", codec.CollValue[auctiontypes.Params](cdc)),
@ -528,6 +537,11 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg auctiontypes.MsgRevealBid) (*auct
return &auction, nil return &auction, nil
} }
// GetAuthority returns the x/auction module's authority.
func (k Keeper) GetAuthority() string {
return k.authority
}
// GetParams gets the auction module's parameters. // GetParams gets the auction module's parameters.
func (k Keeper) GetParams(ctx sdk.Context) (*auctiontypes.Params, error) { func (k Keeper) GetParams(ctx sdk.Context) (*auctiontypes.Params, error) {
params, err := k.Params.Get(ctx) params, err := k.Params.Get(ctx)
@ -538,6 +552,11 @@ func (k Keeper) GetParams(ctx sdk.Context) (*auctiontypes.Params, error) {
return &params, nil return &params, nil
} }
// SetParams sets the x/auction module parameters.
func (k Keeper) SetParams(ctx sdk.Context, params auctiontypes.Params) error {
return k.Params.Set(ctx, params)
}
// GetAuctionModuleBalances gets the auction module account(s) balances. // GetAuctionModuleBalances gets the auction module account(s) balances.
func (k Keeper) GetAuctionModuleBalances(ctx sdk.Context) sdk.Coins { func (k Keeper) GetAuctionModuleBalances(ctx sdk.Context) sdk.Coins {
moduleAddress := k.accountKeeper.GetModuleAddress(auctiontypes.ModuleName) moduleAddress := k.accountKeeper.GetModuleAddress(auctiontypes.ModuleName)

View File

@ -3,9 +3,11 @@ package keeper
import ( import (
"context" "context"
errorsmod "cosmossdk.io/errors"
"git.vdb.to/cerc-io/laconicd/utils" "git.vdb.to/cerc-io/laconicd/utils"
auctiontypes "git.vdb.to/cerc-io/laconicd/x/auction" auctiontypes "git.vdb.to/cerc-io/laconicd/x/auction"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
) )
var _ auctiontypes.MsgServer = msgServer{} var _ auctiontypes.MsgServer = msgServer{}
@ -128,3 +130,22 @@ func (ms msgServer) RevealBid(c context.Context, msg *auctiontypes.MsgRevealBid)
return &auctiontypes.MsgRevealBidResponse{Auction: resp}, nil return &auctiontypes.MsgRevealBidResponse{Auction: resp}, nil
} }
// UpdateParams defines a method to perform updation of module params.
func (ms msgServer) UpdateParams(c context.Context, msg *auctiontypes.MsgUpdateParams) (*auctiontypes.MsgUpdateParamsResponse, error) {
if ms.k.authority != msg.Authority {
return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority)
}
if err := msg.Params.Validate(); err != nil {
return nil, err
}
ctx := sdk.UnwrapSDKContext(c)
if err := ms.k.SetParams(ctx, msg.Params); err != nil {
return nil, err
}
return &auctiontypes.MsgUpdateParamsResponse{}, nil
}

View File

@ -91,7 +91,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
{ProtoField: "minimum_bid"}, {ProtoField: "minimum_bid"},
}, },
}, },
{
RpcMethod: "UpdateParams",
Skip: true, // skipped because authority gated
}, },
},
EnhanceCustomCommand: true, // Allow additional manual commands EnhanceCustomCommand: true, // Allow additional manual commands
}, },
} }

View File

@ -7,7 +7,9 @@ import (
"github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec"
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper" auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper" bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/auction/module/v1" modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/auction/module/v1"
"git.vdb.to/cerc-io/laconicd/x/auction" "git.vdb.to/cerc-io/laconicd/x/auction"
@ -33,6 +35,7 @@ func init() {
type ModuleInputs struct { type ModuleInputs struct {
depinject.In depinject.In
Config *modulev1.Module
Cdc codec.Codec Cdc codec.Codec
StoreService store.KVStoreService StoreService store.KVStoreService
@ -52,7 +55,13 @@ type ModuleOutputs struct {
} }
func ProvideModule(in ModuleInputs) ModuleOutputs { func ProvideModule(in ModuleInputs) ModuleOutputs {
k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, in.BankKeeper) // default to governance authority if not provided
authority := authtypes.NewModuleAddress(govtypes.ModuleName)
if in.Config.Authority != "" {
authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority)
}
k := keeper.NewKeeper(in.Cdc, in.StoreService, in.AccountKeeper, in.BankKeeper, authority.String())
m := NewAppModule(in.Cdc, k) m := NewAppModule(in.Cdc, k)
return ModuleOutputs{Module: m, Keeper: k} return ModuleOutputs{Module: m, Keeper: k}

View File

@ -6,6 +6,7 @@ package auction
import ( import (
context "context" context "context"
fmt "fmt" fmt "fmt"
_ "github.com/cosmos/cosmos-proto"
types "github.com/cosmos/cosmos-sdk/types" types "github.com/cosmos/cosmos-sdk/types"
_ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/msgservice"
_ "github.com/cosmos/gogoproto/gogoproto" _ "github.com/cosmos/gogoproto/gogoproto"
@ -287,6 +288,102 @@ func (m *MsgRevealBidResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_MsgRevealBidResponse proto.InternalMessageInfo var xxx_messageInfo_MsgRevealBidResponse proto.InternalMessageInfo
// MsgUpdateParams is the Msg/UpdateParams request type.
type MsgUpdateParams struct {
// authority is the address that controls the module (defaults to x/gov unless
// overwritten).
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// params defines the x/auction parameters to update.
//
// NOTE: All parameters must be supplied.
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
}
func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} }
func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParams) ProtoMessage() {}
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
return fileDescriptor_70947cda59e835fd, []int{6}
}
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgUpdateParams.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MsgUpdateParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgUpdateParams.Merge(m, src)
}
func (m *MsgUpdateParams) XXX_Size() int {
return m.Size()
}
func (m *MsgUpdateParams) XXX_DiscardUnknown() {
xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m)
}
var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo
func (m *MsgUpdateParams) GetAuthority() string {
if m != nil {
return m.Authority
}
return ""
}
func (m *MsgUpdateParams) GetParams() Params {
if m != nil {
return m.Params
}
return Params{}
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
type MsgUpdateParamsResponse struct {
}
func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} }
func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) }
func (*MsgUpdateParamsResponse) ProtoMessage() {}
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_70947cda59e835fd, []int{7}
}
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
}
func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
if deterministic {
return xxx_messageInfo_MsgUpdateParamsResponse.Marshal(b, m, deterministic)
} else {
b = b[:cap(b)]
n, err := m.MarshalToSizedBuffer(b)
if err != nil {
return nil, err
}
return b[:n], nil
}
}
func (m *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src)
}
func (m *MsgUpdateParamsResponse) XXX_Size() int {
return m.Size()
}
func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
func init() { func init() {
proto.RegisterType((*MsgCreateAuction)(nil), "cerc.auction.v1.MsgCreateAuction") proto.RegisterType((*MsgCreateAuction)(nil), "cerc.auction.v1.MsgCreateAuction")
proto.RegisterType((*MsgCreateAuctionResponse)(nil), "cerc.auction.v1.MsgCreateAuctionResponse") proto.RegisterType((*MsgCreateAuctionResponse)(nil), "cerc.auction.v1.MsgCreateAuctionResponse")
@ -294,60 +391,70 @@ func init() {
proto.RegisterType((*MsgCommitBidResponse)(nil), "cerc.auction.v1.MsgCommitBidResponse") proto.RegisterType((*MsgCommitBidResponse)(nil), "cerc.auction.v1.MsgCommitBidResponse")
proto.RegisterType((*MsgRevealBid)(nil), "cerc.auction.v1.MsgRevealBid") proto.RegisterType((*MsgRevealBid)(nil), "cerc.auction.v1.MsgRevealBid")
proto.RegisterType((*MsgRevealBidResponse)(nil), "cerc.auction.v1.MsgRevealBidResponse") proto.RegisterType((*MsgRevealBidResponse)(nil), "cerc.auction.v1.MsgRevealBidResponse")
proto.RegisterType((*MsgUpdateParams)(nil), "cerc.auction.v1.MsgUpdateParams")
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cerc.auction.v1.MsgUpdateParamsResponse")
} }
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{
// 767 bytes of a gzipped FileDescriptorProto // 881 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x4f, 0x6b, 0x13, 0x5f, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x41, 0x6f, 0xdc, 0x44,
0x14, 0xcd, 0x34, 0x6d, 0x7e, 0xe4, 0xe5, 0x27, 0x2d, 0xa1, 0x62, 0x9a, 0x9a, 0x4c, 0x3b, 0xa5, 0x14, 0x5e, 0x77, 0x93, 0x45, 0x3b, 0x29, 0xa4, 0xb2, 0x82, 0xe2, 0x6c, 0xc9, 0x3a, 0x71, 0x15,
0xf4, 0x8f, 0x74, 0x86, 0xd4, 0x45, 0xa1, 0x2e, 0xa4, 0x53, 0x29, 0x2a, 0x74, 0x33, 0xe0, 0xc6, 0x35, 0x2d, 0x8a, 0xad, 0x04, 0x41, 0xa5, 0x70, 0x40, 0x71, 0x51, 0x05, 0x48, 0x91, 0x90, 0x51,
0x4d, 0x98, 0x3f, 0xaf, 0xd3, 0x27, 0x99, 0x79, 0x25, 0x6f, 0x12, 0xeb, 0x4e, 0x0b, 0x8a, 0x4b, 0x2f, 0xbd, 0xac, 0xc6, 0xf6, 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fe, 0x3c, 0xeb, 0x1a, 0x4f, 0xcf, 0xbb, 0x8d, 0x17, 0xe7, 0xdd, 0xc6,
0x6f, 0xe7, 0xdd, 0xc6, 0x83, 0xbd, 0x84, 0x16, 0xee, 0x38, 0x0e, 0x5d, 0xf1, 0xef, 0x84, 0xe4,
0xd1, 0x01, 0x65, 0xde, 0x00, 0x47, 0x2c, 0xa3, 0x51, 0xec, 0x3d, 0xd2, 0x8a, 0xc3, 0x96, 0xfc,
0xa0, 0xbf, 0xf7, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xca, 0x2e, 0x75, 0x29, 0x87, 0x09, 0x00,
0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -368,6 +475,9 @@ type MsgClient interface {
CommitBid(ctx context.Context, in *MsgCommitBid, opts ...grpc.CallOption) (*MsgCommitBidResponse, error) CommitBid(ctx context.Context, in *MsgCommitBid, opts ...grpc.CallOption) (*MsgCommitBidResponse, error)
// RevealBid is the command for revealing a bid // RevealBid is the command for revealing a bid
RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grpc.CallOption) (*MsgRevealBidResponse, error) RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grpc.CallOption) (*MsgRevealBidResponse, error)
// UpdateParams defines an operation for updating the x/staking module
// parameters.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
} }
type msgClient struct { type msgClient struct {
@ -405,6 +515,15 @@ func (c *msgClient) RevealBid(ctx context.Context, in *MsgRevealBid, opts ...grp
return out, nil return out, nil
} }
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, "/cerc.auction.v1.Msg/UpdateParams", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service. // MsgServer is the server API for Msg service.
type MsgServer interface { type MsgServer interface {
// CreateAuction is the command for creating an auction // CreateAuction is the command for creating an auction
@ -413,6 +532,9 @@ type MsgServer interface {
CommitBid(context.Context, *MsgCommitBid) (*MsgCommitBidResponse, error) CommitBid(context.Context, *MsgCommitBid) (*MsgCommitBidResponse, error)
// RevealBid is the command for revealing a bid // RevealBid is the command for revealing a bid
RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error) RevealBid(context.Context, *MsgRevealBid) (*MsgRevealBidResponse, error)
// UpdateParams defines an operation for updating the x/staking module
// parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
} }
// UnimplementedMsgServer can be embedded to have forward compatible implementations. // UnimplementedMsgServer can be embedded to have forward compatible implementations.
@ -428,6 +550,9 @@ func (*UnimplementedMsgServer) CommitBid(ctx context.Context, req *MsgCommitBid)
func (*UnimplementedMsgServer) RevealBid(ctx context.Context, req *MsgRevealBid) (*MsgRevealBidResponse, error) { func (*UnimplementedMsgServer) RevealBid(ctx context.Context, req *MsgRevealBid) (*MsgRevealBidResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RevealBid not implemented") return nil, status.Errorf(codes.Unimplemented, "method RevealBid not implemented")
} }
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func RegisterMsgServer(s grpc1.Server, srv MsgServer) { func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
s.RegisterService(&_Msg_serviceDesc, srv) s.RegisterService(&_Msg_serviceDesc, srv)
@ -487,6 +612,24 @@ func _Msg_RevealBid_Handler(srv interface{}, ctx context.Context, dec func(inter
return interceptor(ctx, in, info, handler) return interceptor(ctx, in, info, handler)
} }
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/cerc.auction.v1.Msg/UpdateParams",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
var _Msg_serviceDesc = grpc.ServiceDesc{ var _Msg_serviceDesc = grpc.ServiceDesc{
ServiceName: "cerc.auction.v1.Msg", ServiceName: "cerc.auction.v1.Msg",
HandlerType: (*MsgServer)(nil), HandlerType: (*MsgServer)(nil),
@ -503,6 +646,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
MethodName: "RevealBid", MethodName: "RevealBid",
Handler: _Msg_RevealBid_Handler, Handler: _Msg_RevealBid_Handler,
}, },
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
}, },
Streams: []grpc.StreamDesc{}, Streams: []grpc.StreamDesc{},
Metadata: "cerc/auction/v1/tx.proto", Metadata: "cerc/auction/v1/tx.proto",
@ -777,6 +924,69 @@ func (m *MsgRevealBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
return len(dAtA) - i, nil return len(dAtA) - i, nil
} }
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
{
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
if err != nil {
return 0, err
}
i -= size
i = encodeVarintTx(dAtA, i, uint64(size))
}
i--
dAtA[i] = 0x12
if len(m.Authority) > 0 {
i -= len(m.Authority)
copy(dAtA[i:], m.Authority)
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
i--
dAtA[i] = 0xa
}
return len(dAtA) - i, nil
}
func (m *MsgUpdateParamsResponse) Marshal() (dAtA []byte, err error) {
size := m.Size()
dAtA = make([]byte, size)
n, err := m.MarshalToSizedBuffer(dAtA[:size])
if err != nil {
return nil, err
}
return dAtA[:n], nil
}
func (m *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) {
size := m.Size()
return m.MarshalToSizedBuffer(dAtA[:size])
}
func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i := len(dAtA)
_ = i
var l int
_ = l
return len(dAtA) - i, nil
}
func encodeVarintTx(dAtA []byte, offset int, v uint64) int { func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
offset -= sovTx(v) offset -= sovTx(v)
base := offset base := offset
@ -892,6 +1102,30 @@ func (m *MsgRevealBidResponse) Size() (n int) {
return n return n
} }
func (m *MsgUpdateParams) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
l = len(m.Authority)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = m.Params.Size()
n += 1 + l + sovTx(uint64(l))
return n
}
func (m *MsgUpdateParamsResponse) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
return n
}
func sovTx(x uint64) (n int) { func sovTx(x uint64) (n int) {
return (math_bits.Len64(x|1) + 6) / 7 return (math_bits.Len64(x|1) + 6) / 7
} }
@ -1695,6 +1929,171 @@ func (m *MsgRevealBidResponse) Unmarshal(dAtA []byte) error {
} }
return nil return nil
} }
func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgUpdateParams: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
}
var msglen int
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
msglen |= int(b&0x7F) << shift
if b < 0x80 {
break
}
}
if msglen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + msglen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
return err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
for iNdEx < l {
preIndex := iNdEx
var wire uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
wire |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
fieldNum := int32(wire >> 3)
wireType := int(wire & 0x7)
if wireType == 4 {
return fmt.Errorf("proto: MsgUpdateParamsResponse: wiretype end group for non-group")
}
if fieldNum <= 0 {
return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
default:
iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:])
if err != nil {
return err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return ErrInvalidLengthTx
}
if (iNdEx + skippy) > l {
return io.ErrUnexpectedEOF
}
iNdEx += skippy
}
}
if iNdEx > l {
return io.ErrUnexpectedEOF
}
return nil
}
func skipTx(dAtA []byte) (n int, err error) { func skipTx(dAtA []byte) (n int, err error) {
l := len(dAtA) l := len(dAtA)
iNdEx := 0 iNdEx := 0

View File

@ -1046,7 +1046,7 @@ type MsgUpdateParams struct {
// authority is the address that controls the module (defaults to x/gov unless // authority is the address that controls the module (defaults to x/gov unless
// overwritten). // overwritten).
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
// params defines the x/bond parameters to update. // params defines the x/registry parameters to update.
// //
// NOTE: All parameters must be supplied. // NOTE: All parameters must be supplied.
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`