[#200] nns: Provide additional data
in Update
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
d78edb66db
commit
8718e146c9
1 changed files with 3 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue