-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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(cli): add --append
flag to sign-batch
cli cmd
#13147
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #13147 +/- ##
==========================================
- Coverage 55.87% 54.37% -1.51%
==========================================
Files 646 645 -1
Lines 54895 54924 +29
==========================================
- Hits 30675 29863 -812
- Misses 21762 22663 +901
+ Partials 2458 2398 -60
|
How is this different from |
x/auth/client/cli/tx_multisign.go
Outdated
txBuilder.SetMemo(fe.GetTx().GetMemo()) | ||
txBuilder.SetTip(fe.GetTx().GetTip()) | ||
txBuilder.SetGasLimit(fe.GetTx().GetGas()) |
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.
We're doing this in a loop, so aren't we overriding these fields, for each tx?
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.
Now I am adding memo, remaining fields to tx from cmd.Flags
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.
good to add tests as well
Oh seems like it is. @gsk967 can we merge this solution with sign-batch to accept multiple tx files. How does that sound @alexanderbez . I like some refactoring in this pr tbh |
Yeah, sure! |
How about we add a flag |
How would that work? Say we have a new flag, e.g. |
So sign-batch expects a file to have multiple unsigned txs seperated by next line. The command flow would look something like this
|
Makes sense. But I would have all txs use the new flag so make the UX easier. If the flag is present and the file is empty, then just populate the empty file 👍 |
I think we don't need any flag to be introduced here, since we have
The following lines will do the same as above mentioned lines by @sahith-narahari .
We can just update the documentation. cc: @anilcse , @alexanderbez |
Oh right, we can close the issue in this case then |
@atheeshp I don't understand how directing output will work though? The |
@atheeshp @alexanderbez @AmauryM @anilcse Added |
return err | ||
} | ||
if ms == "" { | ||
from, _ := cmd.Flags().GetString(flags.FlagFrom) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack.
txBuilder, err := txCfg.WrapTxBuilder(unsignedStdTx) | ||
if err != nil { | ||
return err | ||
appendMessagesToSingleMsg, _ := cmd.Flags().GetBool(flagAppend) |
Check warning
Code scanning / gosec
Returned error is not propagated up the stack.
} | ||
// set the new appened msgs into builder | ||
txBuilder.SetMsgs(msgs...) |
Check warning
Code scanning / gosec
Errors unhandled.
Amazing! @julienrbrt or @facundomedica would be willing to help test this feature with me please? |
I can check tomorrow morning :) |
multi-msg-sign
--append
flag to sign-batch
cli cmd
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.
tACK
Tested and works, but if there is documentation to update, we should do it in this PR. |
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.
Lgtm
There are definitely CLI docs that we can look to update. Doesn't have to be super in depth, but maybe just a note in a CLI doc? |
Looking at the auth docs, there is actually no documentation for any |
Description
Added
--append
flags tosign-batch
cli cmd, this will combine the messages which are generated from--generate-only
and it will generate single transactionref: #13066
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...
!
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