Skip to content

Commit

Permalink
move getClaims validations to Native gas token deposit to WETH
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Mar 3, 2025
1 parent 584a44a commit 25fbcad
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions test/bats/pp/bridge-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,18 @@ setup() {
claim_frequency="10"
run claim_bridge_by_tx_hash "$timeout" "$bridge_tx_hash" "$destination_addr" "$l2_rpc_url" "$bridge_api_url"
assert_success
local claim_global_index="$output"

# Validate the bridge_getClaims API
echo "------- bridge_getClaims API testcase --------"
run get_claim "$l2_rpc_network_id" "$claim_global_index" 10 3
assert_success

local origin_network="$(echo "$output" | jq -r '.origin_network')"
local destination_network="$(echo "$output" | jq -r '.destination_network')"
assert_equal "$l1_rpc_network_id" "$origin_network"
assert_equal "$l2_rpc_network_id" "$destination_network"
echo "πŸš€πŸš€ bridge_getClaims API testcase passed" >&3

echo "=== Running LxLy WETH ($weth_token_addr) deposit on L2 to L1 network" >&3
destination_addr=$sender_addr
Expand Down Expand Up @@ -146,18 +158,6 @@ setup() {
claim_frequency="10"
run claim_bridge_by_tx_hash "$timeout" "$bridge_tx_hash" "$destination_addr" "$l2_rpc_url" "$bridge_api_url"
assert_success
local claim_global_index="$output"

# Validate the bridge_getClaims API
echo "------- bridge_getClaims API testcase --------"
run get_claim "$l2_rpc_network_id" "$claim_global_index" 10 3
assert_success

local origin_network="$(echo "$output" | jq -r '.origin_network')"
local destination_network="$(echo "$output" | jq -r '.destination_network')"
assert_equal "$l1_rpc_network_id" "$origin_network"
assert_equal "$l2_rpc_network_id" "$destination_network"
echo "πŸš€πŸš€ bridge_getClaims API testcase passed" >&3

# Validate that the native token of receiver on L2 has increased by the bridge tokens amount
run verify_balance "$l2_rpc_url" "$native_token_addr" "$receiver" "$initial_receiver_balance" "$tokens_amount"
Expand Down

0 comments on commit 25fbcad

Please sign in to comment.