Blockwell

LikeCoin

ERC20

This contract is an ERC20 token.

Name LikeCoin
Symbol LIKE
Decimals 18
Total Supply 250,074,238 LIKE

About

Stats

Public Functions 26
Event Types 5
Code Size 15,491 bytes

Library Use

Uses SafeMath for uint256.

Events (5) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Lock Event

Parameters help
_addr
address help
_value
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

SignatureCheckerChanged Event

Parameters help
_newSignatureChecker
address help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

name Constant

string help
LikeCoin

symbol Constant

string help
LIKE

decimals Constant

uint8 help
18

supply Variable

uint256 help

crowdsaleAddr Variable

address help

contributorPoolAddr Variable

address help

contributorPoolMintQuota Variable

uint256 help

creatorsPoolMintQuota Variable

uint256 help

unlockTime Variable

uint help

signatureChecker Variable

address help

signatureCheckerFreezed Variable

bool help

signatureOwner Variable

address help

allowDelegate Variable

bool help

operator Variable

address help

pendingOwner Variable

address help

owner Variable

address help

balances Variable

mapping(address => uint256) help

lockedBalances Variable

mapping(address => uint256) help

transferAndCallWhitelist Variable

mapping(address => bool) help

allowed Variable

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

creatorsPoolAddrs Variable

address[] help
Internal Variable

isCreatorsPool Variable

mapping(address => bool) help
Internal Variable

usedNonce Variable

mapping(address => mapping(uint256 => bool)) 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
Source Code
function transferOwnership(address newOwner) public onlyOwner {
  pendingOwner = newOwner;
}

claimOwnership keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function claimOwnership() public onlyPendingOwner {
  OwnershipTransferred(owner, pendingOwner);
  owner = pendingOwner;
  pendingOwner = address(0);
}

setOperator keyboard_arrow_up

Parameters help

Name Type
_operator
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setOperator(address _operator) public onlyOwner {
  operator = _operator;
}

Parameters help

This function has no parameters.

Properties

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

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) public constant returns (uint256 balance) {
  return balances[_owner] + lockedBalances[_owner];
}

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 returns (bool success) {
  return _transfer(msg.sender, _to, _value);
}

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

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

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 returns (bool success) {
  allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
  _transfer(_from, _to, _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 success)
{
  require(_value == 0 || allowed[msg.sender][_spender] == 0);
  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

transferAndLock keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferAndLock(address _to, uint256 _value)
  public
  returns (bool success)
{
  require(msg.sender != 0x0);
  require(_to != 0x0);
  require(now < unlockTime);
  require(
    msg.sender == crowdsaleAddr || msg.sender == owner || msg.sender == operator
  );
  balances[msg.sender] = balances[msg.sender].sub(_value);
  lockedBalances[_to] = lockedBalances[_to].add(_value);
  Transfer(msg.sender, _to, _value);
  Lock(_to, _value);
  return true;
}

transferMultiple keyboard_arrow_up

Parameters help

Name Type
_addrs
address[] help
_values
uint256[] help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferMultiple(address[] _addrs, uint256[] _values)
  public
  returns (bool success)
{
  return _transferMultiple(msg.sender, _addrs, _values);
}

transferAndCall keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
null
Source Code
function transferAndCall(
  address _to,
  uint256 _value,
  bytes _data
) public returns (bool success) {
  return _transferAndCall(msg.sender, _to, _value, _data);
}

setSignatureChecker keyboard_arrow_up

Parameters help

Name Type
_sigCheckerAddr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setSignatureChecker(address _sigCheckerAddr) public {
  require(msg.sender == signatureOwner);
  require(!signatureCheckerFreezed);
  require(signatureChecker != _sigCheckerAddr);
  signatureChecker = SignatureChecker(_sigCheckerAddr);
  SignatureCheckerChanged(_sigCheckerAddr);
}

freezeSignatureChecker keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function freezeSignatureChecker() public {
  require(msg.sender == signatureOwner);
  require(!signatureCheckerFreezed);
  signatureCheckerFreezed = true;
}

transferDelegated keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help
_maxReward
uint256 help
_claimedReward
uint256 help
_nonce
uint256 help
_signature
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function transferDelegated(
  address _from,
  address _to,
  uint256 _value,
  uint256 _maxReward,
  uint256 _claimedReward,
  uint256 _nonce,
  bytes _signature
)
  public
  isDelegated(_from, _maxReward, _claimedReward, _nonce)
  returns (bool success)
{
  require(
    signatureChecker.checkTransferDelegated(
      _from,
      _to,
      _value,
      _maxReward,
      _nonce,
      _signature
    )
  );
  return _transfer(_from, _to, _value);
}

transferAndCallDelegated keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help
_data
bytes help
_maxReward
uint256 help
_claimedReward
uint256 help
_nonce
uint256 help
_signature
bytes help

Properties

Visibility help public
Mutability help transaction

Requirements help

null
null
Source Code
function transferAndCallDelegated(
  address _from,
  address _to,
  uint256 _value,
  bytes _data,
  uint256 _maxReward,
  uint256 _claimedReward,
  uint256 _nonce,
  bytes _signature
)
  public
  isDelegated(_from, _maxReward, _claimedReward, _nonce)
  returns (bool success)
{
  require(
    signatureChecker.checkTransferAndCallDelegated(
      _from,
      _to,
      _value,
      _data,
      _maxReward,
      _nonce,
      _signature
    )
  );
  return _transferAndCall(_from, _to, _value, _data);
}

transferMultipleDelegated keyboard_arrow_up

Parameters help

Name Type
_from
address help
_addrs
address[] help
_values
uint256[] help
_maxReward
uint256 help
_claimedReward
uint256 help
_nonce
uint256 help
_signature
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferMultipleDelegated(
  address _from,
  address[] _addrs,
  uint256[] _values,
  uint256 _maxReward,
  uint256 _claimedReward,
  uint256 _nonce,
  bytes _signature
)
  public
  isDelegated(_from, _maxReward, _claimedReward, _nonce)
  returns (bool success)
{
  require(
    signatureChecker.checkTransferMultipleDelegated(
      _from,
      _addrs,
      _values,
      _maxReward,
      _nonce,
      _signature
    )
  );
  return _transferMultiple(_from, _addrs, _values);
}

switchDelegate keyboard_arrow_up

Parameters help

Name Type
_allowed
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
function switchDelegate(bool _allowed) public ownerOrOperator {
  require(allowDelegate != _allowed);
  allowDelegate = _allowed;
}

addTransferAndCallWhitelist keyboard_arrow_up

Parameters help

Name Type
_contract
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function addTransferAndCallWhitelist(address _contract) public ownerOrOperator {
  require(_isContract(_contract));
  require(!transferAndCallWhitelist[_contract]);
  transferAndCallWhitelist[_contract] = true;
}

removeTransferAndCallWhitelist keyboard_arrow_up

Parameters help

Name Type
_contract
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function removeTransferAndCallWhitelist(address _contract)
  public
  ownerOrOperator
{
  require(transferAndCallWhitelist[_contract]);
  delete transferAndCallWhitelist[_contract];
}

burn keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _value) public {
  balances[msg.sender] = balances[msg.sender].sub(_value);
  supply = supply.sub(_value);
  Transfer(msg.sender, 0x0, _value);
}

registerCrowdsales keyboard_arrow_up

Parameters help

Name Type
_crowdsaleAddr
address help
_value
uint256 help
_privateFundUnlockTime
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function registerCrowdsales(
  address _crowdsaleAddr,
  uint256 _value,
  uint256 _privateFundUnlockTime
) public onlyOwner {
  require(crowdsaleAddr == 0x0);
  require(_crowdsaleAddr != 0x0);
  require(_isContract(_crowdsaleAddr));
  require(_privateFundUnlockTime > now);
  require(_value != 0);
  unlockTime = _privateFundUnlockTime;
  crowdsaleAddr = _crowdsaleAddr;
  supply = supply.add(_value);
  balances[_crowdsaleAddr] = balances[_crowdsaleAddr].add(_value);
  Transfer(0x0, crowdsaleAddr, _value);
}

registerContributorPool keyboard_arrow_up

Parameters help

Name Type
_contributorPoolAddr
address help
_mintLimit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function registerContributorPool(
  address _contributorPoolAddr,
  uint256 _mintLimit
) public onlyOwner {
  require(contributorPoolAddr == 0x0);
  require(_contributorPoolAddr != 0x0);
  require(_isContract(_contributorPoolAddr));
  require(_mintLimit != 0);
  contributorPoolAddr = _contributorPoolAddr;
  contributorPoolMintQuota = _mintLimit;
}

mintForContributorPool keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function mintForContributorPool(uint256 _value) public {
  require(msg.sender == contributorPoolAddr);
  require(_value != 0);
  contributorPoolMintQuota = contributorPoolMintQuota.sub(_value);
  supply = supply.add(_value);
  balances[msg.sender] = balances[msg.sender].add(_value);
  Transfer(0x0, msg.sender, _value);
}

registerCreatorsPools keyboard_arrow_up

Parameters help

Name Type
_poolAddrs
address[] help
_mintLimit
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function registerCreatorsPools(address[] _poolAddrs, uint256 _mintLimit)
  public
  onlyOwner
{
  require(creatorsPoolAddrs.length == 0);
  require(_poolAddrs.length > 0);
  require(_mintLimit > 0);
  for (uint256 i = 0; i < _poolAddrs.length; ++i) {
    require(_isContract(_poolAddrs[i]));
    creatorsPoolAddrs.push(_poolAddrs[i]);
    isCreatorsPool[_poolAddrs[i]] = true;
  }
  creatorsPoolMintQuota = _mintLimit;
}

mintForCreatorsPool keyboard_arrow_up

Parameters help

Name Type
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintForCreatorsPool(uint256 _value) public {
  require(isCreatorsPool[msg.sender]);
  require(_value != 0);
  creatorsPoolMintQuota = creatorsPoolMintQuota.sub(_value);
  supply = supply.add(_value);
  balances[msg.sender] = balances[msg.sender].add(_value);
  Transfer(0x0, msg.sender, _value);
}

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 LikeCoin._tryUnlockBalance keyboard_arrow_up

Parameters help

Name Type
_from
address help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _tryUnlockBalance(address _from) internal {
  if (unlockTime != 0 && now >= unlockTime && lockedBalances[_from] > 0) {
    balances[_from] = balances[_from].add(lockedBalances[_from]);
    delete lockedBalances[_from];
  }
}

internal LikeCoin._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 returns (bool success) {
  _tryUnlockBalance(_from);
  require(_from != 0x0);
  require(_to != 0x0);
  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  Transfer(_from, _to, _value);
  return true;
}

internal LikeCoin._transferMultiple keyboard_arrow_up

Parameters help

Name Type
_from
address help
_addrs
address[] help
_values
uint256[] help

Properties

Visibility help internal
Mutability help transaction
Source Code
function _transferMultiple(
  address _from,
  address[] _addrs,
  uint256[] _values
) internal returns (bool success) {
  require(_from != 0x0);
  require(_addrs.length > 0);
  require(_values.length == _addrs.length);
  _tryUnlockBalance(_from);
  uint256 total = 0;
  for (uint256 i = 0; i < _addrs.length; ++i) {
    address addr = _addrs[i];
    require(addr != 0x0);
    uint256 value = _values[i];
    balances[addr] = balances[addr].add(value);
    total = total.add(value);
    Transfer(_from, addr, value);
  }
  balances[_from] = balances[_from].sub(total);
  return true;
}

internal LikeCoin._isContract keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help internal
Mutability help constant
Source Code
function _isContract(address _addr) internal constant returns (bool) {
  uint256 length;
  assembly {
    length := extcodesize(_addr)
  }
  return (length > 0);
}

internal LikeCoin._transferAndCall keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help
_data
bytes help

Properties

Visibility help internal
Mutability help transaction

Requirements help

null
null
Source Code
function _transferAndCall(
  address _from,
  address _to,
  uint256 _value,
  bytes _data
) internal returns (bool success) {
  require(_isContract(_to));
  require(transferAndCallWhitelist[_to]);
  require(_transfer(_from, _to, _value));
  TransferAndCallReceiver(_to).tokenCallback(_from, _value, _data);
  return true;
}