Skip to content

Commit

Permalink
fix: cast call helper function and invocation of balanceOf function
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal committed Sep 13, 2024
1 parent 25b169e commit 13c3912
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/basic-e2e.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
3 changes: 3 additions & 0 deletions test/helpers/common.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 13c3912

Please sign in to comment.