2021-08-06 14:28:07 +03:00
|
|
|
package morph
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
|
|
|
|
func updateContracts(cmd *cobra.Command, _ []string) error {
|
2024-02-01 14:30:59 +03:00
|
|
|
wCtx, err := NewInitializeContext(cmd, viper.GetViper())
|
2021-08-06 14:28:07 +03:00
|
|
|
if err != nil {
|
|
|
|
return fmt.Errorf("initialization error: %w", err)
|
|
|
|
}
|
|
|
|
|
2024-02-01 14:30:59 +03:00
|
|
|
if err := deployNNS(wCtx, updateMethodName); err != nil {
|
2021-08-06 14:28:07 +03:00
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
2024-02-01 14:30:59 +03:00
|
|
|
return updateContractsInternal(wCtx)
|
2021-08-06 14:28:07 +03:00
|
|
|
}
|