-
Notifications
You must be signed in to change notification settings - Fork 50
HMQ ‐ Humaniq
Table of contents
- Token Information
- Token Contract Information
- Market Making Information
- How To Watch The Token Contract In Ethereum Wallet / Mist
- How To Watch The Token In Ethereum Wallet / Mist
- How To Check Your Token Balance In Ethereum Wallet / Mist
- How To Transfer Your Tokens In Ethereum Wallet / Mist
- The Token Contract Source Code
- Website: https://humaniq.co/
- Symbol:
HMQ
- Name:
Humaniq
- Address:
0xcbcc0f036ed4788f63fc0fee32873d6a7487b908
- Decimal places:
8
- Total supply:
184,190,414
If you want to list an HMQ TokenTrader contract on https://cryptoderivatives.market, use the TokenTraderFactory contract.
Execute createTradeContract(address asset, uint256 buyPrice, uint256 sellPrice, uint256 units, bool buysTokens, bool sellsTokens)
to create your HMQ TokenTrader contract.
The formula for working out the buyPrice
or sellPrice
follows:
rate = price / units * 10^(tokenDecimals - etherDecimals)
which is:
rate = price / units * 10^(tokenDecimals - 18)
and tokenDecimals = 8
, so:
rate = price / units * 10^-10
or:
price = rates * units * 10^10
Find your newly created Trade contract on https://cryptoderivatives.market/tokenTraderContracts. Watch this contract address using the ABI at How To Watch A TokenTrader Contract In Ethereum Wallet / Mist.
Use the HMQ token contract to transfer your tokens to your newly created TokenTrader address.
Execute your TokenTrader.makerDepositEther()
function, sending the amount of ethers.
In Ethereum Wallet / Mist, select the CONTRACTS tab and click WATCH CONTRACT to open the Watch contract window. Then:
-
Under CONTRACT NAME, enter
HMQ
-
Under CONTRACT ADDRESS, enter
0xcbcc0f036ed4788f63fc0fee32873d6a7487b908
-
Copy the Application Binary Interface below and paste it into the JSON INTERFACE text box
[{"constant":true,"inputs":[],"name":"preICOSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"minter","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"allocationAddressPreICO","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"ICOSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newAddress","type":"address"}],"name":"changeMultisig","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"maxTotalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newAddress","type":"address"}],"name":"changeMinter","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_for","type":"address"},{"name":"tokenCount","type":"uint256"}],"name":"issueTokens","outputs":[{"name":"","type":"bool"}],"payable":true,"type":"function"},{"constant":true,"inputs":[],"name":"multisig","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"founder","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"allocationAddressICO","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newAddress","type":"address"}],"name":"changeFounder","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[{"name":"founderAddress","type":"address"}],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Issuance","type":"event"}]
-
Click OK
In Ethereum Wallet / Mist, select the CONTRACTS tab and click WATCH TOKEN to open the Add token window. Then:
-
Under TOKEN CONTRACT ADDRESS, enter
0xcbcc0f036ed4788f63fc0fee32873d6a7487b908
. The additional fields should automatically be filled in. -
Click OK
Watch The Token Contract, then:
- Click on the
HMQ
contract - Click on SHOW CONTRACT INFO
- In the READ FROM CONTRACT section and under Balance of:
- Enter the address you want to check the token balance of
- The token balance will be displayed in the Natural Units with 8 decimal places, e.g., 123000000 is 123000000 / 1e8 = 1.23 token units
Watch The Token Contract, then:
- Click on the
HMQ
contract - Click on SHOW CONTRACT INFO
- In the WRITE TO CONTRACT section and under Select function:
- Select the Transfer function
- Under to, enter the address you want to transfer the token to
- Under value, enter the amount of tokens you want to transfer. This amount needs to be specified in the natural units with 8 decimal places, e.g., 123000000 is 123000000 / 1e8 = 1.23 token units
- Under Execute from, select the account you want to transfer your tokens from
- Click on Execute, then confirm your transaction
The verified source code can be found at 0xcbcc0f036ed4788f63fc0fee32873d6a7487b908 and follows:
pragma solidity ^0.4.6;
/**
* Math operations with safety checks
*/
contract SafeMath {
function mul(uint a, uint b) internal returns (uint) {
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function div(uint a, uint b) internal returns (uint) {
assert(b > 0);
uint c = a / b;
assert(a == b * c + a % b);
return c;
}
function sub(uint a, uint b) internal returns (uint) {
assert(b <= a);
return a - b;
}
function add(uint a, uint b) internal returns (uint) {
uint c = a + b;
assert(c >= a);
return c;
}
function assert(bool assertion) internal {
if (!assertion) {
throw;
}
}
}
/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20
/// @title Abstract token contract - Functions to be implemented by token contracts.
contract AbstractToken {
// This is not an abstract function, because solc won't recognize generated getter functions for public variables as functions
function totalSupply() constant returns (uint256 supply) {}
function balanceOf(address owner) constant returns (uint256 balance);
function transfer(address to, uint256 value) returns (bool success);
function transferFrom(address from, address to, uint256 value) returns (bool success);
function approve(address spender, uint256 value) returns (bool success);
function allowance(address owner, address spender) constant returns (uint256 remaining);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event Issuance(address indexed to, uint256 value);
}
contract StandardToken is AbstractToken {
/*
* Data structures
*/
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalSupply;
/*
* Read and write storage functions
*/
/// @dev Transfers sender's tokens to a given address. Returns success.
/// @param _to Address of token receiver.
/// @param _value Number of tokens to transfer.
function transfer(address _to, uint256 _value) returns (bool success) {
if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
}
else {
return false;
}
}
/// @dev Allows allowed third party to transfer tokens from one address to another. Returns success.
/// @param _from Address from where tokens are withdrawn.
/// @param _to Address to where tokens are sent.
/// @param _value Number of tokens to transfer.
function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) {
balances[_to] += _value;
balances[_from] -= _value;
allowed[_from][msg.sender] -= _value;
Transfer(_from, _to, _value);
return true;
}
else {
return false;
}
}
/// @dev Returns number of tokens owned by given address.
/// @param _owner Address of token owner.
function balanceOf(address _owner) constant returns (uint256 balance) {
return balances[_owner];
}
/// @dev Sets approved amount of tokens for spender. Returns success.
/// @param _spender Address of allowed account.
/// @param _value Number of approved tokens.
function approve(address _spender, uint256 _value) returns (bool success) {
allowed[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
/*
* Read storage functions
*/
/// @dev Returns number of allowed tokens for given address.
/// @param _owner Address of token owner.
/// @param _spender Address of token spender.
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
return allowed[_owner][_spender];
}
}
/// @title Token contract - Implements Standard Token Interface with HumaniQ features.
/// @author Evgeny Yurtaev - <[email protected]>
/// @author Alexey Bashlykov - <[email protected]>
contract HumaniqToken is StandardToken, SafeMath {
/*
* External contracts
*/
address public minter;
/*
* Token meta data
*/
string constant public name = "Humaniq";
string constant public symbol = "HMQ";
uint8 constant public decimals = 8;
// Address of the founder of Humaniq.
address public founder = 0xc890b1f532e674977dfdb791cafaee898dfa9671;
// Multisig address of the founders
address public multisig = 0xa2c9a7578e2172f32a36c5c0e49d64776f9e7883;
// Address where all tokens created during ICO stage initially allocated
address constant public allocationAddressICO = 0x1111111111111111111111111111111111111111;
// Address where all tokens created during preICO stage initially allocated
address constant public allocationAddressPreICO = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;
// 31 820 314 tokens were minted during preICO
uint constant public preICOSupply = mul(31820314, 100000000);
// 131 038 286 tokens were minted during ICO
uint constant public ICOSupply = mul(131038286, 100000000);
// Max number of tokens that can be minted
uint public maxTotalSupply;
/*
* Modifiers
*/
modifier onlyFounder() {
// Only founder is allowed to do this action.
if (msg.sender != founder) {
throw;
}
_;
}
modifier onlyMinter() {
// Only minter is allowed to proceed.
if (msg.sender != minter) {
throw;
}
_;
}
/*
* Contract functions
*/
/// @dev Crowdfunding contract issues new tokens for address. Returns success.
/// @param _for Address of receiver.
/// @param tokenCount Number of tokens to issue.
function issueTokens(address _for, uint tokenCount)
external
payable
onlyMinter
returns (bool)
{
if (tokenCount == 0) {
return false;
}
if (add(totalSupply, tokenCount) > maxTotalSupply) {
throw;
}
totalSupply = add(totalSupply, tokenCount);
balances[_for] = add(balances[_for], tokenCount);
Issuance(_for, tokenCount);
return true;
}
/// @dev Function to change address that is allowed to do emission.
/// @param newAddress Address of new emission contract.
function changeMinter(address newAddress)
public
onlyFounder
returns (bool)
{
// Forbid previous emission contract to distribute tokens minted during ICO stage
delete allowed[allocationAddressICO][minter];
minter = newAddress;
// Allow emission contract to distribute tokens minted during ICO stage
allowed[allocationAddressICO][minter] = balanceOf(allocationAddressICO);
}
/// @dev Function to change founder address.
/// @param newAddress Address of new founder.
function changeFounder(address newAddress)
public
onlyFounder
returns (bool)
{
founder = newAddress;
}
/// @dev Function to change multisig address.
/// @param newAddress Address of new multisig.
function changeMultisig(address newAddress)
public
onlyFounder
returns (bool)
{
multisig = newAddress;
}
/// @dev Contract constructor function sets initial token balances.
function HumaniqToken(address founderAddress)
{
// Set founder address
founder = founderAddress;
// Allocate all created tokens during ICO stage to allocationAddressICO.
balances[allocationAddressICO] = ICOSupply;
// Allocate all created tokens during preICO stage to allocationAddressPreICO.
balances[allocationAddressPreICO] = preICOSupply;
// Allow founder to distribute tokens minted during preICO stage
allowed[allocationAddressPreICO][founder] = preICOSupply;
// Give 14 percent of all tokens to founders.
balances[multisig] = div(mul(ICOSupply, 14), 86);
// Set correct totalSupply and limit maximum total supply.
totalSupply = add(ICOSupply, balances[multisig]);
totalSupply = add(totalSupply, preICOSupply);
maxTotalSupply = mul(totalSupply, 5);
}
}
Most of this wiki is currently work in progress. GNTTokenTrader & Factory, GNT ‐ Golem Network Token and Bug Bounty are complete.
- 1ST ‐ First Blood
- AMIS ‐ AMIS
- ARC ‐ Arcade City
- BARF ‐ BARF (discontinued)
- BERP ‐ BokkyPooBah´s Ether Refundable Prize
- DAO ‐ The DAO
- DGD ‐ Digix DAO
- DGDb ‐ Digix DAO Badge
- DICE ‐ Etheroll
- EDG ‐ Edgeless
- EMV ‐ Ethereum Movie Venture
- ETB ‐ Ethbits
- GNO ‐ Gnosis Token
- GNT ‐ Golem Network Token
- GNTW ‐ Wrapped Golem Network Token
- GUP ‐ Matchpool Guppy
- HKG ‐ Hacker Gold
- HMQ ‐ Humaniq
- ICN ‐ Iconomi
- INC ‐ Incent
- LOVE - I Love You
- LUN ‐ Lunyr-Token
- MKR ‐ Maker DAO
- MLN ‐ Melon Token
- PLU ‐ Pluton
- RBX ‐ Ripto Bux
- REP ‐ Augur
- RLC ‐ iEx.ec Network Token
- SNGLS ‐ SingularDTV
- SWT ‐ Swarm City
- TAAS ‐ Token-as-a-Service
- TIME ‐ Chronobank
- TKN ‐ TokenCard
- TRST ‐ WeTrust
- UNI - Unicorn 🦄
- VSL - vSlice
- WAV ‐ Waves Token
- WBC ‐ Waves Bitcoin Token
- WCT ‐ Waves Community Token
- WINGS ‐ WINGS
- XAUR ‐ Xaurum