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 is an open-source blockchain network designed as a complete business solution. The structure of ‘one main-chain + multiple side-chains’ can support developers to independently deploy or run DApps on individual side-chains to achieve resource isolation. aelf technology adopts Parallel Processing & AEDPoS Consensus Mechanism. Based on the cross-chain technology of the main-chain index and verification mechanisms, aelf achieves secure communication between the main-chain and all side-chains, as a result, allows direct interoperability between side-chains. aelf meets the governance needs of varying applications by providing different models, including a Parliament Governance Model, an Association Governance Model, and a Referendum Governance Model. Through the incentive model, the network is equipped with a self-sustainable system and can roll out self-development on a practical basis. Simultaneously, developers can debug, develop and deploy applications based on a mature IDE, provided by aelf. aelf has launched aelf Enterprise, an enterprise-level integrated blockchain solution. aelf Enterprise is based on the requirements of different business scenarios. To meet the requirements of several industries including supply chain management, credit establishment, user incentives, and property protection, aelf Enterprise provides enterprise-level users with a flexible, but practical modularized blockchain solution. This promotes the hand-in-hand development of both Blockchain and other core economies.

Stats

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

Library Use

Uses SafeMath for uint256.

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 Event

Members
value
uint256 help
blockNumber
uint256 help

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

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;
  }

balanceOf keyboard_arrow_up

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];
  }

transfer keyboard_arrow_up

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) canTransfer public 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;
  }

allowance keyboard_arrow_up

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];
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Requirements help

Source Code
  function transferFrom(address _from, address _to, uint256 _value) canTransfer public 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;
  }

approve keyboard_arrow_up

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) canTransfer public returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

increaseApproval keyboard_arrow_up

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) canTransfer public returns (bool) {
    allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue);
    Approval(msg.sender, _spender, allowed[msg.sender][_spender]);
    return true;
  }

decreaseApproval keyboard_arrow_up

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) canTransfer public 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;
  }

setTransferable keyboard_arrow_up

Parameters help

Name Type
_transferable
bool help

Properties

Visibility help public
Mutability help transaction

Requirements help

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

disableSetTransferable keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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

setAElfDevMultisig keyboard_arrow_up

Parameters help

Name Type
_aelfDevMultisig
address help

Properties

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

setAElfCommunityMultisig keyboard_arrow_up

Parameters help

Name Type
_aelfCommunityMultisig
address help

Properties

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

setDurationOfLock keyboard_arrow_up

Parameters help

Name Type
_durationOfLock
uint256 help

Properties

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

getLockTokens keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

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

approveMintTokens keyboard_arrow_up

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) nonZeroAddress(_owner) canMint only(aelfCommunityMultisig) public 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;
  }

withdrawMintTokens keyboard_arrow_up

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) nonZeroAddress(_owner) canMint only(aelfCommunityMultisig) public 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;
  }

mintTokens keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function mintTokens(address _owner) canMint only(aelfDevMultisig) nonZeroAddress(_owner) public 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;
  }

mintTokensWithinTime keyboard_arrow_up

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) nonZeroAddress(_owner) canMint only(aelfDevMultisig) public 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;
  }

transferForMultiAddresses keyboard_arrow_up

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) canTransfer public 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;
  }

burnTokens keyboard_arrow_up

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;
  }

finishMinting keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

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