A 2016 ERC-20-like token built on the ConsenSys MyAdvancedToken template, simplified to a buy-only market with owner withdraw and selfdestruct.
Historical Significance
An example of the simplified MyAdvancedToken pattern used in 2016 tutorials, with a buy-only market and overpayment refund logic that became uncommon in later token designs.
Context
Deployed during the Homestead era, three weeks before The DAO attack and three weeks before HongCoin (which used the full MyAdvancedToken template). The symbol ﷺ (rasm of the salawat) is unusual for a 2016 contract; most token symbols were ASCII.
Token Information
Key Facts
Description
Warm Fuzzies (ﷺ) is a 2016 token contract deployed on June 2, 2016 (block 1,628,149). It follows the ConsenSys MyAdvancedToken template popular in early Solidity tutorials, simplified to omit sellPrice and sell(). The owner can mint tokens, freeze accounts, set the buy price, withdraw ETH from the contract, and selfdestruct.
The buy() function includes an unusual overpayment refund: when msg.value is not an exact multiple of buyPrice, the remainder is refunded to the buyer. Holds 0.45 ETH locked and 500M of its 7.5B total supply on the contract address.
Source Verified
Source reconstruction. All 20 selectors and function bodies semantically match on-chain bytecode; compiled output is 49 bytes shorter due to helper-block placement differences in solc 0.3.1 optimizer. Sourcify cannot accept without exact match.. Optimizer: ON (200 runs)
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 owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
_
}
}
contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }
contract WarmFuzzies is owned {
string public standard = "Token 0.1";
string public name;
string public symbol;
uint8 public decimals;
uint256 public totalSupply;
uint256 public buyPrice;
mapping (address => uint256) public balanceOf;
mapping (address => bool) public frozenAccount;
mapping (address => mapping (address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event FrozenFunds(address target, bool frozen);
function WarmFuzzies(
uint256 initialSupply,
string tokenName,
uint8 decimalUnits,
string tokenSymbol,
uint256 initialPrice,
address centralMinter
) {
if (centralMinter != 0) owner = centralMinter;
balanceOf[owner] = initialSupply;
totalSupply = initialSupply;
name = tokenName;
symbol = tokenSymbol;
decimals = decimalUnits;
buyPrice = initialPrice;
}
function transfer(address _to, uint256 _value) {
if (balanceOf[msg.sender] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (frozenAccount[msg.sender]) throw;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
}
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (frozenAccount[_from]) throw;
if (balanceOf[_from] < _value) throw;
if (balanceOf[_to] + _value < balanceOf[_to]) throw;
if (_value > allowance[_from][msg.sender]) throw;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
allowance[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
function approveAndCall(address _spender, uint256 _value, bytes _extraData)
returns (bool success) {
if (allowance[msg.sender][_spender] == 0) {
allowance[msg.sender][_spender] = _value;
} else {
if (allowance[msg.sender][_spender] + _value < allowance[msg.sender][_spender]) throw;
allowance[msg.sender][_spender] += _value;
}
tokenRecipient spender = tokenRecipient(_spender);
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
function buy() {
if (msg.value < buyPrice) throw;
uint amount = msg.value / buyPrice;
uint cost = amount * buyPrice;
uint refund = msg.value - cost;
if (balanceOf[this] < amount) throw;
if (balanceOf[msg.sender] + amount < balanceOf[msg.sender]) throw;
balanceOf[msg.sender] += amount;
balanceOf[this] -= amount;
if (refund > 0) {
if (refund < msg.value) {
msg.sender.send(refund);
}
}
Transfer(this, msg.sender, amount);
}
function mintToken(address target, uint256 mintedAmount) onlyOwner {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, owner, mintedAmount);
Transfer(owner, target, mintedAmount);
}
function freezeAccount(address target, bool freeze) onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
function setPrice(uint256 _price) onlyOwner {
buyPrice = _price;
}
function withdraw(uint256 amount) onlyOwner {
if (this.balance >= amount) {
owner.send(amount);
} else {
owner.send(this.balance);
}
}
function destroy() onlyOwner {
suicide(owner);
}
function transferOwnership(address newOwner) onlyOwner {
owner = newOwner;
}
function () {
throw;
}
}