Blockwell

B2BX

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

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

DisableTransfers Event

Parameters help
_from
address help

Finalize Event

Parameters help
_from
address help
_value
uint256 help

Lock Event

Parameters help
_from
address help
_to
address help
_value
uint256 help
_end
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

Unlock Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

allocationLock Struct

Members
value
uint256 help
end
uint256 help
locked
bool help

initialSupply Variable

uint256 help

fundingWallet Variable

address help

fundingEnabled Variable

bool help

maxSaleToken Variable

uint256 help

totalSoldTokens Variable

uint256 help

totalProjectToken Variable

uint256 help

transfersEnabled Variable

bool help

standard Variable

string help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

totalSupply Variable

uint256 help

owner Variable

address help

balanceOf Variable

mapping(address => uint256) help

totalLockToken Variable

uint256 help
Internal Variable

fundingWallets Variable

mapping(address => bool) help
Internal Variable

allocations Variable

mapping(address => allocationLock) help
Internal Variable

allowance Variable

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

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;
}

transferOwnership keyboard_arrow_up

Parameters help

Name Type
_newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address _newOwner)
  validAddress(_newOwner)
  onlyOwner
{
  require(_newOwner != owner);

  owner = _newOwner;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

This function has no parameters.

Properties

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

Parameters help

This function has no parameters.

Properties

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

Parameters help

This function has no parameters.

Properties

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

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;
}

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;
}

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
  validAddress(_to)
  transfersAllowed(msg.sender)
  returns (bool)
{
  return super.transfer(_to, _value);
}

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 validAddress(_to) transfersAllowed(_from) returns (bool) {
  return super.transferFrom(_from, _to, _value);
}

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)
{
  require(_value == 0 || allowance[msg.sender][_spender] == 0);
  allowance[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

initialSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

totalSoldTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

totalProjectToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

fundingEnabled keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function fundingEnabled() public constant returns (bool) {
  fundingEnabled;
}

transfersEnabled keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function transfersEnabled() public constant returns (bool) {
  transfersEnabled;
}

unlock keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

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.

Properties

Visibility help public
Mutability help transaction

Requirements help

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.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function disableTransfers() external onlyOwner {
  require(transfersEnabled);

  transfersEnabled = false;

  DisableTransfers(msg.sender);
}

disableFundingWallets keyboard_arrow_up

Parameters help

Name Type
_address
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function disableFundingWallets(address _address) external onlyOwner {
  require(fundingEnabled);
  require(fundingWallet != _address);
  require(fundingWallets[_address]);

  fundingWallets[_address] = false;
}

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 SmartToken.lock keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help
_end
uint256 help

Properties

Visibility help internal
Mutability help transaction
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;
}