blocktrade.com
ERC20
This contract is an ERC20 token.
Name
blocktrade.com
Symbol
BTT
Decimals
18
Total Supply
57,746,762 BTT
About
Stats
Public Functions
21
Event Types
5
Code Size
11,507 bytes
Events (5) keyboard_arrow_up
State Variables (15) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
owner = newOwner;
}
editRestrictedAddress keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function editRestrictedAddress(address _restrictedAddress, bool _restrict)
public
onlyOwner
{
if (!restrictedAddresses[_restrictedAddress] && _restrict) {
restrictedAddresses[_restrictedAddress] = _restrict;
} else if (restrictedAddresses[_restrictedAddress] && !_restrict) {
restrictedAddresses[_restrictedAddress] = _restrict;
} else {
revert();
}
}
tokenName keyboard_arrow_up
tokenSymbol keyboard_arrow_up
tokenDecimals keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
getFreezeUntilDetails keyboard_arrow_up
getFreezeSinceDetails keyboard_arrow_up
isRestrictedAddress keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
unfrozenToken checks for the following:
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
blockLock
must be less than or equal to
block.number
instForbiddenAddress checks for the following:
Requirements help
Source Code
function transfer(address _to, uint256 _value)
public
unfrozenToken
instForbiddenAddress(_to)
returns (bool success)
{
require(balances[msg.sender] >= _value); // Check if the sender has enough
require(balances[_to] + _value >= balances[_to]); // Check for overflows
balances[msg.sender] -= _value; // Subtract from the sender
balances[_to] += _value; // Add the same to the recipient
emit Transfer(msg.sender, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
approve keyboard_arrow_up
Modifiers help
unfrozenToken checks for the following:
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
blockLock
must be less than or equal to
block.number
Source Code
function approve(address _spender, uint256 _value)
public
unfrozenToken
returns (bool success)
{
allowances[msg.sender][_spender] = _value; // Set allowance
emit Approval(msg.sender, _spender, _value); // Raise Approval event
return true;
}
transferFrom keyboard_arrow_up
Modifiers help
unfrozenToken checks for the following:
One or more of the following:
-
owner
must be equal to
the sender's address
- OR
blockLock
must be less than or equal to
block.number
instForbiddenAddress checks for the following:
Requirements help
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public unfrozenToken instForbiddenAddress(_to) returns (bool success) {
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
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
emit Transfer(_from, _to, _value); // Notify anyone listening that this transfer took place
return true;
}
burn keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
Source Code
function burn(uint256 _value) public onlyOwner returns (bool success) {
require(balances[msg.sender] >= _value); // Check if the sender has enough
balances[msg.sender] -= _value; // Subtract from the sender
supply -= _value;
emit Burn(msg.sender, _value);
return true;
}
freezeTransfersUntil keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function freezeTransfersUntil(uint256 _frozenUntilBlock, string _freezeNotice)
public
onlyOwner
returns (bool success)
{
tokenFrozenUntilBlock = _frozenUntilBlock;
tokenFrozenUntilNotice = _freezeNotice;
emit TokenFrozenUntil(_frozenUntilBlock, _freezeNotice);
return true;
}
freezeTransfersSince keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function freezeTransfersSince(uint256 _frozenSinceBlock, string _freezeNotice)
public
onlyOwner
returns (bool success)
{
tokenFrozenSinceBlock = _frozenSinceBlock;
tokenFrozenSinceNotice = _freezeNotice;
emit TokenFrozenSince(_frozenSinceBlock, _freezeNotice);
return true;
}
unfreezeTransfersUntil keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function unfreezeTransfersUntil(string _unfreezeNotice)
public
onlyOwner
returns (bool success)
{
tokenFrozenUntilBlock = 0;
tokenFrozenUntilNotice = _unfreezeNotice;
emit TokenFrozenUntil(0, _unfreezeNotice);
return true;
}
unfreezeTransfersSince keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function unfreezeTransfersSince(string _unfreezeNotice)
public
onlyOwner
returns (bool success)
{
tokenFrozenSinceBlock = (2**256) - 1;
tokenFrozenSinceNotice = _unfreezeNotice;
emit TokenFrozenSince((2**256) - 1, _unfreezeNotice);
return true;
}
airDrop keyboard_arrow_up
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.