[#746] morph/client: Don't cache GAS contract address on NeoFS-side

Caching is performed inside `GetNativeContractHash` method of neo-go client,
so the additional cache level is redundant.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-02 09:57:19 +03:00 committed by Alex Vanin
parent 0502abc3e0
commit 81722c373b
4 changed files with 20 additions and 13 deletions

View file

@ -151,10 +151,15 @@ func (c *Client) DepositNotary(amount fixedn.Fixed8, delta uint32) (res util.Uin
return util.Uint256{}, fmt.Errorf("can't get blockchain height: %w", err)
}
gas, err := c.client.GetNativeContractHash(nativenames.Gas)
if err != nil {
return util.Uint256{}, err
}
txHash, err := c.client.TransferNEP17(
c.acc,
c.notary.notary,
c.gas,
gas,
int64(amount),
0,
[]interface{}{c.acc.PrivateKey().GetScriptHash(), int64(bc + delta)},