Skip to content

Commit

Permalink
add script to remove filter fields from anvil state
Browse files Browse the repository at this point in the history
  • Loading branch information
ricomateo committed Jan 28, 2025
1 parent cc4579f commit 7bffa39
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/contracts/anvil/filter_anvil_state.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 7bffa39

Please sign in to comment.