ETH Price: $3,477.01 (+3.92%)

Token

HeroCoin (HEC)
 

Overview

Max Total Supply

5,000,000,000 HEC

Holders

5,953

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
91,137.75 HEC

Value
$0.00
0xc244354619234ad606579003bf2b40a9b5160d2d
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
HeroChainToken

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-01-25
*/

pragma solidity ^0.4.19;

//*************** SafeMath ***************

library SafeMath {
  function mul(uint256 a, uint256 b) internal pure  returns (uint256) {
      uint256 c = a * b;
      assert(a == 0 || c / a == b);
      return c;
  }

  function div(uint256 a, uint256 b) internal pure  returns (uint256) {
      assert(b > 0);
      uint256 c = a / b;
      return c;
  }

  function sub(uint256 a, uint256 b) internal pure  returns (uint256) {
      assert(b <= a);
      return a - b;
  }

  function add(uint256 a, uint256 b) internal pure  returns (uint256) {
      uint256 c = a + b;
      assert(c >= a);
      return c;
  }
}

//*************** Ownable

contract Ownable {
  address public owner;

  function Ownable() public {
      owner = msg.sender;
  }

  modifier onlyOwner() {
      require(msg.sender == owner);
      _;
  }

  function transferOwnership(address newOwner)public onlyOwner {
      if (newOwner != address(0)) {
        owner = newOwner;
      }
  }

}

//************* ERC20

contract ERC20 {
  uint256 public totalSupply;
  function balanceOf(address who)public constant returns (uint256);
  function transfer(address to, uint256 value)public returns (bool);
  function transferFrom(address from, address to, uint256 value)public returns (bool);
  function allowance(address owner, address spender)public constant returns (uint256);
  function approve(address spender, uint256 value)public returns (bool);

  event Transfer(address indexed from, address indexed to, uint256 value);
  event PreICOTokenPushed(address indexed buyer, uint256 amount);
  event TokenPurchase(address indexed purchaser, uint256 value,uint256 amount);  
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

//*************HeroChain Token

contract HeroChainToken is ERC20,Ownable {
	using SafeMath for uint256;

	// Token Info.
	string public name;
	string public symbol;

	uint8 public constant decimals = 18;

	address[] private walletArr;
	uint walletIdx = 0;

	mapping (address => uint256) public balanceOf;
	mapping (address => mapping (address => uint256)) allowed;

	event TokenPurchase(address indexed purchaser, uint256 value,uint256 amount);
	event FundTransfer(address fundWallet, uint256 amount);

	function HeroChainToken( 
		uint256 _totalSupply, 
		string _name, 
		string _symbol,  
		address _wallet1

	) public {  		

	require(_wallet1 != 0x0);
		
	balanceOf[msg.sender] = _totalSupply;
	totalSupply = _totalSupply;
	name = _name;
	symbol = _symbol;
	
	walletArr.push(_wallet1);
	
	}

	function balanceOf(address _who)public constant returns (uint256 balance) {
	    return balanceOf[_who];
	}

	function _transferFrom(address _from, address _to, uint256 _value)  internal {
	    require(_to != 0x0);
	    require(balanceOf[_from] >= _value);
	    require(balanceOf[_to] + _value >= balanceOf[_to]);

	    balanceOf[_from] = balanceOf[_from].sub(_value);
	    balanceOf[_to] = balanceOf[_to].add(_value);

	    Transfer(_from, _to, _value);
	}

	function transfer(address _to, uint256 _value) public returns (bool){	    
	    _transferFrom(msg.sender,_to,_value);
	    return true;
	}

	function push(address _buyer, uint256 _amount) public onlyOwner {
	    uint256 val=_amount*(10**18);
	    _transferFrom(msg.sender,_buyer,val);
	    PreICOTokenPushed(_buyer, val);
	}

	function ()public payable {
	    _tokenPurchase( msg.value);
	}

	function _tokenPurchase( uint256 _value) internal {
	   
	    require(_value >= 0.1 ether);

	    address wallet = walletArr[walletIdx];
	    walletIdx = (walletIdx+1) % walletArr.length;

	    wallet.transfer(msg.value);
	    FundTransfer(wallet, msg.value);
	}

	function supply()  internal constant  returns (uint256) {
	    return balanceOf[owner];
	}

	function getCurrentTimestamp() internal view returns (uint256){
	    return now;
	}

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

	function approve(address _spender, uint256 _value)public returns (bool) {
	    require((_value == 0) || (allowed[msg.sender][_spender] == 0));

	    allowed[msg.sender][_spender] = _value;
	    Approval(msg.sender, _spender, _value);
	    return true;
	}
	
	function transferFrom(address _from, address _to, uint256 _value)public returns (bool) {
	    var _allowance = allowed[_from][msg.sender];

	    require (_value <= _allowance);
		
	     _transferFrom(_from,_to,_value);

	    allowed[_from][msg.sender] = _allowance.sub(_value);
	    Transfer(_from, _to, _value);
	    return true;
	  }
	
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_who","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_buyer","type":"address"},{"name":"_amount","type":"uint256"}],"name":"push","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_totalSupply","type":"uint256"},{"name":"_name","type":"string"},{"name":"_symbol","type":"string"},{"name":"_wallet1","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"purchaser","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokenPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"fundWallet","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"FundTransfer","type":"event"},{"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":"buyer","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"PreICOTokenPushed","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"}]

60606040526000600555341561001457600080fd5b604051610aaa380380610aaa833981016040528080519190602001805182019190602001805182019190602001805160018054600160a060020a03191633600160a060020a039081169190911790915590925082161515905061007657600080fd5b600160a060020a033316600090815260066020526040812085905584905560028380516100a7929160200190610101565b5060038280516100bb929160200190610101565b5060048054600181016100ce838261017f565b5060009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055506101c5915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061014257805160ff191683800117855561016f565b8280016001018555821561016f579182015b8281111561016f578251825591602001919060010190610154565b5061017b9291506101a8565b5090565b8154818355818115116101a3576000838152602090206101a39181019083016101a8565b505050565b6101c291905b8082111561017b57600081556001016101ae565b90565b6108d6806101d46000396000f3006060604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c4578063095ea7b31461014e57806318160ddd1461018457806323b872dd146101a9578063313ce567146101d157806370a08231146101fa5780638da5cb5b1461021957806395d89b4114610248578063a9059cbb1461025b578063b753a98c1461027d578063dd62ed3e1461029f578063f2fde38b146102c4575b6100c2346102e3565b005b34156100cf57600080fd5b6100d76103b5565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101135780820151838201526020016100fb565b50505050905090810190601f1680156101405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015957600080fd5b610170600160a060020a0360043516602435610453565b604051901515815260200160405180910390f35b341561018f57600080fd5b6101976104f9565b60405190815260200160405180910390f35b34156101b457600080fd5b610170600160a060020a03600435811690602435166044356104ff565b34156101dc57600080fd5b6101e46105be565b60405160ff909116815260200160405180910390f35b341561020557600080fd5b610197600160a060020a03600435166105c3565b341561022457600080fd5b61022c6105de565b604051600160a060020a03909116815260200160405180910390f35b341561025357600080fd5b6100d76105ed565b341561026657600080fd5b610170600160a060020a0360043516602435610658565b341561028857600080fd5b6100c2600160a060020a036004351660243561066e565b34156102aa57600080fd5b610197600160a060020a03600435811690602435166106e5565b34156102cf57600080fd5b6100c2600160a060020a0360043516610710565b600067016345785d8a00008210156102fa57600080fd5b600460055481548110151561030b57fe5b600091825260209091200154600454600554600160a060020a0390921692509060010181151561033757fe5b06600555600160a060020a0381163480156108fc0290604051600060405180830381858888f19350505050151561036d57600080fd5b7f97c35397cb6acebd9df368c206404479fc4c80dd6034d1b28943aaf5826318708134604051600160a060020a03909216825260208201526040908101905180910390a15050565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561044b5780601f106104205761010080835404028352916020019161044b565b820191906000526020600020905b81548152906001019060200180831161042e57829003601f168201915b505050505081565b60008115806104855750600160a060020a03338116600090815260076020908152604080832093871683529290522054155b151561049057600080fd5b600160a060020a03338116600081815260076020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600160a060020a038084166000908152600760209081526040808320339094168352929052908120548083111561053557600080fd5b610540858585610766565b610550818463ffffffff61088216565b600160a060020a03808716600081815260076020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b601281565b600160a060020a031660009081526006602052604090205490565b600154600160a060020a031681565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561044b5780601f106104205761010080835404028352916020019161044b565b6000610665338484610766565b50600192915050565b60015460009033600160a060020a0390811691161461068c57600080fd5b50670de0b6b3a764000081026106a3338483610766565b82600160a060020a03167fdb2d10a559cb6e14fee5a7a2d8c216314e11c22404e85a4f9af45f07c87192bb8260405190815260200160405180910390a2505050565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b60015433600160a060020a0390811691161461072b57600080fd5b600160a060020a03811615610763576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600160a060020a038216151561077b57600080fd5b600160a060020a038316600090815260066020526040902054819010156107a157600080fd5b600160a060020a03821660009081526006602052604090205481810110156107c857600080fd5b600160a060020a0383166000908152600660205260409020546107f1908263ffffffff61088216565b600160a060020a038085166000908152600660205260408082209390935590841681522054610826908263ffffffff61089416565b600160a060020a03808416600081815260066020526040908190209390935591908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60008282111561088e57fe5b50900390565b6000828201838110156108a357fe5b93925050505600a165627a7a72305820b0da801ce4f42ba61f1d041df600dcb5bd27cfe28711dd7d924461572921fd2b002900000000000000000000000000000000000000001027e72f1f12813088000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000044a2bfd5ab0705932538f60e75624b04a6cb1ae800000000000000000000000000000000000000000000000000000000000000084865726f436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034845430000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6060604052600436106100b95763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100c4578063095ea7b31461014e57806318160ddd1461018457806323b872dd146101a9578063313ce567146101d157806370a08231146101fa5780638da5cb5b1461021957806395d89b4114610248578063a9059cbb1461025b578063b753a98c1461027d578063dd62ed3e1461029f578063f2fde38b146102c4575b6100c2346102e3565b005b34156100cf57600080fd5b6100d76103b5565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156101135780820151838201526020016100fb565b50505050905090810190601f1680156101405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015957600080fd5b610170600160a060020a0360043516602435610453565b604051901515815260200160405180910390f35b341561018f57600080fd5b6101976104f9565b60405190815260200160405180910390f35b34156101b457600080fd5b610170600160a060020a03600435811690602435166044356104ff565b34156101dc57600080fd5b6101e46105be565b60405160ff909116815260200160405180910390f35b341561020557600080fd5b610197600160a060020a03600435166105c3565b341561022457600080fd5b61022c6105de565b604051600160a060020a03909116815260200160405180910390f35b341561025357600080fd5b6100d76105ed565b341561026657600080fd5b610170600160a060020a0360043516602435610658565b341561028857600080fd5b6100c2600160a060020a036004351660243561066e565b34156102aa57600080fd5b610197600160a060020a03600435811690602435166106e5565b34156102cf57600080fd5b6100c2600160a060020a0360043516610710565b600067016345785d8a00008210156102fa57600080fd5b600460055481548110151561030b57fe5b600091825260209091200154600454600554600160a060020a0390921692509060010181151561033757fe5b06600555600160a060020a0381163480156108fc0290604051600060405180830381858888f19350505050151561036d57600080fd5b7f97c35397cb6acebd9df368c206404479fc4c80dd6034d1b28943aaf5826318708134604051600160a060020a03909216825260208201526040908101905180910390a15050565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561044b5780601f106104205761010080835404028352916020019161044b565b820191906000526020600020905b81548152906001019060200180831161042e57829003601f168201915b505050505081565b60008115806104855750600160a060020a03338116600090815260076020908152604080832093871683529290522054155b151561049057600080fd5b600160a060020a03338116600081815260076020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b600160a060020a038084166000908152600760209081526040808320339094168352929052908120548083111561053557600080fd5b610540858585610766565b610550818463ffffffff61088216565b600160a060020a03808716600081815260076020908152604080832033861684529091529081902093909355908616917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3506001949350505050565b601281565b600160a060020a031660009081526006602052604090205490565b600154600160a060020a031681565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561044b5780601f106104205761010080835404028352916020019161044b565b6000610665338484610766565b50600192915050565b60015460009033600160a060020a0390811691161461068c57600080fd5b50670de0b6b3a764000081026106a3338483610766565b82600160a060020a03167fdb2d10a559cb6e14fee5a7a2d8c216314e11c22404e85a4f9af45f07c87192bb8260405190815260200160405180910390a2505050565b600160a060020a03918216600090815260076020908152604080832093909416825291909152205490565b60015433600160a060020a0390811691161461072b57600080fd5b600160a060020a03811615610763576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50565b600160a060020a038216151561077b57600080fd5b600160a060020a038316600090815260066020526040902054819010156107a157600080fd5b600160a060020a03821660009081526006602052604090205481810110156107c857600080fd5b600160a060020a0383166000908152600660205260409020546107f1908263ffffffff61088216565b600160a060020a038085166000908152600660205260408082209390935590841681522054610826908263ffffffff61089416565b600160a060020a03808416600081815260066020526040908190209390935591908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a3505050565b60008282111561088e57fe5b50900390565b6000828201838110156108a357fe5b93925050505600a165627a7a72305820b0da801ce4f42ba61f1d041df600dcb5bd27cfe28711dd7d924461572921fd2b0029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000001027e72f1f12813088000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000044a2bfd5ab0705932538f60e75624b04a6cb1ae800000000000000000000000000000000000000000000000000000000000000084865726f436f696e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034845430000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _totalSupply (uint256): 5000000000000000000000000000
Arg [1] : _name (string): HeroCoin
Arg [2] : _symbol (string): HEC
Arg [3] : _wallet1 (address): 0x44a2bFd5Ab0705932538f60e75624B04A6Cb1aE8

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000001027e72f1f12813088000000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [3] : 00000000000000000000000044a2bfd5ab0705932538f60e75624b04a6cb1ae8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [5] : 4865726f436f696e000000000000000000000000000000000000000000000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 4845430000000000000000000000000000000000000000000000000000000000


Swarm Source

bzzr://b0da801ce4f42ba61f1d041df600dcb5bd27cfe28711dd7d924461572921fd2b
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.