February 2018
Intermediate to advanced
288 pages
6h 58m
English
EVM logging facilities can be conveniently used by a smart contract via events. How is this done using events? Well, JavaScript comes to the rescue here. While developing DApps, the frontend is almost always a JavaScript page, mostly using Node.js or web3.js. These pages listen for events and, in turn, initiate JavaScript calls in the DApp's user interface.
When such event calls happen, they cause arguments to get stored in transaction logs. These logs are a special data structure in the blockchain and are associated with the address of the contract. These logs stay as long as a block is accessible. We cannot access the event or log data within a contract. This requires PoW. Events are inheritable and a great tool for debugging smart ...