ETH Price: $2,347.87 (-1.60%)

Contract

0x0B97e04b413Da101B340dd9ED07e0b063e72bC75
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...57864742018-06-14 8:35:402303 days ago1528965340IN
0x0B97e04b...63e72bC75
0 ETH0.0004628715
Lock57864682018-06-14 8:34:362303 days ago1528965276IN
0x0B97e04b...63e72bC75
0 ETH0.0069692715
0x6080604057863892018-06-14 8:13:362303 days ago1528964016IN
 Create: Locker
0 ETH0.0226439715

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Locker

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-06-14
*/

pragma solidity ^0.4.24;


/**
 * @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 c) {
    // Gas optimization: this is cheaper than asserting '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;
    }

    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 a / b;
  }

  /**
  * @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 c) {
    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 OwnershipRenounced(address indexed previousOwner);
  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 relinquish control of the contract.
   */
  function renounceOwnership() public onlyOwner {
    emit OwnershipRenounced(owner);
    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 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 {
    require(token.transfer(to, value));
  }

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

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


/**
 * @title Locker
 * @notice Locker holds tokens and releases them at a certain time.
 */
contract Locker is Ownable {
  using SafeMath for uint;
  using SafeERC20 for ERC20Basic;

  /**
   * It is init state only when adding release info is possible.
   * beneficiary only can release tokens when Locker is active.
   * After all tokens are released, locker is drawn.
   */
  enum State { Init, Ready, Active, Drawn }

  struct Beneficiary {
    uint ratio;             // ratio based on Locker's initial balance.
    uint withdrawAmount;    // accumulated tokens beneficiary released
    bool releaseAllTokens;
  }

  /**
   * @notice Release has info to release tokens.
   * If lock type is straight, only two release infos is required.
   *
   *     |
   * 100 |                _______________
   *     |              _/
   *  50 |            _/
   *     |         . |
   *     |       .   |
   *     |     .     |
   *     +===+=======+----*----------> time
   *     Locker  First    Last
   *  Activated  Release  Release
   *
   *
   * If lock type is variable, the release graph will be
   *
   *     |
   * 100 |                                 _________
   *     |                                |
   *  70 |                      __________|
   *     |                     |
   *  30 |            _________|
   *     |           |
   *     +===+=======+---------+----------*------> time
   *     Locker   First        Second     Last
   *  Activated   Release      Release    Release
   *
   *
   *
   * For the first straight release graph, parameters would be
   *   coeff: 100
   *   releaseTimes: [
   *     first release time,
   *     second release time
   *   ]
   *   releaseRatios: [
   *     50,
   *     100,
   *   ]
   *
   * For the second variable release graph, parameters would be
   *   coeff: 100
   *   releaseTimes: [
   *     first release time,
   *     second release time,
   *     last release time
   *   ]
   *   releaseRatios: [
   *     30,
   *     70,
   *     100,
   *   ]
   *
   */
  struct Release {
    bool isStraight;        // lock type : straight or variable
    uint[] releaseTimes;    //
    uint[] releaseRatios;   //
  }

  uint public activeTime;

  // ERC20 basic token contract being held
  ERC20Basic public token;

  uint public coeff;
  uint public initialBalance;
  uint public withdrawAmount; // total amount of tokens released

  mapping (address => Beneficiary) public beneficiaries;
  mapping (address => Release) public releases;  // beneficiary's lock
  mapping (address => bool) public locked; // whether beneficiary's lock is instantiated

  uint public numBeneficiaries;
  uint public numLocks;

  State public state;

  modifier onlyState(State v) {
    require(state == v);
    _;
  }

  modifier onlyBeneficiary(address _addr) {
    require(beneficiaries[_addr].ratio > 0);
    _;
  }

  event StateChanged(State _state);
  event Locked(address indexed _beneficiary, bool _isStraight);
  event Released(address indexed _beneficiary, uint256 _amount);

  function Locker(address _token, uint _coeff, address[] _beneficiaries, uint[] _ratios) public {
    require(_token != address(0));
    require(_beneficiaries.length == _ratios.length);

    token = ERC20Basic(_token);
    coeff = _coeff;
    numBeneficiaries = _beneficiaries.length;

    uint accRatio;

    for(uint i = 0; i < numBeneficiaries; i++) {
      require(_ratios[i] > 0);
      beneficiaries[_beneficiaries[i]].ratio = _ratios[i];

      accRatio = accRatio.add(_ratios[i]);
    }

    require(coeff == accRatio);
  }

  /**
   * @notice beneficiary can release their tokens after activated
   */
  function activate() external onlyOwner onlyState(State.Ready) {
    require(numLocks == numBeneficiaries); // double check : assert all releases are recorded

    initialBalance = token.balanceOf(this);
    require(initialBalance > 0);

    activeTime = now; // solium-disable-line security/no-block-members

    // set locker as active state
    state = State.Active;
    emit StateChanged(state);
  }

  function getReleaseType(address _beneficiary)
    public
    view
    onlyBeneficiary(_beneficiary)
    returns (bool)
  {
    return releases[_beneficiary].isStraight;
  }

  function getTotalLockedAmounts(address _beneficiary)
    public
    view
    onlyBeneficiary(_beneficiary)
    returns (uint)
  {
    return getPartialAmount(beneficiaries[_beneficiary].ratio, coeff, initialBalance);
  }

  function getReleaseTimes(address _beneficiary)
    public
    view
    onlyBeneficiary(_beneficiary)
    returns (uint[])
  {
    return releases[_beneficiary].releaseTimes;
  }

  function getReleaseRatios(address _beneficiary)
    public
    view
    onlyBeneficiary(_beneficiary)
    returns (uint[])
  {
    return releases[_beneficiary].releaseRatios;
  }

  /**
   * @notice add new release record for beneficiary
   */
  function lock(address _beneficiary, bool _isStraight, uint[] _releaseTimes, uint[] _releaseRatios)
    external
    onlyOwner
    onlyState(State.Init)
    onlyBeneficiary(_beneficiary)
  {
    require(!locked[_beneficiary]);
    require(_releaseRatios.length != 0);
    require(_releaseRatios.length == _releaseTimes.length);

    uint i;
    uint len = _releaseRatios.length;

    // finally should release all tokens
    require(_releaseRatios[len - 1] == coeff);

    // check two array are ascending sorted
    for(i = 0; i < len - 1; i++) {
      require(_releaseTimes[i] < _releaseTimes[i + 1]);
      require(_releaseRatios[i] < _releaseRatios[i + 1]);
    }

    // 2 release times for straight locking type
    if (_isStraight) {
      require(len == 2);
    }

    numLocks = numLocks.add(1);

    // create Release for the beneficiary
    releases[_beneficiary].isStraight = _isStraight;

    // copy array of uint
    releases[_beneficiary].releaseTimes = _releaseTimes;
    releases[_beneficiary].releaseRatios = _releaseRatios;

    // lock beneficiary
    locked[_beneficiary] = true;
    emit Locked(_beneficiary, _isStraight);

    //  if all beneficiaries locked, change Locker state to change
    if (numLocks == numBeneficiaries) {
      state = State.Ready;
      emit StateChanged(state);
    }
  }

  /**
   * @notice transfer releasable tokens for beneficiary wrt the release graph
   */
  function release() external onlyState(State.Active) onlyBeneficiary(msg.sender) {
    require(!beneficiaries[msg.sender].releaseAllTokens);

    uint releasableAmount = getReleasableAmount(msg.sender);
    beneficiaries[msg.sender].withdrawAmount = beneficiaries[msg.sender].withdrawAmount.add(releasableAmount);

    beneficiaries[msg.sender].releaseAllTokens = beneficiaries[msg.sender].withdrawAmount == getPartialAmount(
      beneficiaries[msg.sender].ratio,
      coeff,
      initialBalance);

    withdrawAmount = withdrawAmount.add(releasableAmount);

    if (withdrawAmount == initialBalance) {
      state = State.Drawn;
      emit StateChanged(state);
    }

    token.transfer(msg.sender, releasableAmount);
    emit Released(msg.sender, releasableAmount);
  }

  function getReleasableAmount(address _beneficiary) internal view returns (uint) {
    if (releases[_beneficiary].isStraight) {
      return getStraightReleasableAmount(_beneficiary);
    } else {
      return getVariableReleasableAmount(_beneficiary);
    }
  }

  /**
   * @notice return releaseable amount for beneficiary in case of straight type of release
   */
  function getStraightReleasableAmount(address _beneficiary) internal view returns (uint releasableAmount) {
    Beneficiary memory _b = beneficiaries[_beneficiary];
    Release memory _r = releases[_beneficiary];

    // total amount of tokens beneficiary can release
    uint totalReleasableAmount = getTotalLockedAmounts(_beneficiary);

    uint firstTime = _r.releaseTimes[0];
    uint lastTime = _r.releaseTimes[1];

    // solium-disable security/no-block-members
    require(now >= firstTime); // pass if can release
    // solium-enable security/no-block-members

    if(now >= lastTime) { // inclusive to reduce calculation
      releasableAmount = totalReleasableAmount;
    } else {
      // releasable amount at first time
      uint firstAmount = getPartialAmount(
        _r.releaseRatios[0],
        coeff,
        totalReleasableAmount);

      // partial amount without first amount
      releasableAmount = getPartialAmount(
        now.sub(firstTime),
        lastTime.sub(firstTime),
        totalReleasableAmount.sub(firstAmount));
      releasableAmount = releasableAmount.add(firstAmount);
    }

    // subtract already withdrawn amounts
    releasableAmount = releasableAmount.sub(_b.withdrawAmount);
  }

  /**
   * @notice return releaseable amount for beneficiary in case of variable type of release
   */
  function getVariableReleasableAmount(address _beneficiary) internal view returns (uint releasableAmount) {
    Beneficiary memory _b = beneficiaries[_beneficiary];
    Release memory _r = releases[_beneficiary];

    // total amount of tokens beneficiary will receive
    uint totalReleasableAmount = getTotalLockedAmounts(_beneficiary);

    uint releaseRatio;

    // reverse order for short curcit
    for(uint i = _r.releaseTimes.length - 1; i >= 0; i--) {
      if (now >= _r.releaseTimes[i]) {
        releaseRatio = _r.releaseRatios[i];
        break;
      }
    }

    require(releaseRatio > 0);

    releasableAmount = getPartialAmount(
      releaseRatio,
      coeff,
      totalReleasableAmount);
    releasableAmount = releasableAmount.sub(_b.withdrawAmount);
  }

  /// https://github.com/0xProject/0x.js/blob/05aae368132a81ddb9fd6a04ac5b0ff1cbb24691/packages/contracts/src/current/protocol/Exchange/Exchange.sol#L497
  /// @notice Calculates partial value given a numerator and denominator.
  /// @param numerator Numerator.
  /// @param denominator Denominator.
  /// @param target Value to calculate partial of.
  /// @return Partial value of target.
  function getPartialAmount(uint numerator, uint denominator, uint target) public pure returns (uint) {
    return numerator.mul(target).div(denominator);
  }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"beneficiaries","outputs":[{"name":"ratio","type":"uint256"},{"name":"withdrawAmount","type":"uint256"},{"name":"releaseAllTokens","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"activate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initialBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"getReleaseRatios","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"withdrawAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"releases","outputs":[{"name":"isStraight","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_beneficiary","type":"address"},{"name":"_isStraight","type":"bool"},{"name":"_releaseTimes","type":"uint256[]"},{"name":"_releaseRatios","type":"uint256[]"}],"name":"lock","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"release","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"coeff","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"numerator","type":"uint256"},{"name":"denominator","type":"uint256"},{"name":"target","type":"uint256"}],"name":"getPartialAmount","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":true,"inputs":[],"name":"state","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"numBeneficiaries","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"activeTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"locked","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"numLocks","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"getReleaseTimes","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"getReleaseType","outputs":[{"name":"","type":"bool"}],"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"},{"constant":true,"inputs":[{"name":"_beneficiary","type":"address"}],"name":"getTotalLockedAmounts","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_token","type":"address"},{"name":"_coeff","type":"uint256"},{"name":"_beneficiaries","type":"address[]"},{"name":"_ratios","type":"uint256[]"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_state","type":"uint8"}],"name":"StateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_isStraight","type":"bool"}],"name":"Locked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_beneficiary","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"}],"name":"Released","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"}],"name":"OwnershipRenounced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]

