Blockwell

LockChain

ERC20

This contract is an ERC20 token.

Name LockChain
Symbol LOC
Decimals 18
Total Supply 18,585,933 LOC

About link description

LockTrip (LOC) is a cryptocurrency and operates on the Ethereum platform. LockTrip has a current supply of 18,579,040.57192072 with 0 in circulation. The last known price of LockTrip is 6.48999056 USD and is up 0.16 over the last 24 hours. It is currently trading on 4 active market(s) with $103,631.03 traded over the last 24 hours. More information can be found at https://locktrip.com/.

Stats

Public Functions 8
Event Types 3
Code Size 7,899 bytes

Events (3) keyboard_arrow_up

Approval Event

Parameters help
_owner
address help
_spender
address help
_value
uint256 help

CreateLOK Event

Parameters help
_to
address help
_value
uint256 help

Transfer Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

name Constant

string help
LockChain

symbol Constant

string help
LOC

decimals Constant

uint256 help
18

tokenSaleCap Constant

uint256 help
155 * UNKNOWN VALUE * UNKNOWN VALUE

tokenPreSaleCap Constant

uint256 help
50 * UNKNOWN VALUE * UNKNOWN VALUE

version Variable

string help

LockChainFundDeposit Variable

address help

account1Address Variable

address help

account2Address Variable

address help

creatorAddress Variable

address help

isFinalized Variable

bool help

isPreSale Variable

bool help

isPrePreSale Variable

bool help

isMainSale Variable

bool help

preSalePeriod Variable

uint help

prePreSalePeriod Variable

uint help

tokenExchangeRate Variable

uint256 help

totalSupply Variable

uint256 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

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
function balanceOf(address _owner) constant returns (uint256 balance) {
  return balances[_owner];
}

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address _to, uint256 _value) returns (bool success) {
  if (balances[msg.sender] >= _value && _value > 0) {
    balances[msg.sender] -= _value;
    balances[_to] += _value;
    Transfer(msg.sender, _to, _value);
    return true;
  } else {
    return false;
  }
}

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address _from,
  address _to,
  uint256 _value
) returns (bool success) {
  if (
    balances[_from] >= _value &&
    allowed[_from][msg.sender] >= _value &&
    _value > 0
  ) {
    balances[_to] += _value;
    balances[_from] -= _value;
    allowed[_from][msg.sender] -= _value;
    Transfer(_from, _to, _value);
    return true;
  } else {
    return false;
  }
}

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

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

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 remaining)
{
  return allowed[_owner][_spender];
}

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable
Source Code
function() payable {
  if (isFinalized) throw;
  if (!isPrePreSale && !isPreSale && !isMainSale) throw;
  //if (!saleStarted) throw;
  if (msg.value == 0) throw;
  //create tokens
  uint256 tokens = safeMult(msg.value, tokenExchangeRate); // check that we're not over totals
  uint256 checkedSupply = safeAdd(totalSupply, tokens);

  if (!isMainSale) {
    if (tokenPreSaleCap < checkedSupply) throw;
  }

  // return money if something goes wrong
  if (tokenSaleCap < checkedSupply) throw; // odd fractions won't be found
  totalSupply = checkedSupply;
  //All good. start the transfer
  balances[msg.sender] += tokens; // safeAdd not needed
  CreateLOK(msg.sender, tokens); // logs token creation
}

finalize keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function finalize() external {
  if (isFinalized) throw;
  if (msg.sender != LockChainFundDeposit) throw; // locks finalize to the ultimate ETH owner
  uint256 newTokens = totalSupply;
  uint256 account1Tokens;
  uint256 account2Tokens;
  uint256 creatorTokens = 10000 * 10**decimals;
  uint256 LOKFundTokens;
  uint256 checkedSupply = safeAdd(totalSupply, newTokens);
  totalSupply = checkedSupply;
  if (newTokens % 2 == 0) {
    LOKFundTokens = newTokens / 2;
    account2Tokens = newTokens / 2;
    account1Tokens = LOKFundTokens - creatorTokens;
    balances[account1Address] += account1Tokens;
    balances[account2Address] += account2Tokens;
  } else {
    uint256 makeEven = newTokens - 1;
    uint256 halfTokens = makeEven / 2;
    LOKFundTokens = halfTokens;
    account2Tokens = halfTokens + 1;
    account1Tokens = LOKFundTokens - creatorTokens;
    balances[account1Address] += account1Tokens;
    balances[account2Address] += account2Tokens;
  }
  balances[creatorAddress] += creatorTokens;
  CreateLOK(creatorAddress, creatorTokens);
  CreateLOK(account1Address, account1Tokens);
  CreateLOK(account2Address, account2Tokens);
  // move to operational
  if (!LockChainFundDeposit.send(this.balance)) throw;
  isFinalized = true; // send the eth to LockChain
}

switchSaleStage keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function switchSaleStage() external {
  if (msg.sender != LockChainFundDeposit) throw; // locks finalize to the ultimate ETH owner
  if (isMainSale) throw;
  if (!isPrePreSale) {
    isPrePreSale = true;
    tokenExchangeRate = 1150;
  } else if (!isPreSale) {
    isPreSale = true;
    tokenExchangeRate = 1000;
  } else if (!isMainSale) {
    isMainSale = true;
    if (totalSupply < 10 * (10**6) * 10**decimals) {
      tokenExchangeRate = 750;
    } else if (
      totalSupply >= 10 * (10**6) * 10**decimals &&
      totalSupply < 20 * (10**6) * 10**decimals
    ) {
      tokenExchangeRate = 700;
    } else if (
      totalSupply >= 20 * (10**6) * 10**decimals &&
      totalSupply < 30 * (10**6) * 10**decimals
    ) {
      tokenExchangeRate = 650;
    } else if (
      totalSupply >= 30 * (10**6) * 10**decimals &&
      totalSupply < 40 * (10**6) * 10**decimals
    ) {
      tokenExchangeRate = 620;
    } else if (
      totalSupply >= 40 * (10**6) * 10**decimals &&
      totalSupply <= 50 * (10**6) * 10**decimals
    ) {
      tokenExchangeRate = 600;
    }
  }
}

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.safeAdd keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction
Source Code
function safeAdd(uint256 x, uint256 y) internal returns (uint256) {
  uint256 z = x + y;
  assert((z >= x) && (z >= y));
  return z;
}

internal SafeMath.safeSubtract keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function safeSubtract(uint256 x, uint256 y) internal returns (uint256) {
  assert(x >= y);
  uint256 z = x - y;
  return z;
}

internal SafeMath.safeMult keyboard_arrow_up

Parameters help

Name Type
x
uint256 help
y
uint256 help

Properties

Visibility help internal
Mutability help transaction

Requirements help

One or more of the following:
Source Code
function safeMult(uint256 x, uint256 y) internal returns (uint256) {
  uint256 z = x * y;
  assert((x == 0) || (z / x == y));
  return z;
}