From 0dda536d4a30feecad9323a4955bc4063aa97023 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 28 Nov 2023 11:50:33 +0300 Subject: [PATCH] [#55] policy: Fix admin processing in _deploy Refactoring remnants, there is a single admin now. Signed-off-by: Evgenii Stratonikov --- policy/policy_contract.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/policy/policy_contract.go b/policy/policy_contract.go index ea5d742..86d5e41 100644 --- a/policy/policy_contract.go +++ b/policy/policy_contract.go @@ -42,14 +42,10 @@ func _deploy(data any, isUpdate bool) { if len(args.Admin) != 20 { panic("invaliad admin hash length") } - storage.Put(ctx, ownerKey(args.Admin), []byte{1}) + storage.Put(ctx, []byte{ownerKeyPrefix}, args.Admin) } } -func ownerKey(sender interop.Hash160) []byte { - return append([]byte{ownerKeyPrefix}, sender...) -} - func checkAuthorization(ctx storage.Context) { if runtime.CheckWitness(common.AlphabetAddress()) { return