fix: add via_ir to temp forge project in transpiler tests

The 30-way threshold lookup in optimizer_seed.push3 generates enough
local variables to trigger "Stack too deep" without IR compilation.
Add via_ir = true to the minimal foundry.toml created in both test
scripts, matching the setting in onchain/foundry.toml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-18 13:17:18 +00:00
parent 1fe5673ce5
commit 7c68177f9d
2 changed files with 2 additions and 2 deletions

View file

@ -188,7 +188,7 @@ else
else else
FORGE_DIR="$TMPDIR_I5/forge_verify" FORGE_DIR="$TMPDIR_I5/forge_verify"
mkdir -p "$FORGE_DIR/src" mkdir -p "$FORGE_DIR/src"
printf '[profile.default]\nsrc = "src"\nout = "out"\nlibs = []\n' > "$FORGE_DIR/foundry.toml" printf '[profile.default]\nsrc = "src"\nout = "out"\nlibs = []\nvia_ir = true\n' > "$FORGE_DIR/foundry.toml"
cp "$REPO_ROOT/onchain/src/IOptimizer.sol" "$FORGE_DIR/src/" cp "$REPO_ROOT/onchain/src/IOptimizer.sol" "$FORGE_DIR/src/"
cp "$SOL_OUT" "$FORGE_DIR/src/OptimizerV3Push3.sol" cp "$SOL_OUT" "$FORGE_DIR/src/OptimizerV3Push3.sol"

View file

@ -199,7 +199,7 @@ if [ -z "$FORGE_BIN" ]; then
else else
FORGE_DIR="$TMPDIR_T/forge_verify" FORGE_DIR="$TMPDIR_T/forge_verify"
mkdir -p "$FORGE_DIR/src" mkdir -p "$FORGE_DIR/src"
printf '[profile.default]\nsrc = "src"\nout = "out"\nlibs = []\n' > "$FORGE_DIR/foundry.toml" printf '[profile.default]\nsrc = "src"\nout = "out"\nlibs = []\nvia_ir = true\n' > "$FORGE_DIR/foundry.toml"
cp "$REPO_ROOT/onchain/src/IOptimizer.sol" "$FORGE_DIR/src/" cp "$REPO_ROOT/onchain/src/IOptimizer.sol" "$FORGE_DIR/src/"
cp "$OUTPUT_6" "$FORGE_DIR/src/OptimizerV3Push3.sol" cp "$OUTPUT_6" "$FORGE_DIR/src/OptimizerV3Push3.sol"