Blockwell

Insights Network

ERC20

This contract is an ERC20 token.

Name Insights Network
Symbol INSTAR
Decimals 18
Total Supply 229,374,136 INSTAR

About

Stats

Public Functions 23
Event Types 8
Code Size 21,580 bytes

Events (8) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Import Event

Parameters help
account
address help
amount
uint256 help
unlockTime
uint256 help

Mint Event

Parameters help
to
address help
amount
uint256 help

MintFinished Event

Parameters 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

Unpause Event

Parameters help

ATTOTOKEN_FACTOR Constant

uint256 help
UNKNOWN VALUE

MAX_LENGTH Constant

uint help
1024

MAX_PURCHASES Constant

uint help
64

predecessor Variable

address help

successor Variable

address help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

paused Variable

bool help

owner Variable

address help

cap Variable

uint256 help

mintingFinished Variable

bool help

imported Variable

mapping(address => bool) help

lockedBalances Variable

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

unlockTimes Variable

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

allowed Variable

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

balances Variable

mapping(address => uint256) help
Internal Variable

totalSupply_ Variable

uint256 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 != address(0));
  OwnershipTransferred(owner, newOwner);
  owner = newOwner;
}

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 balance) {
  return balances[_owner];
}

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 returns (bool) {
  require(value <= balances[msg.sender] - lockedBalanceOf(msg.sender));
  return super.transfer(to, value);
}

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
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 returns (bool) {
  require(value <= balances[from] - lockedBalanceOf(from));
  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
  whenNotPaused
  returns (bool)
{
  return super.approve(_spender, _value);
}

increaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_addedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.increaseApproval(_spender, _addedValue);
}

decreaseApproval keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_subtractedValue
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  whenNotPaused
  returns (bool success)
{
  return super.decreaseApproval(_spender, _subtractedValue);
}

mint keyboard_arrow_up

Parameters help

Name Type
_to
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mint(address _to, uint256 _amount)
  public
  onlyOwner
  canMint
  returns (bool)
{
  require(totalSupply_.add(_amount) <= cap);

  return super.mint(_to, _amount);
}

finishMinting keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finishMinting() public onlyOwner canMint returns (bool) {
  mintingFinished = true;
  MintFinished();
  return true;
}

pause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

unpause keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

activate keyboard_arrow_up

Parameters help

Name Type
_predecessor
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function activate(address _predecessor) public onlyOwner {
  require(predecessor == 0);
  require(_predecessor != 0);
  require(predecessorDeactivated(_predecessor));
  predecessor = _predecessor;
  unpause();
  mintingFinished = false;
}

lockedBalanceOf keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
function lockedBalanceOf(address account)
  public
  view
  returns (uint256 balance)
{
  uint256 amount;
  for (uint256 index = 0; index < lockedBalances[account].length; index++)
    if (unlockTimes[account][index] > now)
      amount += lockedBalances[account][index];
  return amount;
}

mintBatch keyboard_arrow_up

Parameters help

Name Type
accounts
address[] help
amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintBatch(address[] accounts, uint256[] amounts)
  public
  onlyOwner
  canMint
  returns (bool)
{
  require(accounts.length == amounts.length);
  require(accounts.length <= MAX_LENGTH);
  for (uint256 index = 0; index < accounts.length; index++)
    require(mint(accounts[index], amounts[index]));
  return true;
}

mintUnlockTime keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help
unlockTime
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintUnlockTime(
  address account,
  uint256 amount,
  uint256 unlockTime
) public onlyOwner canMint returns (bool) {
  require(unlockTime > now);
  require(lockedBalances[account].length < MAX_PURCHASES);
  lockedBalances[account].push(amount);
  unlockTimes[account].push(unlockTime);
  return super.mint(account, amount);
}

mintUnlockTimeBatch keyboard_arrow_up

Parameters help

Name Type
accounts
address[] help
amounts
uint256[] help
unlockTime
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintUnlockTimeBatch(
  address[] accounts,
  uint256[] amounts,
  uint256 unlockTime
) public onlyOwner canMint returns (bool) {
  require(accounts.length == amounts.length);
  require(accounts.length <= MAX_LENGTH);
  for (uint256 index = 0; index < accounts.length; index++)
    require(mintUnlockTime(accounts[index], amounts[index], unlockTime));
  return true;
}

mintLockPeriod keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help
lockPeriod
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintLockPeriod(
  address account,
  uint256 amount,
  uint256 lockPeriod
) public onlyOwner canMint returns (bool) {
  return mintUnlockTime(account, amount, now + lockPeriod);
}

mintLockPeriodBatch keyboard_arrow_up

Parameters help

Name Type
accounts
address[] help
amounts
uint256[] help
lockPeriod
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintLockPeriodBatch(
  address[] accounts,
  uint256[] amounts,
  uint256 lockPeriod
) public onlyOwner canMint returns (bool) {
  return mintUnlockTimeBatch(accounts, amounts, now + lockPeriod);
}

importBalance keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function importBalance(address account)
  public
  onlyOwner
  canMint
  returns (bool)
{
  require(!imported[account]);
  InsightsNetwork2Base source = InsightsNetwork2Base(predecessor);
  uint256 amount = source.balanceOf(account);
  require(amount > 0);
  imported[account] = true;
  uint256 mintAmount = amount - source.lockedBalanceOf(account);
  Import(account, mintAmount, now);
  assert(mint(account, mintAmount));
  amount -= mintAmount;
  for (uint256 index = 0; amount > 0; index++) {
    uint256 unlockTime = source.unlockTimes(account, index);
    if (unlockTime > now) {
      mintAmount = source.lockedBalances(account, index);
      Import(account, mintAmount, unlockTime);
      assert(mintUnlockTime(account, mintAmount, unlockTime));
      amount -= mintAmount;
    }
  }
  return true;
}

importBalanceBatch keyboard_arrow_up

Parameters help

Name Type
accounts
address[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function importBalanceBatch(address[] accounts)
  public
  onlyOwner
  canMint
  returns (bool)
{
  require(accounts.length <= MAX_LENGTH);
  for (uint256 index = 0; index < accounts.length; index++)
    require(importBalance(accounts[index]));
  return true;
}

selfDestruct keyboard_arrow_up

Parameters help

Name Type
_successor
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function selfDestruct(address _successor) public onlyOwner whenPaused {
  require(mintingFinished);
  successor = _successor;
  selfdestruct(owner);
}

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 InsightsNetwork3.predecessorDeactivated keyboard_arrow_up

Parameters help

Name Type
_predecessor
address help

Properties

Visibility help internal
Mutability help view
Source Code
function predecessorDeactivated(address _predecessor)
  internal
  view
  onlyOwner
  returns (bool)
{
  return
    InsightsNetwork2Base(_predecessor).paused() &&
    InsightsNetwork2Base(_predecessor).mintingFinished();
}

internal InsightsNetwork2Base.predecessorDeactivated keyboard_arrow_up

Parameters help

Name Type
_predecessor
address help

Properties

Visibility help internal
Mutability help view
Source Code
function predecessorDeactivated(address _predecessor)
  internal
  view
  onlyOwner
  returns (bool);