forked from cerc-io/laconicd
Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ac8685f701 | ||
|
|
3c5cd002e1 | ||
|
|
b5a76a920e | ||
|
|
f176a5889e | ||
|
|
5e7d5fc47c | ||
|
|
c162396298 |
@@ -25,6 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Copy over binary from the builder
|
||||
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 /
|
||||
|
||||
# Run laconicd by default
|
||||
|
||||
@@ -424,17 +424,17 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
|
||||
var (
|
||||
md_Participant protoreflect.MessageDescriptor
|
||||
fd_Participant_cosmos_address protoreflect.FieldDescriptor
|
||||
fd_Participant_nitro_address protoreflect.FieldDescriptor
|
||||
fd_Participant_role protoreflect.FieldDescriptor
|
||||
fd_Participant_kyc_id protoreflect.FieldDescriptor
|
||||
md_Participant protoreflect.MessageDescriptor
|
||||
fd_Participant_laconic_address protoreflect.FieldDescriptor
|
||||
fd_Participant_nitro_address protoreflect.FieldDescriptor
|
||||
fd_Participant_role protoreflect.FieldDescriptor
|
||||
fd_Participant_kyc_id protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_cerc_onboarding_v1_onboarding_proto_init()
|
||||
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
|
||||
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address")
|
||||
fd_Participant_laconic_address = md_Participant.Fields().ByName("laconic_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")
|
||||
@@ -505,9 +505,9 @@ func (x *fastReflection_Participant) Interface() protoreflect.ProtoMessage {
|
||||
// While iterating, mutating operations may only be performed
|
||||
// on the current field descriptor.
|
||||
func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.CosmosAddress != "" {
|
||||
value := protoreflect.ValueOfString(x.CosmosAddress)
|
||||
if !f(fd_Participant_cosmos_address, value) {
|
||||
if x.LaconicAddress != "" {
|
||||
value := protoreflect.ValueOfString(x.LaconicAddress)
|
||||
if !f(fd_Participant_laconic_address, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -544,8 +544,8 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
|
||||
// a repeated field is populated if it is non-empty.
|
||||
func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
return x.CosmosAddress != ""
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
return x.LaconicAddress != ""
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
return x.NitroAddress != ""
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
@@ -568,8 +568,8 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
// Clear is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
x.CosmosAddress = ""
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
x.LaconicAddress = ""
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
x.NitroAddress = ""
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
@@ -592,8 +592,8 @@ func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
|
||||
// of the value; to obtain a mutable reference, use Mutable.
|
||||
func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
value := x.CosmosAddress
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
value := x.LaconicAddress
|
||||
return protoreflect.ValueOfString(value)
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
value := x.NitroAddress
|
||||
@@ -624,8 +624,8 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
|
||||
// Set is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
x.CosmosAddress = value.Interface().(string)
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
x.LaconicAddress = value.Interface().(string)
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
x.NitroAddress = value.Interface().(string)
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
@@ -652,8 +652,8 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
|
||||
// Mutable is a mutating operation and unsafe for concurrent use.
|
||||
func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable"))
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
panic(fmt.Errorf("field laconic_address of message cerc.onboarding.v1.Participant is not mutable"))
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable"))
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
@@ -673,7 +673,7 @@ func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) pr
|
||||
// For lists, maps, and messages, this returns a new, empty, mutable value.
|
||||
func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "cerc.onboarding.v1.Participant.cosmos_address":
|
||||
case "cerc.onboarding.v1.Participant.laconic_address":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
return protoreflect.ValueOfString("")
|
||||
@@ -750,7 +750,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
l = len(x.CosmosAddress)
|
||||
l = len(x.LaconicAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
@@ -816,10 +816,10 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(x.CosmosAddress) > 0 {
|
||||
i -= len(x.CosmosAddress)
|
||||
copy(dAtA[i:], x.CosmosAddress)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CosmosAddress)))
|
||||
if len(x.LaconicAddress) > 0 {
|
||||
i -= len(x.LaconicAddress)
|
||||
copy(dAtA[i:], x.LaconicAddress)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LaconicAddress)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
@@ -874,7 +874,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType)
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LaconicAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -902,7 +902,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.CosmosAddress = string(dAtA[iNdEx:postIndex])
|
||||
x.LaconicAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
@@ -1575,8 +1575,8 @@ type Participant struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// participant's cosmos (laconic) address
|
||||
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
|
||||
// participant's laconic address
|
||||
LaconicAddress string `protobuf:"bytes,1,opt,name=laconic_address,json=laconicAddress,proto3" json:"laconic_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)
|
||||
@@ -1605,9 +1605,9 @@ func (*Participant) Descriptor() ([]byte, []int) {
|
||||
return file_cerc_onboarding_v1_onboarding_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *Participant) GetCosmosAddress() string {
|
||||
func (x *Participant) GetLaconicAddress() string {
|
||||
if x != nil {
|
||||
return x.CosmosAddress
|
||||
return x.LaconicAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -1692,46 +1692,47 @@ 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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f,
|
||||
0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0d, 0x63, 0x6f, 0x73, 0x6d,
|
||||
0x6f, 0x73, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a, 0x0d, 0x6e, 0x69, 0x74,
|
||||
0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
|
||||
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,
|
||||
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, 0x12, 0x2f, 0x0a,
|
||||
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f,
|
||||
0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d,
|
||||
0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x36,
|
||||
0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
|
||||
0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64,
|
||||
0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x22, 0x52,
|
||||
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
||||
0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22,
|
||||
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19,
|
||||
0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79,
|
||||
0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4,
|
||||
0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
|
||||
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69,
|
||||
0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f,
|
||||
0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65,
|
||||
0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||
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,
|
||||
0x64, 0x22, 0xa6, 0x02, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
|
||||
0x74, 0x12, 0x5a, 0x0a, 0x0f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64,
|
||||
0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xf2, 0xde, 0x1f, 0x2d,
|
||||
0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x61, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6c, 0x61, 0x63,
|
||||
0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0e, 0x6c,
|
||||
0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x52, 0x0a,
|
||||
0x0d, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02,
|
||||
0x20, 0x01, 0x28, 0x09, 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, 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, 0x12, 0x2f, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42,
|
||||
0x1b, 0xf2, 0xde, 0x1f, 0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22,
|
||||
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x52, 0x04, 0x72, 0x6f,
|
||||
0x6c, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x1f, 0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x79,
|
||||
0x63, 0x5f, 0x69, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f,
|
||||
0x69, 0x64, 0x22, 0x52, 0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74,
|
||||
0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72,
|
||||
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a,
|
||||
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61,
|
||||
0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64,
|
||||
0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73,
|
||||
0x67, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d,
|
||||
0x73, 0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e,
|
||||
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f,
|
||||
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
|
||||
0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72,
|
||||
0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
|
||||
0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76,
|
||||
0x31, 0xa2, 0x02, 0x03, 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 (
|
||||
|
||||
@@ -10,9 +10,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
CoinUnit = "photon"
|
||||
CoinUnit = "lnt"
|
||||
BaseCoinUnit = "alnt"
|
||||
LntExponent = 18
|
||||
|
||||
DefaultBondDenom = CoinUnit
|
||||
DefaultBondDenom = BaseCoinUnit
|
||||
|
||||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
||||
Bech32PrefixAccAddr = "laconic"
|
||||
@@ -41,6 +43,11 @@ func RegisterDenoms() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = sdk.RegisterDenom(BaseCoinUnit, math.LegacyNewDecWithPrec(1, LntExponent))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func SetAddressPrefixes() {
|
||||
|
||||
@@ -98,7 +98,7 @@ func NewRootCmd() *cobra.Command {
|
||||
|
||||
// overwrite the minimum gas price from the app configuration
|
||||
srvCfg := serverconfig.DefaultConfig()
|
||||
srvCfg.MinGasPrices = "0photon"
|
||||
srvCfg.MinGasPrices = "0alnt"
|
||||
|
||||
// overwrite the block timeout
|
||||
cmtCfg := cmtcfg.DefaultConfig()
|
||||
|
||||
+1
-1
@@ -381,7 +381,7 @@ Query participants:
|
||||
```graphql
|
||||
{
|
||||
getParticipants {
|
||||
cosmosAddress
|
||||
laconicAddress
|
||||
nitroAddress
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ type Account {
|
||||
}
|
||||
|
||||
type Participant {
|
||||
cosmosAddress: String! # Cosmos address of the participant who will be registered.
|
||||
laconicAddress: String! # Laconic address 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
|
||||
@@ -197,6 +197,11 @@ type AuthorityRecord {
|
||||
auction: Auction # Authority auction.
|
||||
}
|
||||
|
||||
type Authority {
|
||||
name: String!
|
||||
entry: AuthorityRecord!
|
||||
}
|
||||
|
||||
# Name record entry, created at a particular height.
|
||||
type NameRecordEntry {
|
||||
id: String! # Target record ID.
|
||||
@@ -247,6 +252,9 @@ type Query {
|
||||
# Naming API.
|
||||
#
|
||||
|
||||
# Get authorities list.
|
||||
getAuthorities(owner: String): [Authority]
|
||||
|
||||
# Lookup authority information.
|
||||
lookupAuthorities(names: [String!]): [AuthorityRecord]!
|
||||
|
||||
|
||||
+346
-23
@@ -87,6 +87,11 @@ type ComplexityRoot struct {
|
||||
Status func(childComplexity int) int
|
||||
}
|
||||
|
||||
Authority struct {
|
||||
Entry func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
}
|
||||
|
||||
AuthorityRecord struct {
|
||||
Auction func(childComplexity int) int
|
||||
BondID func(childComplexity int) int
|
||||
@@ -154,10 +159,10 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Participant struct {
|
||||
CosmosAddress func(childComplexity int) int
|
||||
KycID func(childComplexity int) int
|
||||
NitroAddress func(childComplexity int) int
|
||||
Role func(childComplexity int) int
|
||||
KycID func(childComplexity int) int
|
||||
LaconicAddress func(childComplexity int) int
|
||||
NitroAddress func(childComplexity int) int
|
||||
Role func(childComplexity int) int
|
||||
}
|
||||
|
||||
PeerInfo struct {
|
||||
@@ -169,6 +174,7 @@ type ComplexityRoot struct {
|
||||
Query struct {
|
||||
GetAccounts func(childComplexity int, addresses []string) int
|
||||
GetAuctionsByIds func(childComplexity int, ids []string) int
|
||||
GetAuthorities func(childComplexity int, owner *string) int
|
||||
GetBondsByIds func(childComplexity int, ids []string) int
|
||||
GetParticipantByAddress func(childComplexity int, address string) int
|
||||
GetParticipantByNitroAddress func(childComplexity int, nitroAddress string) int
|
||||
@@ -231,6 +237,7 @@ type QueryResolver interface {
|
||||
QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error)
|
||||
GetRecordsByIds(ctx context.Context, ids []string) ([]*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)
|
||||
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
||||
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
||||
@@ -458,6 +465,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
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":
|
||||
if e.complexity.AuthorityRecord.Auction == nil {
|
||||
break
|
||||
@@ -647,13 +668,6 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.OwnerBonds.Owner(childComplexity), true
|
||||
|
||||
case "Participant.cosmosAddress":
|
||||
if e.complexity.Participant.CosmosAddress == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Participant.CosmosAddress(childComplexity), true
|
||||
|
||||
case "Participant.kycId":
|
||||
if e.complexity.Participant.KycID == nil {
|
||||
break
|
||||
@@ -661,6 +675,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Participant.KycID(childComplexity), true
|
||||
|
||||
case "Participant.laconicAddress":
|
||||
if e.complexity.Participant.LaconicAddress == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Participant.LaconicAddress(childComplexity), true
|
||||
|
||||
case "Participant.nitroAddress":
|
||||
if e.complexity.Participant.NitroAddress == nil {
|
||||
break
|
||||
@@ -720,6 +741,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
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":
|
||||
if e.complexity.Query.GetBondsByIds == nil {
|
||||
break
|
||||
@@ -1141,6 +1174,21 @@ func (ec *executionContext) field_Query_getAuctionsByIds_args(ctx context.Contex
|
||||
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) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
@@ -2674,6 +2722,110 @@ func (ec *executionContext) fieldContext_AuctionBid_bidAmount(ctx context.Contex
|
||||
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) {
|
||||
fc, err := ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
||||
if err != nil {
|
||||
@@ -3910,8 +4062,8 @@ func (ec *executionContext) fieldContext_OwnerBonds_bonds(ctx context.Context, f
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||
func (ec *executionContext) _Participant_laconicAddress(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Participant_laconicAddress(ctx, field)
|
||||
if err != nil {
|
||||
return graphql.Null
|
||||
}
|
||||
@@ -3924,7 +4076,7 @@ func (ec *executionContext) _Participant_cosmosAddress(ctx context.Context, fiel
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.CosmosAddress, nil
|
||||
return obj.LaconicAddress, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
@@ -3941,7 +4093,7 @@ func (ec *executionContext) _Participant_cosmosAddress(ctx context.Context, fiel
|
||||
return ec.marshalNString2string(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Participant_cosmosAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
func (ec *executionContext) fieldContext_Participant_laconicAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Participant",
|
||||
Field: field,
|
||||
@@ -4670,6 +4822,64 @@ func (ec *executionContext) fieldContext_Query_queryRecords(ctx context.Context,
|
||||
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) {
|
||||
fc, err := ec.fieldContext_Query_lookupAuthorities(ctx, field)
|
||||
if err != nil {
|
||||
@@ -4994,8 +5204,8 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
||||
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 "laconicAddress":
|
||||
return ec.fieldContext_Participant_laconicAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||
case "role":
|
||||
@@ -5048,8 +5258,8 @@ func (ec *executionContext) fieldContext_Query_getParticipantByAddress(ctx conte
|
||||
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 "laconicAddress":
|
||||
return ec.fieldContext_Participant_laconicAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||
case "role":
|
||||
@@ -5113,8 +5323,8 @@ func (ec *executionContext) fieldContext_Query_getParticipantByNitroAddress(ctx
|
||||
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 "laconicAddress":
|
||||
return ec.fieldContext_Participant_laconicAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
return ec.fieldContext_Participant_nitroAddress(ctx, field)
|
||||
case "role":
|
||||
@@ -8623,6 +8833,41 @@ func (ec *executionContext) _AuctionBid(ctx context.Context, sel ast.SelectionSe
|
||||
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"}
|
||||
|
||||
func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.SelectionSet, obj *AuthorityRecord) graphql.Marshaler {
|
||||
@@ -9083,9 +9328,9 @@ func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionS
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
out.Values[i] = graphql.MarshalString("Participant")
|
||||
case "cosmosAddress":
|
||||
case "laconicAddress":
|
||||
|
||||
out.Values[i] = ec._Participant_cosmosAddress(ctx, field, obj)
|
||||
out.Values[i] = ec._Participant_laconicAddress(ctx, field, obj)
|
||||
|
||||
if out.Values[i] == graphql.Null {
|
||||
invalids++
|
||||
@@ -9323,6 +9568,26 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
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 {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
@@ -10169,6 +10434,16 @@ func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgitᚗvdbᚗtoᚋcerc
|
||||
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 {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -10956,6 +11231,54 @@ func (ec *executionContext) marshalOAuctionBid2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋl
|
||||
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 {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
|
||||
+9
-4
@@ -52,6 +52,11 @@ type AuctionBid struct {
|
||||
BidAmount *Coin `json:"bidAmount"`
|
||||
}
|
||||
|
||||
type Authority struct {
|
||||
Name string `json:"name"`
|
||||
Entry *AuthorityRecord `json:"entry"`
|
||||
}
|
||||
|
||||
type AuthorityRecord struct {
|
||||
OwnerAddress string `json:"ownerAddress"`
|
||||
OwnerPublicKey string `json:"ownerPublicKey"`
|
||||
@@ -136,10 +141,10 @@ type OwnerBonds struct {
|
||||
}
|
||||
|
||||
type Participant struct {
|
||||
CosmosAddress string `json:"cosmosAddress"`
|
||||
NitroAddress string `json:"nitroAddress"`
|
||||
Role string `json:"role"`
|
||||
KycID string `json:"kycId"`
|
||||
LaconicAddress string `json:"laconicAddress"`
|
||||
NitroAddress string `json:"nitroAddress"`
|
||||
Role string `json:"role"`
|
||||
KycID string `json:"kycId"`
|
||||
}
|
||||
|
||||
type PeerInfo struct {
|
||||
|
||||
+43
-31
@@ -35,6 +35,36 @@ func (r *Resolver) Query() QueryResolver {
|
||||
|
||||
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) {
|
||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
||||
@@ -52,29 +82,11 @@ func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([
|
||||
}
|
||||
|
||||
nameAuthority := res.GetNameAuthority()
|
||||
gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
|
||||
gqlNameAuthorityRecord, err := getAuthorityRecord(nameAuthority, auctionQueryClient)
|
||||
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
|
||||
}
|
||||
|
||||
gqlResponse = append(gqlResponse, gqlNameAuthorityRecord)
|
||||
}
|
||||
|
||||
@@ -371,10 +383,10 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
|
||||
participants := make([]*Participant, len(participantResp.GetParticipants()))
|
||||
for i, p := range participantResp.Participants {
|
||||
participants[i] = &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
LaconicAddress: p.LaconicAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,10 +402,10 @@ func (q queryResolver) GetParticipantByAddress(ctx context.Context, address stri
|
||||
|
||||
p := participantResp.Participant
|
||||
participant := &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
LaconicAddress: p.LaconicAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
}
|
||||
|
||||
return participant, nil
|
||||
@@ -408,10 +420,10 @@ func (q queryResolver) GetParticipantByNitroAddress(ctx context.Context, nitroAd
|
||||
|
||||
p := participantResp.Participant
|
||||
participant := &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
LaconicAddress: p.LaconicAddress,
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
@@ -16,10 +16,10 @@ message Params {
|
||||
// Participant defines the data that will be stored for each enrolled
|
||||
// participant
|
||||
message Participant {
|
||||
// participant's cosmos (laconic) address
|
||||
string cosmos_address = 1
|
||||
// participant's laconic address
|
||||
string laconic_address = 1
|
||||
[ (gogoproto.moretags) =
|
||||
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
|
||||
"json:\"laconic_address\" yaml:\"laconic_address\"" ];
|
||||
|
||||
// participant's Nitro address
|
||||
string nitro_address = 2
|
||||
|
||||
@@ -17,7 +17,7 @@ service Query {
|
||||
option (google.api.http).get = "/cerc/onboarding/v1/participants";
|
||||
}
|
||||
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
// GetParticipantByAddress queries a participant by laconic address
|
||||
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
|
||||
returns (QueryGetParticipantByAddressResponse) {
|
||||
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";
|
||||
|
||||
+40
-9
@@ -1,10 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
KEY="alice"
|
||||
CHAINID="laconic_9000-1"
|
||||
MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
LOGLEVEL="${LOGLEVEL:-info}"
|
||||
CHAINID=${CHAINID:-"laconic_9000-1"}
|
||||
MONIKER=${MONIKER:-"localtestnet"}
|
||||
KEYRING=${KEYRING:-"test"}
|
||||
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
|
||||
# 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
|
||||
|
||||
# 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() {
|
||||
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'
|
||||
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 (?)
|
||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
||||
|
||||
@@ -70,7 +99,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
else
|
||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||
fi
|
||||
|
||||
|
||||
# Run this to allow requests from any origin
|
||||
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
|
||||
|
||||
# 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
|
||||
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
|
||||
laconicd genesis collect-gentxs
|
||||
@@ -104,7 +135,7 @@ fi
|
||||
laconicd start \
|
||||
--pruning=nothing \
|
||||
--log_level $LOGLEVEL \
|
||||
--minimum-gas-prices=0.0001photon \
|
||||
--minimum-gas-prices=1$DENOM \
|
||||
--api.enable \
|
||||
--rpc.laddr="tcp://0.0.0.0:26657" \
|
||||
--gql-server --gql-playground
|
||||
|
||||
@@ -324,7 +324,7 @@ func (kts *KeeperTestSuite) createAuctionAndCommitBid(commitBid bool) (*types.Au
|
||||
}
|
||||
|
||||
// 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)
|
||||
if err != nil {
|
||||
|
||||
@@ -49,7 +49,7 @@ func (kts *KeeperTestSuite) createBond() (*bondTypes.Bond, error) {
|
||||
ctx := kts.SdkCtx
|
||||
|
||||
// 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))))
|
||||
if err != nil {
|
||||
|
||||
+7
-6
@@ -13,9 +13,10 @@ import (
|
||||
var (
|
||||
DefaultCommitsDuration = 5 * time.Minute
|
||||
DefaultRevealsDuration = 5 * time.Minute
|
||||
DefaultCommitFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||
DefaultRevealFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||
DefaultMinimumBid = sdk.Coin{Amount: sdkmath.NewInt(1000), Denom: sdk.DefaultBondDenom}
|
||||
|
||||
DefaultCommitFee = sdkmath.NewInt(1000) // 10^3 alnt
|
||||
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 {
|
||||
@@ -33,9 +34,9 @@ func DefaultParams() Params {
|
||||
return Params{
|
||||
CommitsDuration: DefaultCommitsDuration,
|
||||
RevealsDuration: DefaultRevealsDuration,
|
||||
CommitFee: DefaultCommitFee,
|
||||
RevealFee: DefaultRevealFee,
|
||||
MinimumBid: DefaultMinimumBid,
|
||||
CommitFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultCommitFee),
|
||||
RevealFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultRevealFee),
|
||||
MinimumBid: sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinimumBid),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// 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 {
|
||||
return Params{MaxBondAmount: maxBondAmount}
|
||||
|
||||
@@ -13,7 +13,7 @@ func (k *Keeper) InitGenesis(ctx context.Context, data *onboarding.GenesisState)
|
||||
}
|
||||
|
||||
for _, participant := range data.Participants {
|
||||
if err := k.Participants.Set(ctx, participant.CosmosAddress, participant); err != nil {
|
||||
if err := k.Participants.Set(ctx, participant.LaconicAddress, participant); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
@@ -29,7 +29,7 @@ func (k *Keeper) ExportGenesis(ctx context.Context) (*onboarding.GenesisState, e
|
||||
}
|
||||
|
||||
var participants []onboarding.Participant
|
||||
if err := k.Participants.Walk(ctx, nil, func(cosmosAddress string, participant onboarding.Participant) (bool, error) {
|
||||
if err := k.Participants.Walk(ctx, nil, func(laconicAddress string, participant onboarding.Participant) (bool, error) {
|
||||
participants = append(participants, participant)
|
||||
return false, nil
|
||||
}); err != nil {
|
||||
|
||||
@@ -99,10 +99,10 @@ func (k Keeper) OnboardParticipant(
|
||||
}
|
||||
|
||||
participant := &onboardingTypes.Participant{
|
||||
CosmosAddress: signerAddress.String(),
|
||||
NitroAddress: nitroAddress,
|
||||
Role: msg.Role,
|
||||
KycId: msg.KycId,
|
||||
LaconicAddress: signerAddress.String(),
|
||||
NitroAddress: nitroAddress,
|
||||
Role: msg.Role,
|
||||
KycId: msg.KycId,
|
||||
}
|
||||
|
||||
if err := k.StoreParticipant(ctx, participant); err != nil {
|
||||
@@ -113,7 +113,7 @@ func (k Keeper) OnboardParticipant(
|
||||
}
|
||||
|
||||
func (k Keeper) StoreParticipant(ctx sdk.Context, participant *onboardingTypes.Participant) error {
|
||||
key := participant.CosmosAddress
|
||||
key := participant.LaconicAddress
|
||||
return k.Participants.Set(ctx, key, *participant)
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ func (k Keeper) ListParticipants(ctx sdk.Context) ([]*onboardingTypes.Participan
|
||||
return participants, nil
|
||||
}
|
||||
|
||||
// GetParticipantByAddress - get participant by cosmos (laconic) address.
|
||||
// GetParticipantByAddress - get participant by laconic address.
|
||||
func (k Keeper) GetParticipantByAddress(ctx sdk.Context, address string) (onboardingTypes.Participant, error) {
|
||||
participant, err := k.Participants.Get(ctx, address)
|
||||
if err != nil {
|
||||
|
||||
@@ -71,8 +71,8 @@ func (m *Params) GetOnboardingEnabled() bool {
|
||||
// Participant defines the data that will be stored for each enrolled
|
||||
// participant
|
||||
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"`
|
||||
// participant's laconic address
|
||||
LaconicAddress string `protobuf:"bytes,1,opt,name=laconic_address,json=laconicAddress,proto3" json:"laconic_address,omitempty" json:"laconic_address" yaml:"laconic_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)
|
||||
@@ -114,9 +114,9 @@ func (m *Participant) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_Participant proto.InternalMessageInfo
|
||||
|
||||
func (m *Participant) GetCosmosAddress() string {
|
||||
func (m *Participant) GetLaconicAddress() string {
|
||||
if m != nil {
|
||||
return m.CosmosAddress
|
||||
return m.LaconicAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
@@ -206,32 +206,32 @@ func init() {
|
||||
}
|
||||
|
||||
var fileDescriptor_59afed779274eaf0 = []byte{
|
||||
// 399 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0xce, 0xd2, 0x40,
|
||||
0x14, 0x85, 0xe9, 0x0f, 0xa2, 0x8e, 0x62, 0xe2, 0x44, 0x23, 0x4a, 0xec, 0x60, 0xdd, 0x60, 0x08,
|
||||
0x9d, 0x10, 0x12, 0x4d, 0x74, 0x65, 0x13, 0x16, 0xee, 0x48, 0x17, 0x2e, 0xdc, 0x90, 0xe9, 0x4c,
|
||||
0xad, 0x23, 0x6d, 0x87, 0xcc, 0x34, 0x8d, 0x7d, 0x0b, 0x9f, 0xc1, 0xa7, 0x71, 0xc9, 0xd2, 0x55,
|
||||
0x63, 0xe0, 0x0d, 0xfa, 0x04, 0xa6, 0x33, 0x14, 0x28, 0xfe, 0xbb, 0x7b, 0xcf, 0x3d, 0xe7, 0xbb,
|
||||
0xd3, 0xe6, 0x82, 0xd7, 0x34, 0x94, 0x14, 0x8b, 0x34, 0x10, 0x44, 0x32, 0x9e, 0x46, 0x38, 0x9f,
|
||||
0x5f, 0x74, 0xee, 0x56, 0x8a, 0x4c, 0x40, 0x58, 0x9b, 0xdc, 0x0b, 0x39, 0x9f, 0xbf, 0x78, 0x12,
|
||||
0x89, 0x48, 0xe8, 0x31, 0xae, 0x2b, 0xe3, 0x74, 0xb6, 0xa0, 0xbf, 0x22, 0x92, 0x24, 0x0a, 0x7e,
|
||||
0x05, 0xf0, 0x1c, 0x58, 0x87, 0x29, 0x09, 0xe2, 0x90, 0x0d, 0xad, 0xb1, 0x35, 0xb9, 0xe7, 0xbd,
|
||||
0xab, 0x4a, 0xb4, 0xf8, 0xae, 0x44, 0xfa, 0xde, 0xf9, 0xdf, 0xe3, 0x8c, 0x0b, 0x92, 0xc4, 0xb7,
|
||||
0x4e, 0xfc, 0xc7, 0x67, 0x71, 0x79, 0xd4, 0x7e, 0xdd, 0x80, 0x07, 0x2b, 0x22, 0x33, 0x4e, 0xf9,
|
||||
0x96, 0xa4, 0x19, 0xfc, 0x0c, 0x1e, 0x51, 0xa1, 0x12, 0xa1, 0xd6, 0x84, 0x31, 0x19, 0x2a, 0xa5,
|
||||
0x77, 0xde, 0xf7, 0x70, 0x55, 0xa2, 0xa9, 0xd9, 0xd9, 0x9e, 0x37, 0xfb, 0xae, 0x54, 0x7f, 0x60,
|
||||
0x84, 0x8f, 0xa6, 0x87, 0x3e, 0x18, 0xa4, 0x3c, 0x93, 0xe2, 0x84, 0xbd, 0xd1, 0xd8, 0x59, 0x55,
|
||||
0xa2, 0x37, 0x06, 0xdb, 0x1a, 0x37, 0xd4, 0xb6, 0xe8, 0x3f, 0xd4, 0x7d, 0xc3, 0xc4, 0xa0, 0x27,
|
||||
0x45, 0x1c, 0x0e, 0xbb, 0x1a, 0x35, 0xaa, 0x4a, 0xf4, 0xcc, 0xa0, 0x6a, 0xb5, 0x21, 0xe8, 0xda,
|
||||
0xd7, 0x46, 0xf8, 0x16, 0xf4, 0x37, 0x05, 0x5d, 0x73, 0x36, 0xec, 0xe9, 0x08, 0xaa, 0x4a, 0x34,
|
||||
0x32, 0x11, 0xa3, 0x37, 0xa1, 0x63, 0xe7, 0xdf, 0xd9, 0x14, 0xf4, 0x13, 0x73, 0x72, 0x00, 0x96,
|
||||
0xd9, 0xb7, 0x15, 0x29, 0x62, 0x41, 0x18, 0xfc, 0x00, 0xee, 0xb6, 0xff, 0xcd, 0xab, 0xaa, 0x44,
|
||||
0x2f, 0x0d, 0xe6, 0xea, 0xf9, 0xa7, 0x87, 0x37, 0x09, 0x38, 0x05, 0xdd, 0x44, 0x45, 0xc7, 0xaf,
|
||||
0x7f, 0x5e, 0x95, 0xe8, 0xa9, 0x09, 0x26, 0x2a, 0x6a, 0x42, 0x75, 0xe9, 0xd7, 0x2e, 0xcf, 0xfb,
|
||||
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,
|
||||
// 398 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4e, 0xab, 0x40,
|
||||
0x14, 0xc6, 0x4b, 0xdb, 0xdb, 0x7b, 0xef, 0xdc, 0x7f, 0xb9, 0x93, 0x7b, 0x63, 0xb5, 0x91, 0xa9,
|
||||
0xb8, 0xa9, 0x31, 0x85, 0x34, 0x4d, 0x34, 0xd1, 0x95, 0x24, 0x5d, 0xb8, 0x6b, 0x58, 0x76, 0xd3,
|
||||
0x0c, 0x0c, 0xe2, 0x58, 0x60, 0x9a, 0x81, 0x10, 0x79, 0x0b, 0x9f, 0xc2, 0x67, 0x71, 0xd9, 0xa5,
|
||||
0x2b, 0x62, 0xda, 0x37, 0xe0, 0x09, 0x0c, 0x33, 0xd0, 0x7f, 0xba, 0x3b, 0xe7, 0x3b, 0xdf, 0xf7,
|
||||
0x3b, 0x30, 0x39, 0xe0, 0xd4, 0x71, 0xb9, 0x63, 0xb0, 0xd0, 0x66, 0x98, 0x13, 0x1a, 0x7a, 0x46,
|
||||
0x32, 0xd8, 0xea, 0xf4, 0x39, 0x67, 0x31, 0x83, 0xb0, 0x30, 0xe9, 0x5b, 0x72, 0x32, 0x38, 0xfa,
|
||||
0xe7, 0x31, 0x8f, 0x89, 0xb1, 0x51, 0x54, 0xd2, 0xa9, 0xcd, 0x41, 0x6b, 0x8c, 0x39, 0x0e, 0x22,
|
||||
0x78, 0x07, 0xe0, 0x26, 0x30, 0x75, 0x43, 0x6c, 0xfb, 0x2e, 0x69, 0x2b, 0x5d, 0xa5, 0xf7, 0xcd,
|
||||
0xbc, 0xcc, 0x33, 0x34, 0x7c, 0x88, 0x58, 0x78, 0xa5, 0x7d, 0xf4, 0x68, 0xdd, 0x14, 0x07, 0xfe,
|
||||
0xa7, 0x13, 0xeb, 0xef, 0x46, 0x1c, 0x95, 0xda, 0x73, 0x1d, 0xfc, 0x18, 0x63, 0x1e, 0x53, 0x87,
|
||||
0xce, 0x71, 0x18, 0xc3, 0x09, 0xf8, 0xe3, 0x63, 0x87, 0x85, 0xd4, 0x99, 0x62, 0x42, 0xb8, 0x1b,
|
||||
0x45, 0x62, 0xe9, 0x77, 0x73, 0x90, 0x67, 0xa8, 0x2f, 0x97, 0xee, 0x19, 0xaa, 0x8d, 0xfb, 0xb2,
|
||||
0xf5, 0xbb, 0x54, 0x6e, 0xa4, 0x00, 0x2d, 0xf0, 0x2b, 0xa4, 0x31, 0x67, 0x6b, 0x72, 0x5d, 0x90,
|
||||
0xfb, 0x79, 0x86, 0xce, 0x24, 0x79, 0x67, 0x5c, 0x71, 0x77, 0x45, 0xeb, 0xa7, 0xe8, 0x2b, 0xa6,
|
||||
0x01, 0x9a, 0x9c, 0xf9, 0x6e, 0xbb, 0x21, 0x50, 0x9d, 0x3c, 0x43, 0x07, 0x12, 0x55, 0xa8, 0x15,
|
||||
0x41, 0xd4, 0x96, 0x30, 0xc2, 0x0b, 0xd0, 0x9a, 0xa5, 0xce, 0x94, 0x92, 0x76, 0x53, 0x44, 0x50,
|
||||
0x9e, 0xa1, 0x8e, 0x8c, 0x48, 0xbd, 0x0a, 0x95, 0x9d, 0xf5, 0x65, 0x96, 0x3a, 0xb7, 0x44, 0x4b,
|
||||
0x00, 0x18, 0xc5, 0xf7, 0x63, 0x9c, 0xfa, 0x0c, 0x13, 0x78, 0x0d, 0xbe, 0xee, 0x3e, 0xcf, 0x49,
|
||||
0x9e, 0xa1, 0x63, 0x89, 0xd9, 0xfb, 0xfc, 0xf5, 0x87, 0x57, 0x09, 0x78, 0x0e, 0x1a, 0x41, 0xe4,
|
||||
0x95, 0x7f, 0x7f, 0x98, 0x67, 0xe8, 0xbf, 0x0c, 0x06, 0x91, 0x57, 0x85, 0x8a, 0xd2, 0x2a, 0x5c,
|
||||
0xa6, 0xf9, 0xb2, 0x54, 0x95, 0xc5, 0x52, 0x55, 0xde, 0x96, 0xaa, 0xf2, 0xb4, 0x52, 0x6b, 0x8b,
|
||||
0x95, 0x5a, 0x7b, 0x5d, 0xa9, 0xb5, 0x49, 0xcf, 0xa3, 0xb1, 0x9e, 0x10, 0x5b, 0x8f, 0x99, 0x51,
|
||||
0x5c, 0x58, 0x9f, 0x32, 0xa3, 0x7c, 0x71, 0x62, 0x3c, 0x6e, 0x9d, 0xa1, 0xdd, 0x12, 0xd7, 0x35,
|
||||
0x7c, 0x0f, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x21, 0x55, 0x37, 0xae, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *Params) Marshal() (dAtA []byte, err error) {
|
||||
@@ -308,10 +308,10 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.CosmosAddress) > 0 {
|
||||
i -= len(m.CosmosAddress)
|
||||
copy(dAtA[i:], m.CosmosAddress)
|
||||
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.CosmosAddress)))
|
||||
if len(m.LaconicAddress) > 0 {
|
||||
i -= len(m.LaconicAddress)
|
||||
copy(dAtA[i:], m.LaconicAddress)
|
||||
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.LaconicAddress)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
@@ -384,7 +384,7 @@ func (m *Participant) Size() (n int) {
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.CosmosAddress)
|
||||
l = len(m.LaconicAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovOnboarding(uint64(l))
|
||||
}
|
||||
@@ -527,7 +527,7 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field CosmosAddress", wireType)
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field LaconicAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
@@ -555,7 +555,7 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.CosmosAddress = string(dAtA[iNdEx:postIndex])
|
||||
m.LaconicAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
|
||||
@@ -11,21 +11,21 @@ import (
|
||||
// Default parameter values.
|
||||
var (
|
||||
// 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 = time.Hour * 24 * 365
|
||||
|
||||
DefaultAuthorityRent = sdkmath.NewInt(1000000)
|
||||
DefaultAuthorityRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
||||
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
||||
|
||||
DefaultAuthorityAuctionEnabled = false
|
||||
DefaultCommitsDuration = time.Hour * 24
|
||||
DefaultRevealsDuration = time.Hour * 24
|
||||
DefaultCommitFee = sdkmath.NewInt(1000000)
|
||||
DefaultRevealFee = sdkmath.NewInt(1000000)
|
||||
DefaultMinimumBid = sdkmath.NewInt(5000000)
|
||||
DefaultCommitFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultRevealFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultMinimumBid = sdkmath.NewInt(5000000) // 5 * 10^6 alnt
|
||||
)
|
||||
|
||||
// NewParams creates a new Params instance
|
||||
|
||||
Reference in New Issue
Block a user