From 1ae21fdf108692cfbfc7dd2a512699023353d2d2 Mon Sep 17 00:00:00 2001 From: 0age <0age@protonmail.com> Date: Thu, 29 Feb 2024 18:27:11 -0500 Subject: [PATCH] give anvil a chance to warm up the second time around --- tstorish.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tstorish.sh b/tstorish.sh index a675ff7..8ce751f 100644 --- a/tstorish.sh +++ b/tstorish.sh @@ -12,12 +12,14 @@ seaport=$(curl -X POST --data '{"jsonrpc":"2.0","method":"eth_getCode","params": echo $seaport kill $pid anvil --hardfork shanghai & +# save pid to kill later +pid=$! +# wait for anvil to warm up +sleep 5 # call setCode on the 0xe7f address with the $seaport var curl -X POST --data '{"jsonrpc":"2.0","method":"anvil_setCode","params":["0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", '"$seaport"'],"id":1}' -H "Content-Type: application/json" http://localhost:8545 # call setCode on the 0xcafac3dd18ac6c6e92c921884f9e4176737c052c address with 0x3d5c curl -X POST --data '{"jsonrpc":"2.0","method":"anvil_setCode","params":["0xcafac3dd18ac6c6e92c921884f9e4176737c052c", "0x3d5c"],"id":1}' -H "Content-Type: application/json" http://localhost:8545 -# save pid to kill later -pid=$! # mine a block # execute Tstorish test FOUNDRY_PROFILE=tstorish forge test -vvvv --fork-url http://localhost:8545