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; }
}