The go-ethereum Contract Tutorial greeter, deployed with the greeting: Hello World!
Historical Significance
The Contract Tutorial was the introduction to Solidity that shipped with go-ethereum, and deploying the greeter was its final step. Each copy therefore preserves the sentence its author chose to write onto a public chain while learning the tools. The Solidity source here was recovered by compiling the tutorial text with period compilers until the output matched the deployed bytecode exactly.
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, and it named its three contracts mortal, greeter and token. Solidity was a few months old, contracts were compiled and deployed from the geth console, and no block explorer of the time kept the source, so the greeters survive as bytecode alone.
Key Facts
Description
The greeter is the worked example of the Contract Tutorial on the go-ethereum wiki. It inherits a base contract named mortal, which records the account that created it and exposes kill(), a function that self-destructs the contract and sends its balance to that account. Only the creator can call it.
The greeter itself adds one string. The constructor stores the greeting given at deployment and greet() returns it. There is no setter, so the greeting a copy is born with is the only greeting it ever has, and no account other than the creator can affect it.
This copy was deployed with the greeting: Hello World!
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 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
LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xd6b955...30dd2aSeptember 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x6197b2...2eda88September 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x78eea8...58ac23September 8, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xb84f79...af6a30September 9, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0xf6a239...378d81September 9, 2015LastIsMe
Same deployerA last-player-wins game: each entry makes the sender the last player, and after enough blocks with no new entry the pot is paid to them.
0x7d692b...5e0c15September 9, 2015