-
Notifications
You must be signed in to change notification settings - Fork 2
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
cmd/paratime/show: Add show events command #333
Merged
+180
−15
Merged
Changes from all commits
Commits
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
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 @@ | ||
oasis paratime show events --round 9399871 --format json |
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,80 @@ | ||
[ | ||
{ | ||
"code": 1, | ||
"data": "gaNidG9VAGIz3RCYb9ltIk8706by6j2XkXGmZGZyb21VAJZQKbOBY+XnA5YUaDhZkNc3y+nsZmFtb3VudIJHCxBZMMJwAEA=", | ||
"module": "accounts", | ||
"parsed": [ | ||
{ | ||
"Transfer": { | ||
"from": "oasis1qzt9q2dns937tecrjc2xswzejrtn0jlfas40j7sz", | ||
"to": "oasis1qp3r8hgsnphajmfzfuaa8fhjag7e0yt35cjxq0u4", | ||
"amount": { | ||
"Amount": "3114200000000000", | ||
"Denomination": "" | ||
} | ||
}, | ||
"Burn": null, | ||
"Mint": null | ||
} | ||
], | ||
"tx_hash": "c586f05e2103adb953d2287ef22dad0532540bd02481184b5477ba8c38894e62" | ||
}, | ||
{ | ||
"code": 1, | ||
"data": "gqNidG9VAIyCi8jiQIOmvod+yJYxN0GhktyEZGZyb21VACg9qHdJLY0x3unzFR/SHF3dLD+oZmFtb3VudIJIAWNFeMTiZV9Ao2J0b1UAYjPdEJhv2W0iTzvTpvLqPZeRcaZkZnJvbVUAKD2od0ktjTHe6fMVH9IcXd0sP6hmYW1vdW50gkcH3eTk7RgAQA==", | ||
"module": "accounts", | ||
"parsed": [ | ||
{ | ||
"Transfer": { | ||
"from": "oasis1qq5rm2rhfykc6vw7a8e3287jr3wa6tpl4qv49gzh", | ||
"to": "oasis1qzxg9z7gufqg8f47salv3933xaq6rykusslsq4k7", | ||
"amount": { | ||
"Amount": "100000001733846367", | ||
"Denomination": "" | ||
} | ||
}, | ||
"Burn": null, | ||
"Mint": null | ||
}, | ||
{ | ||
"Transfer": { | ||
"from": "oasis1qq5rm2rhfykc6vw7a8e3287jr3wa6tpl4qv49gzh", | ||
"to": "oasis1qp3r8hgsnphajmfzfuaa8fhjag7e0yt35cjxq0u4", | ||
"amount": { | ||
"Amount": "2214300000000000", | ||
"Denomination": "" | ||
} | ||
}, | ||
"Burn": null, | ||
"Mint": null | ||
} | ||
], | ||
"tx_hash": "de7e52e94f4614ec0b0de47971abc12d5070278e9401c2466ec5664a71bdc57d" | ||
}, | ||
{ | ||
"code": 1, | ||
"data": "gaFmYW1vdW50GXmm", | ||
"module": "core", | ||
"parsed": [ | ||
{ | ||
"GasUsed": { | ||
"amount": 31142 | ||
} | ||
} | ||
], | ||
"tx_hash": "c586f05e2103adb953d2287ef22dad0532540bd02481184b5477ba8c38894e62" | ||
}, | ||
{ | ||
"code": 1, | ||
"data": "gaFmYW1vdW50GVZ/", | ||
"module": "core", | ||
"parsed": [ | ||
{ | ||
"GasUsed": { | ||
"amount": 22143 | ||
} | ||
} | ||
], | ||
"tx_hash": "de7e52e94f4614ec0b0de47971abc12d5070278e9401c2466ec5664a71bdc57d" | ||
} | ||
] |
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.
These commands are currently inconsistent regarding the
round
argument.paratime show parameters
uses--round
flag, whileparatme show <round>
usesround
as a positional argument.show events
is consistent withshow parameters
since that was the easiest to implement. But this should probably be cleaned up (in a followup).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.
Initially it was not meant to show other things, so if we now have parameters and events, we should maybe also have
show block
or similar.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.
The initial idea was to resemble
oasis network show
. So try to autodetect what user wanted with as little typing as possible and then offer more explicit variants, if needed.Some alternative ideas:
show <round> --events
show events:<round>
show <round>:events
show <round>
, also pass--format json
and let user filter them withjq
IMO the current implementation makes the most sense.
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'll merge it as is for now.