I'm simply trying to setup an event listener with web3 and metamask.
incrementEvent = existingContract.events.Incremented(function(error, event){
if (error) console.log(error);
console.log("event is: ", event);
})
Result:
Error: The current provider doesn't support subscriptions: MetamaskInpageProvider
at Subscription.subscribe (bundle.js:45443)
at Contract._on (bundle.js:48777)
at (index):48
at tryCatcher (bundle.js:44235)
at Promise._settlePromiseFromHandler (bundle.js:42267)
at Promise._settlePromise (bundle.js:42325)
at Promise._settlePromise0 (bundle.js:42370)
at Promise._settlePromises (bundle.js:42453)
at bundle.js:39334
at MutationObserver.<anonymous> (bundle.js:43502)
(index):50 event is: null
How do you listen to contract events with metamask?