forked from TrueCloudLab/frostfs-contract
[#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:
parent
43097d2152
commit
0dda536d4a
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue