The subcurrency from the Solidity documentation's opening chapter: one minter creates coins into any account, and holders send them on.
Historical Significance
The contract that opens the Solidity documentation, deployed to mainnet rather than left on the page. Its shape, a minter plus a balance mapping, is the smallest complete statement of what a token is, and it is deliberately not a standard token: no approvals, no allowances, no metadata. Copies on mainnet are readers following along, and they are datable by which revision of the chapter they match.
Context
The Solidity documentation opened with this subcurrency for years, in a chapter written to introduce state, ownership and events on one page. This copy was deployed in April 2016, a month after Homestead.
Key Facts
Description
The worked example that opens Introduction to Smart Contracts in the Solidity documentation. The account that deploys it becomes the minter and is stored publicly. mint(address, uint) adds to any balance and returns silently when called by anyone else; send(address, uint) moves the caller's own balance and emits a Sent event.
Both functions return instead of reverting when their check fails, which the documentation did to keep the example short and which means a failed send looks exactly like a successful one to a caller that does not check the balance afterwards.
There is no total supply, no cap on minting and no way to change or renounce the minter, so it is a currency with a permanent central issuer.
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
This contract has verified source code on Etherscan.
Show source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract Coin {
// The keyword "public" makes those variables
// readable from outside.
address public minter;
mapping (address => uint) public balances;
// Events allow light clients to react on
// changes efficiently.
event Sent(address from, address to, uint amount);
// This is the constructor whose code is
// run only when the contract is created.
function Coin() {
minter = msg.sender;
}
function mint(address receiver, uint amount) {
if (msg.sender != minter) return;
balances[receiver] += amount;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Sent(msg.sender, receiver, amount);
}
}
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, 2016sultancoin
Same eraA fixed-supply token with direct transfers only, deployed March 2016.
0x9a11ff...0b797dMarch 15, 2016666๐
Same eraSix hundred and sixty six units, named and ticketed with a ram emoji.
0x7684aa...d0ed06March 16, 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, 2016