-
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-010: Posts module #847
Conversation
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #847 +/- ##
==========================================
+ Coverage 81.64% 81.76% +0.11%
==========================================
Files 91 110 +19
Lines 7224 9240 +2016
==========================================
+ Hits 5898 7555 +1657
- Misses 1052 1363 +311
- Partials 274 322 +48
Continue to review full report at Codecov.
|
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
…posts-implementation � Conflicts: � app/app.go
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
proto/desmos/posts/v1/models.proto
Outdated
repeated uint32 answers_indexes = 4; | ||
|
||
// Address of the user answering the poll | ||
bytes user = 5 [ (gogoproto.casttype) = |
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.
Why is the type of user is AccAddress
instead of bech32 prefixed string
? Is it to prevent the double vote with the same address via ibc?
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.
Reverted to use a string
instead of a bytes
representation
sdk.NewAttribute(types.AttributeKeySubspaceID, fmt.Sprintf("%d", msg.SubspaceID)), | ||
sdk.NewAttribute(types.AttributeKeyPostID, fmt.Sprintf("%d", post.ID)), | ||
sdk.NewAttribute(types.AttributeKeyAuthor, msg.Author), | ||
sdk.NewAttribute(types.AttributeKeyCreationTime, post.CreationDate.Format(time.RFC3339)), |
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 have a dump question, why timestamp should be indexed?
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.
This is done in order to allow clients to get the creation time from the returned events. Since it is based on the block time, and this is not know to the client, the only way we have to return it to clients (so that they can update the post information locally) is though block events that can later be parsed
Co-authored-by: Paul <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
Co-authored-by: Paul <[email protected]>
Signed-off-by: Riccardo Montagnin <[email protected]>
…nto riccardo/posts-implementation
Signed-off-by: Riccardo Montagnin <[email protected]>
…posts-implementation
Signed-off-by: Riccardo Montagnin <[email protected]>
…nto riccardo/posts-implementation
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.
Ready to go
## Description This PR implements the `x/reports` module as detailed inside [ADR-011](https://github.com/desmos-labs/desmos/blob/master/docs/architecture/adr-011-reports-module.md). Depends-On: #847 --- ### 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... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] provided a link to the relevant issue or specification - [x] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [x] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [x] reviewed "Files changed" and left comments if necessary - [x] 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](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) 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)
Description
This PR implements the
x/posts
module as per ADR-010.Implementation checklist
spec
folderAuthor 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...
!
to the type prefix if API or client breaking changeCHANGELOG.md
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...
!
in the type prefix if API or client breaking change