nns: provide `AllowCall` to management.Update

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
enable-notary-in-public-chains
Evgenii Stratonikov 2021-09-16 12:45:24 +03:00 committed by Alex Vanin
parent 978a43cec2
commit b2f6fb641a
1 changed files with 6 additions and 1 deletions

View File

@ -76,7 +76,12 @@ type RecordState struct {
// Update updates NameService contract.
func Update(nef []byte, manifest string) {
checkCommittee()
management.Update(nef, []byte(manifest))
// 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)
}
// _deploy initializes defaults (total supply and registration price) on contract deploy.