From 84f6d971962d0c8a25cbf37fbb15cc022384847f Mon Sep 17 00:00:00 2001 From: Ajaz Ahmed Ansari Date: Sat, 3 Jun 2023 02:39:05 +0530 Subject: [PATCH] feat: mapped account query (#443) * add mapped account query * format * rebase * return map instead of struct * Update x/interchainstaking/client/cli/query.go Co-authored-by: Alex Johnson * Update x/interchainstaking/keeper/grpc_query.go * Update x/interchainstaking/keeper/grpc_query_test.go * fix lint * use sdkConfig --------- Co-authored-by: Alex Johnson --- docs/swagger.yml | 130 +++ .../interchainstaking/v1/query.proto | 15 + x/interchainstaking/client/cli/query.go | 35 + x/interchainstaking/keeper/address_map.go | 24 + x/interchainstaking/keeper/grpc_query.go | 22 + x/interchainstaking/keeper/grpc_query_test.go | 127 +++ x/interchainstaking/types/keys.go | 5 + x/interchainstaking/types/query.pb.go | 798 ++++++++++++++++-- x/interchainstaking/types/query.pb.gw.go | 119 +++ 9 files changed, 1189 insertions(+), 86 deletions(-) diff --git a/docs/swagger.yml b/docs/swagger.yml index ac751c6f3..bdf552730 100644 --- a/docs/swagger.yml +++ b/docs/swagger.yml @@ -2379,6 +2379,136 @@ paths: type: string tags: - Msg + /quicksilver/interchainstaking/v1/mapped_addresses/{address}: + get: + summary: >- + MappedAccounts provides data on the mapped accounts for a given user + over different host chains. + operationId: MappedAccounts + responses: + '200': + description: A successful response. + schema: + type: object + properties: + RemoteAddressMap: + type: object + additionalProperties: + type: string + format: byte + pagination: + type: object + properties: + next_key: + type: string + format: byte + description: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently. It will be empty if + there are no more results. + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + PageResponse is to be embedded in gRPC response messages where + the + + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + default: + description: An unexpected error response. + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: address + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + tags: + - QueryInterchainStaking /quicksilver/interchainstaking/v1/zone/{chain_id}: get: summary: Zone provides meta data on a specific zone. diff --git a/proto/quicksilver/interchainstaking/v1/query.proto b/proto/quicksilver/interchainstaking/v1/query.proto index 6d3d9512d..c147ee49b 100644 --- a/proto/quicksilver/interchainstaking/v1/query.proto +++ b/proto/quicksilver/interchainstaking/v1/query.proto @@ -70,6 +70,11 @@ service Query { "/quicksilver/interchainstaking/v1/zones/" "{chain_id}/redelegation_records"; } + + // MappedAccounts provides data on the mapped accounts for a given user over different host chains. + rpc MappedAccounts(QueryMappedAccountsRequest) returns (QueryMappedAccountsResponse) { + option (google.api.http).get = "/quicksilver/interchainstaking/v1/mapped_addresses/{address}"; + } } message Statistics { @@ -184,3 +189,13 @@ message QueryRedelegationRecordsResponse { repeated RedelegationRecord redelegations = 1 [(gogoproto.nullable) = false]; cosmos.base.query.v1beta1.PageResponse pagination = 2; } + +message QueryMappedAccountsRequest { + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + cosmos.base.query.v1beta1.PageRequest pagination = 2; +} + +message QueryMappedAccountsResponse { + map RemoteAddressMap= 1 [(gogoproto.nullable) = false]; + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} diff --git a/x/interchainstaking/client/cli/query.go b/x/interchainstaking/client/cli/query.go index b662a17b4..10dd10e69 100644 --- a/x/interchainstaking/client/cli/query.go +++ b/x/interchainstaking/client/cli/query.go @@ -28,6 +28,7 @@ func GetQueryCmd() *cobra.Command { GetCmdZones(), GetDelegatorIntentCmd(), GetDepositAccountCmd(), + GetMappedAccountsCmd(), ) return cmd @@ -144,3 +145,37 @@ func GetDepositAccountCmd() *cobra.Command { return cmd } + +// GetMappedAccountsCmd returns the mapped account for the given address. +func GetMappedAccountsCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "mapped-accounts [address]", + Short: "Query mapped accounts for a given address.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + // args + address := args[0] + + queryClient := types.NewQueryClient(clientCtx) + req := &types.QueryMappedAccountsRequest{ + Address: address, + } + + res, err := queryClient.MappedAccounts(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + + flags.AddQueryFlagsToCmd(cmd) + + return cmd +} diff --git a/x/interchainstaking/keeper/address_map.go b/x/interchainstaking/keeper/address_map.go index d97474965..b37a8a91b 100644 --- a/x/interchainstaking/keeper/address_map.go +++ b/x/interchainstaking/keeper/address_map.go @@ -15,6 +15,30 @@ func (k *Keeper) GetRemoteAddressMap(ctx sdk.Context, localAddress []byte, chain return value, value != nil } +// IterateUserMappedAccounts iterates over all the user mapped accounts. +func (k Keeper) IterateUserMappedAccounts(ctx sdk.Context, localAddress []byte, fn func(index int64, chainID string, remoteAddressBytes []byte) (stop bool)) { + // noop + if fn == nil { + return + } + + store := ctx.KVStore(k.storeKey) + iterator := sdk.KVStorePrefixIterator(store, types.GetRemoteAddressPrefix(localAddress)) + defer iterator.Close() + + i := int64(0) + for ; iterator.Valid(); iterator.Next() { + value := iterator.Value() + key := iterator.Key() + chainIDBytes := key[len(types.GetRemoteAddressPrefix(localAddress)):] + stop := fn(i, string(chainIDBytes), value) + if stop { + break + } + i++ + } +} + // SetRemoteAddressMap sets a remote address using a local address as a map. func (k *Keeper) SetRemoteAddressMap(ctx sdk.Context, localAddress, remoteAddress []byte, chainID string) { store := ctx.KVStore(k.storeKey) diff --git a/x/interchainstaking/keeper/grpc_query.go b/x/interchainstaking/keeper/grpc_query.go index 650af59dd..1a64c5506 100644 --- a/x/interchainstaking/keeper/grpc_query.go +++ b/x/interchainstaking/keeper/grpc_query.go @@ -10,6 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "github.com/ingenuity-build/quicksilver/utils" "github.com/ingenuity-build/quicksilver/x/interchainstaking/types" ) @@ -254,3 +255,24 @@ func (k *Keeper) RedelegationRecords(c context.Context, req *types.QueryRedelega return &types.QueryRedelegationRecordsResponse{Redelegations: redelegations}, nil } + +func (k *Keeper) MappedAccounts(c context.Context, req *types.QueryMappedAccountsRequest) (*types.QueryMappedAccountsResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "empty request") + } + + ctx := sdk.UnwrapSDKContext(c) + + remoteAddressMap := make(map[string][]byte) + addrBytes, err := utils.AccAddressFromBech32(req.Address, sdk.GetConfig().GetBech32AccountAddrPrefix()) + if err != nil { + return nil, status.Error(codes.InvalidArgument, "Invalid Address") + } + + k.IterateUserMappedAccounts(ctx, addrBytes, func(index int64, chainID string, remoteAddressBytes []byte) (stop bool) { + remoteAddressMap[chainID] = remoteAddressBytes + return false + }) + + return &types.QueryMappedAccountsResponse{RemoteAddressMap: remoteAddressMap}, nil +} diff --git a/x/interchainstaking/keeper/grpc_query_test.go b/x/interchainstaking/keeper/grpc_query_test.go index b5d81934f..a160c675f 100644 --- a/x/interchainstaking/keeper/grpc_query_test.go +++ b/x/interchainstaking/keeper/grpc_query_test.go @@ -7,6 +7,7 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ingenuity-build/quicksilver/utils" icskeeper "github.com/ingenuity-build/quicksilver/x/interchainstaking/keeper" "github.com/ingenuity-build/quicksilver/x/interchainstaking/types" ) @@ -832,3 +833,129 @@ func (s *KeeperTestSuite) TestKeeper_RedelegationRecords() { }) } } + +func (s *KeeperTestSuite) TestKeeper_MappedAccounts() { + icsKeeper := s.GetQuicksilverApp(s.chainA).InterchainstakingKeeper + usrAddress1, _ := utils.AccAddressFromBech32("cosmos1vwh8mkgefn73vpsv7td68l3tynayck07engahn", "cosmos") + ctx := s.chainA.GetContext() + + tests := []struct { + name string + malleate func() + req *types.QueryMappedAccountsRequest + wantErr bool + expectLength int + }{ + { + "MappedAccounts_Nil_Request", + func() {}, + nil, + true, + 0, + }, + { + "MappedAccounts_NoRecords_Request", + func() { + // setup zones + zone := types.Zone{ + ConnectionId: "connection-77001", + ChainId: "evmos_9001-1", + AccountPrefix: "evmos", + LocalDenom: "uqevmos", + BaseDenom: "uevmos", + MultiSend: false, + LiquidityModule: false, + Is_118: false, + } + icsKeeper.SetZone(ctx, &zone) + }, + &types.QueryMappedAccountsRequest{Address: "cosmos1vwh8mkgefn73vpsv7td68l3tynayck07engahn"}, + false, + 0, + }, + { + "MappedAccounts_ValidRecord_Request", + func() { + // setup zones + s.setupTestZones() + zone := types.Zone{ + ConnectionId: "connection-77881", + ChainId: "evmos_9001-1", + AccountPrefix: "evmos", + LocalDenom: "uqevmos", + BaseDenom: "uevmos", + MultiSend: false, + LiquidityModule: false, + Is_118: false, + } + icsKeeper.SetZone(ctx, &zone) + + icsKeeper.SetRemoteAddressMap(ctx, usrAddress1, utils.GenerateRandomHash(), zone.ChainId) + }, + &types.QueryMappedAccountsRequest{Address: "cosmos1vwh8mkgefn73vpsv7td68l3tynayck07engahn"}, + false, + 1, + }, + + { + "MappedAccounts_ValidMultipleRecord_Request", + func() { + // setup zones + zone := types.Zone{ + ConnectionId: "connection-77881", + ChainId: "evmos_9001-1", + AccountPrefix: "evmos", + LocalDenom: "uqevmos", + BaseDenom: "uevmos", + MultiSend: false, + LiquidityModule: false, + Is_118: false, + } + icsKeeper.SetZone(ctx, &zone) + + icsKeeper.SetRemoteAddressMap(ctx, usrAddress1, utils.GenerateRandomHash(), zone.ChainId) + + zone2 := types.Zone{ + ConnectionId: "connection-77891", + ChainId: "injective-1", + AccountPrefix: "injective", + LocalDenom: "uqinj", + BaseDenom: "uinj", + MultiSend: false, + LiquidityModule: false, + Is_118: false, + } + icsKeeper.SetZone(ctx, &zone2) + + icsKeeper.SetRemoteAddressMap(ctx, usrAddress1, utils.GenerateRandomHash(), zone2.ChainId) + }, + &types.QueryMappedAccountsRequest{Address: "cosmos1vwh8mkgefn73vpsv7td68l3tynayck07engahn"}, + false, + 2, + }, + } + + // run tests: + for _, tt := range tests { + s.Run(tt.name, func() { + tt.malleate() + resp, err := icsKeeper.MappedAccounts( + ctx, + tt.req, + ) + if tt.wantErr { + s.T().Logf("Error:\n%v\n", err) + s.Require().Error(err) + return + } + s.Require().NoError(err) + s.Require().NotNil(resp) + s.Require().Equal(tt.expectLength, len(resp.RemoteAddressMap)) + + vstr, err := json.MarshalIndent(resp, "", "\t") + s.Require().NoError(err) + + s.T().Logf("Response:\n%s\n", vstr) + }) + } +} diff --git a/x/interchainstaking/types/keys.go b/x/interchainstaking/types/keys.go index 452449916..0e9e355a1 100644 --- a/x/interchainstaking/types/keys.go +++ b/x/interchainstaking/types/keys.go @@ -153,3 +153,8 @@ func GetUnbondingKey(chainID, validator string, epochNumber int64) []byte { func GetZoneValidatorsKey(chainID string) []byte { return append(KeyPrefixValidatorsInfo, []byte(chainID)...) } + +// GetRemoteAddressPrefix gets the prefix for a remote address mapping. +func GetRemoteAddressPrefix(locaAddress []byte) []byte { + return append(KeyPrefixRemoteAddress, locaAddress...) +} diff --git a/x/interchainstaking/types/query.pb.go b/x/interchainstaking/types/query.pb.go index f23484f7a..9159a690c 100644 --- a/x/interchainstaking/types/query.pb.go +++ b/x/interchainstaking/types/query.pb.go @@ -1159,6 +1159,110 @@ func (m *QueryRedelegationRecordsResponse) GetPagination() *query.PageResponse { return nil } +type QueryMappedAccountsRequest struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryMappedAccountsRequest) Reset() { *m = QueryMappedAccountsRequest{} } +func (m *QueryMappedAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryMappedAccountsRequest) ProtoMessage() {} +func (*QueryMappedAccountsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_c8e4d79429548821, []int{21} +} +func (m *QueryMappedAccountsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMappedAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMappedAccountsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMappedAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMappedAccountsRequest.Merge(m, src) +} +func (m *QueryMappedAccountsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryMappedAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMappedAccountsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMappedAccountsRequest proto.InternalMessageInfo + +func (m *QueryMappedAccountsRequest) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *QueryMappedAccountsRequest) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +type QueryMappedAccountsResponse struct { + RemoteAddressMap map[string][]byte `protobuf:"bytes,1,rep,name=RemoteAddressMap,proto3" json:"RemoteAddressMap" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryMappedAccountsResponse) Reset() { *m = QueryMappedAccountsResponse{} } +func (m *QueryMappedAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryMappedAccountsResponse) ProtoMessage() {} +func (*QueryMappedAccountsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c8e4d79429548821, []int{22} +} +func (m *QueryMappedAccountsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryMappedAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryMappedAccountsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryMappedAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryMappedAccountsResponse.Merge(m, src) +} +func (m *QueryMappedAccountsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryMappedAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryMappedAccountsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryMappedAccountsResponse proto.InternalMessageInfo + +func (m *QueryMappedAccountsResponse) GetRemoteAddressMap() map[string][]byte { + if m != nil { + return m.RemoteAddressMap + } + return nil +} + +func (m *QueryMappedAccountsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + func init() { proto.RegisterType((*Statistics)(nil), "quicksilver.interchainstaking.v1.Statistics") proto.RegisterType((*QueryZonesRequest)(nil), "quicksilver.interchainstaking.v1.QueryZonesRequest") @@ -1181,6 +1285,9 @@ func init() { proto.RegisterType((*QueryUnbondingRecordsResponse)(nil), "quicksilver.interchainstaking.v1.QueryUnbondingRecordsResponse") proto.RegisterType((*QueryRedelegationRecordsRequest)(nil), "quicksilver.interchainstaking.v1.QueryRedelegationRecordsRequest") proto.RegisterType((*QueryRedelegationRecordsResponse)(nil), "quicksilver.interchainstaking.v1.QueryRedelegationRecordsResponse") + proto.RegisterType((*QueryMappedAccountsRequest)(nil), "quicksilver.interchainstaking.v1.QueryMappedAccountsRequest") + proto.RegisterType((*QueryMappedAccountsResponse)(nil), "quicksilver.interchainstaking.v1.QueryMappedAccountsResponse") + proto.RegisterMapType((map[string][]byte)(nil), "quicksilver.interchainstaking.v1.QueryMappedAccountsResponse.RemoteAddressMapEntry") } func init() { @@ -1188,92 +1295,101 @@ func init() { } var fileDescriptor_c8e4d79429548821 = []byte{ - // 1351 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xc4, 0x49, 0x9a, 0xbe, 0x88, 0x36, 0x9d, 0xb6, 0xd4, 0x5d, 0x82, 0x13, 0x19, 0x89, - 0xb6, 0x90, 0x7a, 0xe5, 0xa4, 0x02, 0x5a, 0x48, 0x93, 0xb8, 0xf9, 0xa1, 0xf0, 0x43, 0x50, 0x37, - 0x10, 0x35, 0x3d, 0x98, 0xb5, 0x77, 0xb4, 0x59, 0xd5, 0xd9, 0x71, 0x76, 0xc7, 0x2e, 0xa1, 0xea, - 0x01, 0xfe, 0x00, 0x04, 0x02, 0x81, 0x7a, 0xe6, 0x86, 0xc4, 0x8d, 0x0b, 0x37, 0x38, 0x20, 0x55, - 0x02, 0xa4, 0x0a, 0x38, 0x70, 0x0a, 0x90, 0xd0, 0x03, 0x07, 0x0e, 0xf4, 0x8e, 0x84, 0x76, 0xf6, - 0xed, 0x7a, 0xfd, 0x2b, 0xb6, 0x37, 0x96, 0xca, 0xcd, 0x33, 0xb3, 0xef, 0x9b, 0xef, 0xfb, 0xde, - 0x9b, 0xd9, 0xb7, 0x86, 0xc9, 0xad, 0xb2, 0x59, 0xb8, 0xe9, 0x98, 0xc5, 0x0a, 0xb3, 0x55, 0xd3, - 0x12,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0xca, 0x6c, 0xe4, 0x78, 0x14, 0xf9, 0xaa, 0x14, - 0xb9, 0x44, 0x17, 0x22, 0x88, 0x0c, 0xfa, 0xc3, 0x40, 0xe3, 0xdf, 0x04, 0x8e, 0x37, 0x69, 0x9e, - 0xe8, 0x7c, 0xc7, 0x27, 0xac, 0x55, 0x53, 0xa8, 0x64, 0x0e, 0x02, 0x81, 0x62, 0x5f, 0x97, 0x62, - 0x57, 0xe8, 0x72, 0xa4, 0xf3, 0x5a, 0xc5, 0xf5, 0xf5, 0x66, 0xd6, 0xef, 0xed, 0x26, 0xc8, 0xfd, - 0xdd, 0x04, 0xf9, 0x7d, 0x37, 0x41, 0x3e, 0xdc, 0x4b, 0xf4, 0xdd, 0xdf, 0x4b, 0xf4, 0xfd, 0xba, - 0x97, 0xe8, 0x5b, 0x9f, 0x33, 0x4c, 0xb1, 0x51, 0xce, 0xa7, 0x0a, 0x7c, 0x53, 0x35, 0x2d, 0x83, - 0x59, 0x65, 0x53, 0x6c, 0x9f, 0xcf, 0x97, 0xcd, 0xa2, 0x5e, 0xb3, 0xf9, 0x3b, 0x4d, 0xb6, 0x17, - 0xdb, 0x25, 0xe6, 0xe4, 0x87, 0xe4, 0x1f, 0xe3, 0xd3, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0xc5, - 0xbf, 0xe4, 0xac, 0x1f, 0x18, 0x00, 0x00, + // 1490 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x59, 0x4d, 0x6c, 0x1b, 0x45, + 0x14, 0xce, 0xe4, 0xaf, 0xe9, 0x0b, 0xb4, 0xe9, 0x34, 0xa1, 0xee, 0x52, 0x9c, 0xc8, 0x48, 0xb4, + 0x85, 0xd4, 0xab, 0x24, 0x15, 0xb4, 0xa5, 0x69, 0x53, 0x37, 0x49, 0x15, 0xa0, 0x82, 0x6e, 0x03, + 0x55, 0xd3, 0x83, 0x99, 0x78, 0x47, 0xee, 0xaa, 0xce, 0xae, 0xbb, 0x3b, 0x76, 0x31, 0x55, 0x0f, + 0x20, 0x71, 0x45, 0x20, 0x10, 0xd0, 0x33, 0x37, 0x24, 0x4e, 0xc0, 0x81, 0x1b, 0x1c, 0x90, 0x2a, + 0x01, 0x52, 0x45, 0x39, 0x70, 0x8a, 0xa0, 0xa5, 0x07, 0x0e, 0x1c, 0xe8, 0x1d, 0x09, 0xed, 0xec, + 0xdb, 0xf5, 0x7a, 0x6d, 0xc7, 0xeb, 0xad, 0xa5, 0x72, 0xf3, 0xce, 0xec, 0xfb, 0xe6, 0x7d, 0xdf, + 0x7b, 0xf3, 0xf6, 0x3d, 0x19, 0xa6, 0xaf, 0x56, 0x8c, 0xc2, 0x15, 0xc7, 0x28, 0x55, 0xb9, 0xad, + 0x1a, 0xa6, 0xe0, 0x76, 0xe1, 0x32, 0x33, 0x4c, 0x47, 0xb0, 0x2b, 0x86, 0x59, 0x54, 0xab, 0x33, + 0xea, 0xd5, 0x0a, 0xb7, 0x6b, 0xd9, 0xb2, 0x6d, 0x09, 0x8b, 0x4e, 0x85, 0xde, 0xce, 0x36, 0xbd, + 0x9d, 0xad, 0xce, 0x28, 0xcf, 0x16, 0x2c, 0x67, 0xc3, 0x72, 0xd4, 0x75, 0xe6, 0x70, 0xcf, 0x54, + 0xad, 0xce, 0xac, 0x73, 0xc1, 0x66, 0xd4, 0x32, 0x2b, 0x1a, 0x26, 0x13, 0x86, 0x65, 0x7a, 0x68, + 0xca, 0x5e, 0xef, 0xdd, 0xbc, 0x7c, 0x52, 0xbd, 0x07, 0xdc, 0x1a, 0x2f, 0x5a, 0x45, 0xcb, 0x5b, + 0x77, 0x7f, 0xe1, 0xea, 0xbe, 0xa2, 0x65, 0x15, 0x4b, 0x5c, 0x65, 0x65, 0x43, 0x65, 0xa6, 0x69, + 0x09, 0x89, 0xe6, 0xdb, 0x1c, 0xe9, 0x48, 0xa5, 0xd9, 0x63, 0x69, 0x99, 0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0x63, 0x5b, 0x0e, 0x4a, 0xca, 0xd2, 0x43, 0xa2, + 0x20, 0xcd, 0x97, 0x24, 0xcd, 0x45, 0x9a, 0x4b, 0x40, 0x33, 0x98, 0x93, 0xb0, 0x3a, 0xfd, 0x43, + 0x60, 0x67, 0x64, 0x42, 0xa0, 0xf3, 0xb1, 0xdd, 0x6c, 0x35, 0x3a, 0x29, 0x27, 0x92, 0x9a, 0x23, + 0xbd, 0xbc, 0xa4, 0x77, 0x91, 0x5e, 0x48, 0x44, 0xcf, 0x6f, 0xee, 0xbc, 0x29, 0x47, 0xbd, 0xde, + 0xd4, 0xee, 0xdd, 0xa0, 0x3f, 0x11, 0x18, 0x0d, 0x0d, 0x18, 0xf4, 0x68, 0x77, 0x0e, 0x87, 0x06, + 0x25, 0xe5, 0x58, 0x12, 0x53, 0xe4, 0xb9, 0x2c, 0x79, 0x2e, 0xd0, 0x13, 0xc9, 0x79, 0x4a, 0xf7, + 0xbf, 0x23, 0x30, 0xe2, 0x37, 0xf4, 0xf4, 0xf9, 0x98, 0x0e, 0x45, 0x46, 0x12, 0xe5, 0x85, 0xae, + 0xed, 0x90, 0xc5, 0x69, 0xc9, 0x62, 0x9e, 0xbe, 0x98, 0x80, 0x45, 0x30, 0x31, 0xfc, 0x4b, 0x60, + 0xc2, 0xbd, 0xd3, 0x4d, 0x6d, 0x30, 0x3d, 0x19, 0xd3, 0xaf, 0x76, 0x13, 0x82, 0xb2, 0x90, 0x1c, + 0x00, 0x19, 0x32, 0xc9, 0xf0, 0x12, 0xbd, 0x98, 0x80, 0x61, 0xbd, 0xdb, 0xce, 0xdb, 0x1e, 0x6c, + 0xcb, 0x8c, 0xbc, 0x4f, 0x60, 0xd7, 0xff, 0x92, 0xfb, 0x59, 0xc9, 0xfd, 0x0c, 0x5d, 0xea, 0x09, + 0x77, 0xfa, 0x07, 0x81, 0xb1, 0x68, 0x27, 0x4e, 0xe3, 0xd6, 0x8b, 0x36, 0xb3, 0x85, 0x72, 0x32, + 0xb1, 0x3d, 0x92, 0x7c, 0x45, 0x92, 0x5c, 0xa6, 0x8b, 0x09, 0x48, 0x06, 0x0d, 0x7f, 0xc0, 0xf1, + 0x6f, 0x02, 0xbb, 0x5b, 0x74, 0xc3, 0xf4, 0x54, 0xec, 0x1b, 0xd6, 0xae, 0xcb, 0x57, 0x72, 0x0f, + 0x03, 0x81, 0x64, 0x5f, 0x95, 0x64, 0x57, 0xe8, 0x99, 0x44, 0xf7, 0xb5, 0x8e, 0x1b, 0xf0, 0xbd, + 0x43, 0x60, 0x47, 0x63, 0xe3, 0x18, 0xbb, 0x09, 0x68, 0xd9, 0x64, 0xc7, 0x6e, 0x02, 0x5a, 0x77, + 0xab, 0x99, 0x45, 0x49, 0xf0, 0x04, 0x3d, 0xde, 0x99, 0xe0, 0x86, 0x44, 0xf0, 0xaf, 0xa1, 0xcb, + 0xd5, 0xbf, 0x91, 0xb9, 0xb5, 0x5b, 0x77, 0xd3, 0xe4, 0xf6, 0xdd, 0x34, 0xf9, 0xfd, 0x6e, 0x9a, + 0x7c, 0x70, 0x2f, 0xdd, 0x77, 0xfb, 0x5e, 0xba, 0xef, 0xb7, 0x7b, 0xe9, 0xbe, 0xb5, 0x85, 0xa2, + 0x21, 0x2e, 0x57, 0xd6, 0xb3, 0x05, 0x6b, 0x43, 0x35, 0xcc, 0x22, 0x37, 0x2b, 0x86, 0xa8, 0x1d, + 0x5a, 0xaf, 0x18, 0x25, 0xbd, 0xe1, 0xc4, 0xb7, 0x5a, 0x9c, 0x29, 0x6a, 0x65, 0xee, 0xac, 0x0f, + 0xcb, 0xff, 0x6f, 0xe6, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x10, 0x46, 0x9e, 0x47, 0xc6, 0x1a, + 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1310,6 +1426,8 @@ type QueryClient interface { UnbondingRecords(ctx context.Context, in *QueryUnbondingRecordsRequest, opts ...grpc.CallOption) (*QueryUnbondingRecordsResponse, error) // RedelegationRecords provides data on the active unbondings. RedelegationRecords(ctx context.Context, in *QueryRedelegationRecordsRequest, opts ...grpc.CallOption) (*QueryRedelegationRecordsResponse, error) + // MappedAccounts provides data on the mapped accounts for a given user over different host chains. + MappedAccounts(ctx context.Context, in *QueryMappedAccountsRequest, opts ...grpc.CallOption) (*QueryMappedAccountsResponse, error) } type queryClient struct { @@ -1419,6 +1537,15 @@ func (c *queryClient) RedelegationRecords(ctx context.Context, in *QueryRedelega return out, nil } +func (c *queryClient) MappedAccounts(ctx context.Context, in *QueryMappedAccountsRequest, opts ...grpc.CallOption) (*QueryMappedAccountsResponse, error) { + out := new(QueryMappedAccountsResponse) + err := c.cc.Invoke(ctx, "/quicksilver.interchainstaking.v1.Query/MappedAccounts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Zones provides meta data on connected zones. @@ -1443,6 +1570,8 @@ type QueryServer interface { UnbondingRecords(context.Context, *QueryUnbondingRecordsRequest) (*QueryUnbondingRecordsResponse, error) // RedelegationRecords provides data on the active unbondings. RedelegationRecords(context.Context, *QueryRedelegationRecordsRequest) (*QueryRedelegationRecordsResponse, error) + // MappedAccounts provides data on the mapped accounts for a given user over different host chains. + MappedAccounts(context.Context, *QueryMappedAccountsRequest) (*QueryMappedAccountsResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -1482,6 +1611,9 @@ func (*UnimplementedQueryServer) UnbondingRecords(ctx context.Context, req *Quer func (*UnimplementedQueryServer) RedelegationRecords(ctx context.Context, req *QueryRedelegationRecordsRequest) (*QueryRedelegationRecordsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RedelegationRecords not implemented") } +func (*UnimplementedQueryServer) MappedAccounts(ctx context.Context, req *QueryMappedAccountsRequest) (*QueryMappedAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MappedAccounts not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -1685,6 +1817,24 @@ func _Query_RedelegationRecords_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Query_MappedAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryMappedAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MappedAccounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/quicksilver.interchainstaking.v1.Query/MappedAccounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MappedAccounts(ctx, req.(*QueryMappedAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "quicksilver.interchainstaking.v1.Query", HandlerType: (*QueryServer)(nil), @@ -1733,6 +1883,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "RedelegationRecords", Handler: _Query_RedelegationRecords_Handler, }, + { + MethodName: "MappedAccounts", + Handler: _Query_MappedAccounts_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "quicksilver/interchainstaking/v1/query.proto", @@ -2670,6 +2824,104 @@ func (m *QueryRedelegationRecordsResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *QueryMappedAccountsRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMappedAccountsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMappedAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryMappedAccountsResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryMappedAccountsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryMappedAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.RemoteAddressMap) > 0 { + for k := range m.RemoteAddressMap { + v := m.RemoteAddressMap[k] + baseI := i + if len(v) > 0 { + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintQuery(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -3062,6 +3314,48 @@ func (m *QueryRedelegationRecordsResponse) Size() (n int) { return n } +func (m *QueryMappedAccountsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryMappedAccountsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.RemoteAddressMap) > 0 { + for k, v := range m.RemoteAddressMap { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovQuery(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -5593,6 +5887,338 @@ func (m *QueryRedelegationRecordsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryMappedAccountsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMappedAccountsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMappedAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryMappedAccountsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryMappedAccountsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryMappedAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddressMap", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RemoteAddressMap == nil { + m.RemoteAddressMap = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthQuery + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return ErrInvalidLengthQuery + } + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.RemoteAddressMap[mapkey] = mapvalue + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/interchainstaking/types/query.pb.gw.go b/x/interchainstaking/types/query.pb.gw.go index f6c033d46..7e078dbbe 100644 --- a/x/interchainstaking/types/query.pb.gw.go +++ b/x/interchainstaking/types/query.pb.gw.go @@ -779,6 +779,78 @@ func local_request_Query_RedelegationRecords_0(ctx context.Context, marshaler ru } +var ( + filter_Query_MappedAccounts_0 = &utilities.DoubleArray{Encoding: map[string]int{"address": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + +func request_Query_MappedAccounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMappedAccountsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MappedAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.MappedAccounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MappedAccounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryMappedAccountsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address") + } + + protoReq.Address, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_MappedAccounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.MappedAccounts(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1038,6 +1110,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_MappedAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MappedAccounts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MappedAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1299,6 +1394,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_MappedAccounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MappedAccounts_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MappedAccounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1324,6 +1439,8 @@ var ( pattern_Query_UnbondingRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"quicksilver", "interchainstaking", "v1", "zones", "chain_id", "unbonding_records"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_RedelegationRecords_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"quicksilver", "interchainstaking", "v1", "zones", "chain_id", "redelegation_records"}, "", runtime.AssumeColonVerbOpt(true))) + + pattern_Query_MappedAccounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"quicksilver", "interchainstaking", "v1", "mapped_addresses", "address"}, "", runtime.AssumeColonVerbOpt(true))) ) var ( @@ -1348,4 +1465,6 @@ var ( forward_Query_UnbondingRecords_0 = runtime.ForwardResponseMessage forward_Query_RedelegationRecords_0 = runtime.ForwardResponseMessage + + forward_Query_MappedAccounts_0 = runtime.ForwardResponseMessage )