Created
March 10, 2019 15:18
-
-
Save JesseAbram/ad5e37fb5967fb15ec4db9ce0703d18c to your computer and use it in GitHub Desktop.
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.1; | |
contract count { | |
uint counter; | |
constructor () public { | |
counter = 0; | |
} | |
function increment(uint _counter) public { | |
require(msg.sender != tx.origin); | |
counter += _counter; | |
} | |
function decrement() public { | |
counter --; | |
} | |
function getCount() public view returns(uint){ | |
return counter; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment