Compare commits
17 Commits
Author | SHA1 | Date | |
---|---|---|---|
65957d6199 | |||
c807a9db80 | |||
3a551bce99 | |||
6f75370b17 | |||
52e8d322fa | |||
df43322ef3 | |||
94ba057807 | |||
a01a5d24d1 | |||
debfb82205 | |||
3c5cd002e1 | |||
b5a76a920e | |||
f176a5889e | |||
5e7d5fc47c | |||
c162396298 | |||
7a88c82816 | |||
9fab3f8326 | |||
ec6e2f3776 |
@ -7,7 +7,7 @@ on:
|
|||||||
- release/**
|
- release/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sdk_tests_auctions:
|
sdk_tests_authority_auctions:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
@ -35,6 +35,6 @@ jobs:
|
|||||||
TEST_AUCTION_ENABLED: true
|
TEST_AUCTION_ENABLED: true
|
||||||
run: docker compose up -d
|
run: docker compose up -d
|
||||||
|
|
||||||
- name: Run auction tests
|
- name: Run authority auction tests
|
||||||
working-directory: tests/sdk_tests
|
working-directory: tests/sdk_tests
|
||||||
run: ./run-tests.sh test:auctions
|
run: ./run-tests.sh test:authority-auctions
|
@ -19,12 +19,15 @@ FROM ubuntu:22.04
|
|||||||
# Install ca-certificates, jq, curl, bash, and other necessary packages
|
# Install ca-certificates, jq, curl, bash, and other necessary packages
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
jq curl netcat bash \
|
jq curl netcat bash bc \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy over binary from the builder
|
# Copy over binary from the builder
|
||||||
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
|
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
|
||||||
|
|
||||||
|
# Copy over init script from builder
|
||||||
|
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/scripts/init.sh scripts/init.sh
|
||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
# Run laconicd by default
|
# Run laconicd by default
|
||||||
|
@ -14,12 +14,14 @@ 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
File diff suppressed because it is too large
Load Diff
@ -22,6 +22,8 @@ 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"
|
||||||
|
Msg_ReleaseFunds_FullMethodName = "/cerc.auction.v1.Msg/ReleaseFunds"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
@ -34,6 +36,11 @@ 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)
|
||||||
|
// ReleaseFunds is the command for paying the winners of provider auctions
|
||||||
|
ReleaseFunds(ctx context.Context, in *MsgReleaseFunds, opts ...grpc.CallOption) (*MsgReleaseFundsResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type msgClient struct {
|
type msgClient struct {
|
||||||
@ -71,6 +78,24 @@ 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
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *msgClient) ReleaseFunds(ctx context.Context, in *MsgReleaseFunds, opts ...grpc.CallOption) (*MsgReleaseFundsResponse, error) {
|
||||||
|
out := new(MsgReleaseFundsResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Msg_ReleaseFunds_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 +106,11 @@ 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)
|
||||||
|
// ReleaseFunds is the command for paying the winners of provider auctions
|
||||||
|
ReleaseFunds(context.Context, *MsgReleaseFunds) (*MsgReleaseFundsResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,6 +127,12 @@ 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) ReleaseFunds(context.Context, *MsgReleaseFunds) (*MsgReleaseFundsResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method ReleaseFunds 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 +200,42 @@ 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)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Msg_ReleaseFunds_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(MsgReleaseFunds)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(MsgServer).ReleaseFunds(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Msg_ReleaseFunds_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(MsgServer).ReleaseFunds(ctx, req.(*MsgReleaseFunds))
|
||||||
|
}
|
||||||
|
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 +255,14 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "RevealBid",
|
MethodName: "RevealBid",
|
||||||
Handler: _Msg_RevealBid_Handler,
|
Handler: _Msg_RevealBid_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ReleaseFunds",
|
||||||
|
Handler: _Msg_ReleaseFunds_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/auction/v1/tx.proto",
|
Metadata: "cerc/auction/v1/tx.proto",
|
||||||
|
@ -14,12 +14,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
md_Module protoreflect.MessageDescriptor
|
md_Module protoreflect.MessageDescriptor
|
||||||
|
fd_Module_authority protoreflect.FieldDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_cerc_bond_module_v1_module_proto_init()
|
file_cerc_bond_module_v1_module_proto_init()
|
||||||
md_Module = File_cerc_bond_module_v1_module_proto.Messages().ByName("Module")
|
md_Module = File_cerc_bond_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.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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.bond.module.v1.Module.authority":
|
||||||
|
panic(fmt.Errorf("field authority of message cerc.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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.bond.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.bond.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.bond.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_bond_module_v1_module_proto_rawDescGZIP(), []int{0}
|
return file_cerc_bond_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Module) GetAuthority() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Authority
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_cerc_bond_module_v1_module_proto protoreflect.FileDescriptor
|
var File_cerc_bond_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_cerc_bond_module_v1_module_proto_rawDesc = []byte{
|
var file_cerc_bond_module_v1_module_proto_rawDesc = []byte{
|
||||||
@ -418,24 +493,26 @@ var file_cerc_bond_module_v1_module_proto_rawDesc = []byte{
|
|||||||
0x74, 0x6f, 0x12, 0x13, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x6d, 0x6f,
|
0x74, 0x6f, 0x12, 0x13, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e, 0x6d, 0x6f,
|
||||||
0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f,
|
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, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64,
|
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, 0x34, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
|
0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
|
||||||
0x75, 0x6c, 0x65, 0x3a, 0x2a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67, 0x69, 0x74,
|
0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
|
||||||
0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
|
||||||
0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x78, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x42,
|
0x79, 0x3a, 0x2a, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x24, 0x0a, 0x22, 0x67, 0x69, 0x74, 0x2e, 0x76,
|
||||||
0xd3, 0x01, 0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e,
|
0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61,
|
||||||
0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64,
|
0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x78, 0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x42, 0xd3, 0x01,
|
||||||
0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e,
|
0x0a, 0x17, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x62, 0x6f, 0x6e, 0x64, 0x2e,
|
||||||
0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c,
|
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63,
|
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3c, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64,
|
||||||
0x2f, 0x62, 0x6f, 0x6e, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b,
|
0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63,
|
||||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4d, 0xaa, 0x02,
|
0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x62,
|
||||||
0x13, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
0x6f, 0x6e, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f,
|
||||||
0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64,
|
0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x42, 0x4d, 0xaa, 0x02, 0x13, 0x43,
|
||||||
0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x65, 0x72,
|
0x65, 0x72, 0x63, 0x2e, 0x42, 0x6f, 0x6e, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
|
||||||
0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31,
|
0x56, 0x31, 0xca, 0x02, 0x13, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x4d,
|
||||||
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43,
|
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1f, 0x43, 0x65, 0x72, 0x63, 0x5c,
|
||||||
0x65, 0x72, 0x63, 0x3a, 0x3a, 0x42, 0x6f, 0x6e, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
0x42, 0x6f, 0x6e, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47,
|
||||||
0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x16, 0x43, 0x65, 0x72,
|
||||||
|
0x63, 0x3a, 0x3a, 0x42, 0x6f, 0x6e, 0x64, 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
@ -23,6 +23,7 @@ const (
|
|||||||
Msg_RefillBond_FullMethodName = "/cerc.bond.v1.Msg/RefillBond"
|
Msg_RefillBond_FullMethodName = "/cerc.bond.v1.Msg/RefillBond"
|
||||||
Msg_WithdrawBond_FullMethodName = "/cerc.bond.v1.Msg/WithdrawBond"
|
Msg_WithdrawBond_FullMethodName = "/cerc.bond.v1.Msg/WithdrawBond"
|
||||||
Msg_CancelBond_FullMethodName = "/cerc.bond.v1.Msg/CancelBond"
|
Msg_CancelBond_FullMethodName = "/cerc.bond.v1.Msg/CancelBond"
|
||||||
|
Msg_UpdateParams_FullMethodName = "/cerc.bond.v1.Msg/UpdateParams"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
@ -37,6 +38,9 @@ type MsgClient interface {
|
|||||||
WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error)
|
WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error)
|
||||||
// CancelBond defines a method for cancelling a bond.
|
// CancelBond defines a method for cancelling a bond.
|
||||||
CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error)
|
CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, 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 {
|
||||||
@ -83,6 +87,15 @@ func (c *msgClient) CancelBond(ctx context.Context, in *MsgCancelBond, opts ...g
|
|||||||
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
|
||||||
@ -95,6 +108,9 @@ type MsgServer interface {
|
|||||||
WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error)
|
WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error)
|
||||||
// CancelBond defines a method for cancelling a bond.
|
// CancelBond defines a method for cancelling a bond.
|
||||||
CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error)
|
CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error)
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -114,6 +130,9 @@ func (UnimplementedMsgServer) WithdrawBond(context.Context, *MsgWithdrawBond) (*
|
|||||||
func (UnimplementedMsgServer) CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error) {
|
func (UnimplementedMsgServer) CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CancelBond not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CancelBond 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.
|
||||||
@ -199,6 +218,24 @@ func _Msg_CancelBond_Handler(srv interface{}, ctx context.Context, dec func(inte
|
|||||||
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)
|
||||||
@ -222,6 +259,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "CancelBond",
|
MethodName: "CancelBond",
|
||||||
Handler: _Msg_CancelBond_Handler,
|
Handler: _Msg_CancelBond_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/bond/v1/tx.proto",
|
Metadata: "cerc/bond/v1/tx.proto",
|
||||||
|
@ -427,6 +427,8 @@ var (
|
|||||||
md_Participant protoreflect.MessageDescriptor
|
md_Participant protoreflect.MessageDescriptor
|
||||||
fd_Participant_cosmos_address protoreflect.FieldDescriptor
|
fd_Participant_cosmos_address protoreflect.FieldDescriptor
|
||||||
fd_Participant_nitro_address protoreflect.FieldDescriptor
|
fd_Participant_nitro_address protoreflect.FieldDescriptor
|
||||||
|
fd_Participant_role protoreflect.FieldDescriptor
|
||||||
|
fd_Participant_kyc_id protoreflect.FieldDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -434,6 +436,8 @@ func init() {
|
|||||||
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
|
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
|
||||||
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address")
|
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address")
|
||||||
fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address")
|
fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address")
|
||||||
|
fd_Participant_role = md_Participant.Fields().ByName("role")
|
||||||
|
fd_Participant_kyc_id = md_Participant.Fields().ByName("kyc_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_Participant)(nil)
|
var _ protoreflect.Message = (*fastReflection_Participant)(nil)
|
||||||
@ -513,6 +517,18 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if x.Role != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Role)
|
||||||
|
if !f(fd_Participant_role, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.KycId != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.KycId)
|
||||||
|
if !f(fd_Participant_kyc_id, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Has reports whether a field is populated.
|
// Has reports whether a field is populated.
|
||||||
@ -532,6 +548,10 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
|
|||||||
return x.CosmosAddress != ""
|
return x.CosmosAddress != ""
|
||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
return x.NitroAddress != ""
|
return x.NitroAddress != ""
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
return x.Role != ""
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
return x.KycId != ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -552,6 +572,10 @@ func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
|
|||||||
x.CosmosAddress = ""
|
x.CosmosAddress = ""
|
||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
x.NitroAddress = ""
|
x.NitroAddress = ""
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
x.Role = ""
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
x.KycId = ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -574,6 +598,12 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
|
|||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
value := x.NitroAddress
|
value := x.NitroAddress
|
||||||
return protoreflect.ValueOfString(value)
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
value := x.Role
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
value := x.KycId
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -598,6 +628,10 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
|
|||||||
x.CosmosAddress = value.Interface().(string)
|
x.CosmosAddress = value.Interface().(string)
|
||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
x.NitroAddress = value.Interface().(string)
|
x.NitroAddress = value.Interface().(string)
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
x.Role = value.Interface().(string)
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
x.KycId = value.Interface().(string)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -622,6 +656,10 @@ func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) pr
|
|||||||
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable"))
|
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable"))
|
||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable"))
|
panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable"))
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
panic(fmt.Errorf("field role of message cerc.onboarding.v1.Participant is not mutable"))
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
panic(fmt.Errorf("field kyc_id of message cerc.onboarding.v1.Participant is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -639,6 +677,10 @@ func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) p
|
|||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
|
case "cerc.onboarding.v1.Participant.role":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
|
||||||
@ -716,6 +758,14 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + runtime.Sov(uint64(l))
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(x.Role)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(x.KycId)
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
@ -745,6 +795,20 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
|||||||
i -= len(x.unknownFields)
|
i -= len(x.unknownFields)
|
||||||
copy(dAtA[i:], x.unknownFields)
|
copy(dAtA[i:], x.unknownFields)
|
||||||
}
|
}
|
||||||
|
if len(x.KycId) > 0 {
|
||||||
|
i -= len(x.KycId)
|
||||||
|
copy(dAtA[i:], x.KycId)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KycId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(x.Role) > 0 {
|
||||||
|
i -= len(x.Role)
|
||||||
|
copy(dAtA[i:], x.Role)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
if len(x.NitroAddress) > 0 {
|
if len(x.NitroAddress) > 0 {
|
||||||
i -= len(x.NitroAddress)
|
i -= len(x.NitroAddress)
|
||||||
copy(dAtA[i:], x.NitroAddress)
|
copy(dAtA[i:], x.NitroAddress)
|
||||||
@ -872,6 +936,70 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
|||||||
}
|
}
|
||||||
x.NitroAddress = string(dAtA[iNdEx:postIndex])
|
x.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KycId", 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.KycId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||||
@ -1447,8 +1575,14 @@ type Participant struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
|
// participant's cosmos (laconic) address
|
||||||
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
|
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
|
||||||
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
// participant's Nitro address
|
||||||
|
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||||
|
// participant's role (participant | validator)
|
||||||
|
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
|
||||||
|
// participant's KYC receipt ID
|
||||||
|
KycId string `protobuf:"bytes,4,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Participant) Reset() {
|
func (x *Participant) Reset() {
|
||||||
@ -1485,6 +1619,20 @@ func (x *Participant) GetNitroAddress() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Participant) GetRole() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Role
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *Participant) GetKycId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.KycId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// EthPayload defines the payload that is signed by the ethereum private key
|
// EthPayload defines the payload that is signed by the ethereum private key
|
||||||
type EthPayload struct {
|
type EthPayload struct {
|
||||||
state protoimpl.MessageState
|
state protoimpl.MessageState
|
||||||
@ -1544,7 +1692,7 @@ var file_cerc_onboarding_v1_onboarding_proto_rawDesc = []byte{
|
|||||||
0x6c, 0x65, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
0x6c, 0x65, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x11,
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x11,
|
||||||
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
|
||||||
0x64, 0x22, 0xb9, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
0x64, 0x22, 0xa2, 0x02, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||||
0x74, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
0x74, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
||||||
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x2b, 0x6a,
|
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x2b, 0x6a,
|
||||||
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
|
||||||
@ -1555,29 +1703,35 @@ var file_cerc_onboarding_v1_onboarding_proto_rawDesc = []byte{
|
|||||||
0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x29, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6e, 0x69, 0x74, 0x72,
|
0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x29, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6e, 0x69, 0x74, 0x72,
|
||||||
0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
|
0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
|
||||||
0x22, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
|
0x22, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
|
||||||
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a,
|
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a,
|
||||||
0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61,
|
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f,
|
||||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde,
|
0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d,
|
||||||
0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
|
0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x36,
|
||||||
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
|
0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
|
||||||
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
|
0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x22, 0x52,
|
||||||
0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22,
|
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79,
|
||||||
0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65,
|
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||||
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
|
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
||||||
0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74,
|
0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22,
|
||||||
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f,
|
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||||
0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64,
|
0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19,
|
||||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
|
0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79,
|
||||||
0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
|
0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4,
|
||||||
0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72,
|
0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
|
||||||
0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca,
|
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69,
|
||||||
0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f,
|
0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f,
|
||||||
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
|
0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65,
|
||||||
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e,
|
0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31,
|
||||||
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72,
|
0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||||
0x6f, 0x74, 0x6f, 0x33,
|
0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c,
|
||||||
|
0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e,
|
||||||
|
0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c,
|
||||||
|
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
|
||||||
|
0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||||
|
0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,9 @@ import (
|
|||||||
const _ = grpc.SupportPackageIsVersion7
|
const _ = grpc.SupportPackageIsVersion7
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Query_Participants_FullMethodName = "/cerc.onboarding.v1.Query/Participants"
|
Query_Participants_FullMethodName = "/cerc.onboarding.v1.Query/Participants"
|
||||||
|
Query_GetParticipantByAddress_FullMethodName = "/cerc.onboarding.v1.Query/GetParticipantByAddress"
|
||||||
|
Query_GetParticipantByNitroAddress_FullMethodName = "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
@ -28,6 +30,10 @@ const (
|
|||||||
type QueryClient interface {
|
type QueryClient interface {
|
||||||
// Participants queries Participants list
|
// Participants queries Participants list
|
||||||
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||||
|
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||||
|
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
|
||||||
|
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||||
|
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -47,12 +53,34 @@ func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsReq
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error) {
|
||||||
|
out := new(QueryGetParticipantByAddressResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_GetParticipantByAddress_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||||
|
out := new(QueryGetParticipantByNitroAddressResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_GetParticipantByNitroAddress_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Participants queries Participants list
|
// Participants queries Participants list
|
||||||
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||||
|
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||||
|
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
|
||||||
|
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||||
|
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,6 +91,12 @@ type UnimplementedQueryServer struct {
|
|||||||
func (UnimplementedQueryServer) Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
func (UnimplementedQueryServer) Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedQueryServer) GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByAddress not implemented")
|
||||||
|
}
|
||||||
|
func (UnimplementedQueryServer) GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByNitroAddress not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@ -94,6 +128,42 @@ func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_GetParticipantByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryGetParticipantByAddressRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).GetParticipantByAddress(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_GetParticipantByAddress_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).GetParticipantByAddress(ctx, req.(*QueryGetParticipantByAddressRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_GetParticipantByNitroAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryGetParticipantByNitroAddressRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_GetParticipantByNitroAddress_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, req.(*QueryGetParticipantByNitroAddressRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query 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)
|
||||||
@ -105,6 +175,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Participants",
|
MethodName: "Participants",
|
||||||
Handler: _Query_Participants_Handler,
|
Handler: _Query_Participants_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetParticipantByAddress",
|
||||||
|
Handler: _Query_GetParticipantByAddress_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetParticipantByNitroAddress",
|
||||||
|
Handler: _Query_GetParticipantByNitroAddress_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/onboarding/v1/query.proto",
|
Metadata: "cerc/onboarding/v1/query.proto",
|
||||||
|
@ -20,6 +20,8 @@ var (
|
|||||||
fd_MsgOnboardParticipant_participant protoreflect.FieldDescriptor
|
fd_MsgOnboardParticipant_participant protoreflect.FieldDescriptor
|
||||||
fd_MsgOnboardParticipant_eth_payload protoreflect.FieldDescriptor
|
fd_MsgOnboardParticipant_eth_payload protoreflect.FieldDescriptor
|
||||||
fd_MsgOnboardParticipant_eth_signature protoreflect.FieldDescriptor
|
fd_MsgOnboardParticipant_eth_signature protoreflect.FieldDescriptor
|
||||||
|
fd_MsgOnboardParticipant_role protoreflect.FieldDescriptor
|
||||||
|
fd_MsgOnboardParticipant_kyc_id protoreflect.FieldDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@ -28,6 +30,8 @@ func init() {
|
|||||||
fd_MsgOnboardParticipant_participant = md_MsgOnboardParticipant.Fields().ByName("participant")
|
fd_MsgOnboardParticipant_participant = md_MsgOnboardParticipant.Fields().ByName("participant")
|
||||||
fd_MsgOnboardParticipant_eth_payload = md_MsgOnboardParticipant.Fields().ByName("eth_payload")
|
fd_MsgOnboardParticipant_eth_payload = md_MsgOnboardParticipant.Fields().ByName("eth_payload")
|
||||||
fd_MsgOnboardParticipant_eth_signature = md_MsgOnboardParticipant.Fields().ByName("eth_signature")
|
fd_MsgOnboardParticipant_eth_signature = md_MsgOnboardParticipant.Fields().ByName("eth_signature")
|
||||||
|
fd_MsgOnboardParticipant_role = md_MsgOnboardParticipant.Fields().ByName("role")
|
||||||
|
fd_MsgOnboardParticipant_kyc_id = md_MsgOnboardParticipant.Fields().ByName("kyc_id")
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ protoreflect.Message = (*fastReflection_MsgOnboardParticipant)(nil)
|
var _ protoreflect.Message = (*fastReflection_MsgOnboardParticipant)(nil)
|
||||||
@ -113,6 +117,18 @@ func (x *fastReflection_MsgOnboardParticipant) Range(f func(protoreflect.FieldDe
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if x.Role != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.Role)
|
||||||
|
if !f(fd_MsgOnboardParticipant_role, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if x.KycId != "" {
|
||||||
|
value := protoreflect.ValueOfString(x.KycId)
|
||||||
|
if !f(fd_MsgOnboardParticipant_kyc_id, value) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Has reports whether a field is populated.
|
// Has reports whether a field is populated.
|
||||||
@ -134,6 +150,10 @@ func (x *fastReflection_MsgOnboardParticipant) Has(fd protoreflect.FieldDescript
|
|||||||
return x.EthPayload != nil
|
return x.EthPayload != nil
|
||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
return x.EthSignature != ""
|
return x.EthSignature != ""
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
return x.Role != ""
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
return x.KycId != ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -156,6 +176,10 @@ func (x *fastReflection_MsgOnboardParticipant) Clear(fd protoreflect.FieldDescri
|
|||||||
x.EthPayload = nil
|
x.EthPayload = nil
|
||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
x.EthSignature = ""
|
x.EthSignature = ""
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
x.Role = ""
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
x.KycId = ""
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -181,6 +205,12 @@ func (x *fastReflection_MsgOnboardParticipant) Get(descriptor protoreflect.Field
|
|||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
value := x.EthSignature
|
value := x.EthSignature
|
||||||
return protoreflect.ValueOfString(value)
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
value := x.Role
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
value := x.KycId
|
||||||
|
return protoreflect.ValueOfString(value)
|
||||||
default:
|
default:
|
||||||
if descriptor.IsExtension() {
|
if descriptor.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -207,6 +237,10 @@ func (x *fastReflection_MsgOnboardParticipant) Set(fd protoreflect.FieldDescript
|
|||||||
x.EthPayload = value.Message().Interface().(*EthPayload)
|
x.EthPayload = value.Message().Interface().(*EthPayload)
|
||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
x.EthSignature = value.Interface().(string)
|
x.EthSignature = value.Interface().(string)
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
x.Role = value.Interface().(string)
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
x.KycId = value.Interface().(string)
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -236,6 +270,10 @@ func (x *fastReflection_MsgOnboardParticipant) Mutable(fd protoreflect.FieldDesc
|
|||||||
panic(fmt.Errorf("field participant of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
panic(fmt.Errorf("field participant of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
panic(fmt.Errorf("field eth_signature of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
panic(fmt.Errorf("field eth_signature of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
panic(fmt.Errorf("field role of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
panic(fmt.Errorf("field kyc_id of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -256,6 +294,10 @@ func (x *fastReflection_MsgOnboardParticipant) NewField(fd protoreflect.FieldDes
|
|||||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||||
return protoreflect.ValueOfString("")
|
return protoreflect.ValueOfString("")
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
|
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||||
|
return protoreflect.ValueOfString("")
|
||||||
default:
|
default:
|
||||||
if fd.IsExtension() {
|
if fd.IsExtension() {
|
||||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
|
||||||
@ -337,6 +379,14 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + runtime.Sov(uint64(l))
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(x.Role)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + runtime.Sov(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(x.KycId)
|
||||||
|
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)
|
||||||
}
|
}
|
||||||
@ -366,6 +416,20 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
|
|||||||
i -= len(x.unknownFields)
|
i -= len(x.unknownFields)
|
||||||
copy(dAtA[i:], x.unknownFields)
|
copy(dAtA[i:], x.unknownFields)
|
||||||
}
|
}
|
||||||
|
if len(x.KycId) > 0 {
|
||||||
|
i -= len(x.KycId)
|
||||||
|
copy(dAtA[i:], x.KycId)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KycId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
if len(x.Role) > 0 {
|
||||||
|
i -= len(x.Role)
|
||||||
|
copy(dAtA[i:], x.Role)
|
||||||
|
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
if len(x.EthSignature) > 0 {
|
if len(x.EthSignature) > 0 {
|
||||||
i -= len(x.EthSignature)
|
i -= len(x.EthSignature)
|
||||||
copy(dAtA[i:], x.EthSignature)
|
copy(dAtA[i:], x.EthSignature)
|
||||||
@ -543,6 +607,70 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
|
|||||||
}
|
}
|
||||||
x.EthSignature = string(dAtA[iNdEx:postIndex])
|
x.EthSignature = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 5:
|
||||||
|
if wireType != 2 {
|
||||||
|
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KycId", 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.KycId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||||
@ -957,6 +1085,8 @@ type MsgOnboardParticipant struct {
|
|||||||
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||||
EthPayload *EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload,omitempty"`
|
EthPayload *EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload,omitempty"`
|
||||||
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
|
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
|
||||||
|
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
|
||||||
|
KycId string `protobuf:"bytes,5,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MsgOnboardParticipant) Reset() {
|
func (x *MsgOnboardParticipant) Reset() {
|
||||||
@ -1000,6 +1130,20 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *MsgOnboardParticipant) GetRole() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Role
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *MsgOnboardParticipant) GetKycId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.KycId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||||
// type.
|
// type.
|
||||||
type MsgOnboardParticipantResponse struct {
|
type MsgOnboardParticipantResponse struct {
|
||||||
@ -1041,7 +1185,7 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
|
|||||||
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23,
|
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23,
|
||||||
0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f,
|
0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f,
|
||||||
0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
|
0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x0a,
|
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x0a,
|
||||||
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
|
||||||
0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12,
|
0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12,
|
||||||
@ -1051,35 +1195,38 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
|
|||||||
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x50,
|
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x50,
|
||||||
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x73, 0x69,
|
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x73, 0x69,
|
||||||
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
|
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
|
||||||
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x10, 0x82, 0xe7, 0xb0,
|
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72,
|
||||||
0x2a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a,
|
0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12,
|
||||||
0x1d, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69,
|
0x15, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2,
|
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x70, 0x61, 0x72,
|
||||||
0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4f,
|
||||||
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e,
|
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||||
0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e,
|
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x01, 0x0a, 0x03, 0x4d, 0x73,
|
||||||
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
|
0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
|
||||||
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e,
|
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e,
|
||||||
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
|
||||||
0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
|
0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
|
||||||
0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4,
|
0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f,
|
||||||
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65,
|
||||||
0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27,
|
||||||
0xb0, 0x2a, 0x01, 0x42, 0xcc, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63,
|
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
|
||||||
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07,
|
0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74,
|
||||||
0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76,
|
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcc,
|
||||||
0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61,
|
0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
|
||||||
0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f,
|
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f,
|
||||||
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e,
|
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f,
|
||||||
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58,
|
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63,
|
||||||
0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
|
0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
||||||
0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62,
|
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
||||||
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72,
|
0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65,
|
||||||
0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c,
|
0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31,
|
||||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65,
|
0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
|
||||||
0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a,
|
0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62,
|
||||||
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||||
|
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f,
|
||||||
|
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
|
||||||
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -14,12 +14,14 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
md_Module protoreflect.MessageDescriptor
|
md_Module protoreflect.MessageDescriptor
|
||||||
|
fd_Module_authority protoreflect.FieldDescriptor
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
file_cerc_registry_module_v1_module_proto_init()
|
file_cerc_registry_module_v1_module_proto_init()
|
||||||
md_Module = File_cerc_registry_module_v1_module_proto.Messages().ByName("Module")
|
md_Module = File_cerc_registry_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.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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.registry.module.v1.Module.authority":
|
||||||
|
panic(fmt.Errorf("field authority of message cerc.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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.registry.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.registry.module.v1.Module"))
|
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.registry.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_registry_module_v1_module_proto_rawDescGZIP(), []int{0}
|
return file_cerc_registry_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *Module) GetAuthority() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Authority
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
var File_cerc_registry_module_v1_module_proto protoreflect.FileDescriptor
|
var File_cerc_registry_module_v1_module_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_cerc_registry_module_v1_module_proto_rawDesc = []byte{
|
var file_cerc_registry_module_v1_module_proto_rawDesc = []byte{
|
||||||
@ -419,26 +494,27 @@ var file_cerc_registry_module_v1_module_proto_rawDesc = []byte{
|
|||||||
0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a,
|
0x69, 0x73, 0x74, 0x72, 0x79, 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,
|
0x20, 0x63, 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,
|
0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x22, 0x38, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x2e, 0xba, 0xc0, 0x96,
|
0x6f, 0x22, 0x56, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x61,
|
||||||
0xda, 0x01, 0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f,
|
0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64,
|
0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x3a, 0x2e, 0xba, 0xc0, 0x96, 0xda, 0x01,
|
||||||
0x2f, 0x78, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x42, 0xeb, 0x01, 0x0a, 0x1b,
|
0x28, 0x0a, 0x26, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65,
|
||||||
0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
|
0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x78,
|
||||||
0x79, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64,
|
0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x42, 0xeb, 0x01, 0x0a, 0x1b, 0x63, 0x6f,
|
||||||
0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x2e,
|
0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
|
||||||
0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c,
|
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63,
|
0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64,
|
||||||
0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
|
0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63,
|
||||||
0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43,
|
0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x72,
|
||||||
0x52, 0x4d, 0xaa, 0x02, 0x17, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
|
0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76,
|
||||||
0x72, 0x79, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x17, 0x43,
|
0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x52, 0x4d,
|
||||||
0x65, 0x72, 0x63, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x4d, 0x6f, 0x64,
|
0xaa, 0x02, 0x17, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
|
||||||
0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, 0x65,
|
0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x17, 0x43, 0x65, 0x72,
|
||||||
0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31,
|
0x63, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||||
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x43,
|
0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x23, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x52, 0x65, 0x67, 0x69,
|
||||||
0x65, 0x72, 0x63, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x4d,
|
0x73, 0x74, 0x72, 0x79, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47,
|
||||||
0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1a, 0x43, 0x65, 0x72,
|
||||||
0x33,
|
0x63, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 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
@ -28,6 +28,7 @@ const (
|
|||||||
Query_LookupLrn_FullMethodName = "/cerc.registry.v1.Query/LookupLrn"
|
Query_LookupLrn_FullMethodName = "/cerc.registry.v1.Query/LookupLrn"
|
||||||
Query_ResolveLrn_FullMethodName = "/cerc.registry.v1.Query/ResolveLrn"
|
Query_ResolveLrn_FullMethodName = "/cerc.registry.v1.Query/ResolveLrn"
|
||||||
Query_GetRegistryModuleBalance_FullMethodName = "/cerc.registry.v1.Query/GetRegistryModuleBalance"
|
Query_GetRegistryModuleBalance_FullMethodName = "/cerc.registry.v1.Query/GetRegistryModuleBalance"
|
||||||
|
Query_Authorities_FullMethodName = "/cerc.registry.v1.Query/Authorities"
|
||||||
)
|
)
|
||||||
|
|
||||||
// QueryClient is the client API for Query service.
|
// QueryClient is the client API for Query service.
|
||||||
@ -52,6 +53,8 @@ type QueryClient interface {
|
|||||||
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
||||||
// Get registry module balance
|
// Get registry module balance
|
||||||
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||||
|
// Authorities queries all authorities
|
||||||
|
Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -143,6 +146,15 @@ func (c *queryClient) GetRegistryModuleBalance(ctx context.Context, in *QueryGet
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error) {
|
||||||
|
out := new(QueryAuthoritiesResponse)
|
||||||
|
err := c.cc.Invoke(ctx, Query_Authorities_FullMethodName, in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
// All implementations must embed UnimplementedQueryServer
|
// All implementations must embed UnimplementedQueryServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -165,6 +177,8 @@ type QueryServer interface {
|
|||||||
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
||||||
// Get registry module balance
|
// Get registry module balance
|
||||||
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||||
|
// Authorities queries all authorities
|
||||||
|
Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error)
|
||||||
mustEmbedUnimplementedQueryServer()
|
mustEmbedUnimplementedQueryServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -199,6 +213,9 @@ func (UnimplementedQueryServer) ResolveLrn(context.Context, *QueryResolveLrnRequ
|
|||||||
func (UnimplementedQueryServer) GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
func (UnimplementedQueryServer) GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
||||||
}
|
}
|
||||||
|
func (UnimplementedQueryServer) Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Authorities not implemented")
|
||||||
|
}
|
||||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||||
|
|
||||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||||
@ -374,6 +391,24 @@ func _Query_GetRegistryModuleBalance_Handler(srv interface{}, ctx context.Contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_Authorities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryAuthoritiesRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Authorities(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: Query_Authorities_FullMethodName,
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Authorities(ctx, req.(*QueryAuthoritiesRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
// Query_ServiceDesc is the grpc.ServiceDesc for Query 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)
|
||||||
@ -417,6 +452,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetRegistryModuleBalance",
|
MethodName: "GetRegistryModuleBalance",
|
||||||
Handler: _Query_GetRegistryModuleBalance_Handler,
|
Handler: _Query_GetRegistryModuleBalance_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Authorities",
|
||||||
|
Handler: _Query_Authorities_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/registry/v1/query.proto",
|
Metadata: "cerc/registry/v1/query.proto",
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -29,6 +29,7 @@ const (
|
|||||||
Msg_DeleteName_FullMethodName = "/cerc.registry.v1.Msg/DeleteName"
|
Msg_DeleteName_FullMethodName = "/cerc.registry.v1.Msg/DeleteName"
|
||||||
Msg_ReserveAuthority_FullMethodName = "/cerc.registry.v1.Msg/ReserveAuthority"
|
Msg_ReserveAuthority_FullMethodName = "/cerc.registry.v1.Msg/ReserveAuthority"
|
||||||
Msg_SetAuthorityBond_FullMethodName = "/cerc.registry.v1.Msg/SetAuthorityBond"
|
Msg_SetAuthorityBond_FullMethodName = "/cerc.registry.v1.Msg/SetAuthorityBond"
|
||||||
|
Msg_UpdateParams_FullMethodName = "/cerc.registry.v1.Msg/UpdateParams"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
@ -55,6 +56,9 @@ type MsgClient interface {
|
|||||||
ReserveAuthority(ctx context.Context, in *MsgReserveAuthority, opts ...grpc.CallOption) (*MsgReserveAuthorityResponse, error)
|
ReserveAuthority(ctx context.Context, in *MsgReserveAuthority, opts ...grpc.CallOption) (*MsgReserveAuthorityResponse, error)
|
||||||
// SetAuthorityBond
|
// SetAuthorityBond
|
||||||
SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBond, opts ...grpc.CallOption) (*MsgSetAuthorityBondResponse, error)
|
SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBond, opts ...grpc.CallOption) (*MsgSetAuthorityBondResponse, 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 {
|
||||||
@ -155,6 +159,15 @@ func (c *msgClient) SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBon
|
|||||||
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
|
||||||
@ -179,6 +192,9 @@ type MsgServer interface {
|
|||||||
ReserveAuthority(context.Context, *MsgReserveAuthority) (*MsgReserveAuthorityResponse, error)
|
ReserveAuthority(context.Context, *MsgReserveAuthority) (*MsgReserveAuthorityResponse, error)
|
||||||
// SetAuthorityBond
|
// SetAuthorityBond
|
||||||
SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error)
|
SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error)
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -216,6 +232,9 @@ func (UnimplementedMsgServer) ReserveAuthority(context.Context, *MsgReserveAutho
|
|||||||
func (UnimplementedMsgServer) SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error) {
|
func (UnimplementedMsgServer) SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SetAuthorityBond not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method SetAuthorityBond 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.
|
||||||
@ -409,6 +428,24 @@ func _Msg_SetAuthorityBond_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
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)
|
||||||
@ -456,6 +493,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "SetAuthorityBond",
|
MethodName: "SetAuthorityBond",
|
||||||
Handler: _Msg_SetAuthorityBond_Handler,
|
Handler: _Msg_SetAuthorityBond_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/registry/v1/tx.proto",
|
Metadata: "cerc/registry/v1/tx.proto",
|
||||||
|
16
app/app.go
16
app/app.go
@ -34,6 +34,12 @@ import (
|
|||||||
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
|
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
|
||||||
"github.com/cosmos/cosmos-sdk/x/genutil"
|
"github.com/cosmos/cosmos-sdk/x/genutil"
|
||||||
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/x/gov"
|
||||||
|
govclient "github.com/cosmos/cosmos-sdk/x/gov/client"
|
||||||
|
govkeeper "github.com/cosmos/cosmos-sdk/x/gov/keeper"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
paramsclient "github.com/cosmos/cosmos-sdk/x/params/client"
|
||||||
|
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||||
|
|
||||||
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
|
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
|
||||||
@ -48,6 +54,7 @@ import (
|
|||||||
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
|
||||||
|
_ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects
|
||||||
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -76,7 +83,9 @@ type LaconicApp struct {
|
|||||||
AccountKeeper authkeeper.AccountKeeper
|
AccountKeeper authkeeper.AccountKeeper
|
||||||
BankKeeper bankkeeper.Keeper
|
BankKeeper bankkeeper.Keeper
|
||||||
StakingKeeper *stakingkeeper.Keeper
|
StakingKeeper *stakingkeeper.Keeper
|
||||||
|
SlashingKeeper slashingkeeper.Keeper
|
||||||
DistrKeeper distrkeeper.Keeper
|
DistrKeeper distrkeeper.Keeper
|
||||||
|
GovKeeper *govkeeper.Keeper
|
||||||
CrisisKeeper *crisiskeeper.Keeper
|
CrisisKeeper *crisiskeeper.Keeper
|
||||||
ConsensusParamsKeeper consensuskeeper.Keeper
|
ConsensusParamsKeeper consensuskeeper.Keeper
|
||||||
|
|
||||||
@ -107,6 +116,11 @@ func AppConfig() depinject.Config {
|
|||||||
// supply custom module basics
|
// supply custom module basics
|
||||||
map[string]module.AppModuleBasic{
|
map[string]module.AppModuleBasic{
|
||||||
genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
|
genutiltypes.ModuleName: genutil.NewAppModuleBasic(genutiltypes.DefaultMessageValidator),
|
||||||
|
govtypes.ModuleName: gov.NewAppModuleBasic(
|
||||||
|
[]govclient.ProposalHandler{
|
||||||
|
paramsclient.ProposalHandler,
|
||||||
|
},
|
||||||
|
),
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
@ -142,7 +156,9 @@ func NewLaconicApp(
|
|||||||
&app.AccountKeeper,
|
&app.AccountKeeper,
|
||||||
&app.BankKeeper,
|
&app.BankKeeper,
|
||||||
&app.StakingKeeper,
|
&app.StakingKeeper,
|
||||||
|
&app.SlashingKeeper,
|
||||||
&app.DistrKeeper,
|
&app.DistrKeeper,
|
||||||
|
&app.GovKeeper,
|
||||||
&app.CrisisKeeper,
|
&app.CrisisKeeper,
|
||||||
&app.ConsensusParamsKeeper,
|
&app.ConsensusParamsKeeper,
|
||||||
&app.AuctionKeeper,
|
&app.AuctionKeeper,
|
||||||
|
14
app/app.yaml
14
app/app.yaml
@ -6,11 +6,11 @@ modules:
|
|||||||
# During begin block slashing happens after distr.BeginBlocker so that
|
# During begin block slashing happens after distr.BeginBlocker so that
|
||||||
# there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant.
|
# there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant.
|
||||||
# NOTE: staking module is required if HistoricalEntries param > 0
|
# NOTE: staking module is required if HistoricalEntries param > 0
|
||||||
begin_blockers: [distribution, staking]
|
begin_blockers: [distribution, slashing, staking]
|
||||||
end_blockers: [crisis, staking, auction, registry]
|
end_blockers: [crisis, gov, staking, auction, registry]
|
||||||
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
|
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
|
||||||
# NOTE: The genutils module must also occur after auth so that it can access the params from auth.
|
# NOTE: The genutils module must also occur after auth so that it can access the params from auth.
|
||||||
init_genesis: [auth, bank, distribution, staking, crisis, genutil, auction, bond, registry, onboarding]
|
init_genesis: [auth, bank, distribution, staking, slashing, gov, crisis, genutil, auction, bond, registry, onboarding]
|
||||||
override_store_keys:
|
override_store_keys:
|
||||||
- module_name: auth
|
- module_name: auth
|
||||||
kv_store_key: acc
|
kv_store_key: acc
|
||||||
@ -25,6 +25,8 @@ modules:
|
|||||||
permissions: [burner, staking]
|
permissions: [burner, staking]
|
||||||
- account: not_bonded_tokens_pool
|
- account: not_bonded_tokens_pool
|
||||||
permissions: [burner, staking]
|
permissions: [burner, staking]
|
||||||
|
- account: gov
|
||||||
|
permissions: [burner]
|
||||||
- account: auction
|
- account: auction
|
||||||
- account: auction_burn
|
- account: auction_burn
|
||||||
- account: bond
|
- account: bond
|
||||||
@ -39,6 +41,9 @@ modules:
|
|||||||
- name: staking
|
- name: staking
|
||||||
config:
|
config:
|
||||||
"@type": cosmos.staking.module.v1.Module
|
"@type": cosmos.staking.module.v1.Module
|
||||||
|
- name: slashing
|
||||||
|
config:
|
||||||
|
"@type": cosmos.slashing.module.v1.Module
|
||||||
- name: distribution
|
- name: distribution
|
||||||
config:
|
config:
|
||||||
"@type": cosmos.distribution.module.v1.Module
|
"@type": cosmos.distribution.module.v1.Module
|
||||||
@ -51,6 +56,9 @@ modules:
|
|||||||
- name: tx
|
- name: tx
|
||||||
config:
|
config:
|
||||||
"@type": cosmos.tx.config.v1.Config
|
"@type": cosmos.tx.config.v1.Config
|
||||||
|
- name: gov
|
||||||
|
config:
|
||||||
|
"@type": cosmos.gov.module.v1.Module
|
||||||
- name: crisis
|
- name: crisis
|
||||||
config:
|
config:
|
||||||
"@type": cosmos.crisis.module.v1.Module
|
"@type": cosmos.crisis.module.v1.Module
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/staking"
|
"github.com/cosmos/cosmos-sdk/x/staking"
|
||||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||||
)
|
)
|
||||||
@ -221,4 +222,22 @@ func (app *LaconicApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddr
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle slashing state. */
|
||||||
|
|
||||||
|
// reset start height on signing infos
|
||||||
|
err = app.SlashingKeeper.IterateValidatorSigningInfos(
|
||||||
|
ctx,
|
||||||
|
func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) {
|
||||||
|
info.StartHeight = 0
|
||||||
|
err = app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,9 +10,11 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
CoinUnit = "photon"
|
CoinUnit = "lnt"
|
||||||
|
BaseCoinUnit = "alnt"
|
||||||
|
LntExponent = 18
|
||||||
|
|
||||||
DefaultBondDenom = CoinUnit
|
DefaultBondDenom = BaseCoinUnit
|
||||||
|
|
||||||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
||||||
Bech32PrefixAccAddr = "laconic"
|
Bech32PrefixAccAddr = "laconic"
|
||||||
@ -41,6 +43,11 @@ func RegisterDenoms() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
err = sdk.RegisterDenom(BaseCoinUnit, math.LegacyNewDecWithPrec(1, LntExponent))
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func SetAddressPrefixes() {
|
func SetAddressPrefixes() {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ import (
|
|||||||
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
"github.com/cosmos/cosmos-sdk/crypto/keyring"
|
||||||
"github.com/cosmos/cosmos-sdk/server"
|
"github.com/cosmos/cosmos-sdk/server"
|
||||||
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
|
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/types/module"
|
"github.com/cosmos/cosmos-sdk/types/module"
|
||||||
"github.com/cosmos/cosmos-sdk/types/tx/signing"
|
"github.com/cosmos/cosmos-sdk/types/tx/signing"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
"github.com/cosmos/cosmos-sdk/x/auth/tx"
|
||||||
@ -98,7 +100,7 @@ func NewRootCmd() *cobra.Command {
|
|||||||
|
|
||||||
// overwrite the minimum gas price from the app configuration
|
// overwrite the minimum gas price from the app configuration
|
||||||
srvCfg := serverconfig.DefaultConfig()
|
srvCfg := serverconfig.DefaultConfig()
|
||||||
srvCfg.MinGasPrices = "0photon"
|
srvCfg.MinGasPrices = fmt.Sprintf("0%s", sdk.DefaultBondDenom)
|
||||||
|
|
||||||
// overwrite the block timeout
|
// overwrite the block timeout
|
||||||
cmtCfg := cmtcfg.DefaultConfig()
|
cmtCfg := cmtcfg.DefaultConfig()
|
||||||
|
3
go.mod
3
go.mod
@ -61,12 +61,14 @@ require (
|
|||||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||||
github.com/beorn7/perks v1.0.1 // indirect
|
github.com/beorn7/perks v1.0.1 // indirect
|
||||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
||||||
|
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
||||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||||
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
|
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
|
||||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
||||||
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
github.com/cenkalti/backoff/v4 v4.1.3 // indirect
|
||||||
github.com/cespare/xxhash v1.1.0 // indirect
|
github.com/cespare/xxhash v1.1.0 // indirect
|
||||||
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
||||||
|
github.com/chzyer/readline v1.5.1 // indirect
|
||||||
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
github.com/cockroachdb/apd/v2 v2.0.2 // indirect
|
||||||
github.com/cockroachdb/errors v1.11.1 // indirect
|
github.com/cockroachdb/errors v1.11.1 // indirect
|
||||||
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
|
||||||
@ -134,6 +136,7 @@ require (
|
|||||||
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
|
||||||
github.com/linxGnu/grocksdb v1.8.6 // indirect
|
github.com/linxGnu/grocksdb v1.8.6 // indirect
|
||||||
github.com/magiconair/properties v1.8.7 // indirect
|
github.com/magiconair/properties v1.8.7 // indirect
|
||||||
|
github.com/manifoldco/promptui v0.9.0 // indirect
|
||||||
github.com/mattn/go-colorable v0.1.13 // indirect
|
github.com/mattn/go-colorable v0.1.13 // indirect
|
||||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||||
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
|
||||||
|
5
go.sum
5
go.sum
@ -164,10 +164,14 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
|
|||||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||||
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
|
||||||
|
github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
|
||||||
|
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
|
||||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
|
||||||
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
|
github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
|
||||||
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
|
github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
|
||||||
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
|
||||||
|
github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
|
||||||
|
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
|
||||||
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
|
||||||
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
|
||||||
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE=
|
||||||
@ -1124,6 +1128,7 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
|
|||||||
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# cerc-io laconic gql
|
# cerc-io laconic gql
|
||||||
|
|
||||||
> Browser : http://localhost:9473 for gql
|
> Browser : <http://localhost:9473> for gql
|
||||||
|
|
||||||
## Run gqlgen
|
## Run gqlgen
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ On having some change in the GQL schema (for example: adding a new query) update
|
|||||||
go get github.com/99designs/gqlgen@v0.17.22
|
go get github.com/99designs/gqlgen@v0.17.22
|
||||||
|
|
||||||
# Generate bindings
|
# Generate bindings
|
||||||
# In gql
|
cd gql
|
||||||
go run github.com/99designs/gqlgen generate
|
go run github.com/99designs/gqlgen generate
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -385,4 +385,4 @@ Query participants:
|
|||||||
nitroAddress
|
nitroAddress
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -33,6 +33,8 @@ type Account {
|
|||||||
type Participant {
|
type Participant {
|
||||||
cosmosAddress: String! # Cosmos address of the participant who will be registered.
|
cosmosAddress: String! # Cosmos address of the participant who will be registered.
|
||||||
nitroAddress: String! # Nitro addresss of the participant who will be registered.
|
nitroAddress: String! # Nitro addresss of the participant who will be registered.
|
||||||
|
role: String! # Participant's role
|
||||||
|
kycId: String! # Participant's KYC receipt ID
|
||||||
}
|
}
|
||||||
|
|
||||||
# Value describes a DAG-JSON compatible value.
|
# Value describes a DAG-JSON compatible value.
|
||||||
@ -166,10 +168,14 @@ type Auction {
|
|||||||
commitFee: Coin! # Fee required to bid/participate in the auction.
|
commitFee: Coin! # Fee required to bid/participate in the auction.
|
||||||
revealFee: Coin! # Reveal fee (paid back to bidders only if they unseal/reveal the bid).
|
revealFee: Coin! # Reveal fee (paid back to bidders only if they unseal/reveal the bid).
|
||||||
minimumBid: Coin! # Minimum bid amount.
|
minimumBid: Coin! # Minimum bid amount.
|
||||||
winnerAddress: String! # Winner address.
|
winnerAddresses: [String!]! # Winner address.
|
||||||
winnerBid: Coin! # The winning bid amount.
|
winnerBids: [Coin!]! # The winning bid amount.
|
||||||
winnerPrice: Coin! # The price that the winner actually pays (2nd highest bid).
|
winnerPrice: Coin! # The price that the winner actually pays (2nd highest bid).
|
||||||
bids: [AuctionBid] # Bids make in the auction.
|
maxPrice: Coin! # Max bid amount for service provider auction.
|
||||||
|
kind: String! # Auction kind.
|
||||||
|
numProviders: Int # Number of service providers
|
||||||
|
fundsReleased: Boolean! # Whether funds have been released to providers
|
||||||
|
bids: [AuctionBid!]! # Bids made in the auction.
|
||||||
}
|
}
|
||||||
|
|
||||||
# Record defines the basic properties of an entity in the graph database.
|
# Record defines the basic properties of an entity in the graph database.
|
||||||
@ -195,6 +201,11 @@ type AuthorityRecord {
|
|||||||
auction: Auction # Authority auction.
|
auction: Auction # Authority auction.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Authority {
|
||||||
|
name: String!
|
||||||
|
entry: AuthorityRecord!
|
||||||
|
}
|
||||||
|
|
||||||
# Name record entry, created at a particular height.
|
# Name record entry, created at a particular height.
|
||||||
type NameRecordEntry {
|
type NameRecordEntry {
|
||||||
id: String! # Target record ID.
|
id: String! # Target record ID.
|
||||||
@ -220,7 +231,7 @@ type Query {
|
|||||||
getBondsByIds(ids: [String!]): [Bond]
|
getBondsByIds(ids: [String!]): [Bond]
|
||||||
|
|
||||||
# Query bonds.
|
# Query bonds.
|
||||||
queryBonds(attributes: [KeyValueInput!]): [Bond]
|
queryBonds: [Bond]
|
||||||
|
|
||||||
# Query bonds by owner.
|
# Query bonds by owner.
|
||||||
queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds]
|
queryBondsByOwner(ownerAddresses: [String!]): [OwnerBonds]
|
||||||
@ -239,12 +250,21 @@ type Query {
|
|||||||
|
|
||||||
# Whether to query all records, not just named ones (false by default).
|
# Whether to query all records, not just named ones (false by default).
|
||||||
all: Boolean
|
all: Boolean
|
||||||
|
|
||||||
|
# Pagination limit
|
||||||
|
limit: Int
|
||||||
|
|
||||||
|
# Pagination offset
|
||||||
|
offset: Int
|
||||||
): [Record]
|
): [Record]
|
||||||
|
|
||||||
#
|
#
|
||||||
# Naming API.
|
# Naming API.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Get authorities list.
|
||||||
|
getAuthorities(owner: String): [Authority]!
|
||||||
|
|
||||||
# Lookup authority information.
|
# Lookup authority information.
|
||||||
lookupAuthorities(names: [String!]): [AuthorityRecord]!
|
lookupAuthorities(names: [String!]): [AuthorityRecord]!
|
||||||
|
|
||||||
@ -263,4 +283,6 @@ type Query {
|
|||||||
|
|
||||||
# Query participants.
|
# Query participants.
|
||||||
getParticipants: [Participant]!
|
getParticipants: [Participant]!
|
||||||
|
getParticipantByAddress(address: String!): Participant!
|
||||||
|
getParticipantByNitroAddress(nitroAddress: String!): Participant!
|
||||||
}
|
}
|
||||||
|
1295
gql/generated.go
1295
gql/generated.go
File diff suppressed because it is too large
Load Diff
@ -26,19 +26,23 @@ type Attribute struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Auction struct {
|
type Auction struct {
|
||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
OwnerAddress string `json:"ownerAddress"`
|
OwnerAddress string `json:"ownerAddress"`
|
||||||
CreateTime string `json:"createTime"`
|
CreateTime string `json:"createTime"`
|
||||||
CommitsEndTime string `json:"commitsEndTime"`
|
CommitsEndTime string `json:"commitsEndTime"`
|
||||||
RevealsEndTime string `json:"revealsEndTime"`
|
RevealsEndTime string `json:"revealsEndTime"`
|
||||||
CommitFee *Coin `json:"commitFee"`
|
CommitFee *Coin `json:"commitFee"`
|
||||||
RevealFee *Coin `json:"revealFee"`
|
RevealFee *Coin `json:"revealFee"`
|
||||||
MinimumBid *Coin `json:"minimumBid"`
|
MinimumBid *Coin `json:"minimumBid"`
|
||||||
WinnerAddress string `json:"winnerAddress"`
|
WinnerAddresses []string `json:"winnerAddresses"`
|
||||||
WinnerBid *Coin `json:"winnerBid"`
|
WinnerBids []*Coin `json:"winnerBids"`
|
||||||
WinnerPrice *Coin `json:"winnerPrice"`
|
WinnerPrice *Coin `json:"winnerPrice"`
|
||||||
Bids []*AuctionBid `json:"bids"`
|
MaxPrice *Coin `json:"maxPrice"`
|
||||||
|
Kind string `json:"kind"`
|
||||||
|
NumProviders *int `json:"numProviders"`
|
||||||
|
FundsReleased bool `json:"fundsReleased"`
|
||||||
|
Bids []*AuctionBid `json:"bids"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type AuctionBid struct {
|
type AuctionBid struct {
|
||||||
@ -52,6 +56,11 @@ type AuctionBid struct {
|
|||||||
BidAmount *Coin `json:"bidAmount"`
|
BidAmount *Coin `json:"bidAmount"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Authority struct {
|
||||||
|
Name string `json:"name"`
|
||||||
|
Entry *AuthorityRecord `json:"entry"`
|
||||||
|
}
|
||||||
|
|
||||||
type AuthorityRecord struct {
|
type AuthorityRecord struct {
|
||||||
OwnerAddress string `json:"ownerAddress"`
|
OwnerAddress string `json:"ownerAddress"`
|
||||||
OwnerPublicKey string `json:"ownerPublicKey"`
|
OwnerPublicKey string `json:"ownerPublicKey"`
|
||||||
@ -138,6 +147,8 @@ type OwnerBonds struct {
|
|||||||
type Participant struct {
|
type Participant struct {
|
||||||
CosmosAddress string `json:"cosmosAddress"`
|
CosmosAddress string `json:"cosmosAddress"`
|
||||||
NitroAddress string `json:"nitroAddress"`
|
NitroAddress string `json:"nitroAddress"`
|
||||||
|
Role string `json:"role"`
|
||||||
|
KycID string `json:"kycId"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type PeerInfo struct {
|
type PeerInfo struct {
|
||||||
|
121
gql/resolver.go
121
gql/resolver.go
@ -8,6 +8,7 @@ import (
|
|||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
types "github.com/cosmos/cosmos-sdk/types"
|
types "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/query"
|
||||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||||
|
|
||||||
@ -23,6 +24,9 @@ const DefaultLogNumLines = 50
|
|||||||
// MaxLogNumLines is the max number of log lines that can be tailed.
|
// MaxLogNumLines is the max number of log lines that can be tailed.
|
||||||
const MaxLogNumLines = 1000
|
const MaxLogNumLines = 1000
|
||||||
|
|
||||||
|
// Whether to use default page limit when pagination args are not passed.
|
||||||
|
const UseDefaultPagination = false
|
||||||
|
|
||||||
type Resolver struct {
|
type Resolver struct {
|
||||||
ctx client.Context
|
ctx client.Context
|
||||||
logFile string
|
logFile string
|
||||||
@ -35,6 +39,36 @@ func (r *Resolver) Query() QueryResolver {
|
|||||||
|
|
||||||
type queryResolver struct{ *Resolver }
|
type queryResolver struct{ *Resolver }
|
||||||
|
|
||||||
|
func (q queryResolver) GetAuthorities(ctx context.Context, owner *string) ([]*Authority, error) {
|
||||||
|
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||||
|
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
||||||
|
|
||||||
|
authoritiesReq := ®istrytypes.QueryAuthoritiesRequest{}
|
||||||
|
if owner != nil {
|
||||||
|
authoritiesReq.Owner = *owner
|
||||||
|
}
|
||||||
|
|
||||||
|
authoritiesResp, err := nsQueryClient.Authorities(ctx, authoritiesReq)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
authorities := make([]*Authority, len(authoritiesResp.GetAuthorities()))
|
||||||
|
for i, a := range authoritiesResp.Authorities {
|
||||||
|
entry, err := getAuthorityRecord(*a.Entry, auctionQueryClient)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
authorities[i] = &Authority{
|
||||||
|
Name: a.Name,
|
||||||
|
Entry: entry,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return authorities, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error) {
|
func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error) {
|
||||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||||
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
||||||
@ -52,29 +86,11 @@ func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([
|
|||||||
}
|
}
|
||||||
|
|
||||||
nameAuthority := res.GetNameAuthority()
|
nameAuthority := res.GetNameAuthority()
|
||||||
gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
|
gqlNameAuthorityRecord, err := getAuthorityRecord(nameAuthority, auctionQueryClient)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if nameAuthority.AuctionId != "" {
|
|
||||||
auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.QueryGetAuctionRequest{Id: nameAuthority.GetAuctionId()})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
bidsResp, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.QueryGetBidsRequest{AuctionId: nameAuthority.GetAuctionId()})
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
gqlAuctionRecord, err := GetGQLAuction(auctionResp.GetAuction(), bidsResp.GetBids())
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
gqlNameAuthorityRecord.Auction = gqlAuctionRecord
|
|
||||||
}
|
|
||||||
|
|
||||||
gqlResponse = append(gqlResponse, gqlNameAuthorityRecord)
|
gqlResponse = append(gqlResponse, gqlNameAuthorityRecord)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -124,14 +140,34 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name
|
|||||||
return gqlResponse, nil
|
return gqlResponse, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error) {
|
func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool, limit *int, offset *int) ([]*Record, error) {
|
||||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||||
|
|
||||||
|
var pagination *query.PageRequest
|
||||||
|
|
||||||
|
// Use defaults only if limit and offset not provided
|
||||||
|
// and UseDefaultPagination is true
|
||||||
|
if limit == nil && offset == nil {
|
||||||
|
if UseDefaultPagination {
|
||||||
|
pagination = &query.PageRequest{}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
pagination = &query.PageRequest{}
|
||||||
|
|
||||||
|
if limit != nil {
|
||||||
|
pagination.Limit = uint64(*limit)
|
||||||
|
}
|
||||||
|
if offset != nil {
|
||||||
|
pagination.Offset = uint64(*offset)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
res, err := nsQueryClient.Records(
|
res, err := nsQueryClient.Records(
|
||||||
context.Background(),
|
context.Background(),
|
||||||
®istrytypes.QueryRecordsRequest{
|
®istrytypes.QueryRecordsRequest{
|
||||||
Attributes: toRPCAttributes(attributes),
|
Attributes: toRPCAttributes(attributes),
|
||||||
All: (all != nil && *all),
|
All: (all != nil && *all),
|
||||||
|
Pagination: pagination,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -284,7 +320,7 @@ func (q *queryResolver) GetBond(ctx context.Context, id string) (*Bond, error) {
|
|||||||
return getGQLBond(bondResp.GetBond())
|
return getGQLBond(bondResp.GetBond())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (q queryResolver) QueryBonds(ctx context.Context, attributes []*KeyValueInput) ([]*Bond, error) {
|
func (q queryResolver) QueryBonds(ctx context.Context) ([]*Bond, error) {
|
||||||
bondQueryClient := bondtypes.NewQueryClient(q.ctx)
|
bondQueryClient := bondtypes.NewQueryClient(q.ctx)
|
||||||
bonds, err := bondQueryClient.Bonds(context.Background(), &bondtypes.QueryBondsRequest{})
|
bonds, err := bondQueryClient.Bonds(context.Background(), &bondtypes.QueryBondsRequest{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -373,8 +409,51 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
|
|||||||
participants[i] = &Participant{
|
participants[i] = &Participant{
|
||||||
CosmosAddress: p.CosmosAddress,
|
CosmosAddress: p.CosmosAddress,
|
||||||
NitroAddress: p.NitroAddress,
|
NitroAddress: p.NitroAddress,
|
||||||
|
Role: p.Role,
|
||||||
|
KycID: p.KycId,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return participants, nil
|
return participants, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (q queryResolver) GetParticipantByAddress(ctx context.Context, address string) (*Participant, error) {
|
||||||
|
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
|
||||||
|
participantResp, err := onboardingQueryClient.GetParticipantByAddress(ctx, &onboardingTypes.QueryGetParticipantByAddressRequest{Address: address})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
p := participantResp.Participant
|
||||||
|
participant := &Participant{
|
||||||
|
CosmosAddress: p.CosmosAddress,
|
||||||
|
NitroAddress: p.NitroAddress,
|
||||||
|
Role: p.Role,
|
||||||
|
KycID: p.KycId,
|
||||||
|
}
|
||||||
|
|
||||||
|
return participant, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (q queryResolver) GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error) {
|
||||||
|
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
|
||||||
|
participantResp, err := onboardingQueryClient.GetParticipantByNitroAddress(
|
||||||
|
ctx,
|
||||||
|
&onboardingTypes.QueryGetParticipantByNitroAddressRequest{
|
||||||
|
NitroAddress: nitroAddress,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
p := participantResp.Participant
|
||||||
|
participant := &Participant{
|
||||||
|
CosmosAddress: p.CosmosAddress,
|
||||||
|
NitroAddress: p.NitroAddress,
|
||||||
|
Role: p.Role,
|
||||||
|
KycID: p.KycId,
|
||||||
|
}
|
||||||
|
|
||||||
|
return participant, nil
|
||||||
|
}
|
||||||
|
57
gql/util.go
57
gql/util.go
@ -232,19 +232,25 @@ func GetGQLAuction(auction *auctiontypes.Auction, bids []*auctiontypes.Bid) (*Au
|
|||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
numProviders := int(auction.NumProviders)
|
||||||
|
|
||||||
gqlAuction := Auction{
|
gqlAuction := Auction{
|
||||||
ID: auction.Id,
|
ID: auction.Id,
|
||||||
Status: auction.Status,
|
Status: auction.Status,
|
||||||
OwnerAddress: auction.OwnerAddress,
|
OwnerAddress: auction.OwnerAddress,
|
||||||
CreateTime: auction.GetCreateTime(),
|
CreateTime: auction.GetCreateTime(),
|
||||||
CommitsEndTime: auction.GetCommitsEndTime(),
|
CommitsEndTime: auction.GetCommitsEndTime(),
|
||||||
RevealsEndTime: auction.GetRevealsEndTime(),
|
RevealsEndTime: auction.GetRevealsEndTime(),
|
||||||
CommitFee: getGQLCoin(auction.CommitFee),
|
CommitFee: getGQLCoin(auction.CommitFee),
|
||||||
RevealFee: getGQLCoin(auction.RevealFee),
|
RevealFee: getGQLCoin(auction.RevealFee),
|
||||||
MinimumBid: getGQLCoin(auction.MinimumBid),
|
MinimumBid: getGQLCoin(auction.MinimumBid),
|
||||||
WinnerAddress: auction.WinnerAddress,
|
WinnerAddresses: auction.WinnerAddresses,
|
||||||
WinnerBid: getGQLCoin(auction.WinningBid),
|
WinnerBids: getGQLCoins(auction.WinningBids),
|
||||||
WinnerPrice: getGQLCoin(auction.WinningPrice),
|
WinnerPrice: getGQLCoin(auction.WinningPrice),
|
||||||
|
MaxPrice: getGQLCoin(auction.MaxPrice),
|
||||||
|
Kind: auction.Kind,
|
||||||
|
NumProviders: &numProviders,
|
||||||
|
FundsReleased: auction.FundsReleased,
|
||||||
}
|
}
|
||||||
|
|
||||||
auctionBids := make([]*AuctionBid, len(bids))
|
auctionBids := make([]*AuctionBid, len(bids))
|
||||||
@ -303,3 +309,30 @@ func toRPCAttributes(attrs []*KeyValueInput) []*registrytypes.QueryRecordsReques
|
|||||||
|
|
||||||
return kvPairs
|
return kvPairs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func getAuthorityRecord(nameAuthority registrytypes.NameAuthority, auctionQueryClient auctiontypes.QueryClient) (*AuthorityRecord, error) {
|
||||||
|
gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if nameAuthority.AuctionId != "" {
|
||||||
|
auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.QueryGetAuctionRequest{Id: nameAuthority.GetAuctionId()})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
bidsResp, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.QueryGetBidsRequest{AuctionId: nameAuthority.GetAuctionId()})
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
gqlAuctionRecord, err := GetGQLAuction(auctionResp.GetAuction(), bidsResp.GetBids())
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
gqlNameAuthorityRecord.Auction = gqlAuctionRecord
|
||||||
|
}
|
||||||
|
|
||||||
|
return gqlNameAuthorityRecord, nil
|
||||||
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -3,76 +3,44 @@ syntax = "proto3";
|
|||||||
package cerc.auction.v1;
|
package cerc.auction.v1;
|
||||||
|
|
||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "google/protobuf/duration.proto";
|
|
||||||
import "google/protobuf/timestamp.proto";
|
import "google/protobuf/timestamp.proto";
|
||||||
import "cosmos/base/v1beta1/coin.proto";
|
import "cosmos/base/v1beta1/coin.proto";
|
||||||
|
|
||||||
option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/auction";
|
||||||
|
|
||||||
// Params defines the auction module parameters
|
// Params defines the auction module parameters
|
||||||
message Params {
|
message Params {}
|
||||||
// Write custom stringer method
|
|
||||||
option (gogoproto.goproto_stringer) = false;
|
|
||||||
|
|
||||||
// Duration of the commits phase in seconds
|
|
||||||
google.protobuf.Duration commits_duration = 1 [
|
|
||||||
(gogoproto.nullable) = false,
|
|
||||||
(gogoproto.stdduration) = true,
|
|
||||||
(gogoproto.moretags) = "json:\"commits_duration\" yaml:\"commits_duration\""
|
|
||||||
];
|
|
||||||
|
|
||||||
// Duration of the reveals phase in seconds
|
|
||||||
google.protobuf.Duration reveals_duration = 2 [
|
|
||||||
(gogoproto.nullable) = false,
|
|
||||||
(gogoproto.stdduration) = true,
|
|
||||||
(gogoproto.moretags) = "json:\"reveals_duration\" yaml:\"reveals_duration\""
|
|
||||||
];
|
|
||||||
|
|
||||||
// Commit fees
|
|
||||||
cosmos.base.v1beta1.Coin commit_fee = 3 [
|
|
||||||
(gogoproto.nullable) = false,
|
|
||||||
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
|
||||||
];
|
|
||||||
|
|
||||||
// Reveal fees
|
|
||||||
cosmos.base.v1beta1.Coin reveal_fee = 4 [
|
|
||||||
(gogoproto.nullable) = false,
|
|
||||||
(gogoproto.moretags) = "json:\"reveal_fee\" yaml:\"reveal_fee\""
|
|
||||||
];
|
|
||||||
|
|
||||||
// Minimum acceptable bid amount
|
|
||||||
cosmos.base.v1beta1.Coin minimum_bid = 5 [
|
|
||||||
(gogoproto.nullable) = false,
|
|
||||||
(gogoproto.moretags) = "json:\"minimum_bid\" yaml:\"minimum_bid\""
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Auction represents a sealed-bid on-chain auction
|
// Auction represents a sealed-bid on-chain auction
|
||||||
message Auction {
|
message Auction {
|
||||||
option (gogoproto.goproto_getters) = false;
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
string id = 1;
|
string id = 1;
|
||||||
string status = 2;
|
|
||||||
|
// Auction kind (vickrey | provider)
|
||||||
|
string kind = 2 [ (gogoproto.moretags) = "json:\"kind\" yaml:\"kind\"" ];
|
||||||
|
|
||||||
|
string status = 3;
|
||||||
|
|
||||||
// Address of the creator of the auction
|
// Address of the creator of the auction
|
||||||
string owner_address = 3;
|
string owner_address = 4;
|
||||||
|
|
||||||
// Timestamp at which the auction was created
|
// Timestamp at which the auction was created
|
||||||
google.protobuf.Timestamp create_time = 4 [
|
google.protobuf.Timestamp create_time = 5 [
|
||||||
(gogoproto.stdtime) = true,
|
(gogoproto.stdtime) = true,
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
|
(gogoproto.moretags) = "json:\"create_time\" yaml:\"create_time\""
|
||||||
];
|
];
|
||||||
|
|
||||||
// Timestamp at which the commits phase concluded
|
// Timestamp at which the commits phase concluded
|
||||||
google.protobuf.Timestamp commits_end_time = 5 [
|
google.protobuf.Timestamp commits_end_time = 6 [
|
||||||
(gogoproto.stdtime) = true,
|
(gogoproto.stdtime) = true,
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
|
(gogoproto.moretags) = "json:\"commits_end_time\" yaml:\"commits_end_time\""
|
||||||
];
|
];
|
||||||
|
|
||||||
// Timestamp at which the reveals phase concluded
|
// Timestamp at which the reveals phase concluded
|
||||||
google.protobuf.Timestamp reveals_end_time = 6 [
|
google.protobuf.Timestamp reveals_end_time = 7 [
|
||||||
(gogoproto.stdtime) = true,
|
(gogoproto.stdtime) = true,
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
|
(gogoproto.moretags) = "json:\"reveals_end_time\" yaml:\"reveals_end_time\""
|
||||||
@ -80,35 +48,58 @@ message Auction {
|
|||||||
|
|
||||||
// Commit and reveal fees must both be paid when committing a bid
|
// Commit and reveal fees must both be paid when committing a bid
|
||||||
// Reveal fee is returned only if the bid is revealed
|
// Reveal fee is returned only if the bid is revealed
|
||||||
cosmos.base.v1beta1.Coin commit_fee = 7 [
|
cosmos.base.v1beta1.Coin commit_fee = 8 [
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
(gogoproto.moretags) = "json:\"commit_fee\" yaml:\"commit_fee\""
|
||||||
];
|
];
|
||||||
cosmos.base.v1beta1.Coin reveal_fee = 8 [
|
cosmos.base.v1beta1.Coin reveal_fee = 9 [
|
||||||
(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 a valid commit
|
// Minimum acceptable bid amount for a valid commit
|
||||||
cosmos.base.v1beta1.Coin minimum_bid = 9 [
|
// Only applicable in vickrey auctions
|
||||||
|
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\""
|
||||||
];
|
];
|
||||||
|
|
||||||
// Address of the winner
|
// Addresses of the winners
|
||||||
string winner_address = 10;
|
// (single winner for vickrey auction)
|
||||||
|
// (multiple winners for provider auctions)
|
||||||
|
repeated string winner_addresses = 11;
|
||||||
|
|
||||||
// Winning bid, i.e., the highest bid
|
// Winning bids, i.e. the best bids
|
||||||
cosmos.base.v1beta1.Coin winning_bid = 11 [
|
repeated cosmos.base.v1beta1.Coin winning_bids = 12 [
|
||||||
(gogoproto.nullable) = false,
|
(gogoproto.nullable) = false,
|
||||||
(gogoproto.moretags) = "json:\"winning_bid\" yaml:\"winning_bid\""
|
(gogoproto.moretags) = "json:\"winning_bids\" yaml:\"winning_bids\""
|
||||||
];
|
];
|
||||||
|
|
||||||
// Amount the winner pays, i.e. the second highest auction
|
// Auction winning price
|
||||||
cosmos.base.v1beta1.Coin winning_price = 12 [
|
// 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 [
|
||||||
(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 a valid commit
|
||||||
|
// Only applicable in provider auctions
|
||||||
|
cosmos.base.v1beta1.Coin max_price = 14 [
|
||||||
|
(gogoproto.nullable) = false,
|
||||||
|
(gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\""
|
||||||
|
];
|
||||||
|
|
||||||
|
// Number of desired providers (num of auction winners)
|
||||||
|
// Only applicable in provider auctions
|
||||||
|
int32 num_providers = 15;
|
||||||
|
|
||||||
|
// Whether funds have been released to providers
|
||||||
|
// Only applicable in provider auctions
|
||||||
|
bool funds_released = 16
|
||||||
|
[ (gogoproto.moretags) =
|
||||||
|
"json:\"funds_released\" yaml:\"funds_released\"" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auctions represent all the auctions in the module
|
// Auctions represent all the auctions in the module
|
||||||
|
@ -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,15 @@ 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);
|
||||||
|
|
||||||
|
// ReleaseFunds is the command for paying the winners of provider auctions
|
||||||
|
rpc ReleaseFunds(MsgReleaseFunds) returns (MsgReleaseFundsResponse) {
|
||||||
|
option (google.api.http).post = "/cerc/auction/v1/release_funds";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgCreateAuction defines a create auction message
|
// MsgCreateAuction defines a create auction message
|
||||||
@ -36,41 +46,56 @@ 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
|
// 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\"" ];
|
cosmos.base.v1beta1.Coin max_price = 8 [
|
||||||
|
(gogoproto.nullable) = false,
|
||||||
|
(gogoproto.moretags) = "json:\"max_price\" yaml:\"max_price\""
|
||||||
|
];
|
||||||
|
|
||||||
|
// Number of desired providers (num of auction winners)
|
||||||
|
// Only applicable in provider auctions
|
||||||
|
int32 num_providers = 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgCreateAuctionResponse returns the details of the created auction
|
// MsgCreateAuctionResponse returns the details of the created auction
|
||||||
@ -134,3 +159,45 @@ 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 {};
|
||||||
|
|
||||||
|
// ReleaseFunds defines the message to pay the winners of provider auctions
|
||||||
|
message MsgReleaseFunds {
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
option (cosmos.msg.v1.signer) = "signer";
|
||||||
|
|
||||||
|
// Auction id
|
||||||
|
string auction_id = 1
|
||||||
|
[ (gogoproto.moretags) = "json:\"auction_id\" yaml:\"auction_id\"" ];
|
||||||
|
|
||||||
|
// Address of the signer
|
||||||
|
string signer = 2
|
||||||
|
[ (gogoproto.moretags) = "json:\"signer\" yaml:\"signer\"" ];
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgReleaseFundsResponse returns the state of the auction after releasing the
|
||||||
|
// funds
|
||||||
|
message MsgReleaseFundsResponse {
|
||||||
|
option (gogoproto.goproto_getters) = false;
|
||||||
|
|
||||||
|
// Auction details
|
||||||
|
Auction auction = 1
|
||||||
|
[ (gogoproto.moretags) = "json:\"auction\" yaml:\"auction\"" ];
|
||||||
|
}
|
||||||
|
@ -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/bond"
|
go_import : "git.vdb.to/cerc-io/laconicd/x/bond"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// authority defines the custom module authority. If not set, defaults to the
|
||||||
|
// governance module.
|
||||||
|
string authority = 2;
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,8 @@ import "cosmos/msg/v1/msg.proto";
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
import "cosmos/base/v1beta1/coin.proto";
|
import "cosmos/base/v1beta1/coin.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
import "cerc/bond/v1/bond.proto";
|
||||||
|
|
||||||
option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/bond";
|
||||||
|
|
||||||
@ -32,6 +34,10 @@ service Msg {
|
|||||||
rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse) {
|
rpc CancelBond(MsgCancelBond) returns (MsgCancelBondResponse) {
|
||||||
option (google.api.http).post = "/cerc/bond/v1/cancel_bond";
|
option (google.api.http).post = "/cerc/bond/v1/cancel_bond";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgCreateBond defines a SDK message for creating a new bond.
|
// MsgCreateBond defines a SDK message for creating a new bond.
|
||||||
@ -91,3 +97,21 @@ message MsgCancelBond {
|
|||||||
|
|
||||||
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
// MsgCancelBondResponse defines the Msg/CancelBond response type.
|
||||||
message MsgCancelBondResponse {}
|
message MsgCancelBondResponse {}
|
||||||
|
|
||||||
|
// 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/bond 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 {};
|
||||||
|
@ -16,14 +16,24 @@ message Params {
|
|||||||
// Participant defines the data that will be stored for each enrolled
|
// Participant defines the data that will be stored for each enrolled
|
||||||
// participant
|
// participant
|
||||||
message Participant {
|
message Participant {
|
||||||
|
// participant's cosmos (laconic) address
|
||||||
string cosmos_address = 1
|
string cosmos_address = 1
|
||||||
[ (gogoproto.moretags) =
|
[ (gogoproto.moretags) =
|
||||||
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
|
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
|
||||||
|
|
||||||
|
// participant's Nitro address
|
||||||
string nitro_address = 2
|
string nitro_address = 2
|
||||||
[ (gogoproto.moretags) =
|
[ (gogoproto.moretags) =
|
||||||
"json:\"nitro_address\" yaml:\"nitro_address\"" ];
|
"json:\"nitro_address\" yaml:\"nitro_address\"" ];
|
||||||
|
|
||||||
|
// participant's role (participant | validator)
|
||||||
|
string role = 3 [ (gogoproto.moretags) = "json:\"role\" yaml:\"role\"" ];
|
||||||
|
|
||||||
|
// participant's KYC receipt ID
|
||||||
|
string kyc_id = 4
|
||||||
|
[ (gogoproto.moretags) = "json:\"kyc_id\" yaml:\"kyc_id\"" ];
|
||||||
}
|
}
|
||||||
|
|
||||||
// EthPayload defines the payload that is signed by the ethereum private key
|
// EthPayload defines the payload that is signed by the ethereum private key
|
||||||
message EthPayload {
|
message EthPayload {
|
||||||
string address = 1
|
string address = 1
|
||||||
|
@ -16,6 +16,19 @@ service Query {
|
|||||||
returns (QueryParticipantsResponse) {
|
returns (QueryParticipantsResponse) {
|
||||||
option (google.api.http).get = "/cerc/onboarding/v1/participants";
|
option (google.api.http).get = "/cerc/onboarding/v1/participants";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||||
|
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
|
||||||
|
returns (QueryGetParticipantByAddressResponse) {
|
||||||
|
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||||
|
rpc GetParticipantByNitroAddress(QueryGetParticipantByNitroAddressRequest)
|
||||||
|
returns (QueryGetParticipantByNitroAddressResponse) {
|
||||||
|
option (google.api.http).get =
|
||||||
|
"/cerc/onboarding/v1/participants/{nitro_address}";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryParticipantsRequest queries participants
|
// QueryParticipantsRequest queries participants
|
||||||
@ -24,7 +37,7 @@ message QueryParticipantsRequest {
|
|||||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryParticipantsResponse is response type for get the participants
|
// QueryParticipantsResponse is response type for querying the participants
|
||||||
message QueryParticipantsResponse {
|
message QueryParticipantsResponse {
|
||||||
repeated Participant participants = 1
|
repeated Participant participants = 1
|
||||||
[ (gogoproto.moretags) = "json:\"participants\" yaml:\"participants\"" ];
|
[ (gogoproto.moretags) = "json:\"participants\" yaml:\"participants\"" ];
|
||||||
@ -32,3 +45,31 @@ message QueryParticipantsResponse {
|
|||||||
// pagination defines the pagination in the response.
|
// pagination defines the pagination in the response.
|
||||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByAddressRequest queries participant by the laconic
|
||||||
|
// address
|
||||||
|
message QueryGetParticipantByAddressRequest {
|
||||||
|
// Laconic address
|
||||||
|
string address = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByAddressResponse is response type for querying
|
||||||
|
// participant by the laconic address
|
||||||
|
message QueryGetParticipantByAddressResponse {
|
||||||
|
// Participant details
|
||||||
|
Participant participant = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
|
||||||
|
// address
|
||||||
|
message QueryGetParticipantByNitroAddressRequest {
|
||||||
|
// Nitro address
|
||||||
|
string nitro_address = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByNitroAddressResponse is response type for querying
|
||||||
|
// participant by the nitro address
|
||||||
|
message QueryGetParticipantByNitroAddressResponse {
|
||||||
|
// Participant details
|
||||||
|
Participant participant = 1;
|
||||||
|
}
|
||||||
|
@ -28,6 +28,8 @@ message MsgOnboardParticipant {
|
|||||||
string participant = 1;
|
string participant = 1;
|
||||||
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
|
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
|
||||||
string eth_signature = 3;
|
string eth_signature = 3;
|
||||||
|
string role = 4;
|
||||||
|
string kyc_id = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||||
|
@ -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/registry"
|
go_import : "git.vdb.to/cerc-io/laconicd/x/registry"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// authority defines the custom module authority. If not set, defaults to the
|
||||||
|
// governance module.
|
||||||
|
string authority = 2;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,11 @@ service Query {
|
|||||||
returns (QueryGetRegistryModuleBalanceResponse) {
|
returns (QueryGetRegistryModuleBalanceResponse) {
|
||||||
option (google.api.http).get = "/cerc/registry/v1/balance";
|
option (google.api.http).get = "/cerc/registry/v1/balance";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Authorities queries all authorities
|
||||||
|
rpc Authorities(QueryAuthoritiesRequest) returns (QueryAuthoritiesResponse) {
|
||||||
|
option (google.api.http).get = "/cerc/registry/v1/authorities";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryParamsRequest is request type for registry params
|
// QueryParamsRequest is request type for registry params
|
||||||
@ -152,6 +157,16 @@ message QueryWhoisResponse {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QueryAuthoritiesRequest is request type to get all authorities
|
||||||
|
message QueryAuthoritiesRequest { string owner = 1; }
|
||||||
|
|
||||||
|
// QueryAuthoritiesResponse is response type for authorities request
|
||||||
|
message QueryAuthoritiesResponse {
|
||||||
|
repeated AuthorityEntry authorities = 1 [ (gogoproto.nullable) = false ];
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||||
|
}
|
||||||
|
|
||||||
// QueryLookupLrnRequest is request type for LookupLrn
|
// QueryLookupLrnRequest is request type for LookupLrn
|
||||||
message QueryLookupLrnRequest { string lrn = 1; }
|
message QueryLookupLrnRequest { string lrn = 1; }
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ import "google/api/annotations.proto";
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "cosmos/msg/v1/msg.proto";
|
import "cosmos/msg/v1/msg.proto";
|
||||||
import "cerc/registry/v1/registry.proto";
|
import "cerc/registry/v1/registry.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
|
||||||
option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/registry";
|
||||||
|
|
||||||
@ -66,6 +67,10 @@ service Msg {
|
|||||||
returns (MsgSetAuthorityBondResponse) {
|
returns (MsgSetAuthorityBondResponse) {
|
||||||
option (google.api.http).post = "/cerc/registry/v1/set_authority_bond";
|
option (google.api.http).post = "/cerc/registry/v1/set_authority_bond";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgSetRecord
|
// MsgSetRecord
|
||||||
@ -203,3 +208,21 @@ message MsgReassociateRecords {
|
|||||||
|
|
||||||
// MsgReassociateRecordsResponse
|
// MsgReassociateRecordsResponse
|
||||||
message MsgReassociateRecordsResponse {}
|
message MsgReassociateRecordsResponse {}
|
||||||
|
|
||||||
|
// 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/registry 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 {}
|
||||||
|
@ -1,12 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
KEY="alice"
|
KEY="alice"
|
||||||
CHAINID="laconic_9000-1"
|
CHAINID=${CHAINID:-"laconic_9000-1"}
|
||||||
MONIKER="localtestnet"
|
MONIKER=${MONIKER:-"localtestnet"}
|
||||||
KEYRING="test"
|
KEYRING=${KEYRING:-"test"}
|
||||||
LOGLEVEL="${LOGLEVEL:-info}"
|
DENOM=${DENOM:-"alnt"}
|
||||||
|
STAKING_AMOUNT=${STAKING_AMOUNT:-"1000000000000000"}
|
||||||
|
MIN_GAS_PRICE=${MIN_GAS_PRICE:-"0.001"}
|
||||||
|
LOGLEVEL=${LOGLEVEL:-"info"}
|
||||||
|
|
||||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
input_genesis_file=${GENESIS_FILE}
|
||||||
|
|
||||||
|
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data" ]; then
|
||||||
# validate dependencies are installed
|
# validate dependencies are installed
|
||||||
command -v jq > /dev/null 2>&1 || {
|
command -v jq > /dev/null 2>&1 || {
|
||||||
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/"
|
||||||
@ -26,8 +31,13 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
# if $KEY exists it should be deleted
|
# if $KEY exists it should be deleted
|
||||||
laconicd keys add $KEY --keyring-backend $KEYRING
|
laconicd keys add $KEY --keyring-backend $KEYRING
|
||||||
|
|
||||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
# Set moniker and chain-id
|
||||||
laconicd init $MONIKER --chain-id $CHAINID --default-denom photon
|
laconicd init $MONIKER --chain-id $CHAINID --default-denom $DENOM
|
||||||
|
|
||||||
|
if [[ -f ${input_genesis_file} ]]; then
|
||||||
|
# Use provided genesis config
|
||||||
|
cp $input_genesis_file $HOME/.laconicd/config/genesis.json
|
||||||
|
fi
|
||||||
|
|
||||||
update_genesis() {
|
update_genesis() {
|
||||||
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
||||||
@ -53,11 +63,31 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$ONBOARDING_ENABLED" == "true" ]]; then
|
if [[ "$ONBOARDING_ENABLED" == "true" ]]; then
|
||||||
echo "Enabling validator onboarding."
|
echo "Enabling onboarding."
|
||||||
|
|
||||||
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$AUTHORITY_AUCTION_ENABLED" == "true" ]]; then
|
||||||
|
echo "Enabling authority auctions."
|
||||||
|
update_genesis '.app_state["registry"]["params"]["authority_auction_enabled"]=true'
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $AUTHORITY_AUCTION_COMMITS_DURATION ]]; then
|
||||||
|
echo "Setting authority_auction_commits_duration to $AUTHORITY_AUCTION_COMMITS_DURATION seconds."
|
||||||
|
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_auction_commits_duration\"]=\"${AUTHORITY_AUCTION_COMMITS_DURATION}s\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $AUTHORITY_AUCTION_REVEALS_DURATION ]]; then
|
||||||
|
echo "Setting authority_auction_reveals_duration to $AUTHORITY_AUCTION_REVEALS_DURATION seconds."
|
||||||
|
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_auction_reveals_duration\"]=\"${AUTHORITY_AUCTION_REVEALS_DURATION}s\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n $AUTHORITY_GRACE_PERIOD ]]; then
|
||||||
|
echo "Setting authority_grace_period to $AUTHORITY_GRACE_PERIOD seconds."
|
||||||
|
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_grace_period\"]=\"${AUTHORITY_GRACE_PERIOD}s\""
|
||||||
|
fi
|
||||||
|
|
||||||
# increase block time (?)
|
# increase block time (?)
|
||||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
||||||
|
|
||||||
@ -70,7 +100,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
else
|
else
|
||||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Run this to allow requests from any origin
|
# Run this to allow requests from any origin
|
||||||
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
||||||
|
|
||||||
@ -86,10 +116,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Allocate genesis accounts (cosmos formatted addresses)
|
# Allocate genesis accounts (cosmos formatted addresses)
|
||||||
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING
|
# 10^30 alnt | 10^12 lnt
|
||||||
|
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000$DENOM --keyring-backend $KEYRING
|
||||||
|
|
||||||
# Sign genesis transaction
|
# Sign genesis transaction
|
||||||
laconicd genesis gentx $KEY 1000000000000000000000photon --keyring-backend $KEYRING --chain-id $CHAINID
|
# 10^15 alnt
|
||||||
|
laconicd genesis gentx $KEY $STAKING_AMOUNT$DENOM --keyring-backend $KEYRING --chain-id $CHAINID
|
||||||
|
|
||||||
# Collect genesis tx
|
# Collect genesis tx
|
||||||
laconicd genesis collect-gentxs
|
laconicd genesis collect-gentxs
|
||||||
@ -104,7 +136,7 @@ fi
|
|||||||
laconicd start \
|
laconicd start \
|
||||||
--pruning=nothing \
|
--pruning=nothing \
|
||||||
--log_level $LOGLEVEL \
|
--log_level $LOGLEVEL \
|
||||||
--minimum-gas-prices=0.0001photon \
|
--minimum-gas-prices=$MIN_GAS_PRICE$DENOM \
|
||||||
--api.enable \
|
--api.enable \
|
||||||
--rpc.laddr="tcp://0.0.0.0:26657" \
|
--rpc.laddr="tcp://0.0.0.0:26657" \
|
||||||
--gql-server --gql-playground
|
--gql-server --gql-playground
|
||||||
|
@ -103,10 +103,13 @@ func (ets *E2ETestSuite) createAuctionAndBid(createAuction, createBid bool) stri
|
|||||||
|
|
||||||
if createAuction {
|
if createAuction {
|
||||||
auctionArgs := []string{
|
auctionArgs := []string{
|
||||||
|
types.AuctionKindVickrey,
|
||||||
sampleCommitTime, sampleRevealTime,
|
sampleCommitTime, sampleRevealTime,
|
||||||
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
||||||
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
||||||
fmt.Sprintf("100%s", ets.cfg.BondDenom),
|
fmt.Sprintf("100%s", ets.cfg.BondDenom),
|
||||||
|
fmt.Sprintf("0%s", ets.cfg.BondDenom),
|
||||||
|
"0",
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := ets.executeTx(cli.GetCmdCreateAuction(), auctionArgs, ownerAccount)
|
resp, err := ets.executeTx(cli.GetCmdCreateAuction(), auctionArgs, ownerAccount)
|
||||||
|
@ -46,10 +46,13 @@ func (ets *E2ETestSuite) TestTxCommitBid() {
|
|||||||
ets.Run(fmt.Sprintf("Case %s", test.msg), func() {
|
ets.Run(fmt.Sprintf("Case %s", test.msg), func() {
|
||||||
if test.createAuction {
|
if test.createAuction {
|
||||||
auctionArgs := []string{
|
auctionArgs := []string{
|
||||||
|
auctiontypes.AuctionKindVickrey,
|
||||||
sampleCommitTime, sampleRevealTime,
|
sampleCommitTime, sampleRevealTime,
|
||||||
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
||||||
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
fmt.Sprintf("10%s", ets.cfg.BondDenom),
|
||||||
fmt.Sprintf("100%s", ets.cfg.BondDenom),
|
fmt.Sprintf("100%s", ets.cfg.BondDenom),
|
||||||
|
fmt.Sprintf("0%s", ets.cfg.BondDenom),
|
||||||
|
"0",
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := ets.executeTx(cli.GetCmdCreateAuction(), auctionArgs, ownerAccount)
|
resp, err := ets.executeTx(cli.GetCmdCreateAuction(), auctionArgs, ownerAccount)
|
||||||
|
@ -3,9 +3,12 @@ package keeper_test
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
|
|
||||||
"cosmossdk.io/math"
|
"cosmossdk.io/math"
|
||||||
|
sdkmath "cosmossdk.io/math"
|
||||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
|
||||||
integrationTest "git.vdb.to/cerc-io/laconicd/tests/integration"
|
integrationTest "git.vdb.to/cerc-io/laconicd/tests/integration"
|
||||||
types "git.vdb.to/cerc-io/laconicd/x/auction"
|
types "git.vdb.to/cerc-io/laconicd/x/auction"
|
||||||
@ -284,6 +287,7 @@ func (kts *KeeperTestSuite) TestGrpcGetAuctionsByOwner() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (kts *KeeperTestSuite) TestGrpcQueryBalance() {
|
func (kts *KeeperTestSuite) TestGrpcQueryBalance() {
|
||||||
|
|
||||||
testCases := []struct {
|
testCases := []struct {
|
||||||
msg string
|
msg string
|
||||||
req *types.QueryGetAuctionModuleBalanceRequest
|
req *types.QueryGetAuctionModuleBalanceRequest
|
||||||
@ -324,14 +328,20 @@ func (kts *KeeperTestSuite) createAuctionAndCommitBid(commitBid bool) (*types.Au
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create funded account(s)
|
// Create funded account(s)
|
||||||
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(100))
|
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(1000000))
|
||||||
|
|
||||||
params, err := k.GetParams(ctx)
|
auction, err := k.CreateAuction(
|
||||||
if err != nil {
|
ctx,
|
||||||
return nil, nil, err
|
types.MsgCreateAuction{
|
||||||
}
|
Kind: types.AuctionKindVickrey,
|
||||||
|
Signer: accounts[0].String(),
|
||||||
auction, err := k.CreateAuction(ctx, types.NewMsgCreateAuction(*params, accounts[0]))
|
CommitsDuration: 5 * time.Minute,
|
||||||
|
RevealsDuration: 5 * time.Minute,
|
||||||
|
CommitFee: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)),
|
||||||
|
RevealFee: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000)),
|
||||||
|
MinimumBid: sdk.NewCoin(sdk.DefaultBondDenom, sdkmath.NewInt(1000000)),
|
||||||
|
},
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
@ -99,9 +99,9 @@ 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)
|
bondKeeper := bondkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[bondTypes.StoreKey]), accountKeeper, bankKeeper, authority.String())
|
||||||
|
|
||||||
registryKeeper := registrykeeper.NewKeeper(
|
registryKeeper := registrykeeper.NewKeeper(
|
||||||
cdc,
|
cdc,
|
||||||
@ -110,6 +110,7 @@ func (tf *TestFixture) Setup() error {
|
|||||||
bankKeeper,
|
bankKeeper,
|
||||||
bondKeeper,
|
bondKeeper,
|
||||||
auctionKeeper,
|
auctionKeeper,
|
||||||
|
authority.String(),
|
||||||
)
|
)
|
||||||
|
|
||||||
authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil)
|
authModule := auth.NewAppModule(cdc, accountKeeper, authsims.RandomGenesisAccounts, nil)
|
||||||
|
@ -49,7 +49,7 @@ func (kts *KeeperTestSuite) createBond() (*bondTypes.Bond, error) {
|
|||||||
ctx := kts.SdkCtx
|
ctx := kts.SdkCtx
|
||||||
|
|
||||||
// Create a funded account
|
// Create a funded account
|
||||||
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(100000000000))
|
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(1000000000000))
|
||||||
|
|
||||||
bond, err := kts.BondKeeper.CreateBond(ctx, kts.accounts[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000000))))
|
bond, err := kts.BondKeeper.CreateBond(ctx, kts.accounts[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000000))))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -9,7 +9,6 @@ import (
|
|||||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
proto "github.com/cosmos/gogoproto/proto"
|
proto "github.com/cosmos/gogoproto/proto"
|
||||||
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
|
github_com_cosmos_gogoproto_types "github.com/cosmos/gogoproto/types"
|
||||||
_ "google.golang.org/protobuf/types/known/durationpb"
|
|
||||||
_ "google.golang.org/protobuf/types/known/timestamppb"
|
_ "google.golang.org/protobuf/types/known/timestamppb"
|
||||||
io "io"
|
io "io"
|
||||||
math "math"
|
math "math"
|
||||||
@ -31,20 +30,11 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|||||||
|
|
||||||
// Params defines the auction module parameters
|
// Params defines the auction module parameters
|
||||||
type Params struct {
|
type Params 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"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Params) Reset() { *m = Params{} }
|
func (m *Params) Reset() { *m = Params{} }
|
||||||
func (*Params) ProtoMessage() {}
|
func (m *Params) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*Params) ProtoMessage() {}
|
||||||
func (*Params) Descriptor() ([]byte, []int) {
|
func (*Params) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_34b162eb5b365523, []int{0}
|
return fileDescriptor_34b162eb5b365523, []int{0}
|
||||||
}
|
}
|
||||||
@ -75,65 +65,47 @@ func (m *Params) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_Params proto.InternalMessageInfo
|
var xxx_messageInfo_Params proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *Params) GetCommitsDuration() time.Duration {
|
|
||||||
if m != nil {
|
|
||||||
return m.CommitsDuration
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Params) GetRevealsDuration() time.Duration {
|
|
||||||
if m != nil {
|
|
||||||
return m.RevealsDuration
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Params) GetCommitFee() types.Coin {
|
|
||||||
if m != nil {
|
|
||||||
return m.CommitFee
|
|
||||||
}
|
|
||||||
return types.Coin{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Params) GetRevealFee() types.Coin {
|
|
||||||
if m != nil {
|
|
||||||
return m.RevealFee
|
|
||||||
}
|
|
||||||
return types.Coin{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *Params) GetMinimumBid() types.Coin {
|
|
||||||
if m != nil {
|
|
||||||
return m.MinimumBid
|
|
||||||
}
|
|
||||||
return 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"`
|
||||||
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
|
// Auction kind (vickrey | provider)
|
||||||
|
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"`
|
||||||
// Address of the creator of the auction
|
// Address of the creator of the auction
|
||||||
OwnerAddress string `protobuf:"bytes,3,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
|
OwnerAddress string `protobuf:"bytes,4,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`
|
||||||
// Timestamp at which the auction was created
|
// Timestamp at which the auction was created
|
||||||
CreateTime time.Time `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time" json:"create_time" yaml:"create_time"`
|
CreateTime time.Time `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3,stdtime" json:"create_time" json:"create_time" yaml:"create_time"`
|
||||||
// Timestamp at which the commits phase concluded
|
// Timestamp at which the commits phase concluded
|
||||||
CommitsEndTime time.Time `protobuf:"bytes,5,opt,name=commits_end_time,json=commitsEndTime,proto3,stdtime" json:"commits_end_time" json:"commits_end_time" yaml:"commits_end_time"`
|
CommitsEndTime time.Time `protobuf:"bytes,6,opt,name=commits_end_time,json=commitsEndTime,proto3,stdtime" json:"commits_end_time" json:"commits_end_time" yaml:"commits_end_time"`
|
||||||
// Timestamp at which the reveals phase concluded
|
// Timestamp at which the reveals phase concluded
|
||||||
RevealsEndTime time.Time `protobuf:"bytes,6,opt,name=reveals_end_time,json=revealsEndTime,proto3,stdtime" json:"reveals_end_time" json:"reveals_end_time" yaml:"reveals_end_time"`
|
RevealsEndTime time.Time `protobuf:"bytes,7,opt,name=reveals_end_time,json=revealsEndTime,proto3,stdtime" json:"reveals_end_time" json:"reveals_end_time" yaml:"reveals_end_time"`
|
||||||
// Commit and reveal fees must both be paid when committing a bid
|
// Commit and reveal fees must both be paid when committing a bid
|
||||||
// Reveal fee is returned only if the bid is revealed
|
// Reveal fee is returned only if the bid is revealed
|
||||||
CommitFee types.Coin `protobuf:"bytes,7,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,8,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
|
||||||
MinimumBid types.Coin `protobuf:"bytes,9,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
|
// Only applicable in vickrey auctions
|
||||||
// Address of the winner
|
MinimumBid types.Coin `protobuf:"bytes,10,opt,name=minimum_bid,json=minimumBid,proto3" json:"minimum_bid" json:"minimum_bid" yaml:"minimum_bid"`
|
||||||
WinnerAddress string `protobuf:"bytes,10,opt,name=winner_address,json=winnerAddress,proto3" json:"winner_address,omitempty"`
|
// Addresses of the winners
|
||||||
// Winning bid, i.e., the highest bid
|
// (single winner for vickrey auction)
|
||||||
WinningBid types.Coin `protobuf:"bytes,11,opt,name=winning_bid,json=winningBid,proto3" json:"winning_bid" json:"winning_bid" yaml:"winning_bid"`
|
// (multiple winners for provider auctions)
|
||||||
// Amount the winner pays, i.e. the second highest auction
|
WinnerAddresses []string `protobuf:"bytes,11,rep,name=winner_addresses,json=winnerAddresses,proto3" json:"winner_addresses,omitempty"`
|
||||||
WinningPrice types.Coin `protobuf:"bytes,12,opt,name=winning_price,json=winningPrice,proto3" json:"winning_price" json:"winning_price" yaml:"winning_price"`
|
// 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"`
|
||||||
|
// 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
|
||||||
|
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
|
||||||
|
// 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"`
|
||||||
|
// 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"`
|
||||||
|
// Whether funds have been released to providers
|
||||||
|
// Only applicable in provider auctions
|
||||||
|
FundsReleased bool `protobuf:"varint,16,opt,name=funds_released,json=fundsReleased,proto3" json:"funds_released,omitempty" json:"funds_released" yaml:"funds_released"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Auction) Reset() { *m = Auction{} }
|
func (m *Auction) Reset() { *m = Auction{} }
|
||||||
@ -263,57 +235,60 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("cerc/auction/v1/auction.proto", fileDescriptor_34b162eb5b365523) }
|
func init() { proto.RegisterFile("cerc/auction/v1/auction.proto", fileDescriptor_34b162eb5b365523) }
|
||||||
|
|
||||||
var fileDescriptor_34b162eb5b365523 = []byte{
|
var fileDescriptor_34b162eb5b365523 = []byte{
|
||||||
// 798 bytes of a gzipped FileDescriptorProto
|
// 846 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x56, 0x4d, 0x4f, 0xdb, 0x4a,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,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xd4, 0x3f, 0xa7,
|
||||||
|
0x22, 0x9c, 0xa3, 0x4c, 0x70, 0x9a, 0xe1, 0xf0, 0xda, 0xfe, 0xad, 0x49, 0xdb, 0xea, 0x9d, 0x3f,
|
||||||
|
0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x67, 0x62, 0x6b, 0xf8, 0x08, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Params) Marshal() (dAtA []byte, err error) {
|
func (m *Params) Marshal() (dAtA []byte, err error) {
|
||||||
@ -336,52 +311,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
{
|
|
||||||
size, err := m.MinimumBid.MarshalToSizedBuffer(dAtA[:i])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
i -= size
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
|
||||||
}
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0x2a
|
|
||||||
{
|
|
||||||
size, err := m.RevealFee.MarshalToSizedBuffer(dAtA[:i])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
i -= size
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
|
||||||
}
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0x22
|
|
||||||
{
|
|
||||||
size, err := m.CommitFee.MarshalToSizedBuffer(dAtA[:i])
|
|
||||||
if err != nil {
|
|
||||||
return 0, err
|
|
||||||
}
|
|
||||||
i -= size
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
|
||||||
}
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0x1a
|
|
||||||
n4, err4 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.RevealsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration):])
|
|
||||||
if err4 != nil {
|
|
||||||
return 0, err4
|
|
||||||
}
|
|
||||||
i -= n4
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n4))
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0x12
|
|
||||||
n5, err5 := github_com_cosmos_gogoproto_types.StdDurationMarshalTo(m.CommitsDuration, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration):])
|
|
||||||
if err5 != nil {
|
|
||||||
return 0, err5
|
|
||||||
}
|
|
||||||
i -= n5
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n5))
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0xa
|
|
||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -405,6 +334,33 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if m.FundsReleased {
|
||||||
|
i--
|
||||||
|
if m.FundsReleased {
|
||||||
|
dAtA[i] = 1
|
||||||
|
} else {
|
||||||
|
dAtA[i] = 0
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x80
|
||||||
|
}
|
||||||
|
if m.NumProviders != 0 {
|
||||||
|
i = encodeVarintAuction(dAtA, i, uint64(m.NumProviders))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x78
|
||||||
|
}
|
||||||
|
{
|
||||||
|
size, err := m.MaxPrice.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x72
|
||||||
{
|
{
|
||||||
size, err := m.WinningPrice.MarshalToSizedBuffer(dAtA[:i])
|
size, err := m.WinningPrice.MarshalToSizedBuffer(dAtA[:i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -414,23 +370,29 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x62
|
dAtA[i] = 0x6a
|
||||||
{
|
if len(m.WinningBids) > 0 {
|
||||||
size, err := m.WinningBid.MarshalToSizedBuffer(dAtA[:i])
|
for iNdEx := len(m.WinningBids) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
if err != nil {
|
{
|
||||||
return 0, err
|
size, err := m.WinningBids[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x62
|
||||||
}
|
}
|
||||||
i -= size
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
|
||||||
}
|
}
|
||||||
i--
|
if len(m.WinnerAddresses) > 0 {
|
||||||
dAtA[i] = 0x5a
|
for iNdEx := len(m.WinnerAddresses) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
if len(m.WinnerAddress) > 0 {
|
i -= len(m.WinnerAddresses[iNdEx])
|
||||||
i -= len(m.WinnerAddress)
|
copy(dAtA[i:], m.WinnerAddresses[iNdEx])
|
||||||
copy(dAtA[i:], m.WinnerAddress)
|
i = encodeVarintAuction(dAtA, i, uint64(len(m.WinnerAddresses[iNdEx])))
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(len(m.WinnerAddress)))
|
i--
|
||||||
i--
|
dAtA[i] = 0x5a
|
||||||
dAtA[i] = 0x52
|
}
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
size, err := m.MinimumBid.MarshalToSizedBuffer(dAtA[:i])
|
size, err := m.MinimumBid.MarshalToSizedBuffer(dAtA[:i])
|
||||||
@ -441,7 +403,7 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x4a
|
dAtA[i] = 0x52
|
||||||
{
|
{
|
||||||
size, err := m.RevealFee.MarshalToSizedBuffer(dAtA[:i])
|
size, err := m.RevealFee.MarshalToSizedBuffer(dAtA[:i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -451,7 +413,7 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x42
|
dAtA[i] = 0x4a
|
||||||
{
|
{
|
||||||
size, err := m.CommitFee.MarshalToSizedBuffer(dAtA[:i])
|
size, err := m.CommitFee.MarshalToSizedBuffer(dAtA[:i])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -461,43 +423,50 @@ func (m *Auction) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i = encodeVarintAuction(dAtA, i, uint64(size))
|
i = encodeVarintAuction(dAtA, i, uint64(size))
|
||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x3a
|
dAtA[i] = 0x42
|
||||||
n11, err11 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.RevealsEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.RevealsEndTime):])
|
n6, err6 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.RevealsEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.RevealsEndTime):])
|
||||||
if err11 != nil {
|
if err6 != nil {
|
||||||
return 0, err11
|
return 0, err6
|
||||||
}
|
}
|
||||||
i -= n11
|
i -= n6
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n11))
|
i = encodeVarintAuction(dAtA, i, uint64(n6))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x3a
|
||||||
|
n7, err7 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CommitsEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CommitsEndTime):])
|
||||||
|
if err7 != nil {
|
||||||
|
return 0, err7
|
||||||
|
}
|
||||||
|
i -= n7
|
||||||
|
i = encodeVarintAuction(dAtA, i, uint64(n7))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x32
|
dAtA[i] = 0x32
|
||||||
n12, err12 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CommitsEndTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CommitsEndTime):])
|
n8, err8 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreateTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreateTime):])
|
||||||
if err12 != nil {
|
if err8 != nil {
|
||||||
return 0, err12
|
return 0, err8
|
||||||
}
|
}
|
||||||
i -= n12
|
i -= n8
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n12))
|
i = encodeVarintAuction(dAtA, i, uint64(n8))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x2a
|
dAtA[i] = 0x2a
|
||||||
n13, err13 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CreateTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CreateTime):])
|
|
||||||
if err13 != nil {
|
|
||||||
return 0, err13
|
|
||||||
}
|
|
||||||
i -= n13
|
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n13))
|
|
||||||
i--
|
|
||||||
dAtA[i] = 0x22
|
|
||||||
if len(m.OwnerAddress) > 0 {
|
if len(m.OwnerAddress) > 0 {
|
||||||
i -= len(m.OwnerAddress)
|
i -= len(m.OwnerAddress)
|
||||||
copy(dAtA[i:], m.OwnerAddress)
|
copy(dAtA[i:], m.OwnerAddress)
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(len(m.OwnerAddress)))
|
i = encodeVarintAuction(dAtA, i, uint64(len(m.OwnerAddress)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x1a
|
dAtA[i] = 0x22
|
||||||
}
|
}
|
||||||
if len(m.Status) > 0 {
|
if len(m.Status) > 0 {
|
||||||
i -= len(m.Status)
|
i -= len(m.Status)
|
||||||
copy(dAtA[i:], m.Status)
|
copy(dAtA[i:], m.Status)
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(len(m.Status)))
|
i = encodeVarintAuction(dAtA, i, uint64(len(m.Status)))
|
||||||
i--
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if len(m.Kind) > 0 {
|
||||||
|
i -= len(m.Kind)
|
||||||
|
copy(dAtA[i:], m.Kind)
|
||||||
|
i = encodeVarintAuction(dAtA, i, uint64(len(m.Kind)))
|
||||||
|
i--
|
||||||
dAtA[i] = 0x12
|
dAtA[i] = 0x12
|
||||||
}
|
}
|
||||||
if len(m.Id) > 0 {
|
if len(m.Id) > 0 {
|
||||||
@ -587,12 +556,12 @@ func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x42
|
dAtA[i] = 0x42
|
||||||
n16, err16 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.RevealTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.RevealTime):])
|
n11, err11 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.RevealTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.RevealTime):])
|
||||||
if err16 != nil {
|
if err11 != nil {
|
||||||
return 0, err16
|
return 0, err11
|
||||||
}
|
}
|
||||||
i -= n16
|
i -= n11
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n16))
|
i = encodeVarintAuction(dAtA, i, uint64(n11))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x3a
|
dAtA[i] = 0x3a
|
||||||
{
|
{
|
||||||
@ -605,12 +574,12 @@ func (m *Bid) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
}
|
}
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x32
|
dAtA[i] = 0x32
|
||||||
n18, err18 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CommitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CommitTime):])
|
n13, err13 := github_com_cosmos_gogoproto_types.StdTimeMarshalTo(m.CommitTime, dAtA[i-github_com_cosmos_gogoproto_types.SizeOfStdTime(m.CommitTime):])
|
||||||
if err18 != nil {
|
if err13 != nil {
|
||||||
return 0, err18
|
return 0, err13
|
||||||
}
|
}
|
||||||
i -= n18
|
i -= n13
|
||||||
i = encodeVarintAuction(dAtA, i, uint64(n18))
|
i = encodeVarintAuction(dAtA, i, uint64(n13))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x2a
|
dAtA[i] = 0x2a
|
||||||
if len(m.CommitHash) > 0 {
|
if len(m.CommitHash) > 0 {
|
||||||
@ -661,16 +630,6 @@ func (m *Params) Size() (n int) {
|
|||||||
}
|
}
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.CommitsDuration)
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
l = github_com_cosmos_gogoproto_types.SizeOfStdDuration(m.RevealsDuration)
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
l = m.CommitFee.Size()
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
l = m.RevealFee.Size()
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
l = m.MinimumBid.Size()
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -684,6 +643,10 @@ func (m *Auction) Size() (n int) {
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(m.Kind)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
|
}
|
||||||
l = len(m.Status)
|
l = len(m.Status)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
@ -704,14 +667,28 @@ func (m *Auction) Size() (n int) {
|
|||||||
n += 1 + l + sovAuction(uint64(l))
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
l = m.MinimumBid.Size()
|
l = m.MinimumBid.Size()
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
l = len(m.WinnerAddress)
|
if len(m.WinnerAddresses) > 0 {
|
||||||
if l > 0 {
|
for _, s := range m.WinnerAddresses {
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
l = len(s)
|
||||||
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(m.WinningBids) > 0 {
|
||||||
|
for _, e := range m.WinningBids {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
l = m.WinningBid.Size()
|
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
|
||||||
l = m.WinningPrice.Size()
|
l = m.WinningPrice.Size()
|
||||||
n += 1 + l + sovAuction(uint64(l))
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
|
l = m.MaxPrice.Size()
|
||||||
|
n += 1 + l + sovAuction(uint64(l))
|
||||||
|
if m.NumProviders != 0 {
|
||||||
|
n += 1 + sovAuction(uint64(m.NumProviders))
|
||||||
|
}
|
||||||
|
if m.FundsReleased {
|
||||||
|
n += 3
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -800,171 +777,6 @@ func (m *Params) Unmarshal(dAtA []byte) error {
|
|||||||
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
|
return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
}
|
}
|
||||||
switch fieldNum {
|
switch fieldNum {
|
||||||
case 1:
|
|
||||||
if wireType != 2 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field CommitsDuration", wireType)
|
|
||||||
}
|
|
||||||
var msglen int
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowAuction
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
msglen |= int(b&0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if msglen < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + msglen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.CommitsDuration, dAtA[iNdEx:postIndex]); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
|
||||||
case 2:
|
|
||||||
if wireType != 2 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field RevealsDuration", wireType)
|
|
||||||
}
|
|
||||||
var msglen int
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowAuction
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
msglen |= int(b&0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if msglen < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + msglen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
if err := github_com_cosmos_gogoproto_types.StdDurationUnmarshal(&m.RevealsDuration, dAtA[iNdEx:postIndex]); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
|
||||||
case 3:
|
|
||||||
if wireType != 2 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field CommitFee", wireType)
|
|
||||||
}
|
|
||||||
var msglen int
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowAuction
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
msglen |= int(b&0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if msglen < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + msglen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
if err := m.CommitFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
|
||||||
case 4:
|
|
||||||
if wireType != 2 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field RevealFee", wireType)
|
|
||||||
}
|
|
||||||
var msglen int
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowAuction
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
msglen |= int(b&0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if msglen < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + msglen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
if err := m.RevealFee.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
|
||||||
case 5:
|
|
||||||
if wireType != 2 {
|
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field MinimumBid", wireType)
|
|
||||||
}
|
|
||||||
var msglen int
|
|
||||||
for shift := uint(0); ; shift += 7 {
|
|
||||||
if shift >= 64 {
|
|
||||||
return ErrIntOverflowAuction
|
|
||||||
}
|
|
||||||
if iNdEx >= l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
b := dAtA[iNdEx]
|
|
||||||
iNdEx++
|
|
||||||
msglen |= int(b&0x7F) << shift
|
|
||||||
if b < 0x80 {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if msglen < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
postIndex := iNdEx + msglen
|
|
||||||
if postIndex < 0 {
|
|
||||||
return ErrInvalidLengthAuction
|
|
||||||
}
|
|
||||||
if postIndex > l {
|
|
||||||
return io.ErrUnexpectedEOF
|
|
||||||
}
|
|
||||||
if err := m.MinimumBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
iNdEx = postIndex
|
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipAuction(dAtA[iNdEx:])
|
skippy, err := skipAuction(dAtA[iNdEx:])
|
||||||
@ -1048,6 +860,38 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
m.Id = string(dAtA[iNdEx:postIndex])
|
m.Id = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 2:
|
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 ErrIntOverflowAuction
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthAuction
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuction
|
||||||
|
}
|
||||||
|
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 Status", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
|
||||||
}
|
}
|
||||||
@ -1079,7 +923,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
m.Status = string(dAtA[iNdEx:postIndex])
|
m.Status = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 3:
|
case 4:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field OwnerAddress", wireType)
|
||||||
}
|
}
|
||||||
@ -1111,7 +955,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
m.OwnerAddress = string(dAtA[iNdEx:postIndex])
|
m.OwnerAddress = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 4:
|
case 5:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field CreateTime", wireType)
|
||||||
}
|
}
|
||||||
@ -1144,7 +988,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 5:
|
case 6:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field CommitsEndTime", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field CommitsEndTime", wireType)
|
||||||
}
|
}
|
||||||
@ -1177,7 +1021,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 6:
|
case 7:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field RevealsEndTime", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field RevealsEndTime", wireType)
|
||||||
}
|
}
|
||||||
@ -1210,7 +1054,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 7:
|
case 8:
|
||||||
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)
|
||||||
}
|
}
|
||||||
@ -1243,7 +1087,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 8:
|
case 9:
|
||||||
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)
|
||||||
}
|
}
|
||||||
@ -1276,7 +1120,7 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 9:
|
case 10:
|
||||||
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)
|
||||||
}
|
}
|
||||||
@ -1309,9 +1153,9 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 10:
|
case 11:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field WinnerAddress", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field WinnerAddresses", wireType)
|
||||||
}
|
}
|
||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
@ -1339,11 +1183,11 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
m.WinnerAddress = string(dAtA[iNdEx:postIndex])
|
m.WinnerAddresses = append(m.WinnerAddresses, string(dAtA[iNdEx:postIndex]))
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 11:
|
case 12:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field WinningBid", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field WinningBids", wireType)
|
||||||
}
|
}
|
||||||
var msglen int
|
var msglen int
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
@ -1370,11 +1214,12 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
if postIndex > l {
|
if postIndex > l {
|
||||||
return io.ErrUnexpectedEOF
|
return io.ErrUnexpectedEOF
|
||||||
}
|
}
|
||||||
if err := m.WinningBid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
m.WinningBids = append(m.WinningBids, types.Coin{})
|
||||||
|
if err := m.WinningBids[len(m.WinningBids)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 12:
|
case 13:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field WinningPrice", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field WinningPrice", wireType)
|
||||||
}
|
}
|
||||||
@ -1407,6 +1252,78 @@ func (m *Auction) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 14:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field MaxPrice", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowAuction
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthAuction
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthAuction
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if err := m.MaxPrice.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 15:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field NumProviders", wireType)
|
||||||
|
}
|
||||||
|
m.NumProviders = 0
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowAuction
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
m.NumProviders |= int32(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case 16:
|
||||||
|
if wireType != 0 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field FundsReleased", wireType)
|
||||||
|
}
|
||||||
|
var v int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowAuction
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
v |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.FundsReleased = bool(v != 0)
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipAuction(dAtA[iNdEx:])
|
skippy, err := skipAuction(dAtA[iNdEx:])
|
||||||
|
@ -4,6 +4,7 @@ import (
|
|||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/client"
|
"github.com/cosmos/cosmos-sdk/client"
|
||||||
@ -12,7 +13,6 @@ import (
|
|||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
"github.com/spf13/viper"
|
|
||||||
|
|
||||||
wnsUtils "git.vdb.to/cerc-io/laconicd/utils"
|
wnsUtils "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"
|
||||||
@ -48,6 +48,16 @@ func GetCmdCommitBid() *cobra.Command {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Take chain id passed by user
|
||||||
|
chainId, _ := cmd.Flags().GetString(flags.FlagChainID)
|
||||||
|
if chainId == "" {
|
||||||
|
// Take from config if not provided
|
||||||
|
chainId = clientCtx.ChainID
|
||||||
|
}
|
||||||
|
if chainId == "" {
|
||||||
|
return fmt.Errorf("--chain-id required")
|
||||||
|
}
|
||||||
|
|
||||||
bidAmount, err := sdk.ParseCoinNormalized(args[1])
|
bidAmount, err := sdk.ParseCoinNormalized(args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -58,7 +68,6 @@ func GetCmdCommitBid() *cobra.Command {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
chainId := viper.GetString("chain-id")
|
|
||||||
auctionId := args[0]
|
auctionId := args[0]
|
||||||
|
|
||||||
reveal := map[string]interface{}{
|
reveal := map[string]interface{}{
|
||||||
@ -132,48 +141,63 @@ func GetCmdRevealBid() *cobra.Command {
|
|||||||
|
|
||||||
func GetCmdCreateAuction() *cobra.Command {
|
func GetCmdCreateAuction() *cobra.Command {
|
||||||
cmd := &cobra.Command{
|
cmd := &cobra.Command{
|
||||||
Use: "create [commits-duration] [reveals-duration] [commit-fee] [reveal-fee] [minimum-bid]",
|
Use: "create [kind] [commits-duration] [reveals-duration] [commit-fee] [reveal-fee] [minimum-bid] [max-price] [num-providers]",
|
||||||
Short: "Create auction.",
|
Short: "Create auction.",
|
||||||
Args: cobra.ExactArgs(5),
|
Args: cobra.ExactArgs(8),
|
||||||
RunE: func(cmd *cobra.Command, args []string) error {
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||||||
clientCtx, err := client.GetClientTxContext(cmd)
|
clientCtx, err := client.GetClientTxContext(cmd)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
commitsDuration, err := time.ParseDuration(args[0])
|
kind := args[0]
|
||||||
|
|
||||||
|
commitsDuration, err := time.ParseDuration(args[1])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
revealsDuration, err := time.ParseDuration(args[1])
|
revealsDuration, err := time.ParseDuration(args[2])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
commitFee, err := sdk.ParseCoinNormalized(args[2])
|
commitFee, err := sdk.ParseCoinNormalized(args[3])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
revealFee, err := sdk.ParseCoinNormalized(args[3])
|
revealFee, err := sdk.ParseCoinNormalized(args[4])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
minimumBid, err := sdk.ParseCoinNormalized(args[4])
|
minimumBid, err := sdk.ParseCoinNormalized(args[5])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
params := auctiontypes.Params{
|
maxPrice, err := sdk.ParseCoinNormalized(args[6])
|
||||||
CommitsDuration: commitsDuration,
|
if err != nil {
|
||||||
RevealsDuration: revealsDuration,
|
return err
|
||||||
CommitFee: commitFee,
|
|
||||||
RevealFee: revealFee,
|
|
||||||
MinimumBid: minimumBid,
|
|
||||||
}
|
}
|
||||||
msg := auctiontypes.NewMsgCreateAuction(params, clientCtx.GetFromAddress())
|
|
||||||
|
numProviders, err := strconv.ParseInt(args[7], 10, 32)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
msg := auctiontypes.NewMsgCreateAuction(
|
||||||
|
kind,
|
||||||
|
commitsDuration,
|
||||||
|
revealsDuration,
|
||||||
|
commitFee,
|
||||||
|
revealFee,
|
||||||
|
minimumBid,
|
||||||
|
maxPrice,
|
||||||
|
int32(numProviders),
|
||||||
|
clientCtx.GetFromAddress(),
|
||||||
|
)
|
||||||
err = msg.ValidateBasic()
|
err = msg.ValidateBasic()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -4,6 +4,7 @@ const (
|
|||||||
EventTypeCreateAuction = "create-auction"
|
EventTypeCreateAuction = "create-auction"
|
||||||
EventTypeCommitBid = "commit-bid"
|
EventTypeCommitBid = "commit-bid"
|
||||||
EventTypeRevealBid = "reveal-bid"
|
EventTypeRevealBid = "reveal-bid"
|
||||||
|
EventTypeReleaseFunds = "release-funds"
|
||||||
|
|
||||||
AttributeKeyCommitsDuration = "commits-duration"
|
AttributeKeyCommitsDuration = "commits-duration"
|
||||||
AttributeKeyRevealsDuration = "reveals-duration"
|
AttributeKeyRevealsDuration = "reveals-duration"
|
||||||
|
@ -5,6 +5,7 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"slices"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
@ -12,6 +13,7 @@ import (
|
|||||||
storetypes "cosmossdk.io/core/store"
|
storetypes "cosmossdk.io/core/store"
|
||||||
errorsmod "cosmossdk.io/errors"
|
errorsmod "cosmossdk.io/errors"
|
||||||
"cosmossdk.io/log"
|
"cosmossdk.io/log"
|
||||||
|
"cosmossdk.io/math"
|
||||||
|
|
||||||
"github.com/cosmos/cosmos-sdk/codec"
|
"github.com/cosmos/cosmos-sdk/codec"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
@ -24,7 +26,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// CompletedAuctionDeleteTimeout => Completed auctions are deleted after this timeout (after reveals end time).
|
// CompletedAuctionDeleteTimeout => Completed auctions are deleted after this timeout (after reveals end time).
|
||||||
const CompletedAuctionDeleteTimeout = time.Hour * 24
|
const CompletedAuctionDeleteTimeout = 365 * 24 * time.Hour // 1 year
|
||||||
|
|
||||||
type AuctionsIndexes struct {
|
type AuctionsIndexes struct {
|
||||||
Owner *indexes.Multi[string, string, auctiontypes.Auction]
|
Owner *indexes.Multi[string, string, auctiontypes.Auction]
|
||||||
@ -67,6 +69,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 +95,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)),
|
||||||
@ -330,8 +341,18 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg auctiontypes.MsgCreateAuction
|
|||||||
commitsEndTime := now.Add(msg.CommitsDuration)
|
commitsEndTime := now.Add(msg.CommitsDuration)
|
||||||
revealsEndTime := now.Add(msg.CommitsDuration + msg.RevealsDuration)
|
revealsEndTime := now.Add(msg.CommitsDuration + msg.RevealsDuration)
|
||||||
|
|
||||||
|
if msg.Kind == auctiontypes.AuctionKindProvider {
|
||||||
|
totalLockedAmount := sdk.NewCoin(msg.MaxPrice.Denom, msg.MaxPrice.Amount.MulRaw(int64(msg.NumProviders)))
|
||||||
|
|
||||||
|
sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(totalLockedAmount))
|
||||||
|
if sdkErr != nil {
|
||||||
|
return nil, errorsmod.Wrap(sdkErr, "Auction error transferring maximum price amount")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
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,
|
||||||
@ -340,6 +361,8 @@ func (k Keeper) CreateAuction(ctx sdk.Context, msg auctiontypes.MsgCreateAuction
|
|||||||
CommitFee: msg.CommitFee,
|
CommitFee: msg.CommitFee,
|
||||||
RevealFee: msg.RevealFee,
|
RevealFee: msg.RevealFee,
|
||||||
MinimumBid: msg.MinimumBid,
|
MinimumBid: msg.MinimumBid,
|
||||||
|
MaxPrice: msg.MaxPrice,
|
||||||
|
NumProviders: msg.NumProviders,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save auction in store.
|
// Save auction in store.
|
||||||
@ -507,14 +530,20 @@ func (k Keeper) RevealBid(ctx sdk.Context, msg auctiontypes.MsgRevealBid) (*auct
|
|||||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid reveal bid amount.")
|
||||||
}
|
}
|
||||||
|
|
||||||
if bidAmount.IsLT(auction.MinimumBid) {
|
if auction.Kind == auctiontypes.AuctionKindVickrey && bidAmount.IsLT(auction.MinimumBid) {
|
||||||
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 && auction.MaxPrice.IsLT(bidAmount) {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Bid is higher than max price.")
|
||||||
|
}
|
||||||
|
|
||||||
// Lock bid amount.
|
// Lock bid amount.
|
||||||
sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(bidAmount))
|
if auction.Kind == auctiontypes.AuctionKindVickrey {
|
||||||
if sdkErr != nil {
|
sdkErr := k.bankKeeper.SendCoinsFromAccountToModule(ctx, signerAddress, auctiontypes.ModuleName, sdk.NewCoins(bidAmount))
|
||||||
return nil, sdkErr
|
if sdkErr != nil {
|
||||||
|
return nil, sdkErr
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update bid.
|
// Update bid.
|
||||||
@ -528,6 +557,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 +572,11 @@ func (k Keeper) GetParams(ctx sdk.Context) (*auctiontypes.Params, error) {
|
|||||||
return ¶ms, nil
|
return ¶ms, 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)
|
||||||
@ -587,8 +626,14 @@ func (k Keeper) processAuctionPhases(ctx sdk.Context) error {
|
|||||||
|
|
||||||
// If auction has expired, pick a winner from revealed bids.
|
// If auction has expired, pick a winner from revealed bids.
|
||||||
if auction.Status == auctiontypes.AuctionStatusExpired {
|
if auction.Status == auctiontypes.AuctionStatusExpired {
|
||||||
if err = k.pickAuctionWinner(ctx, auction); err != nil {
|
if auction.Kind == auctiontypes.AuctionKindVickrey {
|
||||||
return err
|
if err = k.pickAuctionWinner(ctx, auction); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if err = k.pickProviderAuctionWinners(ctx, auction); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -616,6 +661,7 @@ func (k Keeper) deleteCompletedAuctions(ctx sdk.Context) error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pick winner for vickrey auction
|
||||||
func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction) error {
|
func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction) error {
|
||||||
k.Logger(ctx).Info(fmt.Sprintf("Picking auction %s winner.", auction.Id))
|
k.Logger(ctx).Info(fmt.Sprintf("Picking auction %s winner.", auction.Id))
|
||||||
|
|
||||||
@ -667,17 +713,17 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
|
|||||||
auction.Status = auctiontypes.AuctionStatusCompleted
|
auction.Status = auctiontypes.AuctionStatusCompleted
|
||||||
|
|
||||||
if highestBid != nil {
|
if highestBid != nil {
|
||||||
auction.WinnerAddress = highestBid.BidderAddress
|
auction.WinningBids = []sdk.Coin{highestBid.BidAmount}
|
||||||
auction.WinningBid = highestBid.BidAmount
|
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 {
|
||||||
auction.WinningPrice = secondHighestBid.BidAmount
|
auction.WinningPrice = secondHighestBid.BidAmount
|
||||||
}
|
}
|
||||||
k.Logger(ctx).Info(fmt.Sprintf("Auction %s winner %s.", auction.Id, auction.WinnerAddress))
|
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.WinningBid.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))
|
||||||
}
|
}
|
||||||
@ -711,8 +757,8 @@ 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 auction.WinnerAddress != "" {
|
if len(auction.WinnerAddresses) != 0 {
|
||||||
winnerAddress, err := sdk.AccAddressFromBech32(auction.WinnerAddress)
|
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))
|
||||||
panic("Invalid winner address.")
|
panic("Invalid winner address.")
|
||||||
@ -754,3 +800,173 @@ func (k Keeper) pickAuctionWinner(ctx sdk.Context, auction *auctiontypes.Auction
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pick winner for provider auction
|
||||||
|
func (k Keeper) pickProviderAuctionWinners(ctx sdk.Context, auction *auctiontypes.Auction) error {
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Picking auction %s winners.", auction.Id))
|
||||||
|
|
||||||
|
bids, err := k.GetBids(ctx, auction.Id)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
revealedBids := make([]*auctiontypes.Bid, 0, len(bids))
|
||||||
|
for _, bid := range bids {
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Processing bid %s %s", bid.BidderAddress, bid.BidAmount.String()))
|
||||||
|
|
||||||
|
// Only consider revealed bids.
|
||||||
|
if bid.Status != auctiontypes.BidStatusRevealed {
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Ignoring unrevealed bid %s %s", bid.BidderAddress, bid.BidAmount.String()))
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
revealedBids = append(revealedBids, bid)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sort the valid bids
|
||||||
|
slices.SortStableFunc(revealedBids, func(a, b *auctiontypes.Bid) int {
|
||||||
|
if a.BidAmount.Amount.LT(b.BidAmount.Amount) {
|
||||||
|
return -1
|
||||||
|
} else if a.BidAmount.Amount.GT(b.BidAmount.Amount) {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
})
|
||||||
|
|
||||||
|
// Take best min(len(revealedBids), auction.NumProviders) bids
|
||||||
|
numWinners := int(auction.NumProviders)
|
||||||
|
if len(revealedBids) < numWinners {
|
||||||
|
numWinners = len(revealedBids)
|
||||||
|
}
|
||||||
|
winnerBids := revealedBids[:numWinners]
|
||||||
|
|
||||||
|
auction.Status = auctiontypes.AuctionStatusCompleted
|
||||||
|
|
||||||
|
if len(winnerBids) > 0 {
|
||||||
|
winnerAddresses := make([]string, len(winnerBids))
|
||||||
|
winningBids := make([]sdk.Coin, len(winnerBids))
|
||||||
|
for i, bid := range winnerBids {
|
||||||
|
winnerAddresses[i] = bid.BidderAddress
|
||||||
|
winningBids[i] = bid.BidAmount
|
||||||
|
}
|
||||||
|
|
||||||
|
auction.WinnerAddresses = winnerAddresses
|
||||||
|
auction.WinningBids = winningBids
|
||||||
|
|
||||||
|
// The last best bid is the winning price
|
||||||
|
auction.WinningPrice = winnerBids[len(winnerBids)-1].BidAmount
|
||||||
|
|
||||||
|
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 winning price %s.", auction.Id, auction.WinningPrice.String()))
|
||||||
|
} else {
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Auction %s has no valid revealed bids (no winner).", auction.Id))
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := k.SaveAuction(ctx, auction); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, bid := range bids {
|
||||||
|
bidderAddress, err := sdk.AccAddressFromBech32(bid.BidderAddress)
|
||||||
|
if err != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Invalid bidderAddress address. %v", err))
|
||||||
|
panic("Invalid bidder address.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if bid.Status == auctiontypes.BidStatusRevealed {
|
||||||
|
// Send reveal fee back to bidders that've revealed the bid.
|
||||||
|
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(ctx, auctiontypes.ModuleName, bidderAddress, sdk.NewCoins(bid.RevealFee))
|
||||||
|
if sdkErr != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Auction error returning reveal fee: %v", sdkErr))
|
||||||
|
panic(sdkErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send back any leftover locked amount to auction creator
|
||||||
|
// All of it in case of no winners
|
||||||
|
totalLockedAmount := auction.MaxPrice.Amount.Mul(math.NewInt(int64(auction.NumProviders)))
|
||||||
|
totalAmountPaid := auction.WinningPrice.Amount.Mul(math.NewInt(int64(len(auction.WinnerAddresses))))
|
||||||
|
creatorLeftOverAmount := sdk.NewCoin(auction.MaxPrice.Denom, totalLockedAmount.Sub(totalAmountPaid))
|
||||||
|
|
||||||
|
ownerAccAddress, err := sdk.AccAddressFromBech32(auction.OwnerAddress)
|
||||||
|
if err != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Invalid auction owner address. %v", err))
|
||||||
|
panic("Invalid auction owner address.")
|
||||||
|
}
|
||||||
|
|
||||||
|
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
|
||||||
|
ctx,
|
||||||
|
auctiontypes.ModuleName,
|
||||||
|
ownerAccAddress,
|
||||||
|
sdk.NewCoins(creatorLeftOverAmount),
|
||||||
|
)
|
||||||
|
if sdkErr != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Auction error returning leftover locked amount: %v", sdkErr))
|
||||||
|
panic(sdkErr)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Notify other modules (hook).
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Auction %s notifying %d modules.", auction.Id, len(k.usageKeepers)))
|
||||||
|
for _, keeper := range k.usageKeepers {
|
||||||
|
k.Logger(ctx).Info(fmt.Sprintf("Auction %s notifying module %s.", auction.Id, keeper.ModuleName()))
|
||||||
|
keeper.OnAuctionWinnerSelected(ctx, auction.Id)
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) ReleaseFunds(ctx sdk.Context, msg auctiontypes.MsgReleaseFunds) (*auctiontypes.Auction, error) {
|
||||||
|
auction, err := k.GetAuctionById(ctx, msg.AuctionId)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
if auction.Kind != auctiontypes.AuctionKindProvider {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction kind must be provider.")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Only the auction owner can release funds.
|
||||||
|
if msg.Signer != auction.OwnerAddress {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrUnauthorized, "Only auction owner can release funds.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if auction.Status != auctiontypes.AuctionStatusCompleted {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction is not completed.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if auction.FundsReleased {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Auction funds already released.")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Mark funds as released in the stored auction
|
||||||
|
auction.FundsReleased = true
|
||||||
|
if err = k.SaveAuction(ctx, &auction); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
// Process winner accounts.
|
||||||
|
for _, winnerAddress := range auction.WinnerAddresses {
|
||||||
|
winnerAccAddress, err := sdk.AccAddressFromBech32(winnerAddress)
|
||||||
|
if err != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Invalid winner address. %v", err))
|
||||||
|
panic("Invalid winner address.")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Send winning price to winning bidders
|
||||||
|
sdkErr := k.bankKeeper.SendCoinsFromModuleToAccount(
|
||||||
|
ctx,
|
||||||
|
auctiontypes.ModuleName,
|
||||||
|
winnerAccAddress,
|
||||||
|
sdk.NewCoins(auction.WinningPrice),
|
||||||
|
)
|
||||||
|
if sdkErr != nil {
|
||||||
|
k.Logger(ctx).Error(fmt.Sprintf("Auction error sending funds to winner: %v", sdkErr))
|
||||||
|
panic(sdkErr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return &auction, err
|
||||||
|
}
|
||||||
|
@ -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{}
|
||||||
@ -54,7 +56,6 @@ func (ms msgServer) CreateAuction(c context.Context, msg *auctiontypes.MsgCreate
|
|||||||
}
|
}
|
||||||
|
|
||||||
// CommitBid is the command for committing a bid
|
// CommitBid is the command for committing a bid
|
||||||
// nolint: all
|
|
||||||
func (ms msgServer) CommitBid(c context.Context, msg *auctiontypes.MsgCommitBid) (*auctiontypes.MsgCommitBidResponse, error) {
|
func (ms msgServer) CommitBid(c context.Context, msg *auctiontypes.MsgCommitBid) (*auctiontypes.MsgCommitBidResponse, error) {
|
||||||
if err := msg.ValidateBasic(); err != nil {
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -92,7 +93,6 @@ func (ms msgServer) CommitBid(c context.Context, msg *auctiontypes.MsgCommitBid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// RevealBid is the command for revealing a bid
|
// RevealBid is the command for revealing a bid
|
||||||
// nolint: all
|
|
||||||
func (ms msgServer) RevealBid(c context.Context, msg *auctiontypes.MsgRevealBid) (*auctiontypes.MsgRevealBidResponse, error) {
|
func (ms msgServer) RevealBid(c context.Context, msg *auctiontypes.MsgRevealBid) (*auctiontypes.MsgRevealBidResponse, error) {
|
||||||
if err := msg.ValidateBasic(); err != nil {
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -128,3 +128,58 @@ 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
|
||||||
|
}
|
||||||
|
|
||||||
|
// ReleaseFunds is the command to pay the winning amounts to provider auction winners
|
||||||
|
func (ms msgServer) ReleaseFunds(c context.Context, msg *auctiontypes.MsgReleaseFunds) (*auctiontypes.MsgReleaseFundsResponse, error) {
|
||||||
|
if err := msg.ValidateBasic(); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
ctx = *utils.CtxWithCustomKVGasConfig(&ctx)
|
||||||
|
|
||||||
|
signerAddress, err := sdk.AccAddressFromBech32(msg.Signer)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
resp, err := ms.k.ReleaseFunds(ctx, *msg)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.EventManager().EmitEvents(sdk.Events{
|
||||||
|
sdk.NewEvent(
|
||||||
|
auctiontypes.EventTypeReleaseFunds,
|
||||||
|
sdk.NewAttribute(auctiontypes.AttributeKeyAuctionId, msg.AuctionId),
|
||||||
|
),
|
||||||
|
sdk.NewEvent(
|
||||||
|
sdk.EventTypeMessage,
|
||||||
|
sdk.NewAttribute(sdk.AttributeKeyModule, auctiontypes.AttributeValueCategory),
|
||||||
|
sdk.NewAttribute(auctiontypes.AttributeKeySigner, signerAddress.String()),
|
||||||
|
),
|
||||||
|
})
|
||||||
|
|
||||||
|
utils.LogTxGasConsumed(ctx, ms.k.Logger(ctx), "ReleaseFunds")
|
||||||
|
|
||||||
|
return &auctiontypes.MsgReleaseFundsResponse{Auction: resp}, nil
|
||||||
|
}
|
||||||
|
@ -81,17 +81,27 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||||
{
|
{
|
||||||
RpcMethod: "CreateAuction",
|
RpcMethod: "CreateAuction",
|
||||||
Use: "create [commits-duration] [reveals-duration] [commit-fee] [reveal-fee] [minimum-bid]",
|
Use: "create [commits-duration] [reveals-duration] [commit-fee] [reveal-fee]",
|
||||||
Short: "Create an auction",
|
Short: "Create an auction",
|
||||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||||
{ProtoField: "commits_duration"},
|
{ProtoField: "commits_duration"},
|
||||||
{ProtoField: "reveals_duration"},
|
{ProtoField: "reveals_duration"},
|
||||||
{ProtoField: "commit_fee"},
|
{ProtoField: "commit_fee"},
|
||||||
{ProtoField: "reveal_fee"},
|
{ProtoField: "reveal_fee"},
|
||||||
{ProtoField: "minimum_bid"},
|
},
|
||||||
|
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||||
|
"kind": {Name: "kind", DefaultValue: "vickrey", Usage: "Auction kind (vickrey|provider) (default: vickrey)"},
|
||||||
|
"minimum_bid": {Name: "minimum-bid", Usage: "Minimum bid (required for vickrey auctions)"},
|
||||||
|
"max_price": {Name: "max-price", Usage: "Max price (required for provider auctions)"},
|
||||||
|
"num_providers": {Name: "num-providers", Usage: "Number of desired providers (required for provider auctions)"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "UpdateParams",
|
||||||
|
Skip: true, // skipped because authority gated
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
EnhanceCustomCommand: true, // Allow additional manual commands
|
EnhanceCustomCommand: true, // Allow additional manual commands
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -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}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package auction
|
package auction
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
time "time"
|
||||||
|
|
||||||
errorsmod "cosmossdk.io/errors"
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
@ -13,13 +16,26 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// NewMsgCreateAuction is the constructor function for MsgCreateAuction.
|
// NewMsgCreateAuction is the constructor function for MsgCreateAuction.
|
||||||
func NewMsgCreateAuction(params Params, signer sdk.AccAddress) MsgCreateAuction {
|
func NewMsgCreateAuction(
|
||||||
|
kind string,
|
||||||
|
commitsDuration time.Duration,
|
||||||
|
revealsDuration time.Duration,
|
||||||
|
commitFee sdk.Coin,
|
||||||
|
revealFee sdk.Coin,
|
||||||
|
minimumBid sdk.Coin,
|
||||||
|
maxPrice sdk.Coin,
|
||||||
|
numProviders int32,
|
||||||
|
signer sdk.AccAddress,
|
||||||
|
) MsgCreateAuction {
|
||||||
return MsgCreateAuction{
|
return MsgCreateAuction{
|
||||||
CommitsDuration: params.CommitsDuration,
|
CommitsDuration: commitsDuration,
|
||||||
RevealsDuration: params.RevealsDuration,
|
RevealsDuration: revealsDuration,
|
||||||
CommitFee: params.CommitFee,
|
CommitFee: commitFee,
|
||||||
RevealFee: params.RevealFee,
|
RevealFee: revealFee,
|
||||||
MinimumBid: params.MinimumBid,
|
MinimumBid: minimumBid,
|
||||||
|
MaxPrice: maxPrice,
|
||||||
|
Kind: kind,
|
||||||
|
NumProviders: numProviders,
|
||||||
Signer: signer.String(),
|
Signer: signer.String(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -33,22 +49,53 @@ func NewMsgCommitBid(auctionId string, commitHash string, signer sdk.AccAddress)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NewMsgRevealBid is the constructor function for MsgRevealBid.
|
||||||
|
func NewMsgRevealBid(auctionId string, reveal string, signer sdk.AccAddress) MsgRevealBid {
|
||||||
|
return MsgRevealBid{
|
||||||
|
AuctionId: auctionId,
|
||||||
|
Reveal: reveal,
|
||||||
|
Signer: signer.String(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMsgReleaseFunds is the constructor function for MsgReleaseFunds.
|
||||||
|
func NewMsgReleaseFunds(auctionId string, signer sdk.AccAddress) MsgReleaseFunds {
|
||||||
|
return MsgReleaseFunds{
|
||||||
|
AuctionId: auctionId,
|
||||||
|
Signer: signer.String(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ValidateBasic Implements Msg.
|
// ValidateBasic Implements Msg.
|
||||||
func (msg MsgCreateAuction) ValidateBasic() error {
|
func (msg MsgCreateAuction) ValidateBasic() error {
|
||||||
if msg.Signer == "" {
|
if msg.Signer == "" {
|
||||||
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, msg.Signer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if msg.Kind != AuctionKindVickrey && msg.Kind != AuctionKindProvider {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("auction kind should be one of %s | %s", AuctionKindVickrey, AuctionKindProvider))
|
||||||
|
}
|
||||||
|
|
||||||
if msg.CommitsDuration <= 0 {
|
if msg.CommitsDuration <= 0 {
|
||||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid.")
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "commit phase duration invalid")
|
||||||
}
|
}
|
||||||
|
|
||||||
if msg.RevealsDuration <= 0 {
|
if msg.RevealsDuration <= 0 {
|
||||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid.")
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "reveal phase duration invalid")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !msg.MinimumBid.IsPositive() {
|
if msg.Kind == AuctionKindVickrey && !msg.MinimumBid.IsPositive() {
|
||||||
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "minimum bid should be greater than zero.")
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("minimum bid should be greater than zero for %s auction", AuctionKindVickrey))
|
||||||
|
}
|
||||||
|
|
||||||
|
if msg.Kind == AuctionKindProvider {
|
||||||
|
if !msg.MaxPrice.IsPositive() {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("max price should be greater than zero for %s auction", AuctionKindProvider))
|
||||||
|
}
|
||||||
|
|
||||||
|
if msg.NumProviders <= 0 {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("num providers should be greater than zero for %s auction", AuctionKindProvider))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
@ -71,15 +118,6 @@ func (msg MsgCommitBid) ValidateBasic() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewMsgRevealBid is the constructor function for MsgRevealBid.
|
|
||||||
func NewMsgRevealBid(auctionId string, reveal string, signer sdk.AccAddress) MsgRevealBid {
|
|
||||||
return MsgRevealBid{
|
|
||||||
AuctionId: auctionId,
|
|
||||||
Reveal: reveal,
|
|
||||||
Signer: signer.String(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ValidateBasic Implements Msg.
|
// ValidateBasic Implements Msg.
|
||||||
func (msg MsgRevealBid) ValidateBasic() error {
|
func (msg MsgRevealBid) ValidateBasic() error {
|
||||||
if msg.Signer == "" {
|
if msg.Signer == "" {
|
||||||
@ -96,3 +134,16 @@ func (msg MsgRevealBid) ValidateBasic() error {
|
|||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ValidateBasic Implements Msg.
|
||||||
|
func (msg MsgReleaseFunds) ValidateBasic() error {
|
||||||
|
if msg.Signer == "" {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidAddress, "invalid signer address")
|
||||||
|
}
|
||||||
|
|
||||||
|
if msg.AuctionId == "" {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "invalid auction id")
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
@ -1,142 +1,11 @@
|
|||||||
package auction
|
package auction
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
fmt "fmt"
|
|
||||||
"strings"
|
|
||||||
time "time"
|
|
||||||
|
|
||||||
sdkmath "cosmossdk.io/math"
|
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
DefaultCommitsDuration = 5 * time.Minute
|
|
||||||
DefaultRevealsDuration = 5 * time.Minute
|
|
||||||
DefaultCommitFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
|
||||||
DefaultRevealFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
|
||||||
DefaultMinimumBid = sdk.Coin{Amount: sdkmath.NewInt(1000), Denom: sdk.DefaultBondDenom}
|
|
||||||
)
|
|
||||||
|
|
||||||
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
|
||||||
return Params{
|
|
||||||
CommitsDuration: commitsDuration,
|
|
||||||
RevealsDuration: revealsDuration,
|
|
||||||
CommitFee: commitFee,
|
|
||||||
RevealFee: revealFee,
|
|
||||||
MinimumBid: minimumBid,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// DefaultParams returns a default set of parameters.
|
// DefaultParams returns a default set of parameters.
|
||||||
func DefaultParams() Params {
|
func DefaultParams() Params {
|
||||||
return Params{
|
return Params{}
|
||||||
CommitsDuration: DefaultCommitsDuration,
|
|
||||||
RevealsDuration: DefaultRevealsDuration,
|
|
||||||
CommitFee: DefaultCommitFee,
|
|
||||||
RevealFee: DefaultRevealFee,
|
|
||||||
MinimumBid: DefaultMinimumBid,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns a human readable string representation of the parameters.
|
|
||||||
func (p Params) String() string {
|
|
||||||
var sb strings.Builder
|
|
||||||
sb.WriteString("Params: \n")
|
|
||||||
sb.WriteString(fmt.Sprintf("CommitsDuration: %s\n", p.CommitsDuration.String()))
|
|
||||||
sb.WriteString(fmt.Sprintf("RevealsDuration: %s\n", p.RevealsDuration.String()))
|
|
||||||
sb.WriteString(fmt.Sprintf("CommitFee: %s\n", p.CommitFee.String()))
|
|
||||||
sb.WriteString(fmt.Sprintf("RevealFee: %s\n", p.RevealFee.String()))
|
|
||||||
sb.WriteString(fmt.Sprintf("MinimumBid: %s\n", p.MinimumBid.String()))
|
|
||||||
return sb.String()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validate a set of params.
|
// Validate a set of params.
|
||||||
func (p Params) Validate() error {
|
func (p Params) Validate() error {
|
||||||
if err := validateCommitsDuration(p.CommitsDuration); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := validateRevealsDuration(p.RevealsDuration); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := validateCommitFee(p.CommitFee); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := validateRevealFee(p.RevealFee); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := validateMinimumBid(p.MinimumBid); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateCommitsDuration(i interface{}) error {
|
|
||||||
v, ok := i.(time.Duration)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid parameter type: %T", i)
|
|
||||||
}
|
|
||||||
|
|
||||||
if v < 0 {
|
|
||||||
return errors.New("commits duration cannot be negative")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateRevealsDuration(i interface{}) error {
|
|
||||||
v, ok := i.(time.Duration)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid parameter type: %T", i)
|
|
||||||
}
|
|
||||||
|
|
||||||
if v < 0 {
|
|
||||||
return errors.New("reveals duration cannot be negative")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateCommitFee(i interface{}) error {
|
|
||||||
v, ok := i.(sdk.Coin)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid parameter type: %T", i)
|
|
||||||
}
|
|
||||||
|
|
||||||
if v.Amount.IsNegative() {
|
|
||||||
return errors.New("commit fee must be positive")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateRevealFee(i interface{}) error {
|
|
||||||
v, ok := i.(sdk.Coin)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid parameter type: %T", i)
|
|
||||||
}
|
|
||||||
|
|
||||||
if v.Amount.IsNegative() {
|
|
||||||
return errors.New("reveal fee must be positive")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func validateMinimumBid(i interface{}) error {
|
|
||||||
v, ok := i.(sdk.Coin)
|
|
||||||
if !ok {
|
|
||||||
return fmt.Errorf("invalid parameter type: %T", i)
|
|
||||||
}
|
|
||||||
|
|
||||||
if v.Amount.IsNegative() {
|
|
||||||
return errors.New("minimum bid must be positive")
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
1141
x/auction/tx.pb.go
1141
x/auction/tx.pb.go
File diff suppressed because it is too large
Load Diff
@ -141,6 +141,42 @@ func local_request_Msg_RevealBid_0(ctx context.Context, marshaler runtime.Marsha
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_Msg_ReleaseFunds_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_Msg_ReleaseFunds_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq MsgReleaseFunds
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ReleaseFunds_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.ReleaseFunds(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Msg_ReleaseFunds_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq MsgReleaseFunds
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_ReleaseFunds_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.ReleaseFunds(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
|
// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux".
|
||||||
// UnaryRPC :call MsgServer directly.
|
// UnaryRPC :call MsgServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@ -216,6 +252,29 @@ func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Msg_ReleaseFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Msg_ReleaseFunds_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Msg_ReleaseFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,6 +376,26 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("POST", pattern_Msg_ReleaseFunds_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Msg_ReleaseFunds_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Msg_ReleaseFunds_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -326,6 +405,8 @@ var (
|
|||||||
pattern_Msg_CommitBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "auction", "v1", "commit_bid"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Msg_CommitBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "auction", "v1", "commit_bid"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
pattern_Msg_RevealBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "auction", "v1", "reveal_bid"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Msg_RevealBid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "auction", "v1", "reveal_bid"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Msg_ReleaseFunds_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "auction", "v1", "release_funds"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -334,4 +415,6 @@ var (
|
|||||||
forward_Msg_CommitBid_0 = runtime.ForwardResponseMessage
|
forward_Msg_CommitBid_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Msg_RevealBid_0 = runtime.ForwardResponseMessage
|
forward_Msg_RevealBid_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Msg_ReleaseFunds_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
@ -29,6 +29,12 @@ const (
|
|||||||
BidStatusRevealed = "reveal"
|
BidStatusRevealed = "reveal"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Auction kinds
|
||||||
|
const (
|
||||||
|
AuctionKindVickrey = "vickrey"
|
||||||
|
AuctionKindProvider = "provider"
|
||||||
|
)
|
||||||
|
|
||||||
// AuctionId simplifies generation of auction ids.
|
// AuctionId simplifies generation of auction ids.
|
||||||
type AuctionId struct {
|
type AuctionId struct {
|
||||||
Address sdk.Address
|
Address sdk.Address
|
||||||
|
@ -45,6 +45,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
|
||||||
@ -64,10 +66,17 @@ func NewKeeper(
|
|||||||
storeService store.KVStoreService,
|
storeService store.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, bondtypes.ParamsPrefix, "params", codec.CollValue[bondtypes.Params](cdc)),
|
Params: collections.NewItem(sb, bondtypes.ParamsPrefix, "params", codec.CollValue[bondtypes.Params](cdc)),
|
||||||
@ -355,6 +364,11 @@ func (k Keeper) CancelBond(ctx sdk.Context, id string, ownerAddress sdk.AccAddre
|
|||||||
return &bond, nil
|
return &bond, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetAuthority returns the x/bond module's authority.
|
||||||
|
func (k Keeper) GetAuthority() string {
|
||||||
|
return k.authority
|
||||||
|
}
|
||||||
|
|
||||||
// GetParams gets the bond module's parameters.
|
// GetParams gets the bond module's parameters.
|
||||||
func (k Keeper) GetParams(ctx sdk.Context) (*bondtypes.Params, error) {
|
func (k Keeper) GetParams(ctx sdk.Context) (*bondtypes.Params, error) {
|
||||||
params, err := k.Params.Get(ctx)
|
params, err := k.Params.Get(ctx)
|
||||||
@ -365,6 +379,11 @@ func (k Keeper) GetParams(ctx sdk.Context) (*bondtypes.Params, error) {
|
|||||||
return ¶ms, nil
|
return ¶ms, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetParams sets the x/bond module parameters.
|
||||||
|
func (k Keeper) SetParams(ctx sdk.Context, params bondtypes.Params) error {
|
||||||
|
return k.Params.Set(ctx, params)
|
||||||
|
}
|
||||||
|
|
||||||
func (k Keeper) getMaxBondAmount(ctx sdk.Context) (sdk.Coins, error) {
|
func (k Keeper) getMaxBondAmount(ctx sdk.Context) (sdk.Coins, error) {
|
||||||
params, err := k.GetParams(ctx)
|
params, err := k.GetParams(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -3,7 +3,9 @@ package keeper
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
"git.vdb.to/cerc-io/laconicd/utils"
|
"git.vdb.to/cerc-io/laconicd/utils"
|
||||||
"git.vdb.to/cerc-io/laconicd/x/bond"
|
"git.vdb.to/cerc-io/laconicd/x/bond"
|
||||||
@ -168,3 +170,22 @@ func (ms msgServer) CancelBond(c context.Context, msg *bond.MsgCancelBond) (*bon
|
|||||||
|
|
||||||
return &bond.MsgCancelBondResponse{}, nil
|
return &bond.MsgCancelBondResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateParams defines a method to perform updation of module params.
|
||||||
|
func (ms msgServer) UpdateParams(c context.Context, msg *bond.MsgUpdateParams) (*bond.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 &bond.MsgUpdateParamsResponse{}, nil
|
||||||
|
}
|
||||||
|
@ -88,6 +88,10 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
{ProtoField: "id"},
|
{ProtoField: "id"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "UpdateParams",
|
||||||
|
Skip: true, // skipped because authority gated
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -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/bond/module/v1"
|
modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/bond/module/v1"
|
||||||
"git.vdb.to/cerc-io/laconicd/x/bond"
|
"git.vdb.to/cerc-io/laconicd/x/bond"
|
||||||
@ -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
|
||||||
|
|
||||||
@ -48,7 +51,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}
|
||||||
|
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// DefaultMaxBondAmountTokens are the default parameter values.
|
// DefaultMaxBondAmountTokens are the default parameter values.
|
||||||
var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000)
|
var DefaultMaxBondAmountTokens = sdkmath.NewInt(1000000000000) // 10^12 alnt
|
||||||
|
|
||||||
func NewParams(maxBondAmount sdk.Coin) Params {
|
func NewParams(maxBondAmount sdk.Coin) Params {
|
||||||
return Params{MaxBondAmount: maxBondAmount}
|
return Params{MaxBondAmount: maxBondAmount}
|
||||||
|
470
x/bond/tx.pb.go
470
x/bond/tx.pb.go
@ -6,6 +6,7 @@ package bond
|
|||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
_ "github.com/cosmos/cosmos-proto"
|
||||||
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
||||||
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"
|
||||||
@ -416,6 +417,102 @@ func (m *MsgCancelBondResponse) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_MsgCancelBondResponse proto.InternalMessageInfo
|
var xxx_messageInfo_MsgCancelBondResponse 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/bond 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_efb1a132c2c5bd62, []int{8}
|
||||||
|
}
|
||||||
|
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_efb1a132c2c5bd62, []int{9}
|
||||||
|
}
|
||||||
|
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((*MsgCreateBond)(nil), "cerc.bond.v1.MsgCreateBond")
|
proto.RegisterType((*MsgCreateBond)(nil), "cerc.bond.v1.MsgCreateBond")
|
||||||
proto.RegisterType((*MsgCreateBondResponse)(nil), "cerc.bond.v1.MsgCreateBondResponse")
|
proto.RegisterType((*MsgCreateBondResponse)(nil), "cerc.bond.v1.MsgCreateBondResponse")
|
||||||
@ -425,47 +522,56 @@ func init() {
|
|||||||
proto.RegisterType((*MsgWithdrawBondResponse)(nil), "cerc.bond.v1.MsgWithdrawBondResponse")
|
proto.RegisterType((*MsgWithdrawBondResponse)(nil), "cerc.bond.v1.MsgWithdrawBondResponse")
|
||||||
proto.RegisterType((*MsgCancelBond)(nil), "cerc.bond.v1.MsgCancelBond")
|
proto.RegisterType((*MsgCancelBond)(nil), "cerc.bond.v1.MsgCancelBond")
|
||||||
proto.RegisterType((*MsgCancelBondResponse)(nil), "cerc.bond.v1.MsgCancelBondResponse")
|
proto.RegisterType((*MsgCancelBondResponse)(nil), "cerc.bond.v1.MsgCancelBondResponse")
|
||||||
|
proto.RegisterType((*MsgUpdateParams)(nil), "cerc.bond.v1.MsgUpdateParams")
|
||||||
|
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cerc.bond.v1.MsgUpdateParamsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("cerc/bond/v1/tx.proto", fileDescriptor_efb1a132c2c5bd62) }
|
func init() { proto.RegisterFile("cerc/bond/v1/tx.proto", fileDescriptor_efb1a132c2c5bd62) }
|
||||||
|
|
||||||
var fileDescriptor_efb1a132c2c5bd62 = []byte{
|
var fileDescriptor_efb1a132c2c5bd62 = []byte{
|
||||||
// 548 bytes of a gzipped FileDescriptorProto
|
// 659 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x54, 0x41, 0x6f, 0xd3, 0x30,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x55, 0x4d, 0x6b, 0x13, 0x41,
|
||||||
0x18, 0x6d, 0x5a, 0x6d, 0x12, 0xde, 0x00, 0xa9, 0x62, 0x6c, 0x6d, 0x59, 0x5a, 0x32, 0x21, 0xaa,
|
0x18, 0xce, 0xa6, 0x1f, 0xd0, 0x69, 0xad, 0xb0, 0xb4, 0xa6, 0x49, 0xed, 0xb6, 0x6e, 0x11, 0x4b,
|
||||||
0x49, 0xb3, 0xd5, 0x71, 0x9b, 0x38, 0x75, 0x5c, 0x7b, 0xe9, 0x05, 0x89, 0x0b, 0x72, 0x12, 0xe3,
|
0xa1, 0x3b, 0x24, 0x82, 0x87, 0xe2, 0xc5, 0xd4, 0x6b, 0x40, 0xa2, 0x22, 0x78, 0x29, 0x93, 0xdd,
|
||||||
0x19, 0x1a, 0x7f, 0x25, 0x36, 0xdd, 0x7a, 0x41, 0x68, 0xbf, 0x00, 0x89, 0x7f, 0xc1, 0x69, 0x07,
|
0x71, 0x3a, 0x9a, 0x9d, 0x59, 0x77, 0xa6, 0x69, 0x73, 0x11, 0xe9, 0x5d, 0x10, 0xfc, 0x17, 0x9e,
|
||||||
0x7e, 0x02, 0x42, 0x3b, 0x4e, 0xe2, 0xc2, 0x69, 0x4c, 0x2d, 0xd2, 0xee, 0xfc, 0x02, 0x14, 0x27,
|
0x7a, 0x28, 0xfe, 0x02, 0x91, 0x1e, 0x8b, 0x5e, 0x3c, 0x55, 0x69, 0x85, 0xde, 0xfd, 0x05, 0xb2,
|
||||||
0x4d, 0x93, 0x35, 0x9b, 0xc4, 0x0d, 0x4e, 0x8d, 0xfd, 0x9e, 0xdf, 0xfb, 0xde, 0xe7, 0xcf, 0x45,
|
0x33, 0xd3, 0xcd, 0x6e, 0xb3, 0x2d, 0x78, 0xd3, 0x53, 0x76, 0xe6, 0x79, 0xf3, 0x3e, 0x1f, 0xfb,
|
||||||
0x6b, 0x1e, 0x0b, 0x3d, 0xe2, 0x82, 0xf4, 0xc9, 0xa8, 0x43, 0xf4, 0x11, 0x1e, 0x86, 0xa0, 0xa1,
|
0xce, 0x0e, 0x98, 0xf5, 0x71, 0xec, 0xc3, 0x0e, 0x67, 0x01, 0xec, 0xd5, 0xa1, 0xdc, 0xf5, 0xa2,
|
||||||
0xba, 0x1a, 0x6d, 0xe3, 0x68, 0x1b, 0x8f, 0x3a, 0xf5, 0x75, 0x0f, 0x54, 0x00, 0x8a, 0x04, 0x8a,
|
0x98, 0x4b, 0x6e, 0x4f, 0x25, 0xdb, 0x5e, 0xb2, 0xed, 0xf5, 0xea, 0xb5, 0x8a, 0xcf, 0x45, 0xc8,
|
||||||
0x47, 0xac, 0x40, 0xf1, 0x98, 0x56, 0xbf, 0xc7, 0x81, 0x83, 0xf9, 0x24, 0xd1, 0x57, 0xb2, 0xfb,
|
0x05, 0x0c, 0x05, 0x49, 0xaa, 0x42, 0x41, 0x74, 0x59, 0x6d, 0x86, 0x70, 0xc2, 0xd5, 0x23, 0x4c,
|
||||||
0x80, 0x03, 0xf0, 0x01, 0x23, 0x74, 0x28, 0x08, 0x95, 0x12, 0x34, 0xd5, 0x02, 0xa4, 0x4a, 0x50,
|
0x9e, 0xcc, 0xee, 0x4d, 0xc2, 0x39, 0xe9, 0x62, 0x88, 0x22, 0x0a, 0x11, 0x63, 0x5c, 0x22, 0x49,
|
||||||
0x3b, 0x11, 0x73, 0xa9, 0x62, 0x64, 0xd4, 0x71, 0x99, 0xa6, 0x1d, 0xe2, 0x81, 0x90, 0x31, 0xee,
|
0x39, 0x13, 0x06, 0x75, 0x4c, 0xb3, 0x0e, 0x12, 0x18, 0xf6, 0xea, 0x1d, 0x2c, 0x51, 0x1d, 0xfa,
|
||||||
0x7c, 0x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
0x74, 0x97, 0xcd, 0x5f, 0xe5, 0x93, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x64, 0x49, 0xe0, 0xe1,
|
0x3e, 0x98, 0xca, 0xcd, 0xf5, 0xc2, 0x50, 0xdf, 0x2c, 0x5c, 0xbb, 0x7d, 0x25, 0x9c, 0x12, 0x2f,
|
||||||
0xbe, 0x05, 0x00, 0x00,
|
0x2b, 0xe2, 0x05, 0x77, 0x3e, 0x4f, 0xbc, 0x63, 0x6a, 0x53, 0xb7, 0x99, 0x79, 0x2b, 0x08, 0x38,
|
||||||
|
0x05, 0x8b, 0x02, 0x1e, 0x9e, 0xb1, 0xcb, 0x02, 0x56, 0x95, 0x9a, 0xf2, 0x09, 0x98, 0xca, 0x8d,
|
||||||
|
0xe0, 0xb0, 0xdb, 0x2c, 0x5c, 0xe0, 0xb6, 0x68, 0x62, 0x6a, 0x63, 0x6f, 0xcf, 0xf6, 0x57, 0xad,
|
||||||
|
0xe6, 0xfd, 0xc3, 0x13, 0xc7, 0x3a, 0x3a, 0x71, 0xac, 0x9f, 0x27, 0x8e, 0xf5, 0xfe, 0xd4, 0x29,
|
||||||
|
0x1d, 0x9d, 0x3a, 0xa5, 0xef, 0xa7, 0x4e, 0xe9, 0xb9, 0x4b, 0xa8, 0xf4, 0x7a, 0x41, 0xc7, 0x4b,
|
||||||
|
0xae, 0x0c, 0x1c, 0xfb, 0x6b, 0x94, 0xc3, 0x2e, 0xf2, 0x39, 0xa3, 0x7e, 0x00, 0x77, 0x95, 0xd2,
|
||||||
|
0xce, 0xb8, 0xba, 0x2b, 0xee, 0xfe, 0x09, 0x00, 0x00, 0xff, 0xff, 0xef, 0x34, 0xfa, 0x7f, 0xf3,
|
||||||
|
0x06, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -488,6 +594,9 @@ type MsgClient interface {
|
|||||||
WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error)
|
WithdrawBond(ctx context.Context, in *MsgWithdrawBond, opts ...grpc.CallOption) (*MsgWithdrawBondResponse, error)
|
||||||
// CancelBond defines a method for cancelling a bond.
|
// CancelBond defines a method for cancelling a bond.
|
||||||
CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, error)
|
CancelBond(ctx context.Context, in *MsgCancelBond, opts ...grpc.CallOption) (*MsgCancelBondResponse, 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 {
|
||||||
@ -534,6 +643,15 @@ func (c *msgClient) CancelBond(ctx context.Context, in *MsgCancelBond, opts ...g
|
|||||||
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.bond.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 {
|
||||||
// CreateBond defines a method for creating a new bond.
|
// CreateBond defines a method for creating a new bond.
|
||||||
@ -544,6 +662,9 @@ type MsgServer interface {
|
|||||||
WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error)
|
WithdrawBond(context.Context, *MsgWithdrawBond) (*MsgWithdrawBondResponse, error)
|
||||||
// CancelBond defines a method for cancelling a bond.
|
// CancelBond defines a method for cancelling a bond.
|
||||||
CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, error)
|
CancelBond(context.Context, *MsgCancelBond) (*MsgCancelBondResponse, 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.
|
||||||
@ -562,6 +683,9 @@ func (*UnimplementedMsgServer) WithdrawBond(ctx context.Context, req *MsgWithdra
|
|||||||
func (*UnimplementedMsgServer) CancelBond(ctx context.Context, req *MsgCancelBond) (*MsgCancelBondResponse, error) {
|
func (*UnimplementedMsgServer) CancelBond(ctx context.Context, req *MsgCancelBond) (*MsgCancelBondResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method CancelBond not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method CancelBond 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)
|
||||||
@ -639,6 +763,24 @@ func _Msg_CancelBond_Handler(srv interface{}, ctx context.Context, dec func(inte
|
|||||||
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.bond.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.bond.v1.Msg",
|
ServiceName: "cerc.bond.v1.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
@ -659,6 +801,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "CancelBond",
|
MethodName: "CancelBond",
|
||||||
Handler: _Msg_CancelBond_Handler,
|
Handler: _Msg_CancelBond_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/bond/v1/tx.proto",
|
Metadata: "cerc/bond/v1/tx.proto",
|
||||||
@ -946,6 +1092,69 @@ func (m *MsgCancelBondResponse) 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
|
||||||
@ -1079,6 +1288,30 @@ func (m *MsgCancelBondResponse) 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
|
||||||
}
|
}
|
||||||
@ -1843,6 +2076,171 @@ func (m *MsgCancelBondResponse) 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
|
||||||
|
@ -2,6 +2,7 @@ package keeper
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
@ -79,7 +80,7 @@ func (k Keeper) OnboardParticipant(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !params.OnboardingEnabled {
|
if !params.OnboardingEnabled {
|
||||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Validator onboarding is disabled")
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Onboarding is disabled")
|
||||||
}
|
}
|
||||||
|
|
||||||
message, err := json.Marshal(msg.EthPayload)
|
message, err := json.Marshal(msg.EthPayload)
|
||||||
@ -100,6 +101,8 @@ func (k Keeper) OnboardParticipant(
|
|||||||
participant := &onboardingTypes.Participant{
|
participant := &onboardingTypes.Participant{
|
||||||
CosmosAddress: signerAddress.String(),
|
CosmosAddress: signerAddress.String(),
|
||||||
NitroAddress: nitroAddress,
|
NitroAddress: nitroAddress,
|
||||||
|
Role: msg.Role,
|
||||||
|
KycId: msg.KycId,
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := k.StoreParticipant(ctx, participant); err != nil {
|
if err := k.StoreParticipant(ctx, participant); err != nil {
|
||||||
@ -134,3 +137,35 @@ func (k Keeper) ListParticipants(ctx sdk.Context) ([]*onboardingTypes.Participan
|
|||||||
|
|
||||||
return participants, nil
|
return participants, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetParticipantByAddress - get participant by cosmos (laconic) address.
|
||||||
|
func (k Keeper) GetParticipantByAddress(ctx sdk.Context, address string) (onboardingTypes.Participant, error) {
|
||||||
|
participant, err := k.Participants.Get(ctx, address)
|
||||||
|
if err != nil {
|
||||||
|
if errors.Is(err, collections.ErrNotFound) {
|
||||||
|
return onboardingTypes.Participant{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participant with given address not found.")
|
||||||
|
}
|
||||||
|
return onboardingTypes.Participant{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return participant, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetParticipantByNitroAddress - get participant by nitro address.
|
||||||
|
func (k Keeper) GetParticipantByNitroAddress(ctx sdk.Context, nitroAddress string) (onboardingTypes.Participant, error) {
|
||||||
|
var participant onboardingTypes.Participant
|
||||||
|
|
||||||
|
err := k.Participants.Walk(ctx, nil, func(key string, value onboardingTypes.Participant) (bool, error) {
|
||||||
|
if value.NitroAddress == nitroAddress {
|
||||||
|
participant = value
|
||||||
|
return true, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return false, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return onboardingTypes.Participant{}, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return participant, nil
|
||||||
|
}
|
||||||
|
@ -3,7 +3,9 @@ package keeper
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
|
||||||
onboardingtypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
onboardingtypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
)
|
)
|
||||||
@ -33,3 +35,41 @@ func (qs queryServer) Participants(
|
|||||||
|
|
||||||
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
|
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetParticipantByAddress implements the GetParticipantByAddress query.
|
||||||
|
func (qs queryServer) GetParticipantByAddress(
|
||||||
|
c context.Context,
|
||||||
|
req *onboardingtypes.QueryGetParticipantByAddressRequest,
|
||||||
|
) (*onboardingtypes.QueryGetParticipantByAddressResponse, error) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
|
if req.Address == "" {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cosmos (laconic) address is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
participant, err := qs.k.GetParticipantByAddress(ctx, req.Address)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &onboardingtypes.QueryGetParticipantByAddressResponse{Participant: &participant}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetParticipantByNitroAddress implements the GetParticipantByNitroAddress query.
|
||||||
|
func (qs queryServer) GetParticipantByNitroAddress(
|
||||||
|
c context.Context,
|
||||||
|
req *onboardingtypes.QueryGetParticipantByNitroAddressRequest,
|
||||||
|
) (*onboardingtypes.QueryGetParticipantByNitroAddressResponse, error) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
|
if req.NitroAddress == "" {
|
||||||
|
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "nitro address is required")
|
||||||
|
}
|
||||||
|
|
||||||
|
participant, err := qs.k.GetParticipantByNitroAddress(ctx, req.NitroAddress)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return &onboardingtypes.QueryGetParticipantByNitroAddressResponse{Participant: &participant}, nil
|
||||||
|
}
|
||||||
|
@ -18,6 +18,22 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
Short: "List participants",
|
Short: "List participants",
|
||||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "GetParticipantByAddress",
|
||||||
|
Use: "get-by-address [address]",
|
||||||
|
Short: "Get participant by address",
|
||||||
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||||
|
{ProtoField: "address"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "GetParticipantByNitroAddress",
|
||||||
|
Use: "get-by-nitro-address [nitro_address]",
|
||||||
|
Short: "Get participant by nitro address",
|
||||||
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||||
|
{ProtoField: "nitro_address"},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// TODO: Use JSON file for input
|
// TODO: Use JSON file for input
|
||||||
@ -26,11 +42,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||||
{
|
{
|
||||||
RpcMethod: "OnboardParticipant",
|
RpcMethod: "OnboardParticipant",
|
||||||
Use: "enroll",
|
Use: "enroll [eth_payload] [eth_signature] [role] [kyc_id]",
|
||||||
Short: "Enroll a testnet validator",
|
Short: "Enroll a testnet validator",
|
||||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||||
{ProtoField: "eth_payload"},
|
{ProtoField: "eth_payload"},
|
||||||
{ProtoField: "eth_signature"},
|
{ProtoField: "eth_signature"},
|
||||||
|
{ProtoField: "role"},
|
||||||
|
{ProtoField: "kyc_id"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
package onboarding
|
package onboarding
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
errorsmod "cosmossdk.io/errors"
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var PERMITTED_ROLES = []string{"participant", "validator"}
|
||||||
|
|
||||||
var _ sdk.Msg = &MsgOnboardParticipant{}
|
var _ sdk.Msg = &MsgOnboardParticipant{}
|
||||||
|
|
||||||
func (msg MsgOnboardParticipant) ValidateBasic() error {
|
func (msg MsgOnboardParticipant) ValidateBasic() error {
|
||||||
@ -18,7 +22,23 @@ func (msg MsgOnboardParticipant) ValidateBasic() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(msg.EthSignature) != 132 {
|
if len(msg.EthSignature) != 132 {
|
||||||
return errorsmod.Wrap(sdkerrors.ErrNoSignatures, "Invalid signature.")
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid signature.")
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(msg.KycId) == 0 {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Empty KYC ID.")
|
||||||
|
}
|
||||||
|
|
||||||
|
isRoleValid := false
|
||||||
|
for _, v := range PERMITTED_ROLES {
|
||||||
|
if msg.Role == v {
|
||||||
|
isRoleValid = true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if !isRoleValid {
|
||||||
|
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("Participant role has to be one of: %v", PERMITTED_ROLES))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -71,8 +71,14 @@ func (m *Params) GetOnboardingEnabled() bool {
|
|||||||
// Participant defines the data that will be stored for each enrolled
|
// Participant defines the data that will be stored for each enrolled
|
||||||
// participant
|
// participant
|
||||||
type Participant struct {
|
type Participant struct {
|
||||||
|
// participant's cosmos (laconic) address
|
||||||
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
|
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
|
||||||
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"`
|
// participant's Nitro address
|
||||||
|
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"`
|
||||||
|
// participant's role (participant | validator)
|
||||||
|
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty" json:"role" yaml:"role"`
|
||||||
|
// participant's KYC receipt ID
|
||||||
|
KycId string `protobuf:"bytes,4,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty" json:"kyc_id" yaml:"kyc_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Participant) Reset() { *m = Participant{} }
|
func (m *Participant) Reset() { *m = Participant{} }
|
||||||
@ -122,6 +128,20 @@ func (m *Participant) GetNitroAddress() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *Participant) GetRole() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Role
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Participant) GetKycId() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.KycId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// EthPayload defines the payload that is signed by the ethereum private key
|
// EthPayload defines the payload that is signed by the ethereum private key
|
||||||
type EthPayload struct {
|
type EthPayload struct {
|
||||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" json:"address" yaml:"address"`
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" json:"address" yaml:"address"`
|
||||||
@ -186,29 +206,32 @@ func init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_59afed779274eaf0 = []byte{
|
var fileDescriptor_59afed779274eaf0 = []byte{
|
||||||
// 343 bytes of a gzipped FileDescriptorProto
|
// 399 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4a, 0xc3, 0x30,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0xce, 0xd2, 0x40,
|
||||||
0x1c, 0xc7, 0x57, 0x85, 0xa9, 0xd1, 0x09, 0x06, 0x05, 0x15, 0x6c, 0x67, 0xbd, 0x4c, 0xc6, 0x5a,
|
0x14, 0x85, 0xe9, 0x0f, 0xa2, 0x8e, 0x62, 0xe2, 0x44, 0x23, 0x4a, 0xec, 0x60, 0xdd, 0x60, 0x08,
|
||||||
0xc6, 0x0e, 0x82, 0x9e, 0x2c, 0xec, 0x3e, 0x7a, 0xf0, 0xe0, 0x65, 0xa4, 0x7f, 0xac, 0x91, 0x36,
|
0x9d, 0x10, 0x12, 0x4d, 0x74, 0x65, 0x13, 0x16, 0xee, 0x48, 0x17, 0x2e, 0xdc, 0x90, 0xe9, 0x4c,
|
||||||
0xbf, 0x91, 0x84, 0xe2, 0xde, 0xc2, 0xd7, 0xf1, 0x0d, 0x3c, 0xee, 0xe8, 0xa9, 0xc8, 0xf6, 0x06,
|
0xad, 0x23, 0x6d, 0x87, 0xcc, 0x34, 0x8d, 0x7d, 0x0b, 0x9f, 0xc1, 0xa7, 0x71, 0xc9, 0xd2, 0x55,
|
||||||
0x7d, 0x02, 0x69, 0xb3, 0x6e, 0xeb, 0xf4, 0x96, 0xdf, 0xf7, 0xcf, 0xe7, 0x17, 0x48, 0xd0, 0x8d,
|
0x63, 0xe0, 0x0d, 0xfa, 0x04, 0xa6, 0x33, 0x14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f4, 0xcc, 0xa0, 0x6a, 0xb5, 0x21, 0xe8, 0xda,
|
||||||
0xd5, 0xc0, 0x5d, 0xb4, 0x9b, 0x88, 0x68, 0x79, 0xa9, 0x8b, 0x3c, 0x33, 0xce, 0x54, 0x31, 0x11,
|
0xd7, 0x46, 0xf8, 0x16, 0xf4, 0x37, 0x05, 0x5d, 0x73, 0x36, 0xec, 0xe9, 0x08, 0xaa, 0x4a, 0x34,
|
||||||
0x51, 0x55, 0x2a, 0x8e, 0x6e, 0x91, 0x72, 0x9c, 0xaf, 0xb9, 0xae, 0xcd, 0xe6, 0xba, 0xf6, 0x33,
|
0x32, 0x11, 0xa3, 0x37, 0xa1, 0x63, 0xe7, 0xdf, 0xd9, 0x14, 0xf4, 0x13, 0x73, 0x72, 0x00, 0x96,
|
||||||
0xd7, 0xb5, 0x8f, 0x85, 0xde, 0x98, 0x2d, 0xf4, 0xc6, 0xf7, 0x42, 0x6f, 0x3c, 0x77, 0x22, 0x2a,
|
0xd9, 0xb7, 0x15, 0x29, 0x62, 0x41, 0x18, 0xfc, 0x00, 0xee, 0xb6, 0xff, 0xcd, 0xab, 0xaa, 0x44,
|
||||||
0xad, 0x34, 0xf0, 0x2c, 0x09, 0x76, 0xf1, 0xe8, 0x3d, 0x0a, 0x76, 0x4c, 0x7c, 0x60, 0xd4, 0x0f,
|
0x2f, 0x0d, 0xe6, 0xea, 0xf9, 0xa7, 0x87, 0x37, 0x09, 0x38, 0x05, 0xdd, 0x44, 0x45, 0xc7, 0xaf,
|
||||||
0xec, 0xf7, 0x8d, 0x9f, 0xe1, 0x35, 0xcb, 0x07, 0x1f, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91,
|
0x7f, 0x5e, 0x95, 0xe8, 0xa9, 0x09, 0x26, 0x2a, 0x6a, 0x42, 0x75, 0xe9, 0xd7, 0x2e, 0xcf, 0xfb,
|
||||||
0x47, 0xeb, 0x34, 0x41, 0x02, 0x00, 0x00,
|
0xbd, 0xb7, 0xad, 0xdd, 0xde, 0xb6, 0xfe, 0xee, 0x6d, 0xeb, 0xe7, 0xc1, 0xee, 0xec, 0x0e, 0x76,
|
||||||
|
0xe7, 0xcf, 0xc1, 0xee, 0x7c, 0x99, 0x44, 0x3c, 0x73, 0x73, 0x16, 0xb8, 0x99, 0xc0, 0xf5, 0x75,
|
||||||
|
0xcd, 0xb8, 0xc0, 0x31, 0xa1, 0x22, 0xe5, 0x94, 0xe1, 0x1f, 0x17, 0x27, 0x18, 0xf4, 0xf5, 0x65,
|
||||||
|
0x2d, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x87, 0xe5, 0xd5, 0x6b, 0xaa, 0x02, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Params) Marshal() (dAtA []byte, err error) {
|
func (m *Params) Marshal() (dAtA []byte, err error) {
|
||||||
@ -264,6 +287,20 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if len(m.KycId) > 0 {
|
||||||
|
i -= len(m.KycId)
|
||||||
|
copy(dAtA[i:], m.KycId)
|
||||||
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.KycId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(m.Role) > 0 {
|
||||||
|
i -= len(m.Role)
|
||||||
|
copy(dAtA[i:], m.Role)
|
||||||
|
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.Role)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
if len(m.NitroAddress) > 0 {
|
if len(m.NitroAddress) > 0 {
|
||||||
i -= len(m.NitroAddress)
|
i -= len(m.NitroAddress)
|
||||||
copy(dAtA[i:], m.NitroAddress)
|
copy(dAtA[i:], m.NitroAddress)
|
||||||
@ -355,6 +392,14 @@ func (m *Participant) Size() (n int) {
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovOnboarding(uint64(l))
|
n += 1 + l + sovOnboarding(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(m.Role)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovOnboarding(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.KycId)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovOnboarding(uint64(l))
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -544,6 +589,70 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowOnboarding
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthOnboarding
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthOnboarding
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Role = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field KycId", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowOnboarding
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthOnboarding
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthOnboarding
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.KycId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
||||||
|
@ -76,7 +76,7 @@ func (m *QueryParticipantsRequest) GetPagination() *query.PageRequest {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// QueryParticipantsResponse is response type for get the participants
|
// QueryParticipantsResponse is response type for querying the participants
|
||||||
type QueryParticipantsResponse struct {
|
type QueryParticipantsResponse struct {
|
||||||
Participants []*Participant `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty" json:"participants" yaml:"participants"`
|
Participants []*Participant `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty" json:"participants" yaml:"participants"`
|
||||||
// pagination defines the pagination in the response.
|
// pagination defines the pagination in the response.
|
||||||
@ -130,39 +130,247 @@ func (m *QueryParticipantsResponse) GetPagination() *query.PageResponse {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByAddressRequest queries participant by the laconic
|
||||||
|
// address
|
||||||
|
type QueryGetParticipantByAddressRequest struct {
|
||||||
|
// Laconic address
|
||||||
|
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) Reset() { *m = QueryGetParticipantByAddressRequest{} }
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryGetParticipantByAddressRequest) ProtoMessage() {}
|
||||||
|
func (*QueryGetParticipantByAddressRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{2}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetParticipantByAddressRequest.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 *QueryGetParticipantByAddressRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByAddressRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByAddressRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetParticipantByAddressRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) GetAddress() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Address
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByAddressResponse is response type for querying
|
||||||
|
// participant by the laconic address
|
||||||
|
type QueryGetParticipantByAddressResponse struct {
|
||||||
|
// Participant details
|
||||||
|
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) Reset() { *m = QueryGetParticipantByAddressResponse{} }
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryGetParticipantByAddressResponse) ProtoMessage() {}
|
||||||
|
func (*QueryGetParticipantByAddressResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{3}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetParticipantByAddressResponse.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 *QueryGetParticipantByAddressResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByAddressResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByAddressResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetParticipantByAddressResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) GetParticipant() *Participant {
|
||||||
|
if m != nil {
|
||||||
|
return m.Participant
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
|
||||||
|
// address
|
||||||
|
type QueryGetParticipantByNitroAddressRequest struct {
|
||||||
|
// Nitro address
|
||||||
|
NitroAddress string `protobuf:"bytes,1,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) Reset() {
|
||||||
|
*m = QueryGetParticipantByNitroAddressRequest{}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryGetParticipantByNitroAddressRequest) ProtoMessage() {}
|
||||||
|
func (*QueryGetParticipantByNitroAddressRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{4}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.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 *QueryGetParticipantByNitroAddressRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetParticipantByNitroAddressRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) GetNitroAddress() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.NitroAddress
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryGetParticipantByNitroAddressResponse is response type for querying
|
||||||
|
// participant by the nitro address
|
||||||
|
type QueryGetParticipantByNitroAddressResponse struct {
|
||||||
|
// Participant details
|
||||||
|
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) Reset() {
|
||||||
|
*m = QueryGetParticipantByNitroAddressResponse{}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) String() string {
|
||||||
|
return proto.CompactTextString(m)
|
||||||
|
}
|
||||||
|
func (*QueryGetParticipantByNitroAddressResponse) ProtoMessage() {}
|
||||||
|
func (*QueryGetParticipantByNitroAddressResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_80831d904221d27d, []int{5}
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.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 *QueryGetParticipantByNitroAddressResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryGetParticipantByNitroAddressResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) GetParticipant() *Participant {
|
||||||
|
if m != nil {
|
||||||
|
return m.Participant
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*QueryParticipantsRequest)(nil), "cerc.onboarding.v1.QueryParticipantsRequest")
|
proto.RegisterType((*QueryParticipantsRequest)(nil), "cerc.onboarding.v1.QueryParticipantsRequest")
|
||||||
proto.RegisterType((*QueryParticipantsResponse)(nil), "cerc.onboarding.v1.QueryParticipantsResponse")
|
proto.RegisterType((*QueryParticipantsResponse)(nil), "cerc.onboarding.v1.QueryParticipantsResponse")
|
||||||
|
proto.RegisterType((*QueryGetParticipantByAddressRequest)(nil), "cerc.onboarding.v1.QueryGetParticipantByAddressRequest")
|
||||||
|
proto.RegisterType((*QueryGetParticipantByAddressResponse)(nil), "cerc.onboarding.v1.QueryGetParticipantByAddressResponse")
|
||||||
|
proto.RegisterType((*QueryGetParticipantByNitroAddressRequest)(nil), "cerc.onboarding.v1.QueryGetParticipantByNitroAddressRequest")
|
||||||
|
proto.RegisterType((*QueryGetParticipantByNitroAddressResponse)(nil), "cerc.onboarding.v1.QueryGetParticipantByNitroAddressResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("cerc/onboarding/v1/query.proto", fileDescriptor_80831d904221d27d) }
|
func init() { proto.RegisterFile("cerc/onboarding/v1/query.proto", fileDescriptor_80831d904221d27d) }
|
||||||
|
|
||||||
var fileDescriptor_80831d904221d27d = []byte{
|
var fileDescriptor_80831d904221d27d = []byte{
|
||||||
// 380 bytes of a gzipped FileDescriptorProto
|
// 535 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6a, 0x1b, 0x31,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
|
||||||
0x1c, 0xc7, 0x2d, 0x97, 0x76, 0x90, 0x3d, 0x89, 0x0e, 0xae, 0x29, 0xe7, 0xe3, 0x0a, 0xf5, 0xd1,
|
0x10, 0xce, 0x96, 0x3f, 0xb1, 0x09, 0x97, 0x15, 0x12, 0x21, 0xaa, 0xdc, 0xc8, 0x41, 0xd4, 0x94,
|
||||||
0xd6, 0x12, 0xe7, 0x6e, 0x1d, 0x3d, 0xb4, 0xab, 0xeb, 0xb1, 0x9b, 0xee, 0x2c, 0x84, 0x8a, 0xad,
|
0x76, 0x97, 0x98, 0x03, 0x15, 0x02, 0xa1, 0xe6, 0x40, 0x6f, 0x50, 0x7c, 0xe4, 0x82, 0xd6, 0xf6,
|
||||||
0xdf, 0xf9, 0x24, 0x1f, 0xf5, 0xda, 0x27, 0x28, 0x94, 0xce, 0x7d, 0x9d, 0x8c, 0x86, 0x40, 0xc8,
|
0xca, 0x5a, 0x94, 0xee, 0xba, 0xde, 0x6d, 0x44, 0x84, 0x7a, 0xe1, 0x09, 0x90, 0x10, 0x2f, 0xc3,
|
||||||
0x14, 0x82, 0x9d, 0x27, 0xc8, 0x13, 0x84, 0x3b, 0x19, 0x2c, 0x27, 0x17, 0x92, 0x4d, 0xe8, 0xf7,
|
0x89, 0x23, 0xc7, 0x4a, 0x08, 0xc4, 0x09, 0xa1, 0x84, 0x27, 0xe0, 0x09, 0x90, 0xd7, 0x86, 0xae,
|
||||||
0xfb, 0xfe, 0xf9, 0x08, 0xe1, 0x20, 0x13, 0x45, 0xc6, 0x40, 0xa7, 0xc0, 0x8b, 0xb9, 0xd2, 0x92,
|
0x8b, 0xf3, 0x03, 0xe2, 0x66, 0xcf, 0xcc, 0x37, 0xdf, 0xf7, 0xcd, 0x8c, 0x0d, 0x9d, 0x88, 0x65,
|
||||||
0x95, 0x09, 0x5b, 0xad, 0x45, 0xb1, 0xa1, 0x79, 0x01, 0x16, 0x08, 0xa9, 0xe6, 0xf4, 0x38, 0xa7,
|
0x11, 0x91, 0x22, 0x94, 0x34, 0x8b, 0xb9, 0x48, 0xc8, 0xa8, 0x4f, 0x0e, 0x0e, 0x59, 0x36, 0xc6,
|
||||||
0x65, 0xd2, 0x7f, 0x2d, 0x41, 0x42, 0x3d, 0x66, 0xd5, 0xc9, 0x6d, 0xf6, 0x3f, 0x64, 0x60, 0x96,
|
0x69, 0x26, 0xb5, 0x44, 0x28, 0xcf, 0xe3, 0x93, 0x3c, 0x1e, 0xf5, 0x3b, 0x97, 0x13, 0x99, 0x48,
|
||||||
0x60, 0x58, 0xca, 0x8d, 0x70, 0x16, 0xac, 0x4c, 0x52, 0x61, 0x79, 0xc2, 0x72, 0x2e, 0x95, 0xe6,
|
0x93, 0x26, 0xf9, 0x53, 0x51, 0xd9, 0xd9, 0x88, 0xa4, 0xda, 0x97, 0x8a, 0x84, 0x54, 0xb1, 0xa2,
|
||||||
0x56, 0x81, 0x3e, 0xec, 0xbe, 0x6b, 0x48, 0xf5, 0x32, 0xdc, 0xd2, 0x5b, 0x09, 0x20, 0x17, 0x82,
|
0x05, 0x19, 0xf5, 0x43, 0xa6, 0x69, 0x9f, 0xa4, 0x34, 0xe1, 0x82, 0x6a, 0x2e, 0x45, 0x59, 0xdb,
|
||||||
0xf1, 0x5c, 0x31, 0xae, 0x35, 0xd8, 0xda, 0xc1, 0xb8, 0x69, 0x94, 0xe2, 0xde, 0xf7, 0x2a, 0x64,
|
0xab, 0x61, 0xb5, 0x38, 0x8a, 0xa2, 0xd5, 0x44, 0xca, 0x64, 0xc8, 0x08, 0x4d, 0x39, 0xa1, 0x42,
|
||||||
0xca, 0x0b, 0xab, 0x32, 0x95, 0x73, 0x6d, 0xcd, 0x4c, 0xac, 0xd6, 0xc2, 0x58, 0xf2, 0x15, 0xe3,
|
0x48, 0x6d, 0x3a, 0xa8, 0x22, 0xeb, 0x86, 0xb0, 0xfd, 0x24, 0x27, 0xd9, 0xa3, 0x99, 0xe6, 0x11,
|
||||||
0x63, 0x64, 0x0f, 0x85, 0x28, 0xee, 0x8c, 0xdf, 0x53, 0xd7, 0x8f, 0x56, 0xfd, 0xa8, 0x43, 0x3c,
|
0x4f, 0xa9, 0xd0, 0x2a, 0x60, 0x07, 0x87, 0x4c, 0x69, 0xf4, 0x10, 0xc2, 0x13, 0xca, 0x36, 0xe8,
|
||||||
0xf4, 0xa3, 0x53, 0x2e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xc9, 0xea, 0x42, 0xba, 0xeb, 0xbd, 0xfa, 0xf8, 0xfd,
|
||||||
|
0xcd, 0x8a, 0x8b, 0xba, 0xa4, 0xe6, 0x6b, 0xab, 0xdc, 0xd5, 0x7b, 0x00, 0xaf, 0xcc, 0xd8, 0x24,
|
||||||
|
0xba, 0x33, 0x93, 0x74, 0xfe, 0xf1, 0x74, 0xb6, 0xff, 0x1e, 0x58, 0x0a, 0xf7, 0x8d, 0xf0, 0x4d,
|
||||||
|
0xb4, 0xb1, 0x48, 0x38, 0x79, 0x59, 0xee, 0xf9, 0x08, 0x7d, 0x02, 0x70, 0x75, 0xde, 0x42, 0xd1,
|
||||||
|
0xbd, 0xa5, 0xe5, 0xd4, 0x1c, 0x56, 0xe7, 0xfe, 0x3f, 0xa2, 0x4b, 0x47, 0xdb, 0xc6, 0x91, 0x8f,
|
||||||
|
0x6e, 0x2d, 0x76, 0x54, 0xb9, 0xdf, 0xa3, 0xc1, 0xe0, 0xc3, 0xc4, 0x01, 0xc7, 0x13, 0x07, 0x7c,
|
||||||
|
0x9b, 0x38, 0xe0, 0xf5, 0xd4, 0x69, 0x1c, 0x4f, 0x9d, 0xc6, 0x97, 0xa9, 0xd3, 0x78, 0xea, 0x25,
|
||||||
|
0x5c, 0xe3, 0x51, 0x1c, 0x62, 0x2d, 0x4d, 0xd7, 0x2d, 0x2e, 0xc9, 0x90, 0x46, 0x52, 0xf0, 0x28,
|
||||||
|
0x26, 0x2f, 0x2c, 0x8e, 0xf0, 0xbc, 0xf9, 0x63, 0xde, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x80,
|
||||||
|
0xc2, 0x03, 0x70, 0xec, 0x05, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -179,6 +387,10 @@ const _ = grpc.SupportPackageIsVersion4
|
|||||||
type QueryClient interface {
|
type QueryClient interface {
|
||||||
// Participants queries Participants list
|
// Participants queries Participants list
|
||||||
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||||
|
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||||
|
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
|
||||||
|
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||||
|
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -198,10 +410,32 @@ func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsReq
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error) {
|
||||||
|
out := new(QueryGetParticipantByAddressResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Query/GetParticipantByAddress", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||||
|
out := new(QueryGetParticipantByNitroAddressResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Participants queries Participants list
|
// Participants queries Participants list
|
||||||
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||||
|
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||||
|
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
|
||||||
|
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||||
|
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||||
@ -211,6 +445,12 @@ type UnimplementedQueryServer struct {
|
|||||||
func (*UnimplementedQueryServer) Participants(ctx context.Context, req *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
func (*UnimplementedQueryServer) Participants(ctx context.Context, req *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedQueryServer) GetParticipantByAddress(ctx context.Context, req *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByAddress not implemented")
|
||||||
|
}
|
||||||
|
func (*UnimplementedQueryServer) GetParticipantByNitroAddress(ctx context.Context, req *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByNitroAddress not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||||
s.RegisterService(&_Query_serviceDesc, srv)
|
s.RegisterService(&_Query_serviceDesc, srv)
|
||||||
@ -234,6 +474,42 @@ func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_GetParticipantByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryGetParticipantByAddressRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).GetParticipantByAddress(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/cerc.onboarding.v1.Query/GetParticipantByAddress",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).GetParticipantByAddress(ctx, req.(*QueryGetParticipantByAddressRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Query_GetParticipantByNitroAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryGetParticipantByNitroAddressRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, req.(*QueryGetParticipantByNitroAddressRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "cerc.onboarding.v1.Query",
|
ServiceName: "cerc.onboarding.v1.Query",
|
||||||
HandlerType: (*QueryServer)(nil),
|
HandlerType: (*QueryServer)(nil),
|
||||||
@ -242,6 +518,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "Participants",
|
MethodName: "Participants",
|
||||||
Handler: _Query_Participants_Handler,
|
Handler: _Query_Participants_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetParticipantByAddress",
|
||||||
|
Handler: _Query_GetParticipantByAddress_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetParticipantByNitroAddress",
|
||||||
|
Handler: _Query_GetParticipantByNitroAddress_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/onboarding/v1/query.proto",
|
Metadata: "cerc/onboarding/v1/query.proto",
|
||||||
@ -331,6 +615,136 @@ func (m *QueryParticipantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
|
|||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) 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 *QueryGetParticipantByAddressRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Address) > 0 {
|
||||||
|
i -= len(m.Address)
|
||||||
|
copy(dAtA[i:], m.Address)
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) 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 *QueryGetParticipantByAddressResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Participant != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Participant.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) 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 *QueryGetParticipantByNitroAddressRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.NitroAddress) > 0 {
|
||||||
|
i -= len(m.NitroAddress)
|
||||||
|
copy(dAtA[i:], m.NitroAddress)
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.NitroAddress)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) 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 *QueryGetParticipantByNitroAddressResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Participant != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Participant.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||||
offset -= sovQuery(v)
|
offset -= sovQuery(v)
|
||||||
base := offset
|
base := offset
|
||||||
@ -374,6 +788,58 @@ func (m *QueryParticipantsResponse) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.Address)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Participant != nil {
|
||||||
|
l = m.Participant.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.NitroAddress)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Participant != nil {
|
||||||
|
l = m.Participant.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func sovQuery(x uint64) (n int) {
|
func sovQuery(x uint64) (n int) {
|
||||||
return (math_bits.Len64(x|1) + 6) / 7
|
return (math_bits.Len64(x|1) + 6) / 7
|
||||||
}
|
}
|
||||||
@ -586,6 +1052,342 @@ func (m *QueryParticipantsResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressRequest) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryGetParticipantByAddressRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetParticipantByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Address = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByAddressResponse) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryGetParticipantByAddressResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetParticipantByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Participant", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Participant == nil {
|
||||||
|
m.Participant = &Participant{}
|
||||||
|
}
|
||||||
|
if err := m.Participant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressRequest) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryGetParticipantByNitroAddressRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryGetParticipantByNitroAddressResponse) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryGetParticipantByNitroAddressResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Participant", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Participant == nil {
|
||||||
|
m.Participant = &Participant{}
|
||||||
|
}
|
||||||
|
if err := m.Participant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func skipQuery(dAtA []byte) (n int, err error) {
|
func skipQuery(dAtA []byte) (n int, err error) {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
@ -69,6 +69,114 @@ func local_request_Query_Participants_0(ctx context.Context, marshaler runtime.M
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func request_Query_GetParticipantByAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetParticipantByAddressRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["address"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Address, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.GetParticipantByAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_GetParticipantByAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetParticipantByAddressRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["address"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Address, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.GetParticipantByAddress(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Query_GetParticipantByNitroAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetParticipantByNitroAddressRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["nitro_address"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nitro_address")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.NitroAddress, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nitro_address", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.GetParticipantByNitroAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_GetParticipantByNitroAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryGetParticipantByNitroAddressRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["nitro_address"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nitro_address")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.NitroAddress, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nitro_address", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.GetParticipantByNitroAddress(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||||
// UnaryRPC :call QueryServer directly.
|
// UnaryRPC :call QueryServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@ -98,6 +206,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetParticipantByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Query_GetParticipantByAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetParticipantByNitroAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Query_GetParticipantByNitroAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByNitroAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,13 +313,61 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetParticipantByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Query_GetParticipantByAddress_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_GetParticipantByNitroAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Query_GetParticipantByNitroAddress_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByNitroAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
pattern_Query_Participants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "participants"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Query_Participants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "participants"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_GetParticipantByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_GetParticipantByNitroAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "nitro_address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
forward_Query_Participants_0 = runtime.ForwardResponseMessage
|
forward_Query_Participants_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByAddress_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_GetParticipantByNitroAddress_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
@ -36,6 +36,8 @@ type MsgOnboardParticipant struct {
|
|||||||
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||||
EthPayload EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload"`
|
EthPayload EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload"`
|
||||||
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
|
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
|
||||||
|
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
|
||||||
|
KycId string `protobuf:"bytes,5,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *MsgOnboardParticipant) Reset() { *m = MsgOnboardParticipant{} }
|
func (m *MsgOnboardParticipant) Reset() { *m = MsgOnboardParticipant{} }
|
||||||
@ -92,6 +94,20 @@ func (m *MsgOnboardParticipant) GetEthSignature() string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) GetRole() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Role
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *MsgOnboardParticipant) GetKycId() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.KycId
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||||
// type.
|
// type.
|
||||||
type MsgOnboardParticipantResponse struct {
|
type MsgOnboardParticipantResponse struct {
|
||||||
@ -138,31 +154,33 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
|
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
|
||||||
|
|
||||||
var fileDescriptor_6bfde34a550e231e = []byte{
|
var fileDescriptor_6bfde34a550e231e = []byte{
|
||||||
// 370 bytes of a gzipped FileDescriptorProto
|
// 401 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0x32, 0x41,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8a, 0x13, 0x31,
|
||||||
0x18, 0xc7, 0x77, 0xf4, 0x7d, 0x5f, 0x78, 0xc7, 0x82, 0x58, 0x8a, 0x64, 0xab, 0x55, 0xd6, 0x43,
|
0x1c, 0xc6, 0x27, 0xbb, 0xed, 0x82, 0xa9, 0x82, 0x04, 0x17, 0x87, 0x51, 0x67, 0xcb, 0xec, 0xc1,
|
||||||
0x2a, 0xb4, 0x83, 0x76, 0xeb, 0x28, 0x78, 0x94, 0xc4, 0x6e, 0x5d, 0x64, 0xdc, 0x1d, 0xc6, 0x01,
|
0xee, 0x82, 0x13, 0xba, 0xde, 0x3c, 0x16, 0xf6, 0xe0, 0x61, 0xb1, 0xd4, 0x9b, 0x97, 0x92, 0x66,
|
||||||
0x9d, 0x67, 0xd9, 0x99, 0xc4, 0x6e, 0xe1, 0x27, 0x08, 0xfa, 0x08, 0x7d, 0x01, 0xe9, 0xd2, 0x57,
|
0x42, 0x1a, 0x3a, 0xcd, 0x7f, 0x98, 0xc4, 0xd2, 0xde, 0xa4, 0x4f, 0x20, 0xf8, 0x08, 0xbe, 0x40,
|
||||||
0xf0, 0x28, 0x74, 0xe9, 0x14, 0xa1, 0x81, 0x5f, 0x23, 0x5c, 0x35, 0x17, 0xda, 0xa0, 0xdb, 0xcc,
|
0xf1, 0x29, 0x7a, 0x2c, 0x78, 0xf1, 0x24, 0x32, 0x15, 0xfa, 0x1a, 0xd2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, 0x90, 0xc2, 0xf3, 0xc9, 0x30, 0x46, 0xe8,
|
0x59, 0x5c, 0xa3, 0x4e, 0x67, 0x59, 0x84, 0x68, 0x55, 0x84, 0xe8, 0x57, 0x11, 0xa2, 0xcf, 0xeb,
|
||||||
0xfc, 0x8b, 0x4e, 0x7b, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7c, 0x8d, 0x55, 0x7f, 0x02,
|
0xd0, 0x5b, 0xad, 0x43, 0xef, 0xc7, 0x3a, 0xf4, 0x3e, 0xb4, 0xa4, 0xb2, 0xf1, 0x24, 0x19, 0xc4,
|
||||||
0x00, 0x00,
|
0x16, 0xdc, 0xce, 0x57, 0x0a, 0x68, 0xca, 0x38, 0x68, 0xc5, 0x13, 0x3a, 0x2d, 0x25, 0x0c, 0xce,
|
||||||
|
0xdc, 0x2b, 0x78, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x75, 0x86, 0x6d, 0xd1, 0xaa, 0x02, 0x00,
|
||||||
|
0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -267,6 +285,20 @@ func (m *MsgOnboardParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
_ = i
|
_ = i
|
||||||
var l int
|
var l int
|
||||||
_ = l
|
_ = l
|
||||||
|
if len(m.KycId) > 0 {
|
||||||
|
i -= len(m.KycId)
|
||||||
|
copy(dAtA[i:], m.KycId)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.KycId)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
if len(m.Role) > 0 {
|
||||||
|
i -= len(m.Role)
|
||||||
|
copy(dAtA[i:], m.Role)
|
||||||
|
i = encodeVarintTx(dAtA, i, uint64(len(m.Role)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
if len(m.EthSignature) > 0 {
|
if len(m.EthSignature) > 0 {
|
||||||
i -= len(m.EthSignature)
|
i -= len(m.EthSignature)
|
||||||
copy(dAtA[i:], m.EthSignature)
|
copy(dAtA[i:], m.EthSignature)
|
||||||
@ -344,6 +376,14 @@ func (m *MsgOnboardParticipant) Size() (n int) {
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovTx(uint64(l))
|
n += 1 + l + sovTx(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(m.Role)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.KycId)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovTx(uint64(l))
|
||||||
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,6 +528,70 @@ func (m *MsgOnboardParticipant) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
m.EthSignature = string(dAtA[iNdEx:postIndex])
|
m.EthSignature = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Role", 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.Role = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 5:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field KycId", 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.KycId = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipTx(dAtA[iNdEx:])
|
skippy, err := skipTx(dAtA[iNdEx:])
|
||||||
|
@ -30,11 +30,18 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, data *registry.GenesisState) error
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
readableRecord := record.ToReadableRecord()
|
||||||
|
if err := k.processAttributes(ctx, readableRecord.Attributes, record.Id); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, authority := range data.Authorities {
|
for _, authority := range data.Authorities {
|
||||||
// Only import authorities that are marked active.
|
// Only import authorities that are marked active.
|
||||||
if authority.Entry.Status == registry.AuthorityActive {
|
if authority.Entry.Status == registry.AuthorityActive {
|
||||||
|
// Reset authority height
|
||||||
|
authority.Entry.Height = uint64(ctx.BlockHeight())
|
||||||
if err := k.SaveNameAuthority(ctx, authority.Name, authority.Entry); err != nil {
|
if err := k.SaveNameAuthority(ctx, authority.Name, authority.Entry); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -62,25 +69,16 @@ func (k *Keeper) ExportGenesis(ctx sdk.Context) (*registry.GenesisState, error)
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
records, err := k.ListRecords(ctx)
|
records, _, err := k.PaginatedListRecords(ctx, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
authorities, err := k.ListNameAuthorityRecords(ctx)
|
authorityEntries, err := k.ListNameAuthorityRecords(ctx, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
authorityEntries := []registry.AuthorityEntry{}
|
|
||||||
// #nosec G705
|
|
||||||
for name, record := range authorities {
|
|
||||||
authorityEntries = append(authorityEntries, registry.AuthorityEntry{
|
|
||||||
Name: name,
|
|
||||||
Entry: &record, //nolint: all
|
|
||||||
}) // #nosec G601
|
|
||||||
}
|
|
||||||
|
|
||||||
names, err := k.ListNameRecords(ctx)
|
names, err := k.ListNameRecords(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
"github.com/cosmos/cosmos-sdk/codec/legacy"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/query"
|
||||||
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
auth "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||||
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
bank "github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||||
"github.com/gibson042/canonicaljson-go"
|
"github.com/gibson042/canonicaljson-go"
|
||||||
@ -94,6 +95,8 @@ func newNameRecordIndexes(sb *collections.SchemaBuilder) NameRecordsIndexes {
|
|||||||
type Keeper struct {
|
type Keeper struct {
|
||||||
cdc codec.BinaryCodec
|
cdc codec.BinaryCodec
|
||||||
|
|
||||||
|
authority string
|
||||||
|
|
||||||
accountKeeper auth.AccountKeeper
|
accountKeeper auth.AccountKeeper
|
||||||
bankKeeper bank.Keeper
|
bankKeeper bank.Keeper
|
||||||
bondKeeper *bondkeeper.Keeper
|
bondKeeper *bondkeeper.Keeper
|
||||||
@ -118,10 +121,17 @@ func NewKeeper(
|
|||||||
bankKeeper bank.Keeper,
|
bankKeeper bank.Keeper,
|
||||||
bondKeeper *bondkeeper.Keeper,
|
bondKeeper *bondkeeper.Keeper,
|
||||||
auctionKeeper *auctionkeeper.Keeper,
|
auctionKeeper *auctionkeeper.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,
|
||||||
bondKeeper: bondKeeper,
|
bondKeeper: bondKeeper,
|
||||||
@ -175,6 +185,16 @@ func logger(ctx sdk.Context) log.Logger {
|
|||||||
return ctx.Logger().With("module", registrytypes.ModuleName)
|
return ctx.Logger().With("module", registrytypes.ModuleName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetAuthority returns the x/registry module's authority.
|
||||||
|
func (k Keeper) GetAuthority() string {
|
||||||
|
return k.authority
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetParams sets the x/registry module parameters.
|
||||||
|
func (k Keeper) SetParams(ctx sdk.Context, params registrytypes.Params) error {
|
||||||
|
return k.Params.Set(ctx, params)
|
||||||
|
}
|
||||||
|
|
||||||
// HasRecord - checks if a record by the given id exists.
|
// HasRecord - checks if a record by the given id exists.
|
||||||
func (k Keeper) HasRecord(ctx sdk.Context, id string) (bool, error) {
|
func (k Keeper) HasRecord(ctx sdk.Context, id string) (bool, error) {
|
||||||
has, err := k.Records.Has(ctx, id)
|
has, err := k.Records.Has(ctx, id)
|
||||||
@ -185,23 +205,42 @@ func (k Keeper) HasRecord(ctx sdk.Context, id string) (bool, error) {
|
|||||||
return has, nil
|
return has, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListRecords - get all records.
|
// PaginatedListRecords - get all records with optional pagination.
|
||||||
func (k Keeper) ListRecords(ctx sdk.Context) ([]registrytypes.Record, error) {
|
func (k Keeper) PaginatedListRecords(ctx sdk.Context, pagination *query.PageRequest) ([]registrytypes.Record, *query.PageResponse, error) {
|
||||||
var records []registrytypes.Record
|
var records []registrytypes.Record
|
||||||
|
var pageResp *query.PageResponse
|
||||||
|
|
||||||
err := k.Records.Walk(ctx, nil, func(key string, value registrytypes.Record) (bool, error) {
|
if pagination == nil {
|
||||||
if err := k.populateRecordNames(ctx, &value); err != nil {
|
err := k.Records.Walk(ctx, nil, func(key string, value registrytypes.Record) (bool, error) {
|
||||||
return true, err
|
if err := k.populateRecordNames(ctx, &value); err != nil {
|
||||||
|
return true, err
|
||||||
|
}
|
||||||
|
records = append(records, value)
|
||||||
|
|
||||||
|
return false, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
records = append(records, value)
|
} else {
|
||||||
|
var err error
|
||||||
|
records, pageResp, err = query.CollectionPaginate(
|
||||||
|
ctx,
|
||||||
|
k.Records,
|
||||||
|
pagination,
|
||||||
|
func(key string, value registrytypes.Record) (registrytypes.Record, error) {
|
||||||
|
if err := k.populateRecordNames(ctx, &value); err != nil {
|
||||||
|
return registrytypes.Record{}, err
|
||||||
|
}
|
||||||
|
|
||||||
return false, nil
|
return value, nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, nil, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return records, nil
|
return records, pageResp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetRecordById - gets a record from the store.
|
// GetRecordById - gets a record from the store.
|
||||||
@ -242,36 +281,47 @@ func (k Keeper) GetRecordsByBondId(ctx sdk.Context, bondId string) ([]registryty
|
|||||||
return records, nil
|
return records, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// RecordsFromAttributes gets a list of records whose attributes match all provided values
|
// PaginatedRecordsFromAttributes gets a list of records whose attributes match all provided values
|
||||||
func (k Keeper) RecordsFromAttributes(
|
// with optional pagination.
|
||||||
|
func (k Keeper) PaginatedRecordsFromAttributes(
|
||||||
ctx sdk.Context,
|
ctx sdk.Context,
|
||||||
attributes []*registrytypes.QueryRecordsRequest_KeyValueInput,
|
attributes []*registrytypes.QueryRecordsRequest_KeyValueInput,
|
||||||
all bool,
|
all bool,
|
||||||
) ([]registrytypes.Record, error) {
|
pagination *query.PageRequest,
|
||||||
resultRecordIds := []string{}
|
) ([]registrytypes.Record, *query.PageResponse, error) {
|
||||||
|
var resultRecordIds []string
|
||||||
|
var pageResp *query.PageResponse
|
||||||
|
|
||||||
|
filteredRecordIds := []string{}
|
||||||
for i, attr := range attributes {
|
for i, attr := range attributes {
|
||||||
suffix, err := QueryValueToJSON(attr.Value)
|
suffix, err := QueryValueToJSON(attr.Value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
mapKey := collections.Join(attr.Key, string(suffix))
|
mapKey := collections.Join(attr.Key, string(suffix))
|
||||||
recordIds, err := k.getAttributeMapping(ctx, mapKey)
|
recordIds, err := k.getAttributeMapping(ctx, mapKey)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
resultRecordIds = recordIds
|
filteredRecordIds = recordIds
|
||||||
} else {
|
} else {
|
||||||
resultRecordIds = getIntersection(recordIds, resultRecordIds)
|
filteredRecordIds = getIntersection(recordIds, filteredRecordIds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if pagination != nil {
|
||||||
|
resultRecordIds, pageResp = paginate(filteredRecordIds, pagination)
|
||||||
|
} else {
|
||||||
|
resultRecordIds = filteredRecordIds
|
||||||
|
}
|
||||||
|
|
||||||
records := []registrytypes.Record{}
|
records := []registrytypes.Record{}
|
||||||
for _, id := range resultRecordIds {
|
for _, id := range resultRecordIds {
|
||||||
record, err := k.GetRecordById(ctx, id)
|
record, err := k.GetRecordById(ctx, id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, nil, err
|
||||||
}
|
}
|
||||||
if record.Deleted {
|
if record.Deleted {
|
||||||
continue
|
continue
|
||||||
@ -282,7 +332,7 @@ func (k Keeper) RecordsFromAttributes(
|
|||||||
records = append(records, record)
|
records = append(records, record)
|
||||||
}
|
}
|
||||||
|
|
||||||
return records, nil
|
return records, pageResp, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO not recursive, and only should be if we want to support querying with whole sub-objects,
|
// TODO not recursive, and only should be if we want to support querying with whole sub-objects,
|
||||||
@ -698,6 +748,38 @@ func (k Keeper) tryTakeRecordRent(ctx sdk.Context, record registrytypes.Record)
|
|||||||
return k.SaveRecord(ctx, record)
|
return k.SaveRecord(ctx, record)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// paginate implements basic pagination over a list of objects
|
||||||
|
func paginate[T any](data []T, pagination *query.PageRequest) ([]T, *query.PageResponse) {
|
||||||
|
pageReq := initPageRequestDefaults(pagination)
|
||||||
|
|
||||||
|
offset := pageReq.Offset
|
||||||
|
limit := pageReq.Limit
|
||||||
|
countTotal := pageReq.CountTotal
|
||||||
|
|
||||||
|
totalItems := uint64(len(data))
|
||||||
|
start := offset
|
||||||
|
end := offset + limit
|
||||||
|
|
||||||
|
if start > totalItems {
|
||||||
|
if countTotal {
|
||||||
|
return []T{}, &query.PageResponse{Total: 0}
|
||||||
|
} else {
|
||||||
|
return []T{}, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if end > totalItems {
|
||||||
|
end = totalItems
|
||||||
|
}
|
||||||
|
|
||||||
|
paginatedItems := data[start:end]
|
||||||
|
|
||||||
|
if countTotal {
|
||||||
|
return paginatedItems, &query.PageResponse{Total: totalItems}
|
||||||
|
} else {
|
||||||
|
return paginatedItems, nil
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func getIntersection(a []string, b []string) []string {
|
func getIntersection(a []string, b []string) []string {
|
||||||
result := []string{}
|
result := []string{}
|
||||||
if len(a) < len(b) {
|
if len(a) < len(b) {
|
||||||
@ -724,3 +806,26 @@ func contains(arr []string, str string) bool {
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/cosmos/cosmos-sdk/blob/v0.50.3/types/query/pagination.go#L141
|
||||||
|
// initPageRequestDefaults initializes a PageRequest's defaults when those are not set.
|
||||||
|
func initPageRequestDefaults(pageRequest *query.PageRequest) *query.PageRequest {
|
||||||
|
// if the PageRequest is nil, use default PageRequest
|
||||||
|
if pageRequest == nil {
|
||||||
|
pageRequest = &query.PageRequest{}
|
||||||
|
}
|
||||||
|
|
||||||
|
pageRequestCopy := *pageRequest
|
||||||
|
if len(pageRequestCopy.Key) == 0 {
|
||||||
|
pageRequestCopy.Key = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
if pageRequestCopy.Limit == 0 {
|
||||||
|
pageRequestCopy.Limit = query.DefaultLimit
|
||||||
|
|
||||||
|
// count total results when the limit is zero/not supplied
|
||||||
|
pageRequestCopy.CountTotal = true
|
||||||
|
}
|
||||||
|
|
||||||
|
return &pageRequestCopy
|
||||||
|
}
|
||||||
|
@ -3,7 +3,9 @@ package keeper
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
|
||||||
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
"git.vdb.to/cerc-io/laconicd/utils"
|
"git.vdb.to/cerc-io/laconicd/utils"
|
||||||
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
||||||
@ -395,3 +397,22 @@ func (ms msgServer) ReassociateRecords(c context.Context, msg *registrytypes.Msg
|
|||||||
|
|
||||||
return ®istrytypes.MsgReassociateRecordsResponse{}, nil
|
return ®istrytypes.MsgReassociateRecordsResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateParams defines a method to perform updation of module params.
|
||||||
|
func (ms msgServer) UpdateParams(c context.Context, msg *registrytypes.MsgUpdateParams) (*registrytypes.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 ®istrytypes.MsgUpdateParamsResponse{}, nil
|
||||||
|
}
|
||||||
|
@ -7,6 +7,8 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"cosmossdk.io/math"
|
||||||
|
|
||||||
"cosmossdk.io/collections"
|
"cosmossdk.io/collections"
|
||||||
errorsmod "cosmossdk.io/errors"
|
errorsmod "cosmossdk.io/errors"
|
||||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||||
@ -41,19 +43,30 @@ func (k Keeper) GetNameAuthority(ctx sdk.Context, name string) (registrytypes.Na
|
|||||||
return authority, nil
|
return authority, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ListNameAuthorityRecords - get all name authority records.
|
// ListNameAuthorityRecords - get all name authority records for given owner
|
||||||
func (k Keeper) ListNameAuthorityRecords(ctx sdk.Context) (map[string]registrytypes.NameAuthority, error) {
|
// Returns all authorities if owner set to ""
|
||||||
nameAuthorityRecords := make(map[string]registrytypes.NameAuthority)
|
func (k Keeper) ListNameAuthorityRecords(ctx sdk.Context, owner string) ([]registrytypes.AuthorityEntry, error) {
|
||||||
|
authorityEntries := []registrytypes.AuthorityEntry{}
|
||||||
|
|
||||||
err := k.Authorities.Walk(ctx, nil, func(key string, value registrytypes.NameAuthority) (bool, error) {
|
err := k.Authorities.Walk(ctx, nil, func(key string, value registrytypes.NameAuthority) (bool, error) {
|
||||||
nameAuthorityRecords[key] = value
|
// If owner is not empty, skip if authority is not owned by owner
|
||||||
|
if owner != "" && owner != value.OwnerAddress {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
authorityEntries = append(authorityEntries, registrytypes.AuthorityEntry{
|
||||||
|
Name: key,
|
||||||
|
Entry: &value,
|
||||||
|
})
|
||||||
|
|
||||||
|
// Continue the walk
|
||||||
return false, nil
|
return false, nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return map[string]registrytypes.NameAuthority{}, err
|
return []registrytypes.AuthorityEntry{}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
return nameAuthorityRecords, nil
|
return authorityEntries, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// HasNameRecord - checks if a name record exists.
|
// HasNameRecord - checks if a name record exists.
|
||||||
@ -274,16 +287,18 @@ func (k Keeper) createAuthority(ctx sdk.Context, name string, owner string, isRo
|
|||||||
// Reset bond ID if required.
|
// Reset bond ID if required.
|
||||||
authority.BondId = ""
|
authority.BondId = ""
|
||||||
|
|
||||||
params := auctiontypes.Params{
|
|
||||||
CommitsDuration: moduleParams.AuthorityAuctionCommitsDuration,
|
|
||||||
RevealsDuration: moduleParams.AuthorityAuctionRevealsDuration,
|
|
||||||
CommitFee: moduleParams.AuthorityAuctionCommitFee,
|
|
||||||
RevealFee: moduleParams.AuthorityAuctionRevealFee,
|
|
||||||
MinimumBid: moduleParams.AuthorityAuctionMinimumBid,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create an auction.
|
// Create an auction.
|
||||||
msg := auctiontypes.NewMsgCreateAuction(params, ownerAddress)
|
msg := auctiontypes.NewMsgCreateAuction(
|
||||||
|
auctiontypes.AuctionKindVickrey,
|
||||||
|
moduleParams.AuthorityAuctionCommitsDuration,
|
||||||
|
moduleParams.AuthorityAuctionRevealsDuration,
|
||||||
|
moduleParams.AuthorityAuctionCommitFee,
|
||||||
|
moduleParams.AuthorityAuctionRevealFee,
|
||||||
|
moduleParams.AuthorityAuctionMinimumBid,
|
||||||
|
sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)),
|
||||||
|
0,
|
||||||
|
ownerAddress,
|
||||||
|
)
|
||||||
|
|
||||||
auction, sdkErr := k.auctionKeeper.CreateAuction(ctx, msg)
|
auction, sdkErr := k.auctionKeeper.CreateAuction(ctx, msg)
|
||||||
if sdkErr != nil {
|
if sdkErr != nil {
|
||||||
|
@ -6,6 +6,7 @@ import (
|
|||||||
errorsmod "cosmossdk.io/errors"
|
errorsmod "cosmossdk.io/errors"
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||||
|
"github.com/cosmos/cosmos-sdk/types/query"
|
||||||
|
|
||||||
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
registrytypes "git.vdb.to/cerc-io/laconicd/x/registry"
|
||||||
)
|
)
|
||||||
@ -39,20 +40,21 @@ func (qs queryServer) Records(c context.Context, req *registrytypes.QueryRecords
|
|||||||
all := req.GetAll()
|
all := req.GetAll()
|
||||||
|
|
||||||
var records []registrytypes.Record
|
var records []registrytypes.Record
|
||||||
|
var pageResp *query.PageResponse
|
||||||
var err error
|
var err error
|
||||||
if len(attributes) > 0 {
|
if len(attributes) > 0 {
|
||||||
records, err = qs.k.RecordsFromAttributes(ctx, attributes, all)
|
records, pageResp, err = qs.k.PaginatedRecordsFromAttributes(ctx, attributes, all, req.Pagination)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
records, err = qs.k.ListRecords(ctx)
|
records, pageResp, err = qs.k.PaginatedListRecords(ctx, req.Pagination)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ®istrytypes.QueryRecordsResponse{Records: records}, nil
|
return ®istrytypes.QueryRecordsResponse{Records: records, Pagination: pageResp}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (qs queryServer) GetRecord(c context.Context, req *registrytypes.QueryGetRecordRequest) (*registrytypes.QueryGetRecordResponse, error) {
|
func (qs queryServer) GetRecord(c context.Context, req *registrytypes.QueryGetRecordRequest) (*registrytypes.QueryGetRecordResponse, error) {
|
||||||
@ -112,10 +114,10 @@ func (qs queryServer) NameRecords(c context.Context, _ *registrytypes.QueryNameR
|
|||||||
return ®istrytypes.QueryNameRecordsResponse{Names: nameRecords}, nil
|
return ®istrytypes.QueryNameRecordsResponse{Names: nameRecords}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (qs queryServer) Whois(c context.Context, request *registrytypes.QueryWhoisRequest) (*registrytypes.QueryWhoisResponse, error) {
|
func (qs queryServer) Whois(c context.Context, req *registrytypes.QueryWhoisRequest) (*registrytypes.QueryWhoisResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
nameAuthority, err := qs.k.GetNameAuthority(ctx, request.GetName())
|
nameAuthority, err := qs.k.GetNameAuthority(ctx, req.GetName())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -123,6 +125,17 @@ func (qs queryServer) Whois(c context.Context, request *registrytypes.QueryWhois
|
|||||||
return ®istrytypes.QueryWhoisResponse{NameAuthority: nameAuthority}, nil
|
return ®istrytypes.QueryWhoisResponse{NameAuthority: nameAuthority}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (qs queryServer) Authorities(c context.Context, req *registrytypes.QueryAuthoritiesRequest) (*registrytypes.QueryAuthoritiesResponse, error) {
|
||||||
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
|
|
||||||
|
authorityEntries, err := qs.k.ListNameAuthorityRecords(ctx, req.GetOwner())
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return ®istrytypes.QueryAuthoritiesResponse{Authorities: authorityEntries}, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (qs queryServer) LookupLrn(c context.Context, req *registrytypes.QueryLookupLrnRequest) (*registrytypes.QueryLookupLrnResponse, error) {
|
func (qs queryServer) LookupLrn(c context.Context, req *registrytypes.QueryLookupLrnRequest) (*registrytypes.QueryLookupLrnResponse, error) {
|
||||||
ctx := sdk.UnwrapSDKContext(c)
|
ctx := sdk.UnwrapSDKContext(c)
|
||||||
lrn := req.GetLrn()
|
lrn := req.GetLrn()
|
||||||
|
@ -94,9 +94,9 @@ func (rk RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionId string
|
|||||||
}
|
}
|
||||||
|
|
||||||
if auctionObj.Status == auctiontypes.AuctionStatusCompleted {
|
if auctionObj.Status == auctiontypes.AuctionStatusCompleted {
|
||||||
if auctionObj.WinnerAddress != "" {
|
if len(auctionObj.WinnerAddresses) != 0 {
|
||||||
// Mark authority owner and change status to active.
|
// Mark authority owner and change status to active.
|
||||||
authority.OwnerAddress = auctionObj.WinnerAddress
|
authority.OwnerAddress = auctionObj.WinnerAddresses[0]
|
||||||
authority.Status = registrytypes.AuthorityActive
|
authority.Status = registrytypes.AuthorityActive
|
||||||
|
|
||||||
// Reset bond id if required, as owner has changed.
|
// Reset bond id if required, as owner has changed.
|
||||||
|
@ -51,6 +51,18 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
{ProtoField: "name"},
|
{ProtoField: "name"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "Authorities",
|
||||||
|
Use: "list-authorities",
|
||||||
|
Short: "List authorities (optionally by owner)",
|
||||||
|
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||||
|
"owner": {
|
||||||
|
Name: "owner",
|
||||||
|
Usage: "Owner to get the authorities for",
|
||||||
|
DefaultValue: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
RpcMethod: "NameRecords",
|
RpcMethod: "NameRecords",
|
||||||
Use: "names",
|
Use: "names",
|
||||||
@ -161,6 +173,10 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
|||||||
{ProtoField: "new_bond_id"},
|
{ProtoField: "new_bond_id"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "UpdateParams",
|
||||||
|
Skip: true, // skipped because authority gated
|
||||||
|
},
|
||||||
},
|
},
|
||||||
EnhanceCustomCommand: true, // Allow additional manual commands
|
EnhanceCustomCommand: true, // Allow additional manual commands
|
||||||
},
|
},
|
||||||
|
@ -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/registry/module/v1"
|
modulev1 "git.vdb.to/cerc-io/laconicd/api/cerc/registry/module/v1"
|
||||||
"git.vdb.to/cerc-io/laconicd/x/auction"
|
"git.vdb.to/cerc-io/laconicd/x/auction"
|
||||||
@ -35,6 +37,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
|
||||||
|
|
||||||
@ -56,6 +59,11 @@ type ModuleOutputs struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||||
|
// 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(
|
k := keeper.NewKeeper(
|
||||||
in.Cdc,
|
in.Cdc,
|
||||||
in.StoreService,
|
in.StoreService,
|
||||||
@ -63,6 +71,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs {
|
|||||||
in.BankKeeper,
|
in.BankKeeper,
|
||||||
in.BondKeeper,
|
in.BondKeeper,
|
||||||
in.AuctionKeeper,
|
in.AuctionKeeper,
|
||||||
|
authority.String(),
|
||||||
)
|
)
|
||||||
m := NewAppModule(in.Cdc, k)
|
m := NewAppModule(in.Cdc, k)
|
||||||
|
|
||||||
|
@ -11,21 +11,21 @@ import (
|
|||||||
// Default parameter values.
|
// Default parameter values.
|
||||||
var (
|
var (
|
||||||
// DefaultRecordRent is the default record rent for 1 time period (see expiry time).
|
// DefaultRecordRent is the default record rent for 1 time period (see expiry time).
|
||||||
DefaultRecordRent = sdkmath.NewInt(1000000)
|
DefaultRecordRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||||
|
|
||||||
// DefaultRecordExpiryTime is the default record expiry time (1 year).
|
// DefaultRecordExpiryTime is the default record expiry time (1 year).
|
||||||
DefaultRecordExpiryTime = time.Hour * 24 * 365
|
DefaultRecordExpiryTime = time.Hour * 24 * 365
|
||||||
|
|
||||||
DefaultAuthorityRent = sdkmath.NewInt(1000000)
|
DefaultAuthorityRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||||
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
||||||
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
||||||
|
|
||||||
DefaultAuthorityAuctionEnabled = false
|
DefaultAuthorityAuctionEnabled = false
|
||||||
DefaultCommitsDuration = time.Hour * 24
|
DefaultCommitsDuration = time.Hour * 24
|
||||||
DefaultRevealsDuration = time.Hour * 24
|
DefaultRevealsDuration = time.Hour * 24
|
||||||
DefaultCommitFee = sdkmath.NewInt(1000000)
|
DefaultCommitFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||||
DefaultRevealFee = sdkmath.NewInt(1000000)
|
DefaultRevealFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||||
DefaultMinimumBid = sdkmath.NewInt(5000000)
|
DefaultMinimumBid = sdkmath.NewInt(5000000) // 5 * 10^6 alnt
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewParams creates a new Params instance
|
// NewParams creates a new Params instance
|
||||||
|
@ -915,6 +915,105 @@ func (m *QueryWhoisResponse) GetNameAuthority() NameAuthority {
|
|||||||
return NameAuthority{}
|
return NameAuthority{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QueryAuthoritiesRequest is request type to get all authorities
|
||||||
|
type QueryAuthoritiesRequest struct {
|
||||||
|
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesRequest) Reset() { *m = QueryAuthoritiesRequest{} }
|
||||||
|
func (m *QueryAuthoritiesRequest) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryAuthoritiesRequest) ProtoMessage() {}
|
||||||
|
func (*QueryAuthoritiesRequest) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_c642b96b6da07a30, []int{12}
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesRequest) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryAuthoritiesRequest.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 *QueryAuthoritiesRequest) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryAuthoritiesRequest.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesRequest) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesRequest) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryAuthoritiesRequest.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryAuthoritiesRequest proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesRequest) GetOwner() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Owner
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryAuthoritiesResponse is response type for authorities request
|
||||||
|
type QueryAuthoritiesResponse struct {
|
||||||
|
Authorities []AuthorityEntry `protobuf:"bytes,1,rep,name=authorities,proto3" json:"authorities"`
|
||||||
|
// pagination defines the pagination in the response.
|
||||||
|
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) Reset() { *m = QueryAuthoritiesResponse{} }
|
||||||
|
func (m *QueryAuthoritiesResponse) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*QueryAuthoritiesResponse) ProtoMessage() {}
|
||||||
|
func (*QueryAuthoritiesResponse) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_c642b96b6da07a30, []int{13}
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesResponse) XXX_Unmarshal(b []byte) error {
|
||||||
|
return m.Unmarshal(b)
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
if deterministic {
|
||||||
|
return xxx_messageInfo_QueryAuthoritiesResponse.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 *QueryAuthoritiesResponse) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_QueryAuthoritiesResponse.Merge(m, src)
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesResponse) XXX_Size() int {
|
||||||
|
return m.Size()
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesResponse) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_QueryAuthoritiesResponse.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_QueryAuthoritiesResponse proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) GetAuthorities() []AuthorityEntry {
|
||||||
|
if m != nil {
|
||||||
|
return m.Authorities
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) GetPagination() *query.PageResponse {
|
||||||
|
if m != nil {
|
||||||
|
return m.Pagination
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryLookupLrnRequest is request type for LookupLrn
|
// QueryLookupLrnRequest is request type for LookupLrn
|
||||||
type QueryLookupLrnRequest struct {
|
type QueryLookupLrnRequest struct {
|
||||||
Lrn string `protobuf:"bytes,1,opt,name=lrn,proto3" json:"lrn,omitempty"`
|
Lrn string `protobuf:"bytes,1,opt,name=lrn,proto3" json:"lrn,omitempty"`
|
||||||
@ -924,7 +1023,7 @@ func (m *QueryLookupLrnRequest) Reset() { *m = QueryLookupLrnRequest{} }
|
|||||||
func (m *QueryLookupLrnRequest) String() string { return proto.CompactTextString(m) }
|
func (m *QueryLookupLrnRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryLookupLrnRequest) ProtoMessage() {}
|
func (*QueryLookupLrnRequest) ProtoMessage() {}
|
||||||
func (*QueryLookupLrnRequest) Descriptor() ([]byte, []int) {
|
func (*QueryLookupLrnRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{12}
|
return fileDescriptor_c642b96b6da07a30, []int{14}
|
||||||
}
|
}
|
||||||
func (m *QueryLookupLrnRequest) XXX_Unmarshal(b []byte) error {
|
func (m *QueryLookupLrnRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -969,7 +1068,7 @@ func (m *QueryLookupLrnResponse) Reset() { *m = QueryLookupLrnResponse{}
|
|||||||
func (m *QueryLookupLrnResponse) String() string { return proto.CompactTextString(m) }
|
func (m *QueryLookupLrnResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryLookupLrnResponse) ProtoMessage() {}
|
func (*QueryLookupLrnResponse) ProtoMessage() {}
|
||||||
func (*QueryLookupLrnResponse) Descriptor() ([]byte, []int) {
|
func (*QueryLookupLrnResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{13}
|
return fileDescriptor_c642b96b6da07a30, []int{15}
|
||||||
}
|
}
|
||||||
func (m *QueryLookupLrnResponse) XXX_Unmarshal(b []byte) error {
|
func (m *QueryLookupLrnResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1014,7 +1113,7 @@ func (m *QueryResolveLrnRequest) Reset() { *m = QueryResolveLrnRequest{}
|
|||||||
func (m *QueryResolveLrnRequest) String() string { return proto.CompactTextString(m) }
|
func (m *QueryResolveLrnRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryResolveLrnRequest) ProtoMessage() {}
|
func (*QueryResolveLrnRequest) ProtoMessage() {}
|
||||||
func (*QueryResolveLrnRequest) Descriptor() ([]byte, []int) {
|
func (*QueryResolveLrnRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{14}
|
return fileDescriptor_c642b96b6da07a30, []int{16}
|
||||||
}
|
}
|
||||||
func (m *QueryResolveLrnRequest) XXX_Unmarshal(b []byte) error {
|
func (m *QueryResolveLrnRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1059,7 +1158,7 @@ func (m *QueryResolveLrnResponse) Reset() { *m = QueryResolveLrnResponse
|
|||||||
func (m *QueryResolveLrnResponse) String() string { return proto.CompactTextString(m) }
|
func (m *QueryResolveLrnResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryResolveLrnResponse) ProtoMessage() {}
|
func (*QueryResolveLrnResponse) ProtoMessage() {}
|
||||||
func (*QueryResolveLrnResponse) Descriptor() ([]byte, []int) {
|
func (*QueryResolveLrnResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{15}
|
return fileDescriptor_c642b96b6da07a30, []int{17}
|
||||||
}
|
}
|
||||||
func (m *QueryResolveLrnResponse) XXX_Unmarshal(b []byte) error {
|
func (m *QueryResolveLrnResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1104,7 +1203,7 @@ func (m *QueryGetRegistryModuleBalanceRequest) Reset() { *m = QueryGetRe
|
|||||||
func (m *QueryGetRegistryModuleBalanceRequest) String() string { return proto.CompactTextString(m) }
|
func (m *QueryGetRegistryModuleBalanceRequest) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryGetRegistryModuleBalanceRequest) ProtoMessage() {}
|
func (*QueryGetRegistryModuleBalanceRequest) ProtoMessage() {}
|
||||||
func (*QueryGetRegistryModuleBalanceRequest) Descriptor() ([]byte, []int) {
|
func (*QueryGetRegistryModuleBalanceRequest) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{16}
|
return fileDescriptor_c642b96b6da07a30, []int{18}
|
||||||
}
|
}
|
||||||
func (m *QueryGetRegistryModuleBalanceRequest) XXX_Unmarshal(b []byte) error {
|
func (m *QueryGetRegistryModuleBalanceRequest) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1143,7 +1242,7 @@ func (m *QueryGetRegistryModuleBalanceResponse) Reset() { *m = QueryGetR
|
|||||||
func (m *QueryGetRegistryModuleBalanceResponse) String() string { return proto.CompactTextString(m) }
|
func (m *QueryGetRegistryModuleBalanceResponse) String() string { return proto.CompactTextString(m) }
|
||||||
func (*QueryGetRegistryModuleBalanceResponse) ProtoMessage() {}
|
func (*QueryGetRegistryModuleBalanceResponse) ProtoMessage() {}
|
||||||
func (*QueryGetRegistryModuleBalanceResponse) Descriptor() ([]byte, []int) {
|
func (*QueryGetRegistryModuleBalanceResponse) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{17}
|
return fileDescriptor_c642b96b6da07a30, []int{19}
|
||||||
}
|
}
|
||||||
func (m *QueryGetRegistryModuleBalanceResponse) XXX_Unmarshal(b []byte) error {
|
func (m *QueryGetRegistryModuleBalanceResponse) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1189,7 +1288,7 @@ func (m *AccountBalance) Reset() { *m = AccountBalance{} }
|
|||||||
func (m *AccountBalance) String() string { return proto.CompactTextString(m) }
|
func (m *AccountBalance) String() string { return proto.CompactTextString(m) }
|
||||||
func (*AccountBalance) ProtoMessage() {}
|
func (*AccountBalance) ProtoMessage() {}
|
||||||
func (*AccountBalance) Descriptor() ([]byte, []int) {
|
func (*AccountBalance) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_c642b96b6da07a30, []int{18}
|
return fileDescriptor_c642b96b6da07a30, []int{20}
|
||||||
}
|
}
|
||||||
func (m *AccountBalance) XXX_Unmarshal(b []byte) error {
|
func (m *AccountBalance) XXX_Unmarshal(b []byte) error {
|
||||||
return m.Unmarshal(b)
|
return m.Unmarshal(b)
|
||||||
@ -1250,6 +1349,8 @@ func init() {
|
|||||||
proto.RegisterType((*QueryNameRecordsResponse)(nil), "cerc.registry.v1.QueryNameRecordsResponse")
|
proto.RegisterType((*QueryNameRecordsResponse)(nil), "cerc.registry.v1.QueryNameRecordsResponse")
|
||||||
proto.RegisterType((*QueryWhoisRequest)(nil), "cerc.registry.v1.QueryWhoisRequest")
|
proto.RegisterType((*QueryWhoisRequest)(nil), "cerc.registry.v1.QueryWhoisRequest")
|
||||||
proto.RegisterType((*QueryWhoisResponse)(nil), "cerc.registry.v1.QueryWhoisResponse")
|
proto.RegisterType((*QueryWhoisResponse)(nil), "cerc.registry.v1.QueryWhoisResponse")
|
||||||
|
proto.RegisterType((*QueryAuthoritiesRequest)(nil), "cerc.registry.v1.QueryAuthoritiesRequest")
|
||||||
|
proto.RegisterType((*QueryAuthoritiesResponse)(nil), "cerc.registry.v1.QueryAuthoritiesResponse")
|
||||||
proto.RegisterType((*QueryLookupLrnRequest)(nil), "cerc.registry.v1.QueryLookupLrnRequest")
|
proto.RegisterType((*QueryLookupLrnRequest)(nil), "cerc.registry.v1.QueryLookupLrnRequest")
|
||||||
proto.RegisterType((*QueryLookupLrnResponse)(nil), "cerc.registry.v1.QueryLookupLrnResponse")
|
proto.RegisterType((*QueryLookupLrnResponse)(nil), "cerc.registry.v1.QueryLookupLrnResponse")
|
||||||
proto.RegisterType((*QueryResolveLrnRequest)(nil), "cerc.registry.v1.QueryResolveLrnRequest")
|
proto.RegisterType((*QueryResolveLrnRequest)(nil), "cerc.registry.v1.QueryResolveLrnRequest")
|
||||||
@ -1262,88 +1363,93 @@ func init() {
|
|||||||
func init() { proto.RegisterFile("cerc/registry/v1/query.proto", fileDescriptor_c642b96b6da07a30) }
|
func init() { proto.RegisterFile("cerc/registry/v1/query.proto", fileDescriptor_c642b96b6da07a30) }
|
||||||
|
|
||||||
var fileDescriptor_c642b96b6da07a30 = []byte{
|
var fileDescriptor_c642b96b6da07a30 = []byte{
|
||||||
// 1293 bytes of a gzipped FileDescriptorProto
|
// 1366 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0xc5,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x8f, 0xd3, 0xc6,
|
||||||
0x1b, 0xf6, 0xda, 0xb1, 0xdd, 0xbc, 0xfe, 0xb5, 0xea, 0x6f, 0x08, 0xed, 0x76, 0x1b, 0x6c, 0xb3,
|
0x17, 0x8f, 0x93, 0x4d, 0x16, 0x5e, 0xbe, 0x20, 0xbe, 0xd3, 0x2d, 0x18, 0x03, 0xc9, 0xd6, 0x65,
|
||||||
0xe4, 0xc3, 0x49, 0x94, 0xdd, 0x38, 0x91, 0xda, 0x2a, 0xe2, 0x40, 0x8c, 0x68, 0x5c, 0xfa, 0xa1,
|
0x77, 0xb3, 0xa0, 0xb5, 0xc9, 0x22, 0x01, 0x42, 0x3d, 0x94, 0x54, 0x85, 0x50, 0x7e, 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43,
|
||||||
0x33, 0x7b, 0x2c, 0x7b, 0xd3, 0x86, 0xff, 0x88, 0x6e, 0x42, 0x9a, 0x41, 0x59, 0xd4, 0xce, 0xb2,
|
0x5b, 0x64, 0xc4, 0xab, 0xb7, 0xd7, 0x0a, 0x1e, 0xd1, 0x45, 0x28, 0x72, 0x28, 0xcf, 0xda, 0xcb,
|
||||||
0x15, 0x6e, 0xbe, 0x99, 0xbc, 0x21, 0x29, 0xdf, 0x24, 0x01, 0x06, 0x5f, 0x90, 0x0c, 0x19, 0xd7,
|
0x84, 0x22, 0xcc, 0xcf, 0xe7, 0xcf, 0x29, 0xda, 0xb7, 0x79, 0x80, 0xf1, 0x17, 0xa4, 0x42, 0xc9,
|
||||||
0x73, 0x2c, 0xd2, 0xe4, 0x7c, 0xd5, 0x84, 0x21, 0xde, 0x11, 0x82, 0x94, 0x45, 0x3c, 0x46, 0x99,
|
0xf3, 0x5d, 0x9b, 0x76, 0x05, 0x5f, 0x33, 0x67, 0xc9, 0x77, 0x84, 0xa0, 0x60, 0x53, 0x9f, 0x53,
|
||||||
0xaa, 0x26, 0x0c, 0xff, 0x05, 0x5d, 0x82, 0xf4, 0x87, 0x36, 0xc5, 0x1e, 0xcb, 0x92, 0x54, 0x4d,
|
0x16, 0x9a, 0x39, 0x2b, 0x78, 0x41, 0x07, 0xa1, 0xf8, 0x91, 0xc3, 0xb0, 0xcf, 0xab, 0xa4, 0x34,
|
||||||
0x18, 0xfc, 0x15, 0x29, 0x90, 0xad, 0x51, 0x6a, 0x9b, 0x98, 0xc8, 0x53, 0x7e, 0x62, 0xab, 0x09,
|
0x73, 0x96, 0x78, 0x45, 0x1a, 0x2c, 0xb6, 0x18, 0x73, 0x08, 0xa6, 0xea, 0x42, 0x50, 0xd8, 0x66,
|
||||||
0x23, 0x58, 0x40, 0x33, 0x30, 0x65, 0x5b, 0x64, 0x4f, 0x4e, 0x0b, 0xff, 0xec, 0x0d, 0x55, 0x21,
|
0xce, 0x0a, 0x17, 0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0x28, 0x2f, 0x9d, 0x89, 0xef, 0x14, 0x50, 0xd3, 0x1c, 0x32, 0x05,
|
||||||
0xd2, 0x04, 0xb7, 0xfa, 0x03, 0xf0, 0xea, 0x68, 0x00, 0x7c, 0x2b, 0x36, 0xca, 0x44, 0x0c, 0x38,
|
0x67, 0xa1, 0x48, 0x71, 0x2f, 0x1a, 0x80, 0x47, 0xd2, 0x09, 0x08, 0xac, 0xf8, 0x28, 0x93, 0x39,
|
||||||
0xfe, 0x9f, 0xac, 0xce, 0xff, 0x33, 0x75, 0xef, 0xef, 0x52, 0xab, 0xbf, 0x77, 0x04, 0x53, 0x3e,
|
0x10, 0xf8, 0x57, 0xd9, 0x9d, 0xff, 0xe7, 0xea, 0x3e, 0xb8, 0xc3, 0xec, 0x28, 0x76, 0x04, 0x0b,
|
||||||
0x8d, 0xa8, 0x0b, 0xf6, 0xac, 0x7e, 0x29, 0x89, 0x83, 0x53, 0x20, 0xc5, 0x0e, 0xf6, 0xe1, 0x82,
|
0x01, 0x8d, 0xec, 0x0b, 0xfe, 0xac, 0x7f, 0xa5, 0xc8, 0x83, 0x53, 0x22, 0x65, 0x04, 0xdb, 0xb0,
|
||||||
0xff, 0xf9, 0x21, 0xee, 0x78, 0xbb, 0xd4, 0xb1, 0xbc, 0x9e, 0x08, 0x55, 0xe1, 0xf8, 0xad, 0x6c,
|
0x3f, 0xf8, 0x7c, 0x1b, 0x0f, 0xfc, 0x3b, 0xcc, 0xb5, 0xfd, 0x91, 0x4c, 0x55, 0x75, 0x7a, 0x28,
|
||||||
0x05, 0xb0, 0xca, 0x86, 0xbf, 0x9d, 0x97, 0x07, 0x85, 0x95, 0x8f, 0x5c, 0x4a, 0x36, 0xd5, 0xa8,
|
0x17, 0x42, 0x58, 0xe3, 0x74, 0x10, 0xce, 0x8b, 0xa7, 0xd5, 0x93, 0x1f, 0x7b, 0x8c, 0x9e, 0xd7,
|
||||||
0x13, 0xb5, 0xd8, 0xc3, 0x2d, 0x7b, 0x64, 0xd5, 0x38, 0x4f, 0xc2, 0x3e, 0xd4, 0x25, 0xd1, 0x5a,
|
0x93, 0x4e, 0xf4, 0xe5, 0x11, 0xee, 0x39, 0xa9, 0x55, 0x6b, 0x1f, 0x8d, 0xfb, 0xd0, 0x4d, 0x59,
|
||||||
0x77, 0x28, 0xdd, 0xeb, 0xb4, 0xef, 0x38, 0x24, 0xd8, 0xc0, 0x45, 0x48, 0xd9, 0x0e, 0x09, 0x26,
|
0xbe, 0x70, 0xc5, 0x26, 0x51, 0x08, 0x4b, 0x50, 0x64, 0xf7, 0x28, 0x71, 0x65, 0x0c, 0xe2, 0x45,
|
||||||
0x8d, 0xed, 0x10, 0xf5, 0x5d, 0xd1, 0x5c, 0x21, 0x68, 0xff, 0x8c, 0x1f, 0x6c, 0x36, 0xb7, 0x3e,
|
0xff, 0x29, 0x2c, 0x46, 0xc2, 0x42, 0x86, 0xd2, 0x84, 0x32, 0x1e, 0x2f, 0xcb, 0x92, 0x2c, 0xa7,
|
||||||
0x7b, 0xbc, 0x6e, 0xd1, 0x90, 0x3c, 0x14, 0xcb, 0xc2, 0x97, 0x61, 0xba, 0xd4, 0xee, 0x9a, 0x27,
|
0xe3, 0x88, 0xf8, 0xe3, 0x75, 0x89, 0x9b, 0xbe, 0xba, 0xea, 0xac, 0xcb, 0xd9, 0x71, 0x95, 0xb1,
|
||||||
0xf2, 0xde, 0x16, 0x15, 0x16, 0xc6, 0x0e, 0x2e, 0x17, 0x93, 0x75, 0x75, 0xbf, 0x9f, 0x17, 0x60,
|
0xad, 0x41, 0xff, 0xaa, 0x4b, 0xc3, 0xf0, 0x0e, 0x40, 0xc1, 0x71, 0x69, 0x38, 0x4a, 0x1d, 0x97,
|
||||||
0x6e, 0xd0, 0x54, 0x1c, 0x75, 0x97, 0x36, 0x3a, 0xb6, 0x59, 0xc1, 0x36, 0x26, 0xf5, 0xa0, 0xfe,
|
0xea, 0xef, 0xc9, 0xe9, 0x11, 0x83, 0x46, 0x97, 0x98, 0x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0x36, 0x9d, 0x49, 0x10, 0x00, 0x00,
|
0xed, 0x3b, 0xe5, 0x6e, 0xa1, 0xaf, 0x70, 0x25, 0x55, 0x74, 0x2c, 0xad, 0x24, 0x76, 0x71, 0x68,
|
||||||
|
0xbc, 0xfd, 0xf8, 0x59, 0x45, 0x79, 0xf2, 0xac, 0xa2, 0xfc, 0xf1, 0xac, 0xa2, 0x7c, 0xf9, 0xbc,
|
||||||
|
0x92, 0x7b, 0xf2, 0xbc, 0x92, 0xfb, 0xed, 0x79, 0x25, 0xf7, 0xe1, 0x6a, 0xd7, 0xf6, 0x8d, 0x61,
|
||||||
|
0xa7, 0x65, 0xf8, 0x8c, 0xbb, 0xd8, 0xb0, 0x99, 0xe9, 0xe0, 0x36, 0xa3, 0x76, 0xbb, 0x63, 0xde,
|
||||||
|
0x8f, 0x1c, 0xb6, 0x4a, 0xfc, 0x57, 0x8e, 0xd3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x7a,
|
||||||
|
0x2b, 0x91, 0xb8, 0x11, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -1376,6 +1482,8 @@ type QueryClient interface {
|
|||||||
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
||||||
// Get registry module balance
|
// Get registry module balance
|
||||||
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||||
|
// Authorities queries all authorities
|
||||||
|
Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type queryClient struct {
|
type queryClient struct {
|
||||||
@ -1467,6 +1575,15 @@ func (c *queryClient) GetRegistryModuleBalance(ctx context.Context, in *QueryGet
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *queryClient) Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error) {
|
||||||
|
out := new(QueryAuthoritiesResponse)
|
||||||
|
err := c.cc.Invoke(ctx, "/cerc.registry.v1.Query/Authorities", in, out, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// QueryServer is the server API for Query service.
|
// QueryServer is the server API for Query service.
|
||||||
type QueryServer interface {
|
type QueryServer interface {
|
||||||
// Params queries the registry module params.
|
// Params queries the registry module params.
|
||||||
@ -1487,6 +1604,8 @@ type QueryServer interface {
|
|||||||
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
||||||
// Get registry module balance
|
// Get registry module balance
|
||||||
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||||
|
// Authorities queries all authorities
|
||||||
|
Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||||
@ -1520,6 +1639,9 @@ func (*UnimplementedQueryServer) ResolveLrn(ctx context.Context, req *QueryResol
|
|||||||
func (*UnimplementedQueryServer) GetRegistryModuleBalance(ctx context.Context, req *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
func (*UnimplementedQueryServer) GetRegistryModuleBalance(ctx context.Context, req *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
||||||
}
|
}
|
||||||
|
func (*UnimplementedQueryServer) Authorities(ctx context.Context, req *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error) {
|
||||||
|
return nil, status.Errorf(codes.Unimplemented, "method Authorities not implemented")
|
||||||
|
}
|
||||||
|
|
||||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||||
s.RegisterService(&_Query_serviceDesc, srv)
|
s.RegisterService(&_Query_serviceDesc, srv)
|
||||||
@ -1687,6 +1809,24 @@ func _Query_GetRegistryModuleBalance_Handler(srv interface{}, ctx context.Contex
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Query_Authorities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(QueryAuthoritiesRequest)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(QueryServer).Authorities(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/cerc.registry.v1.Query/Authorities",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(QueryServer).Authorities(ctx, req.(*QueryAuthoritiesRequest))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "cerc.registry.v1.Query",
|
ServiceName: "cerc.registry.v1.Query",
|
||||||
HandlerType: (*QueryServer)(nil),
|
HandlerType: (*QueryServer)(nil),
|
||||||
@ -1727,6 +1867,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GetRegistryModuleBalance",
|
MethodName: "GetRegistryModuleBalance",
|
||||||
Handler: _Query_GetRegistryModuleBalance_Handler,
|
Handler: _Query_GetRegistryModuleBalance_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "Authorities",
|
||||||
|
Handler: _Query_Authorities_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/registry/v1/query.proto",
|
Metadata: "cerc/registry/v1/query.proto",
|
||||||
@ -2471,6 +2615,85 @@ func (m *QueryWhoisResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
return len(dAtA) - i, nil
|
return len(dAtA) - i, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesRequest) 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 *QueryAuthoritiesRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Owner) > 0 {
|
||||||
|
i -= len(m.Owner)
|
||||||
|
copy(dAtA[i:], m.Owner)
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) 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 *QueryAuthoritiesResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if m.Pagination != nil {
|
||||||
|
{
|
||||||
|
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.Authorities) > 0 {
|
||||||
|
for iNdEx := len(m.Authorities) - 1; iNdEx >= 0; iNdEx-- {
|
||||||
|
{
|
||||||
|
size, err := m.Authorities[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||||
|
if err != nil {
|
||||||
|
return 0, err
|
||||||
|
}
|
||||||
|
i -= size
|
||||||
|
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||||
|
}
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (m *QueryLookupLrnRequest) Marshal() (dAtA []byte, err error) {
|
func (m *QueryLookupLrnRequest) Marshal() (dAtA []byte, err error) {
|
||||||
size := m.Size()
|
size := m.Size()
|
||||||
dAtA = make([]byte, size)
|
dAtA = make([]byte, size)
|
||||||
@ -3032,6 +3255,38 @@ func (m *QueryWhoisResponse) Size() (n int) {
|
|||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesRequest) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
l = len(m.Owner)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *QueryAuthoritiesResponse) Size() (n int) {
|
||||||
|
if m == nil {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Authorities) > 0 {
|
||||||
|
for _, e := range m.Authorities {
|
||||||
|
l = e.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if m.Pagination != nil {
|
||||||
|
l = m.Pagination.Size()
|
||||||
|
n += 1 + l + sovQuery(uint64(l))
|
||||||
|
}
|
||||||
|
return n
|
||||||
|
}
|
||||||
|
|
||||||
func (m *QueryLookupLrnRequest) Size() (n int) {
|
func (m *QueryLookupLrnRequest) Size() (n int) {
|
||||||
if m == nil {
|
if m == nil {
|
||||||
return 0
|
return 0
|
||||||
@ -4920,6 +5175,208 @@ func (m *QueryWhoisResponse) Unmarshal(dAtA []byte) error {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
func (m *QueryAuthoritiesRequest) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryAuthoritiesRequest: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryAuthoritiesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Owner = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
func (m *QueryAuthoritiesResponse) 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 ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
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: QueryAuthoritiesResponse: wiretype end group for non-group")
|
||||||
|
}
|
||||||
|
if fieldNum <= 0 {
|
||||||
|
return fmt.Errorf("proto: QueryAuthoritiesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||||
|
}
|
||||||
|
switch fieldNum {
|
||||||
|
case 1:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Authorities", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Authorities = append(m.Authorities, AuthorityEntry{})
|
||||||
|
if err := m.Authorities[len(m.Authorities)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowQuery
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.Pagination == nil {
|
||||||
|
m.Pagination = &query.PageResponse{}
|
||||||
|
}
|
||||||
|
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
iNdEx = postIndex
|
||||||
|
default:
|
||||||
|
iNdEx = preIndex
|
||||||
|
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthQuery
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if iNdEx > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
func (m *QueryLookupLrnRequest) Unmarshal(dAtA []byte) error {
|
func (m *QueryLookupLrnRequest) Unmarshal(dAtA []byte) error {
|
||||||
l := len(dAtA)
|
l := len(dAtA)
|
||||||
iNdEx := 0
|
iNdEx := 0
|
||||||
|
@ -393,6 +393,42 @@ func local_request_Query_GetRegistryModuleBalance_0(ctx context.Context, marshal
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var (
|
||||||
|
filter_Query_Authorities_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||||
|
)
|
||||||
|
|
||||||
|
func request_Query_Authorities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryAuthoritiesRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Authorities_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Authorities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_Authorities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryAuthoritiesRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
if err := req.ParseForm(); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Authorities_0); err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Authorities(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||||
// UnaryRPC :call QueryServer directly.
|
// UnaryRPC :call QueryServer directly.
|
||||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||||
@ -606,6 +642,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Authorities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
var stream runtime.ServerTransportStream
|
||||||
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := local_request_Query_Authorities_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_Authorities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -827,6 +886,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Authorities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
|
defer cancel()
|
||||||
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
|
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
resp, md, err := request_Query_Authorities_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
|
if err != nil {
|
||||||
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
forward_Query_Authorities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -848,6 +927,8 @@ var (
|
|||||||
pattern_Query_ResolveLrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Query_ResolveLrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
pattern_Query_GetRegistryModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Query_GetRegistryModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_Authorities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "authorities"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -868,4 +949,6 @@ var (
|
|||||||
forward_Query_ResolveLrn_0 = runtime.ForwardResponseMessage
|
forward_Query_ResolveLrn_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Query_GetRegistryModuleBalance_0 = runtime.ForwardResponseMessage
|
forward_Query_GetRegistryModuleBalance_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_Authorities_0 = runtime.ForwardResponseMessage
|
||||||
)
|
)
|
||||||
|
@ -6,6 +6,7 @@ package registry
|
|||||||
import (
|
import (
|
||||||
context "context"
|
context "context"
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
|
_ "github.com/cosmos/cosmos-proto"
|
||||||
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
grpc1 "github.com/cosmos/gogoproto/grpc"
|
grpc1 "github.com/cosmos/gogoproto/grpc"
|
||||||
@ -1040,6 +1041,102 @@ func (m *MsgReassociateRecordsResponse) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_MsgReassociateRecordsResponse proto.InternalMessageInfo
|
var xxx_messageInfo_MsgReassociateRecordsResponse 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/registry 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_3c6eb2e5a4d8fa03, []int{21}
|
||||||
|
}
|
||||||
|
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_3c6eb2e5a4d8fa03, []int{22}
|
||||||
|
}
|
||||||
|
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((*MsgSetRecord)(nil), "cerc.registry.v1.MsgSetRecord")
|
proto.RegisterType((*MsgSetRecord)(nil), "cerc.registry.v1.MsgSetRecord")
|
||||||
proto.RegisterType((*MsgSetRecordResponse)(nil), "cerc.registry.v1.MsgSetRecordResponse")
|
proto.RegisterType((*MsgSetRecordResponse)(nil), "cerc.registry.v1.MsgSetRecordResponse")
|
||||||
@ -1062,77 +1159,86 @@ func init() {
|
|||||||
proto.RegisterType((*MsgDissociateRecordsResponse)(nil), "cerc.registry.v1.MsgDissociateRecordsResponse")
|
proto.RegisterType((*MsgDissociateRecordsResponse)(nil), "cerc.registry.v1.MsgDissociateRecordsResponse")
|
||||||
proto.RegisterType((*MsgReassociateRecords)(nil), "cerc.registry.v1.MsgReassociateRecords")
|
proto.RegisterType((*MsgReassociateRecords)(nil), "cerc.registry.v1.MsgReassociateRecords")
|
||||||
proto.RegisterType((*MsgReassociateRecordsResponse)(nil), "cerc.registry.v1.MsgReassociateRecordsResponse")
|
proto.RegisterType((*MsgReassociateRecordsResponse)(nil), "cerc.registry.v1.MsgReassociateRecordsResponse")
|
||||||
|
proto.RegisterType((*MsgUpdateParams)(nil), "cerc.registry.v1.MsgUpdateParams")
|
||||||
|
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cerc.registry.v1.MsgUpdateParamsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("cerc/registry/v1/tx.proto", fileDescriptor_3c6eb2e5a4d8fa03) }
|
func init() { proto.RegisterFile("cerc/registry/v1/tx.proto", fileDescriptor_3c6eb2e5a4d8fa03) }
|
||||||
|
|
||||||
var fileDescriptor_3c6eb2e5a4d8fa03 = []byte{
|
var fileDescriptor_3c6eb2e5a4d8fa03 = []byte{
|
||||||
// 1036 bytes of a gzipped FileDescriptorProto
|
// 1140 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0x41, 0x6f, 0xe3, 0x44,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x97, 0xcf, 0x6f, 0xdc, 0x44,
|
||||||
0x14, 0xc7, 0x3b, 0xc9, 0x6e, 0x4b, 0x5e, 0xd8, 0x2a, 0x6b, 0xca, 0x6e, 0xea, 0xa6, 0x76, 0x3a,
|
0x14, 0xc7, 0xe3, 0x4d, 0x9b, 0xb0, 0x6f, 0xdb, 0x90, 0x9a, 0xd0, 0x6c, 0x9c, 0x64, 0x77, 0x33,
|
||||||
0x6d, 0xd2, 0x6c, 0x4b, 0x63, 0xb6, 0x9c, 0xe8, 0x89, 0x8d, 0x10, 0x52, 0x0f, 0x41, 0xc8, 0x15,
|
0xc9, 0x6e, 0x7e, 0x91, 0x35, 0x0d, 0x52, 0x25, 0x72, 0x22, 0x2b, 0x84, 0x94, 0xc3, 0xa2, 0xca,
|
||||||
0x17, 0x2e, 0x91, 0x1b, 0x8f, 0xbc, 0x46, 0x89, 0xa7, 0x78, 0xbc, 0xcd, 0x46, 0x02, 0x09, 0xf6,
|
0x51, 0x2f, 0x08, 0x69, 0xe5, 0xac, 0x47, 0xae, 0xd1, 0xae, 0x67, 0xf1, 0xb8, 0x49, 0x57, 0x02,
|
||||||
0x80, 0x04, 0x12, 0x12, 0x12, 0x02, 0x89, 0x03, 0x47, 0x2e, 0x9c, 0xf6, 0xc6, 0x57, 0xd8, 0xe3,
|
0x09, 0x7a, 0x03, 0x09, 0x09, 0x84, 0x40, 0xe2, 0xc0, 0x91, 0x0b, 0xa7, 0x1e, 0x90, 0xf8, 0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x86, 0x94, 0x69, 0x43,
|
0x7a, 0x6d, 0xce, 0x26, 0x36, 0x61, 0x43, 0x3d, 0x18, 0x89, 0xa7, 0xf3, 0x5d, 0x42, 0xfb, 0x84,
|
||||||
0x66, 0xf9, 0xd9, 0x87, 0xcc, 0x0a, 0x03, 0x6a, 0xca, 0x59, 0x58, 0x71, 0x01, 0xfe, 0x0d, 0xc1,
|
0xea, 0x7d, 0x6a, 0x07, 0xd9, 0xfb, 0xd4, 0x16, 0x81, 0x6a, 0xca, 0x59, 0x5a, 0x71, 0xc1, 0x02,
|
||||||
0xeb, 0x5d, 0x66, 0x9d, 0x10, 0x4f, 0x27, 0x7d, 0xea, 0x9a, 0xd2, 0x11, 0xac, 0x9c, 0x52, 0xc7,
|
0x7f, 0xb3, 0xc3, 0x53, 0xf2, 0x1f, 0x3c, 0x84, 0x7e, 0x57, 0xe0, 0x46, 0x9b, 0xda, 0x87, 0xd8,
|
||||||
0xec, 0xd9, 0x66, 0x15, 0xd5, 0x51, 0xab, 0xd4, 0xd9, 0xba, 0x9a, 0xa8, 0x9b, 0x9f, 0x32, 0xea,
|
0x37, 0x70, 0x97, 0x78, 0x96, 0xba, 0x07, 0xd3, 0x47, 0xc4, 0xb5, 0x3a, 0x8e, 0x55, 0x56, 0x6a,
|
||||||
0x1c, 0xe1, 0x30, 0x80, 0xeb, 0x63, 0x63, 0x38, 0x98, 0xfe, 0xd4, 0x97, 0xfd, 0xd1, 0xb1, 0x29,
|
0xca, 0x46, 0xb1, 0xb5, 0x72, 0x71, 0x5a, 0x5d, 0xfe, 0x8c, 0x12, 0x77, 0x0f, 0x89, 0x00, 0xaa,
|
||||||
0xdd, 0x81, 0x65, 0x66, 0x5b, 0x0e, 0x71, 0xab, 0x05, 0xff, 0x51, 0x3d, 0xfc, 0x25, 0xbd, 0x0b,
|
0x0d, 0xcd, 0x7e, 0x2f, 0xfa, 0x69, 0x4c, 0x05, 0xa3, 0x03, 0x4b, 0xbd, 0x0d, 0x53, 0xd4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x62,
|
||||||
0x8a, 0xe4, 0xfd, 0x05, 0x44, 0x02, 0xe7, 0x1e, 0xc7, 0xd9, 0xc6, 0x5b, 0x69, 0x1c, 0xd3, 0x4e,
|
0xed, 0xf1, 0x5f, 0x2f, 0x7e, 0x2c, 0x54, 0xd0, 0x92, 0x9e, 0xba, 0x61, 0x50, 0xec, 0x77, 0xc4,
|
||||||
0xf2, 0xfc, 0x8c, 0xe0, 0x76, 0xfa, 0xbc, 0x36, 0xaf, 0x71, 0x0b, 0x75, 0x72, 0x7b, 0x31, 0x9d,
|
0x79, 0xf9, 0xb5, 0x02, 0xa5, 0xf8, 0x26, 0x56, 0xcb, 0xcc, 0x1e, 0x53, 0x68, 0x1b, 0x57, 0x29,
|
||||||
0x00, 0x7b, 0x8b, 0x83, 0x35, 0xf1, 0xce, 0x5c, 0x30, 0x37, 0xa4, 0xf8, 0x05, 0x81, 0x94, 0x71,
|
0x24, 0x41, 0x83, 0x11, 0xd4, 0x50, 0x45, 0xcf, 0xb8, 0xe3, 0x04, 0x3d, 0x25, 0x18, 0xbe, 0x51,
|
||||||
0x62, 0x77, 0x73, 0x36, 0xc8, 0xac, 0x50, 0xd6, 0x16, 0x14, 0x0a, 0xbc, 0x03, 0x8e, 0xb7, 0x8b,
|
0xe0, 0x66, 0x72, 0xcb, 0x42, 0x99, 0x1e, 0x09, 0x8d, 0xb6, 0x75, 0xb5, 0x46, 0x92, 0x6c, 0x30,
|
||||||
0x1b, 0x59, 0x1b, 0xca, 0x48, 0xf1, 0x7d, 0x06, 0x2b, 0xd1, 0x7d, 0xa7, 0x96, 0x77, 0x68, 0xfc,
|
0x12, 0x84, 0x6a, 0x69, 0x12, 0xd9, 0x4b, 0xac, 0x2d, 0xd5, 0xef, 0x14, 0x98, 0x19, 0xd9, 0x69,
|
||||||
0xa8, 0xbc, 0x33, 0x2f, 0x2a, 0xdc, 0x31, 0x77, 0xaf, 0x61, 0x39, 0xfb, 0x40, 0xf1, 0x7b, 0xc4,
|
0x56, 0x33, 0x8d, 0x92, 0x22, 0x6d, 0x7b, 0x0c, 0x91, 0xc4, 0xd9, 0x64, 0x38, 0xab, 0x68, 0x25,
|
||||||
0x17, 0x00, 0xb1, 0x8f, 0xb8, 0x9a, 0x5d, 0x7e, 0x21, 0x90, 0x77, 0xaf, 0x11, 0x08, 0xef, 0x06,
|
0x8d, 0x63, 0x39, 0x49, 0x9e, 0x5f, 0x14, 0xb8, 0x95, 0xde, 0x5e, 0x1a, 0x57, 0xb8, 0x09, 0x9d,
|
||||||
0xf7, 0x56, 0xf1, 0x66, 0x46, 0x63, 0xb8, 0x3a, 0xb0, 0xff, 0x11, 0x41, 0x25, 0x75, 0xeb, 0x6a,
|
0xd6, 0x1c, 0x4f, 0x27, 0xc1, 0xde, 0x61, 0x60, 0x0d, 0xb4, 0x76, 0x29, 0x98, 0x27, 0x28, 0x7e,
|
||||||
0xe4, 0x94, 0x39, 0x29, 0x93, 0x0f, 0x16, 0x92, 0x09, 0xa2, 0x7d, 0x4e, 0xd4, 0xc0, 0xdb, 0x59,
|
0x55, 0x40, 0xcd, 0xd8, 0x60, 0xd6, 0x73, 0x1a, 0x64, 0x54, 0xa8, 0xe9, 0x63, 0x0a, 0x25, 0xde,
|
||||||
0xbd, 0xe0, 0xcf, 0xf4, 0x0c, 0x81, 0xf0, 0x13, 0x82, 0x4a, 0xea, 0x1e, 0xd6, 0xc8, 0xab, 0x7a,
|
0x0e, 0xc3, 0x5b, 0x47, 0xf5, 0xac, 0x86, 0x32, 0x53, 0x7c, 0x9f, 0xc3, 0x74, 0x78, 0x3d, 0x5b,
|
||||||
0x42, 0x96, 0xc3, 0x95, 0x7b, 0x93, 0x9a, 0xb3, 0x85, 0xfd, 0x2e, 0x09, 0x26, 0x7e, 0xbc, 0xe4,
|
0xca, 0xfb, 0x68, 0x82, 0xa8, 0xb6, 0x76, 0x59, 0x54, 0xba, 0x23, 0xe6, 0xbe, 0x84, 0xb4, 0xec,
|
||||||
0x9b, 0x5f, 0xbe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fe, 0xd5, 0xcb, 0x27, 0x5b, 0x4a, 0xeb, 0x83, 0xa7, 0x67,
|
||||||
|
0x15, 0xe5, 0xd9, 0x59, 0x45, 0xf9, 0xe7, 0xac, 0xa2, 0x7c, 0x7f, 0x5e, 0x99, 0x78, 0x76, 0x5e,
|
||||||
|
0x99, 0xf8, 0xfb, 0xbc, 0x32, 0xf1, 0x49, 0xc3, 0x76, 0xfc, 0xe6, 0xb1, 0x75, 0xd4, 0x0c, 0xfe,
|
||||||
|
0xd9, 0x61, 0xaf, 0xbb, 0xe3, 0x10, 0xbd, 0x67, 0x76, 0x89, 0xeb, 0x74, 0x2d, 0xfd, 0x91, 0x84,
|
||||||
|
0x3f, 0x9a, 0x62, 0xff, 0xf7, 0xde, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xe7, 0x1e, 0x96, 0xe1,
|
||||||
|
0xa7, 0x0e, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -1167,6 +1273,9 @@ type MsgClient interface {
|
|||||||
ReserveAuthority(ctx context.Context, in *MsgReserveAuthority, opts ...grpc.CallOption) (*MsgReserveAuthorityResponse, error)
|
ReserveAuthority(ctx context.Context, in *MsgReserveAuthority, opts ...grpc.CallOption) (*MsgReserveAuthorityResponse, error)
|
||||||
// SetAuthorityBond
|
// SetAuthorityBond
|
||||||
SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBond, opts ...grpc.CallOption) (*MsgSetAuthorityBondResponse, error)
|
SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBond, opts ...grpc.CallOption) (*MsgSetAuthorityBondResponse, 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 {
|
||||||
@ -1267,6 +1376,15 @@ func (c *msgClient) SetAuthorityBond(ctx context.Context, in *MsgSetAuthorityBon
|
|||||||
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.registry.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 {
|
||||||
// SetRecord records a new record with given payload and bond id
|
// SetRecord records a new record with given payload and bond id
|
||||||
@ -1289,6 +1407,9 @@ type MsgServer interface {
|
|||||||
ReserveAuthority(context.Context, *MsgReserveAuthority) (*MsgReserveAuthorityResponse, error)
|
ReserveAuthority(context.Context, *MsgReserveAuthority) (*MsgReserveAuthorityResponse, error)
|
||||||
// SetAuthorityBond
|
// SetAuthorityBond
|
||||||
SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error)
|
SetAuthorityBond(context.Context, *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, 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.
|
||||||
@ -1325,6 +1446,9 @@ func (*UnimplementedMsgServer) ReserveAuthority(ctx context.Context, req *MsgRes
|
|||||||
func (*UnimplementedMsgServer) SetAuthorityBond(ctx context.Context, req *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error) {
|
func (*UnimplementedMsgServer) SetAuthorityBond(ctx context.Context, req *MsgSetAuthorityBond) (*MsgSetAuthorityBondResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SetAuthorityBond not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method SetAuthorityBond 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)
|
||||||
@ -1510,6 +1634,24 @@ func _Msg_SetAuthorityBond_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
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.registry.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.registry.v1.Msg",
|
ServiceName: "cerc.registry.v1.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
@ -1554,6 +1696,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "SetAuthorityBond",
|
MethodName: "SetAuthorityBond",
|
||||||
Handler: _Msg_SetAuthorityBond_Handler,
|
Handler: _Msg_SetAuthorityBond_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/registry/v1/tx.proto",
|
Metadata: "cerc/registry/v1/tx.proto",
|
||||||
@ -2260,6 +2406,69 @@ func (m *MsgReassociateRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (int,
|
|||||||
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
|
||||||
@ -2576,6 +2785,30 @@ func (m *MsgReassociateRecordsResponse) 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
|
||||||
}
|
}
|
||||||
@ -4567,6 +4800,171 @@ func (m *MsgReassociateRecordsResponse) 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
|
||||||
|
Loading…
Reference in New Issue
Block a user