From ee33227b84c63030af3b14042b3023ece0686b05 Mon Sep 17 00:00:00 2001 From: mmsqe Date: Mon, 27 May 2024 12:26:02 +0800 Subject: [PATCH] set relayer caller for hermes --- integration_tests/ibc_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/integration_tests/ibc_utils.py b/integration_tests/ibc_utils.py index af6a293cbc..eefb5ca9c7 100644 --- a/integration_tests/ibc_utils.py +++ b/integration_tests/ibc_utils.py @@ -173,6 +173,17 @@ def prepare_network( version = {"fee_version": "ics29-1", "app_version": "ics20-1"} path = cronos.base_dir.parent / "relayer" + w3 = cronos.w3 + acc = derive_new_account(2) + sender = acc.address + # fund new sender to deploy contract with same address + if w3.eth.get_balance(sender, "latest") == 0: + fund = 3000000000000000000 + tx = {"to": sender, "value": fund, "gasPrice": w3.eth.gas_price} + send_transaction(w3, tx) + assert w3.eth.get_balance(sender, "latest") == fund + caller = deploy_contract(w3, CONTRACTS["TestRelayer"], key=acc.key).address + assert caller == RELAYER_CALLER, caller if is_hermes: hermes = Hermes(path.with_suffix(".toml")) call_hermes_cmd( @@ -182,17 +193,6 @@ def prepare_network( version, ) else: - w3 = cronos.w3 - acc = derive_new_account(2) - sender = acc.address - # fund new sender to deploy contract with same address - if w3.eth.get_balance(sender, "latest") == 0: - fund = 3000000000000000000 - tx = {"to": sender, "value": fund, "gasPrice": w3.eth.gas_price} - send_transaction(w3, tx) - assert w3.eth.get_balance(sender, "latest") == fund - caller = deploy_contract(w3, CONTRACTS["TestRelayer"], key=acc.key).address - assert caller == RELAYER_CALLER, caller call_rly_cmd(path, connection_only, version) if incentivized: