A minimal ERC20 token with allowances: balanceOf, allowance, totalSupply, transfer, approve, transferFrom, with Transfer/Approval events. Guards balance, allowa
Historical Significance
An early standalone ERC20-with-allowance implementation (Jan 2016, Homestead-era), predating the widespread copy-paste token templates.
Context
Deployed Jan 28, 2016 (block 917,622). No name/symbol/decimals - a bare allowance-based ERC20 core.
Key Facts
Source Verified
Exact byte-for-byte match of the on-chain runtime (754 bytes); compiled with soljson v0.2.0+commit.4dc2445e, optimizer ON (runtime SHA-256 71f085bf025e2a8b28e45c4737041c5c02ae12336f661a2f171802e6c652bd6e). Proof: https://github.com/cartoonitunes/awesome-ethereum-proofs/tree/main/proofs/erc20-0x37dca38b
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)
contract Token {
mapping(address => uint256) balances;
mapping(address => mapping(address => uint256)) allowed;
uint256 _supply;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function transfer(address _to, uint256 _value) returns (bool) {
if (balances[msg.sender] >= _value && _value > 0) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
balances[_to] += _value;
Transfer(_from, _to, _value);
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
return true;
} else { return false; }
}
function balanceOf(address _owner) constant returns (uint256) { return balances[_owner]; }
function approve(address _spender, uint256 _value) returns (bool) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256) { return allowed[_owner][_spender]; }
function totalSupply() constant returns (uint256) { return _supply; }
}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, 2015NameRegistry
Same eraFixed-fee name registry from Day 9 of Ethereum (Aug 8, 2015). Reserve names for 69 ETH, resolve addresses. A precursor to ENS.
0xa1a111...b8af00August 8, 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, 2015