Skip to content

Commit

Permalink
Bridge backwards compat (#2010)
Browse files Browse the repository at this point in the history
* backward compatible bridge deploy

* add missing files
  • Loading branch information
felipemadero authored Jul 1, 2024
1 parent 4eb25aa commit b0668aa
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/interchaincmd/tokentransferrercmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var (
)

// avalanche interchain tokenTransferrer deploy
func newDeployCmd() *cobra.Command {
func NewDeployCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "deploy",
Short: "Deploys a Token Transferrer into a given Network and Subnets",
Expand Down
2 changes: 1 addition & 1 deletion cmd/interchaincmd/tokentransferrercmd/tokentransferrer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@ func NewCmd(injectedApp *application.Avalanche) *cobra.Command {
}
app = injectedApp
// tokenTransferrer deploy
cmd.AddCommand(newDeployCmd())
cmd.AddCommand(NewDeployCmd())
return cmd
}
23 changes: 23 additions & 0 deletions cmd/teleportercmd/bridgecmd/bridge.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package bridgecmd

import (
"github.com/ava-labs/avalanche-cli/pkg/cobrautils"
"github.com/spf13/cobra"
)

// avalanche teleporter bridge
func NewCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "bridge",
Short: "Manage Teleporter Bridges (deprecation notice: use 'avalanche interchain tokenTransferrer')",
Long: `The bridge command suite provides tools to deploy and manage Teleporter Bridges.
Deprecation notice: use avalanche interchain tokenTransferrer' instead`,
RunE: cobrautils.CommandSuiteUsage,
}
// contract deploy
cmd.AddCommand(newDeployCmd())
return cmd
}
22 changes: 22 additions & 0 deletions cmd/teleportercmd/bridgecmd/deploy.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (C) 2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package bridgecmd

import (
_ "embed"

"github.com/ava-labs/avalanche-cli/cmd/interchaincmd/tokentransferrercmd"

"github.com/spf13/cobra"
)

// avalanche teleporter bridge deploy
func newDeployCmd() *cobra.Command {
cmd := tokentransferrercmd.NewDeployCmd()
cmd.Use = "deploy"
cmd.Short = "Deploys Token Bridge into a given Network and Subnets (deprecation notice: use 'avalanche interchain tokenTransferrer deploy')"
cmd.Long = `Deploys Token Bridge into a given Network and Subnets
Deprecation notice: use 'avalanche interchain tokenTransferrer deploy`
return cmd
}
3 changes: 3 additions & 0 deletions cmd/teleportercmd/teleporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package teleportercmd

import (
"github.com/ava-labs/avalanche-cli/cmd/teleportercmd/bridgecmd"
"github.com/ava-labs/avalanche-cli/cmd/teleportercmd/relayercmd"
"github.com/ava-labs/avalanche-cli/pkg/application"
"github.com/ava-labs/avalanche-cli/pkg/cobrautils"
Expand All @@ -27,5 +28,7 @@ with Teleporter-Enabled Subnets.`,
cmd.AddCommand(newDeployCmd())
// teleporter relayer
cmd.AddCommand(relayercmd.NewCmd(app))
// teleporter bridge
cmd.AddCommand(bridgecmd.NewCmd())
return cmd
}

0 comments on commit b0668aa

Please sign in to comment.