The guide's kill contract with a coin flip added to its fallback
Context
Deployed in December 2015 on the Frontier chain.
Key Facts
Description
It keeps the standard shape of the mortal example, an owner recorded at construction and a kill that returns the balance to that owner, and adds a payable fallback that gambles. Every payment reads the block timestamp: if it is even the call simply returns and the contract keeps the money, and if it is odd the sender is paid back twice what they sent. There is no check that the contract can cover the payout, so a win against an empty balance simply fails to send.
Source Verified
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
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Mortal {
address owner;
function Mortal() {
owner = msg.sender;
}
function kill() {
if (msg.sender == owner) {
suicide(owner);
}
}
function() {
var v = msg.value;
var t = block.timestamp;
if (t % 2 == 0) {
return;
} else {
msg.sender.send(2 * v);
}
}
}External Links
Related contracts
greeter
Same deployerThe classic Frontier 'greeter' (Nov 2015): a mortal-derived contract storing a constructor-set greeting returned by greet(), with an owner-only kill().
0x09338c...7e82d2November 2, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015CoinFlipper
Same eraA coin flip on the block timestamp that pays double or keeps the stake
0x6c8dda...5ef84eAugust 8, 2015Contract 0xa85146...9bbf06
Same erago-ethereum's built-in hash registrar, mapping a key to a content hash
0xa85146...9bbf06August 10, 2015Ballot
Same eraDelegated voting with a proposal count fixed at deployment
0x3cf26c...b6a8e1August 18, 2015Ballot
Same eraDelegated voting with a proposal count fixed at deployment
0x56ce77...b44745August 18, 2015