Back to Home

Unicorns(🦄)

Token
0x59a273f78e4d...1a49295c6786
FrontierSource Verified
Deployed February 11, 2016 (10 years ago)Block 987,979

Unicorns ERC-20 token deployed by avsa (Alex Van de Sande) in Feb 2016. First of eleven Unicorns deployments, deployed 70 seconds before 0x1f75.

Token Information

Token Name
Unicorns
Symbol
🦄
Decimals
0

Key Facts

Deployment Block
987,979
Deployment Date
Feb 11, 2016, 01:37 PM
Code Size
2.5 KB
Gas at Deploy
617,584
Transactions by Year
20161

Source Verified

Soliditysource_reconstructed
Compiler: solc v0

Source reconstructed from bytecode analysis. All code blocks match exactly (same block multiset after normalizing jump destinations). Compiler: native C++ Solidity v0.1.1 with optimizer ON. Key features: overflow checks in transfer and transferFrom, single Transfer event in mintToken, approve returns bool with no explicit return, transferFrom emits Transfer(msg.sender,_to,_value). Instances A and C are bytecode-identical; Instance B has same source but different optimizer layout. Bytecode identical to 0x1f75047233517dcf67970d9e3c3bb385cb647f30.

Historian Categories

TokenDAO / Governance

Heuristic Analysis

The following characteristics were detected through bytecode analysis and may not be accurate.

Detected Type: Token
Has ERC-20-like patterns

Frontier Era

The initial release of Ethereum. A bare-bones implementation for technical users.

Block span: 0 — 1,149,999
July 30, 2015 — March 14, 2016

Bytecode Overview

Opcodes2,602
Unique Opcodes172
Jump Instructions123
Storage Operations76

Verified Source Available

This contract has verified source code.

View Verification Proof
Show source code (Solidity)
contract MyToken {
    address public owner;
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;
    mapping (address => uint256) public balanceOf;
    mapping (address => bool) public frozenAccount;
    mapping (address => mapping (address => uint256)) public allowance;
    mapping (address => mapping (address => uint256)) public spentAllowance;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event FrozenFunds(address target, bool frozen);

    function MyToken(uint256 initialSupply, string tokenName, uint8 decimalUnits, string tokenSymbol, address centralMinter) {
        if(centralMinter != 0 ) owner = centralMinter;
        balanceOf[msg.sender] = initialSupply;
        totalSupply = initialSupply;
        name = tokenName;
        symbol = tokenSymbol;
        decimals = decimalUnits;
    }

    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 approve(address _spender, uint256 _value) returns (bool success) {
        allowance[msg.sender][_spender] = _value;
    }

    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        if (balanceOf[_from] < _value) throw;
        if (balanceOf[_to] + _value < balanceOf[_to]) throw;
        if (frozenAccount[_from]) throw;
        if (spentAllowance[_from][msg.sender] + _value > allowance[_from][msg.sender]) throw;
        balanceOf[_from] -= _value;
        balanceOf[_to] += _value;
        spentAllowance[_from][msg.sender] += _value;
        Transfer(msg.sender, _to, _value);
        /* no explicit return true */
    }

    function mintToken(address target, uint256 mintedAmount) {
        if (msg.sender != owner) throw;
        balanceOf[target] += mintedAmount;
        totalSupply += mintedAmount;
        Transfer(owner, target, mintedAmount);
    }

    function freezeAccount(address target, bool freeze) {
        if (msg.sender != owner) throw;
        frozenAccount[target] = freeze;
        FrozenFunds(target, freeze);
    }

    function transferOwnership(address newOwner) {
        if (msg.sender != owner) throw;
        owner = newOwner;
    }

    function() {
        owner.send(msg.value);
    }
}

External Links