60806040523480156200001157600080fd5b5060405162001521380380620015218339810160409081528151602083015191830151606084015160008054600160a060020a0319163317815592949182019291019080600160a060020a03861615156200006b57600080fd5b82518451146200007a57600080fd5b5060028054600160a060020a031916600160a060020a0387161790556003849055825160095560005b600954811015620001625760008382815181101515620000bf57fe5b6020908102909101015111620000d457600080fd5b8281815181101515620000e357fe5b906020019060200201516006600086848151811015156200010057fe5b6020908102909101810151600160a060020a0316825281019190915260400160002055825162000157908490839081106200013757fe5b60209081029091010151839064010000000062000d8c6200017d82021704565b9150600101620000a3565b60035482146200017157600080fd5b50505050505062000191565b818101828110156200018b57fe5b92915050565b61138080620001a16000396000f3006080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301567739811461012c5780630f15f4c01461016d57806318369a2a146101845780634a2d5b6b146101ab578063534844a21461021c57806355828c16146102315780635de4c6fc14610266578063715018a6146102a557806386d1a69f146102ba57806387b261ad146102cf5780638da5cb5b146102e457806398024a8b14610315578063c19d93fb14610333578063cb22d41b1461036c578063cb8c478a14610381578063cbf9fe5f14610396578063d422cf58146103b7578063d8018c42146103cc578063ec86e1d7146103ed578063f2fde38b1461040e578063fc0c546a1461042f578063ff42fd4114610444575b600080fd5b34801561013857600080fd5b5061014d600160a060020a0360043516610465565b604080519384526020840192909252151582820152519081900360600190f35b34801561017957600080fd5b50610182610489565b005b34801561019057600080fd5b506101996105d0565b60408051918252519081900360200190f35b3480156101b757600080fd5b506101cc600160a060020a03600435166105d6565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102085781810151838201526020016101f0565b505050509050019250505060405180910390f35b34801561022857600080fd5b5061019961066c565b34801561023d57600080fd5b50610252600160a060020a0360043516610672565b604080519115158252519081900360200190f35b34801561027257600080fd5b5061018260048035600160a060020a03169060248035151591604435808301929082013591606435918201910135610687565b3480156102b157600080fd5b50610182610923565b3480156102c657600080fd5b5061018261098f565b3480156102db57600080fd5b50610199610bba565b3480156102f057600080fd5b506102f9610bc0565b60408051600160a060020a039092168252519081900360200190f35b34801561032157600080fd5b50610199600435602435604435610bcf565b34801561033f57600080fd5b50610348610bf9565b6040518082600381111561035857fe5b60ff16815260200191505060405180910390f35b34801561037857600080fd5b50610199610c02565b34801561038d57600080fd5b50610199610c08565b3480156103a257600080fd5b50610252600160a060020a0360043516610c0e565b3480156103c357600080fd5b50610199610c23565b3480156103d857600080fd5b506101cc600160a060020a0360043516610c29565b3480156103f957600080fd5b50610252600160a060020a0360043516610cbd565b34801561041a57600080fd5b50610182600160a060020a0360043516610d03565b34801561043b57600080fd5b506102f9610d26565b34801561045057600080fd5b50610199600160a060020a0360043516610d35565b60066020526000908152604090208054600182015460029092015490919060ff1683565b600054600160a060020a031633146104a057600080fd5b600180600b5460ff1660038111156104b457fe5b146104be57600080fd5b600954600a54146104ce57600080fd5b600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b15801561053457600080fd5b505af1158015610548573d6000803e3d6000fd5b505050506040513d602081101561055e57600080fd5b5051600481905560001061057157600080fd5b42600155600b805460ff1916600217908190556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69160ff1690808260038111156105ba57fe5b60ff16815260200191505060405180910390a150565b60045481565b600160a060020a0381166000908152600660205260408120546060918391116105fe57600080fd5b600160a060020a0383166000908152600760209081526040918290206002018054835181840281018401909452808452909183018282801561065f57602002820191906000526020600020905b81548152602001906001019080831161064b575b5050505050915050919050565b60055481565b60076020526000908152604090205460ff1681565b600080548190600160a060020a031633146106a157600080fd5b600080600b5460ff1660038111156106b557fe5b146106bf57600080fd5b600160a060020a0389166000908152600660205260408120548a91106106e457600080fd5b600160a060020a038a1660009081526008602052604090205460ff161561070a57600080fd5b84151561071657600080fd5b84871461072257600080fd5b6003548593508684600019810181811061073857fe5b9050602002013514151561074b57600080fd5b600093505b600183038410156107d45787876001860181811061076a57fe5b90506020020135888886818110151561077f57fe5b9050602002013510151561079257600080fd5b8585600186018181106107a157fe5b9050602002013586868681811015156107b657fe5b905060200201351015156107c957600080fd5b600190930192610750565b88156107e757600283146107e757600080fd5b600a546107fb90600163ffffffff610d8c16565b600a55600160a060020a038a166000908152600760205260409020805460ff19168a15151781556108309060010189896112a4565b50600160a060020a038a1660009081526007602052604090206108579060020187876112a4565b50600160a060020a038a16600081815260086020908152604091829020805460ff1916600117905581518c1515815291517fcaf46096bdd957e9271a7e46a00ff61870b80644805049e7ea814162a2b606bc9281900390910190a2600954600a54141561091757600b805460ff1916600117908190556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69160ff16908082600381111561090357fe5b60ff16815260200191505060405180910390a15b50505050505050505050565b600054600160a060020a0316331461093a57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000600280600b5460ff1660038111156109a557fe5b146109af57600080fd5b33600081815260066020526040812054116109c957600080fd5b3360009081526006602052604090206002015460ff16156109e957600080fd5b6109f233610d9f565b33600090815260066020526040902060010154909350610a18908463ffffffff610d8c16565b336000908152600660205260409020600181019190915554600354600454610a41929190610bcf565b33600090815260066020526040902060018101546002909101805460ff191692909114919091179055600554610a7d908463ffffffff610d8c16565b60058190556004541415610ae657600b805460ff19166003908117918290556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69260ff169181908390811115610ad257fe5b60ff16815260200191505060405180910390a15b600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610b5357600080fd5b505af1158015610b67573d6000803e3d6000fd5b505050506040513d6020811015610b7d57600080fd5b505060408051848152905133917fb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e919081900360200190a2505050565b60035481565b600054600160a060020a031681565b6000610bf183610be5868563ffffffff610dde16565b9063ffffffff610e0716565b949350505050565b600b5460ff1681565b60095481565b60015481565b60086020526000908152604090205460ff1681565b600a5481565b600160a060020a038116600090815260066020526040812054606091839111610c5157600080fd5b600160a060020a0383166000908152600760209081526040918290206001018054835181840281018401909452808452909183018282801561065f576020028201919060005260206000209081548152602001906001019080831161064b575050505050915050919050565b600160a060020a03811660009081526006602052604081205482908210610ce357600080fd5b5050600160a060020a031660009081526007602052604090205460ff1690565b600054600160a060020a03163314610d1a57600080fd5b610d2381610e1c565b50565b600254600160a060020a031681565b600160a060020a03811660009081526006602052604081205482908210610d5b57600080fd5b600160a060020a038316600090815260066020526040902054600354600454610d85929190610bcf565b9392505050565b81810182811015610d9957fe5b92915050565b600160a060020a03811660009081526007602052604081205460ff1615610dd057610dc982610e99565b9050610dd9565b610dc9826110c2565b919050565b6000821515610def57506000610d99565b50818102818382811515610dff57fe5b0414610d9957fe5b60008183811515610e1457fe5b049392505050565b600160a060020a0381161515610e3157600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000610ea36112ef565b610eab611313565b600160a060020a0384166000818152600660209081526040808320815160608181018452825482526001808401548387015260029093015460ff9081161515838601529686526007855283862084519182018552805490971615158152918601805484518187028101870190955280855291985094958695869586959293858201939291830182828015610f5e57602002820191906000526020600020905b815481526020019060010190808311610f4a575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191906000526020600020905b815481526020019060010190808311610fa2575b5050505050815250509450610fca88610d35565b935084602001516000815181101515610fdf57fe5b90602001906020020151925084602001516001815181101515610ffe57fe5b90602001906020020151915082421015151561101957600080fd5b428211611028578396506110a0565b6110518560400151600081518110151561103e57fe5b9060200190602002015160035486610bcf565b905061108b611066428563ffffffff61129216565b611076848663ffffffff61129216565b611086878563ffffffff61129216565b610bcf565b965061109d878263ffffffff610d8c16565b96505b60208601516110b690889063ffffffff61129216565b98975050505050505050565b60006110cc6112ef565b6110d4611313565b600160a060020a0384166000818152600660209081526040808320815160608181018452825482526001808401548387015260029093015460ff9081161515838601529686526007855283862084519182018552805490971615158152918601805484518187028101870190955280855291985094958695869593949193858101939083018282801561118657602002820191906000526020600020905b815481526020019060010190808311611172575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156111de57602002820191906000526020600020905b8154815260200190600101908083116111ca575b50505050508152505093506111f287610d35565b925060018460200151510390505b6000811061125457602084015180518290811061121957fe5b60209081029091010151421061124b57604084015180518290811061123a57fe5b906020019060200201519150611254565b60001901611200565b6000821161126157600080fd5b61126e8260035485610bcf565b955061128785602001518761129290919063ffffffff16565b979650505050505050565b60008282111561129e57fe5b50900390565b8280548282559060005260206000209081019282156112df579160200282015b828111156112df5782358255916020019190600101906112c4565b506112eb929150611337565b5090565b60606040519081016040528060008152602001600081526020016000151581525090565b60606040519081016040528060001515815260200160608152602001606081525090565b61135191905b808211156112eb576000815560010161133d565b905600a165627a7a7230582054926738d4e606d8f634c7939f82c8354001ee206fc3631a293c1a4dc102e4b10029000000000000000000000000454b9f249bc1492ee995793bbc3e57b830f1a5e900000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003221d1f77e05500c5dcaa3fc89ee4acee409fd0c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8

Deployed Bytecode

0x6080604052600436106101275763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166301567739811461012c5780630f15f4c01461016d57806318369a2a146101845780634a2d5b6b146101ab578063534844a21461021c57806355828c16146102315780635de4c6fc14610266578063715018a6146102a557806386d1a69f146102ba57806387b261ad146102cf5780638da5cb5b146102e457806398024a8b14610315578063c19d93fb14610333578063cb22d41b1461036c578063cb8c478a14610381578063cbf9fe5f14610396578063d422cf58146103b7578063d8018c42146103cc578063ec86e1d7146103ed578063f2fde38b1461040e578063fc0c546a1461042f578063ff42fd4114610444575b600080fd5b34801561013857600080fd5b5061014d600160a060020a0360043516610465565b604080519384526020840192909252151582820152519081900360600190f35b34801561017957600080fd5b50610182610489565b005b34801561019057600080fd5b506101996105d0565b60408051918252519081900360200190f35b3480156101b757600080fd5b506101cc600160a060020a03600435166105d6565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102085781810151838201526020016101f0565b505050509050019250505060405180910390f35b34801561022857600080fd5b5061019961066c565b34801561023d57600080fd5b50610252600160a060020a0360043516610672565b604080519115158252519081900360200190f35b34801561027257600080fd5b5061018260048035600160a060020a03169060248035151591604435808301929082013591606435918201910135610687565b3480156102b157600080fd5b50610182610923565b3480156102c657600080fd5b5061018261098f565b3480156102db57600080fd5b50610199610bba565b3480156102f057600080fd5b506102f9610bc0565b60408051600160a060020a039092168252519081900360200190f35b34801561032157600080fd5b50610199600435602435604435610bcf565b34801561033f57600080fd5b50610348610bf9565b6040518082600381111561035857fe5b60ff16815260200191505060405180910390f35b34801561037857600080fd5b50610199610c02565b34801561038d57600080fd5b50610199610c08565b3480156103a257600080fd5b50610252600160a060020a0360043516610c0e565b3480156103c357600080fd5b50610199610c23565b3480156103d857600080fd5b506101cc600160a060020a0360043516610c29565b3480156103f957600080fd5b50610252600160a060020a0360043516610cbd565b34801561041a57600080fd5b50610182600160a060020a0360043516610d03565b34801561043b57600080fd5b506102f9610d26565b34801561045057600080fd5b50610199600160a060020a0360043516610d35565b60066020526000908152604090208054600182015460029092015490919060ff1683565b600054600160a060020a031633146104a057600080fd5b600180600b5460ff1660038111156104b457fe5b146104be57600080fd5b600954600a54146104ce57600080fd5b600254604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a03909216916370a08231916024808201926020929091908290030181600087803b15801561053457600080fd5b505af1158015610548573d6000803e3d6000fd5b505050506040513d602081101561055e57600080fd5b5051600481905560001061057157600080fd5b42600155600b805460ff1916600217908190556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69160ff1690808260038111156105ba57fe5b60ff16815260200191505060405180910390a150565b60045481565b600160a060020a0381166000908152600660205260408120546060918391116105fe57600080fd5b600160a060020a0383166000908152600760209081526040918290206002018054835181840281018401909452808452909183018282801561065f57602002820191906000526020600020905b81548152602001906001019080831161064b575b5050505050915050919050565b60055481565b60076020526000908152604090205460ff1681565b600080548190600160a060020a031633146106a157600080fd5b600080600b5460ff1660038111156106b557fe5b146106bf57600080fd5b600160a060020a0389166000908152600660205260408120548a91106106e457600080fd5b600160a060020a038a1660009081526008602052604090205460ff161561070a57600080fd5b84151561071657600080fd5b84871461072257600080fd5b6003548593508684600019810181811061073857fe5b9050602002013514151561074b57600080fd5b600093505b600183038410156107d45787876001860181811061076a57fe5b90506020020135888886818110151561077f57fe5b9050602002013510151561079257600080fd5b8585600186018181106107a157fe5b9050602002013586868681811015156107b657fe5b905060200201351015156107c957600080fd5b600190930192610750565b88156107e757600283146107e757600080fd5b600a546107fb90600163ffffffff610d8c16565b600a55600160a060020a038a166000908152600760205260409020805460ff19168a15151781556108309060010189896112a4565b50600160a060020a038a1660009081526007602052604090206108579060020187876112a4565b50600160a060020a038a16600081815260086020908152604091829020805460ff1916600117905581518c1515815291517fcaf46096bdd957e9271a7e46a00ff61870b80644805049e7ea814162a2b606bc9281900390910190a2600954600a54141561091757600b805460ff1916600117908190556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69160ff16908082600381111561090357fe5b60ff16815260200191505060405180910390a15b50505050505050505050565b600054600160a060020a0316331461093a57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000600280600b5460ff1660038111156109a557fe5b146109af57600080fd5b33600081815260066020526040812054116109c957600080fd5b3360009081526006602052604090206002015460ff16156109e957600080fd5b6109f233610d9f565b33600090815260066020526040902060010154909350610a18908463ffffffff610d8c16565b336000908152600660205260409020600181019190915554600354600454610a41929190610bcf565b33600090815260066020526040902060018101546002909101805460ff191692909114919091179055600554610a7d908463ffffffff610d8c16565b60058190556004541415610ae657600b805460ff19166003908117918290556040517f551dc40198cc79684bb69e4931dba4ac16e4598792ee1c0a5000aeea366d7bb69260ff169181908390811115610ad257fe5b60ff16815260200191505060405180910390a15b600254604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018690529051600160a060020a039092169163a9059cbb916044808201926020929091908290030181600087803b158015610b5357600080fd5b505af1158015610b67573d6000803e3d6000fd5b505050506040513d6020811015610b7d57600080fd5b505060408051848152905133917fb21fb52d5749b80f3182f8c6992236b5e5576681880914484d7f4c9b062e619e919081900360200190a2505050565b60035481565b600054600160a060020a031681565b6000610bf183610be5868563ffffffff610dde16565b9063ffffffff610e0716565b949350505050565b600b5460ff1681565b60095481565b60015481565b60086020526000908152604090205460ff1681565b600a5481565b600160a060020a038116600090815260066020526040812054606091839111610c5157600080fd5b600160a060020a0383166000908152600760209081526040918290206001018054835181840281018401909452808452909183018282801561065f576020028201919060005260206000209081548152602001906001019080831161064b575050505050915050919050565b600160a060020a03811660009081526006602052604081205482908210610ce357600080fd5b5050600160a060020a031660009081526007602052604090205460ff1690565b600054600160a060020a03163314610d1a57600080fd5b610d2381610e1c565b50565b600254600160a060020a031681565b600160a060020a03811660009081526006602052604081205482908210610d5b57600080fd5b600160a060020a038316600090815260066020526040902054600354600454610d85929190610bcf565b9392505050565b81810182811015610d9957fe5b92915050565b600160a060020a03811660009081526007602052604081205460ff1615610dd057610dc982610e99565b9050610dd9565b610dc9826110c2565b919050565b6000821515610def57506000610d99565b50818102818382811515610dff57fe5b0414610d9957fe5b60008183811515610e1457fe5b049392505050565b600160a060020a0381161515610e3157600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000610ea36112ef565b610eab611313565b600160a060020a0384166000818152600660209081526040808320815160608181018452825482526001808401548387015260029093015460ff9081161515838601529686526007855283862084519182018552805490971615158152918601805484518187028101870190955280855291985094958695869586959293858201939291830182828015610f5e57602002820191906000526020600020905b815481526020019060010190808311610f4a575b5050505050815260200160028201805480602002602001604051908101604052809291908181526020018280548015610fb657602002820191906000526020600020905b815481526020019060010190808311610fa2575b5050505050815250509450610fca88610d35565b935084602001516000815181101515610fdf57fe5b90602001906020020151925084602001516001815181101515610ffe57fe5b90602001906020020151915082421015151561101957600080fd5b428211611028578396506110a0565b6110518560400151600081518110151561103e57fe5b9060200190602002015160035486610bcf565b905061108b611066428563ffffffff61129216565b611076848663ffffffff61129216565b611086878563ffffffff61129216565b610bcf565b965061109d878263ffffffff610d8c16565b96505b60208601516110b690889063ffffffff61129216565b98975050505050505050565b60006110cc6112ef565b6110d4611313565b600160a060020a0384166000818152600660209081526040808320815160608181018452825482526001808401548387015260029093015460ff9081161515838601529686526007855283862084519182018552805490971615158152918601805484518187028101870190955280855291985094958695869593949193858101939083018282801561118657602002820191906000526020600020905b815481526020019060010190808311611172575b50505050508152602001600282018054806020026020016040519081016040528092919081815260200182805480156111de57602002820191906000526020600020905b8154815260200190600101908083116111ca575b50505050508152505093506111f287610d35565b925060018460200151510390505b6000811061125457602084015180518290811061121957fe5b60209081029091010151421061124b57604084015180518290811061123a57fe5b906020019060200201519150611254565b60001901611200565b6000821161126157600080fd5b61126e8260035485610bcf565b955061128785602001518761129290919063ffffffff16565b979650505050505050565b60008282111561129e57fe5b50900390565b8280548282559060005260206000209081019282156112df579160200282015b828111156112df5782358255916020019190600101906112c4565b506112eb929150611337565b5090565b60606040519081016040528060008152602001600081526020016000151581525090565b60606040519081016040528060001515815260200160608152602001606081525090565b61135191905b808211156112eb576000815560010161133d565b905600a165627a7a7230582054926738d4e606d8f634c7939f82c8354001ee206fc3631a293c1a4dc102e4b10029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000454b9f249bc1492ee995793bbc3e57b830f1a5e900000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003221d1f77e05500c5dcaa3fc89ee4acee409fd0c000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000003e8

-----Decoded View---------------
Arg [0] : _token (address): 0x454B9f249bC1492eE995793Bbc3e57b830F1A5e9
Arg [1] : _coeff (uint256): 1000
Arg [2] : _beneficiaries (address[]): 0x3221D1F77e05500C5DCAA3Fc89EE4AcEE409Fd0c
Arg [3] : _ratios (uint256[]): 1000

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000454b9f249bc1492ee995793bbc3e57b830f1a5e9
Arg [1] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 0000000000000000000000003221d1f77e05500c5dcaa3fc89ee4acee409fd0c
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [7] : 00000000000000000000000000000000000000000000000000000000000003e8


Swarm Source

bzzr://54926738d4e606d8f634c7939f82c8354001ee206fc3631a293c1a4dc102e4b1

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.