TrueFiEng / Waffle

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

[Feature Request] `changeTokenBalance` matcher for ERC721 and ERC1155 balances #805

Open mr13tech opened 1 year ago

mr13tech commented 1 year ago

Is your feature request related to a problem? Please describe. Unit tests assert change of NFT balances; It will be great to have matcher to check NFT balance change after transaction.

Describe the solution you'd like changeTokenBalance alike matcher for NFT balances.

rzadp commented 1 year ago

@mr13tech How do you imagine it working exactly? Looking at a particular single NFT, you could have a balance of 0 or 1 - or do you have something else in mind?

Do you maybe have an existing test you could share, and then what you imagine would be a better test using new changeTokenBalance matcher, for comparision?