ERC20
This contract is an ERC20 token.
Name
HashCoin
Symbol
HSC
Decimals
18
Total Supply
50,000,000,000 HSC
About link
HashCoin (HSC) is a cryptocurrency and operates on the Ethereum platform. HashCoin has a current supply of 50,000,000,000 with 12,863,911,325.5 in circulation. The last known price of HashCoin is 0.00002987 USD and is down -1.87 over the last 24 hours. It is currently trading on 2 active market(s) with $71,946.53 traded over the last 24 hours. More information can be found at https://www.hashfuture.io/.
Stats
Public Functions
11
Event Types
3
Code Size
7,486 bytes
State Variables (10) keyboard_arrow_up
Functions
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value) public {
_transfer(msg.sender, _to, _value);
}
transferFrom keyboard_arrow_up
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
require(_value <= allowance[_from][msg.sender]);
allowance[_from][msg.sender] -= _value;
_transfer(_from, _to, _value);
return true;
}
approve keyboard_arrow_up
approveAndCall keyboard_arrow_up
Source Code
function approveAndCall(
address _spender,
uint256 _value,
bytes _extraData
) public returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender);
if (approve(_spender, _value)) {
spender.receiveApproval(msg.sender, _value, this, _extraData);
return true;
}
}
burn keyboard_arrow_up
Requirements help
Source Code
function burn(uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value);
balanceOf[msg.sender] -= _value;
totalSupply -= _value;
Burn(msg.sender, _value);
return true;
}
burnFrom keyboard_arrow_up
Requirements help
Source Code
function burnFrom(address _from, uint256 _value) public returns (bool success) {
require(balanceOf[_from] >= _value);
require(_value <= allowance[_from][msg.sender]);
balanceOf[_from] -= _value;
allowance[_from][msg.sender] -= _value;
totalSupply -= _value;
Burn(_from, _value);
return true;
}
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
owner = newOwner;
}
freezeAccount keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function freezeAccount(address target, bool freeze) public onlyOwner {
frozenAccount[target] = freeze;
FrozenFunds(target, freeze);
}
setPrices keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setPrices(uint256 newSellPrice, uint256 newBuyPrice) public onlyOwner {
sellPrice = newSellPrice;
buyPrice = newBuyPrice;
}
buy keyboard_arrow_up
sell keyboard_arrow_up
Requirements help
Source Code
function sell(uint256 amount) public {
require(this.balance >= amount * sellPrice);
_transfer(msg.sender, this, amount);
msg.sender.transfer(amount * sellPrice);
}
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 HashCoin._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
require(_to != 0x0);
require(balanceOf[_from] >= _value);
require(balanceOf[_to] + _value > balanceOf[_to]);
require(!frozenAccount[_from]);
require(!frozenAccount[_to]);
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
Transfer(_from, _to, _value);
}
internal TokenERC20._transfer keyboard_arrow_up
Requirements help
Source Code
function _transfer(
address _from,
address _to,
uint256 _value
) internal {
require(_to != 0x0);
require(balanceOf[_from] >= _value);
require(balanceOf[_to] + _value > balanceOf[_to]);
uint256 previousBalances = balanceOf[_from] + balanceOf[_to];
balanceOf[_from] -= _value;
balanceOf[_to] += _value;
Transfer(_from, _to, _value);
assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
}