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
State Variables (15) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
value
must be less than or equal to
balances for the sender's address - the result of calling lockedBalanceOf with the sender's address
Source Code
function transfer(address to, uint256 value) public returns (bool) {
require(value <= balances[msg.sender] - lockedBalanceOf(msg.sender));
return super.transfer(to, value);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
Requirements help
value
must be less than or equal to
balances for from - the result of calling lockedBalanceOf with from
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);
}
approve keyboard_arrow_up
Source Code
function approve(address _spender, uint256 _value)
public
whenNotPaused
returns (bool)
{
return super.approve(_spender, _value);
}
increaseApproval keyboard_arrow_up
Source Code
function increaseApproval(address _spender, uint256 _addedValue)
public
whenNotPaused
returns (bool success)
{
return super.increaseApproval(_spender, _addedValue);
}
decreaseApproval keyboard_arrow_up
Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
public
whenNotPaused
returns (bool success)
{
return super.decreaseApproval(_spender, _subtractedValue);
}
mint keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
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
pause keyboard_arrow_up
unpause keyboard_arrow_up
activate keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Requirements help
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
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Requirements help
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Requirements help
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Requirements help
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
mintLockPeriodBatch keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Requirements help
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
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
Modifiers help
onlyOwner checks for the following:
canMint checks for the following:
Requirements help
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
Modifiers help
onlyOwner checks for the following:
whenPaused checks for the following:
paused must be true
Requirements help
mintingFinished must be true
Source Code
function selfDestruct(address _successor) public onlyOwner whenPaused {
require(mintingFinished);
successor = _successor;
selfdestruct(owner);
}
Internal Functions
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
Modifiers help
onlyOwner checks for the following:
Source Code
function predecessorDeactivated(address _predecessor)
internal
view
onlyOwner
returns (bool)
{
return
InsightsNetwork2Base(_predecessor).paused() &&
InsightsNetwork2Base(_predecessor).mintingFinished();
}
internal InsightsNetwork2Base.predecessorDeactivated keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function predecessorDeactivated(address _predecessor)
internal
view
onlyOwner
returns (bool);