The Solidity tutorial subcurrency, with the balance reader restricted to the minter
Context
Deployed in September 2015 on the Frontier chain.
Key Facts
Description
The Coin example from the August 2015 Solidity Tutorial with one change: queryBalance returns zero to anyone who is not the minter, so only the account that deployed the contract can read balances through it. The change is cosmetic, since every balance is still visible in storage and every transfer still emits a Send event naming both parties, but it shows the author reaching for access control on a read. The rest is the tutorial unaltered: the deployer is the minter, mint creates units, send moves them.
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 Coin {
address minter;
mapping (address => uint) balances;
event Send(address from, address to, uint value);
function mint(address owner, uint amount) {
if (msg.sender != minter) return;
balances[owner] += amount;
}
function send(address receiver, uint amount) {
if (balances[msg.sender] < amount) return;
balances[msg.sender] -= amount;
balances[receiver] += amount;
Send(msg.sender, receiver, amount);
}
function queryBalance(address addr) constant returns (uint balance) {
if (msg.sender != minter) return;
return balances[addr];
}
function Coin() {
minter = msg.sender;
}
}External Links
Related contracts
Contract 0x578713...7d7060
Same deployerThe Solidity tutorial subcurrency, compiled without the optimiser
0x578713...7d7060September 3, 2015Coin
Same deployerThe subcurrency example from the Solidity documentation with a payable deposit bolted on.
0x8d9bba...d771b5September 4, 2015MessageStore
Same eraA 6-line contract storing a single public string, deployed Day 9 of Ethereum by a prolific early experimenter who shipped 18 contracts in one week.
0xd2eccd...ff3d6bAugust 8, 2015CoinFlipper
Same eraA coin flip on the block timestamp that pays double or keeps the stake
0x6c8dda...5ef84eAugust 8, 2015Contract 0xa85146...9bbf06
Same erago-ethereum's built-in hash registrar, mapping a key to a content hash
0xa85146...9bbf06August 10, 2015Ballot
Same eraDelegated voting with a proposal count fixed at deployment
0x3cf26c...b6a8e1August 18, 2015