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 Feb 26, 2024. It is now read-only.
It seems multiple addresses for eth_newFilter and eth_getLogs are not supported. Unlike geth (which has address: DATA|Array), ganache is only capable of filtering on a single address. If an array is passed (even with only a single item in it), ganache will always return an empty list, not matching anything.
As you can see, it only has equality check, so it would fail in presence of array. An obvious fix would be to check for type - e.g. do something in lines of
I was using Ganache-CLI (rather than Pythonic eth-testrpc) as
a standalone node implementation to test things against, and
the tests had failed on it.
The reason is, it's limited and its eth_newFilter implementation
only recognizes a single address. To support simple cases, this
commit converts from array (list) to scalar value if there's
only one element. This should be perfectly harmless and would
also allow some simple tests to past against buggy software.
It seems multiple addresses for
eth_newFilter
andeth_getLogs
are not supported. Unlike geth (which hasaddress: DATA|Array
), ganache is only capable of filtering on a single address. If an array is passed (even with only a single item in it), ganache will always return an empty list, not matching anything.Here's the relevant code:
https://github.com/trufflesuite/ganache-core/blob/d1646364d7e4ad667e4c522e0d7877bc962ba949/lib/statemanager.js#L601
As you can see, it only has equality check, so it would fail in presence of array. An obvious fix would be to check for type - e.g. do something in lines of
But - sorry - I'm to lazy to make a proper pull request.
(Copied from #322 (comment) where I've originally posted it. Found the relevant code in this project, so posting it here.)
The text was updated successfully, but these errors were encountered: