Rename ethereum_address to nitro_address in onboarding module (#8)

* Rename ethereum_address to nitro_address

* Use camel case for variables in gql schema

* Fix indentation in proto files

* Fix proto lint errors

---------

Co-authored-by: IshaVenikar <ishavenikar7@gmail.com>
This commit is contained in:
2024-07-16 09:25:39 +05:30
committed by nabarun
co-authored by IshaVenikar
parent f23f691646
commit a8a59ad0c1
13 changed files with 278 additions and 272 deletions
+60 -59
View File
@@ -424,16 +424,16 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods {
}
var (
md_Participant protoreflect.MessageDescriptor
fd_Participant_cosmos_address protoreflect.FieldDescriptor
fd_Participant_ethereum_address protoreflect.FieldDescriptor
md_Participant protoreflect.MessageDescriptor
fd_Participant_cosmos_address protoreflect.FieldDescriptor
fd_Participant_nitro_address 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_ethereum_address = md_Participant.Fields().ByName("ethereum_address")
fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address")
}
var _ protoreflect.Message = (*fastReflection_Participant)(nil)
@@ -507,9 +507,9 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
return
}
}
if x.EthereumAddress != "" {
value := protoreflect.ValueOfString(x.EthereumAddress)
if !f(fd_Participant_ethereum_address, value) {
if x.NitroAddress != "" {
value := protoreflect.ValueOfString(x.NitroAddress)
if !f(fd_Participant_nitro_address, value) {
return
}
}
@@ -530,8 +530,8 @@ 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.ethereum_address":
return x.EthereumAddress != ""
case "cerc.onboarding.v1.Participant.nitro_address":
return x.NitroAddress != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@@ -550,8 +550,8 @@ 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.ethereum_address":
x.EthereumAddress = ""
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@@ -571,8 +571,8 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
case "cerc.onboarding.v1.Participant.cosmos_address":
value := x.CosmosAddress
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.ethereum_address":
value := x.EthereumAddress
case "cerc.onboarding.v1.Participant.nitro_address":
value := x.NitroAddress
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
@@ -596,8 +596,8 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
x.CosmosAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.ethereum_address":
x.EthereumAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@@ -620,8 +620,8 @@ func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) pr
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.ethereum_address":
panic(fmt.Errorf("field ethereum_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"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@@ -637,7 +637,7 @@ func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) p
switch fd.FullName() {
case "cerc.onboarding.v1.Participant.cosmos_address":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.ethereum_address":
case "cerc.onboarding.v1.Participant.nitro_address":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
@@ -712,7 +712,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.EthereumAddress)
l = len(x.NitroAddress)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
@@ -745,10 +745,10 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if len(x.EthereumAddress) > 0 {
i -= len(x.EthereumAddress)
copy(dAtA[i:], x.EthereumAddress)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.EthereumAddress)))
if len(x.NitroAddress) > 0 {
i -= len(x.NitroAddress)
copy(dAtA[i:], x.NitroAddress)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.NitroAddress)))
i--
dAtA[i] = 0x12
}
@@ -842,7 +842,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EthereumAddress", wireType)
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@@ -870,7 +870,7 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.EthereumAddress = string(dAtA[iNdEx:postIndex])
x.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@@ -1440,14 +1440,15 @@ func (x *Params) GetOnboardingEnabled() bool {
return false
}
// Participant defines the data that will be stored for each enrolled participant
// Participant defines the data that will be stored for each enrolled
// participant
type Participant struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
EthereumAddress string `protobuf:"bytes,2,opt,name=ethereum_address,json=ethereumAddress,proto3" json:"ethereum_address,omitempty"`
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
}
func (x *Participant) Reset() {
@@ -1477,9 +1478,9 @@ func (x *Participant) GetCosmosAddress() string {
return ""
}
func (x *Participant) GetEthereumAddress() string {
func (x *Participant) GetNitroAddress() string {
if x != nil {
return x.EthereumAddress
return x.NitroAddress
}
return ""
}
@@ -1543,40 +1544,40 @@ 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, 0xc5, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x64, 0x22, 0xb9, 0x01, 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, 0x5e, 0x0a, 0x10, 0x65, 0x74, 0x68,
0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x42, 0x33, 0xf2, 0xde, 0x1f, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x65,
0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65, 0x75, 0x6d, 0x5f,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0f, 0x65, 0x74, 0x68, 0x65, 0x72, 0x65,
0x75, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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,
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, 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 (
+2 -1
View File
@@ -1000,7 +1000,8 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
return ""
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response type.
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type.
type MsgOnboardParticipantResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache