DEV Community

Hanane Bendisari
Hanane Bendisari

Posted on

From it works to it reverts: learning Solidity the hard way

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.

Top comments (2)

Collapse
 
brooke_davis_fb4114069edf profile image
Brooke Davis

This is cool! I've been taking a lot of free workshops/tutorials to uplevel my solidity skills. There's a free virtual bootcamp next Monday on Solidity fundamentals for any Solidity beginners: lu.ma/chainlink-solidity-bootcamp

Collapse
 
hanane_bendisari profile image
Hanane Bendisari

Yeah I checked it out — it's great for complete beginners.
They really take the time to walk through the basics step by step.