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

Rly tx channel deprecated #410

Merged
merged 6 commits into from
Feb 5, 2021
Merged
Show file tree
Hide file tree
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
57 changes: 3 additions & 54 deletions cmd/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ func transactionCmd() *cobra.Command {
upgradeClientsCmd(),
upgradeChainCmd(),
createConnectionCmd(),
createChannelCmd(),
closeChannelCmd(),
flags.LineBreak,
rawTransactionCmd(),
Expand Down Expand Up @@ -232,57 +231,6 @@ $ %s tx con demo-path -o 3s`, appName, appName, appName)),
return retryFlag(timeoutFlag(cmd))
}

func createChannelCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "channel [path-name]",
Aliases: []string{"chan", "ch"},
Short: "create a channel between two configured chains with a configured path",
Long: strings.TrimSpace(`This command is meant to be used to repair or
create a channel between two chains with a configured path in the config file`),
Args: cobra.ExactArgs(1),
Example: strings.TrimSpace(fmt.Sprintf(`
$ %s transact channel demo-path
$ %s tx chan demo-path --timeout 5s
$ %s tx ch demo-path -o 3s`, appName, appName, appName)),
RunE: func(cmd *cobra.Command, args []string) error {
c, src, dst, err := config.ChainsFromPath(args[0])
if err != nil {
return err
}

to, err := getTimeout(cmd)
if err != nil {
return err
}

retries, err := cmd.Flags().GetUint64(flagMaxRetries)
if err != nil {
return err
}

// ensure that keys exist
if _, err = c[src].GetAddress(); err != nil {
return err
}
if _, err = c[dst].GetAddress(); err != nil {
return err
}

modified, err := c[src].CreateOpenChannels(c[dst], retries, to)
if modified {
if err := overWriteConfig(cmd, config); err != nil {
return err
}
}

return err

},
}

return retryFlag(timeoutFlag(cmd))
}

func closeChannelCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "channel-close [path-name]",
Expand Down Expand Up @@ -324,15 +272,16 @@ $ %s tx close demo-path -o 3s`, appName, appName, appName, appName)),
func linkCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "link [path-name]",
Aliases: []string{"full-path", "connect", "path", "pth"},
Aliases: []string{"full-path", "connect", "path", "pth", "channel"},
Short: "create clients, connection, and channel between two configured chains with a configured path",
Args: cobra.ExactArgs(1),
Example: strings.TrimSpace(fmt.Sprintf(`
$ %s transact link demo-path
$ %s tx full-path demo-path --timeout 5s
$ %s tx connect demo-path
$ %s tx path demo-path -o 3s
$ %s tx pth demo-path`, appName, appName, appName, appName, appName)),
$ %s tx channel demo-path
$ %s tx pth demo-path`, appName, appName, appName, appName, appName, appName)),
RunE: func(cmd *cobra.Command, args []string) error {
c, src, dst, err := config.ChainsFromPath(args[0])
if err != nil {
Expand Down
21 changes: 0 additions & 21 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ NOTE: Most of the commands have aliases that make typing them much quicker (i.e.
- [rly testnets request](#rly-testnets-request)
- [rly transact](#rly-transact)
- [rly transact channel-close](#rly-transact-channel-close)
- [rly transact channel](#rly-transact-channel)
- [rly transact clients](#rly-transact-clients)
- [rly transact connection](#rly-transact-connection)
- [rly transact link](#rly-transact-link)
Expand Down Expand Up @@ -1147,7 +1146,6 @@ Commands to create IBC transactions on configured chains. Most of these commands

### Subcommands

* [rly transact channel](#rly-transact-channel) - create a channel between two configured chains with a configured path
* [rly transact channel-close](#rly-transact-channel-close) - close a channel between two configured chains with a configured path
* [rly transact clients](#rly-transact-clients) - create a clients between two configured chains with a configured path
* [rly transact connection](#rly-transact-connection) - create a connection between two configured chains with a configured path
Expand Down Expand Up @@ -1176,25 +1174,6 @@ rly transact channel-close [path-name] [flags]
```


## rly transact channel

create a channel between two configured chains with a configured path

### Synopsis

This command is meant to be used to repair or create a channel between two chains with a configured path in the config file

```
rly transact channel [path-name] [flags]
```

### Options

```
-o, --timeout string timeout between relayer runs (default "10s")
```


## rly transact clients

create a clients between two configured chains with a configured path
Expand Down