ETH Price: $2,171.77 (+1.82%)

Contract

0xfe660E623F2d4adB3F7bec1eAAf8E58e2BD1ba96
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Release85639212019-09-17 1:04:082381 days ago1568682248IN
0xfe660E62...e2BD1ba96
0 ETH0.0004540414
Lock69193862018-12-20 6:55:172651 days ago1545288917IN
0xfe660E62...e2BD1ba96
0 ETH0.000493097

Latest 3 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer85639212019-09-17 1:04:082381 days ago1568682248
0xfe660E62...e2BD1ba96
0 ETH
Balance Of85639212019-09-17 1:04:082381 days ago1568682248
0xfe660E62...e2BD1ba96
0 ETH
Balance Of69193862018-12-20 6:55:172651 days ago1545288917
0xfe660E62...e2BD1ba96
0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xC371b96A...3E2fDE0F8
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
LockToken

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2018-09-18
*/

pragma solidity ^0.4.24;

/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a * b;
    assert(a == 0 || c / a == b);
    return c;
  }
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // assert(b > 0); // Solidity automatically throws when dividing by 0
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold
    return c;
  }
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract token {

  function balanceOf(address _owner) public constant returns (uint256 balance);
  function transfer(address _to, uint256 _value) public returns (bool success);

}

contract Ownable {
  address public owner;
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  /**
   * @dev The Ownable constructor sets the original `owner` of the contract to the sender
   * account.
   */
  constructor() public{
    owner = msg.sender;
  }
  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}

contract LockToken is Ownable {
    using SafeMath for uint256;

  token token_reward;
  address public beneficiary;
  bool public isLocked = false;
  bool public isReleased = false;
  uint256 public start_time;
  uint256 public end_time;
  
  event TokenReleased(address beneficiary, uint256 token_amount);

  constructor(address tokenContractAddress, address _beneficiary) public{
    token_reward = token(tokenContractAddress);
    beneficiary = _beneficiary;
  }

  function tokenBalance() constant public returns (uint256){
    return token_reward.balanceOf(this);
  }

  function lock(uint256 lockTime) public onlyOwner returns (bool){
      require(!isLocked);
      require(tokenBalance() > 0);
      start_time = now;
      end_time = lockTime;
      isLocked = true;
  }

  function lockOver() constant public returns (bool){
      uint256 current_time = now;
    return current_time > end_time;
  }

    function release() onlyOwner public{
    require(isLocked);
    require(!isReleased);
    require(lockOver());
    uint256 token_amount = tokenBalance();
    token_reward.transfer( beneficiary, token_amount);
    emit TokenReleased(beneficiary, token_amount);
    isReleased = true;
  }
}

Contract Security Audit

Contract ABI

API
[{"constant":true,"inputs":[],"name":"end_time","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"start_time","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"release","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lockOver","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isLocked","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"lockTime","type":"uint256"}],"name":"lock","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isReleased","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"tokenContractAddress","type":"address"},{"name":"_beneficiary","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"beneficiary","type":"address"},{"indexed":false,"name":"token_amount","type":"uint256"}],"name":"TokenReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

0x60806040526002805460a060020a61ffff021916905534801561002157600080fd5b5060405160408061067783398101604052805160209091015160008054600160a060020a0319908116331790915560018054600160a060020a03948516908316179055600280549390921692169190911790556105f4806100836000396000f3006080604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631624335681146100b357806338af3eed146100da578063834ee4171461010b57806386d1a69f146101205780638da5cb5b146101375780639b7faaf01461014c5780639e1a4d1914610175578063a4e2d6341461018a578063dd4670641461019f578063f2fde38b146101b7578063fa2a8997146101d8575b600080fd5b3480156100bf57600080fd5b506100c86101ed565b60408051918252519081900360200190f35b3480156100e657600080fd5b506100ef6101f3565b60408051600160a060020a039092168252519081900360200190f35b34801561011757600080fd5b506100c8610202565b34801561012c57600080fd5b50610135610208565b005b34801561014357600080fd5b506100ef6103ae565b34801561015857600080fd5b506101616103bd565b604080519115158252519081900360200190f35b34801561018157600080fd5b506100c86103c5565b34801561019657600080fd5b5061016161045b565b3480156101ab57600080fd5b5061016160043561047c565b3480156101c357600080fd5b50610135600160a060020a0360043516610512565b3480156101e457600080fd5b506101616105a6565b60045481565b600254600160a060020a031681565b60035481565b60008054600160a060020a0316331461022057600080fd5b60025474010000000000000000000000000000000000000000900460ff16151561024957600080fd5b6002547501000000000000000000000000000000000000000000900460ff161561027257600080fd5b61027a6103bd565b151561028557600080fd5b61028d6103c5565b600154600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561030157600080fd5b505af1158015610315573d6000803e3d6000fd5b505050506040513d602081101561032b57600080fd5b505060025460408051600160a060020a0390921682526020820183905280517f9cf9e3ab58b33f06d81842ea0ad850b6640c6430d6396973312e1715792e7a919281900390910190a1506002805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b600054600160a060020a031681565b600454421190565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561042a57600080fd5b505af115801561043e573d6000803e3d6000fd5b505050506040513d602081101561045457600080fd5b5051905090565b60025474010000000000000000000000000000000000000000900460ff1681565b60008054600160a060020a0316331461049457600080fd5b60025474010000000000000000000000000000000000000000900460ff16156104bc57600080fd5b60006104c66103c5565b116104d057600080fd5b426003556004919091556002805474ff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000017905590565b600054600160a060020a0316331461052957600080fd5b600160a060020a038116151561053e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6002547501000000000000000000000000000000000000000000900460ff16815600a165627a7a72305820d4d57bded519fd293c8346659ab8cc581784e4f69b4ee9c5f930a97d08cc06560029000000000000000000000000aa1ae5e57dc05981d83ec7fca0b3c7ee2565b7d600000000000000000000000063e9c984949e51cbfa0d0bb8f1364e37310d4eae

Deployed Bytecode

0x6080604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631624335681146100b357806338af3eed146100da578063834ee4171461010b57806386d1a69f146101205780638da5cb5b146101375780639b7faaf01461014c5780639e1a4d1914610175578063a4e2d6341461018a578063dd4670641461019f578063f2fde38b146101b7578063fa2a8997146101d8575b600080fd5b3480156100bf57600080fd5b506100c86101ed565b60408051918252519081900360200190f35b3480156100e657600080fd5b506100ef6101f3565b60408051600160a060020a039092168252519081900360200190f35b34801561011757600080fd5b506100c8610202565b34801561012c57600080fd5b50610135610208565b005b34801561014357600080fd5b506100ef6103ae565b34801561015857600080fd5b506101616103bd565b604080519115158252519081900360200190f35b34801561018157600080fd5b506100c86103c5565b34801561019657600080fd5b5061016161045b565b3480156101ab57600080fd5b5061016160043561047c565b3480156101c357600080fd5b50610135600160a060020a0360043516610512565b3480156101e457600080fd5b506101616105a6565b60045481565b600254600160a060020a031681565b60035481565b60008054600160a060020a0316331461022057600080fd5b60025474010000000000000000000000000000000000000000900460ff16151561024957600080fd5b6002547501000000000000000000000000000000000000000000900460ff161561027257600080fd5b61027a6103bd565b151561028557600080fd5b61028d6103c5565b600154600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03928316600482015260248101859052905193945091169163a9059cbb916044808201926020929091908290030181600087803b15801561030157600080fd5b505af1158015610315573d6000803e3d6000fd5b505050506040513d602081101561032b57600080fd5b505060025460408051600160a060020a0390921682526020820183905280517f9cf9e3ab58b33f06d81842ea0ad850b6640c6430d6396973312e1715792e7a919281900390910190a1506002805475ff00000000000000000000000000000000000000000019167501000000000000000000000000000000000000000000179055565b600054600160a060020a031681565b600454421190565b600154604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600092600160a060020a0316916370a0823191602480830192602092919082900301818787803b15801561042a57600080fd5b505af115801561043e573d6000803e3d6000fd5b505050506040513d602081101561045457600080fd5b5051905090565b60025474010000000000000000000000000000000000000000900460ff1681565b60008054600160a060020a0316331461049457600080fd5b60025474010000000000000000000000000000000000000000900460ff16156104bc57600080fd5b60006104c66103c5565b116104d057600080fd5b426003556004919091556002805474ff000000000000000000000000000000000000000019167401000000000000000000000000000000000000000017905590565b600054600160a060020a0316331461052957600080fd5b600160a060020a038116151561053e57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6002547501000000000000000000000000000000000000000000900460ff16815600a165627a7a72305820d4d57bded519fd293c8346659ab8cc581784e4f69b4ee9c5f930a97d08cc06560029

Swarm Source

bzzr://d4d57bded519fd293c8346659ab8cc581784e4f69b4ee9c5f930a97d08cc0656

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.