Skip to content

Instantly share code, notes, and snippets.

@mds1
Created August 9, 2024 19:11
Show Gist options
  • Save mds1/bb8c8f2ff5e094adc4d74c587c15fbf9 to your computer and use it in GitHub Desktop.
Save mds1/bb8c8f2ff5e094adc4d74c587c15fbf9 to your computer and use it in GitHub Desktop.
# Lists all contracts that return stack too deep
while IFS= read -r -d '' file; do
solc $(forge re) "$file" --bin 2>&1 | grep -q "Stack too deep"
if [ $? -eq 0 ]; then
echo "Stack too deep error found in $file"
fi
done < <(find . -type f -name "*.sol" -print0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment