Created
January 18, 2019 16:04
-
-
Save stupeters187/ca1a504fc252eb0f4053bfd4f4a7db94 to your computer and use it in GitHub Desktop.
Hello World Solidity Smart Contract
This file contains 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.5.2; | |
contract HelloWorld { | |
uint public num; | |
event NewNum(address indexed _who, uint _newNum, uint _timestamp); | |
constructor(uint _num) public { | |
num = _num; | |
} | |
function setNum(uint _newNum) public { | |
num = _newNum; | |
emit NewNum(msg.sender, _newNum, now); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment