Skip to content

Commit

Permalink
give anvil a chance to warm up the second time around
Browse files Browse the repository at this point in the history
  • Loading branch information
0age committed Feb 29, 2024
1 parent a93e420 commit 1ae21fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tstorish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ae21fd

Please sign in to comment.