From 8b91356a63638e891b9c7c1f7b59bbca25164394 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 6 Jul 2021 16:36:27 +0800 Subject: [PATCH 01/20] Set query user params optional --- .../queries/profiles/user-blocks.md | 5 ++-- .../queries/profiles/user-dtag-requests.md | 5 ++-- .../queries/profiles/user-relationships.md | 7 +++--- x/profiles/client/cli/cli_app_links.go | 13 ++++++---- x/profiles/client/cli/cli_chain_links.go | 13 ++++++---- x/profiles/client/cli/cli_dtag_requests.go | 13 ++++++---- x/profiles/client/cli/cli_relationships.go | 24 ++++++++++++------- 7 files changed, 53 insertions(+), 27 deletions(-) diff --git a/docs/developers/queries/profiles/user-blocks.md b/docs/developers/queries/profiles/user-blocks.md index 9160eb6eff..9c94b57b11 100644 --- a/docs/developers/queries/profiles/user-blocks.md +++ b/docs/developers/queries/profiles/user-blocks.md @@ -1,10 +1,11 @@ ## Query user blocked users -This query allows you to retrieve the user blocked by the user with the given `address`. +This query allows you to retrieve the user blocked list with the optional user `address`. **CLI** ```bash -desmos query profiles blocks [address] [[subspace]] +desmos query profiles blocks [[address]] [[subspace]] # Example +# desmos query profiles blocks # desmos query profiles blocks desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud ``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-dtag-requests.md b/docs/developers/queries/profiles/user-dtag-requests.md index bd00e32ea8..53499806a8 100644 --- a/docs/developers/queries/profiles/user-dtag-requests.md +++ b/docs/developers/queries/profiles/user-dtag-requests.md @@ -1,10 +1,11 @@ ## Query user's DTag requests -This query allows you to retrieve the DTag requests of the user with the given `address`. +This query allows you to retrieve the DTag requests with the optional user `address`. **CLI** ```bash -desmos query profiles incoming-dtag-transfer-requests [address] +desmos query profiles incoming-dtag-transfer-requests [[address]] # Example +# desmos query profiles incoming-dtag-transfer-requests # desmos query profiles incoming-dtag-transfer-requests desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud ``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-relationships.md b/docs/developers/queries/profiles/user-relationships.md index 662c290215..f64ade3b7a 100644 --- a/docs/developers/queries/profiles/user-relationships.md +++ b/docs/developers/queries/profiles/user-relationships.md @@ -1,10 +1,11 @@ ## Query user relationships -This query allows you to retrieve the details of a relationship where the creator has the given `address`. +This query allows you to retrieve the relationships with the optional creator `address`. **CLI** ```bash -desmos query profiles relationships [address] +desmos query profiles relationships [[address]] # Example -# desmos query relationships user desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +# desmos query relationships +# desmos query relationships desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud ``` \ No newline at end of file diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index 2ff3e23fda..eb2e9e1cf7 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -139,9 +139,9 @@ func GetCmdUnlinkApplication() *cobra.Command { // GetCmdQueryUserApplicationsLinks returns the command allowing to query the application links associated with a profile func GetCmdQueryUserApplicationsLinks() *cobra.Command { cmd := &cobra.Command{ - Use: "app-links [user]", - Short: "Get all the application links associated to the given username with optional pagination", - Args: cobra.ExactArgs(1), + Use: "app-links [[user]]", + Short: "Get all the application links with optional user address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -149,6 +149,11 @@ func GetCmdQueryUserApplicationsLinks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var user string + if len(args) == 1 { + user = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err @@ -156,7 +161,7 @@ func GetCmdQueryUserApplicationsLinks() *cobra.Command { res, err := queryClient.UserApplicationLinks( context.Background(), - &types.QueryUserApplicationLinksRequest{User: args[0], Pagination: pageReq}, + &types.QueryUserApplicationLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index 54b10d0ffb..41948272ef 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -112,9 +112,9 @@ func GetCmdUnlinkChainAccount() *cobra.Command { // GetCmdQueryUserChainLinks returns the command allowing to query all the chain links of a specific user func GetCmdQueryUserChainLinks() *cobra.Command { cmd := &cobra.Command{ - Use: "chain-links [address]", - Short: "Retrieve all the user's chain links with optional pagination", - Args: cobra.ExactArgs(1), + Use: "chain-links [[address]]", + Short: "Retrieve all chain links with optional user address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -122,6 +122,11 @@ func GetCmdQueryUserChainLinks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var user string + if len(args) == 1 { + user = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err @@ -129,7 +134,7 @@ func GetCmdQueryUserChainLinks() *cobra.Command { res, err := queryClient.UserChainLinks( context.Background(), - &types.QueryUserChainLinksRequest{User: args[0], Pagination: pageReq}, + &types.QueryUserChainLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_dtag_requests.go b/x/profiles/client/cli/cli_dtag_requests.go index 4e7d00a97c..a43aa0e104 100644 --- a/x/profiles/client/cli/cli_dtag_requests.go +++ b/x/profiles/client/cli/cli_dtag_requests.go @@ -137,9 +137,9 @@ func GetCmdRefuseDTagTransfer() *cobra.Command { // GetCmdQueryDTagRequests returns the command allowing to query all the DTag transfer requests made towards a user func GetCmdQueryDTagRequests() *cobra.Command { cmd := &cobra.Command{ - Use: "incoming-dtag-transfer-requests [address]", - Short: "Retrieve the DTag transfer requests made to the given address with optional pagination", - Args: cobra.ExactArgs(1), + Use: "incoming-dtag-transfer-requests [[address]]", + Short: "Retrieve the DTag transfer requests with optional address and pagination", + Args: cobra.RangeArgs(0, 1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -147,6 +147,11 @@ func GetCmdQueryDTagRequests() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) + var receiver string + if len(args) == 1 { + receiver = args[0] + } + pageReq, err := client.ReadPageRequest(cmd.Flags()) if err != nil { return err @@ -154,7 +159,7 @@ func GetCmdQueryDTagRequests() *cobra.Command { res, err := queryClient.IncomingDTagTransferRequests( context.Background(), - &types.QueryIncomingDTagTransferRequestsRequest{Receiver: args[0], Pagination: pageReq}, + &types.QueryIncomingDTagTransferRequestsRequest{Receiver: receiver, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_relationships.go b/x/profiles/client/cli/cli_relationships.go index d4eced6f78..d69aabbbe3 100644 --- a/x/profiles/client/cli/cli_relationships.go +++ b/x/profiles/client/cli/cli_relationships.go @@ -126,9 +126,9 @@ func GetCmdUnblockUser() *cobra.Command { // GetCmdQueryUserRelationships returns the command allowing to query all the relationships of a specific user func GetCmdQueryUserRelationships() *cobra.Command { cmd := &cobra.Command{ - Use: "relationships [address] [[subspace-id]]", - Short: "Retrieve all the user's relationships with optional subspace", - Args: cobra.RangeArgs(1, 2), + Use: "relationships [[address]] [[subspace-id]]", + Short: "Retrieve all the relationships with optional address and subspace", + Args: cobra.RangeArgs(0, 2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -136,7 +136,11 @@ func GetCmdQueryUserRelationships() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - user := args[0] + var user string + if len(args) >= 1 { + user = args[0] + } + var subspace string if len(args) == 2 { subspace = args[1] @@ -168,9 +172,9 @@ func GetCmdQueryUserRelationships() *cobra.Command { // GetCmdQueryUserBlocks returns the command allowing to query all the blocks of a single user with optional subspace func GetCmdQueryUserBlocks() *cobra.Command { cmd := &cobra.Command{ - Use: "blocks [address] [[subspace-id]] ", - Short: "Retrieve the list of all the blocked users of the given address", - Args: cobra.RangeArgs(1, 2), + Use: "blocks [[address]] [[subspace-id]] ", + Short: "Retrieve the list of all the blocked users with optional address and subspace", + Args: cobra.RangeArgs(0, 2), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) if err != nil { @@ -178,7 +182,11 @@ func GetCmdQueryUserBlocks() *cobra.Command { } queryClient := types.NewQueryClient(clientCtx) - user := args[0] + var user string + if len(args) >= 1 { + user = args[0] + } + var subspace string if len(args) == 2 { subspace = args[1] From 09a241d8d9a1663dc0f795f9525d0fefd00b465c Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 6 Jul 2021 17:19:29 +0800 Subject: [PATCH 02/20] Update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb6422dd63..69cbd70dc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# Unreleased +- Made profiles query user parameter optional ([#539](https://github.com/desmos-labs/desmos/pull/539)) + # Version 0.17.0 ## Changes - Added the new `x/subspaces` module ([#392](https://github.com/desmos-labs/desmos/issues/392)) From 4cda1e7ad0c65de373e32ff3eefcc8f4a8a16f75 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 8 Jul 2021 14:09:23 +0800 Subject: [PATCH 03/20] Add unit test --- x/profiles/client/cli/cli_app_links_test.go | 28 ++++++++++- x/profiles/client/cli/cli_chain_links_test.go | 39 ++++++++++++++- .../client/cli/cli_dtag_requests_test.go | 16 ++++++- .../client/cli/cli_relationships_test.go | 47 +++++++++++++++++-- 4 files changed, 122 insertions(+), 8 deletions(-) diff --git a/x/profiles/client/cli/cli_app_links_test.go b/x/profiles/client/cli/cli_app_links_test.go index 84f796ee3f..d45952255d 100644 --- a/x/profiles/client/cli/cli_app_links_test.go +++ b/x/profiles/client/cli/cli_app_links_test.go @@ -23,7 +23,31 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { expectedOutput types.QueryUserApplicationLinksResponse }{ { - name: "no links found", + name: "existing links are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryUserApplicationLinksResponse{ + Links: []types.ApplicationLink{ + types.NewApplicationLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewData("reddit", "reddit-user"), + types.ApplicationLinkStateInitialized, + types.NewOracleRequest( + -1, + 1, + types.NewOracleRequestCallData("twitter", "call_data"), + "client_id", + ), + nil, + time.Date(2020, 1, 1, 00, 00, 00, 000, time.UTC), + ), + }, + }, + }, + { + name: "existing links of the given user address are not found", args: []string{ "cosmos122u6u9gpdr2rp552fkkvlgyecjlmtqhkascl5a", fmt.Sprintf("--%s=json", tmcli.OutputFlag), @@ -34,7 +58,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { }, }, { - name: "existing link is returned properly", + name: "existing links of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), diff --git a/x/profiles/client/cli/cli_chain_links_test.go b/x/profiles/client/cli/cli_chain_links_test.go index 503798514d..67c4a72b17 100644 --- a/x/profiles/client/cli/cli_chain_links_test.go +++ b/x/profiles/client/cli/cli_chain_links_test.go @@ -31,6 +31,43 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { expectErr bool expectedOutput types.QueryUserChainLinksResponse }{ + { + name: "existing chain links are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryUserChainLinksResponse{ + Links: []types.ChainLink{ + types.NewChainLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewBech32Address("cosmos1cjf97gpzwmaf30pzvaargfgr884mpp5ak8f7ns", "cosmos"), + types.NewProof( + pubKey, + "909e38994b1583d3f14384c2e9a03c90064e8fd8e19b780bb0ba303dfe671a27287da04d0ce096ce9a140bd070ee36818f5519eb2070a16971efd8143855524b", + "text", + ), + types.NewChainConfig("cosmos"), + time.Date(2019, 1, 1, 00, 00, 00, 000, time.UTC), + ), + types.NewChainLink( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + types.NewBech32Address("cosmos1xmquc944hzu6n6qtljcexkuhhz76mucxtgm5x0", "cosmos"), + types.NewProof( + pubKey, + "909e38994b1583d3f14384c2e9a03c90064e8fd8e19b780bb0ba303dfe671a27287da04d0ce096ce9a140bd070ee36818f5519eb2070a16971efd8143855524b", + "text", + ), + types.NewChainConfig("cosmos"), + time.Date(2019, 1, 1, 00, 00, 00, 000, time.UTC), + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty array is returned properly", args: []string{ @@ -47,7 +84,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { }, }, { - name: "existing chain links is returned properly", + name: "existing chain links of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), diff --git a/x/profiles/client/cli/cli_dtag_requests_test.go b/x/profiles/client/cli/cli_dtag_requests_test.go index 910c7652cd..46cb93c168 100644 --- a/x/profiles/client/cli/cli_dtag_requests_test.go +++ b/x/profiles/client/cli/cli_dtag_requests_test.go @@ -22,6 +22,20 @@ func (s *IntegrationTestSuite) TestCmdQueryDTagRequests() { expectErr bool expRequests []types.DTagTransferRequest }{ + { + name: "existing requests are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expRequests: []types.DTagTransferRequest{ + types.NewDTagTransferRequest( + "dtag", + "cosmos122u6u9gpdr2rp552fkkvlgyecjlmtqhkascl5a", + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + ), + }, + }, { name: "empty slice is returned properly", args: []string{ @@ -32,7 +46,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDTagRequests() { expRequests: []types.DTagTransferRequest{}, }, { - name: "existing requests are returned properly", + name: "existing requests of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), diff --git a/x/profiles/client/cli/cli_relationships_test.go b/x/profiles/client/cli/cli_relationships_test.go index fce28ef4cd..29bedcde4a 100644 --- a/x/profiles/client/cli/cli_relationships_test.go +++ b/x/profiles/client/cli/cli_relationships_test.go @@ -23,6 +23,26 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { expectErr bool expectedOutput types.QueryUserRelationshipsResponse }{ + { + name: "existing relationships are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryUserRelationshipsResponse{ + Relationships: []types.Relationship{ + types.NewRelationship( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + "cosmos1zs70glquczqgt83g03jnvcqppu4jjj8yjxwlvh", + "60303ae22b998861bce3b28f33eec1be758a213c86c93c076dbe9f558c11c752", + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty array is returned properly", args: []string{ @@ -31,7 +51,6 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { }, expectErr: false, expectedOutput: types.QueryUserRelationshipsResponse{ - User: s.network.Validators[1].Address.String(), Relationships: []types.Relationship{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -40,14 +59,13 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { }, }, { - name: "existing relationship is returned properly", + name: "existing relationships of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, expectedOutput: types.QueryUserRelationshipsResponse{ - User: "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", Relationships: []types.Relationship{ types.NewRelationship( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -93,6 +111,27 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { expectErr bool expectedOutput types.QueryUserBlocksResponse }{ + { + name: "existing user blocks are returned properly", + args: []string{ + fmt.Sprintf("--%s=json", tmcli.OutputFlag), + }, + expectErr: false, + expectedOutput: types.QueryUserBlocksResponse{ + Blocks: []types.UserBlock{ + types.NewUserBlock( + "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", + "cosmos1zs70glquczqgt83g03jnvcqppu4jjj8yjxwlvh", + "Test block", + "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", + ), + }, + Pagination: &query.PageResponse{ + NextKey: nil, + Total: 0, + }, + }, + }, { name: "empty slice is returned properly", args: []string{ @@ -109,7 +148,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { }, }, { - name: "existing user blocks are returned properly", + name: "existing user blocks of the given user are returned properly", args: []string{ "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", fmt.Sprintf("--%s=json", tmcli.OutputFlag), From 80dabfe75b713deda8b074e84cae30fada8ec215 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 8 Jul 2021 14:10:13 +0800 Subject: [PATCH 04/20] Remov user field of relationship --- .../v1beta1/query_relationships.proto | 5 +- x/profiles/types/query_relationships.pb.go | 119 +++++------------- 2 files changed, 36 insertions(+), 88 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query_relationships.proto b/proto/desmos/profiles/v1beta1/query_relationships.proto index 1138da44e7..df637e1dea 100644 --- a/proto/desmos/profiles/v1beta1/query_relationships.proto +++ b/proto/desmos/profiles/v1beta1/query_relationships.proto @@ -29,15 +29,14 @@ message QueryUserRelationshipsRequest { // QueryUserRelationshipsResponse is the response type for the // Query/UserRelationships RPC method. message QueryUserRelationshipsResponse { - string user = 1; // relationships represent the list of all the relationships for the queried // user - repeated desmos.profiles.v1beta1.Relationship relationships = 2 + repeated desmos.profiles.v1beta1.Relationship relationships = 1 [ (gogoproto.nullable) = false ]; // pagination defines an optional pagination for the request. - cosmos.base.query.v1beta1.PageResponse pagination = 3; + cosmos.base.query.v1beta1.PageResponse pagination = 2; } // ___________________________________________________________________________________________________________________ diff --git a/x/profiles/types/query_relationships.pb.go b/x/profiles/types/query_relationships.pb.go index 322a988dab..ad60fa6c1e 100644 --- a/x/profiles/types/query_relationships.pb.go +++ b/x/profiles/types/query_relationships.pb.go @@ -74,12 +74,11 @@ var xxx_messageInfo_QueryUserRelationshipsRequest proto.InternalMessageInfo // QueryUserRelationshipsResponse is the response type for the // Query/UserRelationships RPC method. type QueryUserRelationshipsResponse struct { - User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // relationships represent the list of all the relationships for the queried // user - Relationships []Relationship `protobuf:"bytes,2,rep,name=relationships,proto3" json:"relationships"` + Relationships []Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships"` // pagination defines an optional pagination for the request. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *QueryUserRelationshipsResponse) Reset() { *m = QueryUserRelationshipsResponse{} } @@ -115,13 +114,6 @@ func (m *QueryUserRelationshipsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryUserRelationshipsResponse proto.InternalMessageInfo -func (m *QueryUserRelationshipsResponse) GetUser() string { - if m != nil { - return m.User - } - return "" -} - func (m *QueryUserRelationshipsResponse) GetRelationships() []Relationship { if m != nil { return m.Relationships @@ -245,36 +237,36 @@ func init() { } var fileDescriptor_c0b8922e87a25523 = []byte{ - // 451 bytes of a gzipped FileDescriptorProto + // 449 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0xbf, 0x8e, 0xd3, 0x40, - 0x10, 0xc6, 0xbd, 0xb9, 0xd3, 0x09, 0x36, 0xa2, 0xb1, 0x10, 0xe7, 0x8b, 0xc0, 0x89, 0x22, 0x01, - 0x11, 0x12, 0xbb, 0x4a, 0xe8, 0xa8, 0x50, 0x0a, 0xfe, 0x74, 0x9c, 0x25, 0x1a, 0x9a, 0x68, 0x37, - 0x99, 0xf3, 0x59, 0x38, 0xde, 0x3d, 0x8f, 0x8d, 0xc8, 0x1b, 0x50, 0xf2, 0x06, 0x5c, 0x81, 0x78, - 0x96, 0x2b, 0x53, 0x52, 0x21, 0x94, 0x34, 0x3c, 0x06, 0xf2, 0xee, 0x26, 0xe7, 0x40, 0x2c, 0x24, - 0x2a, 0xba, 0x19, 0xcf, 0x7c, 0x33, 0xbf, 0xf9, 0xac, 0xa5, 0xc3, 0x19, 0xe0, 0x5c, 0x21, 0xd7, - 0xb9, 0x3a, 0x4b, 0x52, 0x40, 0xfe, 0x7e, 0x28, 0xa1, 0x10, 0x43, 0x7e, 0x51, 0x42, 0xbe, 0x98, - 0xe4, 0x90, 0x8a, 0x22, 0x51, 0x19, 0x9e, 0x27, 0x1a, 0x99, 0xce, 0x55, 0xa1, 0xfc, 0x63, 0x2b, - 0x61, 0x1b, 0x09, 0x73, 0x92, 0xce, 0xed, 0x58, 0xc5, 0xca, 0xf4, 0xf0, 0x2a, 0xb2, 0xed, 0x9d, - 0xbb, 0xb1, 0x52, 0x71, 0x0a, 0x5c, 0xe8, 0x84, 0x8b, 0x2c, 0x53, 0x85, 0x1d, 0xe8, 0xaa, 0x27, - 0xae, 0x6a, 0x32, 0x59, 0x9e, 0x71, 0x91, 0x2d, 0x5c, 0x69, 0xd4, 0x84, 0x36, 0x57, 0x33, 0x48, - 0x71, 0x1f, 0x5b, 0xe7,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e8, 0x7b, 0xc3, 0x6f, 0x84, 0x06, 0x6d, 0xa0, 0xa8, 0x55, 0x8e, 0xe0, + 0x9f, 0xd0, 0x5b, 0x3b, 0x4e, 0x75, 0xc9, 0x60, 0x7f, 0xd4, 0x99, 0xdc, 0x67, 0x2d, 0xbf, 0x91, + 0x35, 0xc7, 0x4c, 0x0f, 0x2e, 0x7f, 0xf4, 0xbd, 0x70, 0x77, 0x82, 0xff, 0x62, 0xe7, 0x8e, 0x3d, + 0x73, 0xc7, 0xc3, 0x7f, 0xde, 0x61, 0x79, 0x9a, 0x87, 0x0c, 0x3f, 0x13, 0x7a, 0x67, 0x83, 0x3f, + 0xcd, 0x54, 0xf4, 0xee, 0xba, 0x19, 0xfc, 0x85, 0xd0, 0xa3, 0x3f, 0x08, 0x9d, 0xb3, 0xcf, 0xe8, + 0xa1, 0x34, 0x5f, 0x9c, 0xa5, 0xc3, 0x56, 0x4b, 0x37, 0x62, 0xe7, 0xa7, 0xd3, 0xfd, 0x37, 0x23, + 0xa7, 0x2f, 0x2f, 0x97, 0x01, 0xb9, 0x5a, 0x06, 0xe4, 0xe7, 0x32, 0x20, 0x9f, 0x56, 0x81, 0x77, + 0xb5, 0x0a, 0xbc, 0xef, 0xab, 0xc0, 0x7b, 0xcb, 0x92, 0xb4, 0x3c, 0xab, 0x24, 0x8b, 0xd4, 0x9c, + 0x5b, 0xbc, 0xc7, 0x99, 0x90, 0xe8, 0x62, 0xfe, 0x61, 0xfb, 0xbc, 0xca, 0x85, 0x06, 0x94, 0x87, + 0xe6, 0x05, 0x3c, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x3f, 0x85, 0x78, 0x66, 0x19, 0x04, 0x00, + 0x00, } func (m *QueryUserRelationshipsRequest) Marshal() (dAtA []byte, err error) { @@ -356,7 +348,7 @@ func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQueryRelationships(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } if len(m.Relationships) > 0 { for iNdEx := len(m.Relationships) - 1; iNdEx >= 0; iNdEx-- { @@ -369,16 +361,9 @@ func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, i = encodeVarintQueryRelationships(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0xa } } - if len(m.User) > 0 { - i -= len(m.User) - copy(dAtA[i:], m.User) - i = encodeVarintQueryRelationships(dAtA, i, uint64(len(m.User))) - i-- - dAtA[i] = 0xa - } return len(dAtA) - i, nil } @@ -518,10 +503,6 @@ func (m *QueryUserRelationshipsResponse) Size() (n int) { } var l int _ = l - l = len(m.User) - if l > 0 { - n += 1 + l + sovQueryRelationships(uint64(l)) - } if len(m.Relationships) > 0 { for _, e := range m.Relationships { l = e.Size() @@ -761,38 +742,6 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQueryRelationships - } - 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 ErrInvalidLengthQueryRelationships - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQueryRelationships - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.User = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Relationships", wireType) } @@ -826,7 +775,7 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } From 7f6006de426599e6b6ea27ffe0368fde13eb3b91 Mon Sep 17 00:00:00 2001 From: Paul Date: Thu, 8 Jul 2021 14:10:37 +0800 Subject: [PATCH 05/20] Remove DTag user address checking --- x/profiles/keeper/grpc_query.go | 7 +------ x/profiles/keeper/grpc_query_test.go | 5 ----- x/profiles/types/msgs_dtag_requests.pb.go | 6 +++--- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/x/profiles/keeper/grpc_query.go b/x/profiles/keeper/grpc_query.go index 53e20bd221..282a8fb9e0 100644 --- a/x/profiles/keeper/grpc_query.go +++ b/x/profiles/keeper/grpc_query.go @@ -59,11 +59,6 @@ func (k Keeper) Profile(ctx context.Context, request *types.QueryProfileRequest) } func (k Keeper) IncomingDTagTransferRequests(ctx context.Context, request *types.QueryIncomingDTagTransferRequestsRequest) (*types.QueryIncomingDTagTransferRequestsResponse, error) { - _, err := sdk.AccAddressFromBech32(request.Receiver) - if err != nil { - return nil, status.Errorf(codes.InvalidArgument, "invalid user address: %s", request.Receiver) - } - sdkCtx := sdk.UnwrapSDKContext(ctx) var requests []types.DTagTransferRequest @@ -113,7 +108,7 @@ func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserR return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserRelationshipsResponse{User: request.User, Relationships: relationships, Pagination: pageRes}, nil + return &types.QueryUserRelationshipsResponse{Relationships: relationships, Pagination: pageRes}, nil } // UserBlocks implements the Query/UserBlocks gRPC method diff --git a/x/profiles/keeper/grpc_query_test.go b/x/profiles/keeper/grpc_query_test.go index 5baca70354..c1aac0ffe8 100644 --- a/x/profiles/keeper/grpc_query_test.go +++ b/x/profiles/keeper/grpc_query_test.go @@ -96,11 +96,6 @@ func (suite *KeeperTestSuite) TestQueryServer_IncomingDTagTransferRequests() { shouldErr bool expRequests []types.DTagTransferRequest }{ - { - name: "invalid user", - req: types.NewQueryIncomingDTagTransferRequestsRequest("invalid-address", nil), - shouldErr: true, - }, { name: "valid request without pagination", store: func(ctx sdk.Context) { diff --git a/x/profiles/types/msgs_dtag_requests.pb.go b/x/profiles/types/msgs_dtag_requests.pb.go index 3ee6543b2f..908facdcd6 100644 --- a/x/profiles/types/msgs_dtag_requests.pb.go +++ b/x/profiles/types/msgs_dtag_requests.pb.go @@ -149,7 +149,7 @@ func (m *MsgCancelDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelDTagTransferRequest proto.InternalMessageInfo -// MsgCancelDTagTransferRequestResponse represents the Msg/CancelDTagTransfer +// MsgCancelDTagTransferRequestResponse represents the Msg/CancelDTagTransferRequest // response type. type MsgCancelDTagTransferRequestResponse struct { } @@ -232,7 +232,7 @@ func (m *MsgAcceptDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAcceptDTagTransferRequest proto.InternalMessageInfo -// MsgAcceptDTagTransferRequestResponse defines the Msg/AcceptDTagTransfer +// MsgAcceptDTagTransferRequestResponse defines the Msg/AcceptDTagTransferRequest // response. type MsgAcceptDTagTransferRequestResponse struct { } @@ -312,7 +312,7 @@ func (m *MsgRefuseDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRefuseDTagTransferRequest proto.InternalMessageInfo -// MsgRefuseDTagTransferRequestResponse defines the Msg/RefuseDTagTransfer +// MsgRefuseDTagTransferRequestResponse defines the Msg/RefuseDTagTransferRequest // response. type MsgRefuseDTagTransferRequestResponse struct { } From 0b930e660ebefd93f54cb70de60efa2536ed7b7b Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 14:56:48 +0800 Subject: [PATCH 06/20] Remove User prefix of the rpc methods --- proto/desmos/profiles/v1beta1/query.proto | 22 +- .../profiles/v1beta1/query_app_links.proto | 8 +- .../profiles/v1beta1/query_chain_links.proto | 12 +- .../v1beta1/query_relationships.proto | 24 +- x/profiles/client/cli/cli_app_links.go | 4 +- x/profiles/client/cli/cli_app_links_test.go | 10 +- x/profiles/client/cli/cli_chain_links.go | 4 +- x/profiles/client/cli/cli_chain_links_test.go | 10 +- x/profiles/client/cli/cli_relationships.go | 8 +- .../client/cli/cli_relationships_test.go | 20 +- x/profiles/keeper/grpc_query.go | 22 +- x/profiles/keeper/grpc_query_test.go | 40 +-- x/profiles/types/query.pb.go | 218 +++++++-------- x/profiles/types/query.pb.gw.go | 136 +++++----- x/profiles/types/query_app_links.go | 6 +- x/profiles/types/query_app_links.pb.go | 158 +++++------ x/profiles/types/query_chain_links.pb.go | 160 +++++------ x/profiles/types/query_relationships.pb.go | 256 +++++++++--------- x/staging/posts/types/msgs.pb.go | 2 +- x/staging/posts/types/polls.pb.go | 98 +++---- x/staging/posts/types/query.pb.go | 2 +- 21 files changed, 606 insertions(+), 614 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index 43aa9738d0..e2d0b3b1a0 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -37,23 +37,23 @@ service Query { option (google.api.http).get = "/desmos/profiles/v1beta1/params"; } - // UserRelationships queries the relationships for the user having the given + // Relationships queries the relationships for the user having the given // address - rpc UserRelationships(QueryUserRelationshipsRequest) - returns (QueryUserRelationshipsResponse) { + rpc Relationships(QueryRelationshipsRequest) + returns (QueryRelationshipsResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/relationships/{user}"; } - // UserBlocks queries the user blocks for the user having the given address - rpc UserBlocks(QueryUserBlocksRequest) returns (QueryUserBlocksResponse) { + // Blocks queries the blocks for the user having the given address + rpc Blocks(QueryBlocksRequest) returns (QueryBlocksResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/blocks/{user}"; } - // UserChainLinks queries chain links for the given user - rpc UserChainLinks(QueryUserChainLinksRequest) - returns (QueryUserChainLinksResponse) { + // ChainLinks queries chain links for the given user + rpc ChainLinks(QueryChainLinksRequest) + returns (QueryChainLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/chain-links/{user}"; } @@ -66,9 +66,9 @@ service Query { "/desmos/profiles/v1beta1/chain-links/{user}/{chain_name}/{target}"; } - // UserApplicationLinks queries application links for the given user - rpc UserApplicationLinks(QueryUserApplicationLinksRequest) - returns (QueryUserApplicationLinksResponse) { + // ApplicationLinks queries application links for the given user + rpc ApplicationLinks(QueryApplicationLinksRequest) + returns (QueryApplicationLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/app-links/{user}"; } diff --git a/proto/desmos/profiles/v1beta1/query_app_links.proto b/proto/desmos/profiles/v1beta1/query_app_links.proto index b7c961e406..b019c4fce7 100644 --- a/proto/desmos/profiles/v1beta1/query_app_links.proto +++ b/proto/desmos/profiles/v1beta1/query_app_links.proto @@ -30,18 +30,18 @@ message QueryUserApplicationLinkResponse { ApplicationLink link = 1 [ (gogoproto.nullable) = false ]; } -// QueryUserApplicationLinksRequest represents the request used when querying +// QueryApplicationLinksRequest represents the request used when querying // the application links of a specific user -message QueryUserApplicationLinksRequest { +message QueryApplicationLinksRequest { string user = 1; // Pagination defines an optional pagination for the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryUserApplicationLinksResponse represents the response to the query used +// QueryApplicationLinksResponse represents the response to the query used // to get the application links for a specific user -message QueryUserApplicationLinksResponse { +message QueryApplicationLinksResponse { repeated ApplicationLink links = 1 [ (gogoproto.nullable) = false ]; // Pagination defines the pagination response diff --git a/proto/desmos/profiles/v1beta1/query_chain_links.proto b/proto/desmos/profiles/v1beta1/query_chain_links.proto index 9d68fb7536..59d870c476 100644 --- a/proto/desmos/profiles/v1beta1/query_chain_links.proto +++ b/proto/desmos/profiles/v1beta1/query_chain_links.proto @@ -28,18 +28,18 @@ message QueryUserChainLinkResponse { ChainLink link = 1 [ (gogoproto.nullable) = false ]; } -// QueryUserChainLinksRequest is the request type for the -// Query/UserChainLinks RPC endpoint -message QueryUserChainLinksRequest { +// QueryChainLinksRequest is the request type for the +// Query/ChainLinks RPC endpoint +message QueryChainLinksRequest { string user = 1; // Pagination defines an optional pagination for the request cosmos.base.query.v1beta1.PageRequest pagination = 2; } -// QueryUserChainLinksResponse is the response type for the -// Query/UserChainLinks RPC method. -message QueryUserChainLinksResponse { +// QueryChainLinksResponse is the response type for the +// Query/ChainLinks RPC method. +message QueryChainLinksResponse { repeated ChainLink links = 1 [ (gogoproto.nullable) = false ]; // Pagination defines the pagination response diff --git a/proto/desmos/profiles/v1beta1/query_relationships.proto b/proto/desmos/profiles/v1beta1/query_relationships.proto index df637e1dea..f65bbcfd8a 100644 --- a/proto/desmos/profiles/v1beta1/query_relationships.proto +++ b/proto/desmos/profiles/v1beta1/query_relationships.proto @@ -10,9 +10,9 @@ import "cosmos/base/query/v1beta1/pagination.proto"; option go_package = "github.com/desmos-labs/desmos/x/profiles/types"; -// QueryUserRelationshipsRequest is the request type for the -// Query/UserRelationships RPC method. -message QueryUserRelationshipsRequest { +// QueryRelationshipsRequest is the request type for the +// Query/Relationships RPC method. +message QueryRelationshipsRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -26,12 +26,9 @@ message QueryUserRelationshipsRequest { cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryUserRelationshipsResponse is the response type for the -// Query/UserRelationships RPC method. -message QueryUserRelationshipsResponse { - - // relationships represent the list of all the relationships for the queried - // user +// QueryRelationshipsResponse is the response type for the +// Query/Relationships RPC method. +message QueryRelationshipsResponse { repeated desmos.profiles.v1beta1.Relationship relationships = 1 [ (gogoproto.nullable) = false ]; @@ -41,9 +38,9 @@ message QueryUserRelationshipsResponse { // ___________________________________________________________________________________________________________________ -// QueryUserBlocksRequest is the request type for the Query/UserBlocks RPC +// QueryBlocksRequest is the request type for the Query/Blocks RPC // endpoint -message QueryUserBlocksRequest { +message QueryBlocksRequest { option (gogoproto.equal) = false; option (gogoproto.goproto_getters) = false; @@ -53,10 +50,9 @@ message QueryUserBlocksRequest { cosmos.base.query.v1beta1.PageRequest pagination = 3; } -// QueryUserBlocksResponse is the response type for the Query/UserBlocks RPC +// QueryBlocksResponse is the response type for the Query/Blocks RPC // method. -message QueryUserBlocksResponse { - // blocks represent the list of all the blocks for the queried user +message QueryBlocksResponse { repeated desmos.profiles.v1beta1.UserBlock blocks = 1 [ (gogoproto.nullable) = false ]; cosmos.base.query.v1beta1.PageResponse pagination = 2; diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index eb2e9e1cf7..fccfec6c10 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -159,9 +159,9 @@ func GetCmdQueryUserApplicationsLinks() *cobra.Command { return err } - res, err := queryClient.UserApplicationLinks( + res, err := queryClient.ApplicationLinks( context.Background(), - &types.QueryUserApplicationLinksRequest{User: user, Pagination: pageReq}, + &types.QueryApplicationLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_app_links_test.go b/x/profiles/client/cli/cli_app_links_test.go index d45952255d..36993fcab6 100644 --- a/x/profiles/client/cli/cli_app_links_test.go +++ b/x/profiles/client/cli/cli_app_links_test.go @@ -20,7 +20,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { name string args []string expectErr bool - expectedOutput types.QueryUserApplicationLinksResponse + expectedOutput types.QueryApplicationLinksResponse }{ { name: "existing links are returned properly", @@ -28,7 +28,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserApplicationLinksResponse{ + expectedOutput: types.QueryApplicationLinksResponse{ Links: []types.ApplicationLink{ types.NewApplicationLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -53,7 +53,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserApplicationLinksResponse{ + expectedOutput: types.QueryApplicationLinksResponse{ Links: []types.ApplicationLink{}, }, }, @@ -64,7 +64,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserApplicationLinksResponse{ + expectedOutput: types.QueryApplicationLinksResponse{ Links: []types.ApplicationLink{ types.NewApplicationLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -97,7 +97,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { } else { s.Require().NoError(err) - var response types.QueryUserApplicationLinksResponse + var response types.QueryApplicationLinksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput.Links, response.Links) } diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index 41948272ef..322685d30b 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -132,9 +132,9 @@ func GetCmdQueryUserChainLinks() *cobra.Command { return err } - res, err := queryClient.UserChainLinks( + res, err := queryClient.ChainLinks( context.Background(), - &types.QueryUserChainLinksRequest{User: user, Pagination: pageReq}, + &types.QueryChainLinksRequest{User: user, Pagination: pageReq}, ) if err != nil { return err diff --git a/x/profiles/client/cli/cli_chain_links_test.go b/x/profiles/client/cli/cli_chain_links_test.go index 67c4a72b17..76e0daa8a2 100644 --- a/x/profiles/client/cli/cli_chain_links_test.go +++ b/x/profiles/client/cli/cli_chain_links_test.go @@ -29,7 +29,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { name string args []string expectErr bool - expectedOutput types.QueryUserChainLinksResponse + expectedOutput types.QueryChainLinksResponse }{ { name: "existing chain links are returned properly", @@ -37,7 +37,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserChainLinksResponse{ + expectedOutput: types.QueryChainLinksResponse{ Links: []types.ChainLink{ types.NewChainLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -75,7 +75,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserChainLinksResponse{ + expectedOutput: types.QueryChainLinksResponse{ Links: []types.ChainLink{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -90,7 +90,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserChainLinksResponse{ + expectedOutput: types.QueryChainLinksResponse{ Links: []types.ChainLink{ types.NewChainLink( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -136,7 +136,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { } else { s.Require().NoError(err) - var response types.QueryUserChainLinksResponse + var response types.QueryChainLinksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(uc.expectedOutput.Pagination, response.Pagination) diff --git a/x/profiles/client/cli/cli_relationships.go b/x/profiles/client/cli/cli_relationships.go index d69aabbbe3..9bb1d60db9 100644 --- a/x/profiles/client/cli/cli_relationships.go +++ b/x/profiles/client/cli/cli_relationships.go @@ -151,9 +151,9 @@ func GetCmdQueryUserRelationships() *cobra.Command { return err } - res, err := queryClient.UserRelationships( + res, err := queryClient.Relationships( context.Background(), - &types.QueryUserRelationshipsRequest{User: user, SubspaceId: subspace, Pagination: pageReq}, + &types.QueryRelationshipsRequest{User: user, SubspaceId: subspace, Pagination: pageReq}, ) if err != nil { return err @@ -197,9 +197,9 @@ func GetCmdQueryUserBlocks() *cobra.Command { return err } - res, err := queryClient.UserBlocks( + res, err := queryClient.Blocks( context.Background(), - &types.QueryUserBlocksRequest{User: user, SubspaceId: subspace, Pagination: pageReq}) + &types.QueryBlocksRequest{User: user, SubspaceId: subspace, Pagination: pageReq}) if err != nil { return err } diff --git a/x/profiles/client/cli/cli_relationships_test.go b/x/profiles/client/cli/cli_relationships_test.go index 29bedcde4a..bb330bc620 100644 --- a/x/profiles/client/cli/cli_relationships_test.go +++ b/x/profiles/client/cli/cli_relationships_test.go @@ -21,7 +21,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { name string args []string expectErr bool - expectedOutput types.QueryUserRelationshipsResponse + expectedOutput types.QueryRelationshipsResponse }{ { name: "existing relationships are returned properly", @@ -29,7 +29,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserRelationshipsResponse{ + expectedOutput: types.QueryRelationshipsResponse{ Relationships: []types.Relationship{ types.NewRelationship( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -50,7 +50,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserRelationshipsResponse{ + expectedOutput: types.QueryRelationshipsResponse{ Relationships: []types.Relationship{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -65,7 +65,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserRelationshipsResponse{ + expectedOutput: types.QueryRelationshipsResponse{ Relationships: []types.Relationship{ types.NewRelationship( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -94,7 +94,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { } else { s.Require().NoError(err) - var response types.QueryUserRelationshipsResponse + var response types.QueryRelationshipsResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput, response) } @@ -109,7 +109,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { name string args []string expectErr bool - expectedOutput types.QueryUserBlocksResponse + expectedOutput types.QueryBlocksResponse }{ { name: "existing user blocks are returned properly", @@ -117,7 +117,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserBlocksResponse{ + expectedOutput: types.QueryBlocksResponse{ Blocks: []types.UserBlock{ types.NewUserBlock( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -139,7 +139,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserBlocksResponse{ + expectedOutput: types.QueryBlocksResponse{ Blocks: []types.UserBlock{}, Pagination: &query.PageResponse{ NextKey: nil, @@ -154,7 +154,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: false, - expectedOutput: types.QueryUserBlocksResponse{ + expectedOutput: types.QueryBlocksResponse{ Blocks: []types.UserBlock{ types.NewUserBlock( "cosmos1ftkjv8njvkekk00ehwdfl5sst8zgdpenjfm4hs", @@ -184,7 +184,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { } else { s.Require().NoError(err) - var response types.QueryUserBlocksResponse + var response types.QueryBlocksResponse s.Require().NoError(clientCtx.JSONMarshaler.UnmarshalJSON(out.Bytes(), &response), out.String()) s.Require().Equal(tc.expectedOutput, response) } diff --git a/x/profiles/keeper/grpc_query.go b/x/profiles/keeper/grpc_query.go index 282a8fb9e0..9bd6365e91 100644 --- a/x/profiles/keeper/grpc_query.go +++ b/x/profiles/keeper/grpc_query.go @@ -85,7 +85,7 @@ func (k Keeper) IncomingDTagTransferRequests(ctx context.Context, request *types } // UserRelationships implements the Query/UserRelationships gRPC method -func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserRelationshipsRequest) (*types.QueryUserRelationshipsResponse, error) { +func (k Keeper) Relationships(ctx context.Context, request *types.QueryRelationshipsRequest) (*types.QueryRelationshipsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var relationships []types.Relationship @@ -108,11 +108,11 @@ func (k Keeper) UserRelationships(ctx context.Context, request *types.QueryUserR return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserRelationshipsResponse{Relationships: relationships, Pagination: pageRes}, nil + return &types.QueryRelationshipsResponse{Relationships: relationships, Pagination: pageRes}, nil } -// UserBlocks implements the Query/UserBlocks gRPC method -func (k Keeper) UserBlocks(ctx context.Context, request *types.QueryUserBlocksRequest) (*types.QueryUserBlocksResponse, error) { +// Blocks implements the Query/UserBlocks gRPC method +func (k Keeper) Blocks(ctx context.Context, request *types.QueryBlocksRequest) (*types.QueryBlocksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var userblocks []types.UserBlock @@ -135,7 +135,7 @@ func (k Keeper) UserBlocks(ctx context.Context, request *types.QueryUserBlocksRe return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserBlocksResponse{Blocks: userblocks, Pagination: pageRes}, nil + return &types.QueryBlocksResponse{Blocks: userblocks, Pagination: pageRes}, nil } // Params implements the Query/Params gRPC method @@ -145,8 +145,8 @@ func (k Keeper) Params(ctx context.Context, _ *types.QueryParamsRequest) (*types return &types.QueryParamsResponse{Params: params}, nil } -// UserChainLinks implements the Query/UserChainLinks gRPC method -func (k Keeper) UserChainLinks(ctx context.Context, request *types.QueryUserChainLinksRequest) (*types.QueryUserChainLinksResponse, error) { +// ChainLinks implements the Query/ChainLinks gRPC method +func (k Keeper) ChainLinks(ctx context.Context, request *types.QueryChainLinksRequest) (*types.QueryChainLinksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var links []types.ChainLink @@ -169,7 +169,7 @@ func (k Keeper) UserChainLinks(ctx context.Context, request *types.QueryUserChai return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserChainLinksResponse{Links: links, Pagination: pageRes}, nil + return &types.QueryChainLinksResponse{Links: links, Pagination: pageRes}, nil } // UserChainLink implements the Query/UserChainLink gRPC method @@ -184,8 +184,8 @@ func (k Keeper) UserChainLink(ctx context.Context, request *types.QueryUserChain return &types.QueryUserChainLinkResponse{Link: link}, nil } -// UserApplicationLinks implements the Query/UserApplicationLinks gRPC method -func (k Keeper) UserApplicationLinks(ctx context.Context, request *types.QueryUserApplicationLinksRequest) (*types.QueryUserApplicationLinksResponse, error) { +// ApplicationLinks implements the Query/ApplicationLinks gRPC method +func (k Keeper) ApplicationLinks(ctx context.Context, request *types.QueryApplicationLinksRequest) (*types.QueryApplicationLinksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var links []types.ApplicationLink @@ -208,7 +208,7 @@ func (k Keeper) UserApplicationLinks(ctx context.Context, request *types.QueryUs return nil, status.Error(codes.Internal, err.Error()) } - return &types.QueryUserApplicationLinksResponse{Links: links, Pagination: pageRes}, nil + return &types.QueryApplicationLinksResponse{Links: links, Pagination: pageRes}, nil } // UserApplicationLink implements the Query/UserApplicationLink gRPC method diff --git a/x/profiles/keeper/grpc_query_test.go b/x/profiles/keeper/grpc_query_test.go index c1aac0ffe8..c927451059 100644 --- a/x/profiles/keeper/grpc_query_test.go +++ b/x/profiles/keeper/grpc_query_test.go @@ -197,11 +197,11 @@ func (suite *KeeperTestSuite) TestQueryServer_Params() { suite.Require().Equal(types.DefaultParams(), res.Params) } -func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { +func (suite *KeeperTestSuite) TestQueryServer_ChainLinks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserChainLinksRequest + req *types.QueryChainLinksRequest shouldErr bool expLinks []types.ChainLink }{ @@ -241,7 +241,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { suite.cdc.MustMarshalBinaryBare(&link), ) }, - req: &types.QueryUserChainLinksRequest{ + req: &types.QueryChainLinksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", }, shouldErr: false, @@ -307,7 +307,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { suite.cdc.MustMarshalBinaryBare(&link), ) }, - req: &types.QueryUserChainLinksRequest{ + req: &types.QueryChainLinksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -336,7 +336,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLinks() { tc.store(ctx) } - res, err := suite.k.UserChainLinks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.ChainLinks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -428,11 +428,11 @@ func (suite *KeeperTestSuite) TestQueryServer_UserChainLink() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { +func (suite *KeeperTestSuite) TestQueryServer_Relationships() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserRelationshipsRequest + req *types.QueryRelationshipsRequest shouldErr bool expRelationships []types.Relationship }{ @@ -455,7 +455,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(relationship.Creator))) suite.Require().NoError(suite.k.SaveRelationship(ctx, relationship)) }, - req: &types.QueryUserRelationshipsRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, + req: &types.QueryRelationshipsRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, shouldErr: false, expRelationships: []types.Relationship{ types.NewRelationship( @@ -489,7 +489,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(relationship.Creator))) suite.Require().NoError(suite.k.SaveRelationship(ctx, relationship)) }, - req: &types.QueryUserRelationshipsRequest{ + req: &types.QueryRelationshipsRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -512,7 +512,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { tc.store(ctx) } - res, err := suite.k.UserRelationships(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.Relationships(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -524,11 +524,11 @@ func (suite *KeeperTestSuite) TestQueryServer_UserRelationships() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { +func (suite *KeeperTestSuite) TestQueryServer_Blocks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserBlocksRequest + req *types.QueryBlocksRequest shouldErr bool expBlocks []types.UserBlock }{ @@ -553,7 +553,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(block.Blocker))) suite.Require().NoError(suite.k.SaveUserBlock(ctx, block)) }, - req: &types.QueryUserBlocksRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, + req: &types.QueryBlocksRequest{User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47"}, shouldErr: false, expBlocks: []types.UserBlock{ types.NewUserBlock( @@ -591,7 +591,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { suite.Require().NoError(suite.k.StoreProfile(ctx, testutil.ProfileFromAddr(block.Blocker))) suite.Require().NoError(suite.k.SaveUserBlock(ctx, block)) }, - req: &types.QueryUserBlocksRequest{ + req: &types.QueryBlocksRequest{ User: "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", Pagination: &query.PageRequest{Limit: 1}, }, @@ -615,7 +615,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { tc.store(ctx) } - res, err := suite.k.UserBlocks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.Blocks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { @@ -627,17 +627,17 @@ func (suite *KeeperTestSuite) TestQueryServer_UserBlocks() { } } -func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { +func (suite *KeeperTestSuite) TestQueryServer_ApplicationLinks() { testCases := []struct { name string store func(ctx sdk.Context) - req *types.QueryUserApplicationLinksRequest + req *types.QueryApplicationLinksRequest shouldErr bool expApplicationLinks []types.ApplicationLink }{ { name: "empty requests return empty result", - req: types.NewQueryUserApplicationLinksRequest("user", nil), + req: types.NewQueryApplicationLinksRequest("user", nil), shouldErr: false, expApplicationLinks: nil, }, @@ -686,7 +686,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { ), )) }, - req: types.NewQueryUserApplicationLinksRequest( + req: types.NewQueryApplicationLinksRequest( "cosmos1y54exmx84cqtasvjnskf9f63djuuj68p7hqf47", &query.PageRequest{Limit: 1, Offset: 1, CountTotal: true}, ), @@ -720,7 +720,7 @@ func (suite *KeeperTestSuite) TestQueryServer_UserApplicationLinks() { tc.store(ctx) } - res, err := suite.k.UserApplicationLinks(sdk.WrapSDKContext(ctx), tc.req) + res, err := suite.k.ApplicationLinks(sdk.WrapSDKContext(ctx), tc.req) if tc.shouldErr { suite.Require().Error(err) } else { diff --git a/x/profiles/types/query.pb.go b/x/profiles/types/query.pb.go index 016807fd60..a34411d12a 100644 --- a/x/profiles/types/query.pb.go +++ b/x/profiles/types/query.pb.go @@ -35,52 +35,52 @@ func init() { } var fileDescriptor_5e0074f57a59f38d = []byte{ - // 718 bytes of a gzipped FileDescriptorProto + // 712 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0x4f, 0x6b, 0x13, 0x4f, - 0x18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x85, 0xf9, 0x51, + 0x1b, 0xf7, 0xf6, 0xea, 0xd8, 0x45, 0x33, 0x18, 0xf8, 0x3d, 0x00, 0xd3, 0x03, 0x75, 0xea, 0xc7, + 0xeb, 0x29, 0x25, 0x4c, 0x6f, 0x6e, 0xc0, 0xd5, 0xb1, 0x3a, 0xdc, 0x33, 0xfa, 0x90, 0x8f, 0x2f, + 0xec, 0x77, 0x51, 0x57, 0x4d, 0xd4, 0x65, 0xb8, 0x54, 0x20, 0x6a, 0x6c, 0xcc, 0x0a, 0xb5, 0xed, + 0x8f, 0x06, 0xdd, 0xed, 0xd4, 0x9f, 0x7c, 0x3a, 0x2b, 0x07, 0xa7, 0x67, 0xe5, 0xe0, 0xc7, 0x59, + 0x39, 0x78, 0x7b, 0x5e, 0x9e, 0x38, 0x3d, 0x2f, 0x4f, 0x7c, 0x3b, 0x2f, 0x4f, 0xbc, 0x0c, 0x13, + 0xaa, 0xf7, 0x5b, 0x51, 0x18, 0xf3, 0xa6, 0xdb, 0xbb, 0x9a, 0xe2, 0x48, 0xf9, 0x3a, 0xaf, 0x7a, + 0x95, 0xf4, 0xb1, 0x20, 0x2a, 0x9a, 0x34, 0x7f, 0xcf, 0x8b, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, + 0xd2, 0x6a, 0x7a, 0x47, 0x93, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -104,18 +104,18 @@ type QueryClient interface { IncomingDTagTransferRequests(ctx context.Context, in *QueryIncomingDTagTransferRequestsRequest, opts ...grpc.CallOption) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // UserRelationships queries the relationships for the user having the given + // Relationships queries the relationships for the user having the given // address - UserRelationships(ctx context.Context, in *QueryUserRelationshipsRequest, opts ...grpc.CallOption) (*QueryUserRelationshipsResponse, error) - // UserBlocks queries the user blocks for the user having the given address - UserBlocks(ctx context.Context, in *QueryUserBlocksRequest, opts ...grpc.CallOption) (*QueryUserBlocksResponse, error) - // UserChainLinks queries chain links for the given user - UserChainLinks(ctx context.Context, in *QueryUserChainLinksRequest, opts ...grpc.CallOption) (*QueryUserChainLinksResponse, error) + Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) + // Blocks queries the blocks for the user having the given address + Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) + // ChainLinks queries chain links for the given user + ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(ctx context.Context, in *QueryUserChainLinkRequest, opts ...grpc.CallOption) (*QueryUserChainLinkResponse, error) - // UserApplicationLinks queries application links for the given user - UserApplicationLinks(ctx context.Context, in *QueryUserApplicationLinksRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinksResponse, error) + // ApplicationLinks queries application links for the given user + ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username UserApplicationLink(ctx context.Context, in *QueryUserApplicationLinkRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinkResponse, error) @@ -159,27 +159,27 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) UserRelationships(ctx context.Context, in *QueryUserRelationshipsRequest, opts ...grpc.CallOption) (*QueryUserRelationshipsResponse, error) { - out := new(QueryUserRelationshipsResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserRelationships", in, out, opts...) +func (c *queryClient) Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) { + out := new(QueryRelationshipsResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/Relationships", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) UserBlocks(ctx context.Context, in *QueryUserBlocksRequest, opts ...grpc.CallOption) (*QueryUserBlocksResponse, error) { - out := new(QueryUserBlocksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserBlocks", in, out, opts...) +func (c *queryClient) Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) { + out := new(QueryBlocksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/Blocks", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) UserChainLinks(ctx context.Context, in *QueryUserChainLinksRequest, opts ...grpc.CallOption) (*QueryUserChainLinksResponse, error) { - out := new(QueryUserChainLinksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserChainLinks", in, out, opts...) +func (c *queryClient) ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) { + out := new(QueryChainLinksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/ChainLinks", in, out, opts...) if err != nil { return nil, err } @@ -195,9 +195,9 @@ func (c *queryClient) UserChainLink(ctx context.Context, in *QueryUserChainLinkR return out, nil } -func (c *queryClient) UserApplicationLinks(ctx context.Context, in *QueryUserApplicationLinksRequest, opts ...grpc.CallOption) (*QueryUserApplicationLinksResponse, error) { - out := new(QueryUserApplicationLinksResponse) - err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/UserApplicationLinks", in, out, opts...) +func (c *queryClient) ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) { + out := new(QueryApplicationLinksResponse) + err := c.cc.Invoke(ctx, "/desmos.profiles.v1beta1.Query/ApplicationLinks", in, out, opts...) if err != nil { return nil, err } @@ -233,18 +233,18 @@ type QueryServer interface { IncomingDTagTransferRequests(context.Context, *QueryIncomingDTagTransferRequestsRequest) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // UserRelationships queries the relationships for the user having the given + // Relationships queries the relationships for the user having the given // address - UserRelationships(context.Context, *QueryUserRelationshipsRequest) (*QueryUserRelationshipsResponse, error) - // UserBlocks queries the user blocks for the user having the given address - UserBlocks(context.Context, *QueryUserBlocksRequest) (*QueryUserBlocksResponse, error) - // UserChainLinks queries chain links for the given user - UserChainLinks(context.Context, *QueryUserChainLinksRequest) (*QueryUserChainLinksResponse, error) + Relationships(context.Context, *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) + // Blocks queries the blocks for the user having the given address + Blocks(context.Context, *QueryBlocksRequest) (*QueryBlocksResponse, error) + // ChainLinks queries chain links for the given user + ChainLinks(context.Context, *QueryChainLinksRequest) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(context.Context, *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) - // UserApplicationLinks queries application links for the given user - UserApplicationLinks(context.Context, *QueryUserApplicationLinksRequest) (*QueryUserApplicationLinksResponse, error) + // ApplicationLinks queries application links for the given user + ApplicationLinks(context.Context, *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username UserApplicationLink(context.Context, *QueryUserApplicationLinkRequest) (*QueryUserApplicationLinkResponse, error) @@ -266,20 +266,20 @@ func (*UnimplementedQueryServer) IncomingDTagTransferRequests(ctx context.Contex func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) UserRelationships(ctx context.Context, req *QueryUserRelationshipsRequest) (*QueryUserRelationshipsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserRelationships not implemented") +func (*UnimplementedQueryServer) Relationships(ctx context.Context, req *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Relationships not implemented") } -func (*UnimplementedQueryServer) UserBlocks(ctx context.Context, req *QueryUserBlocksRequest) (*QueryUserBlocksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserBlocks not implemented") +func (*UnimplementedQueryServer) Blocks(ctx context.Context, req *QueryBlocksRequest) (*QueryBlocksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Blocks not implemented") } -func (*UnimplementedQueryServer) UserChainLinks(ctx context.Context, req *QueryUserChainLinksRequest) (*QueryUserChainLinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserChainLinks not implemented") +func (*UnimplementedQueryServer) ChainLinks(ctx context.Context, req *QueryChainLinksRequest) (*QueryChainLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ChainLinks not implemented") } func (*UnimplementedQueryServer) UserChainLink(ctx context.Context, req *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserChainLink not implemented") } -func (*UnimplementedQueryServer) UserApplicationLinks(ctx context.Context, req *QueryUserApplicationLinksRequest) (*QueryUserApplicationLinksResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method UserApplicationLinks not implemented") +func (*UnimplementedQueryServer) ApplicationLinks(ctx context.Context, req *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplicationLinks not implemented") } func (*UnimplementedQueryServer) UserApplicationLink(ctx context.Context, req *QueryUserApplicationLinkRequest) (*QueryUserApplicationLinkResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UserApplicationLink not implemented") @@ -346,56 +346,56 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_UserRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserRelationshipsRequest) +func _Query_Relationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRelationshipsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserRelationships(ctx, in) + return srv.(QueryServer).Relationships(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserRelationships", + FullMethod: "/desmos.profiles.v1beta1.Query/Relationships", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserRelationships(ctx, req.(*QueryUserRelationshipsRequest)) + return srv.(QueryServer).Relationships(ctx, req.(*QueryRelationshipsRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_UserBlocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserBlocksRequest) +func _Query_Blocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryBlocksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserBlocks(ctx, in) + return srv.(QueryServer).Blocks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserBlocks", + FullMethod: "/desmos.profiles.v1beta1.Query/Blocks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserBlocks(ctx, req.(*QueryUserBlocksRequest)) + return srv.(QueryServer).Blocks(ctx, req.(*QueryBlocksRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_UserChainLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserChainLinksRequest) +func _Query_ChainLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryChainLinksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserChainLinks(ctx, in) + return srv.(QueryServer).ChainLinks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserChainLinks", + FullMethod: "/desmos.profiles.v1beta1.Query/ChainLinks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserChainLinks(ctx, req.(*QueryUserChainLinksRequest)) + return srv.(QueryServer).ChainLinks(ctx, req.(*QueryChainLinksRequest)) } return interceptor(ctx, in, info, handler) } @@ -418,20 +418,20 @@ func _Query_UserChainLink_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Query_UserApplicationLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryUserApplicationLinksRequest) +func _Query_ApplicationLinks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryApplicationLinksRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).UserApplicationLinks(ctx, in) + return srv.(QueryServer).ApplicationLinks(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/desmos.profiles.v1beta1.Query/UserApplicationLinks", + FullMethod: "/desmos.profiles.v1beta1.Query/ApplicationLinks", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).UserApplicationLinks(ctx, req.(*QueryUserApplicationLinksRequest)) + return srv.(QueryServer).ApplicationLinks(ctx, req.(*QueryApplicationLinksRequest)) } return interceptor(ctx, in, info, handler) } @@ -489,24 +489,24 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "UserRelationships", - Handler: _Query_UserRelationships_Handler, + MethodName: "Relationships", + Handler: _Query_Relationships_Handler, }, { - MethodName: "UserBlocks", - Handler: _Query_UserBlocks_Handler, + MethodName: "Blocks", + Handler: _Query_Blocks_Handler, }, { - MethodName: "UserChainLinks", - Handler: _Query_UserChainLinks_Handler, + MethodName: "ChainLinks", + Handler: _Query_ChainLinks_Handler, }, { MethodName: "UserChainLink", Handler: _Query_UserChainLink_Handler, }, { - MethodName: "UserApplicationLinks", - Handler: _Query_UserApplicationLinks_Handler, + MethodName: "ApplicationLinks", + Handler: _Query_ApplicationLinks_Handler, }, { MethodName: "UserApplicationLink", diff --git a/x/profiles/types/query.pb.gw.go b/x/profiles/types/query.pb.gw.go index a3797c83e8..f3374c5e74 100644 --- a/x/profiles/types/query.pb.gw.go +++ b/x/profiles/types/query.pb.gw.go @@ -176,11 +176,11 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } var ( - filter_Query_UserRelationships_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Relationships_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserRelationshipsRequest +func request_Query_Relationships_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRelationshipsRequest var metadata runtime.ServerMetadata var ( @@ -204,17 +204,17 @@ func request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Ma if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRelationships_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Relationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Relationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserRelationshipsRequest +func local_request_Query_Relationships_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRelationshipsRequest var metadata runtime.ServerMetadata var ( @@ -238,21 +238,21 @@ func local_request_Query_UserRelationships_0(ctx context.Context, marshaler runt if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserRelationships_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Relationships_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserRelationships(ctx, &protoReq) + msg, err := server.Relationships(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_UserBlocks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_Blocks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserBlocksRequest +func request_Query_Blocks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlocksRequest var metadata runtime.ServerMetadata var ( @@ -276,17 +276,17 @@ func request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserBlocks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Blocks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserBlocks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Blocks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserBlocksRequest +func local_request_Query_Blocks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryBlocksRequest var metadata runtime.ServerMetadata var ( @@ -310,21 +310,21 @@ func local_request_Query_UserBlocks_0(ctx context.Context, marshaler runtime.Mar if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserBlocks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Blocks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserBlocks(ctx, &protoReq) + msg, err := server.Blocks(ctx, &protoReq) return msg, metadata, err } var ( - filter_Query_UserChainLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ChainLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserChainLinksRequest +func request_Query_ChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChainLinksRequest var metadata runtime.ServerMetadata var ( @@ -348,17 +348,17 @@ func request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marsh if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserChainLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserChainLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ChainLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserChainLinksRequest +func local_request_Query_ChainLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryChainLinksRequest var metadata runtime.ServerMetadata var ( @@ -382,11 +382,11 @@ func local_request_Query_UserChainLinks_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserChainLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ChainLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserChainLinks(ctx, &protoReq) + msg, err := server.ChainLinks(ctx, &protoReq) return msg, metadata, err } @@ -490,11 +490,11 @@ func local_request_Query_UserChainLink_0(ctx context.Context, marshaler runtime. } var ( - filter_Query_UserApplicationLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} + filter_Query_ApplicationLinks_0 = &utilities.DoubleArray{Encoding: map[string]int{"user": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} ) -func request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserApplicationLinksRequest +func request_Query_ApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryApplicationLinksRequest var metadata runtime.ServerMetadata var ( @@ -518,17 +518,17 @@ func request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserApplicationLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ApplicationLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := client.UserApplicationLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.ApplicationLinks(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_UserApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryUserApplicationLinksRequest +func local_request_Query_ApplicationLinks_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryApplicationLinksRequest var metadata runtime.ServerMetadata var ( @@ -552,11 +552,11 @@ func local_request_Query_UserApplicationLinks_0(ctx context.Context, marshaler r if err := req.ParseForm(); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_UserApplicationLinks_0); err != nil { + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ApplicationLinks_0); err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) } - msg, err := server.UserApplicationLinks(ctx, &protoReq) + msg, err := server.ApplicationLinks(ctx, &protoReq) return msg, metadata, err } @@ -779,7 +779,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UserRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Relationships_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) @@ -788,18 +788,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserRelationships_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Relationships_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Relationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserBlocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Blocks_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) @@ -808,18 +808,18 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserBlocks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Blocks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Blocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ChainLinks_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) @@ -828,14 +828,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserChainLinks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ChainLinks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -859,7 +859,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_UserApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ApplicationLinks_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) @@ -868,14 +868,14 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_UserApplicationLinks_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ApplicationLinks_0(rctx, inboundMarshaler, server, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_UserApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1020,7 +1020,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UserRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Relationships_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) @@ -1029,18 +1029,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserRelationships_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Relationships_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_UserRelationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Relationships_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserBlocks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Blocks_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) @@ -1049,18 +1049,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserBlocks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Blocks_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_UserBlocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Blocks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_UserChainLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ChainLinks_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) @@ -1069,14 +1069,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserChainLinks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ChainLinks_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_UserChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ChainLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1100,7 +1100,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_UserApplicationLinks_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_ApplicationLinks_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) @@ -1109,14 +1109,14 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_UserApplicationLinks_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_ApplicationLinks_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_UserApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ApplicationLinks_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -1170,15 +1170,15 @@ var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"desmos", "profiles", "v1beta1", "params"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"desmos", "relationships", "v1beta1", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Relationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 1, 0, 4, 1, 5, 3}, []string{"desmos", "relationships", "v1beta1", "user"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserBlocks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "relationships", "v1beta1", "blocks", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Blocks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "relationships", "v1beta1", "blocks", "user"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserChainLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ChainLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UserChainLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"desmos", "profiles", "v1beta1", "chain-links", "user", "chain_name", "target"}, "", runtime.AssumeColonVerbOpt(true))) - pattern_Query_UserApplicationLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "app-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ApplicationLinks_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"desmos", "profiles", "v1beta1", "app-links", "user"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_UserApplicationLink_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6}, []string{"desmos", "profiles", "v1beta1", "app-links", "user", "application", "username"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1192,15 +1192,15 @@ var ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_UserRelationships_0 = runtime.ForwardResponseMessage + forward_Query_Relationships_0 = runtime.ForwardResponseMessage - forward_Query_UserBlocks_0 = runtime.ForwardResponseMessage + forward_Query_Blocks_0 = runtime.ForwardResponseMessage - forward_Query_UserChainLinks_0 = runtime.ForwardResponseMessage + forward_Query_ChainLinks_0 = runtime.ForwardResponseMessage forward_Query_UserChainLink_0 = runtime.ForwardResponseMessage - forward_Query_UserApplicationLinks_0 = runtime.ForwardResponseMessage + forward_Query_ApplicationLinks_0 = runtime.ForwardResponseMessage forward_Query_UserApplicationLink_0 = runtime.ForwardResponseMessage diff --git a/x/profiles/types/query_app_links.go b/x/profiles/types/query_app_links.go index a8bca994ab..0af19aa08a 100644 --- a/x/profiles/types/query_app_links.go +++ b/x/profiles/types/query_app_links.go @@ -4,9 +4,9 @@ import ( query "github.com/cosmos/cosmos-sdk/types/query" ) -// NewQueryUserApplicationLinksRequest returns a new QueryUserApplicationLinksRequest instance -func NewQueryUserApplicationLinksRequest(user string, pageReq *query.PageRequest) *QueryUserApplicationLinksRequest { - return &QueryUserApplicationLinksRequest{ +// NewQueryApplicationLinksRequest returns a new QueryApplicationLinksRequest instance +func NewQueryApplicationLinksRequest(user string, pageReq *query.PageRequest) *QueryApplicationLinksRequest { + return &QueryApplicationLinksRequest{ User: user, Pagination: pageReq, } diff --git a/x/profiles/types/query_app_links.pb.go b/x/profiles/types/query_app_links.pb.go index 97387ebb12..b7067b8ce8 100644 --- a/x/profiles/types/query_app_links.pb.go +++ b/x/profiles/types/query_app_links.pb.go @@ -141,26 +141,26 @@ func (m *QueryUserApplicationLinkResponse) GetLink() ApplicationLink { return ApplicationLink{} } -// QueryUserApplicationLinksRequest represents the request used when querying +// QueryApplicationLinksRequest represents the request used when querying // the application links of a specific user -type QueryUserApplicationLinksRequest struct { +type QueryApplicationLinksRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // Pagination defines an optional pagination for the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserApplicationLinksRequest) Reset() { *m = QueryUserApplicationLinksRequest{} } -func (m *QueryUserApplicationLinksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserApplicationLinksRequest) ProtoMessage() {} -func (*QueryUserApplicationLinksRequest) Descriptor() ([]byte, []int) { +func (m *QueryApplicationLinksRequest) Reset() { *m = QueryApplicationLinksRequest{} } +func (m *QueryApplicationLinksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryApplicationLinksRequest) ProtoMessage() {} +func (*QueryApplicationLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_18d2a2b45fd238cb, []int{2} } -func (m *QueryUserApplicationLinksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryApplicationLinksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserApplicationLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryApplicationLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserApplicationLinksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryApplicationLinksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -170,52 +170,52 @@ func (m *QueryUserApplicationLinksRequest) XXX_Marshal(b []byte, deterministic b return b[:n], nil } } -func (m *QueryUserApplicationLinksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserApplicationLinksRequest.Merge(m, src) +func (m *QueryApplicationLinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryApplicationLinksRequest.Merge(m, src) } -func (m *QueryUserApplicationLinksRequest) XXX_Size() int { +func (m *QueryApplicationLinksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserApplicationLinksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserApplicationLinksRequest.DiscardUnknown(m) +func (m *QueryApplicationLinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryApplicationLinksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserApplicationLinksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryApplicationLinksRequest proto.InternalMessageInfo -func (m *QueryUserApplicationLinksRequest) GetUser() string { +func (m *QueryApplicationLinksRequest) GetUser() string { if m != nil { return m.User } return "" } -func (m *QueryUserApplicationLinksRequest) GetPagination() *query.PageRequest { +func (m *QueryApplicationLinksRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryUserApplicationLinksResponse represents the response to the query used +// QueryApplicationLinksResponse represents the response to the query used // to get the application links for a specific user -type QueryUserApplicationLinksResponse struct { +type QueryApplicationLinksResponse struct { Links []ApplicationLink `protobuf:"bytes,1,rep,name=links,proto3" json:"links"` // Pagination defines the pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserApplicationLinksResponse) Reset() { *m = QueryUserApplicationLinksResponse{} } -func (m *QueryUserApplicationLinksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserApplicationLinksResponse) ProtoMessage() {} -func (*QueryUserApplicationLinksResponse) Descriptor() ([]byte, []int) { +func (m *QueryApplicationLinksResponse) Reset() { *m = QueryApplicationLinksResponse{} } +func (m *QueryApplicationLinksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryApplicationLinksResponse) ProtoMessage() {} +func (*QueryApplicationLinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_18d2a2b45fd238cb, []int{3} } -func (m *QueryUserApplicationLinksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryApplicationLinksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserApplicationLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryApplicationLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserApplicationLinksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryApplicationLinksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -225,26 +225,26 @@ func (m *QueryUserApplicationLinksResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *QueryUserApplicationLinksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserApplicationLinksResponse.Merge(m, src) +func (m *QueryApplicationLinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryApplicationLinksResponse.Merge(m, src) } -func (m *QueryUserApplicationLinksResponse) XXX_Size() int { +func (m *QueryApplicationLinksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserApplicationLinksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserApplicationLinksResponse.DiscardUnknown(m) +func (m *QueryApplicationLinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryApplicationLinksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserApplicationLinksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryApplicationLinksResponse proto.InternalMessageInfo -func (m *QueryUserApplicationLinksResponse) GetLinks() []ApplicationLink { +func (m *QueryApplicationLinksResponse) GetLinks() []ApplicationLink { if m != nil { return m.Links } return nil } -func (m *QueryUserApplicationLinksResponse) GetPagination() *query.PageResponse { +func (m *QueryApplicationLinksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -349,8 +349,8 @@ func (m *QueryApplicationLinkByClientIDResponse) GetLink() ApplicationLink { func init() { proto.RegisterType((*QueryUserApplicationLinkRequest)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinkRequest") proto.RegisterType((*QueryUserApplicationLinkResponse)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinkResponse") - proto.RegisterType((*QueryUserApplicationLinksRequest)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinksRequest") - proto.RegisterType((*QueryUserApplicationLinksResponse)(nil), "desmos.profiles.v1beta1.QueryUserApplicationLinksResponse") + proto.RegisterType((*QueryApplicationLinksRequest)(nil), "desmos.profiles.v1beta1.QueryApplicationLinksRequest") + proto.RegisterType((*QueryApplicationLinksResponse)(nil), "desmos.profiles.v1beta1.QueryApplicationLinksResponse") proto.RegisterType((*QueryApplicationLinkByClientIDRequest)(nil), "desmos.profiles.v1beta1.QueryApplicationLinkByClientIDRequest") proto.RegisterType((*QueryApplicationLinkByClientIDResponse)(nil), "desmos.profiles.v1beta1.QueryApplicationLinkByClientIDResponse") } @@ -360,36 +360,36 @@ func init() { } var fileDescriptor_18d2a2b45fd238cb = []byte{ - // 459 bytes of a gzipped FileDescriptorProto + // 460 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xd1, 0x6e, 0xd3, 0x30, - 0x14, 0x6d, 0x58, 0x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, 0xf3, 0x6d, 0x13, 0xc5, 0x36, 0xd1, 0xd5, 0xfe, 0xf7, 0xb4, 0x00, + 0x3f, 0x6f, 0x7a, 0xad, 0x33, 0xf9, 0x11, 0xa0, 0x27, 0x1d, 0xcb, 0xbd, 0xc3, 0x09, 0xba, 0x6f, + 0x1f, 0x74, 0x18, 0x8c, 0xb6, 0xfe, 0xc3, 0xa2, 0x6b, 0x0e, 0xdf, 0xdc, 0xa0, 0xf7, 0xd9, 0xad, + 0x7a, 0x9d, 0x84, 0xbf, 0x04, 0x4f, 0xd0, 0xd3, 0x9b, 0xf4, 0x8e, 0x9b, 0x57, 0x9c, 0x81, 0x30, + 0xa7, 0x93, 0xab, 0xd4, 0x1e, 0xa3, 0x9d, 0xcc, 0x5e, 0xcd, 0x58, 0xee, 0xa3, 0xdb, 0x76, 0x17, + 0xa7, 0x79, 0xc2, 0xd1, 0xc1, 0x6d, 0x53, 0xee, 0xee, 0x81, 0xc7, 0x6f, 0x2f, 0x16, 0x71, 0x70, + 0xb9, 0x88, 0x83, 0xdf, 0x8b, 0x38, 0xf8, 0xbe, 0x8c, 0x7b, 0x97, 0xcb, 0xb8, 0xf7, 0x73, 0x19, + 0xf7, 0x3e, 0xe1, 0x82, 0x99, 0xcf, 0x75, 0x8a, 0x33, 0x59, 0x12, 0x37, 0xf9, 0x88, 0xd3, 0x54, + 0xfb, 0x33, 0xf9, 0xba, 0xfe, 0x67, 0xa6, 0x51, 0xa0, 0xd3, 0x07, 0xf6, 0x3b, 0xbc, 0xf8, 0x13, + 0x00, 0x00, 0xff, 0xff, 0xb7, 0x75, 0xa8, 0xc0, 0x1e, 0x04, 0x00, 0x00, } func (m *QueryUserApplicationLinkRequest) Marshal() (dAtA []byte, err error) { @@ -469,7 +469,7 @@ func (m *QueryUserApplicationLinkResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryUserApplicationLinksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryApplicationLinksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -479,12 +479,12 @@ func (m *QueryUserApplicationLinksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserApplicationLinksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -511,7 +511,7 @@ func (m *QueryUserApplicationLinksRequest) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } -func (m *QueryUserApplicationLinksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryApplicationLinksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -521,12 +521,12 @@ func (m *QueryUserApplicationLinksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserApplicationLinksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserApplicationLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryApplicationLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -666,7 +666,7 @@ func (m *QueryUserApplicationLinkResponse) Size() (n int) { return n } -func (m *QueryUserApplicationLinksRequest) Size() (n int) { +func (m *QueryApplicationLinksRequest) Size() (n int) { if m == nil { return 0 } @@ -683,7 +683,7 @@ func (m *QueryUserApplicationLinksRequest) Size() (n int) { return n } -func (m *QueryUserApplicationLinksResponse) Size() (n int) { +func (m *QueryApplicationLinksResponse) Size() (n int) { if m == nil { return 0 } @@ -961,7 +961,7 @@ func (m *QueryUserApplicationLinkResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryApplicationLinksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -984,10 +984,10 @@ func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserApplicationLinksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryApplicationLinksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserApplicationLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryApplicationLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1079,7 +1079,7 @@ func (m *QueryUserApplicationLinksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserApplicationLinksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryApplicationLinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1102,10 +1102,10 @@ func (m *QueryUserApplicationLinksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserApplicationLinksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryApplicationLinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserApplicationLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryApplicationLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/profiles/types/query_chain_links.pb.go b/x/profiles/types/query_chain_links.pb.go index c6bcef8de3..88e11fa166 100644 --- a/x/profiles/types/query_chain_links.pb.go +++ b/x/profiles/types/query_chain_links.pb.go @@ -139,26 +139,26 @@ func (m *QueryUserChainLinkResponse) GetLink() ChainLink { return ChainLink{} } -// QueryUserChainLinksRequest is the request type for the -// Query/UserChainLinks RPC endpoint -type QueryUserChainLinksRequest struct { +// QueryChainLinksRequest is the request type for the +// Query/ChainLinks RPC endpoint +type QueryChainLinksRequest struct { User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // Pagination defines an optional pagination for the request Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserChainLinksRequest) Reset() { *m = QueryUserChainLinksRequest{} } -func (m *QueryUserChainLinksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserChainLinksRequest) ProtoMessage() {} -func (*QueryUserChainLinksRequest) Descriptor() ([]byte, []int) { +func (m *QueryChainLinksRequest) Reset() { *m = QueryChainLinksRequest{} } +func (m *QueryChainLinksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryChainLinksRequest) ProtoMessage() {} +func (*QueryChainLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c44c4be38a628772, []int{2} } -func (m *QueryUserChainLinksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryChainLinksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserChainLinksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryChainLinksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -168,52 +168,52 @@ func (m *QueryUserChainLinksRequest) XXX_Marshal(b []byte, deterministic bool) ( return b[:n], nil } } -func (m *QueryUserChainLinksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserChainLinksRequest.Merge(m, src) +func (m *QueryChainLinksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChainLinksRequest.Merge(m, src) } -func (m *QueryUserChainLinksRequest) XXX_Size() int { +func (m *QueryChainLinksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserChainLinksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserChainLinksRequest.DiscardUnknown(m) +func (m *QueryChainLinksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChainLinksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserChainLinksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryChainLinksRequest proto.InternalMessageInfo -func (m *QueryUserChainLinksRequest) GetUser() string { +func (m *QueryChainLinksRequest) GetUser() string { if m != nil { return m.User } return "" } -func (m *QueryUserChainLinksRequest) GetPagination() *query.PageRequest { +func (m *QueryChainLinksRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination } return nil } -// QueryUserChainLinksResponse is the response type for the -// Query/UserChainLinks RPC method. -type QueryUserChainLinksResponse struct { +// QueryChainLinksResponse is the response type for the +// Query/ChainLinks RPC method. +type QueryChainLinksResponse struct { Links []ChainLink `protobuf:"bytes,1,rep,name=links,proto3" json:"links"` // Pagination defines the pagination response Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserChainLinksResponse) Reset() { *m = QueryUserChainLinksResponse{} } -func (m *QueryUserChainLinksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserChainLinksResponse) ProtoMessage() {} -func (*QueryUserChainLinksResponse) Descriptor() ([]byte, []int) { +func (m *QueryChainLinksResponse) Reset() { *m = QueryChainLinksResponse{} } +func (m *QueryChainLinksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryChainLinksResponse) ProtoMessage() {} +func (*QueryChainLinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c44c4be38a628772, []int{3} } -func (m *QueryUserChainLinksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryChainLinksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserChainLinksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryChainLinksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -223,26 +223,26 @@ func (m *QueryUserChainLinksResponse) XXX_Marshal(b []byte, deterministic bool) return b[:n], nil } } -func (m *QueryUserChainLinksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserChainLinksResponse.Merge(m, src) +func (m *QueryChainLinksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryChainLinksResponse.Merge(m, src) } -func (m *QueryUserChainLinksResponse) XXX_Size() int { +func (m *QueryChainLinksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserChainLinksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserChainLinksResponse.DiscardUnknown(m) +func (m *QueryChainLinksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryChainLinksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserChainLinksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryChainLinksResponse proto.InternalMessageInfo -func (m *QueryUserChainLinksResponse) GetLinks() []ChainLink { +func (m *QueryChainLinksResponse) GetLinks() []ChainLink { if m != nil { return m.Links } return nil } -func (m *QueryUserChainLinksResponse) GetPagination() *query.PageResponse { +func (m *QueryChainLinksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -252,8 +252,8 @@ func (m *QueryUserChainLinksResponse) GetPagination() *query.PageResponse { func init() { proto.RegisterType((*QueryUserChainLinkRequest)(nil), "desmos.profiles.v1beta1.QueryUserChainLinkRequest") proto.RegisterType((*QueryUserChainLinkResponse)(nil), "desmos.profiles.v1beta1.QueryUserChainLinkResponse") - proto.RegisterType((*QueryUserChainLinksRequest)(nil), "desmos.profiles.v1beta1.QueryUserChainLinksRequest") - proto.RegisterType((*QueryUserChainLinksResponse)(nil), "desmos.profiles.v1beta1.QueryUserChainLinksResponse") + proto.RegisterType((*QueryChainLinksRequest)(nil), "desmos.profiles.v1beta1.QueryChainLinksRequest") + proto.RegisterType((*QueryChainLinksResponse)(nil), "desmos.profiles.v1beta1.QueryChainLinksResponse") } func init() { @@ -261,34 +261,34 @@ func init() { } var fileDescriptor_c44c4be38a628772 = []byte{ - // 420 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xbd, 0xae, 0xd3, 0x30, - 0x14, 0x4e, 0xb8, 0xe5, 0x4a, 0xd7, 0x77, 0x8b, 0x10, 0xa4, 0x01, 0xc2, 0x55, 0x06, 0x40, 0x48, - 0xd8, 0xb4, 0xac, 0x88, 0xa1, 0x48, 0xc0, 0x80, 0x10, 0x44, 0x62, 0xe9, 0x52, 0x39, 0xed, 0xa9, - 0x6b, 0x35, 0xb1, 0xd3, 0xd8, 0x41, 0xed, 0x5b, 0xf0, 0x14, 0x3c, 0x4b, 0xc7, 0x8e, 0x4c, 0x08, - 0xb5, 0x2f, 0x82, 0x62, 0xbb, 0x3f, 0x12, 0x29, 0x88, 0xcd, 0x27, 0xe7, 0x7c, 0xe7, 0xfb, 0x89, - 0x8d, 0xc8, 0x04, 0x54, 0x21, 0x15, 0x29, 0x2b, 0x39, 0xe5, 0x39, 0x28, 0xf2, 0xb5, 0x97, 0x81, - 0xa6, 0x3d, 0xb2, 0xa8, 0xa1, 0x5a, 0x8d, 0xc6, 0x33, 0xca, 0xc5, 0x28, 0xe7, 0x62, 0xae, 0x70, - 0x59, 0x49, 0x2d, 0x83, 0x7b, 0x16, 0x80, 0xf7, 0x00, 0xec, 0x00, 0xd1, 0x1d, 0x26, 0x99, 0x34, - 0x33, 0xa4, 0x39, 0xd9, 0xf1, 0xe8, 0x01, 0x93, 0x92, 0xe5, 0x40, 0x68, 0xc9, 0x09, 0x15, 0x42, - 0x6a, 0xaa, 0xb9, 0x14, 0x6e, 0x59, 0xd4, 0x75, 0x5d, 0x53, 0x65, 0xf5, 0x94, 0x50, 0xb1, 0x72, - 0xad, 0x17, 0xe7, 0x84, 0x15, 0x72, 0x02, 0xb9, 0xfa, 0x53, 0x59, 0xd4, 0x1d, 0xcb, 0x06, 0x31, - 0xb2, 0x1a, 0x6c, 0xe1, 0x5a, 0xcf, 0x6c, 0x45, 0x32, 0xaa, 0xc0, 0x3a, 0x3b, 0xac, 0x2b, 0x29, - 0xe3, 0xc2, 0x88, 0xb2, 0xb3, 0xc9, 0x14, 0x75, 0x3f, 0x37, 0x13, 0x5f, 0x14, 0x54, 0x6f, 0x1a, - 0x92, 0x0f, 0x5c, 0xcc, 0x53, 0x58, 0xd4, 0xa0, 0x74, 0x10, 0xa0, 0x4e, 0xad, 0xa0, 0x0a, 0xfd, - 0x1b, 0xff, 0xe9, 0x55, 0x6a, 0xce, 0xc1, 0x43, 0x84, 0xac, 0x18, 0x41, 0x0b, 0x08, 0x6f, 0x99, - 0xce, 0x95, 0xf9, 0xf2, 0x91, 0x16, 0x10, 0xdc, 0x45, 0x97, 0x9a, 0x56, 0x0c, 0x74, 0x78, 0x61, - 0x5a, 0xae, 0x4a, 0x86, 0x28, 0x6a, 0xe3, 0x51, 0xa5, 0x14, 0x0a, 0x82, 0x57, 0xa8, 0xd3, 0x78, - 0x33, 0x44, 0xd7, 0xfd, 0x04, 0x9f, 0x49, 0x1d, 0x1f, 0x90, 0x83, 0xce, 0xfa, 0xe7, 0x23, 0x2f, - 0x35, 0xa8, 0x64, 0xd9, 0xb6, 0x5b, 0xfd, 0xcd, 0xc4, 0x5b, 0x84, 0x8e, 0x49, 0x18, 0x13, 0xd7, - 0xfd, 0xc7, 0xd8, 0x85, 0xd8, 0xc4, 0x86, 0x4d, 0x6c, 0x07, 0xde, 0x4f, 0x94, 0x81, 0xdb, 0x97, - 0x9e, 0x20, 0x93, 0xef, 0x3e, 0xba, 0xdf, 0x4a, 0xed, 0x7c, 0xbd, 0x46, 0xb7, 0xcd, 0x3f, 0x0b, - 0xfd, 0x9b, 0x8b, 0xff, 0x32, 0x66, 0x61, 0xc1, 0xbb, 0x16, 0x9d, 0x4f, 0xfe, 0xa9, 0xd3, 0x92, - 0x9f, 0x0a, 0x1d, 0xbc, 0x5f, 0x6f, 0x63, 0x7f, 0xb3, 0x8d, 0xfd, 0x5f, 0xdb, 0xd8, 0xff, 0xb6, - 0x8b, 0xbd, 0xcd, 0x2e, 0xf6, 0x7e, 0xec, 0x62, 0x6f, 0x88, 0x19, 0xd7, 0xb3, 0x3a, 0xc3, 0x63, - 0x59, 0xb8, 0xd7, 0xf1, 0x3c, 0xa7, 0x99, 0xda, 0xbf, 0x94, 0xe5, 0xf1, 0x4a, 0xea, 0x55, 0x09, - 0x2a, 0xbb, 0x34, 0xf7, 0xe6, 0xe5, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0x42, 0xc8, 0xc6, - 0x4b, 0x03, 0x00, 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x53, 0xc1, 0x8e, 0xd3, 0x30, + 0x10, 0x4d, 0xd8, 0xb2, 0xd2, 0x7a, 0x6f, 0x11, 0xda, 0x4d, 0x23, 0x08, 0xab, 0x1c, 0x00, 0x21, + 0x61, 0xb3, 0xe5, 0x8a, 0x38, 0x14, 0x09, 0x38, 0x20, 0x04, 0x91, 0xb8, 0xf4, 0x52, 0x39, 0xed, + 0xd4, 0xb5, 0x9a, 0xd8, 0x69, 0xec, 0x20, 0xfa, 0x17, 0x7c, 0x03,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, } func (m *QueryUserChainLinkRequest) Marshal() (dAtA []byte, err error) { @@ -368,7 +368,7 @@ func (m *QueryUserChainLinkResponse) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryUserChainLinksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryChainLinksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -378,12 +378,12 @@ func (m *QueryUserChainLinksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserChainLinksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryChainLinksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -410,7 +410,7 @@ func (m *QueryUserChainLinksRequest) MarshalToSizedBuffer(dAtA []byte) (int, err return len(dAtA) - i, nil } -func (m *QueryUserChainLinksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryChainLinksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -420,12 +420,12 @@ func (m *QueryUserChainLinksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserChainLinksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryChainLinksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserChainLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryChainLinksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -502,7 +502,7 @@ func (m *QueryUserChainLinkResponse) Size() (n int) { return n } -func (m *QueryUserChainLinksRequest) Size() (n int) { +func (m *QueryChainLinksRequest) Size() (n int) { if m == nil { return 0 } @@ -519,7 +519,7 @@ func (m *QueryUserChainLinksRequest) Size() (n int) { return n } -func (m *QueryUserChainLinksResponse) Size() (n int) { +func (m *QueryChainLinksResponse) Size() (n int) { if m == nil { return 0 } @@ -773,7 +773,7 @@ func (m *QueryUserChainLinkResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryChainLinksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -796,10 +796,10 @@ func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserChainLinksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryChainLinksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserChainLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryChainLinksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -891,7 +891,7 @@ func (m *QueryUserChainLinksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserChainLinksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryChainLinksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -914,10 +914,10 @@ func (m *QueryUserChainLinksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserChainLinksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryChainLinksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserChainLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryChainLinksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/profiles/types/query_relationships.pb.go b/x/profiles/types/query_relationships.pb.go index ad60fa6c1e..1db4f9f6e7 100644 --- a/x/profiles/types/query_relationships.pb.go +++ b/x/profiles/types/query_relationships.pb.go @@ -27,9 +27,9 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryUserRelationshipsRequest is the request type for the -// Query/UserRelationships RPC method. -type QueryUserRelationshipsRequest struct { +// QueryRelationshipsRequest is the request type for the +// Query/Relationships RPC method. +type QueryRelationshipsRequest struct { // address of the user to query the relationships for User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // subspace to query the relationships for @@ -38,18 +38,18 @@ type QueryUserRelationshipsRequest struct { Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserRelationshipsRequest) Reset() { *m = QueryUserRelationshipsRequest{} } -func (m *QueryUserRelationshipsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserRelationshipsRequest) ProtoMessage() {} -func (*QueryUserRelationshipsRequest) Descriptor() ([]byte, []int) { +func (m *QueryRelationshipsRequest) Reset() { *m = QueryRelationshipsRequest{} } +func (m *QueryRelationshipsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRelationshipsRequest) ProtoMessage() {} +func (*QueryRelationshipsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{0} } -func (m *QueryUserRelationshipsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryRelationshipsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserRelationshipsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRelationshipsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -59,40 +59,38 @@ func (m *QueryUserRelationshipsRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryUserRelationshipsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserRelationshipsRequest.Merge(m, src) +func (m *QueryRelationshipsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRelationshipsRequest.Merge(m, src) } -func (m *QueryUserRelationshipsRequest) XXX_Size() int { +func (m *QueryRelationshipsRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserRelationshipsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserRelationshipsRequest.DiscardUnknown(m) +func (m *QueryRelationshipsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRelationshipsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserRelationshipsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryRelationshipsRequest proto.InternalMessageInfo -// QueryUserRelationshipsResponse is the response type for the -// Query/UserRelationships RPC method. -type QueryUserRelationshipsResponse struct { - // relationships represent the list of all the relationships for the queried - // user +// QueryRelationshipsResponse is the response type for the +// Query/Relationships RPC method. +type QueryRelationshipsResponse struct { Relationships []Relationship `protobuf:"bytes,1,rep,name=relationships,proto3" json:"relationships"` // pagination defines an optional pagination for the request. Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserRelationshipsResponse) Reset() { *m = QueryUserRelationshipsResponse{} } -func (m *QueryUserRelationshipsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserRelationshipsResponse) ProtoMessage() {} -func (*QueryUserRelationshipsResponse) Descriptor() ([]byte, []int) { +func (m *QueryRelationshipsResponse) Reset() { *m = QueryRelationshipsResponse{} } +func (m *QueryRelationshipsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryRelationshipsResponse) ProtoMessage() {} +func (*QueryRelationshipsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{1} } -func (m *QueryUserRelationshipsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryRelationshipsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserRelationshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRelationshipsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserRelationshipsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRelationshipsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -102,53 +100,53 @@ func (m *QueryUserRelationshipsResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryUserRelationshipsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserRelationshipsResponse.Merge(m, src) +func (m *QueryRelationshipsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRelationshipsResponse.Merge(m, src) } -func (m *QueryUserRelationshipsResponse) XXX_Size() int { +func (m *QueryRelationshipsResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserRelationshipsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserRelationshipsResponse.DiscardUnknown(m) +func (m *QueryRelationshipsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRelationshipsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserRelationshipsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryRelationshipsResponse proto.InternalMessageInfo -func (m *QueryUserRelationshipsResponse) GetRelationships() []Relationship { +func (m *QueryRelationshipsResponse) GetRelationships() []Relationship { if m != nil { return m.Relationships } return nil } -func (m *QueryUserRelationshipsResponse) GetPagination() *query.PageResponse { +func (m *QueryRelationshipsResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } return nil } -// QueryUserBlocksRequest is the request type for the Query/UserBlocks RPC +// QueryBlocksRequest is the request type for the Query/Blocks RPC // endpoint -type QueryUserBlocksRequest struct { +type QueryBlocksRequest struct { // address of the user to query the blocks for User string `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` SubspaceId string `protobuf:"bytes,2,opt,name=subspace_id,json=subspaceId,proto3" json:"subspace_id,omitempty"` Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserBlocksRequest) Reset() { *m = QueryUserBlocksRequest{} } -func (m *QueryUserBlocksRequest) String() string { return proto.CompactTextString(m) } -func (*QueryUserBlocksRequest) ProtoMessage() {} -func (*QueryUserBlocksRequest) Descriptor() ([]byte, []int) { +func (m *QueryBlocksRequest) Reset() { *m = QueryBlocksRequest{} } +func (m *QueryBlocksRequest) String() string { return proto.CompactTextString(m) } +func (*QueryBlocksRequest) ProtoMessage() {} +func (*QueryBlocksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{2} } -func (m *QueryUserBlocksRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryBlocksRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserBlocksRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryBlocksRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -158,38 +156,37 @@ func (m *QueryUserBlocksRequest) XXX_Marshal(b []byte, deterministic bool) ([]by return b[:n], nil } } -func (m *QueryUserBlocksRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserBlocksRequest.Merge(m, src) +func (m *QueryBlocksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlocksRequest.Merge(m, src) } -func (m *QueryUserBlocksRequest) XXX_Size() int { +func (m *QueryBlocksRequest) XXX_Size() int { return m.Size() } -func (m *QueryUserBlocksRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserBlocksRequest.DiscardUnknown(m) +func (m *QueryBlocksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlocksRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserBlocksRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryBlocksRequest proto.InternalMessageInfo -// QueryUserBlocksResponse is the response type for the Query/UserBlocks RPC +// QueryBlocksResponse is the response type for the Query/Blocks RPC // method. -type QueryUserBlocksResponse struct { - // blocks represent the list of all the blocks for the queried user +type QueryBlocksResponse struct { Blocks []UserBlock `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks"` Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` } -func (m *QueryUserBlocksResponse) Reset() { *m = QueryUserBlocksResponse{} } -func (m *QueryUserBlocksResponse) String() string { return proto.CompactTextString(m) } -func (*QueryUserBlocksResponse) ProtoMessage() {} -func (*QueryUserBlocksResponse) Descriptor() ([]byte, []int) { +func (m *QueryBlocksResponse) Reset() { *m = QueryBlocksResponse{} } +func (m *QueryBlocksResponse) String() string { return proto.CompactTextString(m) } +func (*QueryBlocksResponse) ProtoMessage() {} +func (*QueryBlocksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_c0b8922e87a25523, []int{3} } -func (m *QueryUserBlocksResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryBlocksResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryUserBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryUserBlocksResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryBlocksResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -199,26 +196,26 @@ func (m *QueryUserBlocksResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *QueryUserBlocksResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryUserBlocksResponse.Merge(m, src) +func (m *QueryBlocksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryBlocksResponse.Merge(m, src) } -func (m *QueryUserBlocksResponse) XXX_Size() int { +func (m *QueryBlocksResponse) XXX_Size() int { return m.Size() } -func (m *QueryUserBlocksResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryUserBlocksResponse.DiscardUnknown(m) +func (m *QueryBlocksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryBlocksResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryUserBlocksResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryBlocksResponse proto.InternalMessageInfo -func (m *QueryUserBlocksResponse) GetBlocks() []UserBlock { +func (m *QueryBlocksResponse) GetBlocks() []UserBlock { if m != nil { return m.Blocks } return nil } -func (m *QueryUserBlocksResponse) GetPagination() *query.PageResponse { +func (m *QueryBlocksResponse) GetPagination() *query.PageResponse { if m != nil { return m.Pagination } @@ -226,10 +223,10 @@ func (m *QueryUserBlocksResponse) GetPagination() *query.PageResponse { } func init() { - proto.RegisterType((*QueryUserRelationshipsRequest)(nil), "desmos.profiles.v1beta1.QueryUserRelationshipsRequest") - proto.RegisterType((*QueryUserRelationshipsResponse)(nil), "desmos.profiles.v1beta1.QueryUserRelationshipsResponse") - proto.RegisterType((*QueryUserBlocksRequest)(nil), "desmos.profiles.v1beta1.QueryUserBlocksRequest") - proto.RegisterType((*QueryUserBlocksResponse)(nil), "desmos.profiles.v1beta1.QueryUserBlocksResponse") + proto.RegisterType((*QueryRelationshipsRequest)(nil), "desmos.profiles.v1beta1.QueryRelationshipsRequest") + proto.RegisterType((*QueryRelationshipsResponse)(nil), "desmos.profiles.v1beta1.QueryRelationshipsResponse") + proto.RegisterType((*QueryBlocksRequest)(nil), "desmos.profiles.v1beta1.QueryBlocksRequest") + proto.RegisterType((*QueryBlocksResponse)(nil), "desmos.profiles.v1beta1.QueryBlocksResponse") } func init() { @@ -237,39 +234,38 @@ func init() { } var fileDescriptor_c0b8922e87a25523 = []byte{ - // 449 bytes of a gzipped FileDescriptorProto + // 447 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x93, 0xbf, 0x8e, 0xd3, 0x40, - 0x10, 0xc6, 0xbd, 0x77, 0xa7, 0x13, 0x6c, 0x44, 0x63, 0x21, 0x2e, 0x17, 0x81, 0x13, 0x45, 0x02, - 0x22, 0x24, 0x76, 0x95, 0xd0, 0x51, 0xa1, 0x14, 0xfc, 0xe9, 0x38, 0x4b, 0x34, 0x34, 0xd1, 0xae, - 0x3d, 0xe7, 0xb3, 0x70, 0xbc, 0x7b, 0x1e, 0x1b, 0x91, 0x37, 0xa0, 0xe4, 0x0d, 0xb8, 0x02, 0xf1, - 0x14, 0x3c, 0xc0, 0x95, 0x57, 0x52, 0x21, 0x94, 0x34, 0x3c, 0x06, 0xf2, 0xee, 0x26, 0x71, 0x04, - 0x16, 0x0d, 0xc5, 0x75, 0x33, 0x9e, 0xf9, 0x66, 0x7e, 0xf3, 0x59, 0x4b, 0xc7, 0x31, 0xe0, 0x5c, - 0x21, 0xd7, 0x85, 0x3a, 0x4d, 0x33, 0x40, 0xfe, 0x7e, 0x2c, 0xa1, 0x14, 0x63, 0x7e, 0x5e, 0x41, - 0xb1, 0x98, 0x15, 0x90, 0x89, 0x32, 0x55, 0x39, 0x9e, 0xa5, 0x1a, 0x99, 0x2e, 0x54, 0xa9, 0xfc, - 0x23, 0x2b, 0x61, 0x6b, 0x09, 0x73, 0x92, 0xde, 0xed, 0x44, 0x25, 0xca, 0xf4, 0xf0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00, 0x00, 0xff, 0xff, 0x67, 0x86, 0xe3, 0x1b, 0x09, 0x04, 0x00, 0x00, } -func (m *QueryUserRelationshipsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryRelationshipsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -279,12 +275,12 @@ func (m *QueryUserRelationshipsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserRelationshipsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRelationshipsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -318,7 +314,7 @@ func (m *QueryUserRelationshipsRequest) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryUserRelationshipsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryRelationshipsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -328,12 +324,12 @@ func (m *QueryUserRelationshipsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserRelationshipsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRelationshipsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -367,7 +363,7 @@ func (m *QueryUserRelationshipsResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } -func (m *QueryUserBlocksRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryBlocksRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -377,12 +373,12 @@ func (m *QueryUserBlocksRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserBlocksRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryBlocksRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -416,7 +412,7 @@ func (m *QueryUserBlocksRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryUserBlocksResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryBlocksResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -426,12 +422,12 @@ func (m *QueryUserBlocksResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryUserBlocksResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryBlocksResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryUserBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryBlocksResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -476,7 +472,7 @@ func encodeVarintQueryRelationships(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryUserRelationshipsRequest) Size() (n int) { +func (m *QueryRelationshipsRequest) Size() (n int) { if m == nil { return 0 } @@ -497,7 +493,7 @@ func (m *QueryUserRelationshipsRequest) Size() (n int) { return n } -func (m *QueryUserRelationshipsResponse) Size() (n int) { +func (m *QueryRelationshipsResponse) Size() (n int) { if m == nil { return 0 } @@ -516,7 +512,7 @@ func (m *QueryUserRelationshipsResponse) Size() (n int) { return n } -func (m *QueryUserBlocksRequest) Size() (n int) { +func (m *QueryBlocksRequest) Size() (n int) { if m == nil { return 0 } @@ -537,7 +533,7 @@ func (m *QueryUserBlocksRequest) Size() (n int) { return n } -func (m *QueryUserBlocksResponse) Size() (n int) { +func (m *QueryBlocksResponse) Size() (n int) { if m == nil { return 0 } @@ -562,7 +558,7 @@ func sovQueryRelationships(x uint64) (n int) { func sozQueryRelationships(x uint64) (n int) { return sovQueryRelationships(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRelationshipsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -585,10 +581,10 @@ func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserRelationshipsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRelationshipsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRelationshipsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -712,7 +708,7 @@ func (m *QueryUserRelationshipsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryRelationshipsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -735,10 +731,10 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserRelationshipsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRelationshipsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRelationshipsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -832,7 +828,7 @@ func (m *QueryUserRelationshipsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { +func (m *QueryBlocksRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -855,10 +851,10 @@ func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserBlocksRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBlocksRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBlocksRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -982,7 +978,7 @@ func (m *QueryUserBlocksRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryUserBlocksResponse) Unmarshal(dAtA []byte) error { +func (m *QueryBlocksResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1005,10 +1001,10 @@ func (m *QueryUserBlocksResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryUserBlocksResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryBlocksResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryUserBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryBlocksResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/staging/posts/types/msgs.pb.go b/x/staging/posts/types/msgs.pb.go index 778ffe4de1..201ff7172c 100644 --- a/x/staging/posts/types/msgs.pb.go +++ b/x/staging/posts/types/msgs.pb.go @@ -2910,7 +2910,7 @@ func (m *MsgAnswerPoll) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProvidedAnswers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Answers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { diff --git a/x/staging/posts/types/polls.pb.go b/x/staging/posts/types/polls.pb.go index 167d466db1..e8f5f63b29 100644 --- a/x/staging/posts/types/polls.pb.go +++ b/x/staging/posts/types/polls.pb.go @@ -33,49 +33,49 @@ type ProvidedAnswer struct { Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text" yaml:"text"` } -func (answer *ProvidedAnswer) Reset() { *answer = ProvidedAnswer{} } -func (answer *ProvidedAnswer) String() string { return proto.CompactTextString(answer) } -func (*ProvidedAnswer) ProtoMessage() {} +func (m *ProvidedAnswer) Reset() { *m = ProvidedAnswer{} } +func (m *ProvidedAnswer) String() string { return proto.CompactTextString(m) } +func (*ProvidedAnswer) ProtoMessage() {} func (*ProvidedAnswer) Descriptor() ([]byte, []int) { return fileDescriptor_397fcd2757705694, []int{0} } -func (answer *ProvidedAnswer) XXX_Unmarshal(b []byte) error { - return answer.Unmarshal(b) +func (m *ProvidedAnswer) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) } -func (answer *ProvidedAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ProvidedAnswer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ProvidedAnswer.Marshal(b, answer, deterministic) + return xxx_messageInfo_ProvidedAnswer.Marshal(b, m, deterministic) } else { b = b[:cap(b)] - n, err := answer.MarshalToSizedBuffer(b) + n, err := m.MarshalToSizedBuffer(b) if err != nil { return nil, err } return b[:n], nil } } -func (answer *ProvidedAnswer) XXX_Merge(src proto.Message) { - xxx_messageInfo_ProvidedAnswer.Merge(answer, src) +func (m *ProvidedAnswer) XXX_Merge(src proto.Message) { + xxx_messageInfo_ProvidedAnswer.Merge(m, src) } -func (answer *ProvidedAnswer) XXX_Size() int { - return answer.Size() +func (m *ProvidedAnswer) XXX_Size() int { + return m.Size() } -func (answer *ProvidedAnswer) XXX_DiscardUnknown() { - xxx_messageInfo_ProvidedAnswer.DiscardUnknown(answer) +func (m *ProvidedAnswer) XXX_DiscardUnknown() { + xxx_messageInfo_ProvidedAnswer.DiscardUnknown(m) } var xxx_messageInfo_ProvidedAnswer proto.InternalMessageInfo -func (answer *ProvidedAnswer) GetID() string { - if answer != nil { - return answer.ID +func (m *ProvidedAnswer) GetID() string { + if m != nil { + return m.ID } return "" } -func (answer *ProvidedAnswer) GetText() string { - if answer != nil { - return answer.Text +func (m *ProvidedAnswer) GetText() string { + if m != nil { + return m.Text } return "" } @@ -266,9 +266,9 @@ var fileDescriptor_397fcd2757705694 = []byte{ 0x00, 0xff, 0xff, 0xa3, 0x96, 0xa9, 0x49, 0xd0, 0x03, 0x00, 0x00, } -func (answer *ProvidedAnswer) Equal(that interface{}) bool { +func (this *ProvidedAnswer) Equal(that interface{}) bool { if that == nil { - return answer == nil + return this == nil } that1, ok := that.(*ProvidedAnswer) @@ -281,14 +281,14 @@ func (answer *ProvidedAnswer) Equal(that interface{}) bool { } } if that1 == nil { - return answer == nil - } else if answer == nil { + return this == nil + } else if this == nil { return false } - if answer.ID != that1.ID { + if this.ID != that1.ID { return false } - if answer.Text != that1.Text { + if this.Text != that1.Text { return false } return true @@ -369,37 +369,37 @@ func (this *UserAnswer) Equal(that interface{}) bool { } return true } -func (answer *ProvidedAnswer) Marshal() (dAtA []byte, err error) { - size := answer.Size() +func (m *ProvidedAnswer) Marshal() (dAtA []byte, err error) { + size := m.Size() dAtA = make([]byte, size) - n, err := answer.MarshalToSizedBuffer(dAtA[:size]) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) if err != nil { return nil, err } return dAtA[:n], nil } -func (answer *ProvidedAnswer) MarshalTo(dAtA []byte) (int, error) { - size := answer.Size() - return answer.MarshalToSizedBuffer(dAtA[:size]) +func (m *ProvidedAnswer) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) } -func (answer *ProvidedAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ProvidedAnswer) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(answer.Text) > 0 { - i -= len(answer.Text) - copy(dAtA[i:], answer.Text) - i = encodeVarintPolls(dAtA, i, uint64(len(answer.Text))) + if len(m.Text) > 0 { + i -= len(m.Text) + copy(dAtA[i:], m.Text) + i = encodeVarintPolls(dAtA, i, uint64(len(m.Text))) i-- dAtA[i] = 0x12 } - if len(answer.ID) > 0 { - i -= len(answer.ID) - copy(dAtA[i:], answer.ID) - i = encodeVarintPolls(dAtA, i, uint64(len(answer.ID))) + if len(m.ID) > 0 { + i -= len(m.ID) + copy(dAtA[i:], m.ID) + i = encodeVarintPolls(dAtA, i, uint64(len(m.ID))) i-- dAtA[i] = 0xa } @@ -535,17 +535,17 @@ func encodeVarintPolls(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (answer *ProvidedAnswer) Size() (n int) { - if answer == nil { +func (m *ProvidedAnswer) Size() (n int) { + if m == nil { return 0 } var l int _ = l - l = len(answer.ID) + l = len(m.ID) if l > 0 { n += 1 + l + sovPolls(uint64(l)) } - l = len(answer.Text) + l = len(m.Text) if l > 0 { n += 1 + l + sovPolls(uint64(l)) } @@ -608,7 +608,7 @@ func sovPolls(x uint64) (n int) { func sozPolls(x uint64) (n int) { return sovPolls(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (answer *ProvidedAnswer) Unmarshal(dAtA []byte) error { +func (m *ProvidedAnswer) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -667,7 +667,7 @@ func (answer *ProvidedAnswer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - answer.ID = string(dAtA[iNdEx:postIndex]) + m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { @@ -699,7 +699,7 @@ func (answer *ProvidedAnswer) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - answer.Text = string(dAtA[iNdEx:postIndex]) + m.Text = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1006,7 +1006,7 @@ func (m *UserAnswer) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProvidedAnswers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Answers", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { diff --git a/x/staging/posts/types/query.pb.go b/x/staging/posts/types/query.pb.go index fa8397a377..f44a788981 100644 --- a/x/staging/posts/types/query.pb.go +++ b/x/staging/posts/types/query.pb.go @@ -2754,7 +2754,7 @@ func (m *QueryUserAnswersResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ProvidedAnswers", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Answers", wireType) } var msglen int for shift := uint(0); ; shift += 7 { From 9d5622019a98f70e949721b40a348f988050ab1c Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:09:44 +0800 Subject: [PATCH 07/20] Update the comments --- proto/desmos/posts/v1beta1/polls.proto | 3 +- .../profiles/v1beta1/msgs_dtag_requests.proto | 12 +++---- proto/desmos/profiles/v1beta1/query.proto | 19 +++++++---- x/profiles/types/msgs_dtag_requests.pb.go | 12 +++---- x/profiles/types/query.pb.go | 32 +++++++++++++------ x/staging/posts/types/polls.pb.go | 3 +- 6 files changed, 50 insertions(+), 31 deletions(-) diff --git a/proto/desmos/posts/v1beta1/polls.proto b/proto/desmos/posts/v1beta1/polls.proto index 7d641a96d9..cb42b3e73a 100644 --- a/proto/desmos/posts/v1beta1/polls.proto +++ b/proto/desmos/posts/v1beta1/polls.proto @@ -6,7 +6,8 @@ import "google/protobuf/timestamp.proto"; option go_package = "github.com/desmos-labs/desmos/x/staging/posts/types"; -// ProvidedAnswer contains the data of a single poll answer inserted by the creator +// ProvidedAnswer contains the data of a single poll answer inserted by the +// creator message ProvidedAnswer { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = true; diff --git a/proto/desmos/profiles/v1beta1/msgs_dtag_requests.proto b/proto/desmos/profiles/v1beta1/msgs_dtag_requests.proto index 8447dfb015..97482f4ddf 100644 --- a/proto/desmos/profiles/v1beta1/msgs_dtag_requests.proto +++ b/proto/desmos/profiles/v1beta1/msgs_dtag_requests.proto @@ -44,8 +44,8 @@ message MsgCancelDTagTransferRequest { string sender = 2 [ (gogoproto.moretags) = "yaml:\"sender\"" ]; } -// MsgCancelDTagTransferRequestResponse represents the Msg/CancelDTagTransferRequest -// response type. +// MsgCancelDTagTransferRequestResponse represents the +// Msg/CancelDTagTransferRequest response type. message MsgCancelDTagTransferRequestResponse {} // ___________________________________________________________________________________________________________________ @@ -71,8 +71,8 @@ message MsgAcceptDTagTransferRequest { string receiver = 3 [ (gogoproto.moretags) = "yaml:\"receiver\"" ]; } -// MsgAcceptDTagTransferRequestResponse defines the Msg/AcceptDTagTransferRequest -// response. +// MsgAcceptDTagTransferRequestResponse defines the +// Msg/AcceptDTagTransferRequest response. message MsgAcceptDTagTransferRequestResponse {} // ___________________________________________________________________________________________________________________ @@ -90,6 +90,6 @@ message MsgRefuseDTagTransferRequest { string receiver = 2 [ (gogoproto.moretags) = "yaml:\"receiver\"" ]; } -// MsgRefuseDTagTransferRequestResponse defines the Msg/RefuseDTagTransferRequest -// response. +// MsgRefuseDTagTransferRequestResponse defines the +// Msg/RefuseDTagTransferRequest response. message MsgRefuseDTagTransferRequestResponse {} diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index e2d0b3b1a0..9b4d9441c4 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -37,23 +37,26 @@ service Query { option (google.api.http).get = "/desmos/profiles/v1beta1/params"; } - // Relationships queries the relationships for the user having the given - // address + // Relationships queries all relationships + // It queries the relationships for the given user if the user address is + // provided rpc Relationships(QueryRelationshipsRequest) returns (QueryRelationshipsResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/relationships/{user}"; } - // Blocks queries the blocks for the user having the given address + // Blocks queries all blocks + // It queries the blocks for the given user if the user address is provided rpc Blocks(QueryBlocksRequest) returns (QueryBlocksResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/blocks/{user}"; } - // ChainLinks queries chain links for the given user - rpc ChainLinks(QueryChainLinksRequest) - returns (QueryChainLinksResponse) { + // ChainLinks queries all chain links + // It queries the chain links for the given user if the user address is + // provided + rpc ChainLinks(QueryChainLinksRequest) returns (QueryChainLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/chain-links/{user}"; } @@ -66,7 +69,9 @@ service Query { "/desmos/profiles/v1beta1/chain-links/{user}/{chain_name}/{target}"; } - // ApplicationLinks queries application links for the given user + // ApplicationLinks queries all application links + // It queries the applications links for the given user if the user address is + // provided rpc ApplicationLinks(QueryApplicationLinksRequest) returns (QueryApplicationLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/app-links/{user}"; diff --git a/x/profiles/types/msgs_dtag_requests.pb.go b/x/profiles/types/msgs_dtag_requests.pb.go index 908facdcd6..f1819ce4a2 100644 --- a/x/profiles/types/msgs_dtag_requests.pb.go +++ b/x/profiles/types/msgs_dtag_requests.pb.go @@ -149,8 +149,8 @@ func (m *MsgCancelDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgCancelDTagTransferRequest proto.InternalMessageInfo -// MsgCancelDTagTransferRequestResponse represents the Msg/CancelDTagTransferRequest -// response type. +// MsgCancelDTagTransferRequestResponse represents the +// Msg/CancelDTagTransferRequest response type. type MsgCancelDTagTransferRequestResponse struct { } @@ -232,8 +232,8 @@ func (m *MsgAcceptDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAcceptDTagTransferRequest proto.InternalMessageInfo -// MsgAcceptDTagTransferRequestResponse defines the Msg/AcceptDTagTransferRequest -// response. +// MsgAcceptDTagTransferRequestResponse defines the +// Msg/AcceptDTagTransferRequest response. type MsgAcceptDTagTransferRequestResponse struct { } @@ -312,8 +312,8 @@ func (m *MsgRefuseDTagTransferRequest) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRefuseDTagTransferRequest proto.InternalMessageInfo -// MsgRefuseDTagTransferRequestResponse defines the Msg/RefuseDTagTransferRequest -// response. +// MsgRefuseDTagTransferRequestResponse defines the +// Msg/RefuseDTagTransferRequest response. type MsgRefuseDTagTransferRequestResponse struct { } diff --git a/x/profiles/types/query.pb.go b/x/profiles/types/query.pb.go index a34411d12a..5a0d4425f3 100644 --- a/x/profiles/types/query.pb.go +++ b/x/profiles/types/query.pb.go @@ -104,17 +104,23 @@ type QueryClient interface { IncomingDTagTransferRequests(ctx context.Context, in *QueryIncomingDTagTransferRequestsRequest, opts ...grpc.CallOption) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Relationships queries the relationships for the user having the given - // address + // Relationships queries all relationships + // It queries the relationships for the given user if the user address is + // provided Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) - // Blocks queries the blocks for the user having the given address + // Blocks queries all blocks + // It queries the blocks for the given user if the user address is provided Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) - // ChainLinks queries chain links for the given user + // ChainLinks queries all chain links + // It queries the chain links for the given user if the user address is + // provided ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(ctx context.Context, in *QueryUserChainLinkRequest, opts ...grpc.CallOption) (*QueryUserChainLinkResponse, error) - // ApplicationLinks queries application links for the given user + // ApplicationLinks queries all application links + // It queries the applications links for the given user if the user address is + // provided ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username @@ -233,17 +239,23 @@ type QueryServer interface { IncomingDTagTransferRequests(context.Context, *QueryIncomingDTagTransferRequestsRequest) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Relationships queries the relationships for the user having the given - // address + // Relationships queries all relationships + // It queries the relationships for the given user if the user address is + // provided Relationships(context.Context, *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) - // Blocks queries the blocks for the user having the given address + // Blocks queries all blocks + // It queries the blocks for the given user if the user address is provided Blocks(context.Context, *QueryBlocksRequest) (*QueryBlocksResponse, error) - // ChainLinks queries chain links for the given user + // ChainLinks queries all chain links + // It queries the chain links for the given user if the user address is + // provided ChainLinks(context.Context, *QueryChainLinksRequest) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(context.Context, *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) - // ApplicationLinks queries application links for the given user + // ApplicationLinks queries all application links + // It queries the applications links for the given user if the user address is + // provided ApplicationLinks(context.Context, *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username diff --git a/x/staging/posts/types/polls.pb.go b/x/staging/posts/types/polls.pb.go index e8f5f63b29..2aaf835cd9 100644 --- a/x/staging/posts/types/polls.pb.go +++ b/x/staging/posts/types/polls.pb.go @@ -27,7 +27,8 @@ var _ = time.Kitchen // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// ProvidedAnswer contains the data of a single poll answer inserted by the creator +// ProvidedAnswer contains the data of a single poll answer inserted by the +// creator type ProvidedAnswer struct { ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" yaml:"id"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text" yaml:"text"` From 151dabffcaebc886d8f8f2956e0b9fbf2556fbfb Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:23:32 +0800 Subject: [PATCH 08/20] Remove User prefix in the query cmds --- x/profiles/client/cli/cli_app_links.go | 4 ++-- x/profiles/client/cli/cli_app_links_test.go | 4 ++-- x/profiles/client/cli/cli_chain_links.go | 4 ++-- x/profiles/client/cli/cli_chain_links_test.go | 4 ++-- x/profiles/client/cli/cli_relationships.go | 8 ++++---- x/profiles/client/cli/cli_relationships_test.go | 8 ++++---- x/profiles/client/cli/query.go | 8 ++++---- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index fccfec6c10..78aff5bbc6 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -136,8 +136,8 @@ func GetCmdUnlinkApplication() *cobra.Command { // ------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserApplicationsLinks returns the command allowing to query the application links associated with a profile -func GetCmdQueryUserApplicationsLinks() *cobra.Command { +// GetCmdQueryApplicationsLinks returns the command allowing to query the application links associated with a profile +func GetCmdQueryApplicationsLinks() *cobra.Command { cmd := &cobra.Command{ Use: "app-links [[user]]", Short: "Get all the application links with optional user address and pagination", diff --git a/x/profiles/client/cli/cli_app_links_test.go b/x/profiles/client/cli/cli_app_links_test.go index 36993fcab6..113b0c174d 100644 --- a/x/profiles/client/cli/cli_app_links_test.go +++ b/x/profiles/client/cli/cli_app_links_test.go @@ -14,7 +14,7 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { +func (s *IntegrationTestSuite) TestCmdQueryApplicationsLinks() { val := s.network.Validators[0] testCases := []struct { name string @@ -88,7 +88,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserApplicationsLinks() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserApplicationsLinks() + cmd := cli.GetCmdQueryApplicationsLinks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index 322685d30b..c5e31e43a5 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -109,8 +109,8 @@ func GetCmdUnlinkChainAccount() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserChainLinks returns the command allowing to query all the chain links of a specific user -func GetCmdQueryUserChainLinks() *cobra.Command { +// GetCmdQueryChainLinks returns the command allowing to query the chain links associated with a profile +func GetCmdQueryChainLinks() *cobra.Command { cmd := &cobra.Command{ Use: "chain-links [[address]]", Short: "Retrieve all chain links with optional user address and pagination", diff --git a/x/profiles/client/cli/cli_chain_links_test.go b/x/profiles/client/cli/cli_chain_links_test.go index 76e0daa8a2..6b6bdb9fae 100644 --- a/x/profiles/client/cli/cli_chain_links_test.go +++ b/x/profiles/client/cli/cli_chain_links_test.go @@ -16,7 +16,7 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { +func (s *IntegrationTestSuite) TestCmdQueryChainLinks() { val := s.network.Validators[0] pubKey, err := sdk.GetPubKeyFromBech32( @@ -127,7 +127,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserChainLinks() { uc := uc s.Run(uc.name, func() { - cmd := cli.GetCmdQueryUserChainLinks() + cmd := cli.GetCmdQueryChainLinks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, uc.args) diff --git a/x/profiles/client/cli/cli_relationships.go b/x/profiles/client/cli/cli_relationships.go index 9bb1d60db9..4470919bae 100644 --- a/x/profiles/client/cli/cli_relationships.go +++ b/x/profiles/client/cli/cli_relationships.go @@ -123,8 +123,8 @@ func GetCmdUnblockUser() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryUserRelationships returns the command allowing to query all the relationships of a specific user -func GetCmdQueryUserRelationships() *cobra.Command { +// GetCmdQueryRelationships returns the command allowing to query the relationships with optional user and subspace +func GetCmdQueryRelationships() *cobra.Command { cmd := &cobra.Command{ Use: "relationships [[address]] [[subspace-id]]", Short: "Retrieve all the relationships with optional address and subspace", @@ -169,8 +169,8 @@ func GetCmdQueryUserRelationships() *cobra.Command { return cmd } -// GetCmdQueryUserBlocks returns the command allowing to query all the blocks of a single user with optional subspace -func GetCmdQueryUserBlocks() *cobra.Command { +// GetCmdQueryBlocks returns the command allowing to query all the blocks with optional user and subspace +func GetCmdQueryBlocks() *cobra.Command { cmd := &cobra.Command{ Use: "blocks [[address]] [[subspace-id]] ", Short: "Retrieve the list of all the blocked users with optional address and subspace", diff --git a/x/profiles/client/cli/cli_relationships_test.go b/x/profiles/client/cli/cli_relationships_test.go index bb330bc620..b0b9faee5c 100644 --- a/x/profiles/client/cli/cli_relationships_test.go +++ b/x/profiles/client/cli/cli_relationships_test.go @@ -14,7 +14,7 @@ import ( "github.com/desmos-labs/desmos/x/profiles/types" ) -func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { +func (s *IntegrationTestSuite) TestCmdQueryRelationships() { val := s.network.Validators[0] testCases := []struct { @@ -85,7 +85,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserRelationships() + cmd := cli.GetCmdQueryRelationships() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) @@ -102,7 +102,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserRelationships() { } } -func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { +func (s *IntegrationTestSuite) TestCmdQueryBlocks() { val := s.network.Validators[0] testCases := []struct { @@ -175,7 +175,7 @@ func (s *IntegrationTestSuite) TestCmdQueryUserBlocks() { tc := tc s.Run(tc.name, func() { - cmd := cli.GetCmdQueryUserBlocks() + cmd := cli.GetCmdQueryBlocks() clientCtx := val.ClientCtx out, err := clitestutil.ExecTestCLICmd(clientCtx, cmd, tc.args) diff --git a/x/profiles/client/cli/query.go b/x/profiles/client/cli/query.go index 03160dacdd..b83fada068 100644 --- a/x/profiles/client/cli/query.go +++ b/x/profiles/client/cli/query.go @@ -22,11 +22,11 @@ func GetQueryCmd() *cobra.Command { profileQueryCmd.AddCommand( GetCmdQueryProfile(), GetCmdQueryDTagRequests(), - GetCmdQueryUserRelationships(), - GetCmdQueryUserBlocks(), + GetCmdQueryRelationships(), + GetCmdQueryBlocks(), GetCmdQueryParams(), - GetCmdQueryUserChainLinks(), - GetCmdQueryUserApplicationsLinks(), + GetCmdQueryChainLinks(), + GetCmdQueryApplicationsLinks(), ) return profileQueryCmd } From 163289e4cda75d4ea22b41e81a394f5bfde3e33f Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:24:44 +0800 Subject: [PATCH 09/20] Update comments --- x/profiles/client/cli/cli_app_links.go | 2 +- x/profiles/client/cli/cli_chain_links.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index 78aff5bbc6..5a8aae35e7 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -136,7 +136,7 @@ func GetCmdUnlinkApplication() *cobra.Command { // ------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryApplicationsLinks returns the command allowing to query the application links associated with a profile +// GetCmdQueryApplicationsLinks returns the command allowing to query the application links associated with optional profile func GetCmdQueryApplicationsLinks() *cobra.Command { cmd := &cobra.Command{ Use: "app-links [[user]]", diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index c5e31e43a5..6f15c18aec 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -109,7 +109,7 @@ func GetCmdUnlinkChainAccount() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryChainLinks returns the command allowing to query the chain links associated with a profile +// GetCmdQueryChainLinks returns the command allowing to query the chain links associated with optional profile func GetCmdQueryChainLinks() *cobra.Command { cmd := &cobra.Command{ Use: "chain-links [[address]]", From 20ee31572b4f805575a22ee6143aa77842877f42 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:30:41 +0800 Subject: [PATCH 10/20] Fix comments of grpc queries --- x/profiles/keeper/grpc_query.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/profiles/keeper/grpc_query.go b/x/profiles/keeper/grpc_query.go index 9bd6365e91..c58d09c190 100644 --- a/x/profiles/keeper/grpc_query.go +++ b/x/profiles/keeper/grpc_query.go @@ -84,7 +84,7 @@ func (k Keeper) IncomingDTagTransferRequests(ctx context.Context, request *types return &types.QueryIncomingDTagTransferRequestsResponse{Requests: requests, Pagination: pageRes}, nil } -// UserRelationships implements the Query/UserRelationships gRPC method +// Relationships implements the Query/Relationships gRPC method func (k Keeper) Relationships(ctx context.Context, request *types.QueryRelationshipsRequest) (*types.QueryRelationshipsResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var relationships []types.Relationship @@ -111,7 +111,7 @@ func (k Keeper) Relationships(ctx context.Context, request *types.QueryRelations return &types.QueryRelationshipsResponse{Relationships: relationships, Pagination: pageRes}, nil } -// Blocks implements the Query/UserBlocks gRPC method +// Blocks implements the Query/Blocks gRPC method func (k Keeper) Blocks(ctx context.Context, request *types.QueryBlocksRequest) (*types.QueryBlocksResponse, error) { sdkCtx := sdk.UnwrapSDKContext(ctx) var userblocks []types.UserBlock From dd3c001de7450090368097bb39ba6dc5569de8e8 Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:38:20 +0800 Subject: [PATCH 11/20] Update docs --- docs/developers/queries/profiles/application-links.md | 11 +++++++++++ .../queries/profiles/{user-blocks.md => blocks.md} | 2 +- docs/developers/queries/profiles/chain-links.md | 11 +++++++++++ ...ser-dtag-requests.md => incoming-dtag-requests.md} | 2 +- .../{user-relationships.md => relationships.md} | 2 +- docs/developers/query-data.md | 8 +++++--- 6 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 docs/developers/queries/profiles/application-links.md rename docs/developers/queries/profiles/{user-blocks.md => blocks.md} (90%) create mode 100644 docs/developers/queries/profiles/chain-links.md rename docs/developers/queries/profiles/{user-dtag-requests.md => incoming-dtag-requests.md} (91%) rename docs/developers/queries/profiles/{user-relationships.md => relationships.md} (90%) diff --git a/docs/developers/queries/profiles/application-links.md b/docs/developers/queries/profiles/application-links.md new file mode 100644 index 0000000000..3d037883e3 --- /dev/null +++ b/docs/developers/queries/profiles/application-links.md @@ -0,0 +1,11 @@ +## Query application links +This query allows you to retrieve the application links with the optional user `address`. + +**CLI** +```bash +desmos query profiles application-links [[address]] + +# Example +# desmos query application-links +# desmos query application-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-blocks.md b/docs/developers/queries/profiles/blocks.md similarity index 90% rename from docs/developers/queries/profiles/user-blocks.md rename to docs/developers/queries/profiles/blocks.md index 9c94b57b11..74d3a82c2f 100644 --- a/docs/developers/queries/profiles/user-blocks.md +++ b/docs/developers/queries/profiles/blocks.md @@ -1,4 +1,4 @@ -## Query user blocked users +## Query blocked users This query allows you to retrieve the user blocked list with the optional user `address`. **CLI** diff --git a/docs/developers/queries/profiles/chain-links.md b/docs/developers/queries/profiles/chain-links.md new file mode 100644 index 0000000000..323d69f683 --- /dev/null +++ b/docs/developers/queries/profiles/chain-links.md @@ -0,0 +1,11 @@ +## Query chain links +This query allows you to retrieve the chain links with the optional user `address`. + +**CLI** +```bash +desmos query profiles chain-links [[address]] + +# Example +# desmos query chain-links +# desmos query chain-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +``` \ No newline at end of file diff --git a/docs/developers/queries/profiles/user-dtag-requests.md b/docs/developers/queries/profiles/incoming-dtag-requests.md similarity index 91% rename from docs/developers/queries/profiles/user-dtag-requests.md rename to docs/developers/queries/profiles/incoming-dtag-requests.md index 53499806a8..53dac7f829 100644 --- a/docs/developers/queries/profiles/user-dtag-requests.md +++ b/docs/developers/queries/profiles/incoming-dtag-requests.md @@ -1,4 +1,4 @@ -## Query user's DTag requests +## Query incoming DTag requests This query allows you to retrieve the DTag requests with the optional user `address`. **CLI** diff --git a/docs/developers/queries/profiles/user-relationships.md b/docs/developers/queries/profiles/relationships.md similarity index 90% rename from docs/developers/queries/profiles/user-relationships.md rename to docs/developers/queries/profiles/relationships.md index f64ade3b7a..169663eb36 100644 --- a/docs/developers/queries/profiles/user-relationships.md +++ b/docs/developers/queries/profiles/relationships.md @@ -1,4 +1,4 @@ -## Query user relationships +## Query relationships This query allows you to retrieve the relationships with the optional creator `address`. **CLI** diff --git a/docs/developers/query-data.md b/docs/developers/query-data.md index 349147b80d..b2f46935db 100644 --- a/docs/developers/query-data.md +++ b/docs/developers/query-data.md @@ -8,9 +8,11 @@ read the data stored inside it. Here you will find a list of all the query endpo ## Profiles - [Query the stored profiles](queries/profiles/profile.md) -- [Query all the DTag transfer requests](queries/profiles/user-dtag-requests.md) -- [Query user's relationships](queries/profiles/user-relationships.md) -- [Query user's blocked users](queries/profiles/user-blocks.md) +- [Query incoming DTag transfer requests](queries/profiles/incoming-dtag-requests.md) +- [Query relationships](queries/profiles/relationships.md) +- [Query blocked users](queries/profiles/blocks.md) +- [Query chain links](queries/profiles/chain-links.md) +- [Query application links](queries/profiles/application-links.md) ## Posts From 6aa0e233ee01f575f5c098a955350a84d4acdfcc Mon Sep 17 00:00:00 2001 From: Paul Date: Fri, 23 Jul 2021 15:39:39 +0800 Subject: [PATCH 12/20] Fix docs typo --- docs/developers/queries/profiles/application-links.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/developers/queries/profiles/application-links.md b/docs/developers/queries/profiles/application-links.md index 3d037883e3..badde7c3ab 100644 --- a/docs/developers/queries/profiles/application-links.md +++ b/docs/developers/queries/profiles/application-links.md @@ -3,9 +3,9 @@ This query allows you to retrieve the application links with the optional user ` **CLI** ```bash -desmos query profiles application-links [[address]] +desmos query profiles app-links [[address]] # Example -# desmos query application-links -# desmos query application-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud +# desmos query app-links +# desmos query app-links desmos13p5pamrljhza3fp4es5m3llgmnde5fzcpq6nud ``` \ No newline at end of file From a51e64b02462c2267575b180b0b73b3a76664be9 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:28:16 +0800 Subject: [PATCH 13/20] Update proto/desmos/profiles/v1beta1/query.proto Co-authored-by: Riccardo Montagnin --- proto/desmos/profiles/v1beta1/query.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index 9b4d9441c4..bf0a8364fe 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -37,9 +37,8 @@ service Query { option (google.api.http).get = "/desmos/profiles/v1beta1/params"; } - // Relationships queries all relationships - // It queries the relationships for the given user if the user address is - // provided + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. rpc Relationships(QueryRelationshipsRequest) returns (QueryRelationshipsResponse) { option (google.api.http).get = From cfe0b5f43ec05b20e7802ec7a5154acf0f5b6cac Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:49:23 +0800 Subject: [PATCH 14/20] Update proto/desmos/profiles/v1beta1/query.proto Co-authored-by: Riccardo Montagnin --- proto/desmos/profiles/v1beta1/query.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index bf0a8364fe..e1101dfc85 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -45,8 +45,8 @@ service Query { "/desmos/relationships/v1beta1/relationships/{user}"; } - // Blocks queries all blocks - // It queries the blocks for the given user if the user address is provided + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. rpc Blocks(QueryBlocksRequest) returns (QueryBlocksResponse) { option (google.api.http).get = "/desmos/relationships/v1beta1/blocks/{user}"; From d7b4bdb6803157ee1cbeaf96594d4ea439d7ea20 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:49:29 +0800 Subject: [PATCH 15/20] Update proto/desmos/profiles/v1beta1/query.proto Co-authored-by: Riccardo Montagnin --- proto/desmos/profiles/v1beta1/query.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index e1101dfc85..159c6ecb0f 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -52,9 +52,8 @@ service Query { "/desmos/relationships/v1beta1/blocks/{user}"; } - // ChainLinks queries all chain links - // It queries the chain links for the given user if the user address is - // provided + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. rpc ChainLinks(QueryChainLinksRequest) returns (QueryChainLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/chain-links/{user}"; From f7ac18fc344fe095e3f205a217ac35dde340c910 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:51:26 +0800 Subject: [PATCH 16/20] Update proto/desmos/profiles/v1beta1/query.proto Co-authored-by: Riccardo Montagnin --- proto/desmos/profiles/v1beta1/query.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/desmos/profiles/v1beta1/query.proto b/proto/desmos/profiles/v1beta1/query.proto index 159c6ecb0f..9467d6e776 100644 --- a/proto/desmos/profiles/v1beta1/query.proto +++ b/proto/desmos/profiles/v1beta1/query.proto @@ -67,9 +67,8 @@ service Query { "/desmos/profiles/v1beta1/chain-links/{user}/{chain_name}/{target}"; } - // ApplicationLinks queries all application links - // It queries the applications links for the given user if the user address is - // provided + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. rpc ApplicationLinks(QueryApplicationLinksRequest) returns (QueryApplicationLinksResponse) { option (google.api.http).get = "/desmos/profiles/v1beta1/app-links/{user}"; From f51f2521f6f48f8277597b1618946269f45535ca Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:51:48 +0800 Subject: [PATCH 17/20] Update x/profiles/client/cli/cli_app_links.go Co-authored-by: Riccardo Montagnin --- x/profiles/client/cli/cli_app_links.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/profiles/client/cli/cli_app_links.go b/x/profiles/client/cli/cli_app_links.go index 5a8aae35e7..2d19a18c3e 100644 --- a/x/profiles/client/cli/cli_app_links.go +++ b/x/profiles/client/cli/cli_app_links.go @@ -136,7 +136,7 @@ func GetCmdUnlinkApplication() *cobra.Command { // ------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryApplicationsLinks returns the command allowing to query the application links associated with optional profile +// GetCmdQueryApplicationsLinks returns the command allowing to query the application links, optionally associated with a user func GetCmdQueryApplicationsLinks() *cobra.Command { cmd := &cobra.Command{ Use: "app-links [[user]]", From d690329b2c1c9235d48046ac8fa4f0461339538c Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:51:59 +0800 Subject: [PATCH 18/20] Update x/profiles/client/cli/cli_chain_links.go Co-authored-by: Riccardo Montagnin --- x/profiles/client/cli/cli_chain_links.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/profiles/client/cli/cli_chain_links.go b/x/profiles/client/cli/cli_chain_links.go index 6f15c18aec..a294ceca6c 100644 --- a/x/profiles/client/cli/cli_chain_links.go +++ b/x/profiles/client/cli/cli_chain_links.go @@ -109,7 +109,7 @@ func GetCmdUnlinkChainAccount() *cobra.Command { // -------------------------------------------------------------------------------------------------------------------- -// GetCmdQueryChainLinks returns the command allowing to query the chain links associated with optional profile +// GetCmdQueryChainLinks returns the command allowing to query the chain links, optionally associated with a user func GetCmdQueryChainLinks() *cobra.Command { cmd := &cobra.Command{ Use: "chain-links [[address]]", From 9f62c6c2b0d8578c0bf2c37bba983e88d9a0ecf7 Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 14:54:39 +0800 Subject: [PATCH 19/20] Generate proto --- x/profiles/types/query.pb.go | 38 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/x/profiles/types/query.pb.go b/x/profiles/types/query.pb.go index 5a0d4425f3..f74024d3a1 100644 --- a/x/profiles/types/query.pb.go +++ b/x/profiles/types/query.pb.go @@ -104,23 +104,20 @@ type QueryClient interface { IncomingDTagTransferRequests(ctx context.Context, in *QueryIncomingDTagTransferRequestsRequest, opts ...grpc.CallOption) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // Relationships queries all relationships - // It queries the relationships for the given user if the user address is - // provided + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. Relationships(ctx context.Context, in *QueryRelationshipsRequest, opts ...grpc.CallOption) (*QueryRelationshipsResponse, error) - // Blocks queries all blocks - // It queries the blocks for the given user if the user address is provided + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. Blocks(ctx context.Context, in *QueryBlocksRequest, opts ...grpc.CallOption) (*QueryBlocksResponse, error) - // ChainLinks queries all chain links - // It queries the chain links for the given user if the user address is - // provided + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. ChainLinks(ctx context.Context, in *QueryChainLinksRequest, opts ...grpc.CallOption) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(ctx context.Context, in *QueryUserChainLinkRequest, opts ...grpc.CallOption) (*QueryUserChainLinkResponse, error) - // ApplicationLinks queries all application links - // It queries the applications links for the given user if the user address is - // provided + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. ApplicationLinks(ctx context.Context, in *QueryApplicationLinksRequest, opts ...grpc.CallOption) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username @@ -239,23 +236,20 @@ type QueryServer interface { IncomingDTagTransferRequests(context.Context, *QueryIncomingDTagTransferRequestsRequest) (*QueryIncomingDTagTransferRequestsResponse, error) // Params queries the profiles module params Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) - // Relationships queries all relationships - // It queries the relationships for the given user if the user address is - // provided + // Relationships queries all relationships for the given user, if provided. + // Otherwise, it queries all the relationships stored. Relationships(context.Context, *QueryRelationshipsRequest) (*QueryRelationshipsResponse, error) - // Blocks queries all blocks - // It queries the blocks for the given user if the user address is provided + // Blocks queries the blocks for the given user, if provided. + // Otherwise, it queries all the stored blocks. Blocks(context.Context, *QueryBlocksRequest) (*QueryBlocksResponse, error) - // ChainLinks queries all chain links - // It queries the chain links for the given user if the user address is - // provided + // ChainLinks queries the chain links associated to the given user, if provided. + // Otherwise it queries all the chain links stored. ChainLinks(context.Context, *QueryChainLinksRequest) (*QueryChainLinksResponse, error) // UserChainLink queries the chain link for the given user, chain name and // target address UserChainLink(context.Context, *QueryUserChainLinkRequest) (*QueryUserChainLinkResponse, error) - // ApplicationLinks queries all application links - // It queries the applications links for the given user if the user address is - // provided + // ApplicationLinks queries the applications links associated to the given user, if provided. + // Otherwise, it queries all the application links stored. ApplicationLinks(context.Context, *QueryApplicationLinksRequest) (*QueryApplicationLinksResponse, error) // UserApplicationLinks queries a single application link for a given user, // searching via the application name and username From 2b4a15bb2bca40ec52180d040b5bfa13982d690e Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 27 Jul 2021 15:02:04 +0800 Subject: [PATCH 20/20] Add changeset entry --- .changeset/entries/2021-07-27T07:01:46Z.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/entries/2021-07-27T07:01:46Z.yaml diff --git a/.changeset/entries/2021-07-27T07:01:46Z.yaml b/.changeset/entries/2021-07-27T07:01:46Z.yaml new file mode 100644 index 0000000000..081471df50 --- /dev/null +++ b/.changeset/entries/2021-07-27T07:01:46Z.yaml @@ -0,0 +1,5 @@ +type: changed +module: x/profiles +pull_request: 539 +description: Made profiles query user parameter optional +backward_compatible: true