Skip to content

Commit

Permalink
Fix grant cli (#1792) (#1794)
Browse files Browse the repository at this point in the history
(cherry picked from commit 64b8074)

Co-authored-by: pinosu <95283998+pinosu@users.noreply.github.com>
mergify[bot] and pinosu authored Jan 24, 2024
1 parent 9fbf74f commit 53d9d1c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/wasm/client/cli/tx.go
Original file line number Diff line number Diff line change
@@ -431,15 +431,15 @@ func GrantCmd() *cobra.Command {

func GrantAuthorizationCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "contract [message_type=\"execution\"|\"migration\"] [grantee] [contract_addr_bech32] --allow-raw-msgs [msg1,msg2,...] --allow-msg-keys [key1,key2,...] --allow-all-messages",
Use: "contract [grantee] [message_type=\"execution\"|\"migration\"] [contract_addr_bech32] --allow-raw-msgs [msg1,msg2,...] --allow-msg-keys [key1,key2,...] --allow-all-messages",

Check warning on line 434 in x/wasm/client/cli/tx.go

Codecov / codecov/patch

x/wasm/client/cli/tx.go#L434

Added line #L434 was not covered by tests
Short: "Grant authorization to interact with a contract on behalf of you",
Long: fmt.Sprintf(`Grant authorization to an address.
Examples:
$ %s tx grant contract execution <grantee_addr> <contract_addr> --allow-all-messages --max-calls 1 --no-token-transfer --expiration 1667979596
$ %s tx grant contract <grantee_addr> execution <contract_addr> --allow-all-messages --max-calls 1 --no-token-transfer --expiration 1667979596

Check warning on line 438 in x/wasm/client/cli/tx.go

Codecov / codecov/patch

x/wasm/client/cli/tx.go#L438

Added line #L438 was not covered by tests
$ %s tx grant contract execution <grantee_addr> <contract_addr> --allow-all-messages --max-funds 100000uwasm --expiration 1667979596
$ %s tx grant contract <grantee_addr> execution <contract_addr> --allow-all-messages --max-funds 100000uwasm --expiration 1667979596

Check warning on line 440 in x/wasm/client/cli/tx.go

Codecov / codecov/patch

x/wasm/client/cli/tx.go#L440

Added line #L440 was not covered by tests
$ %s tx grant contract execution <grantee_addr> <contract_addr> --allow-all-messages --max-calls 5 --max-funds 100000uwasm --expiration 1667979596
$ %s tx grant contract <grantee_addr> execution <contract_addr> --allow-all-messages --max-calls 5 --max-funds 100000uwasm --expiration 1667979596

Check warning on line 442 in x/wasm/client/cli/tx.go

Codecov / codecov/patch

x/wasm/client/cli/tx.go#L442

Added line #L442 was not covered by tests
`, version.AppName, version.AppName, version.AppName),
Args: cobra.ExactArgs(3),
RunE: func(cmd *cobra.Command, args []string) error {

0 comments on commit 53d9d1c

Please sign in to comment.