-
Notifications
You must be signed in to change notification settings - Fork 5
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
Extract addresses from all transactions and events #39
Conversation
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @keyleu, @miladz68, and @wojtek-coreum)
modules/group/account_parser.go
line 28 at r1 (raw file):
return addresses, nil case *group.MsgSubmitProposal: return []string{msg.GroupPolicyAddress}, nil
if we create a message inside the proposal e.g bank send and it has recipient
Will this tx be displayed on dest address also ? How does this work for authz.Exec ? I guess it will be the same here
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.
Reviewed 1 of 4 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu, @miladz68, and @wojtek-coreum)
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.
Reviewed 4 of 4 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @wojtek-coreum)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @ysv)
modules/group/account_parser.go
line 28 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
if we create a message inside the proposal e.g bank send and it has recipient
Will this tx be displayed on dest address also ? How does this work for authz.Exec ? I guess it will be the same here
Authz is handled by juno: https://github.com/forbole/juno/blob/v5.2.0/modules/messages/account_parser.go#L268
It supports built-in messages, but those created by us are not handled by default. We would have to fork juno and add our messages there or do it inside bdjuno.
Do we want to copy this logic and use it for groups? We might also wait until groups are supported natively, but then again - our custom messages won't be parsed.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @wojtek-coreum)
modules/group/account_parser.go
line 28 at r1 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Authz is handled by juno: https://github.com/forbole/juno/blob/v5.2.0/modules/messages/account_parser.go#L268
It supports built-in messages, but those created by us are not handled by default. We would have to fork juno and add our messages there or do it inside bdjuno.Do we want to copy this logic and use it for groups? We might also wait until groups are supported natively, but then again - our custom messages won't be parsed.
As we agreed on call lets have a single parser for all messages which goes through all events and fetches all address correct in terms of regexp and add them.
By the way as for regexp - maybe we can even improve it and try to use smth like sdk.ParseAccAddress
?
3ede61f
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.
Reviewable status: 2 of 7 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @keyleu, @miladz68, and @ysv)
modules/group/account_parser.go
line 28 at r1 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
As we agreed on call lets have a single parser for all messages which goes through all events and fetches all address correct in terms of regexp and add them.
By the way as for regexp - maybe we can even improve it and try to use smth likesdk.ParseAccAddress
?
Done.
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.
Reviewed 5 of 5 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @wojtek-coreum)
modules/group/handle_msg.go
line 17 at r2 (raw file):
switch cosmosMsg := msg.(type) { case *group.MsgExec,
as far as I understood from our discussion we decided to do this for literally all messges of cosmos sdk
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.
Reviewable status: 2 of 8 files reviewed, 1 unresolved discussion (waiting on @keyleu and @ysv)
modules/group/handle_msg.go
line 17 at r2 (raw file):
Previously, ysv (Yaroslav Savchuk) wrote…
as far as I understood from our discussion we decided to do this for literally all messges of cosmos sdk
Done.
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.
Reviewed 6 of 6 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @keyleu)
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @wojtek-coreum)
modules/group/account_parser.go
line 3 at r3 (raw file):
package group import (
Why do you need the group
and other addresses parsers if you have one which parses everything?
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @dzmitryhil and @keyleu)
modules/group/account_parser.go
line 3 at r3 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Why do you need the
group
and other addresses parsers if you have one which parses everything?
Because events might not covering everything. For example when group is created there is no event enumerating members.
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @keyleu and @wojtek-coreum)
modules/group/account_parser.go
line 3 at r3 (raw file):
Previously, wojtek-coreum (Wojtek) wrote…
Because events might not covering everything. For example when group is created there is no event enumerating members.
Right, that's why we should decode the message to JSON string, and use the same pattern as in events. So we won't need to update the message parsers for new messages 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.
Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @keyleu, @miladz68, and @ysv)
modules/group/account_parser.go
line 3 at r3 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Right, that's why we should decode the message to JSON string, and use the same pattern as in events. So we won't need to update the message parsers for new messages as well.
Done.
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.
Reviewable status: 5 of 9 files reviewed, 1 unresolved discussion (waiting on @keyleu, @miladz68, @wojtek-coreum, and @ysv)
cmd/bdjuno/main.go
line 72 at r4 (raw file):
assetft.MessagesParser, assetnft.MessagesParser, nft.MessagesParser,
Why do you still need those message parsers? Isn't it enough to have just one new?
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.
Reviewable status: 5 of 12 files reviewed, 1 unresolved discussion (waiting on @dzmitryhil, @keyleu, @miladz68, and @ysv)
cmd/bdjuno/main.go
line 72 at r4 (raw file):
Previously, dzmitryhil (Dzmitry Hil) wrote…
Why do you still need those message parsers? Isn't it enough to have just one new?
Done.
…-module # Conflicts: # modules/assetft/account_parser.go # modules/assetnft/account_parser.go
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.
Reviewable status: 5 of 12 files reviewed, all discussions resolved (waiting on @keyleu, @miladz68, and @ysv)
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.
Reviewed 3 of 4 files at r4, 4 of 4 files at r5, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @keyleu and @miladz68)
group
module
This change is