Blockwell

CUBE

ERC20

This contract is an ERC20 token.

Name CUBE
Symbol AUTO
Decimals 18
Total Supply 7,200,000,000 AUTO

About

Stats

Public Functions 49
Event Types 14
Code Size 24,578 bytes

Library Use

Uses SafeMath for uint256.

Events (14) keyboard_arrow_up

Burn Event

Parameters help
from
address help
value
uint256 help

ChangeConversionRate Event

Parameters help
from
uint256 help
to
uint256 help

ChangeFreezeTime Event

Parameters help
from
uint256 help
to
uint256 help

ChangeTokenName Event

Parameters help
who
address help

ChangeTokenSymbol Event

Parameters help
who
address help

ChangeTokenWalletAddress Event

Parameters help
from
address help
to
address help

ChangeTotalSupply Event

Parameters help
from
uint256 help
to
uint256 help

Freeze Event

Parameters help
_who
address help
_date
uint256 help

Melt Event

Parameters help
_who
address help

Mint Event

Parameters help
to
address help
value
uint256 help

Payable Event

Parameters help
who
address help
eth_amount
uint256 help

ProposalAdd Event

Parameters help
vote_id
uint help
generator
address help
descript
string help

ProposalEnd Event

Parameters help
vote_id
uint help
descript
string help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

open_free Variable

bool help

owner Variable

address help

token_wallet_address Variable

address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint256 help

total_supply Variable

uint256 help

conversion_rate Variable

uint256 help

transfer_close Variable

bool help

freezeDateOf Variable

mapping(address => uint256) help

sale_list Variable

Sale[] help
Internal Variable

sale_sold Variable

uint256[] help
Internal Variable

vote_id Variable

uint help
Internal Variable

Proposals Variable

Proposal[] help
Internal Variable

balance_of Variable

mapping(address => uint256) help
Internal Variable

allowances Variable

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

address_exist Variable

mapping(address => bool) help
Internal Variable

address_list Variable

address[] help
Internal Variable

Functions Expand All Collapse All

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 != 0x0);
  owner = newOwner;
}

Parameters help

Name Type
token_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address token_owner)
  public
  constant
  returns (uint256 balance)
{
  return balance_of[token_owner];
}

Parameters help

Name Type
_hoarder
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _hoarder, address _spender)
  public
  constant
  returns (uint256)
{
  return allowances[_hoarder][_spender];
}

superApprove keyboard_arrow_up

Parameters help

Name Type
_hoarder
address help
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function superApprove(
  address _hoarder,
  address _spender,
  uint256 _value
) public onlyOwner returns (bool) {
  require(_hoarder != address(0));
  require(_spender != address(0));
  require(_value >= 0);
  allowances[_hoarder][_spender] = _value;
  return true;
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _value) public returns (bool) {
  require(msg.sender != address(0));
  require(_spender != address(0));
  require(_value >= 0);
  allowances[msg.sender][_spender] = _value;
  return true;
}

getAddressLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getAddressLength() public constant onlyOwner returns (uint256) {
  return address_list.length;
}

getAddressIndex keyboard_arrow_up

Parameters help

Name Type
_address_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function getAddressIndex(uint256 _address_index)
  public
  constant
  onlyOwner
  returns (address _address)
{
  _address = address_list[_address_index];
}

getAllAddress keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getAllAddress() public constant onlyOwner returns (address[]) {
  return address_list;
}

getAddressExist keyboard_arrow_up

Parameters help

Name Type
_target
address help

Properties

Visibility help public
Mutability help constant
Source Code
function getAddressExist(address _target) public constant returns (bool) {
  if (_target == address(0)) {
    return false;
  } else {
    return address_exist[_target];
  }
}

mintToken keyboard_arrow_up

Parameters help

Name Type
to
address help
token_amount
uint256 help
freeze_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintToken(
  address to,
  uint256 token_amount,
  uint256 freeze_timestamp
) public onlyOwner returns (bool) {
  require(token_amount > 0);
  require(balance_of[token_wallet_address] >= token_amount);
  require(balance_of[to] + token_amount > balance_of[to]);
  uint256 token_plus_bonus = 0;
  uint256 sale_number = 0;

  var (sale_info, isSale) = nowSaleInfo();
  if (isSale) {
    sale_number = sale_info.sale_number;
    uint8 bonus_rate = sale_info.bonus_rate;
    token_plus_bonus = addBonus(token_amount, bonus_rate);
    require(checkSaleCanSell(sale_number, token_plus_bonus) == true);
    addSaleSold(sale_number, token_plus_bonus);
  } else if (open_free) {
    token_plus_bonus = token_amount;
  } else {
    require(open_free == true);
  }

  balance_of[token_wallet_address] -= token_plus_bonus;
  balance_of[to] += token_plus_bonus;

  uint256 _freeze = 0;
  if (freeze_timestamp >= 0) {
    _freeze = freeze_timestamp;
  }

  freezeTo(to, now + _freeze); // FreezeToken.sol
  Transfer(0x0, to, token_plus_bonus);
  addAddress(to);
  return true;
}

superMint keyboard_arrow_up

Parameters help

Name Type
to
address help
token_amount
uint256 help
freeze_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function superMint(
  address to,
  uint256 token_amount,
  uint256 freeze_timestamp
) public onlyOwner returns (bool) {
  require(token_amount > 0);
  require(balance_of[token_wallet_address] >= token_amount);
  require(balance_of[to] + token_amount > balance_of[to]);

  balance_of[token_wallet_address] -= token_amount;
  balance_of[to] += token_amount;

  uint256 _freeze = 0;
  if (freeze_timestamp >= 0) {
    _freeze = freeze_timestamp;
  }

  freezeTo(to, now + _freeze);
  Transfer(0x0, to, token_amount);
  Mint(to, token_amount);
  addAddress(to);
  return true;
}

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 {
  _transfer(msg.sender, to, value);
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _amount
) public {
  require(msg.sender != address(0));
  require(_from != address(0));
  require(_amount <= allowances[_from][msg.sender]);
  _transfer(_from, _to, _amount);
  allowances[_from][msg.sender] -= _amount;
}

transferOpen keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOpen() public onlyOwner {
  transfer_close = false;
}

transferClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function transferClose() public onlyOwner {
  transfer_close = true;
}

getProposalLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getProposalLength() public constant returns (uint256) {
  return Proposals.length;
}

getProposalIndex keyboard_arrow_up

Parameters help

Name Type
_proposal_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function getProposalIndex(uint256 _proposal_index)
  public
  constant
  returns (
    address generator,
    string descript,
    uint256 start_timestamp,
    uint256 end_timestamp,
    bool executed,
    uint256 voting_count,
    uint256 total_weight,
    uint256 voting_cut,
    uint256 threshold
  )
{
  generator = Proposals[_proposal_index].generator;
  descript = Proposals[_proposal_index].descript;
  start_timestamp = Proposals[_proposal_index].start_timestamp;
  end_timestamp = Proposals[_proposal_index].end_timestamp;
  executed = Proposals[_proposal_index].executed;
  voting_count = Proposals[_proposal_index].voting_count;
  total_weight = Proposals[_proposal_index].total_weight;
  voting_cut = Proposals[_proposal_index].voting_cut;
  threshold = Proposals[_proposal_index].threshold;
}

getProposalVoterList keyboard_arrow_up

Parameters help

Name Type
_proposal_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function getProposalVoterList(uint256 _proposal_index)
  public
  constant
  returns (address[])
{
  return Proposals[_proposal_index].voter_address;
}

newVote keyboard_arrow_up

Parameters help

Name Type
who
address help
descript
string help
start_timestamp
uint256 help
end_timestamp
uint256 help
voting_cut
uint256 help
threshold
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function newVote(
  address who,
  string descript,
  uint256 start_timestamp,
  uint256 end_timestamp,
  uint256 voting_cut,
  uint256 threshold
) public onlyOwner returns (uint256) {
  if (Proposals.length >= 1) {
    require(Proposals[vote_id].end_timestamp < start_timestamp);
    require(Proposals[vote_id].executed == true);
  }

  vote_id = Proposals.length;
  Proposal storage p = Proposals[Proposals.length++];
  p.generator = who;
  p.descript = descript;
  p.start_timestamp = start_timestamp;
  p.end_timestamp = end_timestamp;
  p.executed = false;
  p.voting_cut = voting_cut;
  p.threshold = threshold;

  p.voting_count = 0;
  delete p.voter_address;
  ProposalAdd(vote_id, who, descript);
  return vote_id;
}

voteClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function voteClose() public onlyOwner {
  if (Proposals.length >= 1) {
    Proposals[vote_id].executed = true;
    ProposalEnd(vote_id, Proposals[vote_id].descript);
  }
}

checkVote keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function checkVote() public onlyOwner {
  if ((Proposals.length >= 1) && (Proposals[vote_id].end_timestamp < now)) {
    voteClose();
  }
}

Parameters help

This function has no parameters.

Properties

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

changeTokenName keyboard_arrow_up

Parameters help

Name Type
newName
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeTokenName(string newName) public onlyOwner {
  name = newName;
  ChangeTokenName(msg.sender);
}

changeTokenSymbol keyboard_arrow_up

Parameters help

Name Type
newSymbol
string help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeTokenSymbol(string newSymbol) public onlyOwner {
  symbol = newSymbol;
  ChangeTokenSymbol(msg.sender);
}

changeConversionRate keyboard_arrow_up

Parameters help

Name Type
_conversion_rate
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeConversionRate(uint256 _conversion_rate) public onlyOwner {
  require(_conversion_rate > 0);
  uint256 pre_conversion_rate = conversion_rate;
  conversion_rate = _conversion_rate;
  ChangeConversionRate(pre_conversion_rate, conversion_rate);
}

checkFreeze keyboard_arrow_up

Parameters help

Name Type
_sender
address help

Properties

Visibility help public
Mutability help constant
Source Code
function checkFreeze(address _sender) public constant returns (bool) {
  if (now >= freezeDateOf[_sender]) {
    return false;
  } else {
    return true;
  }
}

getSaleLength keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getSaleLength() public constant returns (uint256) {
  return sale_list.length;
}

getSaleInfo keyboard_arrow_up

Parameters help

Name Type
_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function getSaleInfo(uint256 _index)
  public
  constant
  returns (
    uint256 sale_number,
    uint256 start_timestamp,
    uint256 end_timestamp,
    uint8 bonus_rate,
    uint256 sell_limit
  )
{
  sale_number = sale_list[_index].sale_number;
  start_timestamp = sale_list[_index].start_timestamp;
  end_timestamp = sale_list[_index].end_timestamp;
  bonus_rate = sale_list[_index].bonus_rate;
  sell_limit = sale_list[_index].sell_limit;
}

getSaleSold keyboard_arrow_up

Parameters help

Name Type
_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
function getSaleSold(uint256 _index) public constant returns (uint256) {
  return sale_sold[_index];
}

newSale keyboard_arrow_up

Parameters help

Name Type
start_timestamp
uint256 help
end_timestamp
uint256 help
bonus_rate
uint8 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function newSale(
  uint256 start_timestamp,
  uint256 end_timestamp,
  uint8 bonus_rate,
  uint256 sell_token_limit
) public onlyOwner {
  require(start_timestamp > 0);
  require(end_timestamp > 0);
  require(sell_token_limit > 0);

  uint256 sale_number = sale_list.length;
  for (uint256 i = 0; i < sale_list.length; i++) {
    require(sale_list[i].end_timestamp < start_timestamp);
  }

  sale_list[sale_list.length++] = Sale({
    sale_number: sale_number,
    start_timestamp: start_timestamp,
    end_timestamp: end_timestamp,
    bonus_rate: bonus_rate,
    sell_limit: sell_token_limit
  });
  sale_sold[sale_sold.length++] = 0;
}

changeSaleInfo keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
start_timestamp
uint256 help
end_timestamp
uint256 help
bonus_rate
uint8 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeSaleInfo(
  uint256 _index,
  uint256 start_timestamp,
  uint256 end_timestamp,
  uint8 bonus_rate,
  uint256 sell_token_limit
) public onlyOwner returns (bool) {
  require(_index < sale_list.length);
  require(start_timestamp > 0);
  require(end_timestamp > 0);
  require(sell_token_limit > 0);

  sale_list[_index].start_timestamp = start_timestamp;
  sale_list[_index].end_timestamp = end_timestamp;
  sale_list[_index].bonus_rate = bonus_rate;
  sale_list[_index].sell_limit = sell_token_limit;
  return true;
}

changeSaleStart keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
start_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeSaleStart(uint256 _index, uint256 start_timestamp)
  public
  onlyOwner
  returns (bool)
{
  require(_index < sale_list.length);
  require(start_timestamp > 0);
  sale_list[_index].start_timestamp = start_timestamp;
  return true;
}

changeSaleEnd keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
end_timestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeSaleEnd(uint256 _index, uint256 end_timestamp)
  public
  onlyOwner
  returns (bool)
{
  require(_index < sale_list.length);
  require(end_timestamp > 0);
  sale_list[_index].end_timestamp = end_timestamp;
  return true;
}

changeSaleBonusRate keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
bonus_rate
uint8 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeSaleBonusRate(uint256 _index, uint8 bonus_rate)
  public
  onlyOwner
  returns (bool)
{
  require(_index < sale_list.length);
  sale_list[_index].bonus_rate = bonus_rate;
  return true;
}

changeSaleTokenLimit keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
sell_token_limit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeSaleTokenLimit(uint256 _index, uint256 sell_token_limit)
  public
  onlyOwner
  returns (bool)
{
  require(_index < sale_list.length);
  require(sell_token_limit > 0);
  sale_list[_index].sell_limit = sell_token_limit;
  return true;
}

canSaleInfo keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view

Requirements help

Source Code
function canSaleInfo()
  public
  view
  returns (
    uint256 sale_number,
    uint256 start_timestamp,
    uint256 end_timestamp,
    uint8 bonus_rate,
    uint256 sell_limit
  )
{
  var (sale_info, isSale) = nowSaleInfo();
  require(isSale == true);
  sale_number = sale_info.sale_number;
  start_timestamp = sale_info.start_timestamp;
  end_timestamp = sale_info.end_timestamp;
  bonus_rate = sale_info.bonus_rate;
  sell_limit = sale_info.sell_limit;
}

mintTokenBulk keyboard_arrow_up

Parameters help

Name Type
_tos
address[] help
_amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintTokenBulk(address[] _tos, uint256[] _amounts) public onlyOwner {
  require(_tos.length == _amounts.length);
  for (uint256 i = 0; i < _tos.length; i++) {
    mintToken(_tos[i], _amounts[i], 0);
  }
}

superMintBulk keyboard_arrow_up

Parameters help

Name Type
_tos
address[] help
_amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function superMintBulk(address[] _tos, uint256[] _amounts) public onlyOwner {
  require(_tos.length == _amounts.length);
  for (uint256 i = 0; i < _tos.length; i++) {
    superMint(_tos[i], _amounts[i], 0);
  }
}

transferBulk keyboard_arrow_up

Parameters help

Name Type
tos
address[] help
values
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferBulk(address[] tos, uint256[] values) public {
  require(tos.length == values.length);
  for (uint256 i = 0; i < tos.length; i++) {
    transfer(tos[i], values[i]);
  }
}

burn keyboard_arrow_up

Parameters help

Name Type
_who
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(address _who, uint256 _amount) public onlyOwner returns (bool) {
  require(_amount > 0);
  require(balanceOf(_who) >= _amount);
  balance_of[_who] -= _amount;
  total_supply -= _amount;
  Burn(_who, _amount);
  return true;
}

additionalTotalSupply keyboard_arrow_up

Parameters help

Name Type
_addition
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function additionalTotalSupply(uint256 _addition)
  public
  onlyOwner
  returns (bool)
{
  require(_addition > 0);
  uint256 change_total_supply = total_supply.add(_addition);
  balance_of[token_wallet_address] += _addition;
  changeTotalSupply(change_total_supply);
}

