Blockwell

BaaSid

ERC20

This contract is an ERC20 token.

Name BaaSid
Symbol BAAS
Decimals 18
Total Supply 10,000,000,000 BAAS

About link

BaaSid (BAAS) is a cryptocurrency and operates on the Ethereum platform. BaaSid has a current supply of 10,000,000,000 with 5,500,000,000 in circulation. The last known price of BaaSid is 0.00279575 USD and is down -2.07 over the last 24 hours. It is currently trading on 4 active market(s) with $167,908.60 traded over the last 24 hours. More information can be found at https://www.baasid.com/#token.

Stats

Public Functions 23
Event Types 11
Code Size 11,362 bytes

Library Use

Uses SafeMath for uint256.

Events (11) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burn Event

Parameters help
owner
address help
value
uint256 help

Freeze Event

Parameters help
holder
address help

Lock Event

Parameters help
holder
address help
value
uint256 help

Mint Event

Parameters help
value
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

Pause Event

Parameters 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

Unpause Event

Parameters help

LockupInfo Struct

Members
releaseTime
uint256 help
termOfRound
uint256 help
unlockAmountPerRound
uint256 help
lockupBalance
uint256 help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

owner Variable

address help

newOwner Variable

address help

paused Variable

bool help

frozen Variable

mapping(address => bool) help

MONTH Variable

uint128 help
Internal Variable

initialSupply Variable

uint256 help
Internal Variable

totalSupply_ Variable

uint256 help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

locks Variable

mapping(address => bool) help
Internal Variable

allowed Variable

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

lockupInfo Variable

mapping(address => LockupInfo) help
Internal Variable

Functions Expand All Collapse All

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

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

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pause() public onlyOwner whenNotPaused {
  paused = true;
  emit Pause();
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unpause() public onlyOwner whenPaused {
  paused = false;
  emit Unpause();
}

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
_holder
address help

Properties

Visibility help public
Mutability help view
Source Code
function balanceOf(address _holder) public view returns (uint256 balance) {
  return balances[_holder] + lockupInfo[_holder].lockupBalance;
}

Parameters help

Name Type
_holder
address help
_spender
address help

Properties

Visibility help public
Mutability help view
Source Code
function allowance(address _holder, address _spender)
  public
  view
  returns (uint256)
{
  return allowed[_holder][_spender];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value)
  public
  whenNotPaused
  notFrozen(msg.sender)
  returns (bool)
{
  if (locks[msg.sender]) {
    autoUnlock(msg.sender);
  }
  require(_to != address(0));
  require(_value <= balances[msg.sender]);

  // SafeMath.sub will throw if there is not enough balance.
  balances[msg.sender] = balances[msg.sender].sub(_value);
  balances[_to] = balances[_to].add(_value);
  emit Transfer(msg.sender, _to, _value);
  return true;
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public whenNotPaused notFrozen(_from) returns (bool) {
  if (locks[_from]) {
    autoUnlock(_from);
  }
  require(_to != address(0));
  require(_value <= balances[_from]);
  require(_value <= allowed[_from][msg.sender]);

  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
  emit Transfer(_from, _to, _value);
  return true;
}

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
  whenNotPaused
  returns (bool)
{
  allowed[msg.sender][_spender] = _value;
  emit Approval(msg.sender, _spender, _value);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() public payable {
  revert();
}

Parameters help

Name Type
_spender
address help
_value
uint256 help
_extraData
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
Source Code
function approveAndCall(
  address _spender,
  uint256 _value,
  bytes _extraData
) public returns (bool success) {
  require(isContract(_spender));
  TokenRecipient spender = TokenRecipient(_spender);
  if (approve(_spender, _value)) {
    spender.receiveApproval(msg.sender, _value, this, _extraData);
    return true;
  }
}

Parameters help

Name Type
_holder
address help
_amount
uint256 help
_releaseStart
uint256 help
_termOfRound
uint256 help
_releaseRate
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function lock(
  address _holder,
  uint256 _amount,
  uint256 _releaseStart,
  uint256 _termOfRound,
  uint256 _releaseRate
) public onlyOwner returns (bool) {
  require(locks[_holder] == false);
  require(balances[_holder] >= _amount);
  balances[_holder] = balances[_holder].sub(_amount);
  lockupInfo[_holder] = LockupInfo(
    _releaseStart,
    _termOfRound,
    _amount.div(100).mul(_releaseRate),
    _amount
  );

  locks[_holder] = true;

  emit Lock(_holder, _amount);

  return true;
}

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function unlock(address _holder) public onlyOwner returns (bool) {
  require(locks[_holder] == true);
  uint256 releaseAmount = lockupInfo[_holder].lockupBalance;

  delete lockupInfo[_holder];
  locks[_holder] = false;

  emit Unlock(_holder, releaseAmount);
  balances[_holder] = balances[_holder].add(releaseAmount);

  return true;
}

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeAccount(address _holder) public onlyOwner returns (bool) {
  require(!frozen[_holder]);
  frozen[_holder] = true;
  emit Freeze(_holder);
  return true;
}

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function unfreezeAccount(address _holder) public onlyOwner returns (bool) {
  require(frozen[_holder]);
  frozen[_holder] = false;
  emit Unfreeze(_holder);
  return true;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_holder
address help

Properties

Visibility help public
Mutability help view
Source Code
function showLockState(address _holder)
  public
  view
  returns (
    bool,
    uint256,
    uint256,
    uint256,
    uint256
  )
{
  return (
    locks[_holder],
    lockupInfo[_holder].lockupBalance,
    lockupInfo[_holder].releaseTime,
    lockupInfo[_holder].termOfRound,
    lockupInfo[_holder].unlockAmountPerRound
  );
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function distribute(address _to, uint256 _value)
  public
  onlyOwner
  returns (bool)
{
  require(_to != address(0));
  require(_value <= balances[owner]);

  balances[owner] = balances[owner].sub(_value);
  balances[_to] = balances[_to].add(_value);
  emit Transfer(owner, _to, _value);
  return true;
}

Parameters help

Name Type
_to
address help
_value
uint256 help
_releaseStart
uint256 help
_termOfRound
uint256 help
_releaseRate
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function distributeWithLockup(
  address _to,
  uint256 _value,
  uint256 _releaseStart,
  uint256 _termOfRound,
  uint256 _releaseRate
) public onlyOwner returns (bool) {
  distribute(_to, _value);
  lock(_to, _value, _releaseStart, _termOfRound, _releaseRate);
  return true;
}

Parameters help

Name Type
token
ERC20 help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function claimToken(
  ERC20 token,
  address _to,
  uint256 _value
) public onlyOwner returns (bool) {
  token.transfer(_to, _value);
  return true;
}

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _value) public onlyOwner returns (bool success) {
  require(_value <= balances[msg.sender]);
  address burner = msg.sender;
  balances[burner] = balances[burner].sub(_value);
  totalSupply_ = totalSupply_.sub(_value);
  emit Burn(burner, _value);
  return true;
}

Parameters help

Name Type
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mint(uint256 _amount) public onlyOwner returns (bool) {
  totalSupply_ = totalSupply_.add(_amount);
  balances[owner] = balances[owner].add(_amount);

  emit Transfer(address(0), owner, _amount);
  return true;
}

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 BaaSidToken.isContract keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help internal
Mutability help view
Source Code
function isContract(address addr) internal view returns (bool) {
  uint256 size;
  assembly {
    size := extcodesize(addr)
  }
  return size > 0;
}

internal BaaSidToken.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) {
  if (lockupInfo[_holder].releaseTime <= now) {
    return releaseTimeLock(_holder);
  }
  return false;
}

internal BaaSidToken.releaseTimeLock keyboard_arrow_up

Parameters help

Name Type
_holder
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function releaseTimeLock(address _holder) internal returns (bool) {
  require(locks[_holder]);
  uint256 releaseAmount = 0;
  // If lock status of holder is finished, delete lockup info.

  for (; lockupInfo[_holder].releaseTime <= now; ) {
    if (
      lockupInfo[_holder].lockupBalance <=
      lockupInfo[_holder].unlockAmountPerRound
    ) {
      releaseAmount = releaseAmount.add(lockupInfo[_holder].lockupBalance);
      delete lockupInfo[_holder];
      locks[_holder] = false;
      break;
    } else {
      releaseAmount = releaseAmount.add(
        lockupInfo[_holder].unlockAmountPerRound
      );
      lockupInfo[_holder].lockupBalance = lockupInfo[_holder].lockupBalance.sub(
        lockupInfo[_holder].unlockAmountPerRound
      );

      lockupInfo[_holder].releaseTime = lockupInfo[_holder].releaseTime.add(
        lockupInfo[_holder].termOfRound
      );
    }
  }

  emit Unlock(_holder, releaseAmount);
  balances[_holder] = balances[_holder].add(releaseAmount);
  return true;
}