ETH Price: $2,710.17 (+2.46%)

Contract

0x29aB01C9696b4A0d56d35ABA750fE8A6250Db71f
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Release96011162020-03-03 23:14:141805 days ago1583277254IN
0x29aB01C9...6250Db71f
0 ETH0.00042297.50000029

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

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

Contract Name:
TokenVesting

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2019-05-20
*/

/* solium-disable security/no-block-members */

pragma solidity ^0.4.24;

/**
 * @title ERC20 interface
 * @dev see https://github.com/ethereum/EIPs/issues/20
 */
interface IERC20 {
  function totalSupply() external view returns (uint256);

  function balanceOf(address who) external view returns (uint256);

  function allowance(address owner, address spender)
    external view returns (uint256);

  function transfer(address to, uint256 value) external returns (bool);

  function approve(address spender, uint256 value)
    external returns (bool);

  function transferFrom(address from, address to, uint256 value)
    external returns (bool);

  event Transfer(
    address indexed from,
    address indexed to,
    uint256 value
  );

  event Approval(
    address indexed owner,
    address indexed spender,
    uint256 value
  );
}


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

  /**
  * @dev Multiplies two numbers, reverts on overflow.
  */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b);

    return c;
  }

  /**
  * @dev Integer division of two numbers truncating the quotient, reverts on division by zero.
  */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b > 0); // Solidity only automatically asserts 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, reverts on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a);
    uint256 c = a - b;

    return c;
  }

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

    return c;
  }

  /**
  * @dev Divides two numbers and returns the remainder (unsigned integer modulo),
  * reverts when dividing by zero.
  */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0);
    return a % b;
  }
}


/**
 * @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 {

  using SafeMath for uint256;

  function safeTransfer(
    IERC20 token,
    address to,
    uint256 value
  )
    internal
  {
    require(token.transfer(to, value));
  }

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

  function safeApprove(
    IERC20 token,
    address spender,
    uint256 value
  )
    internal
  {
    // safeApprove should only be called when setting an initial allowance, 
    // or when resetting it to zero. To increase and decrease it, use 
    // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
    require((value == 0) || (token.allowance(msg.sender, spender) == 0));
    require(token.approve(spender, value));
  }

  function safeIncreaseAllowance(
    IERC20 token,
    address spender,
    uint256 value
  )
    internal
  {
    uint256 newAllowance = token.allowance(address(this), spender).add(value);
    require(token.approve(spender, newAllowance));
  }

  function safeDecreaseAllowance(
    IERC20 token,
    address spender,
    uint256 value
  )
    internal
  {
    uint256 newAllowance = token.allowance(address(this), spender).sub(value);
    require(token.approve(spender, newAllowance));
  }
}

/**
 * @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 private _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() internal {
    _owner = msg.sender;
    emit OwnershipTransferred(address(0), _owner);
  }

  /**
   * @return the address of the owner.
   */
  function owner() public view returns(address) {
    return _owner;
  }

  /**
   * @dev Throws if called by any account other than the owner.
   */
  modifier onlyOwner() {
    require(isOwner());
    _;
  }

  /**
   * @return true if `msg.sender` is the owner of the contract.
   */
  function isOwner() public view returns(bool) {
    return msg.sender == _owner;
  }

  /**
   * @dev Allows the current owner to relinquish control of the contract.
   * @notice Renouncing to ownership will leave the contract without an owner.
   * It will not be possible to call the functions with the `onlyOwner`
   * modifier anymore.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipTransferred(_owner, address(0));
    _owner = address(0);
  }

  /**
   * @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 {
    _transferOwnership(newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address newOwner) internal {
    require(newOwner != address(0));
    emit OwnershipTransferred(_owner, newOwner);
    _owner = newOwner;
  }
}

/**
 * @title TokenVesting
 * @dev A token holder contract that can release its token balance gradually like a
 * typical vesting scheme, with a cliff and vesting period.
 *
 * Note you do not want to transfer tokens you have withdrawn back to this contract. This will
 * result in some fraction of your transferred tokens being locked up again.
 *
 * Code taken from OpenZeppelin/openzeppelin-solidity at commit 4115686b4f8c1abf29f1f855eb15308076159959.
 * (Revocation options removed by Reserve.)
 */
contract TokenVesting is Ownable {
  using SafeMath for uint256;
  using SafeERC20 for IERC20;

  event TokensReleased(address token, uint256 amount);

  // beneficiary of tokens after they are released
  address private _beneficiary;

  uint256 private _cliff;
  uint256 private _start;
  uint256 private _duration;

  mapping (address => uint256) private _released;
  /**
   * @dev Creates a vesting contract that vests its balance of any ERC20 token to the
   * beneficiary, gradually in a linear fashion until start + duration. By then all
   * of the balance will have vested.
   * @param beneficiary address of the beneficiary to whom vested tokens are transferred
   * @param cliffDuration duration in seconds of the cliff in which tokens will begin to vest
   * @param start the time (as Unix time) at which point vesting starts
   * @param duration duration in seconds of the period in which the tokens will vest
   */
  constructor(
    address beneficiary,
    uint256 start,
    uint256 cliffDuration,
    uint256 duration
  )
    public
  {
    require(beneficiary != address(0));
    require(cliffDuration <= duration);
    require(duration > 0);
    require(start.add(duration) > block.timestamp);

    _beneficiary = beneficiary;
    _duration = duration;
    _cliff = start.add(cliffDuration);
    _start = start;
  }

  /**
   * @return the beneficiary of the tokens.
   */
  function beneficiary() public view returns(address) {
    return _beneficiary;
  }

  /**
   * @return the cliff time of the token vesting.
   */
  function cliff() public view returns(uint256) {
    return _cliff;
  }

  /**
   * @return the start time of the token vesting.
   */
  function start() public view returns(uint256) {
    return _start;
  }

  /**
   * @return the duration of the token vesting.
   */
  function duration() public view returns(uint256) {
    return _duration;
  }

  /**
   * @return the amount of the token released.
   */
  function released(address token) public view returns(uint256) {
    return _released[token];
  }

  /**
   * @return the amount of token that can be released at the current block timestamp.
   */
  function releasable(address token) public view returns(uint256) {
    return _releasableAmount(IERC20(token));
  }

  /**
   * @notice Transfers vested tokens to beneficiary.
   * @param token ERC20 token which is being vested
   */
  function release(IERC20 token) public {
    uint256 unreleased = _releasableAmount(token);

    require(unreleased > 0);

    _released[token] = _released[token].add(unreleased);

    token.safeTransfer(_beneficiary, unreleased);

    emit TokensReleased(token, unreleased);
  }

  /**
   * @dev Calculates the amount that has already vested but hasn't been released yet.
   * @param token ERC20 token which is being vested
   */
  function _releasableAmount(IERC20 token) private view returns (uint256) {
    return _vestedAmount(token).sub(_released[token]);
  }

  /**
   * @dev Calculates the amount that has already vested.
   * @param token ERC20 token which is being vested
   */
  function _vestedAmount(IERC20 token) private view returns (uint256) {
    uint256 currentBalance = token.balanceOf(this);
    uint256 totalBalance = currentBalance.add(_released[token]);

    if (block.timestamp < _cliff) {
      return 0;
    } else if (block.timestamp >= _start.add(_duration)) {
      return totalBalance;
    } else {
      return totalBalance.mul(block.timestamp.sub(_start)).div(_duration);
    }
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"duration","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"cliff","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"release","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","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":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"released","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"token","type":"address"}],"name":"releasable","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"start","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"beneficiary","type":"address"},{"name":"start","type":"uint256"},{"name":"cliffDuration","type":"uint256"},{"name":"duration","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"token","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"TokensReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

Deployed Bytecode

0x6080604052600436106100ae5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630fb5a6b481146100b357806313d033c0146100da57806319165587146100ef57806338af3eed1461011f578063715018a61461015d5780638da5cb5b146101725780638f32d59b146101875780639852595c146101b0578063a3f8eace146101de578063be9a65551461020c578063f2fde38b14610221575b600080fd5b3480156100bf57600080fd5b506100c861024f565b60408051918252519081900360200190f35b3480156100e657600080fd5b506100c8610255565b3480156100fb57600080fd5b5061011d73ffffffffffffffffffffffffffffffffffffffff6004351661025b565b005b34801561012b57600080fd5b5061013461033f565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561016957600080fd5b5061011d61035b565b34801561017e57600080fd5b506101346103dd565b34801561019357600080fd5b5061019c6103f9565b604080519115158252519081900360200190f35b3480156101bc57600080fd5b506100c873ffffffffffffffffffffffffffffffffffffffff60043516610417565b3480156101ea57600080fd5b506100c873ffffffffffffffffffffffffffffffffffffffff6004351661043f565b34801561021857600080fd5b506100c8610450565b34801561022d57600080fd5b5061011d73ffffffffffffffffffffffffffffffffffffffff60043516610456565b60045490565b60025490565b600061026682610475565b90506000811161027557600080fd5b73ffffffffffffffffffffffffffffffffffffffff82166000908152600560205260409020546102ab908263ffffffff6104b416565b73ffffffffffffffffffffffffffffffffffffffff8084166000818152600560205260409020929092556001546102ea9291168363ffffffff6104d116565b6040805173ffffffffffffffffffffffffffffffffffffffff841681526020810183905281517fc7798891864187665ac6dd119286e44ec13f014527aeeb2b8eb3fd413df93179929181900390910190a15050565b60015473ffffffffffffffffffffffffffffffffffffffff1690565b6103636103f9565b151561036e57600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b60005473ffffffffffffffffffffffffffffffffffffffff1690565b60005473ffffffffffffffffffffffffffffffffffffffff16331490565b73ffffffffffffffffffffffffffffffffffffffff1660009081526005602052604090205490565b600061044a82610475565b92915050565b60035490565b61045e6103f9565b151561046957600080fd5b610472816105b0565b50565b73ffffffffffffffffffffffffffffffffffffffff811660009081526005602052604081205461044a906104a88461065f565b9063ffffffff6107de16565b6000828201838110156104c657600080fd5b8091505b5092915050565b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561057457600080fd5b505af1158015610588573d6000803e3d6000fd5b505050506040513d602081101561059e57600080fd5b505115156105ab57600080fd5b505050565b73ffffffffffffffffffffffffffffffffffffffff811615156105d257600080fd5b6000805460405173ffffffffffffffffffffffffffffffffffffffff808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60008060008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156106ff57600080fd5b505af1158015610713573d6000803e3d6000fd5b505050506040513d602081101561072957600080fd5b505173ffffffffffffffffffffffffffffffffffffffff851660009081526005602052604090205490925061076590839063ffffffff6104b416565b905060025442101561077a57600092506107d7565b60045460035461078f9163ffffffff6104b416565b421061079d578092506107d7565b6107d46004546107c86107bb600354426107de90919063ffffffff16565b849063ffffffff6107f516565b9063ffffffff61082316565b92505b5050919050565b600080838311156107ee57600080fd5b5050900390565b60008083151561080857600091506104ca565b5082820282848281151561081857fe5b04146104c657600080fd5b60008080831161083257600080fd5b828481151561083d57fe5b049493505050505600a165627a7a72305820095037c61597656ea2c7f72aeb0be83248b63fc1e654e1d5aaadcc86002ac2680029

Deployed Bytecode Sourcemap

6736:3622:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8614:78;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8614:78:0;;;;;;;;;;;;;;;;;;;;8330:72;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8330:72:0;;;;9208:288;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;9208:288:0;;;;;;;;;8175:84;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8175:84:0;;;;;;;;;;;;;;;;;;;;;;;5502:130;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5502:130:0;;;;4843:72;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4843:72:0;;;;5145:85;;8:9:-1;5:2;;;30:1;27;20:12;5:2;5145:85:0;;;;;;;;;;;;;;;;;;;;;;8760:98;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8760:98:0;;;;;;;8965:116;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;8965:116:0;;;;;;;8473:72;;8:9:-1;5:2;;;30:1;27;20:12;5:2;8473:72:0;;;;5799:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;5799:103:0;;;;;;;8614:78;8677:9;;8614:78;:::o;8330:72::-;8390:6;;8330:72;:::o;9208:288::-;9253:18;9274:24;9292:5;9274:17;:24::i;:::-;9253:45;-1:-1:-1;9328:1:0;9315:14;;9307:23;;;;;;9358:16;;;;;;;:9;:16;;;;;;:32;;9379:10;9358:32;:20;:32;:::i;:::-;9339:16;;;;;;;;:9;:16;;;;;:51;;;;9418:12;;9399:44;;9339:16;9418:12;9432:10;9399:44;:18;:44;:::i;:::-;9457:33;;;;;;;;;;;;;;;;;;;;;;;;;;;9208:288;;:::o;8175:84::-;8241:12;;;;8175:84;:::o;5502:130::-;5036:9;:7;:9::i;:::-;5028:18;;;;;;;;5597:1;5581:6;;5560:40;;;5581:6;;;;5560:40;;5597:1;;5560:40;5624:1;5607:19;;;;;;5502:130::o;4843:72::-;4880:7;4903:6;;;4843:72;:::o;5145:85::-;5184:4;5218:6;;;5204:10;:20;;5145:85::o;8760:98::-;8836:16;;8813:7;8836:16;;;:9;:16;;;;;;;8760:98::o;8965:116::-;9020:7;9043:32;9068:5;9043:17;:32::i;:::-;9036:39;8965:116;-1:-1:-1;;8965:116:0:o;8473:72::-;8533:6;;8473:72;:::o;5799:103::-;5036:9;:7;:9::i;:::-;5028:18;;;;;;;;5868:28;5887:8;5868:18;:28::i;:::-;5799:103;:::o;9656:134::-;9767:16;;;9719:7;9767:16;;;:9;:16;;;;;;9742:42;;:20;9777:5;9742:13;:20::i;:::-;:24;:42;:24;:42;:::i;2173:136::-;2231:7;2259:5;;;2279:6;;;;2271:15;;;;;;2302:1;2295:8;;2173:136;;;;;;:::o;2903:147::-;3018:5;:14;;;3033:2;3037:5;3018:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3018:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;3018:25:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3018:25:0;3010:34;;;;;;;;2903:147;;;:::o;6042:173::-;6112:22;;;;;6104:31;;;;;;6168:6;;;6147:38;;;;;;;6168:6;;;6147:38;;;6192:6;:17;;;;;;;;;;;;;;;6042:173::o;9921:434::-;9980:7;9996:22;10049:20;10021:5;:15;;;10037:4;10021:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;10021:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10021:21:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10021:21:0;10091:16;;;;;;;:9;10021:21;10091:16;;;;;10021:21;;-1:-1:-1;10072:36:0;;10021:21;;10072:36;:18;:36;:::i;:::-;10049:59;;10139:6;;10121:15;:24;10117:233;;;10163:1;10156:8;;;;10117:233;10212:9;;10201:6;;:21;;;:10;:21;:::i;:::-;10182:15;:40;10178:172;;10240:12;10233:19;;;;10178:172;10282:60;10332:9;;10282:45;10299:27;10319:6;;10299:15;:19;;:27;;;;:::i;:::-;10282:12;;:45;:16;:45;:::i;:::-;:49;:60;:49;:60;:::i;:::-;10275:67;;10178:172;9921:434;;;;;:::o;1969:136::-;2027:7;;2051:6;;;;2043:15;;;;;;-1:-1:-1;;2077:5:0;;;1969:136::o;1067:393::-;1125:7;;1353:6;;1349:37;;;1377:1;1370:8;;;;1349:37;-1:-1:-1;1406:5:0;;;1410:1;1406;:5;1426;;;;;;;;:10;1418:19;;;;;1575:276;1633:7;;1657:5;;;1649:14;;;;;;1744:1;1740;:5;;;;;;;;;1575:276;-1:-1:-1;;;;1575:276:0:o

Swarm Source

bzzr://095037c61597656ea2c7f72aeb0be83248b63fc1e654e1d5aaadcc86002ac268

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.