Skip to content

Commit

Permalink
feat: flattened contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
neutiyoo committed Oct 28, 2024
1 parent 27e6a55 commit 035cb59
Show file tree
Hide file tree
Showing 6 changed files with 31,177 additions and 0 deletions.
18 changes: 18 additions & 0 deletions flatten.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Define the templates directory
TEMPLATES_DIR="src/templates"
FLATTENED_DIR="flattened"

# Create the flattened directory if it doesn't exist
mkdir -p "$FLATTENED_DIR"

# Find all files ending with 'Template.sol' in the templates directory
FILES=$(find "$TEMPLATES_DIR" -type f -name '*Template.sol')

# Loop through each file and run the flatten command
for FILE in $FILES; do
BASENAME=$(basename "$FILE" .sol)
OUTPUT_FILE="${FLATTENED_DIR}/${BASENAME}.flattened.sol"
forge flatten --output "$OUTPUT_FILE" "$FILE"
done
Loading

0 comments on commit 035cb59

Please sign in to comment.