Skip to content

Commit

Permalink
feat: add override arg to Go relayer's create-channel (#1266)
Browse files Browse the repository at this point in the history
  • Loading branch information
boojamya authored Sep 24, 2024
1 parent ed1e436 commit cea56bb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ibc/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ type CreateChannelOptions struct {
Order Order

Version string

Override bool // only implemented on Go Relayer
}

// DefaultChannelOpts returns the default settings for creating an ics20 fungible token transfer channel.
Expand Down
6 changes: 5 additions & 1 deletion relayer/rly/cosmos_relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (commander) AddKey(chainID, keyName, coinType, signingAlgorithm, homeDir st
}

func (commander) CreateChannel(pathName string, opts ibc.CreateChannelOptions, homeDir string) []string {
return []string{
cmd := []string{
"rly", "tx", "channel", pathName,
"--src-port", opts.SourcePortName,
"--dst-port", opts.DestPortName,
Expand All @@ -139,6 +139,10 @@ func (commander) CreateChannel(pathName string, opts ibc.CreateChannelOptions, h

"--home", homeDir,
}
if opts.Override {
cmd = append(cmd, "--override")
}
return cmd
}

func createClientOptsHelper(opts ibc.CreateClientOptions) []string {
Expand Down

0 comments on commit cea56bb

Please sign in to comment.