Conversation
client/utils/utils.go
Outdated
| } | ||
|
|
||
| // MessageOutput respects CLI flags and outputs a message | ||
| func MessageOutput(cliCtx context.CLIContext, txBldr authtxb.TxBuilder, msgs []sdk.Msg, offline bool) error { |
There was a problem hiding this comment.
I reckon MessageOutput is a misnomer as it does not describe this function's main purpose. What this function does is actually executing the transaction according to the flags set in the context. As a side effect, it prints the response.
There was a problem hiding this comment.
What would you like this to be called?
There was a problem hiding this comment.
HandleTxExecResponse? Dunno, it's a tricky one, though we'd better get it right now.
CC'ing @cwgoes @alexanderbez
There was a problem hiding this comment.
going to go with GenerateOrBroadcastMsgs per discussions with @alessio and @alexanderbez
Codecov Report
@@ Coverage Diff @@
## develop #3503 +/- ##
===========================================
- Coverage 52.99% 52.56% -0.44%
===========================================
Files 142 142
Lines 10363 10391 +28
===========================================
- Hits 5492 5462 -30
- Misses 4548 4600 +52
- Partials 323 329 +6 |
e692be7 to
fb1c9bf
Compare
| Read a transaction from [file_path] and broadcast it to a node. If you supply a dash (-) argument | ||
| in place of an input filename, the command reads from standard input. | ||
|
|
||
| $ gaiacli tx broadcast ./mytxn.json |
There was a problem hiding this comment.
I'd prepend with Example or e.g. here.
| Short: "Query distribution validator commission", | ||
| Long: strings.TrimSpace(`Query validator commission rewards from delegators to that validator: | ||
|
|
||
| $ gaiacli query distr commission cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj |
| Short: "Query distribution validator slashes", | ||
| Long: strings.TrimSpace(`Query all slashes of a validator for a given block range: | ||
|
|
||
| $ gaiacli query distr slashes cosmosvaloper1gghjut3ccd8ay0zduzj64hwre2fxs9ldmqhffj 0 100 |
| Short: "Query all distribution delegator rewards or rewards from a particular validator", | ||
| Long: strings.TrimSpace(`Query all rewards earned by a delegator, optionally restrict to rewards from a single validator: | ||
|
|
||
| $ gaiacli query distr rewards cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p |
| var ( | ||
| flagOnlyFromValidator = "only-from-validator" | ||
| flagIsValidator = "is-validator" | ||
| flagComission = "comission" |
| Args: cobra.NoArgs, | ||
| Long: strings.TrimSpace(`Withdraw all rewards for a single delegator: | ||
|
|
||
| $ gaiacli tx distr withdraw-all-rewards --from mykey |
| Args: cobra.ExactArgs(1), | ||
| Long: strings.TrimSpace(`Set the withdraw address for rewards assoicated with a delegator address: | ||
|
|
||
| $ gaiacli tx set-withdraw-addr cosmos1gghjut3ccd8ay0zduzj64hwre2fxs9ld75ru9p --from mykey |
cc @alessio and @alexanderbez
docs/)PENDING.mdwith issue #Files changedin the github PR explorerFor Admin Use: