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