File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ EXPRESSION=<GREP_EXPRESSION>
1919RPC_URL = <YOUR_RPC_URL>
2020PAYMENT_CONTRACT_ADDRESS = <YOUR_PAYMENT_CONTRACT_ADDRESS>
2121BALANCE_THRESHOLD = <YOUR_BALANCE_THRESHOLD_IN_ETH>
22+ WALLET_NAME = <YOUR_WALLET_NAME> # Example: "Task sender"
2223WALLET_ADDRESS = <YOUR_WALLET_ADDRESS>
24+ NETWORK = <MAINNET|HOLESKY|STAGE>
2325
2426# Variables for sender_with_alert.sh
2527REPETITIONS = <REPETITIONS>
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ balance_alert=false
2525
2626while :
2727do
28- balance_wei=$( cast call --rpc-url $RPC_URL $PAYMENT_CONTRACT_ADDRESS " UserBalances (address)(uint256)" $WALLET_ADDRESS | cut -d' ' -f1)
28+ balance_wei=$( cast call --rpc-url $RPC_URL $PAYMENT_CONTRACT_ADDRESS " user_balances (address)(uint256)" $WALLET_ADDRESS | cut -d' ' -f1)
2929
3030 balance_eth=$( cast from-wei $balance_wei )
3131
3232 if [ 1 -eq " $( echo " $balance_eth < $BALANCE_THRESHOLD " | bc) " ]; then
33- message=" ⚠️ WARNING: Wallet $WALLET_ADDRESS balance ($balance_eth ETH) is below $BALANCE_THRESHOLD ETH"
33+ message=" ⚠️ WARNING: $WALLET_NAME ( $NETWORK ) Wallet ( $WALLET_ADDRESS ) balance ($balance_eth ETH) is below $BALANCE_THRESHOLD ETH"
3434 printf " $message \n"
3535 if [ " $balance_alert " = false ]; then
3636 send_slack_message " $message "
You can’t perform that action at this time.
0 commit comments