Add queries to get participant by laconic or nitro address #44

Merged
nabarun merged 4 commits from iv-participants-by-address into main 2024-07-29 10:28:31 +00:00
11 changed files with 253 additions and 203 deletions
Showing only changes of commit 620c5224f7 - Show all commits

View File

@ -1025,13 +1025,13 @@ func (x *fastReflection_QueryParticipantsResponse) ProtoMethods() *protoiface.Me
var (
md_QueryGetParticipantByAddressRequest protoreflect.MessageDescriptor
fd_QueryGetParticipantByAddressRequest_cosmos_address protoreflect.FieldDescriptor
fd_QueryGetParticipantByAddressRequest_address protoreflect.FieldDescriptor
)
func init() {
file_cerc_onboarding_v1_query_proto_init()
md_QueryGetParticipantByAddressRequest = File_cerc_onboarding_v1_query_proto.Messages().ByName("QueryGetParticipantByAddressRequest")
fd_QueryGetParticipantByAddressRequest_cosmos_address = md_QueryGetParticipantByAddressRequest.Fields().ByName("cosmos_address")
fd_QueryGetParticipantByAddressRequest_address = md_QueryGetParticipantByAddressRequest.Fields().ByName("address")
}
var _ protoreflect.Message = (*fastReflection_QueryGetParticipantByAddressRequest)(nil)
@ -1099,9 +1099,9 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Interface() protore
// While iterating, mutating operations may only be performed
// on the current field descriptor.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.CosmosAddress != "" {
value := protoreflect.ValueOfString(x.CosmosAddress)
if !f(fd_QueryGetParticipantByAddressRequest_cosmos_address, value) {
if x.Address != "" {
value := protoreflect.ValueOfString(x.Address)
if !f(fd_QueryGetParticipantByAddressRequest_address, value) {
return
}
}
@ -1120,8 +1120,8 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Range(f func(protor
// a repeated field is populated if it is non-empty.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
return x.CosmosAddress != ""
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
return x.Address != ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.QueryGetParticipantByAddressRequest"))
@ -1138,8 +1138,8 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Has(fd protoreflect
// Clear is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
x.CosmosAddress = ""
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
x.Address = ""
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.QueryGetParticipantByAddressRequest"))
@ -1156,8 +1156,8 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Clear(fd protorefle
// of the value; to obtain a mutable reference, use Mutable.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
value := x.CosmosAddress
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
value := x.Address
return protoreflect.ValueOfString(value)
default:
if descriptor.IsExtension() {
@ -1179,8 +1179,8 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Get(descriptor prot
// Set is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
x.CosmosAddress = value.Interface().(string)
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
x.Address = value.Interface().(string)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.QueryGetParticipantByAddressRequest"))
@ -1201,8 +1201,8 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Set(fd protoreflect
// Mutable is a mutating operation and unsafe for concurrent use.
func (x *fastReflection_QueryGetParticipantByAddressRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.QueryGetParticipantByAddressRequest is not mutable"))
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
panic(fmt.Errorf("field address of message cerc.onboarding.v1.QueryGetParticipantByAddressRequest is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.QueryGetParticipantByAddressRequest"))
@ -1216,7 +1216,7 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) Mutable(fd protoref
// For lists, maps, and messages, this returns a new, empty, mutable value.
func (x *fastReflection_QueryGetParticipantByAddressRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.cosmos_address":
case "cerc.onboarding.v1.QueryGetParticipantByAddressRequest.address":
return protoreflect.ValueOfString("")
default:
if fd.IsExtension() {
@ -1287,7 +1287,7 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) ProtoMethods() *pro
var n int
var l int
_ = l
l = len(x.CosmosAddress)
l = len(x.Address)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
@ -1320,10 +1320,10 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) ProtoMethods() *pro
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
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.Address) > 0 {
i -= len(x.Address)
copy(dAtA[i:], x.Address)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address)))
i--
dAtA[i] = 0xa
}
@ -1378,7 +1378,7 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) ProtoMethods() *pro
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 Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -1406,7 +1406,7 @@ func (x *fastReflection_QueryGetParticipantByAddressRequest) ProtoMethods() *pro
if postIndex > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
x.CosmosAddress = string(dAtA[iNdEx:postIndex])
x.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex
@ -2828,14 +2828,15 @@ func (x *QueryParticipantsResponse) GetPagination() *v1beta1.PageResponse {
return nil
}
// QueryGetParticipantByAddressRequest queries participants by the cosmos address
// QueryGetParticipantByAddressRequest queries participant by the laconic
// address
type QueryGetParticipantByAddressRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Cosmos address
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
// Laconic address
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
func (x *QueryGetParticipantByAddressRequest) Reset() {
@ -2858,14 +2859,15 @@ func (*QueryGetParticipantByAddressRequest) Descriptor() ([]byte, []int) {
return file_cerc_onboarding_v1_query_proto_rawDescGZIP(), []int{2}
}
func (x *QueryGetParticipantByAddressRequest) GetCosmosAddress() string {
func (x *QueryGetParticipantByAddressRequest) GetAddress() string {
if x != nil {
return x.CosmosAddress
return x.Address
}
return ""
}
// QueryGetParticipantByAddressResponse is response type for querying participants by cosmos address
// QueryGetParticipantByAddressResponse is response type for querying
// participant by the laconic address
type QueryGetParticipantByAddressResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -2902,7 +2904,8 @@ func (x *QueryGetParticipantByAddressResponse) GetParticipant() *Participant {
return nil
}
// AuctionRequest is the format for querying a specific auction
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
// address
type QueryGetParticipantByNitroAddressRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -2939,7 +2942,8 @@ func (x *QueryGetParticipantByNitroAddressRequest) GetNitroAddress() string {
return ""
}
// AuctionResponse returns the details of the queried auction
// QueryGetParticipantByNitroAddressResponse is response type for querying
// participant by the nitro address
type QueryGetParticipantByNitroAddressResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@ -3010,80 +3014,79 @@ var file_cerc_onboarding_v1_query_proto_rawDesc = []byte{
0x0b, 0x32, 0x27, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e,
0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x50, 0x61,
0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x0a, 0x70, 0x61, 0x67, 0x69,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4c, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47,
0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3f, 0x0a, 0x23, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47,
0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x25, 0x0a,
0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74,
0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0b,
0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22,
0x4f, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69,
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6e,
0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x22, 0x6e, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74,
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64,
0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a,
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74,
0x32, 0xc1, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x95, 0x01, 0x0a, 0x0c, 0x50,
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c, 0x2e, 0x63, 0x65,
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63, 0x65, 0x72, 0x63,
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51,
0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73,
0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x22,
0x12, 0x20, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x73, 0x12, 0xc7, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63,
0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x37,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x24, 0x51, 0x75, 0x65, 0x72, 0x79,
0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x41, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63,
0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x22, 0x4f, 0x0a, 0x28, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61,
0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f,
0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23,
0x0a, 0x0d, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x22, 0x6e, 0x0a, 0x29, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50,
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72,
0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
0x12, 0x41, 0x0a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62,
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69,
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x32, 0xba, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x95, 0x01,
0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2c,
0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74,
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f,
0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
0x70, 0x61, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x63,
0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76,
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x28, 0x82, 0xd3, 0xe4,
0x93, 0x02, 0x22, 0x12, 0x20, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
0x70, 0x61, 0x6e, 0x74, 0x73, 0x12, 0xc0, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72,
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73,
0x73, 0x12, 0x37, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50,
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x63, 0x65, 0x72,
0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e,
0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70,
0x6f, 0x6e, 0x73, 0x65, 0x22, 0x32, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2c, 0x12, 0x2a, 0x2f, 0x63,
0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76,
0x31, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b,
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd5, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74,
0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74,
0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x2e, 0x63, 0x65, 0x72, 0x63,
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51,
0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61,
0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73,
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f,
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65,
0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74,
0x42, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x65, 0x72, 0x63,
0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x70,
0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x63, 0x6f, 0x73,
0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d, 0x12, 0xd5, 0x01, 0x0a,
0x1c, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42,
0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x2e,
0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e,
0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69,
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64,
0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x63, 0x65,
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69,
0x70, 0x61, 0x6e, 0x74, 0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65,
0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93,
0x02, 0x32, 0x12, 0x30, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x73, 0x2f, 0x7b, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x7d, 0x42, 0xcf, 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,
0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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,
0x42, 0x79, 0x4e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x38, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x32, 0x12, 0x30,
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x73,
0x2f, 0x7b, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x7d,
0x42, 0xcf, 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, 0x0a, 0x51, 0x75, 0x65,
0x72, 0x79, 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 (

View File

@ -30,9 +30,9 @@ const (
type QueryClient interface {
// Participants queries Participants list
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
// Participants queries Participants list by cosmos address
// GetParticipantByAddress queries a participant by cosmos (laconic) address
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
// Participants queries Participants list by nitro address
// GetParticipantByNitroAddress queries a participant by nitro address
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
}
@ -77,9 +77,9 @@ func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *Quer
type QueryServer interface {
// Participants queries Participants list
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
// Participants queries Participants list by cosmos address
// GetParticipantByAddress queries a participant by cosmos (laconic) address
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
// Participants queries Participants list by nitro address
// GetParticipantByNitroAddress queries a participant by nitro address
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
mustEmbedUnimplementedQueryServer()
}

View File

@ -265,6 +265,6 @@ type Query {
# Query participants.
getParticipants: [Participant]!
getParticipantByAddress(cosmosAddress: String!): Participant!
getParticipantByAddress(address: String!): Participant!
getParticipantByNitroAddress(nitroAddress: String!): Participant!
}

View File

@ -170,7 +170,7 @@ type ComplexityRoot struct {
GetAccounts func(childComplexity int, addresses []string) int
GetAuctionsByIds func(childComplexity int, ids []string) int
GetBondsByIds func(childComplexity int, ids []string) int
GetParticipantByAddress func(childComplexity int, cosmosAddress string) int
GetParticipantByAddress func(childComplexity int, address string) int
GetParticipantByNitroAddress func(childComplexity int, nitroAddress string) int
GetParticipants func(childComplexity int) int
GetRecordsByIds func(childComplexity int, ids []string) int
@ -236,7 +236,7 @@ type QueryResolver interface {
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
GetParticipants(ctx context.Context) ([]*Participant, error)
GetParticipantByAddress(ctx context.Context, cosmosAddress string) (*Participant, error)
GetParticipantByAddress(ctx context.Context, address string) (*Participant, error)
GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error)
}
@ -742,7 +742,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return 0, false
}
return e.complexity.Query.GetParticipantByAddress(childComplexity, args["cosmosAddress"].(string)), true
return e.complexity.Query.GetParticipantByAddress(childComplexity, args["address"].(string)), true
case "Query.getParticipantByNitroAddress":
if e.complexity.Query.GetParticipantByNitroAddress == nil {
@ -1160,14 +1160,14 @@ func (ec *executionContext) field_Query_getParticipantByAddress_args(ctx context
var err error
args := map[string]interface{}{}
var arg0 string
if tmp, ok := rawArgs["cosmosAddress"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("cosmosAddress"))
if tmp, ok := rawArgs["address"]; ok {
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("address"))
arg0, err = ec.unmarshalNString2string(ctx, tmp)
if err != nil {
return nil, err
}
}
args["cosmosAddress"] = arg0
args["address"] = arg0
return args, nil
}
@ -5023,7 +5023,7 @@ func (ec *executionContext) _Query_getParticipantByAddress(ctx context.Context,
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return ec.resolvers.Query().GetParticipantByAddress(rctx, fc.Args["cosmosAddress"].(string))
return ec.resolvers.Query().GetParticipantByAddress(rctx, fc.Args["address"].(string))
})
if err != nil {
ec.Error(ctx, err)

View File

@ -381,9 +381,9 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
return participants, nil
}
func (q queryResolver) GetParticipantByAddress(ctx context.Context, cosmosAddress string) (*Participant, error) {
func (q queryResolver) GetParticipantByAddress(ctx context.Context, address string) (*Participant, error) {
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
participantResp, err := onboardingQueryClient.GetParticipantByAddress(ctx, &onboardingTypes.QueryGetParticipantByAddressRequest{CosmosAddress: cosmosAddress})
participantResp, err := onboardingQueryClient.GetParticipantByAddress(ctx, &onboardingTypes.QueryGetParticipantByAddressRequest{Address: address})
if err != nil {
return nil, err
}
@ -400,5 +400,19 @@ func (q queryResolver) GetParticipantByAddress(ctx context.Context, cosmosAddres
}
func (q queryResolver) GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error) {
return nil, nil
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
participantResp, err := onboardingQueryClient.GetParticipantByNitroAddress(ctx, &onboardingTypes.QueryGetParticipantByNitroAddressRequest{NitroAddress: nitroAddress})
if err != nil {
return nil, err
}
p := participantResp.Participant
participant := &Participant{
CosmosAddress: p.CosmosAddress,
NitroAddress: p.NitroAddress,
Role: p.Role,
KycID: p.KycId,
}
return participant, nil
}

View File

@ -17,16 +17,17 @@ service Query {
option (google.api.http).get = "/cerc/onboarding/v1/participants";
}
// Participants queries Participants list by cosmos address
// GetParticipantByAddress queries a participant by cosmos (laconic) address
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
returns (QueryGetParticipantByAddressResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants/{cosmos_address}";
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";
}
// Participants queries Participants list by nitro address
// GetParticipantByNitroAddress queries a participant by nitro address
rpc GetParticipantByNitroAddress(QueryGetParticipantByNitroAddressRequest)
returns (QueryGetParticipantByNitroAddressResponse) {
option (google.api.http).get = "/cerc/onboarding/v1/participants/{nitro_address}";
option (google.api.http).get =
"/cerc/onboarding/v1/participants/{nitro_address}";
}
}
@ -45,25 +46,29 @@ message QueryParticipantsResponse {
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}
// QueryGetParticipantByAddressRequest queries participants by the cosmos address
// QueryGetParticipantByAddressRequest queries participant by the laconic
// address
message QueryGetParticipantByAddressRequest {
// Cosmos address
string cosmos_address = 1;
// Laconic address
string address = 1;
}
// QueryGetParticipantByAddressResponse is response type for querying participants by cosmos address
// QueryGetParticipantByAddressResponse is response type for querying
// participant by the laconic address
message QueryGetParticipantByAddressResponse {
// Participant details
Participant participant = 1;
}
// AuctionRequest is the format for querying a specific auction
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
// address
message QueryGetParticipantByNitroAddressRequest {
// Nitro address
string nitro_address = 1;
}
// AuctionResponse returns the details of the queried auction
// QueryGetParticipantByNitroAddressResponse is response type for querying
// participant by the nitro address
message QueryGetParticipantByNitroAddressResponse {
// Participant details
Participant participant = 1;

View File

@ -138,12 +138,12 @@ func (k Keeper) ListParticipants(ctx sdk.Context) ([]*onboardingTypes.Participan
return participants, nil
}
// GetParticipantByAddress - get participant by cosmos address.
func (k Keeper) GetParticipantByAddress(ctx sdk.Context, cosmosAddress string) (onboardingTypes.Participant, error) {
participant, err := k.Participants.Get(ctx, cosmosAddress)
// GetParticipantByAddress - get participant by cosmos (laconic) address.
func (k Keeper) GetParticipantByAddress(ctx sdk.Context, address string) (onboardingTypes.Participant, error) {
participant, err := k.Participants.Get(ctx, address)
if err != nil {
if errors.Is(err, collections.ErrNotFound) {
return onboardingTypes.Participant{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Participant not found.")
return onboardingTypes.Participant{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participant with given address not found.")
}
return onboardingTypes.Participant{}, err
}
@ -153,5 +153,19 @@ func (k Keeper) GetParticipantByAddress(ctx sdk.Context, cosmosAddress string) (
// GetParticipantByNitroAddress - get participant by nitro address.
func (k Keeper) GetParticipantByNitroAddress(ctx sdk.Context, nitroAddress string) (onboardingTypes.Participant, error) {
return onboardingTypes.Participant{}, nil
var participant onboardingTypes.Participant
err := k.Participants.Walk(ctx, nil, func(key string, value onboardingTypes.Participant) (bool, error) {
if value.NitroAddress == nitroAddress {
participant = value
return true, nil
}
return false, nil
})
if err != nil {
return onboardingTypes.Participant{}, err
}
return participant, nil
}

View File

@ -36,18 +36,18 @@ func (qs queryServer) Participants(
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
}
// Participants implements GetParticipantByAddress.QueryServer.
// GetParticipantByAddress implements the GetParticipantByAddress query.
func (qs queryServer) GetParticipantByAddress(
c context.Context,
req *onboardingtypes.QueryGetParticipantByAddressRequest,
) (*onboardingtypes.QueryGetParticipantByAddressResponse, error) {
ctx := sdk.UnwrapSDKContext(c)
if req.CosmosAddress == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Cosmos address is required")
if req.Address == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cosmos (laconic) address is required")
}
participant, err := qs.k.GetParticipantByAddress(ctx, req.CosmosAddress)
participant, err := qs.k.GetParticipantByAddress(ctx, req.Address)
if err != nil {
return nil, err
}
@ -55,11 +55,21 @@ func (qs queryServer) GetParticipantByAddress(
return &onboardingtypes.QueryGetParticipantByAddressResponse{Participant: &participant}, nil
}
// Participants implements GetParticipantByAddress.QueryServer.
// GetParticipantByNitroAddress implements the GetParticipantByNitroAddress query.
func (qs queryServer) GetParticipantByNitroAddress(
c context.Context,
req *onboardingtypes.QueryGetParticipantByNitroAddressRequest,
) (*onboardingtypes.QueryGetParticipantByNitroAddressResponse, error) {
ctx := sdk.UnwrapSDKContext(c)
return &onboardingtypes.QueryGetParticipantByNitroAddressResponse{Participant: nil}, nil
if req.NitroAddress == "" {
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cosmos (laconic) address is required")
}
participant, err := qs.k.GetParticipantByNitroAddress(ctx, req.NitroAddress)
if err != nil {
return nil, err
}
return &onboardingtypes.QueryGetParticipantByNitroAddressResponse{Participant: &participant}, nil
}

View File

@ -20,10 +20,10 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
},
{
RpcMethod: "GetParticipantByAddress",
Use: "get-by-address [cosmos_address]",
Use: "get-by-address [address]",
Short: "Get participant by address",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "cosmos_address"},
{ProtoField: "address"},
},
},
{

View File

@ -130,10 +130,11 @@ func (m *QueryParticipantsResponse) GetPagination() *query.PageResponse {
return nil
}
// QueryGetParticipantByAddressRequest queries participants by the cosmos address
// QueryGetParticipantByAddressRequest queries participant by the laconic
// address
type QueryGetParticipantByAddressRequest struct {
// Cosmos address
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
// Laconic address
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}
func (m *QueryGetParticipantByAddressRequest) Reset() { *m = QueryGetParticipantByAddressRequest{} }
@ -169,14 +170,15 @@ func (m *QueryGetParticipantByAddressRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_QueryGetParticipantByAddressRequest proto.InternalMessageInfo
func (m *QueryGetParticipantByAddressRequest) GetCosmosAddress() string {
func (m *QueryGetParticipantByAddressRequest) GetAddress() string {
if m != nil {
return m.CosmosAddress
return m.Address
}
return ""
}
// QueryGetParticipantByAddressResponse is response type for querying participants by cosmos address
// QueryGetParticipantByAddressResponse is response type for querying
// participant by the laconic address
type QueryGetParticipantByAddressResponse struct {
// Participant details
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
@ -222,7 +224,8 @@ func (m *QueryGetParticipantByAddressResponse) GetParticipant() *Participant {
return nil
}
// AuctionRequest is the format for querying a specific auction
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
// address
type QueryGetParticipantByNitroAddressRequest struct {
// Nitro address
NitroAddress string `protobuf:"bytes,1,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
@ -270,7 +273,8 @@ func (m *QueryGetParticipantByNitroAddressRequest) GetNitroAddress() string {
return ""
}
// AuctionResponse returns the details of the queried auction
// QueryGetParticipantByNitroAddressResponse is response type for querying
// participant by the nitro address
type QueryGetParticipantByNitroAddressResponse struct {
// Participant details
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
@ -332,41 +336,41 @@ func init() {
func init() { proto.RegisterFile("cerc/onboarding/v1/query.proto", fileDescriptor_80831d904221d27d) }
var fileDescriptor_80831d904221d27d = []byte{
// 538 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4b, 0x6b, 0x13, 0x41,
0x1c, 0xcf, 0xd4, 0x07, 0x38, 0x49, 0x3d, 0x0c, 0x82, 0x31, 0x94, 0x6d, 0xd8, 0xa8, 0x8d, 0x8f,
0xce, 0x98, 0xf4, 0x60, 0x15, 0x3d, 0x34, 0x07, 0x7b, 0x11, 0xad, 0x39, 0x7a, 0x91, 0xd9, 0xdd,
0x61, 0x19, 0x49, 0x67, 0xb6, 0x3b, 0xd3, 0x60, 0x90, 0x5e, 0xfc, 0x04, 0x82, 0xf8, 0x81, 0x3c,
0xe9, 0xb1, 0x20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11, 0xbe, 0x85, 0x3a, 0x8b, 0x84, 0x93, 0xd7, 0xc5, 0xac, 0x1e, 0xa1, 0x2f, 0x00, 0xae, 0xcd,
0x7b, 0x57, 0xf4, 0x60, 0x69, 0x55, 0x25, 0xf9, 0x6a, 0x3c, 0xfc, 0xcf, 0xed, 0xdc, 0xd8, 0xb6,
0x31, 0xd6, 0x45, 0x77, 0x16, 0x1b, 0x2b, 0xc4, 0xf8, 0xa8, 0xd7, 0xfb, 0x34, 0xf6, 0xc0, 0xf1,
0xd8, 0x03, 0x3f, 0xc6, 0x1e, 0x78, 0x3b, 0xf1, 0x2a, 0xc7, 0x13, 0xaf, 0xf2, 0x6d, 0xe2, 0x55,
0x9e, 0xb7, 0x63, 0xae, 0xf1, 0x30, 0x0a, 0xb0, 0x96, 0x06, 0x75, 0x93, 0x4b, 0x32, 0xa0, 0xa1,
0x14, 0x3c, 0x8c, 0xc8, 0x2b, 0x87, 0x23, 0x38, 0x6f, 0xbe, 0xa2, 0x5b, 0xbf, 0x03, 0x00, 0x00,
0xff, 0xff, 0x23, 0x6a, 0x00, 0x39, 0x00, 0x06, 0x00, 0x00,
// 535 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xce, 0x96, 0x3f, 0xb1, 0x09, 0x97, 0x15, 0x12, 0x21, 0xaa, 0xdc, 0xc8, 0x41, 0xd4, 0x94,
0x76, 0x97, 0x98, 0x03, 0x15, 0x02, 0xa1, 0xe6, 0x40, 0x6f, 0x50, 0x7c, 0xe4, 0x82, 0xd6, 0xf6,
0xca, 0x5a, 0x94, 0xee, 0xba, 0xde, 0x6d, 0x44, 0x84, 0x7a, 0xe1, 0x09, 0x90, 0x10, 0x2f, 0xc3,
0x89, 0x23, 0xc7, 0x4a, 0x08, 0xc4, 0x09, 0xa1, 0x84, 0x27, 0xe0, 0x09, 0x90,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, 0xd1,
0xbd, 0xa5, 0xe5, 0xd4, 0x1c, 0x56, 0xe7, 0xfe, 0x3f, 0xa2, 0x4b, 0x47, 0xdb, 0xc6, 0x91, 0x8f,
0x6e, 0x2d, 0x76, 0x54, 0xb9, 0xdf, 0xa3, 0xc1, 0xe0, 0xc3, 0xc4, 0x01, 0xc7, 0x13, 0x07, 0x7c,
0x9b, 0x38, 0xe0, 0xf5, 0xd4, 0x69, 0x1c, 0x4f, 0x9d, 0xc6, 0x97, 0xa9, 0xd3, 0x78, 0xea, 0x25,
0x5c, 0xe3, 0x51, 0x1c, 0x62, 0x2d, 0x4d, 0xd7, 0x2d, 0x2e, 0xc9, 0x90, 0x46, 0x52, 0xf0, 0x28,
0x26, 0x2f, 0x2c, 0x8e, 0xf0, 0xbc, 0xf9, 0x63, 0xde, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x80,
0xc2, 0x03, 0x70, 0xec, 0x05, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
@ -383,9 +387,9 @@ const _ = grpc.SupportPackageIsVersion4
type QueryClient interface {
// Participants queries Participants list
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
// Participants queries Participants list by cosmos address
// GetParticipantByAddress queries a participant by cosmos (laconic) address
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
// Participants queries Participants list by nitro address
// GetParticipantByNitroAddress queries a participant by nitro address
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
}
@ -428,9 +432,9 @@ func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *Quer
type QueryServer interface {
// Participants queries Participants list
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
// Participants queries Participants list by cosmos address
// GetParticipantByAddress queries a participant by cosmos (laconic) address
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
// Participants queries Participants list by nitro address
// GetParticipantByNitroAddress queries a participant by nitro address
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
}
@ -631,10 +635,10 @@ func (m *QueryGetParticipantByAddressRequest) MarshalToSizedBuffer(dAtA []byte)
_ = i
var l int
_ = l
if len(m.CosmosAddress) > 0 {
i -= len(m.CosmosAddress)
copy(dAtA[i:], m.CosmosAddress)
i = encodeVarintQuery(dAtA, i, uint64(len(m.CosmosAddress)))
if len(m.Address) > 0 {
i -= len(m.Address)
copy(dAtA[i:], m.Address)
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
i--
dAtA[i] = 0xa
}
@ -790,7 +794,7 @@ func (m *QueryGetParticipantByAddressRequest) Size() (n int) {
}
var l int
_ = l
l = len(m.CosmosAddress)
l = len(m.Address)
if l > 0 {
n += 1 + l + sovQuery(uint64(l))
}
@ -1079,7 +1083,7 @@ func (m *QueryGetParticipantByAddressRequest) 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 Address", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
@ -1107,7 +1111,7 @@ func (m *QueryGetParticipantByAddressRequest) Unmarshal(dAtA []byte) error {
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.CosmosAddress = string(dAtA[iNdEx:postIndex])
m.Address = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default:
iNdEx = preIndex

View File

@ -80,15 +80,15 @@ func request_Query_GetParticipantByAddress_0(ctx context.Context, marshaler runt
_ = err
)
val, ok = pathParams["cosmos_address"]
val, ok = pathParams["address"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cosmos_address")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
}
protoReq.CosmosAddress, err = runtime.String(val)
protoReq.Address, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cosmos_address", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
}
msg, err := client.GetParticipantByAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
@ -107,15 +107,15 @@ func local_request_Query_GetParticipantByAddress_0(ctx context.Context, marshale
_ = err
)
val, ok = pathParams["cosmos_address"]
val, ok = pathParams["address"]
if !ok {
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "cosmos_address")
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
}
protoReq.CosmosAddress, err = runtime.String(val)
protoReq.Address, err = runtime.String(val)
if err != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "cosmos_address", err)
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
}
msg, err := server.GetParticipantByAddress(ctx, &protoReq)
@ -359,7 +359,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
var (
pattern_Query_Participants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "participants"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_GetParticipantByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "cosmos_address"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_GetParticipantByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "address"}, "", runtime.AssumeColonVerbOpt(false)))
pattern_Query_GetParticipantByNitroAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "nitro_address"}, "", runtime.AssumeColonVerbOpt(false)))
)