Contract 0x167dfcb36d755932065928dfafcfa60c1ce264e7

 

TxHash Block Age From To Value [TxFee]
0x3017013ecbbef33db6c6719f004774b5a48cbf88ae1cb372888879593313e6d772256652 hrs 16 mins ago0x05fa33ee9b7de85addc19670db42c533ce304359  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001235485
0x41e6aad94a94b21a961e9551ce22d257c09dfcd997e2bea9a0317271dd842fb472252094 hrs 58 mins ago0xf661faf3853d5cb23be27a69ba7e35a9e13e7773  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001482582
0xe03d55bdd291840f37a21f4b12904d679d73f7d2bfa9e7a81e0595c7db3dcabc72250276 hrs 1 min ago0xcdb0759d59ff8b78d613f55e5d550ab310696de0  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001624679
0xe0ab0d43ecad33868f376294ffb458ff6f068f1f26c9300451b6e420affc2a1c72248287 hrs 8 mins ago0x8033562521fedecdcc05487303522375597f9094  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.002493873
0xdb7d871c5cb79cc6e4992408983b459c90a0f4917c3b7eaad4cb52fc9272798472246738 hrs 2 mins ago0xcdb0759d59ff8b78d613f55e5d550ab310696de0  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.002358873
0x7b8c83da3c59a70f87a43c5dce53f5eb002f15399db67147f17e6f363b7954ee72218571 day 5 mins ago0x3307aee22ca33c6925e3e703c2429f5bd9c1c364  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001856776
0x03dace394c677250627aedeb884b707ac39f88e6bb87aef22b58d676321ba2e072218361 day 17 mins ago0x3307aee22ca33c6925e3e703c2429f5bd9c1c364  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.0004778325
0x0f10d397354497cdcca8ab05e0c91612d581c5e2a98664c21b6141412c832b1372209171 day 5 hrs ago0x3651fd34cf6dab1327ed87eedc11bb5096d08f01  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.0003504105
0x3d22054602e8c940970e1415125df8379124fb9fa67d3862c275401a7cab8ab672202761 day 9 hrs ago0xf0da92cca34e00fb8125ce6976946d85a6f01af2  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.002223873
0x15eda1374e46dc3e7cbb3f64af14f90fa163e6dff46228f9bc056181d48dadae72196131 day 13 hrs ago0xd8f227a219d166a40f78fe3f4bc7bc8add843aa1  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.002096776
0x5c8132404cecbebd4c83c74a49eb0256506006d4b71aa3b4d38e6512b7ed6c6772191271 day 15 hrs ago0xd19b8880293ce6a245e7940d248bb0054b771307  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00247097
0x2d4342f8c02eb1a5171d6f8c293a02ca641b5a6f4d824538d2fded165fec4f5a72191211 day 15 hrs ago0xd19b8880293ce6a245e7940d248bb0054b771307  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00063711
0xfdab630704fed389baf66b6cd61cce9df1b4a5c6cf9f5fee48210f5a88d3405b72184261 day 20 hrs ago0x326ca9346f92a77650a4c4201a499b9a53441c23  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001976776
0x5a8c7ff1827f4f403166cc96ceb6d7d93881796349b1ff95c3ca536a702bb31b72173732 days 2 hrs ago0x6b85111510e4f62d92fe9203394b9214204969fd  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00049445
0x96cd7d20e292a83ed0c61b17804055140485b5cddd811449e7763bac41c0b11872173332 days 2 hrs ago0x6b85111510e4f62d92fe9203394b9214204969fd  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.000127422
0xf96e41ac51aab47b149ba1c63b72b0364a291ad0e2b9b5322f4486164119dfe672173332 days 2 hrs ago0x6b85111510e4f62d92fe9203394b9214204969fd  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.000127422
0xd701da72533c1c85229fd80bc91328489b9060c585a4f02b8208a27075d8074372172572 days 2 hrs ago0xb1fc19c413f56c387fa6d9a1f15eb7867fa34e1c  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.000318555
0xc3fc1e7edf4d27308382eb68e451f0416088c0e8710c3fd6069c2460f8bca29872166062 days 6 hrs ago0xfabcb5d2672f75765700dca5ccdce9142e04a636  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001160485
0x78c75540d8b7f01879394ddcfd7bf22ee2bf4cd30372def177e744195c7b10d672165682 days 6 hrs ago0xf0da92cca34e00fb8125ce6976946d85a6f01af2  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001834679
0xcdf1330f39e4fffce8343d76a24dcbf25d6d3eb629a7fff1a699532d8558d85a72161612 days 9 hrs ago0x712393ffbe61ee7683f9836d96baf8eafc26b8c0  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00247033
0xd21f27eb95133580061ea727c354c4d0918b2ab8ee2e17fbc1cd1b75024c0f4072160662 days 9 hrs ago0x712393ffbe61ee7683f9836d96baf8eafc26b8c0  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00277097
0xaac3a5417058440186226d1fb3bed2e988ff26161ef0f59de87a6d5e3ce6b9af72156372 days 12 hrs ago0x9deae281b0c3075559759955d5797dfbc5f833e3  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.001310485
0x76c4a252eae08516122c8da128a7e1ddabee63d2e3bd5ca1b327ea6c4192390272151932 days 14 hrs ago0x815464a3eae828958116f69a470ab9f057c5438d  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.00232097
0x06821a125e2b6f72751a0e62ecb06aeafca501a5aa29cd50a27baff81764c0dc72140322 days 21 hrs ago0xcda6c64abf958cbf49e34343ab4da3302c5528bd  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.000509688
0x175c16a10c365aa73756d9acd65f8bb8ebeede8e5e790a99faec75a60343017772138192 days 22 hrs ago0x38fcea7742fa0eef6938780c1edcf9b322dcc801  IN   0x167dfcb36d755932065928dfafcfa60c1ce264e70 Ether0.002096776
[ Download CSV Export 

Internal Transactions as a result of Contract Execution

Parent TxHash Block Age From To Value
Warning: The compiled contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) Solidity Compiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: GrowHops
Compiler Version: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimizer):  200


Contract Source Code
pragma solidity ^0.4.24;

// File: node_modules/openzeppelin-solidity/contracts/access/Roles.sol

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
  struct Role {
    mapping (address => bool) bearer;
  }

  /**
   * @dev give an account access to this role
   */
  function add(Role storage role, address account) internal {
    require(account != address(0));
    require(!has(role, account));

    role.bearer[account] = true;
  }

  /**
   * @dev remove an account's access to this role
   */
  function remove(Role storage role, address account) internal {
    require(account != address(0));
    require(has(role, account));

    role.bearer[account] = false;
  }

  /**
   * @dev check if an account has this role
   * @return bool
   */
  function has(Role storage role, address account)
    internal
    view
    returns (bool)
  {
    require(account != address(0));
    return role.bearer[account];
  }
}

// File: node_modules/openzeppelin-solidity/contracts/access/roles/PauserRole.sol

contract PauserRole {
  using Roles for Roles.Role;

  event PauserAdded(address indexed account);
  event PauserRemoved(address indexed account);

  Roles.Role private pausers;

  constructor() internal {
    _addPauser(msg.sender);
  }

  modifier onlyPauser() {
    require(isPauser(msg.sender));
    _;
  }

  function isPauser(address account) public view returns (bool) {
    return pausers.has(account);
  }

  function addPauser(address account) public onlyPauser {
    _addPauser(account);
  }

  function renouncePauser() public {
    _removePauser(msg.sender);
  }

  function _addPauser(address account) internal {
    pausers.add(account);
    emit PauserAdded(account);
  }

  function _removePauser(address account) internal {
    pausers.remove(account);
    emit PauserRemoved(account);
  }
}

// File: node_modules/openzeppelin-solidity/contracts/lifecycle/Pausable.sol

/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is PauserRole {
  event Paused(address account);
  event Unpaused(address account);

  bool private _paused;

  constructor() internal {
    _paused = false;
  }

  /**
   * @return true if the contract is paused, false otherwise.
   */
  function paused() public view returns(bool) {
    return _paused;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!_paused);
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(_paused);
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() public onlyPauser whenNotPaused {
    _paused = true;
    emit Paused(msg.sender);
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() public onlyPauser whenPaused {
    _paused = false;
    emit Unpaused(msg.sender);
  }
}

// File: node_modules/openzeppelin-solidity/contracts/ownership/Ownable.sol

/**
 * @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;
  }
}

// File: contracts/IGrowHops.sol

interface IGrowHops {

  function addPlanBase(uint256 minimumAmount, uint256 lockTime, uint32 lessToHops) external;

  function togglePlanBase(bytes32 planBaseId, bool isOpen) external;

  function growHops(bytes32 planBaseId, uint256 lessAmount) external;

  function updateHopsAddress(address _address) external;

  function updatelessAddress(address _address) external;

  function withdraw(bytes32 planId) external;

  function checkPlanBase(bytes32 planBaseId)
    external view returns (uint256, uint256, uint32, bool);
  
  function checkPlanBaseIds() external view returns(bytes32[]);

  function checkPlanIdsByPlanBase(bytes32 planBaseId) external view returns(bytes32[]);

  function checkPlanIdsByUser(address user) external view returns(bytes32[]);

  function checkPlan(bytes32 planId)
    external view returns (bytes32, address, uint256, uint256, uint256, uint256, bool);

  /* Events */

  event PlanBaseEvt (
    bytes32 planBaseId,
    uint256 minimumAmount,
    uint256 lockTime,
    uint32 lessToHops,
    bool isOpen
  );

  event TogglePlanBaseEvt (
    bytes32 planBaseId,
    bool isOpen
  );

  event PlanEvt (
    bytes32 planId,
    bytes32 planBaseId,
    address plantuser,
    uint256 lessAmount,
    uint256 hopsAmount,
    uint256 lockAt,
    uint256 releaseAt,
    bool isWithdrawn
  );

  event WithdrawPlanEvt (
    bytes32 planId,
    address plantuser,
    uint256 lessAmount,
    bool isWithdrawn,
    uint256 withdrawAt
  );

}

// File: contracts/SafeMath.sol

/**
 * @title SafeMath
 */
library SafeMath {
  /**
  * @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 Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 a, uint256 b) 
      internal 
      pure 
      returns (uint256 c) 
  {
    if (a == 0) {
      return 0;
    }
    c = a * b;
    require(c / a == b, "SafeMath mul failed");
    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) 
  {
    require(b <= a, "SafeMath sub failed");
    return a - b;
  }

  /**
  * @dev Adds two numbers, throws on overflow.
  */
  function add(uint256 a, uint256 b)
      internal
      pure
      returns (uint256 c) 
  {
    c = a + b;
    require(c >= a, "SafeMath add failed");
    return c;
  }
  
  /**
    * @dev gives square root of given x.
    */
  function sqrt(uint256 x)
      internal
      pure
      returns (uint256 y) 
  {
    uint256 z = ((add(x,1)) / 2);
    y = x;
    while (z < y) 
    {
      y = z;
      z = ((add((x / z),z)) / 2);
    }
  }
  
  /**
    * @dev gives square. batchplies x by x
    */
  function sq(uint256 x)
      internal
      pure
      returns (uint256)
  {
    return (mul(x,x));
  }
  
  /**
    * @dev x to the power of y 
    */
  function pwr(uint256 x, uint256 y)
      internal 
      pure 
      returns (uint256)
  {
    if (x==0)
        return (0);
    else if (y==0)
        return (1);
    else 
    {
      uint256 z = x;
      for (uint256 i=1; i < y; i++)
        z = mul(z,x);
      return (z);
    }
  }
}

// File: contracts/GrowHops.sol

interface IERC20 {
  function transfer(address to, uint256 value) external returns (bool);
  function approve(address spender, uint256 value) external returns (bool);
  function allowance(address tokenOwner, address spender) external view returns (uint);
  function transferFrom(address from, address to, uint256 value) external returns (bool);
  function balanceOf(address who) external view returns (uint256);
  function mint(address to, uint256 value) external returns (bool);
}

contract GrowHops is IGrowHops, Ownable, Pausable {

  using SafeMath for *;

  address public hopsAddress;
  address public lessAddress;

  struct PlanBase {
    uint256 minimumAmount;
    uint256 lockTime;
    uint32 lessToHops;
    bool isOpen;
  }

  struct Plan {
    bytes32 planBaseId;
    address plantuser;
    uint256 lessAmount;
    uint256 hopsAmount;
    uint256 lockAt;
    uint256 releaseAt;
    bool isWithdrawn;
  }
  bytes32[] public planBaseIds;

  mapping (bytes32 => bytes32[]) planIdsByPlanBase;
  mapping (bytes32 => PlanBase) planBaseIdToPlanBase;
  
  mapping (bytes32 => Plan) planIdToPlan;
  mapping (address => bytes32[]) userToPlanIds;

  constructor (address _hopsAddress, address _lessAddress) public {
    hopsAddress = _hopsAddress;
    lessAddress = _lessAddress;
  }

  function addPlanBase(uint256 minimumAmount, uint256 lockTime, uint32 lessToHops)
    onlyOwner external {
    bytes32 planBaseId = keccak256(
      abi.encodePacked(block.timestamp, minimumAmount, lockTime, lessToHops)
    );

    PlanBase memory planBase = PlanBase(
      minimumAmount,
      lockTime,
      lessToHops,
      true
    );

    planBaseIdToPlanBase[planBaseId] = planBase;
    planBaseIds.push(planBaseId);
    emit PlanBaseEvt(planBaseId, minimumAmount, lockTime, lessToHops, true);
  }

  function togglePlanBase(bytes32 planBaseId, bool isOpen) onlyOwner external {

    planBaseIdToPlanBase[planBaseId].isOpen = isOpen;
    emit TogglePlanBaseEvt(planBaseId, isOpen);
  }
  
  function growHops(bytes32 planBaseId, uint256 lessAmount) whenNotPaused external {
    address sender = msg.sender;
    require(IERC20(lessAddress).allowance(sender, address(this)) >= lessAmount);

    PlanBase storage planBase = planBaseIdToPlanBase[planBaseId];
    require(planBase.isOpen);
    require(lessAmount >= planBase.minimumAmount);
    bytes32 planId = keccak256(
      abi.encodePacked(block.timestamp, sender, planBaseId, lessAmount)
    );
    uint256 hopsAmount = lessAmount.mul(planBase.lessToHops);

    Plan memory plan = Plan(
      planBaseId,
      sender,
      lessAmount,
      hopsAmount,
      block.timestamp,
      block.timestamp.add(planBase.lockTime),
      false
    );
    
    require(IERC20(lessAddress).transferFrom(sender, address(this), lessAmount));
    require(IERC20(hopsAddress).mint(sender, hopsAmount));

    planIdToPlan[planId] = plan;
    userToPlanIds[sender].push(planId);
    planIdsByPlanBase[planBaseId].push(planId);
    emit PlanEvt(planId, planBaseId, sender, lessAmount, hopsAmount, block.timestamp, block.timestamp.add(planBase.lockTime), false);
  }

  function updateHopsAddress(address _address) external onlyOwner {
    hopsAddress = _address;
  }

  function updatelessAddress(address _address) external onlyOwner {
    lessAddress = _address;
  }

  function withdraw(bytes32 planId) whenNotPaused external {
    address sender = msg.sender;
    Plan storage plan = planIdToPlan[planId];
    require(!plan.isWithdrawn);
    require(plan.plantuser == sender);
    require(block.timestamp >= plan.releaseAt);
    require(IERC20(lessAddress).transfer(sender, plan.lessAmount));

    planIdToPlan[planId].isWithdrawn = true;
    emit WithdrawPlanEvt(planId, sender, plan.lessAmount, true, block.timestamp);
  }

  function checkPlanBase(bytes32 planBaseId)
    external view returns (uint256, uint256, uint32, bool){
    PlanBase storage planBase = planBaseIdToPlanBase[planBaseId];
    return (
      planBase.minimumAmount,
      planBase.lockTime,
      planBase.lessToHops,
      planBase.isOpen
    );
  }

  function checkPlanBaseIds() external view returns(bytes32[]) {
    return planBaseIds;
  }

  function checkPlanIdsByPlanBase(bytes32 planBaseId) external view returns(bytes32[]) {
    return planIdsByPlanBase[planBaseId];
  }

  function checkPlanIdsByUser(address user) external view returns(bytes32[]) {
    return userToPlanIds[user];
  }

  function checkPlan(bytes32 planId)
    external view returns (bytes32, address, uint256, uint256, uint256, uint256, bool) {
    Plan storage plan = planIdToPlan[planId];
    return (
      plan.planBaseId,
      plan.plantuser,
      plan.lessAmount,
      plan.hopsAmount,
      plan.lockAt,
      plan.releaseAt,
      plan.isWithdrawn
    );
  }
}

Contract ABI
[{"constant":false,"inputs":[{"name":"planBaseId","type":"bytes32"},{"name":"isOpen","type":"bool"}],"name":"togglePlanBase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"planBaseId","type":"bytes32"}],"name":"checkPlanBase","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint32"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"planBaseId","type":"bytes32"},{"name":"lessAmount","type":"uint256"}],"name":"growHops","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"checkPlanIdsByUser","outputs":[{"name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"planBaseId","type":"bytes32"}],"name":"checkPlanIdsByPlanBase","outputs":[{"name":"","type":"bytes32[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"hopsAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"updatelessAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"isPauser","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"planBaseIds","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"paused","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renouncePauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"planId","type":"bytes32"}],"name":"checkPlan","outputs":[{"name":"","type":"bytes32"},{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"account","type":"address"}],"name":"addPauser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"planId","type":"bytes32"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_address","type":"address"}],"name":"updateHopsAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"minimumAmount","type":"uint256"},{"name":"lockTime","type":"uint256"},{"name":"lessToHops","type":"uint32"}],"name":"addPlanBase","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"checkPlanBaseIds","outputs":[{"name":"","type":"bytes32[]"}],"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":"lessAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_hopsAddress","type":"address"},{"name":"_lessAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"}],"name":"PauserRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"planBaseId","type":"bytes32"},{"indexed":false,"name":"minimumAmount","type":"uint256"},{"indexed":false,"name":"lockTime","type":"uint256"},{"indexed":false,"name":"lessToHops","type":"uint32"},{"indexed":false,"name":"isOpen","type":"bool"}],"name":"PlanBaseEvt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"planBaseId","type":"bytes32"},{"indexed":false,"name":"isOpen","type":"bool"}],"name":"TogglePlanBaseEvt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"planId","type":"bytes32"},{"indexed":false,"name":"planBaseId","type":"bytes32"},{"indexed":false,"name":"plantuser","type":"address"},{"indexed":false,"name":"lessAmount","type":"uint256"},{"indexed":false,"name":"hopsAmount","type":"uint256"},{"indexed":false,"name":"lockAt","type":"uint256"},{"indexed":false,"name":"releaseAt","type":"uint256"},{"indexed":false,"name":"isWithdrawn","type":"bool"}],"name":"PlanEvt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"planId","type":"bytes32"},{"indexed":false,"name":"plantuser","type":"address"},{"indexed":false,"name":"lessAmount","type":"uint256"},{"indexed":false,"name":"isWithdrawn","type":"bool"},{"indexed":false,"name":"withdrawAt","type":"uint256"}],"name":"WithdrawPlanEvt","type":"event"}]

