Bytecode verified via sibling
This contract shares identical runtime bytecode with EtherToken (0xacfd9d15...) which has been verified through compiler archaeology.
The ether wrapper code of 0xacFD9D15fA769EaBb68410c4c675Ff2030f26416 redeployed 81 blocks later, and the copy of the pair that was actually used.
Historical Significance
Wrapping ether so that code written for tokens can handle it is the problem WETH solved for the whole ecosystem, and this pair attacks it more than a year earlier, at the moment the ERC-20 interface was being finalised rather than after. Because the supply is the contract's own ether balance, the invariant every wrapped asset needs, that tokens outstanding equal collateral held, is enforced by construction rather than by bookkeeping.
Context
Deployed on 20 March 2016 at 15:30 UTC, twenty minutes after its byte identical twin and days after the Homestead fork. ERC-20 was still a draft, wrapped ether had no canonical implementation, and a contract that needed to treat ether like a token had to carry its own wrapper.
Key Facts
Description
An ether wrapper of the kind WETH later became: deposit() credits the caller with the ether sent, withdraw(uint256) checks the balance and sends the ether back, totalSupply() reports the contract's own ether balance, and the fallback routes a plain transfer into deposit(). On top of that sits the full ERC-20 surface, balanceOf, transfer, transferFrom, approve and allowance, with both events.
It is byte for byte identical to 0xacFD9D15fA769EaBb68410c4c675Ff2030f26416, deployed 81 blocks and about twenty minutes afterwards from the same account. The two differ only in what happened to them: the first was never called and this one carries the transactions.
Source Verified
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.
View Verification ProofShow source code (Solidity)
// Submitted by EthereumHistory (ethereumhistory.com)
contract EtherToken {
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event Deposit(address indexed _owner, uint256 _value);
event Withdrawal(address indexed _owner, uint256 _value);
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
function transfer(address _to, uint256 _value) returns (bool success) {
if (balances[msg.sender] < _value) throw;
if (!safeToAdd(balances[_to], _value)) throw;
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (balances[_from] < _value) throw;
if (allowed[_from][msg.sender] < _value) throw;
if (!safeToAdd(balances[_to], _value)) throw;
allowed[_from][msg.sender] -= _value;
balances[_from] -= _value;
balances[_to] += _value;
Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
function totalSupply() constant returns (uint256 supply) {
return this.balance;
}
function withdraw(uint256 _value) returns (bool success) {
if (balances[msg.sender] >= _value) {
if (msg.sender.call.value(_value)()) {
balances[msg.sender] -= _value;
Withdrawal(msg.sender, _value);
return true;
}
}
}
function deposit() returns (bool success) {
balances[msg.sender] += msg.value;
Deposit(msg.sender, msg.value);
return true;
}
function () returns (bool success) {
return deposit();
}
function safeToAdd(uint a, uint b) internal returns (bool) {
return (a + b >= a);
}
}External Links
Related contracts
EtherToken
Same deployerAn ether wrapper, and the first contract on mainnet fully compliant with EIP-20 as finalised, tested by execution against all ten mandatory requirements.
0xacfd9d...f26416March 20, 2016token
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, 2016DianstyCoinToken
Same eraDianstyCoinToken (DCT), a named Ethereum token deployed on 14 March 2016.
0x6d4de8...d5dba4March 14, 2016sultancoin
Same eraA fixed-supply token with direct transfers only, deployed March 2016.
0x9a11ff...0b797dMarch 15, 2016