Skip to content
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

Fix grant cli #1792

Merged
merged 1 commit into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions x/wasm/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,15 +420,15 @@

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 423 in x/wasm/client/cli/tx.go

View check run for this annotation

Codecov / codecov/patch

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

Added line #L423 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 427 in x/wasm/client/cli/tx.go

View check run for this annotation

Codecov / codecov/patch

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

Added line #L427 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 429 in x/wasm/client/cli/tx.go

View check run for this annotation

Codecov / codecov/patch

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

Added line #L429 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 431 in x/wasm/client/cli/tx.go

View check run for this annotation

Codecov / codecov/patch

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

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