From 8718e146c907bec768434afd02942783f958fd0c Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Fri, 10 Dec 2021 13:40:20 +0300 Subject: [PATCH] [#200] nns: Provide additional `data` in `Update` Signed-off-by: Pavel Karpy --- nns/nns_contract.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nns/nns_contract.go b/nns/nns_contract.go index 0c9f9a4..54a8e34 100644 --- a/nns/nns_contract.go +++ b/nns/nns_contract.go @@ -76,14 +76,15 @@ type RecordState struct { } // Update updates NameService contract. -func Update(nef []byte, manifest string) { +func Update(nef []byte, manifest string, data interface{}) { checkCommittee() // Calculating keys and serializing requires calling // std and crypto contracts. This can be helpful on update // thus we provide `AllowCall` to management.Update. // management.Update(nef, []byte(manifest)) contract.Call(interop.Hash160(management.Hash), "update", - contract.All, nef, manifest, common.AppendVersion(nil)) + contract.All, nef, manifest, common.AppendVersion(data)) + runtime.Log("nns contract updated") } // _deploy initializes defaults (total supply and registration price) on contract deploy.