Skip to content

Instantly share code, notes, and snippets.

@JesseAbram
Created March 10, 2019 15:18
Show Gist options
  • Save JesseAbram/ad5e37fb5967fb15ec4db9ce0703d18c to your computer and use it in GitHub Desktop.
Save JesseAbram/ad5e37fb5967fb15ec4db9ce0703d18c to your computer and use it in GitHub Desktop.
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