-
Notifications
You must be signed in to change notification settings - Fork 48
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: ADR-016: Reactions module #898
Merged
Merged
Changes from 49 commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
beb6468
added x/reactions types
RiccardoM 12bb641
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM d1df146
updated ADR
RiccardoM e3087c4
added the query types
RiccardoM e6b8fe2
started to implement the keeper methods
RiccardoM 5a4110e
added MsgEditRegisteredReaction
RiccardoM 90205bf
added keeper tests and improved messages and reactions
RiccardoM 67a39ce
added external hooks tests
RiccardoM 24993d4
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM 5338e44
added keeper genesis and improved hooks
RiccardoM a2e9df1
added gRPC query methods implementation
RiccardoM fefc091
added gRPC server tests
RiccardoM 4df886a
added the invariants
RiccardoM d3524e8
added migrations
RiccardoM da76992
added the msg server implementation
RiccardoM 1e7a83d
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM f4cf872
updated permissions with latest changes
RiccardoM 7fd784c
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM 84b6944
fixed tests
RiccardoM 0fb36f8
added profile requirement for MsgAddReaction
RiccardoM 9185107
added MsgServer tests
RiccardoM 23c72bb
added the reactions module to app.go
RiccardoM 47c282b
added the simulation operations
RiccardoM fe2b9cf
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM 3b4362a
fixed tests
RiccardoM 2bbe74b
fixed simulation tests
RiccardoM ab37ac9
started adding the CLI commands
RiccardoM 9cb96b6
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM 634f880
reverted reports changes
RiccardoM dd2ee2a
completed CLI command implementation
RiccardoM 9994480
added CLI tests
RiccardoM d83d326
fixed proto lint
RiccardoM 95bc190
added changeset entry
RiccardoM c1109a7
added norace build tags to CLI tests
RiccardoM 3c57a47
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM a7c8b5f
reverted changes
RiccardoM 3b0bab6
Update proto/desmos/reactions/v1/genesis.proto
RiccardoM 501d1d5
Update x/reactions/client/cli/tx.go
RiccardoM edbb5b1
Update x/reactions/client/cli/tx.go
RiccardoM aab0f90
Update x/reactions/keeper/msg_server.go
RiccardoM 2781304
Update x/reactions/keeper/msg_server.go
RiccardoM 85397cd
Update x/reactions/keeper/reactions_test.go
RiccardoM 7381d2f
Update x/reactions/types/genesis.go
RiccardoM 8fc8672
Update x/reactions/client/cli/tx.go
RiccardoM 54bc3ca
Update x/reactions/client/cli/tx.go
RiccardoM 98008da
Update x/reactions/client/cli/tx.go
RiccardoM 82b3dc2
Update x/reactions/keeper/external_hooks.go
RiccardoM 7951e32
Merge branch 'master' of github.com:desmos-labs/desmos into riccardo/…
RiccardoM 0055062
updated Proto files
RiccardoM 3c563bc
added the ability to filter post reactions for a given user
RiccardoM c017e72
improved the CLI commands descriptions
RiccardoM 20517d4
fixed building errors and CLI tests
RiccardoM 84ae572
added CLI commands to reactions module
RiccardoM 7bcef1b
Merge branch 'master' into riccardo/adr-016-reactions-module
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
.changeset/entries/4bd081c55da7be1780b42ddcfcb31ea39143a2223f69ef97e44c347d2528f1c7.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
type: feat | ||
module: x/reactions | ||
pull_request: 898 | ||
description: Added the new x/reactions module | ||
backward_compatible: true | ||
date: 2022-06-10T09:58:20.626124304Z |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
package desmos.reactions.v1.client; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/any.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
import "desmos/reactions/v1/models.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/reactions/client/utils"; | ||
|
||
// SetReactionsParamsJSON contains the data that can be specified when setting a | ||
// subspace reactions params using the CLI command | ||
message SetReactionsParamsJSON { | ||
// Params related to RegisteredReactionValue reactions | ||
RegisteredReactionValueParams registered_reaction_params = 1 | ||
[ (gogoproto.nullable) = false ]; | ||
|
||
// Params related to FreeTextValue reactions | ||
FreeTextValueParams free_text_params = 2 [ (gogoproto.nullable) = false ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
syntax = "proto3"; | ||
package desmos.reactions.v1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/any.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
|
||
import "desmos/reactions/v1/models.proto"; | ||
|
||
option go_package = "github.com/desmos-labs/desmos/v3/x/reactions/types"; | ||
|
||
// GenesisState contains the data of the genesis state for the reactions module | ||
message GenesisState { | ||
option (gogoproto.equal) = true; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
repeated SubspaceDataEntry subspaces_data = 1 | ||
[ (gogoproto.nullable) = false ]; | ||
repeated RegisteredReaction registered_reactions = 2 | ||
[ (gogoproto.nullable) = false ]; | ||
repeated PostDataEntry posts_data = 3 [ (gogoproto.nullable) = false ]; | ||
repeated Reaction reactions = 4 [ (gogoproto.nullable) = false ]; | ||
repeated SubspaceReactionsParams subspaces_params = 5 | ||
[ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
// SubspaceDataEntry contains the data related to a single subspace | ||
message SubspaceDataEntry { | ||
option (gogoproto.equal) = true; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
uint64 subspace_id = 1 [ (gogoproto.customname) = "SubspaceID" ]; | ||
uint32 registered_reaction_id = 2 | ||
[ (gogoproto.customname) = "RegisteredReactionID" ]; | ||
} | ||
|
||
// PostDataEntry contains the data related to a single post | ||
message PostDataEntry { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would rename this as well in |
||
option (gogoproto.equal) = true; | ||
option (gogoproto.goproto_stringer) = true; | ||
|
||
uint64 subspace_id = 1 [ (gogoproto.customname) = "SubspaceID" ]; | ||
uint64 post_id = 2 [ (gogoproto.customname) = "PostID" ]; | ||
uint32 reaction_id = 3 [ (gogoproto.customname) = "ReactionID" ]; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename this in something more meaningful such as
SubspaceRelatedIDs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is going to take a while (changing all names is tedious), can we delay this along with #895? This we can we can change everything in one go to make it similar to other modules as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RiccardoM yes course