Skip to content

Instantly share code, notes, and snippets.

@toanalien
Created April 23, 2018 03:36
Show Gist options
  • Select an option

  • Save toanalien/a02874d44a41d6db058cfdfe9b96dbde to your computer and use it in GitHub Desktop.

Select an option

Save toanalien/a02874d44a41d6db058cfdfe9b96dbde to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.0;
contract Counter {
int private count = 0;
function incrementCounter() public {
count += 1;
}
function decrementCounter() public {
count -= 1;
}
function getCount() public constant returns (int) {
return count;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment