Blockwell

EthLend Token

ERC20

This contract is an ERC20 token.

Name EthLend Token
Symbol LEND
Decimals 18
Total Supply 1,299,999,942 LEND

About

Stats

Public Functions 14
Event Types 4
Code Size 10,271 bytes

Events (4) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

LogBurn Event

Parameters help
owner
address help
value
uint help

LogBuy Event

Parameters help
owner
address help
value
uint help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

name Constant

string help
EthLend Token

symbol Constant

string help
LEND

decimals Constant

uint help
18

TOTAL_SUPPLY Constant

uint help
1300000000 * UNKNOWN VALUE

DEVELOPERS_BONUS Constant

uint help
300000000 * UNKNOWN VALUE

PRESALE_PRICE Constant

uint help
30000

PRESALE_MAX_ETH Constant

uint help
2000

PRESALE_TOKEN_SUPPLY_LIMIT Constant

uint help

ICO_PRICE1 Constant

uint help
27500

ICO_PRICE2 Constant

uint help
26250

ICO_PRICE3 Constant

uint help
25000

TOTAL_SOLD_TOKEN_SUPPLY_LIMIT Constant

uint help
1000000000 * UNKNOWN VALUE

currentState Variable

State help

enableTransfers Variable

bool help

teamTokenBonus Variable

address help

escrow Variable

address help

tokenManager Variable

address help

presaleSoldTokens Variable

uint help

icoSoldTokens Variable

uint help

totalSoldTokens Variable

uint help

supply Variable

uint help

balances Variable

mapping(address => uint256) help
Internal Variable

allowed Variable

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

Functions Expand All Collapse All

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupply() 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) constant returns (uint256) {
  return balances[_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) returns (bool) {
  require(enableTransfers);
  return super.transfer(_to, _value);
}

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
) returns (bool) {
  require(enableTransfers);
  return super.transferFrom(_from, _to, _value);
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function approve(address _spender, uint256 _value) returns (bool) {
  require(enableTransfers);
  return super.approve(_spender, _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)
  constant
  returns (uint256)
{
  return allowed[_owner][_spender];
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function buyTokens() public payable {
  require(
    currentState == State.PresaleRunning || currentState == State.ICORunning
  );

  if (currentState == State.PresaleRunning) {
    return buyTokensPresale();
  } else {
    return buyTokensICO();
  }
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function buyTokensPresale() public payable onlyInState(State.PresaleRunning) {
  // min - 1 ETH
  require(msg.value >= (1 ether / 1 wei));
  uint256 newTokens = msg.value * PRESALE_PRICE;

  require(presaleSoldTokens + newTokens <= PRESALE_TOKEN_SUPPLY_LIMIT);

  balances[msg.sender] += newTokens;
  supply += newTokens;
  presaleSoldTokens += newTokens;
  totalSoldTokens += newTokens;

  LogBuy(msg.sender, newTokens);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function buyTokensICO() public payable onlyInState(State.ICORunning) {
  // min - 0.01 ETH
  require(msg.value >= ((1 ether / 1 wei) / 100));
  uint256 newTokens = msg.value * getPrice();

  require(totalSoldTokens + newTokens <= TOTAL_SOLD_TOKEN_SUPPLY_LIMIT);

  balances[msg.sender] += newTokens;
  supply += newTokens;
  icoSoldTokens += newTokens;
  totalSoldTokens += newTokens;

  LogBuy(msg.sender, newTokens);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function getPrice() constant returns (uint256) {
  if (currentState == State.ICORunning) {
    if (icoSoldTokens < (200000000 * (1 ether / 1 wei))) {
      return ICO_PRICE1;
    }

    if (icoSoldTokens < (300000000 * (1 ether / 1 wei))) {
      return ICO_PRICE2;
    }

    return ICO_PRICE3;
  } else {
    return PRESALE_PRICE;
  }
}

Parameters help

Name Type
_nextState
State help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function setState(State _nextState) public onlyTokenManager {
  //setState() method call shouldn't be entertained after ICOFinished
  require(currentState != State.ICOFinished);

  currentState = _nextState;
  // enable/disable transfers
  //enable transfers only after ICOFinished, disable otherwise
  enableTransfers = (currentState == State.ICOFinished);
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function withdrawEther() public onlyTokenManager {
  if (this.balance > 0) {
    require(escrow.send(this.balance));
  }
}

Parameters help

Name Type
_mgr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setTokenManager(address _mgr) public onlyTokenManager {
  tokenManager = _mgr;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() payable {
  buyTokens();
}

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 SafeMath.safeMul keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeMul(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a * b;
  assert(a == 0 || c / a == b);
  return c;
}

internal SafeMath.safeSub keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function safeSub(uint256 a, uint256 b) internal returns (uint256) {
  assert(b <= a);
  return a - b;
}

internal SafeMath.safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeAdd(uint256 a, uint256 b) internal returns (uint256) {
  uint256 c = a + b;
  assert(c >= a && c >= b);
  return c;
}