Skip to content

Commit

Permalink
fix: seprate keys for contracts deployement
Browse files Browse the repository at this point in the history
  • Loading branch information
rachit77 committed Sep 20, 2024
1 parent 70181e5 commit 9da549f
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion test/basic-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,21 @@ setup() {


@test "Deploy and test UniswapV3 contract" {
run polycli loadtest uniswapv3 --legacy -v 600 --rpc-url $l2_rpc_url --private-key $sender_private_key
# Generate new key pair
wallet_A_output=$(cast wallet new)
address_A=$(echo "$wallet_A_output" | grep "Address" | awk '{print $2}')
address_A_private_key=$(echo "$wallet_A_output" | grep "Private key" | awk '{print $3}')

# Transfer funds for gas
local value_ether="50ether"
cast_output=$(cast send --rpc-url "$l2_rpc_url" --private-key "$sender_private_key" "$address_A" --value "$value_ether" --legacy 2>&1)
if [[ $? -ne 0 ]]; then
echo "Error: Failed to send transaction. Output:"
echo "$cast_output"
return 1
fi

run polycli loadtest uniswapv3 --legacy -v 600 --rpc-url $l2_rpc_url --private-key $address_A_private_key
assert_success

# Remove ANSI escape codes from the output
Expand Down

0 comments on commit 9da549f

Please sign in to comment.