The Greeter from the solidity-baby-steps tutorials, deployed with an empty greeting.
Historical Significance
The ethereum.org token tutorial is where most people who deployed a token in this period started, and this is its opening form: a balance mapping, a guarded subtraction and the metadata a wallet needs to show a name. It has no allowance, so nothing can spend on a holder's behalf and no exchange or escrow can be given a limit. That gap is exactly what ERC-20 was written to close, and copies like this one are the before picture.
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
Info
Same deployerA 280-byte contract that exposes one stored number through info() and can be destroyed by its deployer via kill().
0x44b10e...0dd430August 20, 2015Info
Same deployerA 280-byte contract that exposes one stored number through info() and can be destroyed by its deployer via kill().
0xef550c...ff98bcAugust 20, 2015greeter
Same deployerThe Frontier-era greeter tutorial contract: returns a constructor-set greeting from greet(), with an owner-only kill() inherited from mortal.
0x083e1d...0fb616August 30, 2015Contract 0xf3b6b2...2c6903
Same deployerThe Frontier greeter carrying one extra unused storage slot
0xf3b6b2...2c6903August 30, 2015greeter
Same deployerThe Frontier-era greeter tutorial contract: returns a constructor-set greeting from greet(), with an owner-only kill() inherited from mortal.
0x3ae3af...e4e04dAugust 31, 2015Greeter
Same deployerThe greeter with a changeable greeting and a block number reader
0x1b2ea4...4bafcbDecember 1, 2015