bin/mock slow

This commit is contained in:
tim
2025-10-16 19:01:58 -04:00
parent 55306dff9c
commit 5aa0032be0

View File

@@ -1,5 +1,4 @@
#!/bin/bash
CODE_SIZE_LIMIT=65000
# Dev account #0
#PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# Dev account #4
@@ -22,7 +21,8 @@ trap cleanup EXIT
mkdir -p log
# Run anvil in background and redirect output to log file
anvil --code-size-limit ${CODE_SIZE_LIMIT} | tee log/anvil.txt &
# shellcheck disable=SC2086
anvil | tee log/anvil.txt &
ANVIL_PID=$!
# Function to check if string exists in file
@@ -43,7 +43,12 @@ while ! check_string "Listening on" "log/anvil.txt"; do
fi
done
forge script --code-size-limit ${CODE_SIZE_LIMIT} --private-key ${PRIVATE_KEY} DeployMock --fork-url http://localhost:8545 --broadcast "$@" || err 1
forge script --private-key ${PRIVATE_KEY} DeployMock --fork-url http://localhost:8545 --broadcast "$@" || err 1
if [ "$1" = "slow" ]; then
echo "SLOW MODE: Setting mining mode to 12-second intervals."
cast rpc evm_setIntervalMining 12
fi
echo "Press Ctrl+C to exit..."
while true; do