The ethereum.org 'advanced' MyToken (Homestead, Mar 2016): an issuer-minted token with mintToken, freezeAccount/FrozenFunds and the standard Transfer event.
Historical Significance
The advanced central-minter variant from the ethereum.org token tutorial, adding minting and account-freezing on top of the basic token.
Context
Compiled with soljson-v0.2.0 (optimizer ON); exact match of the 1093-byte runtime. One of 20 byte-identical deployments.
Token Information
Key Facts
Source Verified
Exact runtime bytecode match. Runtime: 1093 bytes (byte-for-byte), compiled with soljson-v0.2.0+commit.4dc2445e, optimizer ON. The on-chain creation (1866 bytes) appends ABI-encoded constructor args (initialSupply, tokenName, decimalUnits, tokenSymbol, centralMinter); the 1093-byte runtime is the shared cluster invariant.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
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 MyToken {
/* Public variables of the token */
string public name;
string public symbol;
uint8 public decimals;
address public issuer;
/* This creates an array with all balances */
mapping (address => uint256) public balanceOf;
mapping (address => bool) public frozenAccount;
/* This generates a public event on the blockchain that will notify clients */
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenFunds(address target, bool frozen);
/* Initializes contract with initial supply tokens to the creator of the contract */
function MyToken(uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol, address centralMinter) {
if (centralMinter != 0) issuer = centralMinter;
else issuer = msg.sender;
balanceOf[issuer] = initialSupply;
name = tokenName;
symbol = tokenSymbol;
decimals = decimalUnits;
}
/* Send coins */
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value || balanceOf[_to] + _value < balanceOf[_to] || frozenAccount[msg.sender]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function mintToken(address target, uint256 mintedAmount) {
if (msg.sender != issuer) throw;
balanceOf[target] += mintedAmount;
Transfer(0, target, mintedAmount);
}
function freezeAccount(address target, bool freeze) {
if (msg.sender != issuer) throw;
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
}External Links
Related contracts
token
Same eraBare Homestead-era token (Mar 14 2016): public balanceOf mapping + a single unchecked transfer firing the standard Transfer event.
0xc77f06...494c69March 14, 2016DinastyCoinToken
Same eraHomestead-era transfer-only token, DinastyCoinToken (DCT), fixed supply 200000000 and 6 decimals.
0x3693fd...c11466March 14, 2016token
Same eraMinimal Homestead-era token shell (Mar 14 2016): just a public balanceOf mapping and its compiler-generated getter, with no other functions.
0x38e1da...41a81aMarch 14, 2016CampusCoin
Same eraByte-identical deployment of: Standard ethereum.org tutorial token (Homestead, Mar 2016): name/symbol/decimals metadata, a public balanceOf mapping and an overf
0x00f0b1...e6fcd2March 16, 2016Retch Mining Futures
Same eraBuy/sell token deployed by an early Ethermine miner 7 days after the Homestead fork, still active 10 years later.
0x9c2351...83e874March 21, 2016Poker Chips
Same eraEarly ERC-20 token built from the ethereum.org tutorial. Features approveAndCall for token-contract interaction and a spentAllowance tracking pattern.
0x002a13...164639March 21, 2016