0

In a dapp application who listens to events? the geth node or my node.js component (backend component? enter image description here

How can I implement the listen function in web3.js?

1 Answer 1

0

Just like all the others outputs, Web3.js handles the events.

1
  • yes but what is the process? The backend requests new blocks from the geth, extracts events from them and selects the necessary ones. Is it correct? How can I implement the listen function in web3.js? is it more correct to use myContract.events.MyEvent () orweb3.eth.subscribe ('logs',…)?
    – Mario Roma
    Jan 21, 2021 at 21:04

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.