From 92488f0becbb7ed92f49523ee9fea41ac14ede46 Mon Sep 17 00:00:00 2001 From: anastasia prasolova Date: Thu, 30 Sep 2021 18:25:16 +0300 Subject: [PATCH] receive balance contract hash from NNS Signed-off-by: anastasia prasolova --- robot/resources/lib/payment_neogo.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/robot/resources/lib/payment_neogo.py b/robot/resources/lib/payment_neogo.py index 533160e..3ccb8d1 100644 --- a/robot/resources/lib/payment_neogo.py +++ b/robot/resources/lib/payment_neogo.py @@ -10,11 +10,14 @@ from neo3 import wallet from common import * import rpc_client +import contract ROBOT_AUTO_KEYWORDS = False -# path to neofs-cli executable -BALANCE_CONTRACT_HASH = os.getenv('NEOFS_CONTRACTS_BALANCE') +NNS_CONTRACT = contract.get_nns_contract_hash(NEOFS_NEO_API_ENDPOINT) +BALANCE_CONTRACT_HASH = contract.get_morph_contract_hash( + 'balance.neofs', NNS_CONTRACT, NEOFS_NEO_API_ENDPOINT + ) MORPH_TOKEN_POWER = 12 morph_rpc_cli = rpc_client.RPCClient(NEOFS_NEO_API_ENDPOINT)