The Greeter from the solidity-baby-steps tutorials, deployed with an empty greeting.
Context
Deployed 1 December 2015, during the Frontier era.
Key Facts
Description
Example 5 of the solidity-baby-steps tutorial series. It keeps a creator address and a greeting string, returns the greeting from greet, exposes getBlockNumber as a second demonstration of reading a global, lets anyone replace the greeting through setGreeting, and lets the creator kill the contract. It is not the ethereum.org greeter, which splits the owner and the kill into a separate mortal contract; this one keeps everything in a single Greeter and compiles to different bytecode as a result. The constructor argument is an empty string, so greet returns nothing until someone calls setGreeting. Compiled with the optimizer on.
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)
/*
The following is an extremely basic example of a solidity contract.
It takes a string upon creation and then repeats it when greet() is called.
*/
contract Greeter // The contract definition. A constructor of the same name will be automatically called on contract creation.
{
address creator; // At first, an empty "address"-type variable of the name "owner". Will be set in the constructor.
string greeting; // At first, an empty "string"-type variable of the name "greeting". Will be set in constructor and can be changed.
function Greeter(string _greeting) public // The constructor. It accepts a string input and saves it to the contract's "greeting" variable.
{
creator = msg.sender;
greeting = _greeting;
}
function greet() constant returns (string)
{
return greeting;
}
function getBlockNumber() constant returns (uint) // this doesn't have anything to do with the act of greeting
{ // just demonstrating return of some global variable
return block.number;
}
function setGreeting(string _newgreeting)
{
greeting = _newgreeting;
}
/**********
Standard kill() function to recover funds
**********/
function kill()
{
if (msg.sender == creator)
suicide(creator); // kills this contract and sends remaining funds back to creator
}
}External Links
Related contracts
MessageStore
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, 2015basicInfoGetter
Same eraA tour of the EVM globals, carrying the constructor of the file it was copied from
0xad826c...d33547August 31, 2015Contract 0x3ea0db...b922e0
Same eraThe basic info getter from the solidity-baby-steps tutorials, a read only window onto the block and message globals.
0x3ea0db...b922e0August 31, 2015Contract 0xba575c...78733f
Same eraA contract built to probe what the msg globals actually return, endowed with 5 ETH, deployed 1 September 2015.
0xba575c...78733fSeptember 1, 2015Contract 0x8b180c...c084df
Same eraA third deployment of the msgExaminer that records its own creation message
0x8b180c...c084dfSeptember 1, 2015Contract 0x46dce1...3086aa
Same eraA contract built to probe what the msg globals return, endowed with 3 ETH on 1 September 2015.
0x46dce1...3086aaSeptember 1, 2015