Created
November 18, 2018 17:47
-
-
Save ylv-io/5cb31f65fbc9249fafdeb093f620ae47 to your computer and use it in GitHub Desktop.
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.4.24; | |
| import 'zeppelin-solidity/contracts/ownership/Ownable.sol'; | |
| contract AlienCodex is Ownable { | |
| bool public contact; | |
| bytes32[] public codex; | |
| modifier contacted() { | |
| assert(contact); | |
| _; | |
| } | |
| function make_contact(bytes32[] _firstContactMessage) public { | |
| assert(_firstContactMessage.length > 2**200); | |
| contact = true; | |
| } | |
| function record(bytes32 _content) contacted public { | |
| codex.push(_content); | |
| } | |
| function retract() contacted public { | |
| codex.length--; | |
| } | |
| function revise(uint i, bytes32 _content) contacted public { | |
| codex[i] = _content; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment