Created
February 6, 2020 17:43
-
-
Save stamatim/2ad927b21e3d27b1c26abbc9431aeefe to your computer and use it in GitHub Desktop.
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
/* | |
* Basic smart contract layout using Ethereum's Solidity | |
*/ | |
pragma solidity ^0.4.0; // instructions for compiler on how to treat source code | |
contract Storage { | |
uint data; // 256-bit unsigned int state variable | |
function set(uint x) public { // modify value of state variable | |
storedData = x; | |
} | |
function get() public view returns (uint) { // return value of state variable | |
return storedData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment