-
Notifications
You must be signed in to change notification settings - Fork 46
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 command generating chain link file #583
Conversation
Codecov Report
@@ Coverage Diff @@
## master #583 +/- ##
==========================================
+ Coverage 75.59% 82.62% +7.02%
==========================================
Files 94 92 -2
Lines 4519 5524 +1005
==========================================
+ Hits 3416 4564 +1148
+ Misses 960 748 -212
- Partials 143 212 +69
Continue to review full report at Codecov.
|
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.
As we discussed it should be useful to have the possibility to create json also for other chains.
// create chain link json | ||
cdc, _ := app.MakeCodecs() | ||
chainLinkJSON := profilescliutils.NewChainLinkJSON( | ||
types.NewBech32Address(addr, app.Bech32MainPrefix), |
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 like prefix
is never used, do you meant to use it here maybe?
chainLinkJSON := profilescliutils.NewChainLinkJSON( | ||
types.NewBech32Address(addr, app.Bech32MainPrefix), | ||
types.NewProof(pubkey, hex.EncodeToString(sig), addr), | ||
types.NewChainConfig(app.Bech32MainPrefix), |
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.
as above
To be honest I'm not a very big fun of this approach cause it requires the account to be already present inside the keystore in order to be used. What I think it's better is to have a UX that acts like the following:
For the interactive prompt you can use something like promptui |
…rate-chainlink-file-cmd
…rate-chainlink-file-cmd
3719208
to
38d0117
Compare
Updated to apply interactive prompt to create chain link file. |
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 think that it would be a better UX to not use the --filename
flag and, instead, print the result to the command output. This would allow the user to simply print it to any file they want using the >
redirection.
Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com>
…labs/desmos into paul/generate-chainlink-file-cmd
@RiccardoM The '>' interrupt the interactive prompt. With it, the user can't input the info. I guess we can add filename into prompt as well. |
Yeah I think it's better to ask the user where to store the file using the prompt in this case, specifying it must be a fully qualified path. Just to avoid having them remember to also use a flag, it's better to keep the UX consistent for all the things |
* Version 0.17.3 Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Update CHANGELOG.md * Added the on-chain upgrade handler Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated Cosmos SDK to fix --dry-run Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Version 0.17.6 - Updated Cosmos to v0.42.8 - Added the upgrade handler for the upcoming on-chain upgrade Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated Cosmos SDK to fix the capability issue Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated CHANGELOG Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Removed useless replace from within go.mod Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Release workflow update Fixed tags not being fetched correctly * Improve pagination See PR #544 (cherry picked from commit b066424) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Require chain name to be lowercase See PR #153 (cherry picked from commit 66e0c98) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Improved profile validation performance See PR #557 (cherry picked from commit be23505) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Added command to generate chain link JSON See PR #583 (cherry picked from commit cddb501) * Changed Ledger app name to Desmos See PR #590 (cherry picked from commit 91b21f7) * Updated CHANGELOG * Removed app migration support * Removed unused Proto file * Version 1.0.1 * fix: flag indicator in profile save example * add: flag indicator in example * Added changeset entry Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> (cherry picked from commit b40144b) * Version 1.0.2 Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> Co-authored-by: Paul <p22626262@gmail.com> Co-authored-by: Leonardo Bragagnolo <leo.braga95@gmail.com> Co-authored-by: Wingman L <42913823+ryuash@users.noreply.github.com>
* Version 0.17.3 Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Update CHANGELOG.md * Added the on-chain upgrade handler Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated Cosmos SDK to fix --dry-run Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Version 0.17.6 - Updated Cosmos to v0.42.8 - Added the upgrade handler for the upcoming on-chain upgrade Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated Cosmos SDK to fix the capability issue Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Updated CHANGELOG Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Removed useless replace from within go.mod Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Release workflow update Fixed tags not being fetched correctly * Improve pagination See PR #544 (cherry picked from commit b066424) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Require chain name to be lowercase See PR #153 (cherry picked from commit 66e0c98) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Improved profile validation performance See PR #557 (cherry picked from commit be23505) Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * Added command to generate chain link JSON See PR #583 (cherry picked from commit cddb501) * Changed Ledger app name to Desmos See PR #590 (cherry picked from commit 91b21f7) * Updated CHANGELOG * Removed app migration support * Removed unused Proto file * Version 1.0.1 * fix: flag indicator in profile save example * add: flag indicator in example * Added changeset entry Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> Co-authored-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> (cherry picked from commit b40144b) * Version 1.0.2 Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> * fix: added missing \ in profile save command example (#602) (cherry picked from commit 3a73c95) * Version v1.0.3 Signed-off-by: Riccardo Montagnin <riccardo.montagnin@gmail.com> Co-authored-by: Paul <p22626262@gmail.com> Co-authored-by: Leonardo Bragagnolo <leo.braga95@gmail.com> Co-authored-by: Wingman L <42913823+ryuash@users.noreply.github.com>
Description
It is the implementation of #572, it add the command generating chain link file for creating chain link.
Closes #572.
Checklist
CHANGELOG.md
file.Files changed
in the Github PR explorer.