Wraps ether one for one, minting units on deposit and burning them on withdrawal.
Context
Deployed in November 2016 during the Homestead era.
Token Information
Key Facts
Description
Ether sent to the contract, either through refill or through the payable fallback, credits the sender with an equal number of units and raises the total supply. Withdrawing burns the units and sends the ether back. The owner's kill function is written to throw, because a contract holding ether must not be destroyable. It was created by a factory contract rather than deployed directly from an account.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Tangerine Whistle Era
Emergency fork to address DoS attacks. Repriced IO-heavy opcodes.
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)
pragma solidity ^0.4.2;
/**
* @title Contract for object that have an owner
*/
contract Owned {
/**
* Contract owner address
*/
address public owner;
/**
* @dev Store owner on creation
*/
function Owned() { owner = msg.sender; }
/**
* @dev Delegate contract to another person
* @param _owner is another person address
*/
function delegate(address _owner) onlyOwner
{ owner = _owner; }
/**
* @dev Owner check modifier
*/
modifier onlyOwner { if (msg.sender != owner) throw; _; }
}
/**
* @title Contract for objects that can be morder
*/
contract Mortal is Owned {
/**
* @dev Destroy contract and scrub a data
* @notice Only owner can kill me
*/
function kill() onlyOwner
{ suicide(owner); }
}
/**
* @title Token contract represents any asset in digital economy
*/
contract Token is Mortal {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
/* Short description of token */
string public name;
string public symbol;
/* Total count of tokens exist */
uint public totalSupply;
/* Fixed point position */
uint8 public decimals;
/* Token approvement system */
mapping(address => uint) public balanceOf;
mapping(address => mapping(address => uint)) public allowance;
/**
* @return available balance of `sender` account (self balance)
*/
function getBalance() constant returns (uint)
{ return balanceOf[msg.sender]; }
/**
* @dev This method returns non zero result when sender is approved by
* argument address and target address have non zero self balance
* @param _address target address
* @return available for `sender` balance of given address
*/
function getBalance(address _address) constant returns (uint) {
return allowance[_address][msg.sender]
> balanceOf[_address] ? balanceOf[_address]
: allowance[_address][msg.sender];
}
/* Token constructor */
function Token(string _name, string _symbol, uint8 _decimals, uint _count) {
name = _name;
symbol = _symbol;
decimals = _decimals;
totalSupply = _count;
balanceOf[msg.sender] = _count;
}
/**
* @dev Transfer self tokens to given address
* @param _to destination address
* @param _value amount of token values to send
* @notice `_value` tokens will be sended to `_to`
* @return `true` when transfer done
*/
function transfer(address _to, uint _value) returns (bool) {
if (balanceOf[msg.sender] >= _value) {
balanceOf[msg.sender] -= _value;
balanceOf[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
return false;
}
/**
* @dev Transfer with approvement mechainsm
* @param _from source address, `_value` tokens shold be approved for `sender`
* @param _to destination address
* @param _value amount of token values to send
* @notice from `_from` will be sended `_value` tokens to `_to`
* @return `true` when transfer is done
*/
function transferFrom(address _from, address _to, uint _value) returns (bool) {
var avail = allowance[_from][msg.sender]
> balanceOf[_from] ? balanceOf[_from]
: allowance[_from][msg.sender];
if (avail >= _value) {
allowance[_from][msg.sender] -= _value;
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
Transfer(_from, _to, _value);
return true;
}
return false;
}
/**
* @dev Give to target address ability for self token manipulation without sending
* @param _address target address
* @param _value amount of token values for approving
*/
function approve(address _address, uint _value) {
allowance[msg.sender][_address] += _value;
Approval(msg.sender, _address, _value);
}
/**
* @dev Reset count of tokens approved for given address
* @param _address target address
*/
function unapprove(address _address)
{ allowance[msg.sender][_address] = 0; }
}
/**
* @title Ethereum crypto currency extention for Token contract
*/
contract TokenEther is Token {
function TokenEther(string _name, string _symbol)
Token(_name, _symbol, 18, 0)
{}
/**
* @dev This is the way to withdraw money from token
* @param _value how many tokens withdraw from balance
*/
function withdraw(uint _value) {
if (balanceOf[msg.sender] >= _value) {
balanceOf[msg.sender] -= _value;
totalSupply -= _value;
if(!msg.sender.send(_value)) throw;
}
}
/**
* @dev This is the way to refill your token balance by ethers
*/
function refill() payable returns (bool) {
balanceOf[msg.sender] += msg.value;
totalSupply += msg.value;
return true;
}
/**
* @dev This method is called when money sended to contract address,
* a synonym for refill()
*/
function () payable {
balanceOf[msg.sender] += msg.value;
totalSupply += msg.value;
}
/**
* @dev By security issues token that holds ethers can not be killed
*/
function kill() onlyOwner { throw; }
}External Links
Related contracts
Alien
Same eraA fixed-supply token with transfers and third-party allowances, deployed October 2016.
0x00e0a4...9e52a0October 18, 2016Alien
Same eraA token with transfers and third-party allowances, and an owner who can mint new units, deployed October 2016.
0x9dbb48...affbb8October 19, 2016AiraEtherFunds
Same eraAn Ethereum fund token from the AIRA (Autonomous Intelligent Robot Agency) project, deployed in October 2016 as part of an early robot economy DAO ecosystem.
0xdcf691...3826c5October 19, 2016GavCoin
Same eraToken created by Gavin Wood (Ethereum co-founder), with a buyin/refund Dutch auction mechanism. ABI matches the official gavofyork/gavcoin GitHub repository.
0x0b8d56...74de06October 19, 2016ICONOMI
Same eraThe ICN token for ICONOMI, a Slovenian decentralized crypto fund management platform that raised $10.5M in its 2016 ICO — the third-largest crowdsale in Ethereu
0x888666...87d698October 24, 2016MyToken
Same eraA fixed-supply token with direct transfers only, deployed October 2016.
0x5164fa...ee8127October 25, 2016