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

Replace positional arguments with flags in CLI #2275

Merged
merged 39 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
51852ae
Updated CLI commands to take flags everywhere and updated e2e tests a…
ljoss17 Jun 7, 2022
21580d3
Updated gm to use flags when calling Hermes
ljoss17 Jun 7, 2022
09c157f
Added missing flags to e2e test for 'query client state' command
ljoss17 Jun 7, 2022
612a707
Fixed flag errors in e2e tests and removed conflicting short flag.
ljoss17 Jun 7, 2022
88474db
Removed all short flags and updated CLI commands comments
ljoss17 Jun 8, 2022
a76599f
Removed forgotten short flags.
ljoss17 Jun 8, 2022
bf60ca1
Updated Hermes guide with flags instead of positional arguments
ljoss17 Jun 8, 2022
b9983ef
Updated script and comment with new long flags for Hermes
ljoss17 Jun 8, 2022
eb13cd0
Completed 'tx raw upgrade-' commands guide page. Updated Testing clie…
ljoss17 Jun 10, 2022
7a25573
Added changelog entry
ljoss17 Jun 10, 2022
2e3fff3
Added example unit-tests to the 'keys add' command
ljoss17 Jun 15, 2022
ff84119
Added value names to parameters and removed cli parsing unit-tests
ljoss17 Jun 17, 2022
4d35800
Cargo fmt changes
ljoss17 Jun 17, 2022
c7e1b9a
Updated flags in order to reflect ADR 010
ljoss17 Jun 17, 2022
c363e04
Updated guide to reflect flag changes from ADR 010
ljoss17 Jun 17, 2022
9e6d309
Updated gm script and e2e tests to match flag changes from ADR 010
ljoss17 Jun 17, 2022
52f5542
Merge branch 'master' into luca_joss/replace_positional_args_with_flags
ljoss17 Jun 20, 2022
89bfbf6
Fixed ADR 010 typo
ljoss17 Jun 20, 2022
01aeaac
Remove short flags from `key` error messages
seanchen1991 Jun 21, 2022
f5ee6dd
Fix inconsistent error messaging in channel.rs
seanchen1991 Jun 21, 2022
3f923de
Fix more inconsistent error messaging
seanchen1991 Jun 21, 2022
7b28a03
Run cargo fmt
seanchen1991 Jun 21, 2022
ca4a26d
Fix commands that use deprecated `-c` flag
seanchen1991 Jun 22, 2022
d4218da
Added the query transfer subcommand in docs.
adizere Jun 24, 2022
a28dc78
Scrub query clients
adizere Jun 24, 2022
52a83c9
Scrub query client state
adizere Jun 24, 2022
2624c7a
Removed excessive debug line
adizere Jun 24, 2022
7612d8b
Disabled filtering for query channels CLI
adizere Jun 24, 2022
49b4a41
Merge branch 'master' into luca_joss/replace_positional_args_with_flags
ljoss17 Jun 28, 2022
840a51c
Added aliases for 'connection', 'channel' and 'sequence' flags
ljoss17 Jun 28, 2022
d389f3d
Fixed error in CLI replacing HeightQuery with QueryHeight
ljoss17 Jun 28, 2022
e06b55a
Fix cargo fmt
ljoss17 Jun 28, 2022
fd71131
Changed 'version' to 'channel-version' for 'hermes create channel' co…
ljoss17 Jun 28, 2022
64e54e2
Separated 'hermes create channel' help into short and long message
ljoss17 Jun 28, 2022
d2ef49c
Updated 'hermes listen' so that '--events' flag can take multiple values
ljoss17 Jun 28, 2022
7d8a58e
Updated guide with new '--events' flag for 'hermes listen'
ljoss17 Jun 28, 2022
92cd463
Start all arguments help text with an uppercase letter, to match Clap…
romac Jun 28, 2022
eff375c
Update guide to account for argument help text starting with an upper…
romac Jun 28, 2022
6b2947e
Add shortened aliases for `tx raw` commands
romac Jun 28, 2022
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
Prev Previous commit
Next Next commit
Update guide to account for argument help text starting with an upper…
…case letter
  • Loading branch information
