Releases: TrueFiEng/Waffle
Releases · TrueFiEng/Waffle
2.5.1
Changes:
- This version fixes problems with flattening complex smart contracts directories
3.0.0-beta.1
This prerelease migrates to ethers v5
2.5.0
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
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
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
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
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
andnot.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
Changes:
- Introduce
MockProviderLike
interface that enables third party providers to use the legacygetWallets
api.
2.3.1
This release fixes ganache's "Incompatible EIP155" error.
2.3.0
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 rootwaffle-chai
- home of the chai matcherswaffle-provider
- implementation of theMockProvider
and fixtureswaffle-compiler
- compilation of Solidity smart contracts
- Add
MockProvider
class- it extends
providers.Web3Provider
- you create it using
new MockProvider(options?)
instead ofcreateMockProvider(options?)
- use
provider.getWallets()
instead ofgetWallets(provider)
. This allows for a shorthand:new MockProvider().getWallets()
- use
provider.createEmptyWallet()
to get a random Wallet without any ETH
- it extends
- Deprecate
createMockProvider
- Deprecate
getGanacheOptions
- Deprecate
getWallets