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

feat: add override arg to Go relayer's create-channel #1266

Merged
merged 2 commits into from
Sep 24, 2024
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
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
Loading