From eb1596e7426f6a7b317fbaf43f1c8692d8facce0 Mon Sep 17 00:00:00 2001 From: ethyla <36268899+ethyla@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:08:04 +0100 Subject: [PATCH] feat: add interface generation --- scripts/helpers/generateInterfaces.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 scripts/helpers/generateInterfaces.sh diff --git a/scripts/helpers/generateInterfaces.sh b/scripts/helpers/generateInterfaces.sh new file mode 100755 index 00000000..c98e4321 --- /dev/null +++ b/scripts/helpers/generateInterfaces.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +create_interface () { + contract="$(basename "$file" | cut -d. -f1)" + dir="$(dirname "$file")" + cast interface "$file" -n $contract > scripts/helpers/interfaces/$contract.generated.sol +} + +forge compile --skip test script + +mkdir -p scripts/helpers/interfaces + +find out -type f -print0 | while read -d $'\0' file +do + echo $file + create_interface +done + +