An on-chain messaging contract that adds a nonce for unique message hashing, part of a four-deployment messaging iteration on Frontier.
Key Facts
Description
A messaging contract deployed at block 54,304 (August 2015). This version adds a public nonce counter used in the sha3 hash computation to ensure unique message IDs even for identical content. Same deployer (0x8674c218) and core function set as ranks 36, 37, and 43.
Source Verified
near_exact_match: reconstructed source with nonce-based sha3 hashing. All selectors confirmed via openchain.xyz (including affed0e0=nonce()).
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;
uint public nonce;
function sendMessage(address to, string content) {
bytes32 h = sha3(msg.sender, to, content, nonce++);
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];
}
}