2021-08-06 11:28:07 +00:00
|
|
|
package morph
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
2024-02-01 12:21:51 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-adm/internal/modules/morph/util"
|
2021-08-06 11:28:07 +00:00
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
|
|
|
|
func updateContracts(cmd *cobra.Command, _ []string) error {
|
2024-02-01 12:21:51 +00:00
|
|
|
wCtx, err := util.NewInitializeContext(cmd, viper.GetViper())
|
2021-08-06 11:28:07 +00:00
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("initialization error: %w", err)
|
|
|
|
}
|
|
|
|
|
2024-02-01 11:30:59 +00:00
|
|
|
if err := deployNNS(wCtx, updateMethodName); err != nil {
|
2021-08-06 11:28:07 +00:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2024-02-01 11:30:59 +00:00
|
|
|
return updateContractsInternal(wCtx)
|
2021-08-06 11:28:07 +00:00
|
|
|
}
|