ERC20
This contract is an ERC20 token.
Name
B2BX
Symbol
B2BX
Decimals
18
Total Supply
19,822,337 B2BX
About
Stats
Public Functions
20
Event Types
6
Code Size
12,864 bytes
Library Use
Uses SafeMath for uint256.
Events (6) keyboard_arrow_up
State Variables (18) keyboard_arrow_up
Functions
owner keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
validAddress checks for the following:
onlyOwner checks for the following:
Source Code
function transferOwnership(address _newOwner)
validAddress(_newOwner)
onlyOwner
{
require(_newOwner != owner);
owner = _newOwner;
}
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
validAddress checks for the following:
transfersAllowed checks for the following:
transfersEnabled must be true
Source Code
function transfer(address _to, uint256 _value)
public
validAddress(_to)
transfersAllowed(msg.sender)
returns (bool)
{
return super.transfer(_to, _value);
}
transferFrom keyboard_arrow_up
Modifiers help
validAddress checks for the following:
transfersAllowed checks for the following:
transfersEnabled must be true
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public validAddress(_to) transfersAllowed(_from) returns (bool) {
return super.transferFrom(_from, _to, _value);
}
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)
{
require(_value == 0 || allowance[msg.sender][_spender] == 0);
allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
initialSupply keyboard_arrow_up
totalSoldTokens keyboard_arrow_up
totalProjectToken keyboard_arrow_up
fundingEnabled keyboard_arrow_up
transfersEnabled keyboard_arrow_up
unlock keyboard_arrow_up
Parameters help
This function has no parameters.
Requirements help
Source Code
function unlock() external {
require(allocations[msg.sender].locked);
require(now >= allocations[msg.sender].end);
balanceOf[msg.sender] = balanceOf[msg.sender].add(
allocations[msg.sender].value
);
allocations[msg.sender].locked = false;
Transfer(this, msg.sender, allocations[msg.sender].value);
Unlock(this, msg.sender, allocations[msg.sender].value);
}
finalize keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Requirements help
fundingEnabled must be true
UNKNOWN VALUE
must be greater than
0
UNKNOWN VALUE
must be greater than
0
UNKNOWN VALUE
must be greater than
0
Source Code
function finalize() external onlyOwner {
require(fundingEnabled);
// Get total sold tokens on the fundingWallet.
// totalSoldTokens is 80% of the total number of tokens.
totalSoldTokens = maxSaleToken.sub(balanceOf[fundingWallet]);
// totalProjectToken = totalSoldTokens * 20 / 80 (20% this is B2BX Project & 80% this is totalSoldTokens)
//
// |----------totalSoldTokens-----totalProjectToken|
// |================80%================|====20%====|
// |totalSupply=(totalSoldTokens+totalProjectToken)|
totalProjectToken = totalSoldTokens.mul(20).div(80);
totalSupply = totalSoldTokens.add(totalProjectToken);
// B2BX Prodject allocations tokens.
// 40% of the totalProjectToken tokens (== 10% totalSupply) go to B2BX Company.
lock(
0x324044e0fB93A2D0274345Eba0E604B6F35826d2,
totalProjectToken.mul(50).div(100),
now
);
// 40% of the totalProjectToken tokens (== 8% totalSupply) go to developers.
lock(
0x6653f5e04ED6Ec6f004D345868f47f4CebAA095e,
totalProjectToken.mul(40).div(100),
(now + 6 * 30 days)
);
// 10% of the totalProjectToken tokens (== 2% totalSupply) go to bounty program.
lock(
0x591e7CF52D6b3ccC452Cd435E3eA88c1032b0DE3,
totalProjectToken.mul(10).div(100),
now
);
// Zeroing a cold wallet.
balanceOf[fundingWallet] = 0;
// End of crowdfunding.
fundingEnabled = false;
// End of crowdfunding.
Transfer(this, fundingWallet, 0);
Finalize(msg.sender, totalSupply);
}
disableTransfers keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
onlyOwner checks for the following:
Requirements help
transfersEnabled must be true
Source Code
function disableTransfers() external onlyOwner {
require(transfersEnabled);
transfersEnabled = false;
DisableTransfers(msg.sender);
}
disableFundingWallets keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
fundingEnabled must be true
Source Code
function disableFundingWallets(address _address) external onlyOwner {
require(fundingEnabled);
require(fundingWallet != _address);
require(fundingWallets[_address]);
fundingWallets[_address] = false;
}
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 SmartToken.lock keyboard_arrow_up
Modifiers help
validAddress checks for the following:
onlyOwner checks for the following:
Requirements help
UNKNOWN VALUE
must be greater than
0
Source Code
function lock(
address _to,
uint256 _value,
uint256 _end
) internal validAddress(_to) onlyOwner returns (bool) {
require(_value > 0);
assert(totalProjectToken > 0);
// Check that this lock doesn't exceed the total amount of tokens currently available for totalProjectToken.
totalLockToken = totalLockToken.add(_value);
assert(totalProjectToken >= totalLockToken);
// Make sure that a single address can be locked tokens only once.
require(allocations[_to].value == 0);
// Assign a new lock.
allocations[_to] = allocationLock({value: _value, end: _end, locked: true});
Lock(this, _to, _value, _end);
return true;
}