Skip to content

Instantly share code, notes, and snippets.

@ayeteng
Last active June 17, 2020 01:53
Show Gist options
  • Save ayeteng/48bc63d5b7500f94901389b888912a7b to your computer and use it in GitHub Desktop.
Save ayeteng/48bc63d5b7500f94901389b888912a7b to your computer and use it in GitHub Desktop.
pragma solidity^0.5.17;
contract StoreVar {
uint8 public _myVar;
event MyEvent(uint indexed _var);
function setVar(uint8 _var) public {
_myVar = _var;
emit MyEvent(_var);
}
function getVar() public view returns (uint8) {
return _myVar;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment