Blockwell

ELF Token

ERC20

This contract is an ERC20 token.

Name ELF Token
Symbol ELF
Decimals 18
Total Supply 880,000,000 ELF

About link description

aelf (ELF) is a cryptocurrency and operates on the Ethereum platform. aelf has a current supply of 879,999,999.9864658 with 544,480,199.9864658 in circulation. The last known price of aelf is 0.18699281 USD and is down -3.23 over the last 24 hours. It is currently trading on 60 active market(s) with $15,522,666.93 traded over the last 24 hours. More information can be found at http://aelf.io/.

Stats

Public Functions 21
Event Types 13
Code Size 17,268 bytes

Library Use

Uses SafeMath for uint256.

Events (13) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

ApproveMintTokens Event

Parameters help
_owner
address help
_amount
uint256 help

BurnTokens Event

Parameters help
_owner
address help
_amount
uint256 help

DisableSetTransferable Event

Parameters help
_address
address help
_canSetTransferable
bool help

MintFinished Event

Parameters help
_caller
address help

MintTokens Event

Parameters help
_owner
address help
_amount
uint256 help

OwnershipTransferred Event

Parameters help
previousOwner
address help
newOwner
address help

SetAElfCommunityMultisig Event

Parameters help
_old
address help
_new
address help

SetAElfDevMultisig Event

Parameters help
_old
address help
_new
address help

SetDurationOfLock Event

Parameters help
_caller
address help

SetTransferable Event

Parameters help
_address
address help
_transferable
bool help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

WithdrawMintTokens Event

Parameters help
_owner
address help
_amount
uint256 help

TokensWithLock Struct

Members
value
uint256 help
blockNumber
uint256 help

TIMETHRESHOLD Constant

uint256 help
7200

MINTTIME Constant

uint256 help
216000

aelfDevMultisig Variable

address help

aelfCommunityMultisig Variable

address help

totalSupplyCap Variable

uint256 help

name Variable

string help

symbol Variable

string help

decimals Variable

uint8 help

mintingFinished Variable

bool help

deployBlockNumber Variable

uint256 help

durationOfLock Variable

uint256 help

transferable Variable

bool help

canSetTransferable Variable

bool help

totalSupply Variable

uint256 help

owner Variable

address help

balances Variable

mapping(address => uint256) help
Internal Variable

lockTokens Variable

mapping(address => TokensWithLock) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

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

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

Modifiers help

Source Code
function transfer(address _to, uint256 _value)
  public
  canTransfer
  returns (bool)
{
  require(_to != address(0));
  require(_value <= balances[msg.sender]);

  // SafeMath.sub will throw if there is not enough balance.
  balances[msg.sender] = balances[msg.sender].sub(_value);
  balances[_to] = balances[_to].add(_value);
  Transfer(msg.sender, _to, _value);
  return true;
}

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

Modifiers help

Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) public canTransfer returns (bool) {
  require(_to != address(0));
  require(_value <= balances[_from]);
  require(_value <= allowed[_from][msg.sender]);

  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  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

Modifiers help

Source Code
function approve(address _spender, uint256 _value)
  public
  canTransfer
  returns (bool)
{
  allowed[msg.sender][_spender] = _value;
  Approval(msg.sender, _spender, _value);
  return true;
}

Parameters help

Name Type
_spender
address help
_addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function increaseApproval(address _spender, uint256 _addedValue)
  public
  canTransfer
  returns (bool)
{
  allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(
    _addedValue
  );
  Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

Parameters help

Name Type
_spender
address help
_subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function decreaseApproval(address _spender, uint256 _subtractedValue)
  public
  canTransfer
  returns (bool)
{
  uint256 oldValue = allowed[msg.sender][_spender];
  if (_subtractedValue > oldValue) {
    allowed[msg.sender][_spender] = 0;
  } else {
    allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue);
  }
  Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
  return true;
}

Parameters help

Name Type
_transferable
bool help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setTransferable(bool _transferable) public only(aelfDevMultisig) {
  require(canSetTransferable == true);
  transferable = _transferable;
  SetTransferable(msg.sender, _transferable);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function disableSetTransferable() public only(aelfDevMultisig) {
  transferable = true;
  canSetTransferable = false;
  DisableSetTransferable(msg.sender, false);
}

Parameters help

Name Type
_aelfDevMultisig
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setAElfDevMultisig(address _aelfDevMultisig)
  public
  only(aelfDevMultisig)
  nonZeroAddress(_aelfDevMultisig)
{
  aelfDevMultisig = _aelfDevMultisig;
  SetAElfDevMultisig(msg.sender, _aelfDevMultisig);
}

Parameters help

Name Type
_aelfCommunityMultisig
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setAElfCommunityMultisig(address _aelfCommunityMultisig)
  public
  only(aelfCommunityMultisig)
  nonZeroAddress(_aelfCommunityMultisig)
{
  aelfCommunityMultisig = _aelfCommunityMultisig;
  SetAElfCommunityMultisig(msg.sender, _aelfCommunityMultisig);
}

Parameters help

Name Type
_durationOfLock
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function setDurationOfLock(uint256 _durationOfLock)
  public
  canMint
  only(aelfCommunityMultisig)
{
  require(_durationOfLock >= TIMETHRESHOLD);
  durationOfLock = _durationOfLock;
  SetDurationOfLock(msg.sender);
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help view

Modifiers help

Source Code
function getLockTokens(address _owner)
  public
  view
  nonZeroAddress(_owner)
  returns (uint256 value, uint256 blockNumber)
{
  return (lockTokens[_owner].value, lockTokens[_owner].blockNumber);
}

Parameters help

Name Type
_owner
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approveMintTokens(address _owner, uint256 _amount)
  public
  nonZeroAddress(_owner)
  canMint
  only(aelfCommunityMultisig)
  returns (bool)
{
  require(_amount > 0);
  uint256 previousLockTokens = lockTokens[_owner].value;
  require(previousLockTokens + _amount >= previousLockTokens);
  uint256 curTotalSupply = totalSupply;
  require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow
  require(curTotalSupply + _amount <= totalSupplyCap); // Check for overflow of total supply cap
  uint256 previousBalanceTo = balanceOf(_owner);
  require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow
  lockTokens[_owner].value = previousLockTokens.add(_amount);
  uint256 curBlockNumber = getCurrentBlockNumber();
  lockTokens[_owner].blockNumber = curBlockNumber.add(durationOfLock);
  ApproveMintTokens(_owner, _amount);
  return true;
}

Parameters help

Name Type
_owner
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function withdrawMintTokens(address _owner, uint256 _amount)
  public
  nonZeroAddress(_owner)
  canMint
  only(aelfCommunityMultisig)
  returns (bool)
{
  require(_amount > 0);
  uint256 previousLockTokens = lockTokens[_owner].value;
  require(previousLockTokens - _amount >= 0);
  lockTokens[_owner].value = previousLockTokens.sub(_amount);
  if (previousLockTokens - _amount == 0) {
    lockTokens[_owner].blockNumber = 0;
  }
  WithdrawMintTokens(_owner, _amount);
  return true;
}

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintTokens(address _owner)
  public
  canMint
  only(aelfDevMultisig)
  nonZeroAddress(_owner)
  returns (bool)
{
  require(lockTokens[_owner].blockNumber <= getCurrentBlockNumber());
  uint256 _amount = lockTokens[_owner].value;
  uint256 curTotalSupply = totalSupply;
  require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow
  require(curTotalSupply + _amount <= totalSupplyCap); // Check for overflow of total supply cap
  uint256 previousBalanceTo = balanceOf(_owner);
  require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow

  totalSupply = curTotalSupply.add(_amount);
  balances[_owner] = previousBalanceTo.add(_amount);
  lockTokens[_owner].value = 0;
  lockTokens[_owner].blockNumber = 0;
  MintTokens(_owner, _amount);
  Transfer(0, _owner, _amount);
  return true;
}

Parameters help

Name Type
_owner
address help
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function mintTokensWithinTime(address _owner, uint256 _amount)
  public
  nonZeroAddress(_owner)
  canMint
  only(aelfDevMultisig)
  returns (bool)
{
  require(_amount > 0);
  require(getCurrentBlockNumber() < (deployBlockNumber + MINTTIME));
  uint256 curTotalSupply = totalSupply;
  require(curTotalSupply + _amount >= curTotalSupply); // Check for overflow
  require(curTotalSupply + _amount <= totalSupplyCap); // Check for overflow of total supply cap
  uint256 previousBalanceTo = balanceOf(_owner);
  require(previousBalanceTo + _amount >= previousBalanceTo); // Check for overflow

  totalSupply = curTotalSupply.add(_amount);
  balances[_owner] = previousBalanceTo.add(_amount);
  MintTokens(_owner, _amount);
  Transfer(0, _owner, _amount);
  return true;
}

Parameters help

Name Type
_addresses
address[] help
_amounts
uint256[] help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function transferForMultiAddresses(address[] _addresses, uint256[] _amounts)
  public
  canTransfer
  returns (bool)
{
  for (uint256 i = 0; i < _addresses.length; i++) {
    require(_addresses[i] != address(0));
    require(_amounts[i] <= balances[msg.sender]);
    require(_amounts[i] > 0);

    // SafeMath.sub will throw if there is not enough balance.
    balances[msg.sender] = balances[msg.sender].sub(_amounts[i]);
    balances[_addresses[i]] = balances[_addresses[i]].add(_amounts[i]);
    Transfer(msg.sender, _addresses[i], _amounts[i]);
  }
  return true;
}

Parameters help

Name Type
_amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function burnTokens(uint256 _amount) public returns (bool) {
  require(_amount > 0);
  uint256 curTotalSupply = totalSupply;
  require(curTotalSupply >= _amount);
  uint256 previousBalanceTo = balanceOf(msg.sender);
  require(previousBalanceTo >= _amount);
  totalSupply = curTotalSupply.sub(_amount);
  balances[msg.sender] = previousBalanceTo.sub(_amount);
  BurnTokens(msg.sender, _amount);
  Transfer(msg.sender, 0, _amount);
  return true;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finishMinting() public only(aelfDevMultisig) canMint returns (bool) {
  mintingFinished = true;
  MintFinished(msg.sender);
  return true;
}

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 AElfToken.getCurrentBlockNumber keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help private
Mutability help view
Source Code
function getCurrentBlockNumber() private view returns (uint256) {
  return block.number;
}