Introducing Waffle

Marek Kirejczyk
Nov 19, 2018 · 2 min read

If you care about the quality of your software, you care about tests. If you care about tests, you care about syntax and speed. We find a good testing framework is essential for creating quality software. Which brings us to smart contracts.

Today testing smart contracts seem cumbersome and tedious. Frameworks have verbose syntax and make it hard to formulate precise expectations.

And so we would like to announce waffle — a framework for testing smart contracts. It allows you to write short but expressive tests.

Waffle is simpler and sweeter than Truffle.

For example, it is easy to check what was the reason for a revert:

It is easy to check which event was emitted and with what arguments:

I hope the code above is pretty self-explanatory. Here is a more complete example with a couple of tests written for OpenSolidity ERC20 based token:

Waffle is aiming to replace Truffle. It is simpler, faster and easier to learn and use. However, it only focuses on testing and not on creating applications.

About Waffle

Waffle tastes best with ES6.

It is based on ethers.js and mocha.

Ethers.js is a stable, small and robust js lib for accessing ethereum. It gained a lot of traction recently and seems to be on the way to be the standard js JSON RPC abstraction.


We tested Waffle for a couple of months now and it works well for us. Our next goal is speed. On our roadmap you can find:
- faster contract compilation
- faster test execution
- support for running tests with Geth (aside from ganache)
and more!

Getting started

To learn more and start using visit Waffle GitHub.

What about Mocking?

Do you miss mocking smart contract functionality? Check our other library doppelgänger.

Get updates

If would like to get updates on what we do — follow us on Medium and if you like the story 👏 👏 👏.

If you would like to get updates on Waffle ⭐️ and follow us waffle GitHub.


On the blockchain, software engineering and running a company.

Sign up for 💡 Waffle News 💡

By Ethworks

Best practices in testing smart contracts with Waffle: our sweeter and simpler library built for Ethereum developers Take a look.

By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox
Medium sent you an email at to complete your subscription.


Software is eating the world. Blockchain is eating money. Ethworks is cooking.

Marek Kirejczyk

Written by

Ethereum blockchain Engineer. Ethworks, Universal Login.


Software is eating the world. Blockchain is eating money. Ethworks is cooking.

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store