tokenWalletChange keyboard_arrow_up

Parameters help

Name Type
newTokenWallet
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function tokenWalletChange(address newTokenWallet)
  public
  onlyOwner
  returns (bool)
{
  require(newTokenWallet != address(0));
  uint256 token_wallet_amount = balance_of[token_wallet_address];
  balance_of[newTokenWallet] = token_wallet_amount;
  balance_of[token_wallet_address] = 0;
  changeTokenWallet(newTokenWallet);
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() public payable {
  uint256 eth_amount = msg.value;
  msg.sender.transfer(eth_amount);
  Payable(msg.sender, eth_amount);
}

tokenOpen keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function tokenOpen() public onlyOwner {
  open_free = true;
}

tokenClose keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function tokenClose() public onlyOwner {
  open_free = false;
}

freezeAddress keyboard_arrow_up

Parameters help

Name Type
_who
address help
_addTimestamp
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeAddress(address _who, uint256 _addTimestamp)
  public
  onlyOwner
  returns (bool)
{
  freezeTo(_who, _addTimestamp);
  return true;
}

meltAddress keyboard_arrow_up

Parameters help

Name Type
_who
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function meltAddress(address _who) public onlyOwner returns (bool) {
  meltNow(_who);
  return true;
}

voteAgree keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function voteAgree() public returns (bool) {
  address _voter = msg.sender;
  uint256 _balance = balanceOf(_voter);
  require(_balance > 0);
  return voting(_voter, _balance);
}

superVoteAgree keyboard_arrow_up

Parameters help

Name Type
who
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function superVoteAgree(address who) public onlyOwner returns (bool) {
  require(who != address(0));
  uint256 _balance = balanceOf(who);
  require(_balance > 0);
  return voting(who, _balance);
}

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 Token._transfer keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint256 help

Properties

Visibility help private
Mutability help transaction

Requirements help

Source Code
function _transfer(
  address _from,
  address _to,
  uint256 _amount
) private {
  require(_from != address(0));
  require(_to != address(0));
  require(balance_of[_from] >= _amount);
  require(balance_of[_to].add(_amount) >= balance_of[_to]);
  require(transfer_close == false);
  require(checkFreeze(_from) == false);

  uint256 prevBalance = balance_of[_from] + balance_of[_to];
  balance_of[_from] -= _amount;
  balance_of[_to] += _amount;
  assert(balance_of[_from] + balance_of[_to] == prevBalance);
  addAddress(_to);
  Transfer(_from, _to, _amount);
}

internal PreSale.addBonus keyboard_arrow_up

Parameters help

Name Type
_amount
uint256 help
_bonus
uint8 help

Properties

Visibility help internal
Mutability help pure
Source Code
function addBonus(uint256 _amount, uint8 _bonus)
  internal
  pure
  returns (uint256)
{
  return _amount.add((_amount.mul(_bonus)).div(100));
}

internal PreSale.checkSaleCanSell keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
_amount
uint256 help

Properties

Visibility help internal
Mutability help view
Source Code
function checkSaleCanSell(uint256 _index, uint256 _amount)
  internal
  view
  returns (bool)
{
  uint256 index_sold = sale_sold[_index];
  uint256 index_end_timestamp = sale_list[_index].end_timestamp;
  uint256 sell_limit = sale_list[_index].sell_limit;
  uint8 bonus_rate = sale_list[_index].bonus_rate;
  uint256 sell_limit_plus_bonus = addBonus(sell_limit, bonus_rate);

  if (now >= index_end_timestamp) {
    return false;
  } else if (index_sold.add(_amount) > sell_limit_plus_bonus) {
    return false;
  } else {
    return true;
  }
}

internal PreSale.addSaleSold keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function addSaleSold(uint256 _index, uint256 amount) internal {
  require(amount > 0);
  require(_index < sale_sold.length);
  require(checkSaleCanSell(_index, amount) == true);
  sale_sold[_index] += amount;
}

internal PreSale.subSaleSold keyboard_arrow_up

Parameters help

Name Type
_index
uint256 help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function subSaleSold(uint256 _index, uint256 amount) internal {
  require(amount > 0);
  require(_index < sale_sold.length);
  require(sale_sold[_index].sub(amount) >= 0);
  sale_sold[_index] -= amount;
}

internal PreSale.nowSaleInfo keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help view
Source Code
function nowSaleInfo() internal view returns (Sale sale_info, bool isSale) {
  isSale = false;
  for (uint256 i = 0; i < sale_list.length; i++) {
    uint256 end_timestamp = sale_list[i].end_timestamp;
    uint256 sell_limit = sale_list[i].sell_limit;
    uint8 bonus_rate = sale_list[i].bonus_rate;
    uint256 sell_limit_plus_bonus = addBonus(sell_limit, bonus_rate);
    uint256 temp_sold_token = sale_sold[i];
    if ((now <= end_timestamp) && (temp_sold_token < sell_limit_plus_bonus)) {
      sale_info = Sale({
        sale_number: sale_list[i].sale_number,
        start_timestamp: sale_list[i].start_timestamp,
        end_timestamp: sale_list[i].end_timestamp,
        bonus_rate: sale_list[i].bonus_rate,
        sell_limit: sale_list[i].sell_limit
      });
      isSale = true;
      break;
    } else {
      isSale = false;
      continue;
    }
  }
}

internal FreezeToken.freezeTo keyboard_arrow_up

Parameters help

Name Type
_who
address help
_date
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function freezeTo(address _who, uint256 _date) internal {
  freezeDateOf[_who] = _date;
  Freeze(_who, _date);
}

internal FreezeToken.meltNow keyboard_arrow_up

Parameters help

Name Type
_who
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function meltNow(address _who) internal onlyOwner {
  freezeDateOf[_who] = now;
  Melt(_who);
}

internal TokenInfo.changeTokenWallet keyboard_arrow_up

Parameters help

Name Type
newTokenWallet
address help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function changeTokenWallet(address newTokenWallet) internal onlyOwner {
  require(newTokenWallet != address(0));
  address pre_address = token_wallet_address;
  token_wallet_address = newTokenWallet;
  ChangeTokenWalletAddress(pre_address, token_wallet_address);
}

internal TokenInfo.changeTotalSupply keyboard_arrow_up

Parameters help

Name Type
_total_supply
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function changeTotalSupply(uint256 _total_supply) internal onlyOwner {
  require(_total_supply > 0);
  uint256 pre_total_supply = total_supply;
  total_supply = _total_supply;
  ChangeTotalSupply(pre_total_supply, total_supply);
}

internal Vote.voting keyboard_arrow_up

Parameters help

Name Type
_voter
address help
_weight
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function voting(address _voter, uint256 _weight) internal returns (bool) {
  if (Proposals[vote_id].end_timestamp < now) {
    Proposals[vote_id].executed = true;
  }

  require(Proposals[vote_id].executed == false);
  require(Proposals[vote_id].end_timestamp > now);
  require(Proposals[vote_id].start_timestamp <= now);
  require(Proposals[vote_id].votedOf[_voter] == false);
  require(Proposals[vote_id].voting_cut <= _weight);

  Proposals[vote_id].votedOf[_voter] = true;
  Proposals[vote_id].voting_count += 1;
  Proposals[vote_id].voteWeightOf[_voter] = _weight;
  Proposals[vote_id].total_weight += _weight;
  Proposals[vote_id].voter_address[
    Proposals[vote_id].voter_address.length++
  ] = _voter;

  if (Proposals[vote_id].total_weight >= Proposals[vote_id].threshold) {
    Proposals[vote_id].executed = true;
  }
  return true;
}

internal BasicToken.addAddress keyboard_arrow_up

Parameters help

Name Type
_target
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function addAddress(address _target) internal returns (bool) {
  if (_target == address(0)) {
    return false;
  } else if (address_exist[_target] == true) {
    return false;
  } else {
    address_exist[_target] = true;
    address_list[address_list.length++] = _target;
  }
}