romac committed Jun 28, 2022
commit eff375cbbcce9c5c8516452fff156fef23416338
4 changes: 2 additions & 2 deletions guide/src/commands/global.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Informal Systems <hello@informal.systems>
Implementation of `hermes`, an IBC Relayer developed in Rust.

FLAGS:
--config <CONFIG> path to configuration file
--json enable JSON output
--config <CONFIG> Path to configuration file
--json Enable JSON output
```

The flags must be specified right after the `hermes` command and before any subcommand.
Expand Down
10 changes: 5 additions & 5 deletions guide/src/commands/keys/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,11 @@ DESCRIPTION:
Delete key(s) from a configured chain

FLAGS:
--chain <CHAIN_ID> identifier of the chain
--chain <CHAIN_ID> Identifier of the chain

OPTIONS:
--key-name <KEY_NAME> name of the key
--all delete all keys
--key-name <KEY_NAME> Name of the key
--all Delete all keys
```

#### Delete private keys that was previously added to a chain
Expand Down Expand Up @@ -248,7 +248,7 @@ DESCRIPTION:
List keys configured on a chain

FLAGS:
--chain <CHAIN_ID> identifier of the chain
--chain <CHAIN_ID> Identifier of the chain
```

#### Listing the private key that was added to a chain
Expand Down Expand Up @@ -308,7 +308,7 @@ DESCRIPTION:
Query balance for a key from a configured chain. If no key is given, the key is retrieved from the configuration file

FLAGS:
--chain <CHAIN_ID> identifier of the chain
--chain <CHAIN_ID> Identifier of the chain

OPTIONS:
--key-name <KEY_NAME> (optional) name of the key (defaults to the `key_name` defined in the config)
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/misbehaviour/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ DESCRIPTION:
Listen to client update IBC events and handles misbehaviour

FLAGS:
--chain <CHAIN_ID> identifier of the chain where client updates are monitored for
--chain <CHAIN_ID> Identifier of the chain where client updates are monitored for
misbehaviour
--client <CLIENT_ID> identifier of the client to be monitored for misbehaviour
--client <CLIENT_ID> Identifier of the client to be monitored for misbehaviour
```

The misbehaviour monitor starts by analyzing all headers used in prior client updates.
Expand Down
10 changes: 5 additions & 5 deletions guide/src/commands/path-setup/connections.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ DESCRIPTION:
Create a new connection between two chains

FLAGS:
--a-chain <A_CHAIN_ID> identifier of the side `a` chain for the new connection
--a-chain <A_CHAIN_ID> Identifier of the side `a` chain for the new connection

