Events

As per the ERC20 standard, there are only two events that need to be logged when a certain function of the contract is called.

The events will only be logged when the transaction is successful. For all failed transactions, these events will not be triggered and logged.

As we saw in the previous chapters, Solidity events can also be filtered. On the client applications, you can subscribe to the topics to listen for the events when they are logged on the Ethereum blockchain. Once these events are triggered, on the client application, you get a notification. Based on these notifications, you can perform your actions. These notifications are push notifications from the Ethereum blockchain (the node you are connected with) to your client application.

Now, let's look into the Transfer event.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.18.33