From 641a1429ef553ec22c59c69a84b2c30a804a7fdc Mon Sep 17 00:00:00 2001 From: Anton Nikiforov Date: Tue, 19 Dec 2023 16:18:48 +0300 Subject: [PATCH] [#876] policy: Add methods `Get/SetAdmin` for wrapper Signed-off-by: Anton Nikiforov --- pkg/morph/policy/policy_contract_storage.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/morph/policy/policy_contract_storage.go b/pkg/morph/policy/policy_contract_storage.go index 6e85339..48891cb 100644 --- a/pkg/morph/policy/policy_contract_storage.go +++ b/pkg/morph/policy/policy_contract_storage.go @@ -104,6 +104,15 @@ func (s *ContractStorage) ListMorphRuleChains(name chain.Name, target engine.Tar return chains, nil } +func (s *ContractStorage) GetAdmin() (util.Uint160, error) { + return s.contractInterface.GetAdmin() +} + +func (s *ContractStorage) SetAdmin(addr util.Uint160) error { + _, _, err := s.contractInterface.SetAdmin(addr) + return err +} + func bytesFromStackItem(param stackitem.Item) ([]byte, error) { switch param.Type() { case stackitem.BufferT, stackitem.ByteArrayT, stackitem.IntegerT: