Created
June 21, 2017 21:16
-
-
Save behaviary/833de0015749142dabb0008825c0381f 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
pragma solidity ^0.4.0; | |
contract HelloEthereum { | |
string storedData; | |
function set (string name) { | |
storedData = name; | |
} | |
// function concatString(string a, string b) constant returns (string) { | |
// // TODO | |
// return a; | |
// } | |
function get() constant returns (string) { | |
return storedData; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For random people finding this gist and baffled why it's pinned on my gh profile: This was some example Solidity I wrote back in 2017. I sent this to a friend to show them how easy it was to write a smart contract on Ethereum. This was in Solidity 0.4.0, released in September of 2016. It was before Sol libraries and before proper string support. I feel like it's pretty nifty.
https://blog.soliditylang.org/2016/09/08/solidity-0.4.0-release-announcement/