ETH Price: $3,199.90 (+4.88%)

Token

LIGHTYEARS (LYS)
 

Overview

Max Total Supply

100,000,000 LYS

Holders

1,681

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 8 Decimals)

Balance
200 LYS

Value
$0.00
0x488d1BD40817591c8a4EdA1E0c5c428da45c90Ce
Loading...
Loading
Loading...
Loading
Loading...
Loading


 


# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
YEARS

Compiler Version
v0.4.8+commit.60cc1668

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2017-12-07
*/

pragma solidity ^0.4.8;

contract ERC20 {
  uint public totalSupply;
  function balanceOf(address who) constant returns (uint);
  function allowance(address owner, address spender) constant returns (uint);

  function transfer(address to, uint value) returns (bool ok);
  function transferFrom(address from, address to, uint value) returns (bool ok);
  function approve(address spender, uint value) returns (bool ok);
  event Transfer(address indexed from, address indexed to, uint value);
  event Approval(address indexed owner, address indexed spender, uint value);
}


contract Ownable {
  address public owner;

  function Ownable() {
    owner = msg.sender;
  }

  modifier onlyOwner() {
    if (msg.sender == owner)
      _;
  }

  function transferOwnership(address newOwner) onlyOwner {
    if (newOwner != address(0)) owner = newOwner;
  }

}


contract TokenSpender {
    function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);
}

contract SafeMath {
  function safeMul(uint a, uint b) internal returns (uint) {
    uint c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }

  function safeDiv(uint a, uint b) internal returns (uint) {
    assert(b > 0);
    uint c = a / b;
    assert(a == b * c + a % b);
    return c;
  }

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

  function safeAdd(uint a, uint b) internal returns (uint) {
    uint c = a + b;
    assert(c>=a && c>=b);
    return c;
  }

  function max64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a >= b ? a : b;
  }

  function min64(uint64 a, uint64 b) internal constant returns (uint64) {
    return a < b ? a : b;
  }

  function max256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a >= b ? a : b;
  }

  function min256(uint256 a, uint256 b) internal constant returns (uint256) {
    return a < b ? a : b;
  }

  function assert(bool assertion) internal {
    if (!assertion) {
      throw;
    }
  }
}


contract YEARS is ERC20, SafeMath, Ownable {

    /* Public variables of the token */
  string public name;       //fancy name
  string public symbol;
  uint8 public decimals;    //How many decimals to show.
  string public version = 'v0.1'; 
  uint public initialSupply;
  uint public totalSupply;
  bool public locked;
  //uint public unlockBlock;

  mapping(address => uint) balances;
  mapping (address => mapping (address => uint)) allowed;

  // lock transfer during the ICO
  modifier onlyUnlocked() {
    if (msg.sender != owner && locked) throw;
    _;
  }

  /*
   *  The YERS Token created with the time at which the crowdsale end
   */

  function YEARS() {
    // lock the transfer function during the crowdsale
    locked = true;
    //unlockBlock=  now + 15 days; // (testnet) - for mainnet put the block number

    initialSupply = 10000000000000000;
    totalSupply = initialSupply;
    balances[msg.sender] = initialSupply;// Give the creator all initial tokens                    
    name = 'LIGHTYEARS';        // Set the name for display purposes     
    symbol = 'LYS';                       // Set the symbol for display purposes  
    decimals = 8;                        // Amount of decimals for display purposes
  }

  function unlock() onlyOwner {
    locked = false;
  }

  function burn(uint256 _value) returns (bool){
    balances[msg.sender] = safeSub(balances[msg.sender], _value) ;
    totalSupply = safeSub(totalSupply, _value);
    Transfer(msg.sender, 0x0, _value);
    return true;
  }

  function transfer(address _to, uint _value) onlyUnlocked returns (bool) {
    balances[msg.sender] = safeSub(balances[msg.sender], _value);
    balances[_to] = safeAdd(balances[_to], _value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

  function transferFrom(address _from, address _to, uint _value) onlyUnlocked returns (bool) {
    var _allowance = allowed[_from][msg.sender];
    
    balances[_to] = safeAdd(balances[_to], _value);
    balances[_from] = safeSub(balances[_from], _value);
    allowed[_from][msg.sender] = safeSub(_allowance, _value);
    Transfer(_from, _to, _value);
    return true;
  }

  function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
  }

  function approve(address _spender, uint _value) returns (bool) {
    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

    /* Approve and then comunicate the approved contract in a single tx */
  function approveAndCall(address _spender, uint256 _value, bytes _extraData){    
      TokenSpender spender = TokenSpender(_spender);
      if (approve(_spender, _value)) {
          spender.receiveApproval(msg.sender, _value, this, _extraData);
      }
  }

  function allowance(address _owner, address _spender) constant returns (uint remaining) {
    return allowed[_owner][_spender];
  }
  
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"initialSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"}],"name":"burn","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"balance","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"unlock","outputs":[],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"},{"name":"_extraData","type":"bytes"}],"name":"approveAndCall","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"locked","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

60a0604052600460608190527f76302e310000000000000000000000000000000000000000000000000000000060809081526005805460008290527f76302e3100000000000000000000000000000000000000000000000000000008825590927f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0602060026001851615610100026000190190941693909304601f0192909204820192909190620000db565b82800160010185558215620000db579182015b82811115620000db578251825591602001919060010190620000be565b5b50620000ff9291505b80821115620000fb5760008155600101620000e5565b5090565b50503462000000575b5b60018054600160a060020a03191633600160a060020a03161790555b6008805460ff19166001908117909155662386f26fc1000060068190556007819055600160a060020a0333166000908152600960209081526040808320939093558251808401909352600a8084527f4c49474854594541525300000000000000000000000000000000000000000000938201938452600280549381905294601f90841615610100026000190190931685900492909201047f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace90810192805160ff191683800117855562000223565b8280016001018555821562000223579182015b828111156200022357825182559160200191906001019062000206565b5b50620002479291505b80821115620000fb5760008155600101620000e5565b5090565b5050604060405190810160405280600381526020017f4c5953000000000000000000000000000000000000000000000000000000000081525060039080519060200190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620002cd57805160ff1916838001178555620002fd565b82800160010185558215620002fd579182015b82811115620002fd578251825591602001919060010190620002e0565b5b50620003219291505b80821115620000fb5760008155600101620000e5565b5090565b50506004805460ff191660081790555b5b610c0e80620003426000396000f300606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da578063095ea7b31461016757806318160ddd1461019757806323b872dd146101b6578063313ce567146101ec578063378dc3dc1461020f57806342966c681461022e57806354fd4d501461025257806370a08231146102df5780638da5cb5b1461030a57806395d89b4114610333578063a69df4b5146103c0578063a9059cbb146103cf578063cae9ca51146103ff578063cf30901214610461578063dd62ed3e14610482578063f2fde38b146104b3575b610000565b34610000576100e76104ce565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610183600160a060020a0360043516602435610559565b604080519115158252519081900360200190f35b34610000576101a46105c4565b60408051918252519081900360200190f35b3461000057610183600160a060020a03600435811690602435166044356105ca565b604080519115158252519081900360200190f35b34610000576101f96106fc565b6040805160ff9092168252519081900360200190f35b34610000576101a4610705565b60408051918252519081900360200190f35b346100005761018360043561070b565b604080519115158252519081900360200190f35b34610000576100e76107a1565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a036004351661082f565b60408051918252519081900360200190f35b346100005761031761084e565b60408051600160a060020a039092168252519081900360200190f35b34610000576100e761085d565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576103cd6108eb565b005b3461000057610183600160a060020a0360043516602435610911565b604080519115158252519081900360200190f35b3461000057604080516020600460443581810135601f81018490048402850184019095528484526103cd948235600160a060020a03169460248035956064949293919092019181908401838280828437509496506109f495505050505050565b005b3461000057610183610b06565b604080519115158252519081900360200190f35b34610000576101a4600160a060020a0360043581169060243516610b0f565b60408051918252519081900360200190f35b34610000576103cd600160a060020a0360043516610b3c565b005b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b600160a060020a033381166000818152600a6020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60075481565b600154600090819033600160a060020a039081169116148015906105f0575060085460ff165b156105fa57610000565b50600160a060020a038085166000908152600a602090815260408083203385168452825280832054938716835260099091529020546106399084610b91565b600160a060020a0380861660009081526009602052604080822093909355908716815220546106689084610bb9565b600160a060020a03861660009081526009602052604090205561068b8184610bb9565b600160a060020a038087166000818152600a60209081526040808320338616845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600191505b5b509392505050565b60045460ff1681565b60065481565b600160a060020a03331660009081526009602052604081205461072e9083610bb9565b600160a060020a0333166000908152600960205260409020556007546107549083610bb9565b600755604080518381529051600091600160a060020a033316917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060015b919050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b600160a060020a0381166000908152600960205260409020545b919050565b600154600160a060020a031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b60015433600160a060020a039081169116141561090d576008805460ff191690555b5b5b565b60015460009033600160a060020a03908116911614801590610935575060085460ff165b1561093f57610000565b600160a060020a0333166000908152600960205260409020546109629083610bb9565b600160a060020a0333811660009081526009602052604080822093909355908516815220546109919083610b91565b600160a060020a038085166000818152600960209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060015b5b92915050565b826109ff8184610559565b15610aff5780600160a060020a0316638f4ffcb1338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360008314610aaa575b805182526020831115610aaa57601f199092019160209182019101610a8a565b505050905090810190601f168015610ad65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b156100005760325a03f115610000575050505b5b50505050565b60085460ff1681565b600160a060020a038083166000908152600a60209081526040808320938516835292905220545b92915050565b60015433600160a060020a0390811691161415610b8b57600160a060020a03811615610b8b576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b5b5b50565b6000828201610bae848210801590610ba95750838210155b610bd2565b8091505b5092915050565b6000610bc783831115610bd2565b508082035b92915050565b801515610b8b57610000565b5b505600a165627a7a72305820794ae929ba218130c2e132bbc295c3c569ba42641aabb754ba4b6fdfeb268c600029

Deployed Bytecode

0x606060405236156100d55763ffffffff60e060020a60003504166306fdde0381146100da578063095ea7b31461016757806318160ddd1461019757806323b872dd146101b6578063313ce567146101ec578063378dc3dc1461020f57806342966c681461022e57806354fd4d501461025257806370a08231146102df5780638da5cb5b1461030a57806395d89b4114610333578063a69df4b5146103c0578063a9059cbb146103cf578063cae9ca51146103ff578063cf30901214610461578063dd62ed3e14610482578063f2fde38b146104b3575b610000565b34610000576100e76104ce565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3461000057610183600160a060020a0360043516602435610559565b604080519115158252519081900360200190f35b34610000576101a46105c4565b60408051918252519081900360200190f35b3461000057610183600160a060020a03600435811690602435166044356105ca565b604080519115158252519081900360200190f35b34610000576101f96106fc565b6040805160ff9092168252519081900360200190f35b34610000576101a4610705565b60408051918252519081900360200190f35b346100005761018360043561070b565b604080519115158252519081900360200190f35b34610000576100e76107a1565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576101a4600160a060020a036004351661082f565b60408051918252519081900360200190f35b346100005761031761084e565b60408051600160a060020a039092168252519081900360200190f35b34610000576100e761085d565b60408051602080825283518183015283519192839290830191850190808383821561012d575b80518252602083111561012d57601f19909201916020918201910161010d565b505050905090810190601f1680156101595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34610000576103cd6108eb565b005b3461000057610183600160a060020a0360043516602435610911565b604080519115158252519081900360200190f35b3461000057604080516020600460443581810135601f81018490048402850184019095528484526103cd948235600160a060020a03169460248035956064949293919092019181908401838280828437509496506109f495505050505050565b005b3461000057610183610b06565b604080519115158252519081900360200190f35b34610000576101a4600160a060020a0360043581169060243516610b0f565b60408051918252519081900360200190f35b34610000576103cd600160a060020a0360043516610b3c565b005b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b600160a060020a033381166000818152600a6020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60075481565b600154600090819033600160a060020a039081169116148015906105f0575060085460ff165b156105fa57610000565b50600160a060020a038085166000908152600a602090815260408083203385168452825280832054938716835260099091529020546106399084610b91565b600160a060020a0380861660009081526009602052604080822093909355908716815220546106689084610bb9565b600160a060020a03861660009081526009602052604090205561068b8184610bb9565b600160a060020a038087166000818152600a60209081526040808320338616845282529182902094909455805187815290519288169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a3600191505b5b509392505050565b60045460ff1681565b60065481565b600160a060020a03331660009081526009602052604081205461072e9083610bb9565b600160a060020a0333166000908152600960205260409020556007546107549083610bb9565b600755604080518381529051600091600160a060020a033316917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35060015b919050565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b600160a060020a0381166000908152600960205260409020545b919050565b600154600160a060020a031681565b6003805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105515780601f1061052657610100808354040283529160200191610551565b820191906000526020600020905b81548152906001019060200180831161053457829003601f168201915b505050505081565b60015433600160a060020a039081169116141561090d576008805460ff191690555b5b5b565b60015460009033600160a060020a03908116911614801590610935575060085460ff165b1561093f57610000565b600160a060020a0333166000908152600960205260409020546109629083610bb9565b600160a060020a0333811660009081526009602052604080822093909355908516815220546109919083610b91565b600160a060020a038085166000818152600960209081526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060015b5b92915050565b826109ff8184610559565b15610aff5780600160a060020a0316638f4ffcb1338530866040518563ffffffff1660e060020a0281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360008314610aaa575b805182526020831115610aaa57601f199092019160209182019101610a8a565b505050905090810190601f168015610ad65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b156100005760325a03f115610000575050505b5b50505050565b60085460ff1681565b600160a060020a038083166000908152600a60209081526040808320938516835292905220545b92915050565b60015433600160a060020a0390811691161415610b8b57600160a060020a03811615610b8b576001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b5b5b50565b6000828201610bae848210801590610ba95750838210155b610bd2565b8091505b5092915050565b6000610bc783831115610bd2565b508082035b92915050565b801515610b8b57610000565b5b505600a165627a7a72305820794ae929ba218130c2e132bbc295c3c569ba42641aabb754ba4b6fdfeb268c600029

Swarm Source

bzzr://794ae929ba218130c2e132bbc295c3c569ba42641aabb754ba4b6fdfeb268c60
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.