ERC20
This contract is an ERC20 token.
Name
Hedge
Symbol
HDG
Decimals
18
Total Supply
5,774,651 HDG
About
Stats
Public Functions
14
Event Types
4
Code Size
9,751 bytes
Events (4) keyboard_arrow_up
State Variables (12) keyboard_arrow_up
Functions
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
UNKNOWN VALUE must not be true
Source Code
function transfer(address _to, uint256 _value) returns (bool success) {
require(block.number >= tokenFrozenUntilBlock); // Throw is token is frozen in case of emergency
require(!restrictedAddresses[_to]); // Prevent transfer to restricted addresses
require(balances[msg.sender] >= _value); // Check if the sender has enough
require(balances[_to] + _value >= balances[_to]); // Check for overflows
require(
!(msg.sender == owner &&
block.timestamp < timeLock &&
(balances[msg.sender] - _value) < 10000000 * 10**18)
);
balances[msg.sender] -= _value; // Subtract from the sender
balances[_to] += _value; // Add the same to the recipient
Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
transferFrom keyboard_arrow_up
Requirements help
UNKNOWN VALUE must not be true
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) returns (bool success) {
require(block.number > tokenFrozenUntilBlock); // Throw is token is frozen in case of emergency
require(!restrictedAddresses[_to]); // Prevent transfer to restricted addresses
require(balances[_from] >= _value); // Check if the sender has enough
require(balances[_to] + _value >= balances[_to]); // Check for overflows
require(_value <= allowances[_from][msg.sender]); // Check allowance
require(
!(_from == owner &&
block.timestamp < timeLock &&
(balances[_from] - _value) < 10000000 * 10**18)
);
balances[_from] -= _value; // Subtract from the sender
balances[_to] += _value; // Add the same to the recipient
allowances[_from][msg.sender] -= _value; // Deduct allowance for this address
Transfer(_from, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
approve keyboard_arrow_up
Requirements help
Source Code
function approve(address _spender, uint256 _value) returns (bool success) {
require(block.number > tokenFrozenUntilBlock); // Throw is token is frozen in case of emergency
allowances[msg.sender][_spender] = _value; // Set allowance
Approval(msg.sender, _spender, _value); // Raise Approval event
return true;
}
allowance keyboard_arrow_up
transferOwnership keyboard_arrow_up
approveAndCall keyboard_arrow_up
Requirements help
Source Code
function approveAndCall(
address _spender,
uint256 _value,
bytes _extraData
) returns (bool success) {
tokenRecipient spender = tokenRecipient(_spender); // Cast spender to tokenRecipient contract
approve(_spender, _value); // Set approval to contract for _value
spender.receiveApproval(msg.sender, _value, this, _extraData); // Raise method on _spender contract
return true;
}
burn keyboard_arrow_up
Requirements help
Source Code
function burn(uint256 _value) returns (bool success) {
require(balances[msg.sender] >= _value); // Check if the sender has enough
balances[msg.sender] -= _value; // Subtract from the sender
supply -= _value;
Burn(msg.sender, _value);
return true;
}
burnFrom keyboard_arrow_up
Requirements help
Source Code
function burnFrom(address _from, uint256 _value) returns (bool success) {
require(balances[_from] >= _value); // Check if the targeted balance is enough
require(_value <= allowances[_from][msg.sender]); // Check allowance
balances[_from] -= _value; // Subtract from the targeted balance
allowances[_from][msg.sender] -= _value; // Subtract from the sender's allowance
supply -= _value; // Update totalSupply
Burn(_from, _value);
return true;
}
freezeTransfersUntil keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function freezeTransfersUntil(uint256 _frozenUntilBlock, string _reason)
onlyOwner
{
tokenFrozenUntilBlock = _frozenUntilBlock;
TokenFrozen(_frozenUntilBlock, _reason);
}
unfreezeTransfersUntil keyboard_arrow_up
editRestrictedAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function editRestrictedAddress(address _newRestrictedAddress) onlyOwner {
restrictedAddresses[_newRestrictedAddress] = !restrictedAddresses[
_newRestrictedAddress
];
}
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.