Verified contractPartial
Messages
Address0xce6cf9da3cd2ca4d6f7bcd4ee4335232386d8809
- Balance
0 ETH
- Transactions
1
- Compiler
solc 0.1.3
- Same code
Only this contract
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
- 55,444
- Creation transaction
- 0x54db661f9c…feea186118
Messages.sol
// Recovered by EthereumHistory (ethereumhistory.com) -sw
contract Messages {
struct Message {
uint64 time;
string contents;
}
mapping (address => mapping (bytes32 => Message)) public messages;
mapping (address => bytes32[]) public hashes;
bytes32 public hash;
function sendMessage(address to, string contents) {
hash = sha3(contents);
Message m;
m.time = uint64(now);
m.contents = contents;
messages[to][hash] = m;
for (uint i = 0; hashes[to][i] != 0; i++) {}
}
function deleteMessage(bytes32 h) {
delete messages[msg.sender][h];
for (uint i = 0; i < hashes[msg.sender].length; i++) {
if (hashes[msg.sender][i] == h) {
delete hashes[msg.sender][i];
}
}
}
function t() returns (bytes32) {
return hash;
}
function getMessageHashes() returns (bytes32[]) {
return hashes[msg.sender];
}
function getMessageTime(bytes32 h) returns (uint) {
return messages[msg.sender][h].time;
}
function getMessageContents(bytes32 h) returns (string) {
return messages[msg.sender][h].contents;
}
}
Compiler settingsShow
{
"optimizer": {
"runs": 200,
"enabled": true
}
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.