ERC-20
Overview
Max Total Supply
1,000,000,000 HCB
Holders
238
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,429.48 HCBValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
HCBToken
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2018-07-19 */ pragma solidity ^0.4.24; /** * Math operations with safety checks */ contract SafeMath { function safeMul(uint256 a, uint256 b) pure internal returns (uint256) { uint256 c = a * b; judgement(a == 0 || c / a == b); return c; } function safeDiv(uint256 a, uint256 b) pure internal returns (uint256) { judgement(b > 0); uint256 c = a / b; judgement(a == b * c + a % b); return c; } function safeSub(uint256 a, uint256 b) pure internal returns (uint256) { judgement(b <= a); return a - b; } function safeAdd(uint256 a, uint256 b) pure internal returns (uint256) { uint256 c = a + b; judgement(c>=a && c>=b); return c; } function safeMulWithPresent(uint256 a , uint256 b) pure internal returns (uint256){ uint256 c = safeDiv(safeMul(a,b),1000); judgement(b == (c*1000)/a); return c; } function judgement(bool assertion) pure internal { if (!assertion) { revert(); } } } contract HCBPerm{ address public owner; constructor () public{ owner = msg.sender; } event LogOwnerChanged (address msgSender ); ///notice check if the msgSender is owner modifier onlyOwner{ assert(msg.sender == owner); _; } function setOwner (address newOwner) public onlyOwner returns (bool){ if (owner == msg.sender){ owner = newOwner; emit LogOwnerChanged(msg.sender); return true; }else{ return false; } } } contract HCBFreeze is HCBPerm{ bool internal stopped = false; modifier stoppable { assert (!stopped); _; } function status() view public returns (bool){ return stopped; } //freeze all env function stop() public onlyOwner{ stopped = true; } //unfreeze function start() public onlyOwner{ stopped = false; } } contract Token is SafeMath { /* Basic ERC20 token */ uint256 public totalSupply; /// total amount of tokens /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @param amount of need to burn /// @return Burn amount of token function burn(uint256 amount) public returns (bool); /// @param _from transaction from address /// @param _to transaction to address /// @return check the from and to address weather been freezed function frozenCheck(address _from , address _to) view private returns (bool); /// @param target the address gonna freeze or unfreeze /// @param freeze freeze or unfreeze function freezeAccount(address target , bool freeze) public; /// @param key the key of main chain /// return weather operation was successful or not function register(string key) public returns(bool); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Burn (address indexed _owner , uint256 _value); event LogRegister (address user, string key); } contract BasicToken is Token ,HCBFreeze{ function transfer(address _to, uint256 _value) stoppable public returns (bool ind) { //Default assumes totalSupply can't be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn't wrap. //Replace the if with this one instead. require(_to!= address(0)); require(frozenCheck(msg.sender,_to)); if (balances[msg.sender] >= _value && _value > 0) { balances[msg.sender] = safeSub(balances[msg.sender] , _value); balances[_to] = safeAdd(balances[_to],_value); emit Transfer(msg.sender, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } function burn(uint256 amount) stoppable onlyOwner public returns (bool){ if(balances[msg.sender] > amount ){ balances[msg.sender] = safeSub(balances[msg.sender],amount); totalSupply = safeSub(totalSupply,amount); emit Burn(msg.sender,amount); return true; }else{ return false; } } function frozenCheck(address _from , address _to) view private returns (bool){ require(!frozenAccount[_from]); require(!frozenAccount[_to]); return true; } function freezeAccount(address target , bool freeze) onlyOwner public{ frozenAccount[target] = freeze; } function register(string key) public returns(bool){ assert(bytes(key).length <= 64); require(!status()); keys[msg.sender] = key; emit LogRegister(msg.sender,key); return true; } mapping (address => uint256) internal balances; mapping (address => bool) private frozenAccount; //Save frozen account mapping (address => string) private keys; //mapping main chain's public key and Eth key } contract HCBToken is BasicToken{ string public name = "HiggsCandyBox"; /// Set the full name of this contract uint256 public decimals = 18; /// Set the decimal string public symbol = "HCB"; /// Set the symbol of this contract constructor() public { owner = msg.sender; totalSupply = 1000000000000000000000000000; balances[msg.sender] = totalSupply; } function () stoppable public { revert(); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"stop","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"setOwner","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":true,"inputs":[],"name":"status","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"}],"name":"burn","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","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":"ind","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"start","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"target","type":"address"},{"name":"freeze","type":"bool"}],"name":"freezeAccount","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"key","type":"string"}],"name":"register","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"msgSender","type":"address"}],"name":"LogOwnerChanged","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":"_owner","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"user","type":"address"},{"indexed":false,"name":"key","type":"string"}],"name":"LogRegister","type":"event"}]
Contract Creation Code
6001805460a060020a60ff021916905560c0604052600d60808190527f486967677343616e6479426f780000000000000000000000000000000000000060a090815261004e91600591906100e6565b5060126006556040805180820190915260038082527f48434200000000000000000000000000000000000000000000000000000000006020909201918252610098916007916100e6565b503480156100a557600080fd5b506001805433600160a060020a0319918216811790911681179091556b033b2e3c9fd0803ce800000060008181559182526002602052604090912055610181565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061012757805160ff1916838001178555610154565b82800160010185558215610154579182015b82811115610154578251825591602001919060010190610139565b50610160929150610164565b5090565b61017e91905b80821115610160576000815560010161016a565b90565b6109f2806101906000396000f3006080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f557806307da68f51461017f57806313af40351461019657806318160ddd146101cb578063200d2ed2146101f2578063313ce5671461020757806342966c681461021c57806370a08231146102345780638da5cb5b1461025557806395d89b4114610286578063a9059cbb1461029b578063be9a6555146102bf578063e724529c146102d4578063f2c298be146102fa575b3480156100db57600080fd5b5060015460a060020a900460ff16156100f057fe5b600080fd5b34801561010157600080fd5b5061010a610353565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014457818101518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018b57600080fd5b506101946103e1565b005b3480156101a257600080fd5b506101b7600160a060020a036004351661041b565b604080519115158252519081900360200190f35b3480156101d757600080fd5b506101e06104b2565b60408051918252519081900360200190f35b3480156101fe57600080fd5b506101b76104b8565b34801561021357600080fd5b506101e06104c9565b34801561022857600080fd5b506101b76004356104cf565b34801561024057600080fd5b506101e0600160a060020a036004351661058a565b34801561026157600080fd5b5061026a6105a5565b60408051600160a060020a039092168252519081900360200190f35b34801561029257600080fd5b5061010a6105b4565b3480156102a757600080fd5b506101b7600160a060020a036004351660243561060f565b3480156102cb57600080fd5b50610194610721565b3480156102e057600080fd5b50610194600160a060020a03600435166024351515610755565b34801561030657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b79436949293602493928401919081908401838280828437509497506107949650505050505050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d95780601f106103ae576101008083540402835291602001916103d9565b820191906000526020600020905b8154815290600101906020018083116103bc57829003601f168201915b505050505081565b600154600160a060020a031633146103f557fe5b6001805474ff0000000000000000000000000000000000000000191660a060020a179055565b600154600090600160a060020a0316331461043257fe5b600154600160a060020a03163314156104a9576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790556040805133815290517fa414b3eaf11f6c863a0bb4b36d8231c14e687177fa35fc1ac22b8ff4cd2c109f916020908290030190a15060016104ad565b5060005b919050565b60005481565b60015460a060020a900460ff165b90565b60065481565b60015460009060a060020a900460ff16156104e657fe5b600154600160a060020a031633146104fa57fe5b336000908152600260205260409020548210156104a9573360009081526002602052604090205461052b9083610892565b33600090815260026020526040812091909155546105499083610892565b60005560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25060016104ad565b600160a060020a031660009081526002602052604090205490565b600154600160a060020a031681565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d95780601f106103ae576101008083540402835291602001916103d9565b60015460009060a060020a900460ff161561062657fe5b600160a060020a038316151561063b57600080fd5b61064533846108a6565b151561065057600080fd5b33600090815260026020526040902054821180159061066f5750600082115b15610717573360009081526002602052604090205461068e9083610892565b3360009081526002602052604080822092909255600160a060020a038516815220546106ba90836108fb565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600161071b565b5060005b92915050565b600154600160a060020a0316331461073557fe5b6001805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a0316331461076957fe5b600160a060020a03919091166000908152600360205260409020805460ff1916911515919091179055565b600060408251111515156107a457fe5b6107ac6104b8565b156107b657600080fd5b33600090815260046020908152604090912083516107d69285019061092e565b507fd80364ba2cbb1e827ab8adac9651cdfc27fb7b61c0a95663cb80b82d7636ad2233836040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561084f578181015183820152602001610837565b50505050905090810190601f16801561087c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1506001919050565b60006108a08383111561091f565b50900390565b600160a060020a03821660009081526003602052604081205460ff16156108cc57600080fd5b600160a060020a03821660009081526003602052604090205460ff16156108f257600080fd5b50600192915050565b60008282016109188482108015906109135750838210155b61091f565b9392505050565b80151561092b57600080fd5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061096f57805160ff191683800117855561099c565b8280016001018555821561099c579182015b8281111561099c578251825591602001919060010190610981565b506109a89291506109ac565b5090565b6104c691905b808211156109a857600081556001016109b25600a165627a7a72305820d16603f812220ec8e965872031ec697d24403f050c4be23c61236934248169e40029
Deployed Bytecode
0x6080604052600436106100cf5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f557806307da68f51461017f57806313af40351461019657806318160ddd146101cb578063200d2ed2146101f2578063313ce5671461020757806342966c681461021c57806370a08231146102345780638da5cb5b1461025557806395d89b4114610286578063a9059cbb1461029b578063be9a6555146102bf578063e724529c146102d4578063f2c298be146102fa575b3480156100db57600080fd5b5060015460a060020a900460ff16156100f057fe5b600080fd5b34801561010157600080fd5b5061010a610353565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014457818101518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018b57600080fd5b506101946103e1565b005b3480156101a257600080fd5b506101b7600160a060020a036004351661041b565b604080519115158252519081900360200190f35b3480156101d757600080fd5b506101e06104b2565b60408051918252519081900360200190f35b3480156101fe57600080fd5b506101b76104b8565b34801561021357600080fd5b506101e06104c9565b34801561022857600080fd5b506101b76004356104cf565b34801561024057600080fd5b506101e0600160a060020a036004351661058a565b34801561026157600080fd5b5061026a6105a5565b60408051600160a060020a039092168252519081900360200190f35b34801561029257600080fd5b5061010a6105b4565b3480156102a757600080fd5b506101b7600160a060020a036004351660243561060f565b3480156102cb57600080fd5b50610194610721565b3480156102e057600080fd5b50610194600160a060020a03600435166024351515610755565b34801561030657600080fd5b506040805160206004803580820135601f81018490048402850184019095528484526101b79436949293602493928401919081908401838280828437509497506107949650505050505050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d95780601f106103ae576101008083540402835291602001916103d9565b820191906000526020600020905b8154815290600101906020018083116103bc57829003601f168201915b505050505081565b600154600160a060020a031633146103f557fe5b6001805474ff0000000000000000000000000000000000000000191660a060020a179055565b600154600090600160a060020a0316331461043257fe5b600154600160a060020a03163314156104a9576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790556040805133815290517fa414b3eaf11f6c863a0bb4b36d8231c14e687177fa35fc1ac22b8ff4cd2c109f916020908290030190a15060016104ad565b5060005b919050565b60005481565b60015460a060020a900460ff165b90565b60065481565b60015460009060a060020a900460ff16156104e657fe5b600154600160a060020a031633146104fa57fe5b336000908152600260205260409020548210156104a9573360009081526002602052604090205461052b9083610892565b33600090815260026020526040812091909155546105499083610892565b60005560408051838152905133917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25060016104ad565b600160a060020a031660009081526002602052604090205490565b600154600160a060020a031681565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156103d95780601f106103ae576101008083540402835291602001916103d9565b60015460009060a060020a900460ff161561062657fe5b600160a060020a038316151561063b57600080fd5b61064533846108a6565b151561065057600080fd5b33600090815260026020526040902054821180159061066f5750600082115b15610717573360009081526002602052604090205461068e9083610892565b3360009081526002602052604080822092909255600160a060020a038516815220546106ba90836108fb565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600161071b565b5060005b92915050565b600154600160a060020a0316331461073557fe5b6001805474ff000000000000000000000000000000000000000019169055565b600154600160a060020a0316331461076957fe5b600160a060020a03919091166000908152600360205260409020805460ff1916911515919091179055565b600060408251111515156107a457fe5b6107ac6104b8565b156107b657600080fd5b33600090815260046020908152604090912083516107d69285019061092e565b507fd80364ba2cbb1e827ab8adac9651cdfc27fb7b61c0a95663cb80b82d7636ad2233836040518083600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561084f578181015183820152602001610837565b50505050905090810190601f16801561087c5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a1506001919050565b60006108a08383111561091f565b50900390565b600160a060020a03821660009081526003602052604081205460ff16156108cc57600080fd5b600160a060020a03821660009081526003602052604090205460ff16156108f257600080fd5b50600192915050565b60008282016109188482108015906109135750838210155b61091f565b9392505050565b80151561092b57600080fd5b50565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061096f57805160ff191683800117855561099c565b8280016001018555821561099c579182015b8281111561099c578251825591602001919060010190610981565b506109a89291506109ac565b5090565b6104c691905b808211156109a857600081556001016109b25600a165627a7a72305820d16603f812220ec8e965872031ec697d24403f050c4be23c61236934248169e40029
Swarm Source
bzzr://d16603f812220ec8e965872031ec697d24403f050c4be23c61236934248169e4
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.