Commit 58fc24e
authored
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 comments4 files changed
Lines changed: 295 additions & 130 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | 15 | | |
8 | 16 | | |
| |||
0 commit comments