Skip to content

Instantly share code, notes, and snippets.

@designium
Created August 18, 2017 19:36
Show Gist options
  • Save designium/7aa323641f6c8b9c40cb1c069e60b484 to your computer and use it in GitHub Desktop.
Save designium/7aa323641f6c8b9c40cb1c069e60b484 to your computer and use it in GitHub Desktop.
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