Created
January 15, 2018 18:48
-
-
Save pram/1ac3254417a7662734d8b4683c1782e3 to your computer and use it in GitHub Desktop.
Solidity snippet
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.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