[#55] policy: Fix admin processing in _deploy

Refactoring remnants, there is a single admin now.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2023-11-28 11:50:33 +03:00
parent 43097d2152
commit 0dda536d4a

View file

@ -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