A fixed-supply token with transfers and third-party allowances, deployed October 2016.
Context
Frontier and Homestead era deployment.
Token Information
Key Facts
Description
A fixed-supply token supporting transfers and third-party allowances, plus approvals that call back into the spending contract. The opening supply was 100,000,000 tokens at 18 decimals. Deployed October 2016 by 0xcac630f3427d37a50dd2f88d9361d4a96dee28b9.
Source Verified
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
DAO Fork Era
The controversial fork to recover funds from The DAO hack.
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.0;
contract IconomiToken {
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
event BlockLockSet(uint256 _value);
event NewOwner(address _newOwner);
modifier onlyOwner {
if (msg.sender == owner) {
_;
}
}
modifier blockLock {
if (!isLocked() || msg.sender == owner) {
_;
}
}
modifier checkIfToContract(address _to) {
if(_to != address(this)) {
_;
}
}
uint256 public totalSupply;
string public name;
uint8 public decimals;
string public symbol;
string public version = '0.0.1';
address public owner;
uint256 public lockedUntilBlock;
function IconomiToken(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
uint256 _lockedUntilBlock
) {
balances[msg.sender] = _initialAmount;
totalSupply = _initialAmount;
name = _tokenName;
decimals = _decimalUnits;
symbol = _tokenSymbol;
lockedUntilBlock = _lockedUntilBlock;
owner = msg.sender;
}
/* Approves and then calls the receiving contract */
function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
//call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this.
//receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData)
//it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead.
if(!_spender.call(bytes4(sha3("receiveApproval(address,uint256,address,bytes)")), msg.sender, _value, this, _extraData)) { throw; }
return true;
}
function transfer(address _to, uint256 _value) blockLock checkIfToContract(_to) returns (bool success) {
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) blockLock checkIfToContract(_to) returns (bool success) {
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0) {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
} else {
return false;
}
}
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
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 setBlockLock(uint256 _lockedUntilBlock) onlyOwner returns (bool success) {
lockedUntilBlock = _lockedUntilBlock;
BlockLockSet(_lockedUntilBlock);
return true;
}
function isLocked() constant returns (bool success) {
return lockedUntilBlock > block.number;
}
function replaceOwner(address _newOwner) onlyOwner returns (bool success) {
owner = _newOwner;
NewOwner(_newOwner);
return true;
}
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
}
contract IconomiTokenTest is IconomiToken {
function IconomiTokenTest(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol,
uint256 _lockedUntilBlock
) IconomiToken(_initialAmount, _tokenName, _decimalUnits, _tokenSymbol, _lockedUntilBlock) {
}
function destruct() onlyOwner {
selfdestruct(owner);
}
}External Links
Related contracts
Ico Token
Same deployerA fixed-supply token with transfers and third-party allowances, deployed October 2016.
0x403776...b76b2eOctober 11, 2016TT
Same eraA fixed-supply token with direct transfers only, deployed July 2016.
0xf78bdd...f9d225July 20, 2016shares
Same eraAn early on-chain corporation contract by cryptonomica.net, representing company shares as ERC-20 tokens with embedded voting — deployed hours before the DAO ha
0x684282...9a33b5July 20, 2016MyToken
Same eraA fixed-supply token with transfers and allowance spending, deployed July 2016.
0x0eb106...9be583July 23, 2016ReplayProtection
Same eraAlex Van de Sande's post-DAO-fork ETH/ETC replay-protection splitter. Routes ether or ERC20 tokens to different recipients depending on which chain it runs on.
0x64668c...456541July 27, 2016BeerCoin
Same eraERC20-style 'I owe you a beer' IOU ledger by Nick Johnson (ENS). Each transfer creates a personal beer debt; obligations are tracked and transferable.
0x74c1e4...48f4acJuly 29, 2016