Events

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
}
}
..................Content has been hidden....................

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