One of the earliest messaging contracts on Ethereum, allowing users to send on-chain messages stored by content hash.
Key Facts
Description
A messaging contract deployed at block 53,108 (August 2015) on Ethereum Frontier. Users call sendMessage(address, string) to store a message on-chain, indexed by sha3 hash. Messages are stored as structs containing the sender address, content string, and timestamp. The contract tracks all message hashes in an array accessible via getMessageHashes(). Individual messages can be retrieved by hash using getMessageContents() and getMessageTime(). Same deployer (0x8674c218) as the MessageStore at rank 27 and the Ponzi at rank 33.
Source Verified
near_exact_match: reconstructed source produces 1387b runtime (target 1377b = 99.3% match) with soljson v0.3.1 no-opt. All 4 selectors confirmed via openchain.xyz. 10-byte diff likely from minor sha3 arg or struct assignment variant.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
This contract has verified source code.
Show source code (Solidity)
contract Messaging {
struct Message {
address sender;
string contents;
uint time;
}
mapping(bytes32 => Message) messages;
bytes32[] messageHashes;
function sendMessage(address to, string content) {
bytes32 h = sha3(msg.sender, to, content);
messages[h] = Message({sender: msg.sender, contents: content, time: block.timestamp});
messageHashes.push(h);
}
function getMessageContents(bytes32 hash) constant returns (string) {
return messages[hash].contents;
}
function getMessageTime(bytes32 hash) constant returns (uint) {
return messages[hash].time;
}
function getMessageHashes() constant returns (bytes32[]) {
return messageHashes;
}
}