Debugging “VM Exception: invalid opcode / revert”


When I started learning Solidity, there was nothing more frustrating than running accross “VM Exception: invalid opcode” or “VM Exception: revert” errors. These errors messages are really not helpful.

In this video, I explain you:

  • what are these errors
  • what kind of Solidity code trigger them
  • how to troubleshoot them

More great articles

Understanding Truffle contract artifacts and abstractions

Before we are able to understand how tests work in Truffle, we need to first understand what are contract artifacts…

Read Story

Debugging with require and revert

In Solidity, require and revert statements are used to check some pre-conditions before executing the main part of a function.…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.

    Only great content, we don’t share your email with third parties.