diff --git a/CHANGELOG.md b/CHANGELOG.md index dc2561eb..d1498ef8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # Changelog Changelog for NeoFS Contract +## [0.12.2] - 2021-11-26 + +### Fixed +- Domain owner check in container contract (#156) +- Missing NNS related keys in container contract (#181) + +### Added +- Update functions now provide contract version in data (#164) + ## [0.12.1] - 2021-10-19 ### Fixed @@ -245,6 +254,7 @@ Preview4-testnet version of NeoFS contracts. Preview4 compatible contracts. +[0.12.2]: https://github.com/nspcc-dev/neofs-contract/compare/v0.12.1...v0.12.2 [0.12.1]: https://github.com/nspcc-dev/neofs-contract/compare/v0.12.0...v0.12.1 [0.12.0]: https://github.com/nspcc-dev/neofs-contract/compare/v0.11.0...v0.12.0 [0.11.0]: https://github.com/nspcc-dev/neofs-contract/compare/v0.10.1...v0.11.0 diff --git a/common/version.go b/common/version.go index b073889f..81347a0c 100644 --- a/common/version.go +++ b/common/version.go @@ -4,8 +4,8 @@ import "github.com/nspcc-dev/neo-go/pkg/interop/native/std" const ( major = 0 - minor = 13 - patch = 0 + minor = 12 + patch = 2 // Versions from which an update should be performed. // These should be used in a group (so prevMinor can be equal to minor if there are diff --git a/nns/nns_contract.go b/nns/nns_contract.go index 5885b012..1664b0b7 100644 --- a/nns/nns_contract.go +++ b/nns/nns_contract.go @@ -19,6 +19,7 @@ import ( "github.com/nspcc-dev/neo-go/pkg/interop/runtime" "github.com/nspcc-dev/neo-go/pkg/interop/storage" "github.com/nspcc-dev/neo-go/pkg/interop/util" + "github.com/nspcc-dev/neofs-contract/common" ) // Prefixes used for contract data storage. @@ -88,32 +89,6 @@ func Update(nef []byte, manifest string) { // _deploy initializes defaults (total supply and registration price) on contract deploy. func _deploy(data interface{}, isUpdate bool) { if isUpdate { - ctx := storage.GetContext() - it := storage.Find(ctx, []byte{prefixRecord}, storage.DeserializeValues) - for iterator.Next(it) { - oldRec := iterator.Value(it).(struct { - key string - rec RecordState - }) - newRec := RecordState{ - Name: oldRec.rec.Name, - Type: oldRec.rec.Type, - Data: oldRec.rec.Data, - ID: 0, - } - newKey := append([]byte(oldRec.key), newRec.ID) - rec := std.Serialize(newRec) - storage.Put(ctx, newKey, rec) - storage.Delete(ctx, oldRec.key) - } - - maxExpire := 1<<31 - 1 - domains := storage.Find(ctx, []byte{prefixName}, storage.ValuesOnly|storage.DeserializeValues) - for iterator.Next(domains) { - ns := iterator.Value(domains).(NameState) - putSoaRecord(ctx, ns.Name, "ops@nspcc.ru", 86400, 7200, maxExpire, 3600) - } - return } ctx := storage.GetContext()