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
Constants (20) keyboard_arrow_up
State Variables (17) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner) onlyOwner {
require(_newOwner != owner);
require(_newOwner != address(0x0));
OwnershipTransferProposed(owner, _newOwner);
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
null
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);
}
transferFrom keyboard_arrow_up
Requirements help
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);
}
approve keyboard_arrow_up
Requirements help
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;
}
allowance keyboard_arrow_up
constructor keyboard_arrow_up
atNow keyboard_arrow_up
icoThresholdReached keyboard_arrow_up
isTransferable keyboard_arrow_up
Parameters help
This function has no parameters.
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
Requirements help
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
adminWallet
must be equal to
the sender's address
Source Code
function removeLock(address _participant) {
require(msg.sender == adminWallet || msg.sender == owner);
locked[_participant] = false;
LockRemoved(_participant);
}
removeLockMultiple keyboard_arrow_up
Requirements help
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
adminWallet
must be equal to
the sender's address
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
Modifiers help
onlyOwner checks for the following:
Source Code
function setWallet(address _wallet) onlyOwner {
require(_wallet != address(0x0));
wallet = _wallet;
WalletUpdated(wallet);
}
setAdminWallet keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setAdminWallet(address _wallet) onlyOwner {
require(_wallet != address(0x0));
adminWallet = _wallet;
AdminWalletUpdated(adminWallet);
}
updateTokensPerEth keyboard_arrow_up
mintMarketing keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
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
transferAnyERC20Token keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
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.
Requirements help
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
adminClaimAirdrop keyboard_arrow_up
Requirements help
Source Code
function adminClaimAirdrop(address _participant) external {
require(msg.sender == adminWallet);
doAirdrop(_participant);
}
adminClaimAirdropMultiple keyboard_arrow_up
Requirements help
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
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
Requirements help
null
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
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.
Requirements help
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
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);
}