Closed f00bar closed 8 years ago
I'm looking at this example and we are doing exactly that. You can easily test it outside of this tool and you'll probably get the same error. Let me know what do you think.
allEvents seems to be working when I'm going through web3:
> var events = epcisInstance.allEvents({fromBlock: 0, toBlock: 'latest'})
undefined
> events.watch(function(error, event){
...... if (!error)
...... console.log(event);
...... });
[object Object]
[object Object]
[object Object]
Should be fixed in https://github.com/ethereum/web3.js/pull/355 when merged. For the time being I'm using my own web3 fork.
allEvents catches all events emitted by a contract: https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-allevents
To reproduce execute: allEvents({}, {fromBlock: 0, toBlock: 'latest'}).watch and make you contract execute two or more events.