Skip to content

Commit 58fc24e

Browse files
Merge pull request #2 from olujimiAdebakin/feature/campaign
feat(campaign): fix stack-too-deep errors and achieve clean compilation - Inlined Milestone struct assignment in `createMilestone()` by removing `_storeMilestone()` and writing fields individually to storage – eliminates the >16-slot struct literal that breaks both legacy and IR codegen - Fixed `getPendingRefunds()` view function – added missing return logic and early-empty return (removes compiler warning) - Cleaned up `foundry.toml`: removed conflicting `viaIR`/`via_ir` flags, kept only `via_ir = true` with high optimizer runs - Added proper token address validation in `_validateCampaignParameters()` (now uses the previously ignored `token` param with `extcodesize` check + custom `Factory_InvalidTokenAddress` error) - Minor clean-ups: removed unused internal helper functions, improved comments
2 parents c256279 + d4df5b7 commit 58fc24e

4 files changed

Lines changed: 295 additions & 130 deletions

File tree

foundry.toml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22
src = "src"
33
out = "out"
44
libs = ["lib"]
5-
viaIR = true
5+
6+
# Correct settings for Foundry ≥ 0.2.0 (2024–2025)
7+
via_ir = true
8+
optimizer = true
9+
optimizer_runs = 1_000_000
10+
11+
# Optional but recommended
12+
ffi = false
13+
fs_permissions = [{ access = "read-write", path = "./"}]
614

715
# viaIR: true;
816

0 commit comments

Comments
 (0)