Events allow you to access the EVM logging facility, which can be used to keep state change information or to execute callbacks in the DApps. In this recipe, you will learn how to listen for new events raised in the contract and retrieve data stored in the transaction logs.
Watching events from your DApp
Getting ready
You need to have web3.js installed in your application to use these methods. Ensure that you have a geth- or Ganache-based Ethereum network to connect and test these methods.
How to do it...
We can watch events from DApp using the following steps:
- Consider...