March 2019
Intermediate to advanced
636 pages
27h 50m
English
Events are used to track the execution of a transaction sent to a contract. There are convenient interfaces with the EVM logging facilities. Here is an example, as follows:
pragma solidity ^0.4.24;contract Purchase { event buyEvent(address bidder, uint amount); // Event function buy() public payable { emit buyEvent(msg.sender, msg.value); // Triggering event }}
Read now
Unlock full access