An upgraded on-chain messaging contract with per-address message tracking and delete functionality, from the same Frontier developer who built the simpler Messa
Key Facts
Description
An upgraded messaging contract deployed at block 53,212 (August 2015) on Ethereum Frontier. This version adds per-address message tracking via a hashes mapping and a messages lookup, plus the ability to delete messages. Users call sendMessage(address, string) to store a message, indexed by sha3 hash with the timestamp recorded. Each recipient gets their own list of message hashes. Same deployer (0x8674c218) as the simpler MessagingContract at rank 36, the Ponzi at rank 33, and the verified MessageStore at rank 27.
Source Verified
near_exact_match: reconstructed source produces 1557b runtime (target 1543b = 99.1% match) with soljson v0.3.1 no-opt. All 6 selectors confirmed via openchain.xyz. 14-byte diff likely from delete implementation 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 {
mapping(bytes32 => string) messageContents;
mapping(bytes32 => uint) messageTime;
mapping(address => bytes32[]) public hashes;
mapping(address => mapping(bytes32 => bool)) public messages;
function sendMessage(address to, string content) {
bytes32 h = sha3(msg.sender, to, content);
messageContents[h] = content;
messageTime[h] = block.timestamp;
hashes[to].push(h);
}
function getMessageContents(bytes32 hash) constant returns (string) {
return messageContents[hash];
}
function getMessageTime(bytes32 hash) constant returns (uint) {
return messageTime[hash];
}
function deleteMessage(bytes32 hash) {
delete messageContents[hash];
delete messageTime[hash];
}
}