Skip to content

Instantly share code, notes, and snippets.

@csy1204
Created December 7, 2018 01:55
Show Gist options
  • Save csy1204/a35ed12f2575c3f70f3091dd5c87bf26 to your computer and use it in GitHub Desktop.
Save csy1204/a35ed12f2575c3f70f3091dd5c87bf26 to your computer and use it in GitHub Desktop.
[Smart Contract 1] Ethereum Solidity Smart Contract #solidity #SmartContract
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