Contract Creation Code
60806040523480156200001157600080fd5b50604051604080620016f8833981016040819052815160209092015160008054600160a060020a03191633178082559192600160a060020a0392909216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36200008833640100000000620000c3810204565b60028054600160a860020a031916610100600160a060020a039485160217905560038054600160a060020a03191691909216179055620001a8565b620000de600182640100000000620014636200011582021704565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03811615156200012b57600080fd5b62000140828264010000000062000170810204565b156200014b57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6000600160a060020a03821615156200018857600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61154080620001b86000396000f30060806040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302a88cd28114610142578063141e8cc31461016157806318cc797a146101a6578063199d06ea146101c15780631fd4db8b1461023257806326dce03e1461024a5780632cfe81691461027b5780633f4ba83a1461029c57806346fbf68e146102b15780634db1b0f9146102e65780635c975abb146103105780636ef8d66d14610325578063715018a61461033a5780637b3684891461034f57806382dc1ec4146103a95780638456cb59146103ca5780638da5cb5b146103df5780638e19899e146103f45780638ea94d1c1461040c5780638f32d59b1461042d578063bd791fd214610442578063dd5cd3af14610466578063f2fde38b1461047b578063f9ec83b01461049c575b600080fd5b34801561014e57600080fd5b5061015f60043560243515156104b1565b005b34801561016d57600080fd5b50610179600435610530565b60408051948552602085019390935263ffffffff9091168383015215156060830152519081900360800190f35b3480156101b257600080fd5b5061015f600435602435610563565b3480156101cd57600080fd5b506101e2600160a060020a0360043516610a26565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561021e578181015183820152602001610206565b505050509050019250505060405180910390f35b34801561023e57600080fd5b506101e2600435610a93565b34801561025657600080fd5b5061025f610af4565b60408051600160a060020a039092168252519081900360200190f35b34801561028757600080fd5b5061015f600160a060020a0360043516610b08565b3480156102a857600080fd5b5061015f610b4a565b3480156102bd57600080fd5b506102d2600160a060020a0360043516610bae565b604080519115158252519081900360200190f35b3480156102f257600080fd5b506102fe600435610bc7565b60408051918252519081900360200190f35b34801561031c57600080fd5b506102d2610be6565b34801561033157600080fd5b5061015f610bef565b34801561034657600080fd5b5061015f610bfa565b34801561035b57600080fd5b50610367600435610c64565b60408051978852600160a060020a039096166020880152868601949094526060860192909252608085015260a0840152151560c0830152519081900360e00190f35b3480156103b557600080fd5b5061015f600160a060020a0360043516610cae565b3480156103d657600080fd5b5061015f610cce565b3480156103eb57600080fd5b5061025f610d34565b34801561040057600080fd5b5061015f600435610d43565b34801561041857600080fd5b5061015f600160a060020a0360043516610ed4565b34801561043957600080fd5b506102d2610f1c565b34801561044e57600080fd5b5061015f60043560243563ffffffff60443516610f2d565b34801561047257600080fd5b506101e261114f565b34801561048757600080fd5b5061015f600160a060020a03600435166111a8565b3480156104a857600080fd5b5061025f6111c4565b6104b9610f1c565b15156104c457600080fd5b600082815260066020908152604091829020600201805464ff0000000019166401000000008515159081029190911790915582518581529182015281517f2ac81ac8e818b4b2ed4d1ceffeb2c488dd2365648ad917eafdb5c2492499816e929181900390910190a15050565b600090815260066020526040902080546001820154600290920154909263ffffffff821691640100000000900460ff1690565b6000806000806105716114b1565b60025460ff161561058157600080fd5b600354604080517fdd62ed3e000000000000000000000000000000000000000000000000000000008152336004820181905230602483015291519197508892600160a060020a03169163dd62ed3e916044808201926020929091908290030181600087803b1580156105f257600080fd5b505af1158015610606573d6000803e3d6000fd5b505050506040513d602081101561061c57600080fd5b5051101561062957600080fd5b60008781526006602052604090206002810154909450640100000000900460ff16151561065557600080fd5b835486101561066357600080fd5b60408051426020808301919091526c01000000000000000000000000600160a060020a0389160282840152605482018a905260748083018a905283518084039091018152609490920192839052815191929182918401908083835b602083106106dd5780518252601f1990920191602091820191016106be565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091206002880154909650610726935089925063ffffffff90811691506111d316565b915060e0604051908101604052808860001916815260200186600160a060020a0316815260200187815260200183815260200142815260200161077686600101544261126190919063ffffffff16565b815260006020918201819052600354604080517f23b872dd000000000000000000000000000000000000000000000000000000008152600160a060020a038b81166004830152306024830152604482018d905291519596509116936323b872dd9360648084019491938390030190829087803b1580156107f557600080fd5b505af1158015610809573d6000803e3d6000fd5b505050506040513d602081101561081f57600080fd5b5051151561082c57600080fd5b600254604080517f40c10f19000000000000000000000000000000000000000000000000000000008152600160a060020a038881166004830152602482018690529151610100909304909116916340c10f19916044808201926020929091908290030181600087803b1580156108a157600080fd5b505af11580156108b5573d6000803e3d6000fd5b505050506040513d60208110156108cb57600080fd5b505115156108d857600080fd5b600083815260076020908152604080832084518155848301516001808301805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03938416179055868401516002840155606087015160038401556080870151600484015560a087015160058085019190915560c08801516006909401805460ff191694151594909417909355908a1685526008845282852080548083018255908652848620018890558b85529083529083208054808301825590845291909220018490558401547fbe5cb9060893541d1943c48d7a6f4f0bb079e021beb40db9e45071b8f2d4fe21908490899088908a90879042906109d6908290611261565b604080519788526020880196909652600160a060020a03909416868601526060860192909252608085015260a084015260c0830152600060e083015251908190036101000190a150505050505050565b600160a060020a038116600090815260086020908152604091829020805483518184028101840190945280845260609392830182828015610a8757602002820191906000526020600020905b81548152600190910190602001808311610a72575b50505050509050919050565b600081815260056020908152604091829020805483518184028101840190945280845260609392830182828015610a87576020028201919060005260206000209081548152600190910190602001808311610a725750505050509050919050565b6002546101009004600160a060020a031681565b610b10610f1c565b1515610b1b57600080fd5b6003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b610b5333610bae565b1515610b5e57600080fd5b60025460ff161515610b6f57600080fd5b6002805460ff191690556040805133815290517f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa9181900360200190a1565b6000610bc160018363ffffffff6112d316565b92915050565b6004805482908110610bd557fe5b600091825260209091200154905081565b60025460ff1690565b610bf83361130a565b565b610c02610f1c565b1515610c0d57600080fd5b60008054604051600160a060020a03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b60009081526007602052604090208054600182015460028301546003840154600485015460058601546006909601549496600160a060020a03909416959294919390929160ff1690565b610cb733610bae565b1515610cc257600080fd5b610ccb81611352565b50565b610cd733610bae565b1515610ce257600080fd5b60025460ff1615610cf257600080fd5b6002805460ff191660011790556040805133815290517f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589181900360200190a1565b600054600160a060020a031690565b600254600090819060ff1615610d5857600080fd5b50506000818152600760205260409020600681015433919060ff1615610d7d57600080fd5b6001810154600160a060020a03838116911614610d9957600080fd5b6005810154421015610daa57600080fd5b6003546002820154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a03868116600483015260248201939093529051919092169163a9059cbb9160448083019260209291908290030181600087803b158015610e1f57600080fd5b505af1158015610e33573d6000803e3d6000fd5b505050506040513d6020811015610e4957600080fd5b50511515610e5657600080fd5b600083815260076020908152604091829020600601805460ff1916600190811790915560028401548351878152600160a060020a0387169381019390935282840152606082015242608082015290517f7542775d4abbaa25cbac6be4555ef441512fff8634bbaccb2e8f11113615f6a79181900360a00190a1505050565b610edc610f1c565b1515610ee757600080fd5b60028054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600054600160a060020a0316331490565b6000610f376114ed565b610f3f610f1c565b1515610f4a57600080fd5b6040805142602080830191909152818301889052606082018790527c010000000000000000000000000000000000000000000000000000000063ffffffff871602608083015282516064818403018152608490920192839052815191929182918401908083835b60208310610fd05780518252601f199092019160209182019101610fb1565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051809103902091506080604051908101604052808681526020018581526020018463ffffffff16815260200160011515815250905080600660008460001916600019168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548163ffffffff021916908363ffffffff16021790555060608201518160020160046101000a81548160ff02191690831515021790555090505060048290806001815401808255809150509060018203906000526020600020016000909192909190915090600019169055507ff1112b42422cfbd1f24e7ddd1f5b5f7c0e21fdb0601b961f4faebaed6f0d8a2a8286868660016040518086600019166000191681526020018581526020018481526020018363ffffffff1663ffffffff168152602001821515151581526020019550505050505060405180910390a15050505050565b6060600480548060200260200160405190810160405280929190818152602001828054801561119e57602002820191906000526020600020905b81548152600190910190602001808311611189575b5050505050905090565b6111b0610f1c565b15156111bb57600080fd5b610ccb8161139a565b600354600160a060020a031681565b60008215156111e457506000610bc1565b508181028183828115156111f457fe5b0414610bc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d617468206d756c206661696c656400000000000000000000000000604482015290519081900360640190fd5b81810182811015610bc157604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f536166654d61746820616464206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000600160a060020a03821615156112ea57600080fd5b50600160a060020a03166000908152602091909152604090205460ff1690565b61131b60018263ffffffff61141716565b604051600160a060020a038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b61136360018263ffffffff61146316565b604051600160a060020a038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b600160a060020a03811615156113af57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a038116151561142c57600080fd5b61143682826112d3565b151561144157600080fd5b600160a060020a0316600090815260209190915260409020805460ff19169055565b600160a060020a038116151561147857600080fd5b61148282826112d3565b1561148c57600080fd5b600160a060020a0316600090815260209190915260409020805460ff19166001179055565b6040805160e081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c081019190915290565b604080516080810182526000808252602082018190529181018290526060810191909152905600a165627a7a723058203f8d549fbe8c4943f7d92ff2e1e8591b2b2bde4a7a9db0f60bfb090d9b448ad80029000000000000000000000000471daee6e481b2ab7d2f2f64b8f9b083daae29da0000000000000000000000007ca121b093e2fbd4bb9a894bd5ff487d16f1f83b


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

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000471daee6e481b2ab7d2f2f64b8f9b083daae29da
Arg [1] : 0000000000000000000000007ca121b093e2fbd4bb9a894bd5ff487d16f1f83b


   Swarm Source:
bzzr://3f8d549fbe8c4943f7d92ff2e1e8591b2b2bde4a7a9db0f60bfb090d9b448ad8
Block Age transaction Difficulty GasUsed Reward
Block Age Uncle Number Difficulty GasUsed Reward
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.