The mortal base of the go-ethereum Contract Tutorial deployed on its own: it records its creator and lets only that account destroy it.
Historical Significance
The ownership plus kill pair this contract implements is the shape early Solidity contracts inherited almost universally, and the tutorial that taught it introduced it on its own before using it. Deployed by itself it records a reader working through the page one contract at a time.
Context
Ethereum's Frontier network went live on 30 July 2015. The Contract Tutorial on the go-ethereum wiki, which the Frontier Guide included by reference, was the standard introduction of that period: it opens with a multiply function, then a mortal base, then the greeter, then a token. Contracts were compiled and deployed from the geth console.
Key Facts
Description
The mortal base contract from the Contract Tutorial on the go-ethereum wiki, deployed alone rather than as the parent of a greeter. Its constructor stores the account that created it, and kill() self-destructs the contract and sends any balance to that account. Nobody else can call it to any effect and there is nothing else to call.
A deployment like this is the deploy-and-destroy cycle being tested, not an application: the tutorial introduces mortal first and then builds the greeter on top of it.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Tangerine Whistle Era
Emergency fork to address DoS attacks. Repriced IO-heavy opcodes.
Bytecode Overview
Verified Source Available
This contract has verified source code on Etherscan.
Show source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract mortal {
/* Define variable owner of the type address*/
address owner;
/* this function is executed at initialization and sets the owner of the contract */
function mortal() { owner = msg.sender; }
/* Function to recover the funds on the contract */
function kill() { if (msg.sender == owner) suicide(owner); }
}
contract greeter is mortal {
/* define variable greeting of the type string */
string greeting;
/* this runs when the contract is executed */
function greeter(string _greeting) public {
greeting = _greeting;
}
/* main function */
function greet() constant returns (string) {
return greeting;
}
}
External Links
Related contracts
ECVerifyLib
Same eraSignature recovery library for the Devcon 2 attendee token
0x1dd4ab...4aa8cbNovember 2, 2016Contract 0xeeee2a...6133e5
Same eraEvent emitter library for the Devcon 2 attendee token
0xeeee2a...6133e5November 2, 2016Contract 0xec0d00...5cb4c8
Same eraSignature recovery library for the Devcon 2 attendee token
0xec0d00...5cb4c8November 2, 2016TokenEventLib
Same eraEvent emitter library for the Devcon 2 attendee token
0x63f94e...1392fbNovember 2, 2016Contract 0xaf5d0d...7ce190
Same eraEvent emitter library for the Devcon 2 attendee token
0xaf5d0d...7ce190November 2, 2016Contract 0xfdc627...e76d7f
Same eraAn address to address map with iteration, deployed as a shared library
0xfdc627...e76d7fNovember 7, 2016