-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Contract Address Must Be Trimmed In EthFilter #405
Comments
Thanks. I think this is an important issue because apparently many people run into it (see StackOverflow) and there’s no clear error message (in fact, no indication that anything’s gone wrong at all). I suppose simply calling Or is this behavior intentional in order to enforce some spec? @conor10 |
Apparently this does not affect all clients, so it might be “their fault” (e.g., Truffle’s ganache-cli). But regardless it would be helpful to deal with this issue in Web3j. |
I’ve now noticed that
|
It would be great if this get fixed OR is mentioned somewhere, this would be fine as well. Just to sum up: With TestRPC/Ganache, the address submitted to EthFilter must exclude the beginning "0x", for Geth it must include "0x". The problem with the Maven generated sources is the inclusion of "0x" in the specific filter add method, so the method This might even be a bug in Ganache/TestRPC, but it should be noted somewhere in web3j or the Maven plugin. |
I think ganache-cli is misbehaving. Here are relevant quotes from the spec:
I’ll take it to the truffle guys, should be an easy fix. |
While trying to look into this I discovered that Edit: It was fixed here, while adding support for filtering with an array of addresses. It doesn’t matter anymore, but the issue was as follows: Even single addresses were passed as an array
So close and yet so far. Also, unrelatedly: they changed something about the txHash algorithm which makes transactions throw. |
Is this still an issue? |
No, tested with Ganache-1.3.1 and both versions (with prefix "0x" and without) do work now. From my side, this can be closed, can't reproduce the issue. |
Hello, Not sure why but I am facing same issue with web3j. I tried by using contract addres 0x prefix and without it and result below error
Tried address with 0x : Always getting error in Android Web3j Version : I am not using ganache or any wrapper. Contracts methods are executing successfully. But the logs which I've added in methods are getting cached in above source.Fetching transaction details working fine as per below
I am not using ganache or any wrapper. Can anyone please help me or guide me to make this working? Thanks |
Web3j Version: 3.3.1
TestRPC: 4.1.3
Subscribing to events using an EthFilter created with a contract address does not receive any events.
Nothing will be printed when activity occurs in the contract.
However, if you change the EthFilter creation to below, the events are correctly logged.
It appears that when a non-null address is provided to EthFilter, there is an attempt to add '0x' to the beginning somewhere which is causing the filter to not match any results.
The text was updated successfully, but these errors were encountered: