File tree 2 files changed +26
-3
lines changed
2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ export VERIFIER_API_KEY=" " # placeholder for the foundry.toml
3
4
source .env.local
4
5
5
6
# ask for SHOULD_BE_LOCAL_TEST loaded as env liket the ones below (y/n)
@@ -17,7 +18,6 @@ if [ -z "$SHOULD_BE_LOCAL_TEST" ]; then
17
18
fi
18
19
fi
19
20
20
- export VERIFIER_API_KEY=" " # placeholder for the foundry.toml
21
21
22
22
# if not SHOULD BE LOCAL TEST, then ask for REMOTE_RPC_URL
23
23
if [ " $SHOULD_BE_LOCAL_TEST " != " y" ]; then
111
111
# we need to submit transaction with a slow mode to avoid issues
112
112
# the script submits and verifies
113
113
if [ " $verify_contracts " = " y" ]; then
114
- MNEMONIC=$MNEMONIC forge script ./src/$SCRIPT_NAME --rpc-url $REMOTE_RPC_URL --etherscan-api-key $VERIFIER_API_KEY --verifier-url $REMOTE_RPC_URL /verify/etherscan --broadcast --ffi -vvv --slow --mnemonics " $MNEMONIC " --verify --delay 5 --retries 5
114
+ MNEMONIC=$MNEMONIC VERIFIER_API_KEY= $VERIFIER_API_KEY REMOTE_RPC_URL= $REMOTE_RPC_URL forge script ./src/$SCRIPT_NAME --rpc-url $REMOTE_RPC_URL --etherscan-api-key $VERIFIER_API_KEY --verifier-url $REMOTE_RPC_URL /verify/etherscan --broadcast --ffi -vvv --slow --mnemonics " $MNEMONIC " --verify --delay 5 --retries 5
115
115
else
116
- MNEMONIC=$MNEMONIC forge script ./src/$SCRIPT_NAME --rpc-url $REMOTE_RPC_URL --broadcast --ffi -vvv --slow --mnemonics " $MNEMONIC "
116
+ MNEMONIC=$MNEMONIC VERIFIER_API_KEY= $VERIFIER_API_KEY REMOTE_RPC_URL= $REMOTE_RPC_URL forge script ./src/$SCRIPT_NAME --rpc-url $REMOTE_RPC_URL --broadcast --ffi -vvv --slow --mnemonics " $MNEMONIC "
117
117
fi
118
118
fi
Original file line number Diff line number Diff line change @@ -36,6 +36,29 @@ account=$(cast wallet address --mnemonic "$MNEMONIC" --mnemonic-index $accountIn
36
36
dealValue=1000000
37
37
38
38
echo " Trying to deal the tokens to $account ..."
39
+ echo " Setting ETH balance..."
40
+ ethDecimals=18
41
+ ethDealValueCalc=$( echo " obase=16; $dealValue * 10^$ethDecimals " | bc)
42
+ ethDealValueHex=" 0x$( printf $ethDealValueCalc ) "
43
+ # fund ETH first
44
+ jsonPayload=$( jq -n \
45
+ --arg account " $account " \
46
+ --arg ethDealValueHex " $ethDealValueHex " \
47
+ ' {
48
+ "jsonrpc": "2.0",
49
+ "method": "tenderly_setBalance",
50
+ "params": [
51
+ $account,
52
+ $ethDealValueHex
53
+ ],
54
+ "id": 1
55
+ }' )
56
+
57
+ echo " JSON payload for $symbol : $jsonPayload "
58
+
59
+ response=$( curl -s -X POST $rpc_url \
60
+ -H " Content-Type: application/json" \
61
+ -d " $jsonPayload " )
39
62
40
63
# Load the token list from the JSON file
41
64
tokenListPath=$( pwd) " /data/forkTokenList.json"
You can’t perform that action at this time.
0 commit comments