Verified contractPartial
Board
Address0x67b0daefc2b124cfdb1e52815efa89a84a097be8
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.1.3
- Same code
2 more contracts
Details
- Compiler
- solc 0.1.3+commit.028f561d
- Language
- solidity
- Optimization
- Yes, 200 runs
- License
- Not stated
- Match
- Partialcreation code: no, runtime code: yes
- Verified on Sourcify
- Created in block
- 119,015
- Creation transaction
- 0xa58d3d0a0f…a7b96681b2
Board.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Board {
struct Topic {
string title;
string body;
uint time;
}
struct Comment {
uint up;
uint down;
string title;
string body;
uint time;
uint topic;
address author;
uint parent;
}
address owner;
uint commentCount = 0;
uint topicCount = 0;
function Board() {
owner = msg.sender;
}
function kill() {
if (msg.sender == owner) suicide(owner);
}
function add(uint topic, string title, string body, uint parent) returns (bool) {
if (topic > 0 && (topic >= commentCount || comments[commentCount].time == 0)) return false;
comments[commentCount].title = title;
comments[commentCount].topic = topic;
comments[commentCount].time = now;
comments[commentCount].author = msg.sender;
comments[commentCount].body = body;
if (topic == 0) comments[commentCount].parent = parent;
commentCount++;
return true;
}
function vote(bool up, uint id) returns (bool) {
if (id < commentCount) {
if (up) comments[commentCount].up++;
else comments[commentCount].down++;
}
return true;
}
function addTopic(string title, string body) returns (bool) {
topics[topicCount].title = title;
topics[topicCount].body = body;
topics[topicCount].time = now;
topicCount++;
return true;
}
mapping (uint => Comment) public comments;
mapping (uint => Topic) public topics;
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.