Skip to content
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

subscribe(“logs”) don't support address list? #1195

Closed
netpi opened this issue Nov 23, 2017 · 7 comments
Closed

subscribe(“logs”) don't support address list? #1195

netpi opened this issue Nov 23, 2017 · 7 comments

Comments

@netpi
Copy link

netpi commented Nov 23, 2017

as web3.js document it support subscribe(“logs”) by address array

image

// work well
web3.eth.subscribe('logs',{address:"address1"}).on('data',console.log)
// can't work
web3.eth.subscribe('logs',{address:["address1","address2"]}).on('data',console.log)
// also can't work
web3.eth.subscribe('logs',{address:"address1,address2"}).on('data',console.log)

image

So how to listen to multiple addresses?

@frozeman
Copy link
Contributor

Good point. Actually it supports only one. Could you test the raw subscribe endpoint, whether it supports arrays as well? If so we can make that in 1.0 possible

@joojis
Copy link

joojis commented Dec 19, 2017

The same problem here with the getPastLogs and the corresponding JSON-RPC doc is describing itself to support it.

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_getlogs
Contract address or a list of addresses from which logs should originate.

I hope that I could check the JSON-RPC actually supports it in the near future.

@mikemcdonald
Copy link

Is there a rough ETA on subscribe working with an array of addresses in 1.0? Trying to decide if I should rewrite a good amount of code back to 0.20 or wait until this is added.

@frozeman
Copy link
Contributor

@mikemcdonald @joojis can you please test the latest 1.0 branch and see if you can receive logs from multiple addresses? Sorry for the delay!

@mikemcdonald
Copy link

Looks great, thanks again!

@swarupdonepudi
Copy link

@frozeman what version of the npm package is this change available with?

@nivida
Copy link
Contributor

nivida commented Aug 9, 2018

@swarupdonepudi since 1.0.0-beta.28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants