2021-08-06 11:28:07 +00:00
|
|
|
package morph
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
"github.com/spf13/viper"
|
|
|
|
)
|
|
|
|
|
|
|
|
func updateContracts(cmd *cobra.Command, _ []string) error {
|
2024-02-01 11:30:59 +00:00
|
|
|
wCtx, err := 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
|
|
|
}
|