From 7bffa3958af9a2c21d00b3f933890b362c3213ef Mon Sep 17 00:00:00 2001 From: ricomateo Date: Tue, 28 Jan 2025 18:06:13 -0300 Subject: [PATCH] add script to remove filter fields from anvil state --- crates/contracts/anvil/filter_anvil_state.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 crates/contracts/anvil/filter_anvil_state.sh diff --git a/crates/contracts/anvil/filter_anvil_state.sh b/crates/contracts/anvil/filter_anvil_state.sh new file mode 100755 index 000000000..a38460ca7 --- /dev/null +++ b/crates/contracts/anvil/filter_anvil_state.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +ANVIL_STATE=$1 + +# Remove the fields transactions, blocks block.prevrandao and block.timestamp +jq 'del(.transactions)' $ANVIL_STATE > temp.json && cat temp.json > $ANVIL_STATE +jq 'del(.blocks)' $ANVIL_STATE > temp.json && cat temp.json > $ANVIL_STATE +jq 'del(.block.prevrandao)' $ANVIL_STATE > temp.json && cat temp.json > $ANVIL_STATE +jq 'del(.block.timestamp)' $ANVIL_STATE > temp.json && cat temp.json > $ANVIL_STATE