[#486] morph/client: Add notary enabled check function

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
Alex Vanin 2021-04-29 16:31:59 +03:00 committed by Alex Vanin
parent fd16b5701f
commit 7c559aaeaa

View file

@ -89,6 +89,12 @@ func (c *Client) EnableNotarySupport(proxy util.Uint160, opts ...NotaryOption) e
return nil
}
// NotaryEnabled returns true if notary support was enabled in this instance
// of client by calling `EnableNotarySupport()`. Otherwise returns false.
func (c *Client) NotaryEnabled() bool {
return c.notary != nil
}
// DepositNotary calls notary deposit method. Deposit is required to operate
// with notary contract. It used by notary contract in to produce fallback tx
// if main tx failed to create. Deposit isn't last forever, so it should