Skip to content

Instantly share code, notes, and snippets.

@sogoiii
Last active January 22, 2018 03:35
Show Gist options
  • Save sogoiii/3f871a90e7e094eca27d084846079dda to your computer and use it in GitHub Desktop.
Save sogoiii/3f871a90e7e094eca27d084846079dda to your computer and use it in GitHub Desktop.
Sample Solidity Events
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