bin/mock slow
This commit is contained in:
11
bin/mock
11
bin/mock
@@ -1,5 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
CODE_SIZE_LIMIT=65000
|
|
||||||
# Dev account #0
|
# Dev account #0
|
||||||
#PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
|
#PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
|
||||||
# Dev account #4
|
# Dev account #4
|
||||||
@@ -22,7 +21,8 @@ trap cleanup EXIT
|
|||||||
mkdir -p log
|
mkdir -p log
|
||||||
|
|
||||||
# Run anvil in background and redirect output to log file
|
# 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=$!
|
ANVIL_PID=$!
|
||||||
|
|
||||||
# Function to check if string exists in file
|
# Function to check if string exists in file
|
||||||
@@ -43,7 +43,12 @@ while ! check_string "Listening on" "log/anvil.txt"; do
|
|||||||
fi
|
fi
|
||||||
done
|
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..."
|
echo "Press Ctrl+C to exit..."
|
||||||
while true; do
|
while true; do
|
||||||
|
|||||||
Reference in New Issue
Block a user