Blockwell

Legends

ERC20

This contract is an ERC20 token.

Name Legends
Symbol LGD
Decimals 8
Total Supply 30,000,000 LGD

About

Stats

Public Functions 23
Event Types 4
Code Size 10,392 bytes

Events (4) keyboard_arrow_up

Approval Event

Parameters help
address help
address help
uint help

Dilution Event

Parameters help
address help
uint help

LedgerUpdated Event

Parameters help
address help
address help

Transfer Event

Parameters help
address help
address help
uint help

name Variable

string help

decimals Variable

uint8 help

symbol Variable

string help

version Variable

string help

owner Variable

address help

ONE Variable

uint help
Internal Variable

price Variable

uint help
Internal Variable

ledger Variable

Ledger help
Internal Variable

rentalContract Variable

Rental help
Internal Variable

rollOverTime Variable

uint8 help
Internal Variable

startTime Variable

uint8 help
Internal Variable

live Variable

bool help
Internal Variable

club Variable

address help
Internal Variable

lockedSupply Variable

uint help
Internal Variable

transfersOn Variable

bool help
Internal Variable

locked Variable

bool help
Internal Variable

Functions Expand All Collapse All

changeOwner keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeOwner(address _addr) onlyOwner {
  if (_addr == 0x0) throw;
  owner = _addr;
}

unMutex keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unMutex() onlyOwner {
  locked = false;
}

changeClub keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeClub(address _addr) onlyOwner {
  if (_addr == 0x0) throw;

  club = _addr;
}

changePrice keyboard_arrow_up

Parameters help

Name Type
_num
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function changePrice(uint256 _num) onlyOwner {
  price = _num;
}

safeAdd keyboard_arrow_up

Parameters help

Name Type
a
uint help
b
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function safeAdd(uint256 a, uint256 b) returns (uint256) {
  if ((a + b) < a) throw;
  return (a + b);
}

changeLedger keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeLedger(address _addr) onlyOwner {
  if (_addr == 0x0) throw;

  LedgerUpdated(msg.sender, _addr);
  ledger = Ledger(_addr);
}

changeRental keyboard_arrow_up

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function changeRental(address _addr) onlyOwner {
  if (_addr == 0x0) throw;
  rentalContract = Rental(_addr);
}

changeTimes keyboard_arrow_up

Parameters help

Name Type
_rollOver
uint8 help
_start
uint8 help

Properties

Visibility help public
Mutability help transaction
Source Code
function changeTimes(uint8 _rollOver, uint8 _start) onlyOwner {
  rollOverTime = _rollOver;
  startTime = _start;
}

lock keyboard_arrow_up

Parameters help

Name Type
_seizeAddr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function lock(address _seizeAddr) onlyOwner mutexed {
  uint256 myBalance = ledger.balanceOf(_seizeAddr);

  lockedSupply += myBalance;
  ledger.setBalance(_seizeAddr, 0);
}

dilute keyboard_arrow_up

Parameters help

Name Type
_destAddr
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function dilute(address _destAddr, uint256 amount) onlyOwner {
  if (amount > lockedSupply) throw;

  Dilution(_destAddr, amount);

  lockedSupply -= amount;

  uint256 curBalance = ledger.balanceOf(_destAddr);
  curBalance = safeAdd(amount, curBalance);
  ledger.setBalance(_destAddr, curBalance);
}

completeCrowdsale keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function completeCrowdsale() onlyOwner {
  // Lock unsold tokens
  // allow transfers for arbitrary owners
  transfersOn = true;
  lock(owner);
}

pauseTransfers keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function pauseTransfers() onlyOwner {
  transfersOn = false;
}

resumeTransfers keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function resumeTransfers() onlyOwner {
  transfersOn = true;
}

rentOut keyboard_arrow_up

Parameters help

Name Type
num
uint help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function rentOut(uint256 num) {
  if (ledger.balanceOf(msg.sender) < num) throw;
  rentalContract.offer(msg.sender, num);
  ledger.tokenTransfer(msg.sender, rentalContract, num);
}

claimUnrented keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function claimUnrented() {
  uint256 amount = rentalContract.claimBalance(msg.sender); // this should reduce sender's claimableBalance to 0

  ledger.tokenTransfer(rentalContract, msg.sender, amount);
}

burn keyboard_arrow_up

Parameters help

Name Type
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function burn(uint256 _amount) {
  uint256 balance = ledger.balanceOf(msg.sender);
  if (_amount > balance) throw;

  ledger.setBalance(msg.sender, balance - _amount);
}

checkIn keyboard_arrow_up

Parameters help

Name Type
_numCheckins
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function checkIn(uint256 _numCheckins) returns (bool) {
  int256 needed = int256(price * ONE * _numCheckins);
  if (int256(ledger.balanceOf(msg.sender)) > needed) {
    ledger.changeUsed(msg.sender, needed);
    return true;
  }
  return false;
}

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
function totalSupply() constant returns (uint256) {
  return ledger.totalSupply();
}

Parameters help

Name Type
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _amount) returns (bool) {
  if (!transfersOn && msg.sender != owner) return false;
  if (!ledger.tokenTransfer(msg.sender, _to, _amount)) {
    return false;
  }

  Transfer(msg.sender, _to, _amount);
  return true;
}

Parameters help

Name Type
_from
address help
_to
address help
_amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _amount
) returns (bool) {
  if (!transfersOn && msg.sender != owner) return false;
  if (!ledger.tokenTransferFrom(msg.sender, _from, _to, _amount)) {
    return false;
  }

  Transfer(msg.sender, _to, _amount);
  return true;
}

Parameters help

Name Type
_from
address help
_to
address help

Properties

Visibility help public
Mutability help constant
Source Code
function allowance(address _from, address _to) constant returns (uint256) {
  return ledger.allowance(_from, _to);
}

Parameters help

Name Type
_spender
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function approve(address _spender, uint256 _value) returns (bool) {
  if (ledger.tokenApprove(msg.sender, _spender, _value)) {
    Approval(msg.sender, _spender, _value);
    return true;
  }
  return false;
}

Parameters help

Name Type
_addr
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _addr) constant returns (uint256) {
  return ledger.balanceOf(_addr);
}

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.