-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
POS-2399: ganache bug workaround to reduce
smoke_test
time in CI (#…
…1141) * chg: POS-2399: ganache bug workaround to reduce smoke_test time * chg: POS-2399: add echo log * chg: POS-2399: fix signer dump path * chg: POS-2399: log info * chg: POS-2399: fix script with proper signersDump length * chg: POS-2399: better comment
- Loading branch information
1 parent
0c70e02
commit 864a5ae
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
host='localhost' | ||
|
||
echo "Transferring 1 ETH from ganache account[0] to all others..." | ||
|
||
signersFile="matic-cli/devnet/devnet/signer-dump.json" | ||
signersDump=$(jq . $signersFile) | ||
signersLength=$(jq '. | length' $signersFile) | ||
|
||
rootChainWeb3="http://${host}:9545" | ||
|
||
for ((i = 1; i < signersLength; i++)); do | ||
to_address=$(echo "$signersDump" | jq -r ".[$i].address") | ||
from_address=$(echo "$signersDump" | jq -r ".[0].address") | ||
txReceipt=$(curl $rootChainWeb3 -X POST --data '{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"to":"'"$to_address"'","from":"'"$from_address"'","value":"0xDE0B6B3A7640000"}],"id":1}' -H "Content-Type: application/json") | ||
txHash=$(echo "$txReceipt" | jq -r '.result') | ||
echo "Funds transferred from $from_address to $to_address with txHash: $txHash" | ||
done |