Skip to content

2.0.0

Compare
Choose a tag to compare
@marekkirejczyk marekkirejczyk released this 16 Jan 14:45
· 468 commits to master since this release

What's new in 2.0

Documentation

Documentation is now available. Check it out under the URL: https://ethereum-waffle.readthedocs.io/.

Faster compilation with native and dockerized solc

By default, Waffle uses solcjs. Solcjs is solidity complier cross-complied to javascript. It can be slow for bigger projects but require no installation. You can now use native and dockerized solc instead.

Read more about fast compilation here

New chai matcher: changeBalance and changeBalances

Waffle 2.0 introduces changeBalance and changeBalances matchers that allow to check if a balance of an account(s) changed.

Read more about new matchers here.

Support for TypeScript

The code is now rewriteen in TypeScript and we offer partial TypeScript support. For now, it does not include chai matchers. We plan to include full TypeScript support in version 2.1

Fixtures

When testing code dependent on smart contracts it is often useful to have a specific scenario play out before every test. That leads to repetition and slow code execution. With fixtures, you can clean-up your code and speed it up by order of magnitude.

Read more about fixtures here.

Others

  • Waffle now supports config files with both json and js extensions.
  • Contract linking should work for both solidity 4 and solidity 5
  • Waffle is now officially released under MIT license
  • Compilation is covered with extensive end-to-end tests

Breaking changes

  • getWallet() function is not async anymore
  • Support for node versions older than 10.* is now disabled
  • New format of compilation output files is introduced. It is incompatible with the older version and with truffle. Use the following flag in the waffle configuration file to get the file with compatible output:
    "legacyOutput": "true"