Created
August 18, 2017 19:36
-
-
Save designium/7aa323641f6c8b9c40cb1c069e60b484 to your computer and use it in GitHub Desktop.
This file contains hidden or 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.11; | |
contract Counter { | |
/* define variable count of the type uint */ | |
uint count = 0; | |
/* this runs when the contract is executed */ | |
function increment() public { | |
count = count + 1; | |
} | |
/* used to read the value of count */ | |
function getCount() constant returns (uint) { | |
return count; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment