You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.
Numeric event parameters (e.g. uint256 in solidity) are represented as bn.js instances. It looks like currently it is not possible to check these numbers, as the equality check is not aware of BN and thus fails.
Ideally i would be able to create a filter Object with BN instances. Assume a transaction emits the event "idEvent" with the parameter "id" being an uint256, i would like to do:
truffleAssert.eventEmitted(result, 'IdEvent', {
id: new BN('1')
})
Describe alternatives you've considered
Another option would be to check the string representation of a BN instance, so one could write the filter like this:
Numeric event parameters (e.g. uint256 in solidity) are represented as bn.js instances. It looks like currently it is not possible to check these numbers, as the equality check is not aware of BN and thus fails.
Ideally i would be able to create a filter Object with BN instances. Assume a transaction emits the event "idEvent" with the parameter "id" being an
uint256
, i would like to do:Describe alternatives you've considered
Another option would be to check the string representation of a BN instance, so one could write the filter like this:
(This is what
web3.eth.abi.decodeLog
does - any BN instance is decoded to it's string representation)The text was updated successfully, but these errors were encountered: