Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add config flag to disable precompilation for scriptMaster #962

Merged
merged 1 commit into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
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
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
mirooon marked this conversation as resolved.
Show resolved Hide resolved
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
Loading