I’ve been learning Solidity by building an escrow smart contract for milestone-based payments between clients and artists.
But instead of stopping at the happy path — I wanted to understand failure cases too.
So I used Foundry to write a full test suite that covers:
✅ role-based access control
✅ milestone validation
✅ reverts for unauthorized actions
✅ edge cases like double validation or overpayments
✅ gas profiling for critical functions
All contracts are modular for clarity:
- BaseContract.sol for storage
- ValidationContract.sol for validator flow
- EscrowContract.sol for deposits, refunds, and release
- ArtVault.sol ties it all together
Full repo with README, tests and gas report here:
→ https://github.com/HananeBendisari/ArtVault
Feedback welcome — especially from other Solidity learners or people who audit/test smart contracts regularly.