I am subscribing to an event (just once, queued after an update) of a contract to reload the data like this on my react frontend:

const instance = new web3.eth.Contract(abi, address)
    {filter: {sender, txnId}}, 
    () => dispatch(loadConfirmations(address, txnId))

it works perfectly when I am on my custom network with ganache. But when I try the same thing on Kovan, the callback does not fire. I tried other methods to subscribe to events, but none of them work. Getting past events works.

Web3 is provided via window.ethereum and I use metamask to inject the web3.

Any idea why I can't subscribe to events on Kovan like this?

  • What service are you using in order to connect to kovan (in other words, what is your node URL)? – goodvibration Mar 25 '20 at 17:47
  • I am using the injected provider from metamask – Newti Mar 25 '20 at 17:56
  • It probably doesn't support catching events (and fetching Historical data in general). – goodvibration Mar 25 '20 at 18:02

Your Answer

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

Browse other questions tagged or ask your own question.