frostfs-node/cmd/neofs-adm/internal/modules/morph/update.go
Evgenii Stratonikov 33c3f18b4f [#748] neofs-adm: allow to update contracts
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-08-10 12:03:10 +03:00

21 lines
378 B
Go

package morph
import (
"fmt"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
func updateContracts(cmd *cobra.Command, _ []string) error {
wCtx, err := newInitializeContext(cmd, viper.GetViper())
if err != nil {
return fmt.Errorf("initialization error: %w", err)
}
if err := wCtx.deployContracts("migrate"); err != nil {
return err
}
return wCtx.setNNS()
}