Cover photo

EVM Errors That Feel Personal: A Roast of Your Smart Contracts

Building on the EVM

Fabian Owuor

Fabian Owuor

is like dating someone emotionally unavailable. At first, it’s exciting, you’re full of hope, the vibes are right, your code looks cute... and then BAM : an error so cryptic, it feels like your smart contract just sub tweeted you.

"In nomine Romae, victi estis!” the developer shouted triumphantly, deploying their contract to the Ethereum Virtual Machine like a digital Caesar crossing the Rubicon. Victory was within grasp — until the EVM, in all its Byzantine glory, responded not with applause, but with a REVERT. No gas refunded. No glory bestowed. Just a cryptic “out of gas” error and a silent mockery encoded in hexadecimal. Rome may have conquered the known world, but clearly, they never tried to deploy on-chain with a missing semicolon and a poorly named variable. The blockchain is immutable, yes — but so is the pain of debugging.

Here are the most common EVM errors and why they might be personally attacking you:

1. revert() — The "Nope" of the Blockchain

You thought your contract was perfect. You were even about to deploy to mainnet. But the EVM had other plans.

revert() is the smart contract equivalent of:

“I saw your effort, and I respect that. But absolutely not.”

Usually caused by:

  • Failing require/assert statements

  • You forgot a zero

  • You assumed users would behave, never do that.

Solution: Add better error messages or stop lying to yourself about your gas math.

2. out of gas — Your Contract Is Hungry

You ever try to run a marathon without eating? That’s your contract right now.

This happens when your transaction exceeds the gas limit. It’s also the EVM’s way of saying:

"You're trying to do too much. Calm down, chief."

Usually caused by:

  • Infinite loops (no, seriously, check again)

  • Trying to store the entire blockchain state in a struct

Solution: Optimize. Or go back to Web2. NOW, please, don't let the Web3 door hit you on the way out.

3. invalid opcode — The Contract Equivalent of a Segfault

This is the EVM just flat-out giving up. Like it hit a line of code and said:

“What is this? Who sent you? Who are you? why?”

Usually caused by:

  • Division by zero

  • Calling a function at a non-existent address

  • Experimental vibes in production code

Solution: Stop pasting code from Stack Overflow at 2 AM.

4. stack too deep — Not a Compliment

Sounds like a Drake lyric, feels like a slap.

This error means you’ve declared too many local variables, and the EVM's tiny little brain (well, stack) can’t handle them all.

“I’m a blockchain, not your father!” – Learn to EVM, properly, tutorials exist.

Usually caused by:

  • Doing too much in one function

  • Having a function that looks like it’s solving world hunger

Solution: Refactor or get a PhD in explaining why your contracts use way too much gas.

5. contract size limit exceeded — Your Code Ate Too Many Samosas

If your contract is over 24KB, Ethereum is like:

“Nice try, but this buffet is closed.”

Usually caused by:

  • Writing 10,000 lines of code in one contract

  • Deploying an entire dApp as one smart contract

  • Using 15 libraries because you believe in “modular design”

Solution: Break it up. Use proxies. Or launch on a roll up that believes in big contracts and bigger dreams.

6. function selector clash — Who Dis?

Two functions got the same signature hash. And now the EVM doesn’t know which one to call.

"You called me, and there is two of us, which 'one ' are you talking about?"

Usually caused by:

  • Function overloading that went too far

  • Your friend “helped” you refactor your code, keep the friendship, stop them from coding.

Solution: Rename the functions. Or stop letting your cousin deploy your contracts.

7. execution reverted: Ownable: caller is not the owner — Sit Down, Peasant

This is Solidity's version of gatekeeping. You called a function only the contract owner should access.

“You are not him.” – Ownable.sol

Usually caused by:

  • You are testing with the wrong wallet

  • You forgetting who deployed the contract

  • You are being on testnet and vibing too hard

Solution: Check your msg.sender. Or stop pretending you own things that you don't.

Final Thoughts:

EVM errors hurt. They hit deep. But they're also a rite of passage. If you haven’t shouted “WHY?!” at your screen over a failed deployment, are you even a real smart contract dev?

Remember: the EVM doesn’t hate you. It just wants you to be better.

Be Good, Be Better, Be BAD (in a good way).

GM, and may your require()s always pass.

EVM Errors That Feel Personal: A Roast of Your Smart Contracts