The State Machine example from the Solidity documentation's common patterns page, deployed as written with its empty function bodies.
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 27 December 2015, during the Frontier era.
Key Facts
Description
The StateMachine example from the common patterns page of the Solidity documentation, deployed unchanged. It holds a Stages enum running from AcceptingBlindedBids through RevealBids, AnotherStage and AreWeDoneYet to Finished, and a creationTime recorded at deployment. The timedTransitions modifier advances the stage once ten days have passed for the first and twelve for the second, and the remaining stages advance only when a function carrying transitionNext is called. bid and reveal have empty bodies in the documentation and are empty here too, so the contract does nothing but hold and advance a stage counter. Deployed by the same address as the SimpleAuction at 0xa46f385e79c13449ffad2ab75073d7a616626d7d thirty seven minutes earlier, in a run through the documentation's examples.
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 StateMachine {
enum Stages {
AcceptingBlindedBids,
RevealBids,
AnotherStage,
AreWeDoneYet,
Finished
}
// This is the current stage.
Stages public stage = Stages.AcceptingBlindedBids;
uint public creationTime = now;
modifier atStage(Stages _stage) {
if (stage != _stage) throw;
_
}
function nextStage() internal {
stage = Stages(uint(stage) + 1);
}
// Perform timed transitions. Be sure to mention
// this modifier first, otherwise the guards
// will not take the new stage into account.
modifier timedTransitions() {
if (stage == Stages.AcceptingBlindedBids &&
now >= creationTime + 10 days)
nextStage();
if (stage == Stages.RevealBids &&
now >= creationTime + 12 days)
nextStage();
// The other stages transition by transaction
}
// Order of the modifiers matters here!
function bid()
timedTransitions
atStage(Stages.AcceptingBlindedBids)
{
// We will not implement that here
}
function reveal()
timedTransitions
atStage(Stages.RevealBids)
{
}
// This modifier goes to the next stage
// after the function is done.
// If you use `return` in the function,
// `nextStage` will not be called
// automatically.
modifier transitionNext()
{
_
nextStage();
}
function g()
timedTransitions
atStage(Stages.AnotherStage)
transitionNext
{
// If you want to use `return` here,
// you have to call `nextStage()` manually.
}
function h()
timedTransitions
atStage(Stages.AreWeDoneYet)
transitionNext
{
}
function i()
timedTransitions
atStage(Stages.Finished)
{
}
}External Links
Related contracts
SimpleAuction
Same deployerThe Simple Open Auction from the Solidity documentation, opened for 1000 seconds with the deployer as beneficiary.
0xa46f38...626d7dDecember 27, 2015myKwh
Same deployerIdentical-runtime sibling. The ethereum.org 'advanced' MyToken (Homestead, Mar 2016): an issuer-minted token with mintToken, freezeAccount/FrozenFunds and the s
0x3cf9b4...9626c9February 10, 2016windKwh
Same deployerTwenty five indivisible units standing for kilowatt hours of wind generation.
0xcb9df5...7341e0February 14, 2016token
Same eraAn early ERC-20-like token deployed in Ethereum's first week, built directly from the example in the official Ethereum Frontier Guide documentation.
0x8374f5...46609aAugust 7, 2015token
Same eraA second deployment of the FirstCoin tutorial token by the same creator, 11 blocks after the original — both derived from the official Ethereum Frontier Guide e
0x3b4446...295f52August 7, 2015Contract 0xd958b5...ec4c9f
Same eraEthereum.org tutorial Coin contract deployed on Frontier day 1. Contains a bug: balance(address) ignores its argument and returns msg.sender balance.
0xd958b5...ec4c9fAugust 7, 2015