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

Hanane Bendisari @hanane_bendisari

About: Building secure smart contracts in Solidity. Sharing what I learn, break, and fix — one test at a time.

Joined:
Apr 10, 2025

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

Publish Date: Apr 10
0 2

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.

Comments 2 total

  • Brooke Davis
    Brooke DavisApr 11, 2025

    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

    • Hanane Bendisari
      Hanane BendisariApr 16, 2025

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

Add comment