Blockwell

Bancor Network Token

ERC20

This contract is an ERC20 token.

Name Bancor Network Token
Symbol BNT
Decimals 18
Total Supply 69,148,529 BNT

About link description

Bancor is an on-chain liquidity protocol that enables automated, decentralized exchange on Ethereum and across blockchains. The protocol is made up of a series of smart contracts that are designed to pool liquidity and perform peer-to-contract trades in a single transaction with no counterparty. Users stake BNT in automated market makers in exchange for trading fees, BNT staking rewards and voting rights in the Bancor DAO. Bancor has processed more than $2 billion in trade volume across thousands of tokens, with millions in fees generated by stakers.

Stats

Public Functions 16
Event Types 6
Code Size 13,813 bytes

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

Destruction Event

Parameters help
_amount
uint256 help

Issuance Event

Parameters help
_amount
uint256 help

NewSmartToken Event

Parameters help
_token
address help

OwnerUpdate Event

Parameters help
_prevOwner
address help
_newOwner
address help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Functions Expand All Collapse All

owner keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function owner() public constant returns (address owner) { owner; }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferOwnership(address _newOwner) public ownerOnly {
        require(_newOwner != owner);
        newOwner = _newOwner;
    }

acceptOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function acceptOwnership() public {
        require(msg.sender == newOwner);
        OwnerUpdate(owner, newOwner);
        owner = newOwner;
        newOwner = 0x0;
    }

withdrawTokens keyboard_arrow_up

Parameters help

Name Type
_token
IERC20Token help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function withdrawTokens(IERC20Token _token, address _to, uint256 _amount)
        public
        ownerOnly
        validAddress(_token)
        validAddress(_to)
        notThis(_to)
    {
        assert(_token.transfer(_to, _amount));
    }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function name() public constant returns (string name) { name; }

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function symbol() public constant returns (string symbol) { symbol; }

decimals keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
    function decimals() public constant returns (uint8 decimals) { decimals; }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

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

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) public constant returns (uint256 remaining) { _owner; _spender; remaining; }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
    function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) {
        assert(super.transfer(_to, _value));

        // transferring to the contract address destroys tokens
        if (_to == address(this)) {
            balanceOf[_to] -= _value;
            totalSupply -= _value;
            Destruction(_value);
        }

        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

Modifiers help

Source Code
    function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) {
        assert(super.transferFrom(_from, _to, _value));

        // transferring to the contract address destroys tokens
        if (_to == address(this)) {
            balanceOf[_to] -= _value;
            totalSupply -= _value;
            Destruction(_value);
        }

        return true;
    }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
    function approve(address _spender, uint256 _value)
        public
        validAddress(_spender)
        returns (bool success)
    {
        // if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal
        require(_value == 0 || allowance[msg.sender][_spender] == 0);

        allowance[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

disableTransfers keyboard_arrow_up

Parameters help

Name Type
_disable
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
    function disableTransfers(bool _disable) public ownerOnly {
        transfersEnabled = !_disable;
    }

issue keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function issue(address _to, uint256 _amount)
        public
        ownerOnly
        validAddress(_to)
        notThis(_to)
    {
        totalSupply = safeAdd(totalSupply, _amount);
        balanceOf[_to] = safeAdd(balanceOf[_to], _amount);

        Issuance(_amount);
        Transfer(this, _to, _amount);
    }

destroy keyboard_arrow_up

Parameters help

Name Type
_from
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function destroy(address _from, uint256 _amount)
        public
        ownerOnly
    {
        balanceOf[_from] = safeSub(balanceOf[_from], _amount);
        totalSupply = safeSub(totalSupply, _amount);

        Transfer(_from, this, _amount);
        Destruction(_amount);
    }