Blockwell

QNTU Token

ERC20

This contract is an ERC20 token.

Name QNTU Token
Symbol QNTU
Decimals 18
Total Supply 120,000,000,000 QNTU

About

Stats

Public Functions 17
Event Types 11
Code Size 17,110 bytes

Events (11) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint help

ChangeTokenInformation Event

Parameters help
name
string help
symbol
string help

ChangeUpgradeAgent Event

Parameters help
newAgent
address help

ChangeUpgradeMaster Event

Parameters help
newMaster
address help

FreezeTransfer Event

Parameters help

FreezeUpgrade Event

Parameters help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help

UnfreezeTransfer Event

Parameters help

UnfreezeUpgrade Event

Parameters help

Upgrade Event

Parameters help
from
address help
to
address help
value
uint help

upgradeMaster Variable

address help

upgradeAgent Variable

address help

isUpgradable Variable

bool help

totalUpgraded Variable

uint help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

totalSupply Variable

uint help

owner Variable

address help

isTradable Variable

bool help

balanceOf Variable

mapping(address => uint) help

allowed Variable

mapping(address => mapping(address => uint)) help
Internal Variable

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferOwnership(address _newOwner) public onlyOwner {
  require(_newOwner != 0);

  OwnershipTransferred(owner, _newOwner);
  owner = _newOwner;
}

changeTokenInformation keyboard_arrow_up

Parameters help

Name Type
_name
string help
_symbol
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeTokenInformation(string _name, string _symbol) public onlyOwner {
  name = _name;
  symbol = _symbol;
  ChangeTokenInformation(_name, _symbol);
}

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function transfer(address _to, uint256 _value)
  public
  canTransfer
  returns (bool)
{
  return super.transfer(_to, _value);
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public canTransfer returns (bool) {
  return super.transferFrom(_from, _to, _value);
}

Parameters help

Name Type
_spender
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function approve(address _spender, uint256 _value)
  public
  canTransfer
  returns (bool)
{
  return super.approve(_spender, _value);
}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  canTransfer
  returns (bool)
{
  return super.increaseApproval(_spender, _addedValue);
}

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  canTransfer
  returns (bool)
{
  return super.decreaseApproval(_spender, _subtractedValue);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

freezeTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeTransfer() public onlyOwner {
  isTradable = false;
  FreezeTransfer();
}

unfreezeTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unfreezeTransfer() public onlyOwner {
  isTradable = true;
  UnfreezeTransfer();
}

changeUpgradeMaster keyboard_arrow_up

Parameters help

Name Type
_newMaster
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeUpgradeMaster(address _newMaster) public onlyOwner {
  require(_newMaster != 0);

  upgradeMaster = _newMaster;
  ChangeUpgradeMaster(_newMaster);
}

changeUpgradeAgent keyboard_arrow_up

Parameters help

Name Type
_newAgent
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeUpgradeAgent(address _newAgent) public onlyOwner {
  require(totalUpgraded == 0);

  upgradeAgent = UpgradeAgent(_newAgent);

  require(upgradeAgent.isUpgradeAgent());

  ChangeUpgradeAgent(_newAgent);
}

freezeUpgrade keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeUpgrade() public onlyOwner {
  isUpgradable = false;
  FreezeUpgrade();
}

unfreezeUpgrade keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unfreezeUpgrade() public onlyOwner {
  isUpgradable = true;
  UnfreezeUpgrade();
}

upgrade keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function upgrade() public canUpgrade {
  uint256 amount = balanceOf[msg.sender];

  require(amount > 0);

  processUpgrade(msg.sender, amount);
}

forceUpgrade keyboard_arrow_up

Parameters help

Name Type
_holders
address[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function forceUpgrade(address[] _holders) public onlyUpgradeMaster canUpgrade {
  uint256 amount;

  for (uint256 i = 0; i < _holders.length; i++) {
    amount = balanceOf[_holders[i]];

    if (amount == 0) {
      continue;
    }

    processUpgrade(_holders[i], amount);
  }
}

transferToContract keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function transferToContract(address _to, uint256 _value)
  public
  canTransfer
  returns (bool)
{
  require(_value > 0);

  balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value);
  balanceOf[_to] = balanceOf[_to].add(_value);

  ReceivingContract receiver = ReceivingContract(_to);
  receiver.tokenFallback(msg.sender, _value);

  Transfer(msg.sender, _to, _value);
  return true;
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal UpgradableToken.processUpgrade keyboard_arrow_up

Parameters help

Name Type
_holder
address help
_amount
uint help

Properties

Visibility help private
Mutability help transaction
Source Code
function processUpgrade(address _holder, uint256 _amount) private {
  balanceOf[_holder] = balanceOf[_holder].sub(_amount);

  // Take tokens out from circulation
  totalSupply = totalSupply.sub(_amount);
  totalUpgraded = totalUpgraded.add(_amount);

  // Upgrade agent reissues the tokens
  upgradeAgent.upgradeFrom(_holder, _amount);
  Upgrade(_holder, upgradeAgent, _amount);
}