December 2015 copy of the ethereum.org MyToken tutorial whose constructor was misnamed MyTrue, leaving it as a public function anyone could call.
Token Information
Key Facts
Description
Deployed on 10 December 2015, this is the ethereum.org "MyToken" tutorial token with one change that broke it: the initializer is named MyTrue instead of the contract name. Solidity of the time only treated a function as the constructor if its name matched the contract, so MyTrue became an ordinary public function. The deployment ran no initializer, leaving the name, symbol and decimals empty and no one holding a balance. Anyone could later call MyTrue(supply, name, symbol, decimals) to set the metadata and credit themselves the supply, and someone did: the token reads "zachcoin" with symbol "z" and 0 decimals.
The source was reconstructed from bytecode. The MyTrue name was recovered by brute-forcing its function selector (0x95f18951). Compiled with soljson v0.2.0 with the optimizer off, it reproduces both the runtime and the creation code byte for byte. The contract name is not recorded in the bytecode; MyToken is the tutorial's name.
Source Verified
Exact runtime (1864 B) and creation (1882 B) match, soljson v0.2.0+commit.4dc2445e, optimizer off. Constructor-named function MyTrue recovered from selector 0x95f18951. Sourcify full match.
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 {
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
string public name;
string public symbol;
uint8 public decimals;
mapping (address => uint256) public balanceOf;
event Transfer(address indexed from, address indexed to, uint256 value);
function MyTrue(uint256 _supply, string _name, string _symbol, uint8 _decimals) {
if (_supply == 0) _supply = 1000000;
balanceOf[msg.sender] = _supply;
name = _name;
symbol = _symbol;
decimals = _decimals;
}
}External Links
Related contracts
token
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, 2015token
Same eraEarly tutorial-derived coin contract compiled with Solidity v0.1.1, deployed 9 days after Ethereum Frontier launch.
0x3c401b...da1634August 8, 2015token
Same eraTutorial-derived coin contract (Solidity v0.1.1), one of multiple token instances deployed by the same address on Aug 8, 2015.
0x33e986...395d13August 8, 2015CoinStub
Same eraCoin tutorial stub — mapping getter + empty function returning default bool.
0x4fb5ac...3b08aeAugust 8, 2015