Created
July 28, 2016 14:30
-
-
Save anonymous/29fcacfaa7404b2866e2870a14a288c7 to your computer and use it in GitHub Desktop.
Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version=soljson-latest.js&optimize=undefined&gist=
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
/** | |
* collection of code (its functions) and data (its state) | |
* that resides at a specific address on the Ethereum blockchain. | |
* think of it as a single slot in a database that can be | |
* queried and altered by calling functions of the code that | |
* manages the database | |
* **/ | |
contract SimpleStorage { | |
//declares a state variable called storedData of type | |
//uint (unsigned integer of 256 bits) | |
uint storedData; | |
function set(uint x) { | |
storedData = x; | |
} | |
function get() constant returns (uint retVal) { | |
return storedData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment