I have two contract address and I want to check events on both in one call. I mean, can we pass two contract address in one option param like i do below?

let web3 = new Web3();
let options = {
  toBlock: 'latest',
  address: ADDRESS1,Address2
let filter = web3.eth.filter(options);
filter.watch(function(error, result){

Or there is any way to combine all events from both contract?


This would only work if the events have the same signature (event name and arguments) or none ( [] ).
You pass in an array of the addresses you want to scan.

let options = {
  toBlock: 'latest',
  address: [ADDRESS1,Address2],
  topics: []
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.