Enjin Coin
ERC20
This contract is an ERC20 token.
Name
Enjin Coin
Symbol
ENJ
Decimals
18
Total Supply
1,000,000,000 ENJ
About link description
Enjin Coin (ENJ) is a cryptocurrency and operates on the Ethereum platform. Enjin Coin has a current supply of 1,000,000,000 with 834,331,121.3990188 in circulation. The last known price of Enjin Coin is 1.24757995 USD and is up 1.93 over the last 24 hours. It is currently trading on 165 active market(s) with $244,091,853.11 traded over the last 24 hours. More information can be found at https://enjin.io/.
Stats
Public Functions
18
Event Types
3
Code Size
18,285 bytes
Constants (7) keyboard_arrow_up
State Variables (20) keyboard_arrow_up
Functions
owner keyboard_arrow_up
transferOwnership keyboard_arrow_up
Modifiers help
ownerOnly checks for the following:
Source Code
function transferOwnership(address _newOwner) public ownerOnly {
require(_newOwner != owner);
newOwner = _newOwner;
}
acceptOwnership keyboard_arrow_up
withdrawTokens keyboard_arrow_up
Modifiers help
ownerOnly checks for the following:
validAddress checks for the following:
validAddress checks for the following:
notThis checks for the following:
Source Code
function withdrawTokens(
IERC20Token _token,
address _to,
uint256 _amount
) public ownerOnly validAddress(_token) validAddress(_to) notThis(_to) {
assert(_token.transfer(_to, _amount));
}
name keyboard_arrow_up
symbol keyboard_arrow_up
decimals keyboard_arrow_up
totalSupply keyboard_arrow_up
balanceOf keyboard_arrow_up
allowance keyboard_arrow_up
transfer keyboard_arrow_up
Source Code
function transfer(address _to, uint256 _value) public returns (bool success) {
if (
isTransferAllowed() == true ||
msg.sender == crowdFundAddress ||
msg.sender == incentivisationFundAddress
) {
assert(super.transfer(_to, _value));
return true;
}
revert();
}
transferFrom keyboard_arrow_up
Source Code
function transferFrom(
address _from,
address _to,
uint256 _value
) public returns (bool success) {
if (
isTransferAllowed() == true ||
msg.sender == crowdFundAddress ||
msg.sender == incentivisationFundAddress
) {
assert(super.transferFrom(_from, _to, _value));
return true;
}
revert();
}
approve keyboard_arrow_up
Requirements help
One or more of the following:
-
allowance 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
validAddress(_spender)
returns (bool success)
{
// if the allowance isn't 0, it can only be updated to 0 to prevent an allowance change immediately after withdrawal
require(_value == 0 || allowance[msg.sender][_spender] == 0);
allowance[msg.sender][_spender] = _value;
Approval(msg.sender, _spender, _value);
return true;
}
releaseEnjinTeamTokens keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
ownerOnly checks for the following:
Requirements help
Source Code
function releaseEnjinTeamTokens()
safeTimelock
ownerOnly
returns (bool success)
{
require(totalAllocatedToTeam < enjinTeamAllocation);
uint256 enjinTeamAlloc = enjinTeamAllocation / 1000;
uint256 currentTranche = uint256(now - endTime) / 12 weeks; // "months" after crowdsale end time (division floored)
if (
teamTranchesReleased < maxTeamTranches &&
currentTranche > teamTranchesReleased
) {
teamTranchesReleased++;
uint256 amount = safeMul(enjinTeamAlloc, 125);
balanceOf[enjinTeamAddress] = safeAdd(balanceOf[enjinTeamAddress], amount);
Transfer(0x0, enjinTeamAddress, amount);
totalAllocated = safeAdd(totalAllocated, amount);
totalAllocatedToTeam = safeAdd(totalAllocatedToTeam, amount);
return true;
}
revert();
}
releaseAdvisorTokens keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
advisorTimelock checks for the following:
ownerOnly checks for the following:
Requirements help
Source Code
function releaseAdvisorTokens()
advisorTimelock
ownerOnly
returns (bool success)
{
require(totalAllocatedToAdvisors == 0);
balanceOf[advisorAddress] = safeAdd(
balanceOf[advisorAddress],
advisorsAllocation
);
totalAllocated = safeAdd(totalAllocated, advisorsAllocation);
totalAllocatedToAdvisors = advisorsAllocation;
Transfer(0x0, advisorAddress, advisorsAllocation);
return true;
}
retrieveUnsoldTokens keyboard_arrow_up
Parameters help
This function has no parameters.
Modifiers help
ownerOnly checks for the following:
Source Code
function retrieveUnsoldTokens() safeTimelock ownerOnly returns (bool success) {
uint256 amountOfTokens = balanceOf[crowdFundAddress];
balanceOf[crowdFundAddress] = 0;
balanceOf[incentivisationFundAddress] = safeAdd(
balanceOf[incentivisationFundAddress],
amountOfTokens
);
totalAllocated = safeAdd(totalAllocated, amountOfTokens);
Transfer(crowdFundAddress, incentivisationFundAddress, amountOfTokens);
return true;
}
addToAllocation keyboard_arrow_up
Modifiers help
crowdfundOnly checks for the following:
Source Code
function addToAllocation(uint256 _amount) crowdfundOnly {
totalAllocated = safeAdd(totalAllocated, _amount);
}
allowTransfers keyboard_arrow_up
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 ENJToken.isTransferAllowed keyboard_arrow_up
internal Utils.safeAdd keyboard_arrow_up
Source Code
function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x + _y;
assert(z >= _x);
return z;
}
internal Utils.safeSub keyboard_arrow_up
internal Utils.safeMul keyboard_arrow_up
Requirements help
Source Code
function safeMul(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x * _y;
assert(_x == 0 || z / _x == _y);
return z;
}
internal Utils.safeAdd keyboard_arrow_up
Source Code
function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x + _y;
assert(z >= _x);
return z;
}
internal Utils.safeSub keyboard_arrow_up
internal Utils.safeMul keyboard_arrow_up
Requirements help
Source Code
function safeMul(uint256 _x, uint256 _y) internal returns (uint256) {
uint256 z = _x * _y;
assert(_x == 0 || z / _x == _y);
return z;
}