Hardhat is still everywhere in Ethereum development. But if you've been doing any serious DeFi work, you know the fucking pain. Three months ago, our test suite hit 8 minutes. Eight fucking minutes on Hardhat 2.14.0 with 73 contracts and ethers v5.7.2. That's enough time to lose your train of thought, check Twitter, grab coffee, and completely forget what bug you were hunting.
This isn't just us being dramatic. Stack Overflow is full of developers bitching about Hardhat 2.12+ getting slower as projects get bigger. We're all suffering together.
The 5-Minute Test Problem That Nobody Mentions in Tutorials
The Hardhat tutorials conveniently skip this: Hardhat 2.x chokes on compilation caching after ~40 contracts. We started with 20 contracts on Hardhat 2.9.3, tests ran in 30 seconds. Hit 50 contracts on 2.14.0? 3 minutes. 100 contracts? Go ahead and grab that coffee because Node.js is having a breakdown.
The final straw: our GitHub Actions CI pipeline hit 15 minutes. Fifteen. Fucking. Minutes. You can't merge, can't deploy, can't fix the obvious syntax error because you're sitting there watching Node.js choke on your test suite.
I ran the same fucking tests on both - Foundry was like 3.5x faster. Not even close. That's not a rounding error - that's productivity murder.
Foundry cut our tests from 8 minutes to 45 seconds. Same contracts, same logic, just not running through Node.js hell.
npm Install Roulette
Every Monday morning: npm install roulette. Will ethers.js play nice with the latest Hardhat? Did OpenZeppelin break something in their weekend update? Is TypeScript going to compile or are we spending an hour debugging phantom type errors again?
Last month, our junior dev ran npm install
and boom - deployment scripts dead. @nomiclabs/hardhat-ethers 2.2.3 broke gas estimation when they "fixed" the BigNumber handling. Production deployment shit the bed at 2 AM with Error: cannot estimate gas; transaction may fail
even though our tests passed locally. Spent 4 hours figuring out our deployment script wasn't the problem. I learned that shit the hard way at 3am on a Sunday.
JavaScript dependency hell is real. NPM vulnerability alerts popping up every week when you're managing contracts worth millions? Yeah, that keeps you up at night. You shouldn't have to wonder if your dev tools will work tomorrow.
The Console.log Debugging Trap
Hardhat's console.log
debugging is a fucking trap. Sure, it's convenient for quick debugging, but you end up with this garbage workflow where you're constantly adding and removing console statements instead of actually understanding what your contract is doing.
The real kick in the teeth? Console logs don't work in production. All that debugging you did locally means jack shit when your contract acts weird on mainnet because gas limits, block times, and MEV bots change everything.
Foundry's tracing shows you exactly what's happening at the EVM level. No console.log band-aids, just raw execution traces that match what actually happens on-chain. Opcodes, gas usage, state changes - the debugging data that actually matters.
When Hardhat Actually Makes Sense
Don't get me wrong - Hardhat isn't trash for everything. If you're building a simple dApp with React frontend and you already have JavaScript developers, stick with it. The ethers.js integration is genuinely good, and the Hardhat plugin ecosystem is extensive.
But if you're building DeFi protocols, working with complex math, or your tests take more than 2 minutes to run, you need to evaluate alternatives. Your productivity is worth more than the migration pain.
Hell, even Uniswap V3 ditched standard tooling, and Compound uses optimized testing frameworks for their critical financial protocols.
OK, Here's What Actually Matters
Brutal migration timeline: 2-3 weeks of "Why doesn't forge build
work like npx hardhat compile
?" then you never want to go back. I wasted 6 months on slow tests before switching. You probably are too.
The tools winning right now solve actual problems. Faster tests, better debugging, fewer dependency conflicts. That's not some philosophical bullshit about "developer experience" - that's getting home for dinner instead of babysitting CI runs.