frostfs-node/cmd/neofs-adm/internal/modules/morph/update.go
Evgenii Stratonikov bca41f87af [#888] neofs-adm: deploy NNS contract first
Container contract uses actual NNS interface. This also aleviates some
pain related to update as neofs-adm code itself uses current NNS
version.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-10-12 15:50:22 +03:00

21 lines
404 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.deployNNS(updateMethodName); err != nil {
return err
}
return wCtx.deployContracts(updateMethodName)
}