Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions deploy-zksync.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash

function bashcolor {
if [ $2 ]; then
if [ "$2" ]; then
echo -e "\e[$1;$2m"
else
echo -e "\e[$1m"
Expand All @@ -23,14 +23,14 @@ if [[ "$1" != "--skipCompile" ]]; then
echo " "

if [ -d "./artifacts-zk" ]; then
rm -rf ./artifacts-zk
rm -rf "./artifacts-zk"
fi
if [ -d "./cache-zk" ]; then
rm -rf ./cache-zk
rm -rf "./cache-zk"
fi

yarn hardhat compile --network zkTestnet
else
else
skippedCompile=1
echo " "
echo " //////////////////////////////////////////////////"
Expand Down Expand Up @@ -58,18 +58,18 @@ echo " //////////////////////////////////////////////////"

script=""
if [[ "$skippedCompile" == 0 && "$1" ]]; then
script=$1
else
script="$1"
else
if [[ "$skippedCompile" == 1 && "$2" ]]; then
script=$2
script="$2"
fi
fi

if [[ ! -z "$script" ]]; then
echo " Use deploy script: $script"
echo " "
yarn hardhat deploy-zksync --script "$script".ts --network zkTestnet
else
else
echo " Use all deploy scripts."
echo " "
yarn hardhat deploy-zksync --network zkTestnet
Expand All @@ -79,4 +79,4 @@ echo " "
echo " //////////////////////////////////////////////////"
echo " $(bashcolor 1 32)(2/2) Success$(bashcolorend) - zkSync artifacts deployed successfully."
echo " //////////////////////////////////////////////////"
echo " "
echo " "