Skip to content

Releases: TrueFiEng/Waffle

2.5.1

20 May 15:50
b51cdfe
Compare
Choose a tag to compare

Changes:

  • This version fixes problems with flattening complex smart contracts directories

3.0.0-beta.1

05 May 18:36
86e2039
Compare
Choose a tag to compare
3.0.0-beta.1 Pre-release
Pre-release

This prerelease migrates to ethers v5

2.5.0

05 May 14:22
1b0b406
Compare
Choose a tag to compare

Changes:

  • Add calledOnContract matchers, eg.:
await token.balanceOf(wallet.address)
expect('balanceOf').to.be.calledOnContract(token);
await token.balanceOf(wallet.address)
expect('balanceOf').to.be.calledOnContractWith(token, [wallet.address]);
  • Add dockerized Vyper compilation (experimental), configurable from waffle.json file:
  "compilerType": "dockerized-vyper",
  "compilerVersion": "0.1.0"
  • Add flattener, launch from command line:
npx waffle flatten

@ethereum-waffle/mock-contract 2.4.1

05 May 11:59
6c42f51
Compare
Choose a tag to compare

This release addd MockContract functionality that allows to deploy dynamic contract mock and specify it's behavior, i.e.

const mockContract = await deployMockContract(wallet, contractAbi);
await mockContract.mock.<nameOfMethod>.returns(<value>)
await mockContract.mock.<nameOfMethod>.withArgs(<arguments>).returns(<value>)
await mockContract.mock.<nameOfMethod>.reverts()
await mockContract.mock.<nameOfMethod>.withArgs(<arguments>).reverts()

@ethereum-waffle/ens 2.4.1

05 May 12:01
6c42f51
Compare
Choose a tag to compare

This release introduces ENSBuilder, which allows to test smart contracts with ENS, i.e.

const ensBuilder: ENSBuilder = await createENSBuilder(wallet);
await ensBuilder.createTopLevelDomain('test');
await ensBuilder.createSubDomain('ethworks.test');
await ensBuilder.setAddress('vlad.ethworks.test', '0x001...03');

2.4.1

10 Apr 11:35
f373e7c
Compare
Choose a tag to compare

Changes:

  • Add support for tuple types in the human readable abi
  • Increase max output buffer size during native and docker compilation
  • Fix big number matchers (e.g to.be.above)
  • Add more big number matchers (gt, lt, gte, lte)

2.4.0

16 Mar 13:03
01536e9
Compare
Choose a tag to compare

Features:

  • new cleaner, simple configuration file, detailed description available in the documentation. The configuration file format is backward compatible.

Dependencies:

  • Update ethers version from ^4.0.0 to ^4.0.45

Bug fixes:

  • Fixed revertedWith('...') to work corretly with string argument

  • Correct mismatched error reports reverted and not.reverted

  • expect().to.emit.withArgs - recognises when an event is emitted multiple times with different args, e.g.

    expect(...).to
    .emit(contractA, "SuccessCall").withArgs(1)
    .emit(contractB, "SuccessCall").withArgs(0)

2.3.2

07 Feb 10:01
0f221ae
Compare
Choose a tag to compare

Changes:

  • Introduce MockProviderLike interface that enables third party providers to use the legacy getWallets api.

2.3.1

23 Jan 08:49
Compare
Choose a tag to compare

This release fixes ganache's "Incompatible EIP155" error.

2.3.0

16 Jan 09:33
Compare
Choose a tag to compare

Changes:

  • Istanbul support
  • Add event emitted matcher negation support, e.g.:
    await expect(events.emitTwo()).to.not.emit(events, 'One');
  • Migrate repository to a monorepo. Packages:
    • waffle-cli - direct successor to the previous repository root
    • waffle-chai - home of the chai matchers
    • waffle-provider - implementation of the MockProvider and fixtures
    • waffle-compiler - compilation of Solidity smart contracts
  • Add MockProvider class
    • it extends providers.Web3Provider
    • you create it using new MockProvider(options?) instead of createMockProvider(options?)
    • use provider.getWallets() instead of getWallets(provider). This allows for a shorthand: new MockProvider().getWallets()
    • use provider.createEmptyWallet() to get a random Wallet without any ETH
  • Deprecate createMockProvider
  • Deprecate getGanacheOptions
  • Deprecate getWallets