[#876] policy: Add methods Get/SetAdmin for wrapper

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-12-19 16:18:48 +03:00 committed by Anton Nikiforov
parent 02e50307df
commit 641a1429ef

View file

@ -104,6 +104,15 @@ func (s *ContractStorage) ListMorphRuleChains(name chain.Name, target engine.Tar
return chains, nil 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) { func bytesFromStackItem(param stackitem.Item) ([]byte, error) {
switch param.Type() { switch param.Type() {
case stackitem.BufferT, stackitem.ByteArrayT, stackitem.IntegerT: case stackitem.BufferT, stackitem.ByteArrayT, stackitem.IntegerT: