Blockwell

indaHash Coin

ERC20

This contract is an ERC20 token.

Name indaHash Coin
Symbol IDH
Decimals 6
Total Supply 400,000,000 IDH

About link

indaHash (IDH) is a cryptocurrency and operates on the Ethereum platform. indaHash has a current supply of 399,999,999.991697 with 0 in circulation. The last known price of indaHash is 0.00735277 USD and is down -1.71 over the last 24 hours. It is currently trading on 3 active market(s) with $275.70 traded over the last 24 hours. More information can be found at https://indahash.com/.

Stats

Public Functions 26
Event Types 12
Code Size 18,859 bytes

Events (12) keyboard_arrow_up

AdminWalletUpdated Event

Parameters help
_newAdminWallet
address help

Airdrop Event

Parameters help
_owner
address help
_amount
uint help
_balance
uint help

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint help

LockRemoved Event

Parameters help
_participant
address help

OwnershipTransferProposed Event

Parameters help
_from
address help
_to
address help

OwnershipTransferred Event

Parameters help
_from
address help
_to
address help

Refund Event

Parameters help
_owner
address help
_amount
uint help
_tokens
uint help

TokensIssued Event

Parameters help
_owner
address help
_tokens
uint help
_balance
uint help
_etherContributed
uint help

TokensMinted Event

Parameters help
_owner
address help
_tokens
uint help
_balance
uint help

TokensPerEthUpdated Event

Parameters help
_tokensPerEth
uint help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint help

WalletUpdated Event

Parameters help
_newWallet
address help

E6 Constant

uint help
UNKNOWN VALUE

name Constant

string help
indaHash Coin

symbol Constant

string help
IDH

decimals Constant

uint8 help
6

DATE_PRESALE_START Constant

uint help
1510153200

DATE_PRESALE_END Constant

uint help
1510758000

DATE_ICO_START Constant

uint help
1511967600

DATE_ICO_END Constant

uint help
1513782000

BONUS_PRESALE Constant

uint help
40

BONUS_ICO_WEEK_ONE Constant

uint help
20

BONUS_ICO_WEEK_TWO Constant

uint help
10

TOKEN_SUPPLY_TOTAL Constant

uint help

TOKEN_SUPPLY_ICO Constant

uint help

TOKEN_SUPPLY_MKT Constant

uint help

PRESALE_ETH_CAP Constant

uint help
15000 ether

MIN_FUNDING_GOAL Constant

uint help

MIN_CONTRIBUTION Constant

uint help
1 ether / 2

MAX_CONTRIBUTION Constant

uint help
300 ether

COOLDOWN_PERIOD Constant

uint help
2 days

CLAWBACK_PERIOD Constant

uint help
90 days

wallet Variable

address help

adminWallet Variable

address help

tokensPerEth Variable

uint help

icoEtherReceived Variable

uint help

tokensIssuedIco Variable

uint help

tokensIssuedMkt Variable

uint help

tokensClaimedAirdrop Variable

uint help

tokensIssuedTotal Variable

uint help

owner Variable

address help

newOwner Variable

address help

icoEtherContributed Variable

mapping(address => uint) help

icoTokensReceived Variable

mapping(address => uint) help

airdropClaimed Variable

mapping(address => bool) help

refundClaimed Variable

mapping(address => bool) help

locked Variable

mapping(address => bool) help

balances Variable

mapping(address => uint) help
Internal Variable

allowed Variable

mapping(address => mapping(address => uint)) help
Internal Variable

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner) onlyOwner {
  require(_newOwner != owner);
  require(_newOwner != address(0x0));
  OwnershipTransferProposed(owner, _newOwner);
  newOwner = _newOwner;
}

acceptOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function acceptOwnership() {
  require(msg.sender == newOwner);
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupply() constant returns (uint256) {
  return tokensIssuedTotal;
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) constant returns (uint256 balance) {
  return balances[_owner];
}

Parameters help

Name Type
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _amount) returns (bool success) {
  require(isTransferable());
  require(locked[msg.sender] == false);
  require(locked[_to] == false);
  return super.transfer(_to, _amount);
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _amount
) returns (bool success) {
  require(isTransferable());
  require(locked[_from] == false);
  require(locked[_to] == false);
  return super.transferFrom(_from, _to, _amount);
}

Parameters help

Name Type
_spender
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _amount) returns (bool success) {
  // approval amount cannot exceed the balance
  require(balances[msg.sender] >= _amount);

  // update allowed amount
  allowed[msg.sender][_spender] = _amount;

  // log event
  Approval(msg.sender, _spender, _amount);
  return true;
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _owner, address _spender)
  constant
  returns (uint256 remaining)
{
  return allowed[_owner][_spender];
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() payable {
  buyTokens();
}

atNow keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function atNow() constant returns (uint256) {
  return now;
}

icoThresholdReached keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function icoThresholdReached() constant returns (bool thresholdReached) {
  if (tokensIssuedIco < MIN_FUNDING_GOAL) return false;
  return true;
}

isTransferable keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function isTransferable() constant returns (bool transferable) {
  if (!icoThresholdReached()) return false;
  if (atNow() < DATE_ICO_END + COOLDOWN_PERIOD) return false;
  return true;
}

removeLock keyboard_arrow_up

Parameters help

Name Type
_participant
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function removeLock(address _participant) {
  require(msg.sender == adminWallet || msg.sender == owner);
  locked[_participant] = false;
  LockRemoved(_participant);
}

removeLockMultiple keyboard_arrow_up

Parameters help

Name Type
_participants
address[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function removeLockMultiple(address[] _participants) {
  require(msg.sender == adminWallet || msg.sender == owner);
  for (uint256 i = 0; i < _participants.length; i++) {
    locked[_participants[i]] = false;
    LockRemoved(_participants[i]);
  }
}

setWallet keyboard_arrow_up

Parameters help

Name Type
_wallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setWallet(address _wallet) onlyOwner {
  require(_wallet != address(0x0));
  wallet = _wallet;
  WalletUpdated(wallet);
}

setAdminWallet keyboard_arrow_up

Parameters help

Name Type
_wallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setAdminWallet(address _wallet) onlyOwner {
  require(_wallet != address(0x0));
  adminWallet = _wallet;
  AdminWalletUpdated(adminWallet);
}

updateTokensPerEth keyboard_arrow_up

Parameters help

Name Type
_tokensPerEth
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function updateTokensPerEth(uint256 _tokensPerEth) onlyOwner {
  require(atNow() < DATE_PRESALE_START);
  tokensPerEth = _tokensPerEth;
  TokensPerEthUpdated(_tokensPerEth);
}

mintMarketing keyboard_arrow_up

Parameters help

Name Type
_participant
address help
_tokens
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintMarketing(address _participant, uint256 _tokens) onlyOwner {
  // check amount
  require(_tokens <= TOKEN_SUPPLY_MKT.sub(tokensIssuedMkt));

  // update balances
  balances[_participant] = balances[_participant].add(_tokens);
  tokensIssuedMkt = tokensIssuedMkt.add(_tokens);
  tokensIssuedTotal = tokensIssuedTotal.add(_tokens);

  // locked
  locked[_participant] = true;

  // log the miniting
  Transfer(0x0, _participant, _tokens);
  TokensMinted(_participant, _tokens, balances[_participant]);
}

ownerClawback keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function ownerClawback() external onlyOwner {
  require(atNow() > DATE_ICO_END + CLAWBACK_PERIOD);
  wallet.transfer(this.balance);
}

transferAnyERC20Token keyboard_arrow_up

Parameters help

Name Type
tokenAddress
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferAnyERC20Token(address tokenAddress, uint256 amount)
  onlyOwner
  returns (bool success)
{
  return ERC20Interface(tokenAddress).transfer(owner, amount);
}

reclaimFunds keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function reclaimFunds() external {
  uint256 tokens; // tokens to destroy
  uint256 amount; // refund amount

  // ico is finished and was not successful
  require(atNow() > DATE_ICO_END && !icoThresholdReached());

  // check if refund has already been claimed
  require(!refundClaimed[msg.sender]);

  // check if there is anything to refund
  require(icoEtherContributed[msg.sender] > 0);

  // update variables affected by refund
  tokens = icoTokensReceived[msg.sender];
  amount = icoEtherContributed[msg.sender];

  balances[msg.sender] = balances[msg.sender].sub(tokens);
  tokensIssuedTotal = tokensIssuedTotal.sub(tokens);

  refundClaimed[msg.sender] = true;

  // transfer out refund
  msg.sender.transfer(amount);

  // log
  Transfer(msg.sender, 0x0, tokens);
  Refund(msg.sender, amount, tokens);
}

claimAirdrop keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function claimAirdrop() external {
  doAirdrop(msg.sender);
}

adminClaimAirdrop keyboard_arrow_up

Parameters help

Name Type
_participant
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function adminClaimAirdrop(address _participant) external {
  require(msg.sender == adminWallet);
  doAirdrop(_participant);
}

adminClaimAirdropMultiple keyboard_arrow_up

Parameters help

Name Type
_addresses
address[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function adminClaimAirdropMultiple(address[] _addresses) external {
  require(msg.sender == adminWallet);
  for (uint256 i = 0; i < _addresses.length; i++) doAirdrop(_addresses[i]);
}

computeAirdrop keyboard_arrow_up

Parameters help

Name Type
_participant
address help

Properties

Visibility help public
Mutability help constant
Source Code
function computeAirdrop(address _participant)
  constant
  returns (uint256 airdrop)
{
  // return 0 if it's too early or ico was not successful
  if (atNow() < DATE_ICO_END || !icoThresholdReached()) return 0;

  // return  0 is the airdrop was already claimed
  if (airdropClaimed[_participant]) return 0;

  // return 0 if the account does not hold any crowdsale tokens
  if (icoTokensReceived[_participant] == 0) return 0;

  // airdrop amount
  uint256 tokens = icoTokensReceived[_participant];
  uint256 newBalance = tokens.mul(TOKEN_SUPPLY_ICO) / tokensIssuedIco;
  airdrop = newBalance - tokens;
}

transferMultiple keyboard_arrow_up

Parameters help

Name Type
_addresses
address[] help
_amounts
uint[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferMultiple(address[] _addresses, uint256[] _amounts) external {
  require(isTransferable());
  require(locked[msg.sender] == false);
  require(_addresses.length == _amounts.length);
  for (uint256 i = 0; i < _addresses.length; i++) {
    if (locked[_addresses[i]] == false)
      super.transfer(_addresses[i], _amounts[i]);
  }
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal IndaHashToken.buyTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help transaction
Source Code
function buyTokens() private {
  uint256 ts = atNow();
  bool isPresale = false;
  bool isIco = false;
  uint256 tokens = 0;

  // minimum contribution
  require(msg.value >= MIN_CONTRIBUTION);

  // one address transfer hard cap
  require(icoEtherContributed[msg.sender].add(msg.value) <= MAX_CONTRIBUTION);

  // check dates for presale or ICO
  if (ts > DATE_PRESALE_START && ts < DATE_PRESALE_END) isPresale = true;
  if (ts > DATE_ICO_START && ts < DATE_ICO_END) isIco = true;
  require(isPresale || isIco);

  // presale cap in Ether
  if (isPresale) require(icoEtherReceived.add(msg.value) <= PRESALE_ETH_CAP);

  // get baseline number of tokens
  tokens = tokensPerEth.mul(msg.value) / 1 ether;

  // apply bonuses (none for last week)
  if (isPresale) {
    tokens = tokens.mul(100 + BONUS_PRESALE) / 100;
  } else if (ts < DATE_ICO_START + 7 days) {
    // first week ico bonus
    tokens = tokens.mul(100 + BONUS_ICO_WEEK_ONE) / 100;
  } else if (ts < DATE_ICO_START + 14 days) {
    // second week ico bonus
    tokens = tokens.mul(100 + BONUS_ICO_WEEK_TWO) / 100;
  }

  // ICO token volume cap
  require(tokensIssuedIco.add(tokens) <= TOKEN_SUPPLY_ICO);

  // register tokens
  balances[msg.sender] = balances[msg.sender].add(tokens);
  icoTokensReceived[msg.sender] = icoTokensReceived[msg.sender].add(tokens);
  tokensIssuedIco = tokensIssuedIco.add(tokens);
  tokensIssuedTotal = tokensIssuedTotal.add(tokens);

  // register Ether
  icoEtherReceived = icoEtherReceived.add(msg.value);
  icoEtherContributed[msg.sender] = icoEtherContributed[msg.sender].add(
    msg.value
  );

  // locked
  locked[msg.sender] = true;

  // log token issuance
  Transfer(0x0, msg.sender, tokens);
  TokensIssued(msg.sender, tokens, balances[msg.sender], msg.value);

  // transfer Ether if we're over the threshold
  if (icoThresholdReached()) wallet.transfer(this.balance);
}

internal IndaHashToken.doAirdrop keyboard_arrow_up

Parameters help

Name Type
_participant
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function doAirdrop(address _participant) internal {
  uint256 airdrop = computeAirdrop(_participant);

  require(airdrop > 0);

  // update balances and token issue volume
  airdropClaimed[_participant] = true;
  balances[_participant] = balances[_participant].add(airdrop);
  tokensIssuedTotal = tokensIssuedTotal.add(airdrop);
  tokensClaimedAirdrop = tokensClaimedAirdrop.add(airdrop);

  // log
  Airdrop(_participant, airdrop, balances[_participant]);
  Transfer(0x0, _participant, airdrop);
}