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 (BNT) is a cryptocurrency launched in 2017and operates on the Ethereum platform. Bancor has a current supply of 235,075,994.05773157. The last known price of Bancor is 2.86722244 USD and is down -0.60 over the last 24 hours. It is currently trading on 208 active market(s) with $38,589,189.10 traded over the last 24 hours. More information can be found at https://bancor.network/.
Stats
Public Functions
16
Event Types
6
Code Size
13,813 bytes
Events (6) keyboard_arrow_up
State Variables (11) keyboard_arrow_up
Functions
owner keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
ownerOnly checks for the following:
Source Code
function transferOwnership(address _newOwner) public ownerOnly {
require(_newOwner != owner);
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
withdrawTokens keyboard_arrow_up
Modifiers help
ownerOnly checks for the following:
validAddress checks for the following:
validAddress checks for the following:
notThis checks for the following:
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
symbol keyboard_arrow_up
decimals keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Modifiers help
transfersAllowed checks for the following:
transfersEnabled must be true
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
Modifiers help
transfersAllowed checks for the following:
transfersEnabled must be true
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
Requirements help
One or more of the following:
-
allowance for the sender's address for _spender
must be equal to
0
- OR
_value
must be equal to
0
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
Modifiers help
ownerOnly checks for the following:
Source Code
function disableTransfers(bool _disable) public ownerOnly {
transfersEnabled = !_disable;
}
issue keyboard_arrow_up
Modifiers help
ownerOnly checks for the following:
validAddress checks for the following:
notThis checks for the following:
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
Modifiers help
ownerOnly checks for the following:
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);
}
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.
internal SafeMath.safeAdd keyboard_arrow_up
Source Code
function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x + _y;
assert(z >= _x);
return z;
}
internal SafeMath.safeSub keyboard_arrow_up
internal SafeMath.safeMul keyboard_arrow_up
Requirements help
Source Code
function safeMul(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x * _y;
assert(_x == 0 || z / _x == _y);
return z;
}