diff --git a/integration_tests/ibc_utils.py b/integration_tests/ibc_utils.py index a002132329..7d42d892a5 100644 --- a/integration_tests/ibc_utils.py +++ b/integration_tests/ibc_utils.py @@ -26,6 +26,7 @@ ) RATIO = 10**10 +RELAYER_CALLER = "0x6F1805D56bF05b7be10857F376A5b1c160C8f72C" class Status(IntEnum): @@ -191,7 +192,7 @@ def prepare_network( send_transaction(w3, tx) assert w3.eth.get_balance(sender, "latest") == fund caller = deploy_contract(w3, CONTRACTS["TestRelayer"], key=acc.key).address - assert caller == "0x6F1805D56bF05b7be10857F376A5b1c160C8f72C", caller + assert caller == RELAYER_CALLER, caller call_rly_cmd(path, connection_only, version) if incentivized: @@ -428,6 +429,7 @@ def ibc_incentivized_transfer(ibc): amount = 1000 fee_denom = "ibcfee" base_denom = "basetcro" + caller = eth_to_bech32(RELAYER_CALLER) old_amt_fee = chains[0].balance(relayer, fee_denom) old_amt_sender_fee = chains[0].balance(sender, fee_denom) old_amt_sender_base = chains[0].balance(sender, base_denom) @@ -456,19 +458,19 @@ def ibc_incentivized_transfer(ibc): src_channel, packet_seq, recv_fee=fee, - ack_fee=fee, + # ack_fee=fee, timeout_fee=fee, from_=sender, ) assert rsp["code"] == 0, rsp["raw_log"] # fee is locked - assert chains[0].balance(sender, fee_denom) == old_amt_sender_fee - 30 + assert chains[0].balance(sender, fee_denom) == old_amt_sender_fee - 20 # wait for relayer receive the fee def check_fee(): amount = chains[0].balance(relayer, fee_denom) if amount > old_amt_fee: - assert amount == old_amt_fee + 20, amount + assert amount == old_amt_fee + 10, amount return True else: return False @@ -479,7 +481,7 @@ def check_fee(): actual = get_balances(ibc.cronos, sender) assert actual == [ {"denom": base_denom, "amount": f"{old_amt_sender_base - amount}"}, - {"denom": fee_denom, "amount": f"{old_amt_sender_fee - 20}"}, + {"denom": fee_denom, "amount": f"{old_amt_sender_fee - 10}"}, ], actual path = f"transfer/{dst_channel}/{base_denom}" denom_hash = hashlib.sha256(path.encode()).hexdigest().upper() diff --git a/integration_tests/test_ibc_rly.py b/integration_tests/test_ibc_rly.py index 908455dccc..843226b5cd 100644 --- a/integration_tests/test_ibc_rly.py +++ b/integration_tests/test_ibc_rly.py @@ -7,6 +7,7 @@ from .ibc_utils import ( RATIO, + RELAYER_CALLER, assert_duplicate, cronos_transfer_source_tokens, cronos_transfer_source_tokens_with_proxy, @@ -59,6 +60,8 @@ def ibc(request, tmp_path_factory): def amount_dict(amt, denom): + if amt == 0: + return [] return [ AttributeDict( { @@ -298,8 +301,8 @@ def test_ibc_incentivized_transfer(ibc): acknowledge_packet(seq0), distribute_fee(src_relayer, fee), *send_coins(feeibc_addr, src_relayer, src_amount, fee_denom), - distribute_fee(src_relayer, fee), - *send_coins(feeibc_addr, src_relayer, src_amount, fee_denom), + distribute_fee(RELAYER_CALLER, ""), + *send_coins(feeibc_addr, RELAYER_CALLER, 0, ""), distribute_fee(cronos_signer2, fee), *send_coins(feeibc_addr, cronos_signer2, src_amount, fee_denom), fungible(checksum_dst_adr, cronos_signer2, amount, dst_denom), diff --git a/nix/sources.json b/nix/sources.json index e5819624f1..385c2b27d3 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -135,13 +135,13 @@ "relayer": { "branch": "main", "description": "An IBC relayer for ibc-go", - "homepage": "https://github.com/crypto-org-chain/relayer", + "homepage": "https://github.com/mmsqe/relayer", "owner": "crypto-org-chain", "repo": "relayer", - "rev": "bd88a2cba9154450924837ecda915688ff8f9e04", - "sha256": "106mf4mc2ag4a5d21lcqpsq7ixvq70097jglw862jz4g9lbxyv8f", + "rev": "baa9a467d7d533eb65acbd91ca9e2cdfd22be15d", + "sha256": "0rzvr3px3adq6q9v4v4676jvlkz9zngxmzikpkli4p6sc62lxph3", "type": "tarball", - "url": "https://github.com/crypto-org-chain/relayer/archive/bd88a2cba9154450924837ecda915688ff8f9e04.tar.gz", + "url": "https://github.com/mmsqe/relayer/archive/baa9a467d7d533eb65acbd91ca9e2cdfd22be15d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } }