Files
lpm/cmd/join_subnet.go
zeekay fde2e5ebf1 feat: add JoinChain method, update dependencies
- Add JoinChain method for SDK compatibility
- Update to use filesystem/perms
- Update to codec v1.1.3, sdk v1.16.46
2026-01-26 09:09:59 -08:00

36 lines
704 B
Go

// Copyright (C) 2019-2025, Lux Partners Limited. All rights reserved.
// See the file LICENSE for licensing terms.
package cmd
import (
"github.com/spf13/afero"
"github.com/spf13/cobra"
)
func joinChain(fs afero.Fs) *cobra.Command {
chain := ""
command := &cobra.Command{
Use: "join-chain",
Short: "Installs all virtual machines for a chain.",
}
command.PersistentFlags().StringVar(&chain, "chain", "", "chain alias to join")
err := command.MarkPersistentFlagRequired("chain")
if err != nil {
panic(err)
}
command.RunE = func(_ *cobra.Command, _ []string) error {
lpm, err := initLPM(fs)
if err != nil {
return err
}
return lpm.JoinChain(chain)
}
return command
}