OPTIONS:
--a-client <A_CLIENT_ID> identifier of client hosted on chain `a`; default: None (creates
--a-client <A_CLIENT_ID> Identifier of client hosted on chain `a`; default: None (creates
a new client)
--b-chain <B_CHAIN_ID> identifier of the side `b` chain for the new connection
--b-client <B_CLIENT_ID> identifier of client hosted on chain `b`; default: None (creates
--b-chain <B_CHAIN_ID> Identifier of the side `b` chain for the new connection
--b-client <B_CLIENT_ID> Identifier of client hosted on chain `b`; default: None (creates
a new client)
--delay <DELAY> delay period parameter for the new connection (seconds)
--delay <DELAY> Delay period parameter for the new connection (seconds)
[default: 0]
```

Expand Down
22 changes: 11 additions & 11 deletions guide/src/commands/queries/channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ DESCRIPTION:
Query channel end

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query

OPTIONS:
--height <HEIGHT> height of the state to query
--height <HEIGHT> Height of the state to query
```

__Example__
Expand Down Expand Up @@ -133,12 +133,12 @@ DESCRIPTION:
Query channel ends and underlying connection and client objects

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query

OPTIONS:
--height <HEIGHT> height of the state to query
--height <HEIGHT> Height of the state to query
--verbose enable verbose output, displaying all details of channels,
connections & clients
```
Expand Down Expand Up @@ -203,9 +203,9 @@ DESCRIPTION:
Query channel's client state

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query
```

If the command is successful a message with the following format will be displayed:
Expand Down
20 changes: 10 additions & 10 deletions guide/src/commands/queries/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ DESCRIPTION:
Query the client state

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--client <CLIENT_ID> identifier of the client to query
--chain <CHAIN_ID> Identifier of the chain to query
--client <CLIENT_ID> Identifier of the client to query

OPTIONS:
--height HEIGHT the chain height which this query should reflect
--height HEIGHT The chain height which this query should reflect
```

__Example__
Expand Down Expand Up @@ -245,11 +245,11 @@ DESCRIPTION:
Query client connections

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--client <CLIENT_ID> identifier of the client to query
--chain <CHAIN_ID> Identifier of the chain to query
--client <CLIENT_ID> Identifier of the client to query

OPTIONS:
--height <HEIGHT> the chain height which this query should reflect
--height <HEIGHT> The chain height which this query should reflect
```

__Example__
Expand Down Expand Up @@ -277,12 +277,12 @@ DESCRIPTION:
Query for the header used in a client update at a certain height

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--client <CLIENT_ID> identifier of the client to query
--consensus-height <CONSENSUS_HEIGHT> height of header to query
--chain <CHAIN_ID> Identifier of the chain to query
--client <CLIENT_ID> Identifier of the client to query
--consensus-height <CONSENSUS_HEIGHT> Height of header to query

OPTIONS:
--height <HEIGHT> the chain height context for the query
--height <HEIGHT> The chain height context for the query
```

__Example__
Expand Down
12 changes: 6 additions & 6 deletions guide/src/commands/queries/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ DESCRIPTION:
Query the identifiers of all connections on a chain

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--chain <CHAIN_ID> Identifier of the chain to query
```

__Example__
Expand Down Expand Up @@ -64,11 +64,11 @@ DESCRIPTION:
Query connection end

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--connection <CONNECTION_ID> identifier of the connection to query
--chain <CHAIN_ID> Identifier of the chain to query
--connection <CONNECTION_ID> Identifier of the connection to query

OPTIONS:
--height <HEIGHT> height of the state to query
--height <HEIGHT> Height of the state to query
```

__Example__
Expand Down Expand Up @@ -121,8 +121,8 @@ DESCRIPTION:
Query connection channels

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--connection <CONNECTION_ID> identifier of the connection to query
--chain <CHAIN_ID> Identifier of the chain to query
--connection <CONNECTION_ID> Identifier of the connection to query
```

__Example__
Expand Down
50 changes: 25 additions & 25 deletions guide/src/commands/queries/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ USAGE:
hermes query packet pending --chain <CHAIN_ID> --port <PORT_ID> --channel <CHANNEL_ID>

FLAGS:
--chain <CHAIN_ID> identifier of the chain at one end of the channel
--channel <CHANNEL_ID> channel identifier on the chain given by <CHAIN_ID>
--port <PORT_ID> port identifier on the chain given by <CHAIN_ID>
--chain <CHAIN_ID> Identifier of the chain at one end of the channel
--channel <CHANNEL_ID> Channel identifier on the chain given by <CHAIN_ID>
--port <PORT_ID> Port identifier on the chain given by <CHAIN_ID>
```

__Example__
Expand Down Expand Up @@ -90,9 +90,9 @@ DESCRIPTION:
Query packet commitments

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query
```

__Example__
Expand Down Expand Up @@ -129,13 +129,13 @@ DESCRIPTION:
Query packet commitment

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--sequence <SEQUENCE> sequence of packet to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query
--sequence <SEQUENCE> Sequence of packet to query

OPTIONS:
--height <HEIGHT> height of the state to query
--height <HEIGHT> Height of the state to query
```

__Example__
Expand All @@ -162,9 +162,9 @@ DESCRIPTION:
Query packet acknowledgments

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query
```

__Example__
Expand Down Expand Up @@ -201,13 +201,13 @@ DESCRIPTION:
Query packet acknowledgment

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--channel <CHANNEL_ID> identifier of the channel to query
--port <PORT_ID> identifier of the port to query
--sequence <SEQUENCE> sequence of packet to query
--chain <CHAIN_ID> Identifier of the chain to query
--channel <CHANNEL_ID> Identifier of the channel to query
--port <PORT_ID> Identifier of the port to query
--sequence <SEQUENCE> Sequence of packet to query

OPTIONS:
--height <HEIGHT> height of the state to query
--height <HEIGHT> Height of the state to query
```

__Example__
Expand All @@ -234,9 +234,9 @@ DESCRIPTION:
Query unreceived packets

FLAGS:
--chain <CHAIN_ID> identifier of the chain for the unreceived sequences
--channel <CHANNEL_ID> channel identifier
--port <PORT_ID> port identifier
--chain <CHAIN_ID> Identifier of the chain for the unreceived sequences
--channel <CHANNEL_ID> Channel identifier
--port <PORT_ID> Port identifier
```

__Example__
Expand Down Expand Up @@ -267,9 +267,9 @@ DESCRIPTION:
Query unreceived acknowledgments

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query the unreceived acknowledgments
--channel <CHANNEL_ID> channel identifier
--port <PORT_ID> port identifier
--chain <CHAIN_ID> Identifier of the chain to query the unreceived acknowledgments
--channel <CHANNEL_ID> Channel identifier
--port <PORT_ID> Port identifier
```

__Example__
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/queries/transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ DESCRIPTION:
Query the denomination trace info from a trace hash

FLAGS:
--chain <CHAIN_ID> identifier of the chain
--hash <HASH> trace hash to query
--chain <CHAIN_ID> Identifier of the chain
--hash <HASH> Trace hash to query
```

__Example__
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/queries/tx.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ DESCRIPTION:
Query the events emitted by transaction

FLAGS:
--chain <CHAIN_ID> identifier of the chain to query
--hash <HASH> transaction hash to query
--chain <CHAIN_ID> Identifier of the chain to query
--hash <HASH> Transaction hash to query
```

__Example__
Expand Down
28 changes: 14 additions & 14 deletions guide/src/commands/raw/channel-close.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ DESCRIPTION:
Initiate the closing of a channel (ChannelCloseInit)

FLAGS:
--dst-chain <DST_CHAIN_ID> identifier of the destination chain
--dst-chan <ID> identifier of the destination channel (required)
--dst-conn <DST_CONN_ID> identifier of the destination connection
--dst-port <DST_PORT_ID> identifier of the destination port
--src-chain <SRC_CHAIN_ID> identifier of the source chain
--src-chan <ID> identifier of the source channel (required)
--src-port <SRC_PORT_ID> identifier of the source port
--dst-chain <DST_CHAIN_ID> Identifier of the destination chain
--dst-chan <ID> Identifier of the destination channel (required)
--dst-conn <DST_CONN_ID> Identifier of the destination connection
--dst-port <DST_PORT_ID> Identifier of the destination port
--src-chain <SRC_CHAIN_ID> Identifier of the source chain
--src-chan <ID> Identifier of the source channel (required)
--src-port <SRC_PORT_ID> Identifier of the source port
```

__Example__
Expand Down Expand Up @@ -77,13 +77,13 @@ DESCRIPTION:
Confirm the closing of a channel (ChannelCloseConfirm)

FLAGS:
--dst-chain <DST_CHAIN_ID> identifier of the destination chain
--dst-chan <ID> identifier of the destination channel (required)
--dst-conn <DST_CONN_ID> identifier of the destination connection
--dst-port <DST_PORT_ID> identifier of the destination port
--src-chain <SRC_CHAIN_ID> identifier of the source chain
--src-chan <ID> identifier of the source channel (required)
--src-port <SRC_PORT_ID> identifier of the source port
--dst-chain <DST_CHAIN_ID> Identifier of the destination chain
--dst-chan <ID> Identifier of the destination channel (required)
--dst-conn <DST_CONN_ID> Identifier of the destination connection
--dst-port <DST_PORT_ID> Identifier of the destination port
--src-chain <SRC_CHAIN_ID> Identifier of the source chain
--src-chan <ID> Identifier of the source channel (required)
--src-port <SRC_PORT_ID> Identifier of the source port

```

Expand Down
Loading