Contract Overview
Balance: 0 Ether
Ether Value: $0
Transactions: 5 txns
Misc:
Address Watch: Add To Watch List
Contract Creator: 0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cbat txn 0x7d9c7d34586d222235de021378fe7336fa073feaf58ade3f95b80af2259365c6
Token Balance:
 Latest 5 txns

TxHash Age From To Value [TxFee]
0x80819a39dcf3da526d216e8aff88c9272b9bbdb2b51152f5d592b030c6a2cb67219 days 30 mins ago0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cb  IN   0xa136b56fa180f4ea557a5b9e42e05660b9b8f6180 Ether0.002161356
0x9c17ba2dd8ce0b3105170185a86092edb83ab9068d8ff574a2a500a1ebfc9805219 days 36 mins ago0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cb  IN   0xa136b56fa180f4ea557a5b9e42e05660b9b8f6180 Ether0.002161356
0xfdc81137cac3482e4a8067d58d5979503e71e213c968d3cfae092620f11ceef9219 days 44 mins ago0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cb  IN   0xa136b56fa180f4ea557a5b9e42e05660b9b8f6180 Ether0.002776356
0xc5c0b9e19ffc3df6f903420d84819dc5c9057b1f336754da468b3485613f6389219 days 51 mins ago0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cb  IN   0xa136b56fa180f4ea557a5b9e42e05660b9b8f6180 Ether0.001086008
0x7d9c7d34586d222235de021378fe7336fa073feaf58ade3f95b80af2259365c6219 days 1 hr ago0x2b9f07b73b7c67da00dcad5d42de3a6b7406f1cb  IN    Contract Creation0 Ether0.009701362
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Similar Match)
Note: Displaying Similar Match Verified Source Code At Contract 0x0a3b99aa2571299d56019e5f90c916e85aad6bf1(Excluding Constructor Arguments if any)
Contract Name: TokenTimelock
Compiler Text: v0.4.20+commit.3155dd80
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.20;

/**
 * @title SafeMath
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    if (a == 0) {
      return 0;
    }
    uint256 c = a * b;
    assert(c / a == b);
    return c;
  }

  /**
  * @dev Integer division of two numbers, truncating the quotient.
  */
  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;
  }

  /**
  * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}



/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
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.
   */
  function Ownable() 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) public onlyOwner {
    require(newOwner != address(0));
    OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}

/**
 * @title Claimable
 * @dev Extension for the Ownable contract, where the ownership needs to be claimed.
 * This allows the new owner to accept the transfer.
 */
contract Claimable is Ownable {
  address public pendingOwner;

  /**
   * @dev Modifier throws if called by any account other than the pendingOwner.
   */
  modifier onlyPendingOwner() {
    require(msg.sender == pendingOwner);
    _;
  }

  /**
   * @dev Allows the current owner to set the pendingOwner address.
   * @param newOwner The address to transfer ownership to.
   */
  function transferOwnership(address newOwner) onlyOwner public {
    pendingOwner = newOwner;
  }

  /**
   * @dev Allows the pendingOwner address to finalize the transfer.
   */
  function claimOwnership() onlyPendingOwner public {
    OwnershipTransferred(owner, pendingOwner);
    owner = pendingOwner;
    pendingOwner = address(0);
  }
}

/**
 * @title ERC20Basic
 * @dev Simpler version of ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/179
 */
contract ERC20Basic {
  function totalSupply() public view returns (uint256);
  function balanceOf(address who) public view returns (uint256);
  function transfer(address to, uint256 value) public returns (bool);
  event Transfer(address indexed from, address indexed to, uint256 value);
}


/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
contract ERC20 is ERC20Basic {
  function allowance(address owner, address spender) public view returns (uint256);
  function transferFrom(address from, address to, uint256 value) public returns (bool);
  function approve(address spender, uint256 value) public returns (bool);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
  function safeTransfer(ERC20Basic token, address to, uint256 value) internal {
    assert(token.transfer(to, value));
  }

  function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
    assert(token.transferFrom(from, to, value));
  }

  function safeApprove(ERC20 token, address spender, uint256 value) internal {
    assert(token.approve(spender, value));
  }
}

/**
 * @title TokenTimelock
 * @dev TokenTimelock is a token holder contract that will allow a
 * beneficiary to extract the tokens after a given release time
 */
contract TokenTimelock is Claimable {
  using SafeERC20 for ERC20Basic;
  using SafeMath for uint256;
  // ERC20 basic token contract being held
  ERC20Basic public token;
  
  // tokens deposited.
  uint256 public tokenBalance;
  // beneficiary of tokens after they are released
  mapping (address => uint256) public beneficiaryMap;
  // timestamp when token release is enabled
  uint256 public releaseTime;

  function TokenTimelock(ERC20Basic _token, uint256 _releaseTime) public {
    require(_releaseTime > now);
    token = _token;
    releaseTime = _releaseTime;
  }

  function isAvailable() public view returns (bool){
    if(now >= releaseTime){
      return true;
    } else { 
      return false; 
    }
  }

  /**
     * @param _beneficiary address to lock tokens
     * @param _amount number of tokens
     */
  function depositTokens(address _beneficiary, uint256 _amount)
      public
      onlyOwner
  {
      // Confirm tokens transfered
      require(tokenBalance.add(_amount) == token.balanceOf(this));
      tokenBalance = tokenBalance.add(_amount);

      // Increment total tokens owed.
      beneficiaryMap[_beneficiary] = beneficiaryMap[_beneficiary].add(_amount);
  }

  /**
   * @notice Transfers tokens held by timelock to beneficiary.
   */
  function release() public {
    require(now >= releaseTime);

    // Get tokens owed, then set to 0 before proceeding.
    uint256 amount = beneficiaryMap[msg.sender];
    beneficiaryMap[msg.sender] = 0;

    // Proceed only of there are tokens to send.
    require(amount > 0 && token.balanceOf(this) > 0);

    token.safeTransfer(msg.sender, amount);
  }
}

    Contract ABI  
[{"constant":false,"inputs":[],"name":"claimOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"},{"name":"_amount","type":"uint256"}],"name":"depositTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isAvailable","outputs":[{"name":"","type":"bool"}],"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":"tokenBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"releaseTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"beneficiaryMap","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_releaseTime","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b604051604080610c0183398101604052808051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550428111151561008257600080fd5b81600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806005819055505050610b26806100db6000396000f3006060604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680634e71e0c8146100b457806366168bd7146100c9578063856c71dd1461010b57806386d1a69f146101385780638da5cb5b1461014d5780639e1a4d19146101a2578063b91d4001146101cb578063c6cac4f6146101f4578063e30c397814610241578063f2fde38b14610296578063fc0c546a146102cf575b600080fd5b34156100bf57600080fd5b6100c7610324565b005b34156100d457600080fd5b610109600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104c3565b005b341561011657600080fd5b61011e6106d3565b604051808215151515815260200191505060405180910390f35b341561014357600080fd5b61014b6106f1565b005b341561015857600080fd5b6101606108d5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101ad57600080fd5b6101b56108fa565b6040518082815260200191505060405180910390f35b34156101d657600080fd5b6101de610900565b6040518082815260200191505060405180910390f35b34156101ff57600080fd5b61022b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610906565b6040518082815260200191505060405180910390f35b341561024c57600080fd5b61025461091e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102a157600080fd5b6102cd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610944565b005b34156102da57600080fd5b6102e26109e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561038057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561051e57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156105e357600080fd5b6102c65a03f115156105f457600080fd5b5050506040518051905061061382600354610a0990919063ffffffff16565b14151561061f57600080fd5b61063481600354610a0990919063ffffffff16565b60038190555061068c81600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610a0990919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6000600554421015156106e957600190506106ee565b600090505b90565b6000600554421015151561070457600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008111801561087a57506000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306000604051602001526040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561085d57600080fd5b6102c65a03f1151561086e57600080fd5b50505060405180519050115b151561088557600080fd5b6108d23382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610a279092919063ffffffff16565b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b60055481565b60046020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561099f57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808284019050838110151515610a1d57fe5b8091505092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836000604051602001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610ad257600080fd5b6102c65a03f11515610ae357600080fd5b505050604051805190501515610af557fe5b5050505600a165627a7a72305820b9f2e5f00f964bbb62f1588b210bce359514fa24ab85bf5d7c0333ea043aa3bc00290000000000000000000000008a4bc94944b2df58fc6d9cf108b8bd213df56972000000000000000000000000000000000000000000000000000000005aec96f4

   Swarm Source:
bzzr://b9f2e5f00f964bbb62f1588b210bce359514fa24ab85bf5d7c0333ea043aa3bc

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.