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
State Variables (20) keyboard_arrow_up
Functions
transferOwnership keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function transferOwnership(address newOwner) public onlyOwner {
pendingOwner = newOwner;
}
claimOwnership keyboard_arrow_up
setOperator keyboard_arrow_up
Modifiers help
onlyOwner checks for the following:
Source Code
function setOperator(address _operator) public onlyOwner {
operator = _operator;
}
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
transfer keyboard_arrow_up
Requirements help
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
return _transfer(msg.sender, _to, _value);
}
allowance keyboard_arrow_up
transferFrom keyboard_arrow_up
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;
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
-
allowed for the sender's address for _spender
must be equal to
0
- OR
_value
must be equal to
0
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
Requirements help
One or more of the following:
-
operator
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
- OR
crowdsaleAddr
must be equal to
the sender's address
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
Requirements help
Source Code
function transferMultiple(address[] _addrs, uint256[] _values)
public
returns (bool success)
{
return _transferMultiple(msg.sender, _addrs, _values);
}
transferAndCall keyboard_arrow_up
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
Requirements help
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
transferDelegated keyboard_arrow_up
Parameters help
Modifiers help
isDelegated checks for the following:
allowDelegate must be true
null
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
Modifiers help
isDelegated checks for the following:
allowDelegate must be true
null
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
Modifiers help
isDelegated checks for the following:
allowDelegate must be true
null
Requirements help
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
Modifiers help
ownerOrOperator checks for the following:
One or more of the following:
-
operator
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
Requirements help
Source Code
function switchDelegate(bool _allowed) public ownerOrOperator {
require(allowDelegate != _allowed);
allowDelegate = _allowed;
}
addTransferAndCallWhitelist keyboard_arrow_up
Modifiers help
ownerOrOperator checks for the following:
One or more of the following:
-
operator
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
Requirements help
null
Source Code
function addTransferAndCallWhitelist(address _contract) public ownerOrOperator {
require(_isContract(_contract));
require(!transferAndCallWhitelist[_contract]);
transferAndCallWhitelist[_contract] = true;
}
removeTransferAndCallWhitelist keyboard_arrow_up
Modifiers help
ownerOrOperator checks for the following:
One or more of the following:
-
operator
must be equal to
the sender's address
- OR
owner
must be equal to
the sender's address
Source Code
function removeTransferAndCallWhitelist(address _contract)
public
ownerOrOperator
{
require(transferAndCallWhitelist[_contract]);
delete transferAndCallWhitelist[_contract];
}
burn keyboard_arrow_up
registerCrowdsales keyboard_arrow_up
Parameters help
Modifiers help
onlyOwner checks for the following:
Requirements help
null
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
Modifiers help
onlyOwner checks for the following:
Requirements help
null
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
Requirements help
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
Modifiers help
onlyOwner checks for the following:
Requirements help
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
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
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
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
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
Requirements help
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
internal LikeCoin._transferAndCall keyboard_arrow_up
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;
}