From 13c3912125c3c901ab8290b0ea2ec70c68fc232b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= Date: Fri, 13 Sep 2024 05:34:35 +0200 Subject: [PATCH] fix: cast call helper function and invocation of balanceOf function --- test/basic-e2e.bats | 2 +- test/helpers/common.bash | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/basic-e2e.bats b/test/basic-e2e.bats index a064a411..7bfbb2de 100644 --- a/test/basic-e2e.bats +++ b/test/basic-e2e.bats @@ -39,7 +39,7 @@ setup() { # Assert that balance is correct local balanceOfFnSig="function balanceOf(address) (uint256)" - run queryContract $contract_addr $balanceOfFnSig $receiver + run queryContract "$contract_addr" "$balanceOfFnSig" "$receiver" assert_success receiverBalance=$(echo "$output" | tail -n 1) diff --git a/test/helpers/common.bash b/test/helpers/common.bash index 3b8784d0..7bc3713a 100644 --- a/test/helpers/common.bash +++ b/test/helpers/common.bash @@ -21,6 +21,7 @@ function deployContract() { echo "Error: Failed to retrieve sender address." return 1 fi + echo "Attempting to deploy contract artifact $contract_artifact to $rpc_url (sender: $senderAddr)" # Get bytecode from the contract artifact @@ -153,6 +154,8 @@ function queryContract() { shift 2 # Shift past the first two arguments local params=("$@") # Collect remaining arguments as parameters array + echo "Querying state of $addr account (RPC URL: $rpc_url) with function signature: '$funcSignature' and params: ${params[*]}" + # Check if rpc_url is available if [[ -z "$rpc_url" ]]; then echo "Error: rpc_url environment variable is not set."