Blockwell

BqtX Token

ERC20

This contract is an ERC20 token.

Name BqtX Token
Symbol BQTX
Decimals 18
Total Supply 800,000,000 BQTX

About link description

BQT describes itself as an order-book crypto exchange with social trading features. Its BQT Hedge Trade system is intended to serve as a way for traders to acquire cryptoassets for a short-term period by means of escrow of their existing crypto holdings. Its BQTuniversity aims to offer certified crypto education courses built by industry experts.

Stats

Public Functions 15
Event Types 9
Code Size 13,613 bytes

Library Use

Uses SafeMath for uint256.
Uses StringLib for string.

Approval Event

Parameters help
_owner
address help
_spender
address help
amount
uint256 help

Transfer Event

Parameters help
fromAddr
address help
toAddr
address help
amount
uint256 help

icoHasRestarted Event

Parameters help
newPauseStatus
uint8 help

icoIsNowPaused Event

Parameters help
newPauseStatus
uint8 help

onAdminUserChange Event

Parameters help
oldAdmin
address help
newAdmin
address help

onAdminUserChanged Event

Parameters help
oldAdmin
address help
newAdmin
address help

onHardcapChanged Event

Parameters help
hardCap
uint256 help
newHardCap
uint256 help

onIcoDeadlineChanged Event

Parameters help
oldIcoDeadLine
uint256 help
newIcoDeadline
uint256 help

onOwnershipTransfered Event

Parameters help
oldOwner
address help
newOwner
address help

Functions Expand All Collapse All

balanceOf keyboard_arrow_up

Parameters help

Name Type
walletAddress
address help

Properties

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

transfer keyboard_arrow_up

Parameters help

Name Type
toAddr
address help
amountInWei
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transfer(address toAddr, uint256 amountInWei)  public   duringIcoOnlyTheOwner   returns (bool)     // don't icoNotPaused here. It's a logic issue. 
    {
        require(toAddr!=0x0 && toAddr!=msg.sender && amountInWei>0);     // Prevent transfer to 0x0 address and to self, amount must be >0

        uint256 availableTokens = balances[msg.sender];

        //----- Checking Token reserve first : if during ICO    

        if (msg.sender==owner && now <= icoDeadLine)                    // ICO Reserve Supply checking: Don't touch the RESERVE of tokens when owner is selling
        {
            assert(amountInWei<=availableTokens);

            uint256 balanceAfterTransfer = availableTokens.sub(amountInWei);      

            assert(balanceAfterTransfer >= icoReserveSupply);           // We try to sell more than allowed during an ICO
        }

        //-----

        balances[msg.sender] = balances[msg.sender].sub(amountInWei);
        balances[toAddr]     = balances[toAddr].add(amountInWei);

        emit Transfer(msg.sender, toAddr, amountInWei);

        return true;
    }

allowance keyboard_arrow_up

Parameters help

Name Type
walletAddress
address help
spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
    function allowance(address walletAddress, address spender) public constant returns (uint remaining)
    {
        return allowances[walletAddress][spender];
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
fromAddr
address help
toAddr
address help
amountInWei
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferFrom(address fromAddr, address toAddr, uint256 amountInWei)  public  returns (bool) 
    {
        if (amountInWei <= 0)                                   return false;
        if (allowances[fromAddr][msg.sender] < amountInWei)     return false;
        if (balances[fromAddr] < amountInWei)                   return false;

        balances[fromAddr]               = balances[fromAddr].sub(amountInWei);
        balances[toAddr]                 = balances[toAddr].add(amountInWei);
        allowances[fromAddr][msg.sender] = allowances[fromAddr][msg.sender].sub(amountInWei);

        emit Transfer(fromAddr, toAddr, amountInWei);
        return true;
    }

approve keyboard_arrow_up

Parameters help

Name Type
spender
address help
amountInWei
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

One or more of the following:
Source Code
    function approve(address spender, uint256 amountInWei) public returns (bool) 
    {
        require((amountInWei == 0) || (allowances[msg.sender][spender] == 0));
        allowances[msg.sender][spender] = amountInWei;
        emit Approval(msg.sender, spender, amountInWei);

        return true;
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

true must be equal to false
Source Code
    function() public                       
    {
        assert(true == false);      // If Ether is sent to this address, don't handle it -> send it back.
    }

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               // @param newOwner The address to transfer ownership to.
    {
        require(newOwner != address(0));

        emit onOwnershipTransfered(owner, newOwner);
        owner = newOwner;
    }

changeAdminUser keyboard_arrow_up

Parameters help

Name Type
newAdminAddress
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function    changeAdminUser(address newAdminAddress) public onlyOwner
    {
        require(newAdminAddress!=0x0);

        emit onAdminUserChange(admin, newAdminAddress);
        admin = newAdminAddress;
    }

changeIcoDeadLine keyboard_arrow_up

Parameters help

Name Type
newIcoDeadline
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function    changeIcoDeadLine(uint256 newIcoDeadline) public onlyAdmin
    {
        require(newIcoDeadline!=0);

        emit onIcoDeadlineChanged(icoDeadLine, newIcoDeadline);
        icoDeadLine = newIcoDeadline;
    }

changeHardCap keyboard_arrow_up

Parameters help

Name Type
newHardCap
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function    changeHardCap(uint256 newHardCap) public onlyAdmin
    {
        require(newHardCap!=0);

        emit onHardcapChanged(hardCap, newHardCap);
        hardCap = newHardCap;
    }

isHardcapReached keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function    isHardcapReached()  public view returns(bool)
    {
        return (isStoppingIcoOnHardCap && initSupply-balances[owner] > hardCap);
    }

pauseICO keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function    pauseICO()  public onlyAdmin
    {
        isIcoPaused = true;
        emit icoIsNowPaused(1);
    }

unpauseICO keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function    unpauseICO()  public onlyAdmin
    {
        isIcoPaused = false;
        emit icoHasRestarted(0);
    }

isPausedICO keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function    isPausedICO() public view     returns(bool)
    {
        return (isIcoPaused) ? true : false;
    }

destroyRemainingTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function destroyRemainingTokens() public onlyAdmin icoFinished icoNotPaused  returns(uint)
    {
        require(msg.sender==owner && now>icoDeadLine);

        address   toAddr = 0x0000000000000000000000000000000000000000;

        uint256   amountToBurn = balances[owner];

        if (amountToBurn > icoReserveSupply)
        {
            amountToBurn = amountToBurn.sub(icoReserveSupply);
        }

        balances[owner]  = balances[owner].sub(amountToBurn);
        balances[toAddr] = balances[toAddr].add(amountToBurn);

        emit Transfer(msg.sender, toAddr, amountToBurn);
        //Transfer(msg.sender, toAddr, amountToBurn);

        return 1;
    }