Skip to content

Commit

Permalink
feat: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
joanestebanr committed Dec 11, 2024
1 parent e971197 commit 6837293
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions test/bats/pp-multi/bridge-l2_to_l2-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ setup() {
load '../../helpers/common'
load '../../helpers/lxly-bridge-test'

#add_cdk_network2_to_agglayer
#fund_claim_tx_manager
#mint_pol_token
add_cdk_network2_to_agglayer
fund_claim_tx_manager
mint_pol_token

ether_value=${ETHER_VALUE:-"0.0200000054"}
amount=$(cast to-wei $ether_value ether)
Expand All @@ -21,7 +21,7 @@ setup() {
meta_bytes=${META_BYTES:-"0x1234"}
destination_addr=$target_address
timeout="120"
claim_frequency="10"
claim_frequency="30"

gas_price=$(cast gas-price --rpc-url "$l2_rpc_url")
}
Expand Down
9 changes: 7 additions & 2 deletions test/helpers/lxly-bridge-test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,14 @@ function claim_tx_hash() {
local ready_for_claim="false"

local current_time=$(date +%s)
local end_time=$((start_time + timeout))
local end_time=$((current_time + timeout))
while true; do
#echo "claim_tx_hash: curl -s \"$bridge_provide_merkel_proof/bridges/$destination_addr?limit=100&offset=0\" | jq \"[.deposits[] | select(.tx_hash == \\"$tx_hash\\" )]\""
current_time=$(date +%s)
if ((current_time > end_time)); then
echo "[$(date '+%Y-%m-%d %H:%M:%S')] ❌ Exiting... Timeout reached waiting for tx_hash [$tx_hash] timeout: $timeout!"
echo " $current_time > $end_time" >&3
exit 1
fi
curl -s "$bridge_provide_merkel_proof/bridges/$destination_addr?limit=100&offset=0" | jq "[.deposits[] | select(.tx_hash == \"$tx_hash\" )]" > $bridge_deposit_file
deposit_count=$(jq '. | length' $bridge_deposit_file)
if [[ $deposit_count == 0 ]]; then
Expand Down

0 comments on commit 6837293

Please sign in to comment.