Cookbook
@cookbookdev
Events allow logging to the Ethereum blockchain, but why use them? https://i.imgur.com/z4mOVsA.png
1 reply
0 recast
0 reaction
Cookbook
@cookbookdev
First, it's important to understand what events do. When you call events, they cause the arguments to be stored in the transaction’s log, which is a special data structure in the blockchain.
1 reply
0 recast
0 reaction
Cookbook
@cookbookdev
They allow smart contracts to index variables in order to rebuild the storage stage. You can use the indexed variables to long blockchain data serverside.
1 reply
0 recast
0 reaction
Cookbook
@cookbookdev
Events also help to automatically update the user interface. By tracking events, you can change the front end of your dApp when a certain action has occurred.
1 reply
0 recast
0 reaction
Cookbook
@cookbookdev
Finally, events allow for the testing of specific variables. By tracking events, you can better bugtest and improve your dApp!
0 reply
0 recast
0 reaction