Last active
January 22, 2018 03:35
-
-
Save sogoiii/3f871a90e7e094eca27d084846079dda to your computer and use it in GitHub Desktop.
Sample Solidity Events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract MyContract { | |
event Transfer(address indexed from, address indexed to, uint256 value); /* This is an event */ | |
function MyContract() {} /* a constructor */ | |
function transfer(address _to) public { | |
Transfer(msg.sender, _to, msg.value); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment