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 is a blockchain-based travel marketplace that allows users to save on average 20% on their bookings by cutting out middlemen. Every booking burns LOC proportionally to its booking value, continuously reducing its total supply. Users can reportedly choose from more than 530,000 hotels and properties worldwide and book flights from the same interface. Users can book hotels with Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC), Tether (USDT) to unlock additional discounts on their bookings. Locktrip allows users to travel with Crypto and book with (https://locktrip.com/)

Stats

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

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

Functions Expand All Collapse All

balanceOf keyboard_arrow_up

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

transfer keyboard_arrow_up

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

transferFrom keyboard_arrow_up

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

approve keyboard_arrow_up

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

allowance keyboard_arrow_up

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

      }
    }