Skip to content

Commit

Permalink
set relayer caller for hermes
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed May 27, 2024
1 parent 87550e0 commit ee33227
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions integration_tests/ibc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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:
Expand Down

0 comments on commit ee33227

Please sign in to comment.