Blockwell

Hedge

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

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Burn Event

Parameters help
from
address help
value
uint256 help

TokenFrozen Event

Parameters help
_frozenUntilBlock
uint256 help
_reason
string help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Functions Expand All Collapse All

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
        function totalSupply() constant returns (uint256 totalSupply) {
                return supply;
        }

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
        function balanceOf(address _owner) constant returns (uint256 balance) {
                return balances[_owner];
        }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
        function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
                return allowances[_owner][_spender];
        }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:

Requirements help

null
Source Code
         function transferOwnership(address newOwner) onlyOwner {
                require(transfer(newOwner, balances[msg.sender]));
                owner = newOwner;
        }

approveAndCall keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help
_extraData
bytes help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_from
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
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

Parameters help

Name Type
_frozenUntilBlock
uint256 help
_reason
string help

Properties

Visibility help public
Mutability help transaction

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

Parameters help

Name Type
_reason
string help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
Source Code
        function unfreezeTransfersUntil(string _reason) onlyOwner {
                tokenFrozenUntilBlock = 0;
                TokenFrozen(0, _reason);
        }

editRestrictedAddress keyboard_arrow_up

Parameters help

Name Type
_newRestrictedAddress
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
Source Code
        function editRestrictedAddress(address _newRestrictedAddress) onlyOwner {
                restrictedAddresses[_newRestrictedAddress] = !restrictedAddresses[_newRestrictedAddress];
        }

isRestrictedAddress keyboard_arrow_up

Parameters help

Name Type
_queryAddress
address help

Properties

Visibility help public
Mutability help constant
Source Code
        function isRestrictedAddress(address _queryAddress) constant returns (bool answer){
                return restrictedAddresses[_queryAddress];
        }