A later revision of the ethereum.org crowdsale tutorial, set to raise 100 ether in 30 minutes with no reward token.
Context
Deployed 9 November 2015, during the Frontier era.
Key Facts
Description
A crowdfunding contract compiled from the revision of the ethereum.org crowdsale tutorial that replaced the earlier funders[++funders.length] write, which always reverted, with funders[funders.length++]. The fallback raises the funders array by one slot, stores the sender and the value paid in it, adds the value to amountRaised and calls sendCoin on the reward token for value divided by price. checkGoalReached, allowed only once the deadline has passed, sends the balance to the beneficiary if the goal was met and otherwise refunds each funder in turn, then self destructs. The constructor arguments name the deployer 0x05ecc7cc1484de98bc894e3b587c5b52ee7ca333 as beneficiary, a goal of 100 ether, a duration of 30 minutes and a price of 0.02 ether per token. The reward token address is zero, so every contribution would have called sendCoin on the zero address.
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 token { mapping (address => uint) public coinBalanceOf; function token() {} function sendCoin(address receiver, uint amount) returns(bool sufficient) { } }
contract Crowdsale {
address public beneficiary;
uint public fundingGoal; uint public amountRaised; uint public deadline; uint public price;
token public tokenReward;
Funder[] public funders;
event FundTransfer(address backer, uint amount, bool isContribution);
/* data structure to hold information about campaign contributors */
struct Funder {
address addr;
uint amount;
}
/* at initialization, setup the owner */
function Crowdsale(address _beneficiary, uint _fundingGoal, uint _duration, uint _price, token _reward) {
beneficiary = _beneficiary;
fundingGoal = _fundingGoal;
deadline = now + _duration * 1 minutes;
price = _price;
tokenReward = token(_reward);
}
/* The function without name is the default function that is called whenever anyone sends funds to a contract */
function () {
uint amount = msg.value;
funders[funders.length++] = Funder({addr: msg.sender, amount: amount});
amountRaised += amount;
tokenReward.sendCoin(msg.sender, amount / price);
FundTransfer(msg.sender, amount, true);
}
modifier afterDeadline() { if (now >= deadline) _ }
/* checks if the goal or time limit has been reached and ends the campaign */
function checkGoalReached() afterDeadline {
if (amountRaised >= fundingGoal){
beneficiary.send(amountRaised);
FundTransfer(beneficiary, amountRaised, false);
} else {
FundTransfer(0, 11, false);
for (uint i = 0; i < funders.length; ++i) {
funders[i].addr.send(funders[i].amount);
FundTransfer(funders[i].addr, funders[i].amount, false);
}
}
suicide(beneficiary);
}
}External Links
Related contracts
MyScheme (1ETH)
Same eraThe original MyScheme pyramid contract with a 1 ETH entry fee, deployed on August 7, 2015.
0x109c4f...4aea3fAugust 7, 2015Augur REP Crowdsale
Same eraThe ETH crowdsale contract for Augur REP token sale, August 2015. Contributors called buyRep() to fund Ethereum's first major dApp.
0xe28e72...d63bccAugust 15, 2015CrowdSale
Same eraThe July 2015 ethereum.org crowdsale tutorial, with a fallback that reverts on every contribution.
0x2ba9d1...af0d85October 22, 2015Crowdsale
Same eraThe ethereum.org crowdsale tutorial pointed at a reward token address that has no code.
0x667429...b53465December 13, 2015