Hot answers tagged

2

They are both subscriptions to events, but filtered a little differently. myContract.events.MyEvent() will only return MyEvent events from the specific contract address that you used to create the web3 contract myContract web3.eth.subscribe('logs', ...) will subscribe to all blockchain events by default. Per the web3 documentation you can use: web3.eth....


Only top voted, non community-wiki answers of a minimum length are eligible