Skip to content

Commit

Permalink
add config flag to disable precompilation (#962)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO authored Jan 29, 2025
1 parent 305600c commit 11ab3fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions script/config.example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ MNEMONIC="test test test test test test test test test test test junk"
PRIVATE_KEY_ANVIL=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 # address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
START_LOCAL_ANVIL_NETWORK_ON_SCRIPT_STARTUP=false
END_LOCAL_ANVIL_NETWORK_ON_SCRIPT_COMPLETION=true # set to false if you want to run several scripts on the same data/contracts without redeploying

# all the periphery contracts listed here will automatically be whitelisted as DEX when deploying "all contracts"
WHITELIST_PERIPHERY="FeeCollector,LiFuelFeeCollector,TokenWrapper,LiFiDEXAggregator"

# if this flag is set to false, the scriptMaster will not compile on start (helpful for zksync/abstract to avoid constant recompilations)
COMPILE_ON_STARTUP=false
6 changes: 4 additions & 2 deletions script/scriptMaster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ scriptMaster() {
for script in script/tasks/*.sh; do [ -f "$script" ] && source "$script"; done # sources all script in folder script/tasks/

# make sure that all compiled artifacts are current
forge build
if [[ "$COMPILE_ON_STARTUP" == "true" ]]; then
forge build
fi

# start local anvil network if flag in config is set
if [[ "$START_LOCAL_ANVIL_NETWORK_ON_SCRIPT_STARTUP" == "true" ]]; then
Expand Down Expand Up @@ -137,7 +139,7 @@ scriptMaster() {
# Check if the foundry-zksync binaries exist, if not fetch them
install_foundry_zksync
fi

# get user-selected deploy script and contract from list
SCRIPT=$(ls -1 "$DEPLOY_SCRIPT_DIRECTORY" | sed -e 's/\.s.sol$//' | grep 'Deploy' | gum filter --placeholder "Deploy Script")
CONTRACT=$(echo $SCRIPT | sed -e 's/Deploy//')
Expand Down

0 comments on commit 11ab3fd

Please sign in to comment.