Created
December 7, 2018 01:55
-
-
Save csy1204/a35ed12f2575c3f70f3091dd5c87bf26 to your computer and use it in GitHub Desktop.
[Smart Contract 1] Ethereum Solidity Smart Contract #solidity #SmartContract
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.5.0 | |
contract SimpleContract { | |
uint256 value = 0; | |
bool success = false; | |
constructor() public { | |
value = 1; | |
} | |
function addValue(uint256 _input) public returns (bool) { | |
value += _input; | |
if (value > _input) { success = true } | |
return success | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment