Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: allow to set initial members during user group creation #974

Merged
merged 5 commits into from
Jul 25, 2022

Conversation

RiccardoM
Copy link
Contributor

@RiccardoM RiccardoM commented Jul 22, 2022

Description

This PR adds the initial_members field to MsgCreateUserGroup to allow users to specify the initial set of users that should be included into the group when creating it. This is particularly useful to clients to reduce the number of transactions to be done when creating a user group.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • followed the guidelines for building modules
  • included the necessary unit and integration tests
  • added a changelog entry to CHANGELOG.md
  • included comments for documenting Go code
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@github-actions github-actions bot added x/CLI x/subspaces Issue on the x/subspaces module labels Jul 22, 2022
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@RiccardoM RiccardoM changed the title feat: allow to set initial members during user group creation feat!: allow to set initial members during user group creation Jul 22, 2022
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@github-actions github-actions bot added the kind/build Related to the build of the project label Jul 22, 2022
Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
@github-actions github-actions bot added x/profiles Module that allows to create and manage decentralized social profiles x/relationships labels Jul 22, 2022
@@ -377,7 +377,7 @@ GOGO_PROTO_TYPES = third_party/proto/gogoproto
COSMOS_TYPES = third_party/proto/cosmos
COSMOS_PROTO_TYPES = third_party/proto/cosmos_proto
CONFIO_TYPES = third_party/proto/confio
EVMOS_TYPES = third_party/proto/evmos
ETHERMINT_TYPES = third_party/proto/ethermint
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes in this file are to fix Protobuf lint errors

@@ -11,7 +11,7 @@ slug: messages
A post can be created using the `MsgCreatePost`.

```js reference
https://github.com/desmos-labs/desmos/blob/v4.1.0/proto/desmos/posts/v2/msgs.proto#L36-L89
https://github.com/desmos-labs/desmos/blob/master/proto/desmos/posts/v2/msgs.proto#L36-L89
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated all the specs to refer to the master branch instead of the v4.1.0 tag, since there might have been some changes inside that branch since the last release (like in this case). It's also always better to reference the master branch instead of a version, since these specs will leave inside the master branch itself. We can always change the referenced blob when we publish the docs anyway

@@ -97,7 +97,7 @@ It's is expected to fail if:
A user group can be created using the `MsgCreateUserGroup`.

```js reference
https://github.com/desmos-labs/desmos/blob/v4.1.0/proto/desmos/subspaces/v2/msgs.proto#L235-L261
https://github.com/desmos-labs/desmos/blob/master/proto/desmos/subspaces/v3/msgs.proto#L235-L265
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The line changes here are to reflect the additional of the new parameter

@RiccardoM RiccardoM requested review from leobragaz and dadamu and removed request for leobragaz July 22, 2022 07:04
@RiccardoM RiccardoM marked this pull request as ready for review July 22, 2022 07:05
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #974 (58d4b5c) into master (a4a3952) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #974      +/-   ##
==========================================
+ Coverage   80.49%   80.51%   +0.02%     
==========================================
  Files         172      172              
  Lines       15223    15243      +20     
==========================================
+ Hits        12253    12273      +20     
  Misses       2442     2442              
  Partials      528      528              
Impacted Files Coverage Δ
x/subspaces/keeper/msg_server.go 88.83% <100.00%> (+0.25%) ⬆️
x/subspaces/types/msgs.go 98.32% <100.00%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4a3952...58d4b5c. Read the comment docs.

@RiccardoM RiccardoM added the automerge Automatically merge PR once all prerequisites pass label Jul 24, 2022
Copy link
Contributor

@dadamu dadamu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@RiccardoM RiccardoM merged commit ffd6e13 into master Jul 25, 2022
@RiccardoM RiccardoM deleted the riccardom/allow-setting-initial-group-members branch July 25, 2022 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Automatically merge PR once all prerequisites pass kind/build Related to the build of the project x/CLI x/profiles Module that allows to create and manage decentralized social profiles x/relationships x/subspaces Issue on the x/subspaces module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants