@@ -32,15 +32,21 @@ while true; do
3232 IFS=$' \n ' read -r -d ' ' -a endpoint_array <<< " $endpoints"
3333
3434 echo " Please select an RPC endpoint:"
35- select network in " ${endpoint_array[@]} " ; do
35+ select network in " multichain " " ${endpoint_array[@]} " ; do
3636 if [ -n " $network " ]; then
37- # Extract the value of the selected key from the environment variables
38- RPC_URL=$( awk -v key=" $network " -F' *= *' ' $1 == key {gsub(/"/, "", $2); print $2; exit}' foundry.toml)
39-
40- # Check if the value contains ${} pattern
41- if [[ " $RPC_URL " =~ \$\{ .* \} ]]; then
42- RPC_URL=$( echo " $RPC_URL " | sed ' s/\${//;s/}//' )
43- RPC_URL=$( get_env_value " $RPC_URL " )
37+ if [ " $network " == " multichain" ]; then
38+ RPC_URL=" multichain"
39+ is_multichain=true
40+ else
41+ is_multichain=false
42+ # Extract the value of the selected key from the environment variables
43+ RPC_URL=$( awk -v key=" $network " -F' *= *' ' $1 == key {gsub(/"/, "", $2); print $2; exit}' foundry.toml)
44+
45+ # Check if the value contains ${} pattern
46+ if [[ " $RPC_URL " =~ \$\{ .* \} ]]; then
47+ RPC_URL=$( echo " $RPC_URL " | sed ' s/\${//;s/}//' )
48+ RPC_URL=$( get_env_value " $RPC_URL " )
49+ fi
4450 fi
4551 break
4652 else
@@ -49,22 +55,6 @@ while true; do
4955 done
5056 echo
5157
52- #
53- # Create missing json deployment file
54- #
55-
56- mkdir -p " ./deployment"
57-
58- file=" ./deployment/" $network " .json"
59-
60- if [ -e " $file " ]; then
61- echo " $file found"
62- else
63- touch " $file "
64- echo " $file created."
65- fi
66- echo
67-
6858 #
6959 # Select a script from ./script/deploy/
7060 #
@@ -104,13 +94,24 @@ while true; do
10494 #
10595 # Deployment
10696 #
107-
108- if $is_simulation ; then
109- make simulate-deploy SCRIPT_NAME=$script_name RPC=$RPC_URL
97+ command=" forge script $script_name "
98+ if [[ $is_multichain == true ]]; then
99+ command+=" --multi"
100+ if [[ $is_simulation == false ]]; then
101+ command+=" --slow"
102+ fi
110103 else
111- make deploy SCRIPT_NAME= $script_name RPC= $ RPC_URL
104+ command+= " --rpc-url $ RPC_URL"
112105 fi
113106
107+ if [[ $is_simulation == false ]]; then
108+ command+=" --broadcast"
109+ fi
110+ command+=" -vvvv"
111+
112+ echo $command
113+ eval $command
114+
114115 #
115116 # Repeat
116117 #
0 commit comments