Back to Home

HugCoin(๐Ÿค—)

Token
0xb83cab8babc0...bf0d89d23b1e
DAO ForkContract #23KExact Bytecode MatchEdit this contract
Deployed August 23, 2016 (9 years ago)Block 2,123,297

An infinite-supply ERC-20-compatible token where every transfer mints a hug. Deployed August 23, 2016 by Jon Romero as a social experiment and Ethereum tutorial

Token Information

Token Name
HugCoin
Symbol
๐Ÿค—

Key Facts

Deployer
Jon Victory(0x6b365f...54369a)
Deployment Block
2,123,297
Deployment Date
Aug 23, 2016, 10:10 AM
Code Size
1.7 KB
Gas at Deploy
818,468
Transactions by Year
20256

Description

Anyone can claim and send Hug tokens. When a user gives their first hug, they may include a name or message which is stored and indexed on-chain. Each address is allowed exactly one logged message; subsequent hugs still work, but the contract records only the hug itself.

The contract tracks total huggers and stores structured data about hugs, including the recipient address, an associated name string, and the timestamp of the hug. Hug tokens can be transferred between addresses, and the primary interaction pattern is the "giveHugTo" function, which combines token transfer with message recording.

The token has no fixed supply limit, reinforcing its purpose as a symbolic gesture rather than a scarce asset.

HugCoin was deployed on August 23, 2016 and implements an infinite-supply token designed to represent โ€œhugs.โ€ The contract exposes a human-friendly interface, including a name (HugCoin), a symbol (๐Ÿค—), and functions for giving hugs directly to other addresses.

Source Verified

SolidityExact bytecode match(1,715 bytes)

Byte-perfect match on both runtime bytecode (1,715 bytes) and creation bytecode (3,100 bytes, excluding 96-byte constructor args). Verified with soljson v0.3.3, v0.3.4, and v0.3.5 โ€” all produce identical output with optimizer enabled. Source published by the author at github.com/jonromero/ethereum_contracts.

Heuristic Analysis

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

Detected Type: Token
Contains SELFDESTRUCT opcode
Has ERC-20-like patterns

DAO Fork Era

The controversial fork to recover funds from The DAO hack.

Block span: 1,920,000 โ€” 2,462,999
July 20, 2016 โ€” October 18, 2016

Bytecode Overview

Opcodes1,715
Unique Opcodes136
Jump Instructions78
Storage Operations49

Verified Source Available

Source verified through compiler archaeology and exact bytecode matching.

Show source code (Solidity)
contract HugCoin {
    
    string public name = 'HugCoin';
    string standard = 'HugCoin 0.2';
    string public symbol = '<3';
    uint8 decimals = 0;
    address owner;
    
    uint8 constant a_hug = 1;
    uint public totalHuggers = 0;

    Member[] public hugged;
    mapping (address => uint256) public balanceOf; 
    
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    
    struct Member {
        address member;
        string name;
        uint memberSince;
    }

    modifier isOwner {
        if (msg.sender != owner) throw;
        _
    }
        
    function HugCoin(string sym) {
        symbol = sym;
        owner = msg.sender;
        
        giveHugTo("Jon V", msg.sender);
        msg.sender.send(msg.value);                         
    }

    function transfer(address _to, uint256 _value) returns (bool success) {
        balanceOf[_to] += a_hug;
        totalHuggers += 1;

        Transfer(msg.sender, _to, a_hug);
        
        return true;
    }

    function giveHugTo(string receipient_name, address _to) returns (bool success){
        if (balanceOf[_to] == 0) {
            hugged[hugged.length++] = Member({member: _to, name:receipient_name, memberSince: now});
            balanceOf[_to] = a_hug;
            totalHuggers += 1;
        }
        else {
            balanceOf[_to] += a_hug;
        }
        
        Transfer(msg.sender, _to, a_hug);
        return true;
    }

    function destroy() isOwner {
        suicide(owner);
    }
   
    function () {
        throw;
    }
}

External Links