[#979] morph/client: Get proxy contract address from NNS
Make `Client.EnableNotarySupport` method to call `NNSContractAddress` for proxy contract if it is not specified in corresponding option. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
9622c9c858
commit
069a174129
1 changed files with 6 additions and 1 deletions
|
@ -80,7 +80,12 @@ func (c *Client) EnableNotarySupport(opts ...NotaryOption) error {
|
|||
}
|
||||
|
||||
if cfg.proxy.Equals(util.Uint160{}) {
|
||||
return errors.New("proxy contract hash is missing")
|
||||
var err error
|
||||
|
||||
cfg.proxy, err = c.NNSContractAddress(NNSProxyContractName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("get proxy contract addess from NNS: %w", err)
|
||||
}
|
||||
}
|
||||
|
||||
notaryCfg := ¬ary{
|
||||
|
|
Loading…
Reference in a new issue