diff --git a/CHANGELOG.md b/CHANGELOG.md index 749517baea..4dcc3ff980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ Changelog for NeoFS Node ## [Unreleased] ### Added +- Support for 0.20.0+ neofs-contract archive format (#2872) ### Fixed diff --git a/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go b/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go index 19a2dec15a..f5965a6a84 100644 --- a/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go +++ b/cmd/neofs-adm/internal/modules/morph/initialize_deploy.go @@ -372,11 +372,17 @@ func (c *initializeContext) readContracts(names []string) error { func readContract(ctrPath, ctrName string) (*contractState, error) { rawNef, err := os.ReadFile(filepath.Join(ctrPath, ctrName+"_contract.nef")) if err != nil { - return nil, fmt.Errorf("can't read NEF file for %s contract: %w", ctrName, err) + rawNef, err = os.ReadFile(filepath.Join(ctrPath, "contract.nef")) + if err != nil { + return nil, fmt.Errorf("can't read NEF file for %s contract: %w", ctrName, err) + } } rawManif, err := os.ReadFile(filepath.Join(ctrPath, "config.json")) if err != nil { - return nil, fmt.Errorf("can't read manifest file for %s contract: %w", ctrName, err) + rawManif, err = os.ReadFile(filepath.Join(ctrPath, "manifest.json")) + if err != nil { + return nil, fmt.Errorf("can't read manifest file for %s contract: %w", ctrName, err) + } } cs := &contractState{