Skip to content

Instantly share code, notes, and snippets.

@EtherTyper
Forked from anonymous/Untitled
Last active March 11, 2016 19:37
Show Gist options
  • Save EtherTyper/1b71fbff29df3306540b to your computer and use it in GitHub Desktop.
Save EtherTyper/1b71fbff29df3306540b to your computer and use it in GitHub Desktop.
contract ForumSite{
struct message{
string title;
string content;
int replyTo;
uint8[3] replies;
}
mapping (uint=>message) chain;
uint pos;
function ForumSite(string title_, string message_){
chain[0]=message(title_,message_,0,[0,0,0]);
}
function printMessage() constant returns (string){
return chain[0].title;//+"\n------------------\n"+chain[0].content+"\n\nIn reply to "+chain[0].replyTo;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment