The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hyperlane-monorepo/solidity/storage.sh

21 lines
514 B

#!/bin/bash
OUTPUT_PATH=${1:-storage}
EXCLUDE="test|mock|interfaces|libs|upgrade|README|Abstract|Static"
IFS=$'\n'
CONTRACT_FILES=($(find ./contracts -type f))
unset IFS
echo "Generating layouts in $OUTPUT_PATH"
mkdir -p $OUTPUT_PATH
for file in "${CONTRACT_FILES[@]}";
do
if [[ $file =~ .*($EXCLUDE).* ]]; then
continue
fi
contract=$(basename "$file" .sol)
echo "Generating storage layout of $contract"
forge inspect "$contract" storage --pretty > "$OUTPUT_PATH/$contract.md"
done