Use string type for role field
Some checks failed
Protobuf / lint (pull_request) Successful in 24s
Integration Tests / test-integration (pull_request) Successful in 2m52s
Build / build (pull_request) Successful in 3m9s
E2E Tests / test-e2e (pull_request) Successful in 4m35s
Unit Tests / test-unit (pull_request) Successful in 2m31s
SDK Tests / sdk_tests_nameservice_expiry (pull_request) Failing after 9m56s
SDK Tests / sdk_tests (pull_request) Failing after 11m52s
SDK Tests / sdk_tests_auctions (pull_request) Successful in 15m9s

This commit is contained in:
Prathamesh Musale 2024-07-26 15:57:30 +05:30
parent 34e56fa5fe
commit 34c1297fda
11 changed files with 278 additions and 321 deletions

View File

@ -517,8 +517,8 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
return
}
}
if x.Role != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role))
if x.Role != "" {
value := protoreflect.ValueOfString(x.Role)
if !f(fd_Participant_role, value) {
return
}
@ -549,7 +549,7 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
case "cerc.onboarding.v1.Participant.nitro_address":
return x.NitroAddress != ""
case "cerc.onboarding.v1.Participant.role":
return x.Role != 0
return x.Role != ""
case "cerc.onboarding.v1.Participant.kyc_id":
return x.KycId != ""
default:
@ -573,7 +573,7 @@ func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = ""
case "cerc.onboarding.v1.Participant.role":
x.Role = 0
x.Role = ""
case "cerc.onboarding.v1.Participant.kyc_id":
x.KycId = ""
default:
@ -600,7 +600,7 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.role":
value := x.Role
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.kyc_id":
value := x.KycId
return protoreflect.ValueOfString(value)
@ -629,7 +629,7 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.role":
x.Role = (Role)(value.Enum())
x.Role = value.Interface().(string)
case "cerc.onboarding.v1.Participant.kyc_id":
x.KycId = value.Interface().(string)
default:
@ -678,7 +678,7 @@ func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) p
case "cerc.onboarding.v1.Participant.nitro_address":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.role":
return protoreflect.ValueOfEnum(0)
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.kyc_id":
return protoreflect.ValueOfString("")
default:
@ -758,8 +758,9 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Role != 0 {
n += 1 + runtime.Sov(uint64(x.Role))
l = len(x.Role)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.KycId)
if l > 0 {
@ -801,10 +802,12 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
i--
dAtA[i] = 0x22
}
if x.Role != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Role))
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] = 0x18
dAtA[i] = 0x1a
}
if len(x.NitroAddress) > 0 {
i -= len(x.NitroAddress)
@ -934,10 +937,10 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
x.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
x.Role = 0
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
@ -947,11 +950,24 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
}
b := dAtA[iNdEx]
iNdEx++
x.Role |= Role(b&0x7F) << shift
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)
@ -1516,59 +1532,6 @@ const (
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// Participant Role
type Role int32
const (
// ROLE_UNSPECIFIED indicates unknown role.
Role_ROLE_UNSPECIFIED Role = 0
// ROLE_PARTICIPANT indicates the participant role.
Role_ROLE_PARTICIPANT Role = 1
// ROLE_VALIDATOR indicates user participating as a validator.
Role_ROLE_VALIDATOR Role = 2
)
// Enum value maps for Role.
var (
Role_name = map[int32]string{
0: "ROLE_UNSPECIFIED",
1: "ROLE_PARTICIPANT",
2: "ROLE_VALIDATOR",
}
Role_value = map[string]int32{
"ROLE_UNSPECIFIED": 0,
"ROLE_PARTICIPANT": 1,
"ROLE_VALIDATOR": 2,
}
)
func (x Role) Enum() *Role {
p := new(Role)
*p = x
return p
}
func (x Role) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Role) Descriptor() protoreflect.EnumDescriptor {
return file_cerc_onboarding_v1_onboarding_proto_enumTypes[0].Descriptor()
}
func (Role) Type() protoreflect.EnumType {
return &file_cerc_onboarding_v1_onboarding_proto_enumTypes[0]
}
func (x Role) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Role.Descriptor instead.
func (Role) EnumDescriptor() ([]byte, []int) {
return file_cerc_onboarding_v1_onboarding_proto_rawDescGZIP(), []int{0}
}
// Params defines the parameters of the onboarding module.
type Params struct {
state protoimpl.MessageState
@ -1617,7 +1580,7 @@ type Participant struct {
// 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 Role `protobuf:"varint,3,opt,name=role,proto3,enum=cerc.onboarding.v1.Role" json:"role,omitempty"`
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"`
}
@ -1656,11 +1619,11 @@ func (x *Participant) GetNitroAddress() string {
return ""
}
func (x *Participant) GetRole() Role {
func (x *Participant) GetRole() string {
if x != nil {
return x.Role
}
return Role_ROLE_UNSPECIFIED
return ""
}
func (x *Participant) GetKycId() string {
@ -1729,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,
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, 0xbc, 0x02, 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,
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,
@ -1740,42 +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,
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, 0x49, 0x0a,
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x65,
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
0x2e, 0x52, 0x6f, 0x6c, 0x65, 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, 0x2a, 0x4c, 0x0a, 0x04, 0x52, 0x6f, 0x6c, 0x65,
0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x50,
0x41, 0x52, 0x54, 0x49, 0x43, 0x49, 0x50, 0x41, 0x4e, 0x54, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e,
0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x02,
0x1a, 0x04, 0x88, 0xa3, 0x1e, 0x00, 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,
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 (
@ -1790,21 +1746,18 @@ func file_cerc_onboarding_v1_onboarding_proto_rawDescGZIP() []byte {
return file_cerc_onboarding_v1_onboarding_proto_rawDescData
}
var file_cerc_onboarding_v1_onboarding_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_cerc_onboarding_v1_onboarding_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_cerc_onboarding_v1_onboarding_proto_goTypes = []interface{}{
(Role)(0), // 0: cerc.onboarding.v1.Role
(*Params)(nil), // 1: cerc.onboarding.v1.Params
(*Participant)(nil), // 2: cerc.onboarding.v1.Participant
(*EthPayload)(nil), // 3: cerc.onboarding.v1.EthPayload
(*Params)(nil), // 0: cerc.onboarding.v1.Params
(*Participant)(nil), // 1: cerc.onboarding.v1.Participant
(*EthPayload)(nil), // 2: cerc.onboarding.v1.EthPayload
}
var file_cerc_onboarding_v1_onboarding_proto_depIdxs = []int32{
0, // 0: cerc.onboarding.v1.Participant.role:type_name -> cerc.onboarding.v1.Role
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_cerc_onboarding_v1_onboarding_proto_init() }
@ -1855,14 +1808,13 @@ func file_cerc_onboarding_v1_onboarding_proto_init() {
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_cerc_onboarding_v1_onboarding_proto_rawDesc,
NumEnums: 1,
NumEnums: 0,
NumMessages: 3,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_cerc_onboarding_v1_onboarding_proto_goTypes,
DependencyIndexes: file_cerc_onboarding_v1_onboarding_proto_depIdxs,
EnumInfos: file_cerc_onboarding_v1_onboarding_proto_enumTypes,
MessageInfos: file_cerc_onboarding_v1_onboarding_proto_msgTypes,
}.Build()
File_cerc_onboarding_v1_onboarding_proto = out.File

View File

@ -117,8 +117,8 @@ func (x *fastReflection_MsgOnboardParticipant) Range(f func(protoreflect.FieldDe
return
}
}
if x.Role != 0 {
value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role))
if x.Role != "" {
value := protoreflect.ValueOfString(x.Role)
if !f(fd_MsgOnboardParticipant_role, value) {
return
}
@ -151,7 +151,7 @@ func (x *fastReflection_MsgOnboardParticipant) Has(fd protoreflect.FieldDescript
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
return x.EthSignature != ""
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
return x.Role != 0
return x.Role != ""
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
return x.KycId != ""
default:
@ -177,7 +177,7 @@ func (x *fastReflection_MsgOnboardParticipant) Clear(fd protoreflect.FieldDescri
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
x.EthSignature = ""
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
x.Role = 0
x.Role = ""
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
x.KycId = ""
default:
@ -207,7 +207,7 @@ func (x *fastReflection_MsgOnboardParticipant) Get(descriptor protoreflect.Field
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
value := x.Role
return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value))
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
value := x.KycId
return protoreflect.ValueOfString(value)
@ -238,7 +238,7 @@ func (x *fastReflection_MsgOnboardParticipant) Set(fd protoreflect.FieldDescript
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
x.EthSignature = value.Interface().(string)
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
x.Role = (Role)(value.Enum())
x.Role = value.Interface().(string)
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
x.KycId = value.Interface().(string)
default:
@ -295,7 +295,7 @@ func (x *fastReflection_MsgOnboardParticipant) NewField(fd protoreflect.FieldDes
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
return protoreflect.ValueOfEnum(0)
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
return protoreflect.ValueOfString("")
default:
@ -379,8 +379,9 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Role != 0 {
n += 1 + runtime.Sov(uint64(x.Role))
l = len(x.Role)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.KycId)
if l > 0 {
@ -422,10 +423,12 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
i--
dAtA[i] = 0x2a
}
if x.Role != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Role))
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] = 0x20
dAtA[i] = 0x22
}
if len(x.EthSignature) > 0 {
i -= len(x.EthSignature)
@ -605,10 +608,10 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
x.EthSignature = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
x.Role = 0
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
@ -618,11 +621,24 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
}
b := dAtA[iNdEx]
iNdEx++
x.Role |= Role(b&0x7F) << shift
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KycId", wireType)
@ -1069,7 +1085,7 @@ type MsgOnboardParticipant struct {
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
EthPayload *EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload,omitempty"`
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=cerc.onboarding.v1.Role" json:"role,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"`
}
@ -1114,11 +1130,11 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
return ""
}
func (x *MsgOnboardParticipant) GetRole() Role {
func (x *MsgOnboardParticipant) GetRole() string {
if x != nil {
return x.Role
}
return Role_ROLE_UNSPECIFIED
return ""
}
func (x *MsgOnboardParticipant) GetKycId() string {
@ -1169,7 +1185,7 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23,
0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f,
0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xfc, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x0a,
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12,
@ -1179,39 +1195,38 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x50,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x72,
0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x63, 0x65, 0x72, 0x63,
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x52,
0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x79, 0x63,
0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x79, 0x63, 0x49, 0x64,
0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
0x6e, 0x73, 0x65, 0x32, 0xb2, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12,
0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e,
0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e,
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcc, 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, 0x07, 0x54, 0x78, 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,
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72,
0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12,
0x15, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x70, 0x61, 0x72,
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4f,
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x01, 0x0a, 0x03, 0x4d, 0x73,
0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f,
0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27,
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74,
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcc,
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, 0x07, 0x54, 0x78, 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 (
@ -1231,18 +1246,16 @@ var file_cerc_onboarding_v1_tx_proto_goTypes = []interface{}{
(*MsgOnboardParticipant)(nil), // 0: cerc.onboarding.v1.MsgOnboardParticipant
(*MsgOnboardParticipantResponse)(nil), // 1: cerc.onboarding.v1.MsgOnboardParticipantResponse
(*EthPayload)(nil), // 2: cerc.onboarding.v1.EthPayload
(Role)(0), // 3: cerc.onboarding.v1.Role
}
var file_cerc_onboarding_v1_tx_proto_depIdxs = []int32{
2, // 0: cerc.onboarding.v1.MsgOnboardParticipant.eth_payload:type_name -> cerc.onboarding.v1.EthPayload
3, // 1: cerc.onboarding.v1.MsgOnboardParticipant.role:type_name -> cerc.onboarding.v1.Role
0, // 2: cerc.onboarding.v1.Msg.OnboardParticipant:input_type -> cerc.onboarding.v1.MsgOnboardParticipant
1, // 3: cerc.onboarding.v1.Msg.OnboardParticipant:output_type -> cerc.onboarding.v1.MsgOnboardParticipantResponse
3, // [3:4] is the sub-list for method output_type
2, // [2:3] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
0, // 1: cerc.onboarding.v1.Msg.OnboardParticipant:input_type -> cerc.onboarding.v1.MsgOnboardParticipant
1, // 2: cerc.onboarding.v1.Msg.OnboardParticipant:output_type -> cerc.onboarding.v1.MsgOnboardParticipantResponse
2, // [2:3] is the sub-list for method output_type
1, // [1:2] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_cerc_onboarding_v1_tx_proto_init() }

View File

@ -33,7 +33,7 @@ type Account {
type Participant {
cosmosAddress: String! # Cosmos address of the participant who will be registered.
nitroAddress: String! # Nitro addresss of the participant who will be registered.
role: Int! # Participant's role
role: String! # Participant's role
kycId: String! # Participant's KYC receipt ID
}

View File

@ -3966,9 +3966,9 @@ func (ec *executionContext) _Participant_role(ctx context.Context, field graphql
}
return graphql.Null
}
res := resTmp.(int)
res := resTmp.(string)
fc.Result = res
return ec.marshalNInt2int(ctx, field.Selections, 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) {
@ -3978,7 +3978,7 @@ func (ec *executionContext) fieldContext_Participant_role(ctx context.Context, f
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type Int does not have child fields")
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil

View File

@ -138,7 +138,7 @@ type OwnerBonds struct {
type Participant struct {
CosmosAddress string `json:"cosmosAddress"`
NitroAddress string `json:"nitroAddress"`
Role int `json:"role"`
Role string `json:"role"`
KycID string `json:"kycId"`
}

View File

@ -373,7 +373,7 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
participants[i] = &Participant{
CosmosAddress: p.CosmosAddress,
NitroAddress: p.NitroAddress,
Role: int(p.GetRole()),
Role: p.Role,
KycID: p.KycId,
}
}

View File

@ -27,7 +27,7 @@ message Participant {
"json:\"nitro_address\" yaml:\"nitro_address\"" ];
// participant's role (participant | validator)
Role role = 3 [ (gogoproto.moretags) = "json:\"role\" yaml:\"role\"" ];
string role = 3 [ (gogoproto.moretags) = "json:\"role\" yaml:\"role\"" ];
// participant's KYC receipt ID
string kyc_id = 4
@ -41,17 +41,3 @@ message EthPayload {
string msg = 2 [ (gogoproto.moretags) = "json:\"msg\" yaml:\"msg\"" ];
}
// Participant Role
enum Role {
option (gogoproto.goproto_enum_prefix) = false;
// ROLE_UNSPECIFIED indicates unknown role.
ROLE_UNSPECIFIED = 0;
// ROLE_PARTICIPANT indicates the participant role.
ROLE_PARTICIPANT = 1;
// ROLE_VALIDATOR indicates user participating as a validator.
ROLE_VALIDATOR = 2;
}

View File

@ -28,7 +28,7 @@ message MsgOnboardParticipant {
string participant = 1;
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
string eth_signature = 3;
Role role = 4;
string role = 4;
string kyc_id = 5;
}

View File

@ -1,11 +1,15 @@
package onboarding
import (
"fmt"
errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
)
var PERMITTED_ROLES = []string{"participant", "validator"}
var _ sdk.Msg = &MsgOnboardParticipant{}
func (msg MsgOnboardParticipant) ValidateBasic() error {
@ -21,13 +25,21 @@ func (msg MsgOnboardParticipant) ValidateBasic() error {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid signature.")
}
if msg.Role == ROLE_UNSPECIFIED {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Participant role not specified.")
}
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
}

View File

@ -23,38 +23,6 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
// Participant Role
type Role int32
const (
// ROLE_UNSPECIFIED indicates unknown role.
ROLE_UNSPECIFIED Role = 0
// ROLE_PARTICIPANT indicates the participant role.
ROLE_PARTICIPANT Role = 1
// ROLE_VALIDATOR indicates user participating as a validator.
ROLE_VALIDATOR Role = 2
)
var Role_name = map[int32]string{
0: "ROLE_UNSPECIFIED",
1: "ROLE_PARTICIPANT",
2: "ROLE_VALIDATOR",
}
var Role_value = map[string]int32{
"ROLE_UNSPECIFIED": 0,
"ROLE_PARTICIPANT": 1,
"ROLE_VALIDATOR": 2,
}
func (x Role) String() string {
return proto.EnumName(Role_name, int32(x))
}
func (Role) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_59afed779274eaf0, []int{0}
}
// Params defines the parameters of the onboarding module.
type Params struct {
OnboardingEnabled bool `protobuf:"varint,1,opt,name=onboarding_enabled,json=onboardingEnabled,proto3" json:"onboarding_enabled,omitempty" json:"onboarding_enabled" yaml:"onboarding_enabled"`
@ -108,7 +76,7 @@ type Participant struct {
// 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 Role `protobuf:"varint,3,opt,name=role,proto3,enum=cerc.onboarding.v1.Role" json:"role,omitempty" json:"role" yaml:"role"`
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"`
}
@ -160,11 +128,11 @@ func (m *Participant) GetNitroAddress() string {
return ""
}
func (m *Participant) GetRole() Role {
func (m *Participant) GetRole() string {
if m != nil {
return m.Role
}
return ROLE_UNSPECIFIED
return ""
}
func (m *Participant) GetKycId() string {
@ -228,7 +196,6 @@ func (m *EthPayload) GetMsg() string {
}
func init() {
proto.RegisterEnum("cerc.onboarding.v1.Role", Role_name, Role_value)
proto.RegisterType((*Params)(nil), "cerc.onboarding.v1.Params")
proto.RegisterType((*Participant)(nil), "cerc.onboarding.v1.Participant")
proto.RegisterType((*EthPayload)(nil), "cerc.onboarding.v1.EthPayload")
@ -239,37 +206,32 @@ func init() {
}
var fileDescriptor_59afed779274eaf0 = []byte{
// 479 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0x86, 0xed, 0x34, 0x04, 0x58, 0x68, 0x14, 0x56, 0x45, 0x84, 0x56, 0xd8, 0x21, 0x5c, 0x02,
0x55, 0x6d, 0x95, 0x4a, 0x20, 0xc1, 0xc9, 0x6e, 0x8d, 0x64, 0x29, 0x6a, 0xad, 0x25, 0xf4, 0xc0,
0x25, 0xda, 0x78, 0x8d, 0x31, 0xb5, 0x3d, 0x91, 0x6d, 0x45, 0xe4, 0x0d, 0x38, 0xf2, 0x0e, 0xbc,
0x06, 0x0f, 0xc0, 0xb1, 0x47, 0x4e, 0x16, 0x4a, 0xde, 0xc0, 0x4f, 0x80, 0xbc, 0x1b, 0xa7, 0x71,
0xdb, 0xdb, 0xcc, 0x37, 0xf3, 0xff, 0xb3, 0x33, 0x5a, 0xf4, 0xc2, 0xf5, 0x12, 0x57, 0x87, 0x78,
0x02, 0x34, 0x61, 0x41, 0xec, 0xeb, 0xb3, 0xc3, 0x8d, 0x4c, 0x9b, 0x26, 0x90, 0x01, 0xc6, 0x65,
0x93, 0xb6, 0x81, 0x67, 0x87, 0xbb, 0x3b, 0x3e, 0xf8, 0xc0, 0xcb, 0x7a, 0x19, 0x89, 0xce, 0xfe,
0x14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, 0x65,
0x2d, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x87, 0xe5, 0xd5, 0x6b, 0xaa, 0x02, 0x00, 0x00,
}
func (m *Params) Marshal() (dAtA []byte, err error) {
@ -332,10 +294,12 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x22
}
if m.Role != 0 {
i = encodeVarintOnboarding(dAtA, i, uint64(m.Role))
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] = 0x18
dAtA[i] = 0x1a
}
if len(m.NitroAddress) > 0 {
i -= len(m.NitroAddress)
@ -428,8 +392,9 @@ func (m *Participant) Size() (n int) {
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
if m.Role != 0 {
n += 1 + sovOnboarding(uint64(m.Role))
l = len(m.Role)
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
l = len(m.KycId)
if l > 0 {
@ -625,10 +590,10 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
m.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 0 {
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
m.Role = 0
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOnboarding
@ -638,11 +603,24 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Role |= Role(b&0x7F) << shift
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)

View File

@ -36,7 +36,7 @@ type MsgOnboardParticipant struct {
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"`
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
Role Role `protobuf:"varint,4,opt,name=role,proto3,enum=cerc.onboarding.v1.Role" json:"role,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"`
}
@ -94,11 +94,11 @@ func (m *MsgOnboardParticipant) GetEthSignature() string {
return ""
}
func (m *MsgOnboardParticipant) GetRole() Role {
func (m *MsgOnboardParticipant) GetRole() string {
if m != nil {
return m.Role
}
return ROLE_UNSPECIFIED
return ""
}
func (m *MsgOnboardParticipant) GetKycId() string {
@ -154,33 +154,33 @@ func init() {
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
var fileDescriptor_6bfde34a550e231e = []byte{
// 414 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8a, 0xd3, 0x40,
0x1c, 0xc6, 0x33, 0xbb, 0xed, 0x82, 0x53, 0x15, 0x19, 0x5c, 0x0c, 0x51, 0xb3, 0x21, 0x7b, 0x30,
0xbb, 0x68, 0x86, 0xd6, 0x9b, 0xc7, 0xc2, 0x1e, 0x3c, 0x2c, 0x2e, 0xf1, 0xe6, 0xa5, 0x4c, 0x27,
0xc3, 0x74, 0xd8, 0x74, 0xfe, 0x21, 0x33, 0x96, 0xed, 0x4d, 0xf6, 0x09, 0x04, 0x1f, 0xc1, 0x17,
0x58, 0x7c, 0x8a, 0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, 0x82, 0x42,
0xf8, 0xad, 0x08, 0x25, 0xf7, 0x7b, 0x7e, 0x13, 0x24, 0x83, 0x42, 0x64, 0xce, 0x45, 0x0e, 0xf1,
0xc1, 0xe5, 0x94, 0x0f, 0x54, 0xee, 0xb7, 0x5d, 0x56, 0xfb, 0x72, 0xca, 0x5f, 0xe7, 0xaf, 0x1e,
0x5c, 0x2f, 0x6f, 0x4e, 0xeb, 0x15, 0xe2, 0x23, 0xfc, 0xb4, 0xb1, 0x7d, 0x26, 0x4c, 0x09, 0xda,
0x88, 0xde, 0x17, 0x84, 0xf7, 0xcf, 0x8d, 0x24, 0x9f, 0x11, 0x26, 0x0d, 0x87, 0x74, 0xd2, 0xf4,
0x23, 0x8d, 0x89, 0x41, 0xf7, 0xbf, 0xad, 0x5b, 0x78, 0x4c, 0xaf, 0xbf, 0xfe, 0xfc, 0xb4, 0x77,
0x12, 0x3f, 0xa3, 0xff, 0xbe, 0xca, 0x41, 0xad, 0x4e, 0xd0, 0xfe, 0xb0, 0xbc, 0x39, 0x45, 0xfd,
0xfe, 0xed, 0x3c, 0x44, 0xb3, 0x79, 0x88, 0x7e, 0xcc, 0x43, 0xf4, 0x71, 0x11, 0x7a, 0xb3, 0x45,
0xe8, 0x7d, 0x5b, 0x84, 0xde, 0xbb, 0x44, 0x2a, 0x9b, 0x4e, 0xf2, 0x61, 0x6a, 0xc1, 0x65, 0xbe,
0x50, 0x40, 0x0b, 0xc6, 0x41, 0x2b, 0x9e, 0xd3, 0xab, 0x1a, 0x61, 0x78, 0xe0, 0xde, 0xc7, 0xcb,
0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf4, 0x5a, 0xe1, 0xc6, 0xc4, 0x02, 0x00, 0x00,
// 401 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8a, 0x13, 0x31,
0x1c, 0xc6, 0x27, 0xbb, 0xed,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x27, 0x00, 0x00, 0xff, 0xff, 0x75, 0x86, 0x6d, 0xd1, 0xaa, 0x02, 0x00,
0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -292,10 +292,12 @@ func (m *MsgOnboardParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
i--
dAtA[i] = 0x2a
}
if m.Role != 0 {
i = encodeVarintTx(dAtA, i, uint64(m.Role))
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] = 0x20
dAtA[i] = 0x22
}
if len(m.EthSignature) > 0 {
i -= len(m.EthSignature)
@ -374,8 +376,9 @@ func (m *MsgOnboardParticipant) Size() (n int) {
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
if m.Role != 0 {
n += 1 + sovTx(uint64(m.Role))
l = len(m.Role)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.KycId)
if l > 0 {
@ -526,10 +529,10 @@ func (m *MsgOnboardParticipant) Unmarshal(dAtA []byte) error {
m.EthSignature = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 0 {
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
m.Role = 0
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
@ -539,11 +542,24 @@ func (m *MsgOnboardParticipant) Unmarshal(dAtA []byte) error {
}
b := dAtA[iNdEx]
iNdEx++
m.Role |= Role(b&0x7F) << shift
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)