Blockwell

BASIC Token

ERC20

This contract is an ERC20 token.

Name BASIC Token
Symbol BASIC
Decimals 18
Total Supply 8,326,258,167 BASIC

About link description

BASIC (BASIC) is a cryptocurrency and operates on the Ethereum platform. BASIC has a current supply of 8,326,258,166.69 with 5,071,501,456.657481 in circulation. The last known price of BASIC is 0.00695755 USD and is up 2.08 over the last 24 hours. It is currently trading on 4 active market(s) with $2,442,965.18 traded over the last 24 hours. More information can be found at https://basic.finance/.

Stats

Public Functions 32
Event Types 11
Code Size 21,570 bytes

Events (11) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Freeze Event

Parameters help
holder
address help

Lock Event

Parameters help
holder
address help
value
uint256 help
releaseTime
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Paused Event

Parameters help
account
address help

PauserAdded Event

Parameters help
account
address help

PauserRemoved Event

Parameters help
account
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Unfreeze Event

Parameters help
holder
address help

Unlock Event

Parameters help
holder
address help
value
uint256 help

Unpaused Event

Parameters help
account
address help

LockInfo Struct

Members
_releaseTime
uint256 help
_amount
uint256 help

implementation Variable

address help

owner Variable

address help

newOwner Variable

address help

frozenAccount Variable

mapping(address => bool) help

timelockList Variable

mapping(address => LockInfo[]) help
Internal Variable

_name Variable

string help
Internal Variable

_symbol Variable

string help
Internal Variable

_decimals Variable

uint8 help
Internal Variable

_balances Variable

mapping(address => uint256) help
Internal Variable

_allowed Variable

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

_totalSupply Variable

uint256 help
Internal Variable

_paused Variable

bool help
Internal Variable

_pausers Variable

Roles.Role help
Internal Variable

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function totalSupply() public view returns (uint256) {
  return _totalSupply;
}

Parameters help

Name Type
owner
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address owner) public view returns (uint256) {
  uint256 totalBalance = super.balanceOf(owner);
  if (timelockList[owner].length > 0) {
    for (uint256 i = 0; i < timelockList[owner].length; i++) {
      totalBalance = totalBalance.add(timelockList[owner][i]._amount);
    }
  }

  return totalBalance;
}

Parameters help

Name Type
owner
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address owner, address spender)
  public
  view
  returns (uint256)
{
  return _allowed[owner][spender];
}

Parameters help

Name Type
to
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transfer(address to, uint256 value)
  public
  notFrozen(msg.sender)
  returns (bool)
{
  if (timelockList[msg.sender].length > 0) {
    _autoUnlock(msg.sender);
  }
  return super.transfer(to, value);
}

Parameters help

Name Type
spender
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function approve(address spender, uint256 value)
  public
  whenNotPaused
  returns (bool)
{
  return super.approve(spender, value);
}

Parameters help

Name Type
from
address help
to
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address from,
  address to,
  uint256 value
) public notFrozen(from) returns (bool) {
  if (timelockList[from].length > 0) {
    _autoUnlock(msg.sender);
  }
  return super.transferFrom(from, to, value);
}

Parameters help

Name Type
spender
address help
addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function increaseAllowance(address spender, uint256 addedValue)
  public
  returns (bool)
{
  require(spender != address(0));

  _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue);
  emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
  return true;
}

Parameters help

Name Type
spender
address help
subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
  public
  returns (bool)
{
  require(spender != address(0));

  _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(
    subtractedValue
  );
  emit Approval(msg.sender, spender, _allowed[msg.sender][spender]);
  return true;
}

burn keyboard_arrow_up

Parameters help

Name Type
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burn(uint256 value) public {
  _burn(msg.sender, value);
}

burnFrom keyboard_arrow_up

Parameters help

Name Type
from
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burnFrom(address from, uint256 value) public {
  _burnFrom(from, value);
}

isOwner keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function isOwner(address account) public view returns (bool) {
  if (account == owner) {
    return true;
  } else {
    return false;
  }
}

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 {
  require(_newOwner != address(0));
  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 onlyNewOwner returns (bool) {
  emit OwnershipTransferred(owner, newOwner);
  owner = newOwner;
  newOwner = address(0);
}

isPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function isPauser(address account) public view returns (bool) {
  return _pausers.has(account);
}

addPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function addPauser(address account) public onlyPauser {
  _addPauser(account);
}

removePauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function removePauser(address account) public onlyOwner {
  _removePauser(account);
}

renouncePauser keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function renouncePauser() public {
  _removePauser(msg.sender);
}

paused keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function paused() public view returns (bool) {
  return _paused;
}

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function pause() public onlyPauser whenNotPaused {
  _paused = true;
  emit Paused(msg.sender);
}

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function unpause() public onlyPauser whenPaused {
  _paused = false;
  emit Unpaused(msg.sender);
}

Parameters help

Name Type
spender
address help
addedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function increaseAllowance(address spender, uint256 addedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.increaseAllowance(spender, addedValue);
}

Parameters help

Name Type
spender
address help
subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
function decreaseAllowance(address spender, uint256 subtractedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.decreaseAllowance(spender, subtractedValue);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function name() public view returns (string memory) {
  return _name;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function symbol() public view returns (string memory) {
  return _symbol;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
function decimals() public view returns (uint8) {
  return _decimals;
}

freezeAccount keyboard_arrow_up

Parameters help

Name Type
holder
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function freezeAccount(address holder) public onlyPauser returns (bool) {
  require(!frozenAccount[holder]);
  frozenAccount[holder] = true;
  emit Freeze(holder);
  return true;
}

unfreezeAccount keyboard_arrow_up

Parameters help

Name Type
holder
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function unfreezeAccount(address holder) public onlyPauser returns (bool) {
  require(frozenAccount[holder]);
  frozenAccount[holder] = false;
  emit Unfreeze(holder);
  return true;
}

lock keyboard_arrow_up

Parameters help

Name Type
holder
address help
value
uint256 help
releaseTime
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function lock(
  address holder,
  uint256 value,
  uint256 releaseTime
) public onlyPauser returns (bool) {
  require(
    _balances[holder] >= value,
    "There is not enough balances of holder."
  );
  _lock(holder, value, releaseTime);

  return true;
}

transferWithLock keyboard_arrow_up

Parameters help

Name Type
holder
address help
value
uint256 help
releaseTime
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull

Requirements help

Source Code
function transferWithLock(
  address holder,
  uint256 value,
  uint256 releaseTime
) public onlyPauser returns (bool) {
  _transfer(msg.sender, holder, value);
  _lock(holder, value, releaseTime);
  return true;
}

unlock keyboard_arrow_up

Parameters help

Name Type
holder
address help
idx
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyPauser checks for the following:
One or more of the following: -null - ORnull
Source Code
function unlock(address holder, uint256 idx) public onlyPauser returns (bool) {
  require(timelockList[holder].length > idx, "There is not lock info.");
  _unlock(holder, idx);
  return true;
}

upgradeTo keyboard_arrow_up

Parameters help

Name Type
_newImplementation
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function upgradeTo(address _newImplementation) public onlyOwner {
  require(implementation != _newImplementation);
  _setImplementation(_newImplementation);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
function() external payable {
  address impl = implementation;
  require(impl != address(0));
  assembly {
    let ptr := mload(0x40)
    calldatacopy(ptr, 0, calldatasize)
    let result := delegatecall(gas, impl, ptr, calldatasize, 0, 0)
    let size := returndatasize
    returndatacopy(ptr, 0, size)

    switch result
    case 0 {
      revert(ptr, size)
    }
    default {
      return(ptr, size)
    }
  }
}

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 BASIC._lock keyboard_arrow_up

Parameters help

Name Type
holder
address help
value
uint256 help
releaseTime
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _lock(
  address holder,
  uint256 value,
  uint256 releaseTime
) internal returns (bool) {
  _balances[holder] = _balances[holder].sub(value);
  timelockList[holder].push(LockInfo(releaseTime, value));

  emit Lock(holder, value, releaseTime);
  return true;
}

internal BASIC._unlock keyboard_arrow_up

Parameters help

Name Type
holder
address help
idx
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _unlock(address holder, uint256 idx) internal returns (bool) {
  LockInfo storage lockinfo = timelockList[holder][idx];
  uint256 releaseAmount = lockinfo._amount;

  delete timelockList[holder][idx];
  timelockList[holder][idx] = timelockList[holder][
    timelockList[holder].length.sub(1)
  ];
  timelockList[holder].length -= 1;

  emit Unlock(holder, releaseAmount);
  _balances[holder] = _balances[holder].add(releaseAmount);

  return true;
}

internal BASIC._autoUnlock keyboard_arrow_up

Parameters help

Name Type
holder
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _autoUnlock(address holder) internal returns (bool) {
  for (uint256 idx = 0; idx < timelockList[holder].length; idx++) {
    if (timelockList[holder][idx]._releaseTime <= now) {
      // If lockupinfo was deleted, loop restart at same position.
      if (_unlock(holder, idx)) {
        idx -= 1;
      }
    }
  }
  return true;
}

internal BASIC._setImplementation keyboard_arrow_up

Parameters help

Name Type
_newImp
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _setImplementation(address _newImp) internal {
  implementation = _newImp;
}

internal ERC20._transfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address from,
  address to,
  uint256 value
) internal {
  require(to != address(0));

  _balances[from] = _balances[from].sub(value);
  _balances[to] = _balances[to].add(value);
  emit Transfer(from, to, value);
}

internal ERC20._mint keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address account, uint256 value) internal {
  require(account != address(0));

  _totalSupply = _totalSupply.add(value);
  _balances[account] = _balances[account].add(value);
  emit Transfer(address(0), account, value);
}

internal ERC20._burn keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(address account, uint256 value) internal {
  require(account != address(0));

  _totalSupply = _totalSupply.sub(value);
  _balances[account] = _balances[account].sub(value);
  emit Transfer(account, address(0), value);
}

internal ERC20._burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burnFrom(address account, uint256 value) internal {
  _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value);
  _burn(account, value);
  emit Approval(account, msg.sender, _allowed[account][msg.sender]);
}

internal Pausable.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {
  _paused = false;
}

internal PauserRole.constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction
Source Code
constructor() internal {
  _addPauser(msg.sender);
}

internal PauserRole._addPauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _addPauser(address account) internal {
  _pausers.add(account);
  emit PauserAdded(account);
}

internal PauserRole._removePauser keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _removePauser(address account) internal {
  _pausers.remove(account);
  emit PauserRemoved(account);
}

internal ERC20._transfer keyboard_arrow_up

Parameters help

Name Type
from
address help
to
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address from,
  address to,
  uint256 value
) internal {
  require(to != address(0));

  _balances[from] = _balances[from].sub(value);
  _balances[to] = _balances[to].add(value);
  emit Transfer(from, to, value);
}

internal ERC20._mint keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _mint(address account, uint256 value) internal {
  require(account != address(0));

  _totalSupply = _totalSupply.add(value);
  _balances[account] = _balances[account].add(value);
  emit Transfer(address(0), account, value);
}

internal ERC20._burn keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burn(address account, uint256 value) internal {
  require(account != address(0));

  _totalSupply = _totalSupply.sub(value);
  _balances[account] = _balances[account].sub(value);
  emit Transfer(account, address(0), value);
}

internal ERC20._burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
value
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function _burnFrom(address account, uint256 value) internal {
  _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value);
  _burn(account, value);
  emit Approval(account, msg.sender, _allowed[account][msg.sender]);
}