Bytecode verified via sibling
This contract shares identical runtime bytecode with a verified contract (0x1081417f...) which has been verified through compiler archaeology.
A copy of the coin contract from the Frontier Guide where the contract was renamed but its constructor was not, leaving the supply function callable by anyone.
Historical Significance
The two function coin contract from the Frontier Guide, whose tutorial text lives in the go-ethereum wiki: a public mapping of address to balance and a sendCoin(address,uint256) that checks the sender's balance, moves the amount and fires a CoinTransfer event. The guide names the contract token. Whoever deployed this renamed it and left the function named token, so what was meant to be the constructor became an ordinary public function. token(uint256) sets coinBalanceOf[msg.sender] to the value passed, or to 1000000000 when passed zero, and nothing restricts who may call it: anyone can mint themselves any balance at any time. Because the rename is what put token(uint256) in the dispatch table, the name the deployer chose is not recoverable from the bytecode, and the recovered source carries MyToken as a stand-in. Source recovered by exact bytecode match: solc v0.1.6+commit.d41f8b7c with the optimizer on reproduces all 296 bytes of the creation transaction.
Context
Deployed in 2015 on the Ethereum Frontier network.
Key Facts
Description
The two function coin contract from the Frontier Guide, whose tutorial text lives in the go-ethereum wiki: a public mapping of address to balance and a sendCoin(address,uint256) that checks the sender's balance, moves the amount and fires a CoinTransfer event. The guide names the contract token. Whoever deployed this renamed it and left the function named token, so what was meant to be the constructor became an ordinary public function. token(uint256) sets coinBalanceOf[msg.sender] to the value passed, or to 1000000000 when passed zero, and nothing restricts who may call it: anyone can mint themselves any balance at any time. Because the rename is what put token(uint256) in the dispatch table, the name the deployer chose is not recoverable from the bytecode, and the recovered source carries MyToken as a stand-in. Source recovered by exact bytecode match: solc v0.1.6+commit.d41f8b7c with the optimizer on reproduces all 296 bytes of the creation transaction.
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 MyToken {
mapping (address => uint) public coinBalanceOf;
event CoinTransfer(address sender, address receiver, uint amount);
function token(uint supply) {
if (supply == 0) supply = 1000000000;
coinBalanceOf[msg.sender] = supply;
}
function sendCoin(address receiver, uint amount) returns(bool sufficient) {
if (coinBalanceOf[msg.sender] < amount) {
return false;
}
coinBalanceOf[msg.sender] -= amount;
coinBalanceOf[receiver] += amount;
CoinTransfer(msg.sender, receiver, amount);
return true;
}
}External Links
Related contracts
CrowdSale
Same deployerThe July 2015 ethereum.org crowdsale tutorial, with a fallback that reverts on every contribution.
0x2ba9d1...af0d85October 22, 2015Multiply7
Same deployerThe hello-world of Solidity: multiply(x) returns x*7. The ethereum.org tutorial contract. 120 copies deployed Sep 2015 through Feb 2016.
0xfc3c99...90d3d6October 24, 2015Contract 0x2273df...27ef78
Same deployerA copy of the coin contract from the Frontier Guide where the contract was renamed but its constructor was not, leaving the supply function callable by anyone.
0x2273df...27ef78October 24, 2015Contract 0x2ad2be...696e00
Same deployerA copy of the coin contract from the Frontier Guide where the contract was renamed but its constructor was not, leaving the supply function callable by anyone.
0x2ad2be...696e00October 24, 2015Contract 0x36626e...60d957
Same deployerA copy of the coin contract from the Frontier Guide where the contract was renamed but its constructor was not, leaving the supply function callable by anyone.
0x36626e...60d957October 24, 2015Contract 0x60fce8...c84ef7
Same deployerA copy of the coin contract from the Frontier Guide where the contract was renamed but its constructor was not, leaving the supply function callable by anyone.
0x60fce8...c84ef7October 24, 2015