TrueFiEng / Waffle

Library for writing and testing smart contracts.
https://getwaffle.io
MIT License
961 stars 162 forks source link

Add optional delta field to `changeTokenBalance` matcher #806

Closed HubertNastaly closed 1 year ago

HubertNastaly commented 2 years ago

It would be very convenient to have a combination of closeTo and changeTokenBalance matchers so that it's possible to check that balance changed within some margin of error. I propose to add optional field to changeTokenBalance: changeTokenBalance(token, address, amount, delta?)