Skip to content

Instantly share code, notes, and snippets.

@stupeters187
Created January 18, 2019 16:04
Show Gist options
  • Save stupeters187/ca1a504fc252eb0f4053bfd4f4a7db94 to your computer and use it in GitHub Desktop.
Save stupeters187/ca1a504fc252eb0f4053bfd4f4a7db94 to your computer and use it in GitHub Desktop.
Hello World Solidity Smart Contract
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