-
Notifications
You must be signed in to change notification settings - Fork 66
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
Add events #19
Add events #19
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.
Nice addition. I had one question.
flow/result.go
Outdated
for _, blockEvent := range events { | ||
fmt.Printf("Events for Block %s:", blockEvent.BlockID) | ||
for i, blockEvent := range events { | ||
fmt.Printf("Events for Block %s (%d):", blockEvent.BlockID, startHeight+uint64(i)) |
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.
What does the number in parenthesis represent?
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.
it's the height of the block. better to label?
Example usage:
|
Could you add a events help indication that shows the correct format of an event definition in case people don't know to use |
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.
Looks good!
flow/events/get/get.go
Outdated
var conf Config | ||
|
||
var Cmd = &cobra.Command{ | ||
Use: "get <event_name> <block_height_range_start> <optional:block_height_range_end|latest>", |
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.
Maybe use "type ID" instead of "name", as someone might assume it's possible to just specify e.g AccountCreated
.
Also, maybe make it clearer that latest
here is a literal, not a variable like block_height_range_start
and block_height_range_end
Use: "get <event_name> <block_height_range_start> <optional:block_height_range_end|latest>", | |
Use: "get <event_type_id> <block_height_range_start> <optional:block_height_range_end|'latest'>", |
@Kay-Zee Maybe add your example as |
Closes #18
Description
Adds new
events
sub command thatFor contributor use:
master
branchFiles changed
in the Github PR explorer