Created
September 14, 2016 11:47
-
-
Save blackyblack/7063ee7f1a2931de13740b83aa76826d 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
/* A contract to store only messages approved by owner */ | |
/* Deployment: | |
Owner: 0xeb5fa6cbf2aca03a0df228f2df67229e2d3bd01e | |
Last address: 0x0318179601a70085aeb488f178b081295b65ecc9 | |
ABI: [{"constant":false,"inputs":[{"name":"datainfo","type":"string"},{"name":"version","type":"uint256"}],"name":"add","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"kill","outputs":[],"type":"function"},{"constant":false,"inputs":[],"name":"flush","outputs":[],"type":"function"},{"constant":true,"inputs":[],"name":"contentCount","outputs":[{"name":"","type":"uint256"}],"type":"function"},{"inputs":[],"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"datainfo","type":"string"},{"indexed":true,"name":"version","type":"uint256"}],"name":"content","type":"event"}] | |
Optimized: yes | |
Solidity version: 0.3.2-9e36bdda | |
*/ | |
contract self_store { | |
address owner; | |
uint public contentCount = 0; | |
event content(string datainfo, uint indexed version); | |
modifier onlyowner { if (msg.sender == owner) _ } | |
function self_store() public { owner = msg.sender; } | |
///TODO: remove in release | |
function kill() onlyowner { suicide(owner); } | |
function flush() onlyowner { | |
owner.send(this.balance); | |
} | |
function add(string datainfo, uint version) onlyowner { | |
contentCount++; | |
content(datainfo, version); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment