Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Consider moving from ethereum-waffle to hardhat-chai-matchers #165

Open
boyuanx opened this issue Nov 1, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@boyuanx
Copy link

boyuanx commented Nov 1, 2022

Feature Description

@nomicfoundation/hardhat-chai-matchers contains a few features and bug fixes that ethereum-waffle does not possess and greatly benefited my work, for example:

  • ethereum-waffle cannot match custom errors introduced in Solidity 0.8.4
  • ethereum-waffle sometimes fails to properly compare BigNumber and BigNumberish while @nomicfoundation/hardhat-chai-matchers seems to have better support for this
  • The matcher syntax generally remains the same, so no need to extensively rewrite legacy code

Additional Information

For instance, when performing .deep.equal on BigNumber[] and PromiseOrValue<BigNumberish>[], ethereum-waffle fails this comparison despite the underlying numbers being the same.

@boyuanx boyuanx added the enhancement New feature or request label Nov 1, 2022
@boyuanx
Copy link
Author

boyuanx commented Nov 1, 2022

Also just a side note, I wonder if there is a better way to compare structs (without mappings in them) than comparing their properties individually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant