[#72] Replace Init() methods with _deploy

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-12 11:31:07 +03:00 committed by Alex Vanin
parent e4ba936f50
commit dd98bee590
10 changed files with 73 additions and 18 deletions

View file

@ -42,7 +42,12 @@ const (
notaryDisabledKey = "notary"
)
func Init(notaryDisabled bool, owner interop.Hash160, addrNetmap interop.Hash160) {
func _deploy(data interface{}, isUpdate bool) {
args := data.([]interface{})
notaryDisabled := args[0].(bool)
owner := args[1].(interop.Hash160)
addrNetmap := args[2].(interop.Hash160)
ctx := storage.GetContext()
if !common.HasUpdateAccess(ctx) {