Skip to content

Commit

Permalink
fix: Use curl instead of cast in mainnet fork script (#7792)
Browse files Browse the repository at this point in the history
Seems like we don't install cast as part of our foundry installation, so
we just run good old curl instead.
  • Loading branch information
spalladino authored Aug 12, 2024
1 parent ac8c2f7 commit 1964870
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iac/mainnet-fork/scripts/run_nginx_anvil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ echo "Waiting for ethereum host at $ETHEREUM_HOST..."
while ! curl -s $ETHEREUM_HOST >/dev/null; do sleep 1; done

# Fix anvil's fork timestamp
#.foundry/bin/cast rpc --rpc-url="$ETHEREUM_HOST" evm_setNextBlockTimestamp $(date +%s | xargs printf '0x%x') > /dev/null
#.foundry/bin/cast rpc --rpc-url="$ETHEREUM_HOST" evm_mine > /dev/null
curl -s -H "Content-Type: application/json" -XPOST -d"{\"id\":1,\"jsonrpc\":\"2.0\",\"method\":\"evm_setNextBlockTimestamp\",\"params\":[\"$(date +%s | xargs printf '0x%x')\"]}" $ETHEREUM_HOST > /dev/null
curl -s -H "Content-Type: application/json" -XPOST -d"{\"id\":2,\"jsonrpc\":\"2.0\",\"method\":\"evm_mine\",\"params\":[]}" $ETHEREUM_HOST > /dev/null

echo "Starting nginx..."
nginx &
Expand Down

0 comments on commit 1964870

Please sign in to comment.