Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d361062cb | ||
|
|
c7f9ef6576 | ||
|
|
debfb82205 | ||
|
|
3c5cd002e1 | ||
|
|
b5a76a920e | ||
|
|
f176a5889e | ||
|
|
5e7d5fc47c | ||
|
|
c162396298 | ||
|
|
7a88c82816 | ||
|
|
9fab3f8326 | ||
|
|
ec6e2f3776 | ||
|
|
eb20f77e83 |
@@ -25,6 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
# 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_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 (
|
||||||
|
|||||||
+1091
-108
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",
|
||||||
|
|||||||
+1178
-49
File diff suppressed because it is too large
Load Diff
@@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion7
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
Msg_OnboardParticipant_FullMethodName = "/cerc.onboarding.v1.Msg/OnboardParticipant"
|
Msg_OnboardParticipant_FullMethodName = "/cerc.onboarding.v1.Msg/OnboardParticipant"
|
||||||
|
Msg_UpdateParams_FullMethodName = "/cerc.onboarding.v1.Msg/UpdateParams"
|
||||||
)
|
)
|
||||||
|
|
||||||
// MsgClient is the client API for Msg service.
|
// MsgClient is the client API for Msg service.
|
||||||
@@ -28,6 +29,9 @@ const (
|
|||||||
type MsgClient interface {
|
type MsgClient interface {
|
||||||
// OnboardParticipant defines a method for enrolling a new validator.
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error)
|
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, 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 {
|
||||||
@@ -47,12 +51,24 @@ func (c *msgClient) OnboardParticipant(ctx context.Context, in *MsgOnboardPartic
|
|||||||
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
|
||||||
type MsgServer interface {
|
type MsgServer interface {
|
||||||
// OnboardParticipant defines a method for enrolling a new validator.
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error)
|
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error)
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||||
mustEmbedUnimplementedMsgServer()
|
mustEmbedUnimplementedMsgServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +79,9 @@ type UnimplementedMsgServer struct {
|
|||||||
func (UnimplementedMsgServer) OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
func (UnimplementedMsgServer) OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant 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.
|
||||||
@@ -94,6 +113,24 @@ func _Msg_OnboardParticipant_Handler(srv interface{}, ctx context.Context, dec f
|
|||||||
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)
|
||||||
@@ -105,6 +142,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "OnboardParticipant",
|
MethodName: "OnboardParticipant",
|
||||||
Handler: _Msg_OnboardParticipant_Handler,
|
Handler: _Msg_OnboardParticipant_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/onboarding/v1/tx.proto",
|
Metadata: "cerc/onboarding/v1/tx.proto",
|
||||||
|
|||||||
+1363
-235
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",
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ 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"
|
||||||
|
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 +49,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,6 +78,7 @@ 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
|
||||||
CrisisKeeper *crisiskeeper.Keeper
|
CrisisKeeper *crisiskeeper.Keeper
|
||||||
ConsensusParamsKeeper consensuskeeper.Keeper
|
ConsensusParamsKeeper consensuskeeper.Keeper
|
||||||
@@ -142,6 +145,7 @@ func NewLaconicApp(
|
|||||||
&app.AccountKeeper,
|
&app.AccountKeeper,
|
||||||
&app.BankKeeper,
|
&app.BankKeeper,
|
||||||
&app.StakingKeeper,
|
&app.StakingKeeper,
|
||||||
|
&app.SlashingKeeper,
|
||||||
&app.DistrKeeper,
|
&app.DistrKeeper,
|
||||||
&app.CrisisKeeper,
|
&app.CrisisKeeper,
|
||||||
&app.ConsensusParamsKeeper,
|
&app.ConsensusParamsKeeper,
|
||||||
|
|||||||
+5
-2
@@ -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, 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, 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
|
||||||
@@ -39,6 +39,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
|
||||||
|
|||||||
@@ -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,16 @@ 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
|
||||||
|
app.SlashingKeeper.IterateValidatorSigningInfos(
|
||||||
|
ctx,
|
||||||
|
func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) {
|
||||||
|
info.StartHeight = 0
|
||||||
|
app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info)
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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() {
|
||||||
|
|||||||
@@ -98,7 +98,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 = "0alnt"
|
||||||
|
|
||||||
// overwrite the block timeout
|
// overwrite the block timeout
|
||||||
cmtCfg := cmtcfg.DefaultConfig()
|
cmtCfg := cmtcfg.DefaultConfig()
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ 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
|
||||||
|
|||||||
@@ -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.
|
||||||
@@ -195,6 +197,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.
|
||||||
@@ -245,6 +252,9 @@ type Query {
|
|||||||
# 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 +273,6 @@ type Query {
|
|||||||
|
|
||||||
# Query participants.
|
# Query participants.
|
||||||
getParticipants: [Participant]!
|
getParticipants: [Participant]!
|
||||||
|
getParticipantByAddress(address: String!): Participant!
|
||||||
|
getParticipantByNitroAddress(nitroAddress: String!): Participant!
|
||||||
}
|
}
|
||||||
|
|||||||
+705
-12
@@ -87,6 +87,11 @@ type ComplexityRoot struct {
|
|||||||
Status func(childComplexity int) int
|
Status func(childComplexity int) int
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Authority struct {
|
||||||
|
Entry func(childComplexity int) int
|
||||||
|
Name func(childComplexity int) int
|
||||||
|
}
|
||||||
|
|
||||||
AuthorityRecord struct {
|
AuthorityRecord struct {
|
||||||
Auction func(childComplexity int) int
|
Auction func(childComplexity int) int
|
||||||
BondID func(childComplexity int) int
|
BondID func(childComplexity int) int
|
||||||
@@ -155,7 +160,9 @@ type ComplexityRoot struct {
|
|||||||
|
|
||||||
Participant struct {
|
Participant struct {
|
||||||
CosmosAddress func(childComplexity int) int
|
CosmosAddress func(childComplexity int) int
|
||||||
|
KycID func(childComplexity int) int
|
||||||
NitroAddress func(childComplexity int) int
|
NitroAddress func(childComplexity int) int
|
||||||
|
Role func(childComplexity int) int
|
||||||
}
|
}
|
||||||
|
|
||||||
PeerInfo struct {
|
PeerInfo struct {
|
||||||
@@ -165,18 +172,21 @@ type ComplexityRoot struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Query struct {
|
Query struct {
|
||||||
GetAccounts func(childComplexity int, addresses []string) int
|
GetAccounts func(childComplexity int, addresses []string) int
|
||||||
GetAuctionsByIds func(childComplexity int, ids []string) int
|
GetAuctionsByIds func(childComplexity int, ids []string) int
|
||||||
GetBondsByIds func(childComplexity int, ids []string) int
|
GetAuthorities func(childComplexity int, owner *string) int
|
||||||
GetParticipants func(childComplexity int) int
|
GetBondsByIds func(childComplexity int, ids []string) int
|
||||||
GetRecordsByIds func(childComplexity int, ids []string) int
|
GetParticipantByAddress func(childComplexity int, address string) int
|
||||||
GetStatus func(childComplexity int) int
|
GetParticipantByNitroAddress func(childComplexity int, nitroAddress string) int
|
||||||
LookupAuthorities func(childComplexity int, names []string) int
|
GetParticipants func(childComplexity int) int
|
||||||
LookupNames func(childComplexity int, names []string) int
|
GetRecordsByIds func(childComplexity int, ids []string) int
|
||||||
QueryBonds func(childComplexity int, attributes []*KeyValueInput) int
|
GetStatus func(childComplexity int) int
|
||||||
QueryBondsByOwner func(childComplexity int, ownerAddresses []string) int
|
LookupAuthorities func(childComplexity int, names []string) int
|
||||||
QueryRecords func(childComplexity int, attributes []*KeyValueInput, all *bool) int
|
LookupNames func(childComplexity int, names []string) int
|
||||||
ResolveNames func(childComplexity int, names []string) int
|
QueryBonds func(childComplexity int, attributes []*KeyValueInput) int
|
||||||
|
QueryBondsByOwner func(childComplexity int, ownerAddresses []string) int
|
||||||
|
QueryRecords func(childComplexity int, attributes []*KeyValueInput, all *bool) int
|
||||||
|
ResolveNames func(childComplexity int, names []string) int
|
||||||
}
|
}
|
||||||
|
|
||||||
Record struct {
|
Record struct {
|
||||||
@@ -227,11 +237,14 @@ type QueryResolver interface {
|
|||||||
QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error)
|
QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error)
|
||||||
GetRecordsByIds(ctx context.Context, ids []string) ([]*Record, error)
|
GetRecordsByIds(ctx context.Context, ids []string) ([]*Record, error)
|
||||||
QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error)
|
QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error)
|
||||||
|
GetAuthorities(ctx context.Context, owner *string) ([]*Authority, error)
|
||||||
LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error)
|
LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error)
|
||||||
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
||||||
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
||||||
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
||||||
GetParticipants(ctx context.Context) ([]*Participant, error)
|
GetParticipants(ctx context.Context) ([]*Participant, error)
|
||||||
|
GetParticipantByAddress(ctx context.Context, address string) (*Participant, error)
|
||||||
|
GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type executableSchema struct {
|
type executableSchema struct {
|
||||||
@@ -452,6 +465,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.AuctionBid.Status(childComplexity), true
|
return e.complexity.AuctionBid.Status(childComplexity), true
|
||||||
|
|
||||||
|
case "Authority.entry":
|
||||||
|
if e.complexity.Authority.Entry == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Authority.Entry(childComplexity), true
|
||||||
|
|
||||||
|
case "Authority.name":
|
||||||
|
if e.complexity.Authority.Name == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Authority.Name(childComplexity), true
|
||||||
|
|
||||||
case "AuthorityRecord.auction":
|
case "AuthorityRecord.auction":
|
||||||
if e.complexity.AuthorityRecord.Auction == nil {
|
if e.complexity.AuthorityRecord.Auction == nil {
|
||||||
break
|
break
|
||||||
@@ -648,6 +675,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Participant.CosmosAddress(childComplexity), true
|
return e.complexity.Participant.CosmosAddress(childComplexity), true
|
||||||
|
|
||||||
|
case "Participant.kycId":
|
||||||
|
if e.complexity.Participant.KycID == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Participant.KycID(childComplexity), true
|
||||||
|
|
||||||
case "Participant.nitroAddress":
|
case "Participant.nitroAddress":
|
||||||
if e.complexity.Participant.NitroAddress == nil {
|
if e.complexity.Participant.NitroAddress == nil {
|
||||||
break
|
break
|
||||||
@@ -655,6 +689,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Participant.NitroAddress(childComplexity), true
|
return e.complexity.Participant.NitroAddress(childComplexity), true
|
||||||
|
|
||||||
|
case "Participant.role":
|
||||||
|
if e.complexity.Participant.Role == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Participant.Role(childComplexity), true
|
||||||
|
|
||||||
case "PeerInfo.isOutbound":
|
case "PeerInfo.isOutbound":
|
||||||
if e.complexity.PeerInfo.IsOutbound == nil {
|
if e.complexity.PeerInfo.IsOutbound == nil {
|
||||||
break
|
break
|
||||||
@@ -700,6 +741,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Query.GetAuctionsByIds(childComplexity, args["ids"].([]string)), true
|
return e.complexity.Query.GetAuctionsByIds(childComplexity, args["ids"].([]string)), true
|
||||||
|
|
||||||
|
case "Query.getAuthorities":
|
||||||
|
if e.complexity.Query.GetAuthorities == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
args, err := ec.field_Query_getAuthorities_args(context.TODO(), rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Query.GetAuthorities(childComplexity, args["owner"].(*string)), true
|
||||||
|
|
||||||
case "Query.getBondsByIds":
|
case "Query.getBondsByIds":
|
||||||
if e.complexity.Query.GetBondsByIds == nil {
|
if e.complexity.Query.GetBondsByIds == nil {
|
||||||
break
|
break
|
||||||
@@ -712,6 +765,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
|||||||
|
|
||||||
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
||||||
|
|
||||||
|
case "Query.getParticipantByAddress":
|
||||||
|
if e.complexity.Query.GetParticipantByAddress == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
args, err := ec.field_Query_getParticipantByAddress_args(context.TODO(), rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Query.GetParticipantByAddress(childComplexity, args["address"].(string)), true
|
||||||
|
|
||||||
|
case "Query.getParticipantByNitroAddress":
|
||||||
|
if e.complexity.Query.GetParticipantByNitroAddress == nil {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
args, err := ec.field_Query_getParticipantByNitroAddress_args(context.TODO(), rawArgs)
|
||||||
|
if err != nil {
|
||||||
|
return 0, false
|
||||||
|
}
|
||||||
|
|
||||||
|
return e.complexity.Query.GetParticipantByNitroAddress(childComplexity, args["nitroAddress"].(string)), true
|
||||||
|
|
||||||
case "Query.getParticipants":
|
case "Query.getParticipants":
|
||||||
if e.complexity.Query.GetParticipants == nil {
|
if e.complexity.Query.GetParticipants == nil {
|
||||||
break
|
break
|
||||||
@@ -1097,6 +1174,21 @@ func (ec *executionContext) field_Query_getAuctionsByIds_args(ctx context.Contex
|
|||||||
return args, nil
|
return args, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) field_Query_getAuthorities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||||
|
var err error
|
||||||
|
args := map[string]interface{}{}
|
||||||
|
var arg0 *string
|
||||||
|
if tmp, ok := rawArgs["owner"]; ok {
|
||||||
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
|
||||||
|
arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
args["owner"] = arg0
|
||||||
|
return args, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||||
var err error
|
var err error
|
||||||
args := map[string]interface{}{}
|
args := map[string]interface{}{}
|
||||||
@@ -1112,6 +1204,36 @@ func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context,
|
|||||||
return args, nil
|
return args, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) field_Query_getParticipantByAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||||
|
var err error
|
||||||
|
args := map[string]interface{}{}
|
||||||
|
var arg0 string
|
||||||
|
if tmp, ok := rawArgs["address"]; ok {
|
||||||
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("address"))
|
||||||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
args["address"] = arg0
|
||||||
|
return args, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) field_Query_getParticipantByNitroAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||||
|
var err error
|
||||||
|
args := map[string]interface{}{}
|
||||||
|
var arg0 string
|
||||||
|
if tmp, ok := rawArgs["nitroAddress"]; ok {
|
||||||
|
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nitroAddress"))
|
||||||
|
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
args["nitroAddress"] = arg0
|
||||||
|
return args, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) field_Query_getRecordsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
func (ec *executionContext) field_Query_getRecordsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||||
var err error
|
var err error
|
||||||
args := map[string]interface{}{}
|
args := map[string]interface{}{}
|
||||||
@@ -2600,6 +2722,110 @@ func (ec *executionContext) fieldContext_AuctionBid_bidAmount(ctx context.Contex
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Authority_name(ctx context.Context, field graphql.CollectedField, obj *Authority) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Authority_name(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.Name, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Authority_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Authority",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Authority_entry(ctx context.Context, field graphql.CollectedField, obj *Authority) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Authority_entry(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.Entry, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(*AuthorityRecord)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Authority_entry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Authority",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "ownerAddress":
|
||||||
|
return ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
||||||
|
case "ownerPublicKey":
|
||||||
|
return ec.fieldContext_AuthorityRecord_ownerPublicKey(ctx, field)
|
||||||
|
case "height":
|
||||||
|
return ec.fieldContext_AuthorityRecord_height(ctx, field)
|
||||||
|
case "status":
|
||||||
|
return ec.fieldContext_AuthorityRecord_status(ctx, field)
|
||||||
|
case "bondId":
|
||||||
|
return ec.fieldContext_AuthorityRecord_bondId(ctx, field)
|
||||||
|
case "expiryTime":
|
||||||
|
return ec.fieldContext_AuthorityRecord_expiryTime(ctx, field)
|
||||||
|
case "auction":
|
||||||
|
return ec.fieldContext_AuthorityRecord_auction(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type AuthorityRecord", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
|
func (ec *executionContext) _AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
fc, err := ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -3924,6 +4150,94 @@ func (ec *executionContext) fieldContext_Participant_nitroAddress(ctx context.Co
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Participant_role(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Participant_role(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.Role, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Participant_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Participant",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Participant_kycId(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Participant_kycId(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return obj.KycID, nil
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(string)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Participant_kycId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Participant",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: false,
|
||||||
|
IsResolver: false,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
return nil, errors.New("field of type String does not have child fields")
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
|
fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -4508,6 +4822,64 @@ func (ec *executionContext) fieldContext_Query_queryRecords(ctx context.Context,
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Query_getAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Query_getAuthorities(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return ec.resolvers.Query().GetAuthorities(rctx, fc.Args["owner"].(*string))
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.([]*Authority)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalOAuthority2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Query_getAuthorities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Query",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "name":
|
||||||
|
return ec.fieldContext_Authority_name(ctx, field)
|
||||||
|
case "entry":
|
||||||
|
return ec.fieldContext_Authority_entry(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type Authority", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
err = ec.Recover(ctx, r)
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
if fc.Args, err = ec.field_Query_getAuthorities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Query_lookupAuthorities(ctx, field)
|
fc, err := ec.fieldContext_Query_lookupAuthorities(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -4836,6 +5208,10 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
|||||||
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||||
case "nitroAddress":
|
case "nitroAddress":
|
||||||
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||||
|
case "role":
|
||||||
|
return ec.fieldContext_Participant_role(ctx, field)
|
||||||
|
case "kycId":
|
||||||
|
return ec.fieldContext_Participant_kycId(ctx, field)
|
||||||
}
|
}
|
||||||
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
|
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
|
||||||
},
|
},
|
||||||
@@ -4843,6 +5219,136 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
|||||||
return fc, nil
|
return fc, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Query_getParticipantByAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Query_getParticipantByAddress(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return ec.resolvers.Query().GetParticipantByAddress(rctx, fc.Args["address"].(string))
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(*Participant)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Query_getParticipantByAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Query",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "cosmosAddress":
|
||||||
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||||
|
case "nitroAddress":
|
||||||
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||||
|
case "role":
|
||||||
|
return ec.fieldContext_Participant_role(ctx, field)
|
||||||
|
case "kycId":
|
||||||
|
return ec.fieldContext_Participant_kycId(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
err = ec.Recover(ctx, r)
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
if fc.Args, err = ec.field_Query_getParticipantByAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Query_getParticipantByNitroAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
|
fc, err := ec.fieldContext_Query_getParticipantByNitroAddress(ctx, field)
|
||||||
|
if err != nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = graphql.Null
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||||
|
ctx = rctx // use context from middleware stack in children
|
||||||
|
return ec.resolvers.Query().GetParticipantByNitroAddress(rctx, fc.Args["nitroAddress"].(string))
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
if resTmp == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, fc) {
|
||||||
|
ec.Errorf(ctx, "must not be null")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
res := resTmp.(*Participant)
|
||||||
|
fc.Result = res
|
||||||
|
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) fieldContext_Query_getParticipantByNitroAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||||
|
fc = &graphql.FieldContext{
|
||||||
|
Object: "Query",
|
||||||
|
Field: field,
|
||||||
|
IsMethod: true,
|
||||||
|
IsResolver: true,
|
||||||
|
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||||
|
switch field.Name {
|
||||||
|
case "cosmosAddress":
|
||||||
|
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||||
|
case "nitroAddress":
|
||||||
|
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||||
|
case "role":
|
||||||
|
return ec.fieldContext_Participant_role(ctx, field)
|
||||||
|
case "kycId":
|
||||||
|
return ec.fieldContext_Participant_kycId(ctx, field)
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
|
||||||
|
},
|
||||||
|
}
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
err = ec.Recover(ctx, r)
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
ctx = graphql.WithFieldContext(ctx, fc)
|
||||||
|
if fc.Args, err = ec.field_Query_getParticipantByNitroAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||||
|
ec.Error(ctx, err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
return fc, nil
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||||
fc, err := ec.fieldContext_Query___type(ctx, field)
|
fc, err := ec.fieldContext_Query___type(ctx, field)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -8327,6 +8833,41 @@ func (ec *executionContext) _AuctionBid(ctx context.Context, sel ast.SelectionSe
|
|||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var authorityImplementors = []string{"Authority"}
|
||||||
|
|
||||||
|
func (ec *executionContext) _Authority(ctx context.Context, sel ast.SelectionSet, obj *Authority) graphql.Marshaler {
|
||||||
|
fields := graphql.CollectFields(ec.OperationContext, sel, authorityImplementors)
|
||||||
|
out := graphql.NewFieldSet(fields)
|
||||||
|
var invalids uint32
|
||||||
|
for i, field := range fields {
|
||||||
|
switch field.Name {
|
||||||
|
case "__typename":
|
||||||
|
out.Values[i] = graphql.MarshalString("Authority")
|
||||||
|
case "name":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Authority_name(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
case "entry":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Authority_entry(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
panic("unknown field " + strconv.Quote(field.Name))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.Dispatch()
|
||||||
|
if invalids > 0 {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
var authorityRecordImplementors = []string{"AuthorityRecord"}
|
var authorityRecordImplementors = []string{"AuthorityRecord"}
|
||||||
|
|
||||||
func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.SelectionSet, obj *AuthorityRecord) graphql.Marshaler {
|
func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.SelectionSet, obj *AuthorityRecord) graphql.Marshaler {
|
||||||
@@ -8798,6 +9339,20 @@ func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionS
|
|||||||
|
|
||||||
out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj)
|
out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
case "role":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Participant_role(ctx, field, obj)
|
||||||
|
|
||||||
|
if out.Values[i] == graphql.Null {
|
||||||
|
invalids++
|
||||||
|
}
|
||||||
|
case "kycId":
|
||||||
|
|
||||||
|
out.Values[i] = ec._Participant_kycId(ctx, field, obj)
|
||||||
|
|
||||||
if out.Values[i] == graphql.Null {
|
if out.Values[i] == graphql.Null {
|
||||||
invalids++
|
invalids++
|
||||||
}
|
}
|
||||||
@@ -9013,6 +9568,26 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
|
return rrm(innerCtx)
|
||||||
|
})
|
||||||
|
case "getAuthorities":
|
||||||
|
field := field
|
||||||
|
|
||||||
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
res = ec._Query_getAuthorities(ctx, field)
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||||
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
|
}
|
||||||
|
|
||||||
out.Concurrently(i, func() graphql.Marshaler {
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
return rrm(innerCtx)
|
return rrm(innerCtx)
|
||||||
})
|
})
|
||||||
@@ -9125,6 +9700,52 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
|||||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
|
return rrm(innerCtx)
|
||||||
|
})
|
||||||
|
case "getParticipantByAddress":
|
||||||
|
field := field
|
||||||
|
|
||||||
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
res = ec._Query_getParticipantByAddress(ctx, field)
|
||||||
|
if res == graphql.Null {
|
||||||
|
atomic.AddUint32(&invalids, 1)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||||
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
|
}
|
||||||
|
|
||||||
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
|
return rrm(innerCtx)
|
||||||
|
})
|
||||||
|
case "getParticipantByNitroAddress":
|
||||||
|
field := field
|
||||||
|
|
||||||
|
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
res = ec._Query_getParticipantByNitroAddress(ctx, field)
|
||||||
|
if res == graphql.Null {
|
||||||
|
atomic.AddUint32(&invalids, 1)
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
|
||||||
|
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||||
|
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||||
|
}
|
||||||
|
|
||||||
out.Concurrently(i, func() graphql.Marshaler {
|
out.Concurrently(i, func() graphql.Marshaler {
|
||||||
return rrm(innerCtx)
|
return rrm(innerCtx)
|
||||||
})
|
})
|
||||||
@@ -9813,6 +10434,16 @@ func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgitᚗvdbᚗtoᚋcerc
|
|||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||||
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._AuthorityRecord(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalNBond2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler {
|
func (ec *executionContext) marshalNBond2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||||
@@ -9951,6 +10582,10 @@ func (ec *executionContext) marshalNNodeInfo2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlac
|
|||||||
return ec._NodeInfo(ctx, sel, v)
|
return ec._NodeInfo(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNParticipant2gitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v Participant) graphql.Marshaler {
|
||||||
|
return ec._Participant(ctx, sel, &v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v []*Participant) graphql.Marshaler {
|
func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v []*Participant) graphql.Marshaler {
|
||||||
ret := make(graphql.Array, len(v))
|
ret := make(graphql.Array, len(v))
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
@@ -9989,6 +10624,16 @@ func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑio
|
|||||||
return ret
|
return ret
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v *Participant) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||||
|
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||||
|
}
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._Participant(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
||||||
ret := make(graphql.Array, len(v))
|
ret := make(graphql.Array, len(v))
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
@@ -10586,6 +11231,54 @@ func (ec *executionContext) marshalOAuctionBid2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋl
|
|||||||
return ec._AuctionBid(ctx, sel, v)
|
return ec._AuctionBid(ctx, sel, v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalOAuthority2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx context.Context, sel ast.SelectionSet, v []*Authority) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
ret := make(graphql.Array, len(v))
|
||||||
|
var wg sync.WaitGroup
|
||||||
|
isLen1 := len(v) == 1
|
||||||
|
if !isLen1 {
|
||||||
|
wg.Add(len(v))
|
||||||
|
}
|
||||||
|
for i := range v {
|
||||||
|
i := i
|
||||||
|
fc := &graphql.FieldContext{
|
||||||
|
Index: &i,
|
||||||
|
Result: &v[i],
|
||||||
|
}
|
||||||
|
ctx := graphql.WithFieldContext(ctx, fc)
|
||||||
|
f := func(i int) {
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ec.Error(ctx, ec.Recover(ctx, r))
|
||||||
|
ret = nil
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
if !isLen1 {
|
||||||
|
defer wg.Done()
|
||||||
|
}
|
||||||
|
ret[i] = ec.marshalOAuthority2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx, sel, v[i])
|
||||||
|
}
|
||||||
|
if isLen1 {
|
||||||
|
f(i)
|
||||||
|
} else {
|
||||||
|
go f(i)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
wg.Wait()
|
||||||
|
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
func (ec *executionContext) marshalOAuthority2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx context.Context, sel ast.SelectionSet, v *Authority) graphql.Marshaler {
|
||||||
|
if v == nil {
|
||||||
|
return graphql.Null
|
||||||
|
}
|
||||||
|
return ec._Authority(ctx, sel, v)
|
||||||
|
}
|
||||||
|
|
||||||
func (ec *executionContext) marshalOAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
|
func (ec *executionContext) marshalOAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
|
||||||
if v == nil {
|
if v == nil {
|
||||||
return graphql.Null
|
return graphql.Null
|
||||||
|
|||||||
@@ -52,6 +52,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 +143,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 {
|
||||||
|
|||||||
+69
-19
@@ -35,6 +35,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 +82,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)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -373,8 +385,46 @@ 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
|
||||||
|
}
|
||||||
|
|||||||
+27
@@ -303,3 +303,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/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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import "cosmos/msg/v1/msg.proto";
|
|||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
import "cerc/onboarding/v1/onboarding.proto";
|
import "cerc/onboarding/v1/onboarding.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
|
||||||
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
option go_package = "git.vdb.to/cerc-io/laconicd/x/onboarding";
|
||||||
|
|
||||||
@@ -18,6 +19,10 @@ service Msg {
|
|||||||
returns (MsgOnboardParticipantResponse) {
|
returns (MsgOnboardParticipantResponse) {
|
||||||
option (google.api.http).post = "/cerc/onboarding/v1/onboard_participant";
|
option (google.api.http).post = "/cerc/onboarding/v1/onboard_participant";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// UpdateParams defines an operation for updating the x/staking module
|
||||||
|
// parameters.
|
||||||
|
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgOnboardParticipant defines a SDK message for enrolling a new validator.
|
// MsgOnboardParticipant defines a SDK message for enrolling a new validator.
|
||||||
@@ -28,8 +33,28 @@ 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
|
||||||
// type.
|
// type.
|
||||||
message MsgOnboardParticipantResponse {}
|
message MsgOnboardParticipantResponse {}
|
||||||
|
|
||||||
|
// 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 {};
|
||||||
|
|||||||
@@ -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; }
|
||||||
|
|
||||||
|
|||||||
+40
-9
@@ -1,10 +1,14 @@
|
|||||||
#!/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"}
|
||||||
|
LOGLEVEL=${LOGLEVEL:-"info"}
|
||||||
|
|
||||||
|
input_genesis_file=${GENESIS_FILE}
|
||||||
|
|
||||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||||
# validate dependencies are installed
|
# validate dependencies are installed
|
||||||
@@ -27,7 +31,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
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 for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||||
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 &&
|
||||||
@@ -58,6 +67,26 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
|||||||
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 +99,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 +115,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 +135,7 @@ fi
|
|||||||
laconicd start \
|
laconicd start \
|
||||||
--pruning=nothing \
|
--pruning=nothing \
|
||||||
--log_level $LOGLEVEL \
|
--log_level $LOGLEVEL \
|
||||||
--minimum-gas-prices=0.0001photon \
|
--minimum-gas-prices=1$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
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ 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)
|
params, err := k.GetParams(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -101,7 +101,7 @@ func (tf *TestFixture) Setup() error {
|
|||||||
|
|
||||||
auctionKeeper := auctionkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[auctionTypes.StoreKey]), accountKeeper, bankKeeper)
|
auctionKeeper := auctionkeeper.NewKeeper(cdc, runtime.NewKVStoreService(keys[auctionTypes.StoreKey]), accountKeeper, bankKeeper)
|
||||||
|
|
||||||
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,
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
+7
-6
@@ -13,9 +13,10 @@ import (
|
|||||||
var (
|
var (
|
||||||
DefaultCommitsDuration = 5 * time.Minute
|
DefaultCommitsDuration = 5 * time.Minute
|
||||||
DefaultRevealsDuration = 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}
|
DefaultCommitFee = sdkmath.NewInt(1000) // 10^3 alnt
|
||||||
DefaultMinimumBid = sdk.Coin{Amount: sdkmath.NewInt(1000), Denom: sdk.DefaultBondDenom}
|
DefaultRevealFee = sdkmath.NewInt(1000) // 10^3 alnt
|
||||||
|
DefaultMinimumBid = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
||||||
@@ -33,9 +34,9 @@ func DefaultParams() Params {
|
|||||||
return Params{
|
return Params{
|
||||||
CommitsDuration: DefaultCommitsDuration,
|
CommitsDuration: DefaultCommitsDuration,
|
||||||
RevealsDuration: DefaultRevealsDuration,
|
RevealsDuration: DefaultRevealsDuration,
|
||||||
CommitFee: DefaultCommitFee,
|
CommitFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultCommitFee),
|
||||||
RevealFee: DefaultRevealFee,
|
RevealFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultRevealFee),
|
||||||
MinimumBid: DefaultMinimumBid,
|
MinimumBid: sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinimumBid),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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}
|
||||||
|
|||||||
+1
-1
@@ -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}
|
||||||
|
|||||||
+434
-36
@@ -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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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"
|
||||||
@@ -64,6 +65,20 @@ func (k Keeper) GetAuthority() string {
|
|||||||
return k.authority
|
return k.authority
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (k Keeper) GetParams(ctx sdk.Context) (*onboardingTypes.Params, error) {
|
||||||
|
params, err := k.Params.Get(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
return ¶ms, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SetParams sets the x/onboarding module parameters.
|
||||||
|
func (k Keeper) SetParams(ctx sdk.Context, params onboardingTypes.Params) error {
|
||||||
|
return k.Params.Set(ctx, params)
|
||||||
|
}
|
||||||
|
|
||||||
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
|
func (k Keeper) Logger(ctx sdk.Context) log.Logger {
|
||||||
return ctx.Logger().With("module", onboardingTypes.ModuleName)
|
return ctx.Logger().With("module", onboardingTypes.ModuleName)
|
||||||
}
|
}
|
||||||
@@ -100,6 +115,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 +151,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"
|
||||||
|
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/onboarding"
|
"git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||||
@@ -55,3 +57,22 @@ func (ms msgServer) OnboardParticipant(c context.Context, msg *onboarding.MsgOnb
|
|||||||
|
|
||||||
return &onboarding.MsgOnboardParticipantResponse{}, nil
|
return &onboarding.MsgOnboardParticipantResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateParams defines a method to perform updation of module params.
|
||||||
|
func (ms msgServer) UpdateParams(c context.Context, msg *onboarding.MsgUpdateParams) (*onboarding.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 &onboarding.MsgUpdateParamsResponse{}, 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,13 +42,19 @@ 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"},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
RpcMethod: "UpdateParams",
|
||||||
|
Skip: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
+21
-1
@@ -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
|
||||||
|
|||||||
+133
-24
@@ -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,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 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:])
|
||||||
|
|||||||
+828
-26
@@ -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,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0e, 0xca, 0x55, 0x2c, 0x1a,
|
||||||
0xe5, 0x3e, 0x68, 0xfd, 0x88, 0xa5, 0xb2, 0xb4, 0x9c, 0xa7, 0xd4, 0x42, 0xed, 0x32, 0x52, 0xc0,
|
0x51, 0x60, 0x63, 0xdc, 0xc7, 0xd0, 0xab, 0xa5, 0x7a, 0xc4, 0x75, 0x26, 0x4f, 0x09, 0xee, 0xc1,
|
||||||
0x16, 0x3c, 0x03, 0xad, 0xb2, 0x39, 0xfb, 0xe5, 0x79, 0xa6, 0xaf, 0xea, 0x9f, 0xf2, 0xf9, 0x2e,
|
0x4b, 0x22, 0x0f, 0x3f, 0xab, 0xca, 0x6e, 0x09, 0xab, 0xd6, 0x15, 0xf0, 0xc6, 0x12, 0x0d, 0xff,
|
||||||
0x00, 0x00, 0xff, 0xff, 0x3b, 0xb7, 0xca, 0x13, 0xe4, 0x02, 0x00, 0x00,
|
0x9b, 0x01, 0xff, 0xdd, 0x59, 0x78, 0xce, 0x10, 0xa2, 0xb7, 0x00, 0xb6, 0xec, 0x53, 0x42, 0x9b,
|
||||||
|
0x75, 0x8d, 0x66, 0x9d, 0x75, 0x67, 0x6b, 0xc9, 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
|
||||||
)
|
)
|
||||||
|
|||||||
+526
-24
@@ -6,6 +6,7 @@ package onboarding
|
|||||||
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"
|
||||||
@@ -36,6 +37,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 +95,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 {
|
||||||
@@ -130,38 +147,145 @@ func (m *MsgOnboardParticipantResponse) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_MsgOnboardParticipantResponse proto.InternalMessageInfo
|
var xxx_messageInfo_MsgOnboardParticipantResponse 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_6bfde34a550e231e, []int{2}
|
||||||
|
}
|
||||||
|
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_6bfde34a550e231e, []int{3}
|
||||||
|
}
|
||||||
|
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((*MsgOnboardParticipant)(nil), "cerc.onboarding.v1.MsgOnboardParticipant")
|
proto.RegisterType((*MsgOnboardParticipant)(nil), "cerc.onboarding.v1.MsgOnboardParticipant")
|
||||||
proto.RegisterType((*MsgOnboardParticipantResponse)(nil), "cerc.onboarding.v1.MsgOnboardParticipantResponse")
|
proto.RegisterType((*MsgOnboardParticipantResponse)(nil), "cerc.onboarding.v1.MsgOnboardParticipantResponse")
|
||||||
|
proto.RegisterType((*MsgUpdateParams)(nil), "cerc.onboarding.v1.MsgUpdateParams")
|
||||||
|
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cerc.onboarding.v1.MsgUpdateParamsResponse")
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
// 514 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, 0x53, 0x4d, 0x6a, 0x1b, 0x31,
|
||||||
0x18, 0xc7, 0x77, 0xf4, 0x7d, 0x5f, 0x78, 0xc7, 0x82, 0x58, 0x8a, 0x64, 0xab, 0x55, 0x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|
0x18, 0xde, 0xff, 0x52, 0x84, 0x2b, 0x1d, 0xcd, 0xd0, 0x57, 0x00, 0x51, 0xce, 0xbf, 0xdb, 0xc9,
|
||||||
|
0xd3, 0xcc, 0x8d, 0xc0, 0x6d, 0xdd, 0x9b, 0x7a, 0x93, 0x16, 0x3e, 0xfb, 0xf1, 0xe7, 0xbc, 0xb8,
|
||||||
|
0x53, 0x7f, 0x8e, 0xef, 0xbe, 0x7c, 0xfd, 0xec, 0x45, 0xf9, 0x08, 0xd7, 0xfe, 0x89, 0xb6, 0x71,
|
||||||
|
0x87, 0x66, 0x96, 0xe4, 0xbe, 0xb8, 0x07, 0x69, 0x61, 0xc9, 0x2d, 0x7f, 0xba, 0xbe, 0xd8, 0x05,
|
||||||
|
0xed, 0xf6, 0xe5, 0xcc, 0x03, 0x57, 0x33, 0x0f, 0xfc, 0x9e, 0x79, 0xe0, 0xf3, 0xdc, 0x2b, 0x5c,
|
||||||
|
0xcd, 0xbd, 0xc2, 0xcf, 0xb9, 0x57, 0xf8, 0xd0, 0x64, 0xdc, 0xf8, 0x93, 0x70, 0xe0, 0xc7, 0x0f,
|
||||||
|
0x80, 0xaa, 0x60, 0x8f, 0x4b, 0x3c, 0x22, 0x81, 0x14, 0x3c, 0x08, 0xf1, 0x69, 0x66, 0x87, 0x41,
|
||||||
|
0x25, 0x79, 0x18, 0x2f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xed, 0xd0, 0x2e, 0xd8, 0x03,
|
||||||
0x00, 0x00,
|
0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,6 +303,9 @@ const _ = grpc.SupportPackageIsVersion4
|
|||||||
type MsgClient interface {
|
type MsgClient interface {
|
||||||
// OnboardParticipant defines a method for enrolling a new validator.
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, error)
|
OnboardParticipant(ctx context.Context, in *MsgOnboardParticipant, opts ...grpc.CallOption) (*MsgOnboardParticipantResponse, 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 {
|
||||||
@@ -198,10 +325,22 @@ func (c *msgClient) OnboardParticipant(ctx context.Context, in *MsgOnboardPartic
|
|||||||
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.onboarding.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 {
|
||||||
// OnboardParticipant defines a method for enrolling a new validator.
|
// OnboardParticipant defines a method for enrolling a new validator.
|
||||||
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error)
|
OnboardParticipant(context.Context, *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, 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.
|
||||||
@@ -211,6 +350,9 @@ type UnimplementedMsgServer struct {
|
|||||||
func (*UnimplementedMsgServer) OnboardParticipant(ctx context.Context, req *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
func (*UnimplementedMsgServer) OnboardParticipant(ctx context.Context, req *MsgOnboardParticipant) (*MsgOnboardParticipantResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method OnboardParticipant 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)
|
||||||
@@ -234,6 +376,24 @@ func _Msg_OnboardParticipant_Handler(srv interface{}, ctx context.Context, dec f
|
|||||||
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.onboarding.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.onboarding.v1.Msg",
|
ServiceName: "cerc.onboarding.v1.Msg",
|
||||||
HandlerType: (*MsgServer)(nil),
|
HandlerType: (*MsgServer)(nil),
|
||||||
@@ -242,6 +402,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "OnboardParticipant",
|
MethodName: "OnboardParticipant",
|
||||||
Handler: _Msg_OnboardParticipant_Handler,
|
Handler: _Msg_OnboardParticipant_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "UpdateParams",
|
||||||
|
Handler: _Msg_UpdateParams_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "cerc/onboarding/v1/tx.proto",
|
Metadata: "cerc/onboarding/v1/tx.proto",
|
||||||
@@ -267,6 +431,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)
|
||||||
@@ -317,6 +495,69 @@ func (m *MsgOnboardParticipantResponse) 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
|
||||||
@@ -344,6 +585,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
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,6 +605,30 @@ func (m *MsgOnboardParticipantResponse) 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
|
||||||
}
|
}
|
||||||
@@ -488,6 +761,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:])
|
||||||
@@ -559,6 +896,171 @@ func (m *MsgOnboardParticipantResponse) 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
|
||||||
|
|||||||
@@ -67,20 +67,11 @@ func (k *Keeper) ExportGenesis(ctx sdk.Context) (*registry.GenesisState, error)
|
|||||||
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
|
||||||
|
|||||||
@@ -41,19 +41,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.
|
||||||
@@ -519,7 +530,8 @@ func (k Keeper) ProcessAuthorityExpiryQueue(ctx sdk.Context) error {
|
|||||||
|
|
||||||
k.Logger(ctx).Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name))
|
k.Logger(ctx).Info(fmt.Sprintf("Marking authority expired as no bond present: %s", name))
|
||||||
|
|
||||||
return nil
|
// Continue with the loop
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// Try to renew the authority by taking rent.
|
// Try to renew the authority by taking rent.
|
||||||
@@ -585,7 +597,7 @@ func (k Keeper) deleteAuthorityExpiryQueue(ctx sdk.Context, name string, authori
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(existingNamesList.Value) == 0 {
|
if len(newNamesSlice) == 0 {
|
||||||
return k.AuthorityExpiryQueue.Remove(ctx, expiryTime)
|
return k.AuthorityExpiryQueue.Remove(ctx, expiryTime)
|
||||||
} else {
|
} else {
|
||||||
existingNamesList.Value = newNamesSlice
|
existingNamesList.Value = newNamesSlice
|
||||||
|
|||||||
@@ -112,10 +112,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 +123,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()
|
||||||
|
|||||||
@@ -111,6 +111,11 @@ func (rk RecordKeeper) OnAuctionWinnerSelected(ctx sdk.Context, auctionId string
|
|||||||
// Mark as expired.
|
// Mark as expired.
|
||||||
authority.Status = registrytypes.AuthorityExpired
|
authority.Status = registrytypes.AuthorityExpired
|
||||||
logger(ctx).Info(fmt.Sprintf("No winner, marking authority as expired: %s", name))
|
logger(ctx).Info(fmt.Sprintf("No winner, marking authority as expired: %s", name))
|
||||||
|
|
||||||
|
logger(ctx).Info(fmt.Sprintf("Deleting the expiry queue entry: %s", name))
|
||||||
|
if err = rk.k.deleteAuthorityExpiryQueue(ctx, name, authority); err != nil {
|
||||||
|
logger(ctx).Error("Unable to delete expiry queue entry", err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Forget about this auction now, we no longer need it.
|
// Forget about this auction now, we no longer need it.
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
+546
-89
@@ -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,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 0xd6, 0x84, 0xdb, 0xf3, 0xf3, 0xb9, 0x0d,
|
||||||
0xe7, 0xfe, 0xdd, 0x77, 0x88, 0xe7, 0xf4, 0xfa, 0x04, 0x7b, 0x90, 0x0b, 0x2d, 0xfb, 0x11, 0xda,
|
0xed, 0x85, 0x7f, 0xef, 0x5d, 0xea, 0xbb, 0xa3, 0x88, 0x60, 0x0b, 0xca, 0xb1, 0xe5, 0x20, 0x43,
|
||||||
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, 0xd0, 0x12, 0x2c, 0x38, 0x36, 0xdd, 0x52, 0x8b, 0xd2, 0x3f, 0x7f, 0x43, 0x4d,
|
||||||
0x8d, 0xfd, 0x64, 0xc9, 0x99, 0xd3, 0x6c, 0x69, 0x90, 0x5f, 0x9f, 0x9b, 0x39, 0x40, 0x15, 0x48,
|
0x28, 0xe2, 0xa0, 0x58, 0x6a, 0x69, 0x37, 0x21, 0x8d, 0xeb, 0x1b, 0x70, 0x73, 0x07, 0xa8, 0x01,
|
||||||
0xb5, 0x70, 0x5b, 0xce, 0x32, 0x3f, 0xda, 0xe9, 0xd2, 0xe1, 0xef, 0xab, 0x85, 0xdb, 0x95, 0xac,
|
0x85, 0x1e, 0xee, 0xab, 0x8b, 0xdc, 0x8f, 0xb1, 0xbb, 0x72, 0x04, 0x71, 0xf5, 0x70, 0xbf, 0xb1,
|
||||||
0x08, 0xb0, 0x62, 0xc1, 0xf9, 0x48, 0xe9, 0xfe, 0x7b, 0xc9, 0x50, 0xbf, 0x96, 0x60, 0x26, 0x8a,
|
0x28, 0x13, 0xac, 0xd9, 0xb0, 0x2f, 0xd1, 0xba, 0xff, 0x5e, 0x31, 0xf4, 0x6f, 0x14, 0x58, 0x4a,
|
||||||
0x14, 0x0d, 0x7c, 0x03, 0xb2, 0x0e, 0x5f, 0x12, 0x35, 0x76, 0x4c, 0x07, 0x73, 0x9b, 0xca, 0xd4,
|
0x22, 0xe5, 0x06, 0x3e, 0x07, 0x8b, 0xae, 0x58, 0x92, 0x3d, 0x36, 0x65, 0x07, 0x0b, 0x9b,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 0xa1,
|
0xfe, 0xbd, 0x02, 0xd5, 0x4c, 0xea, 0xff, 0x4e, 0x6d, 0x30, 0x1c, 0xe2, 0x2a, 0xaf, 0xe3, 0x1e,
|
||||||
0x81, 0x1d, 0x8d, 0x84, 0x74, 0xe6, 0x48, 0x7c, 0x2b, 0x81, 0x3c, 0xca, 0x21, 0x42, 0x70, 0x1d,
|
0x99, 0x18, 0xd8, 0xc9, 0x4c, 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,
|
||||||
0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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, 0x71, 0x35, 0xcb, 0x9b, 0x47, 0xa7, 0x17,
|
||||||
0x54, 0x13, 0xe6, 0xc7, 0xe0, 0x84, 0x84, 0x37, 0xe1, 0x5c, 0x8d, 0x2f, 0x05, 0x25, 0x58, 0x1c,
|
0x46, 0x4e, 0x1c, 0x51, 0xeb, 0x13, 0xd2, 0x97, 0x45, 0x3c, 0xe6, 0x0c, 0xc9, 0x8e, 0xbc, 0x57,
|
||||||
0x15, 0xb1, 0x55, 0xaf, 0xd3, 0x0e, 0xf1, 0x02, 0xdb, 0xbe, 0x85, 0xfa, 0x87, 0x04, 0x17, 0xa2,
|
0x64, 0x0d, 0xe2, 0xd8, 0xf1, 0xed, 0x69, 0xbe, 0xb1, 0x15, 0x0d, 0xac, 0x55, 0x38, 0x3e, 0x9e,
|
||||||
0x1f, 0xd1, 0x3d, 0xf8, 0x1f, 0xe6, 0x2b, 0x0f, 0x07, 0x15, 0x54, 0x59, 0x79, 0x79, 0x50, 0x58,
|
0x1a, 0x02, 0x75, 0x8d, 0x75, 0x06, 0x0e, 0x69, 0x60, 0x07, 0xd3, 0x76, 0xb8, 0xc1, 0x74, 0x02,
|
||||||
0xe4, 0x79, 0x0e, 0x7f, 0x0d, 0xb2, 0x1c, 0x59, 0x33, 0x72, 0xe2, 0xd5, 0x0f, 0x3b, 0x7a, 0x26,
|
0x2b, 0x33, 0x70, 0x52, 0xc2, 0x5b, 0xb0, 0xa7, 0x25, 0x96, 0x76, 0x2a, 0x68, 0xbb, 0xcd, 0x06,
|
||||||
0x41, 0x56, 0xf0, 0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5c, 0xa7, 0xc4, 0xaa, 0x37, 0xf4, 0x27, 0x7d, 0x67, 0xb5, 0x0c, 0xfb, 0xdb, 0xbd, 0xf1, 0x77,
|
0xb0, 0x1c, 0x7b, 0xe8, 0x0b, 0x05, 0xca, 0xb1, 0xcb, 0x40, 0x66, 0xfb, 0xa6, 0xaf, 0x18, 0x99,
|
||||||
0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x85, 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
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user