Created
August 6, 2018 19:44
-
-
Save matYang/9245b82aa6ccf947b6f27f44e6c659ac to your computer and use it in GitHub Desktop.
copy & paste into Remix for contract invocation, contract deployed at 0xbf305049bcefe28777104d5cbbcc8f58e6b21f69 Ethereum mainnet
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.24; | |
contract BestWeddingWishes { | |
string public constant groom = "Shuo, Chang"; | |
string public constant bride = "Yanyan, Zhang"; | |
string public constant dateStr = "Aug 5th, 2018"; | |
string[] public wishes; | |
function add(string _message) external returns (bool) { | |
wishes.push(_message); | |
return true; | |
} | |
function read(uint256 idx) external view returns (string) { | |
return wishes[idx]; | |
} | |
function count() external view returns (uint256) { | |
return wishes.length; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment