Created
March 21, 2018 15:55
-
-
Save llSourcell/7581b4c4cc408b98be27e99018bffae7 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.16; | |
| contract HelloWorld { | |
| uint256 counter = 5; //state variable we assigned earlier | |
| function add() public { //increases counter by 1 | |
| counter++; | |
| } | |
| function subtract() public { //decreases counter by 1 | |
| counter--; | |
| } | |
| function getCounter() public constant returns (uint256) { | |
| return counter; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment