The Solidity-documentation open auction (Homestead, May 2016): bidders raise the highest bid (previous bidder refunded via send) and auctionEnd() pays the beneficiary once, guarded by a one-shot ended flag.
Historical Significance
The canonical SimpleAuction example from the Solidity documentation, an early version that ignores send return values and guards completion with a boolean flag rather than a time check.
Context
Compiled with soljson-v0.1.3 (optimizer ON); exact match of both the 534-byte runtime and 597-byte creation (plus 64 bytes of constructor args). A unique single-member deployment.
Key Facts
Source Verified
Exact bytecode match. Runtime: 534 bytes (byte-for-byte). Creation: 597 bytes + 64-byte ABI-encoded constructor args (_biddingTime, _beneficiary). Compiled with soljson-v0.1.3+commit.028f561d, optimizer ON. bid() refunds the previous high bidder and fires HighestBidIncreased; auctionEnd() pays this.balance to the beneficiary once and fires AuctionEnded. An early docs variant: send return values ignored, no time guard in auctionEnd (a one-shot ended flag), explicit reverting fallback.
Homestead Era
The first planned hard fork. Removed the canary contract, adjusted gas costs.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
contract SimpleAuction {
address public beneficiary;
uint public auctionStart;
uint public biddingTime;
address public highestBidder;
uint public highestBid;
bool ended;
event HighestBidIncreased(address bidder, uint amount);
event AuctionEnded(address winner, uint amount);
function SimpleAuction(uint _biddingTime, address _beneficiary) {
beneficiary = _beneficiary;
auctionStart = now;
biddingTime = _biddingTime;
}
function() { throw; }
function bid() {
if (now > auctionStart + biddingTime) throw;
if (msg.value <= highestBid) throw;
if (highestBidder != 0)
highestBidder.send(highestBid);
highestBidder = msg.sender;
highestBid = msg.value;
HighestBidIncreased(msg.sender, msg.value);
}
function auctionEnd() {
if (ended) throw;
AuctionEnded(highestBidder, highestBid);
beneficiary.send(this.balance);
ended = true;
}
}