Filtering with checksum addresses
See original GitHub issueCross-linked from: https://github.com/trufflesuite/ganache-cli/issues/494
- I asked about this on gitter: [x] – no response yet
Expected Behavior
- A deployed contract is emitting logs.
- A filter is created that specifies a from address using the checksum address format from EIP-55
- The events are triggered in new blocks
- A client requests new entries tied to the created filter
- The logs are returned
Current Behavior
Everything as expected, except the last step: no logs are returned.
Note that if the lower-case address is used in the filter instead, that logs are returned. So all other steps appear to be configured correctly.
Possible Solution
Force addresses to lower-case in the filter before searching? (optionally, verifying checksums)
Steps to Reproduce (for bugs)
I’m cross-posting from a web3py bug report, which includes source: https://github.com/ethereum/web3.py/issues/674
Given the simplicity of the workaround, it seems that the problem should be easy to reproduce.
Context
Without this fix, ganache
filters will appear broken in the next stable release of web3py, which is likely within a week or two. All other nodes appear to work as expected.
Your Environment
I’ll ask the original posters on the web3.py issue to fill in this info:
- Version used:
- Version of Truffle/Remix/Other tools used:
- NodeJS Version: [ ] 6.x, [ ] 7.x (unsupported), [ ] 8.x, [ ] 9.x
- Operating System and version (include distro if Linux):
- Link to your project or repro gist:
- Commit hash to use with above link for reproduction:
- I intend to submit a pull request to fix this issue: [ ]
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:11 (5 by maintainers)
@carver ganache-core@2.1.3 and ganache-cli@6.1.4 were just released
@Zatonskikh this is OT for this repository. I’ll give my first guess about what’s wrong below. If you have any more questions, I recommend opening an ethereum.stackexchange question or a new issue on ethereum/web3.py
Since you’re setting
fromBlock='latest'
, you won’t see the event unless it was emitted in the very latest block.