Skip to content
Verified contractPartialMIT

LiquidityLock

Address0x220da58d3c086896d5a14a86b71ea3ef35520433
Balance

0 ETH

 

Transactions

36

 

Compiler

solc 0.7.4

 

Same code

Only this contract

 

Details

Compiler
solc 0.7.4+commit.3f05b770
Language
solidity
Optimization
Yes, 999,999 runs
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
12,495,645
Creation transaction
0x89cf7efaaa…5f58d97e07

LiquidityLock.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, uint256 amount) external returns (bool);
    function allowance(address owner, address spender) external view returns (uint256);
    function approve(address spender, uint256 amount) external returns (bool);
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract LiquidityLock {
  address public owner;            // owner
  address public lptoken;          // uniswap lp token address
  uint256 public timelock;              
  uint256 public numerator = 7 ether;

  modifier restricted() {
    require( msg.sender == owner, "this function is restricted to the contract's owner" );
    _;
  }
  
  constructor(address _lptoken) {
    require(_lptoken != address(0x0),"can't construct with 0x0 address");
    owner = msg.sender;
    lptoken = _lptoken;
	timelock = block.timestamp + 6 days + 23 hours;
  }  

  function remove() public restricted {
      require(block.timestamp > timelock, "removal call too soon" );
      timelock = block.timestamp + 6 days + 23 hours;
      IERC20(lptoken).transfer(msg.sender,  numerator * IERC20(lptoken).balanceOf(address(this)) / 100 ether);
  }
  
  function setNumerator(uint256 _numerator) public restricted {
      require(_numerator <= 10 ether,"numerator too large");
      numerator = _numerator;
  }
  
  function setOwner(address _owner) public restricted {
      require(_owner != address(0x0), "owner can't be 0x0 address");
      owner = _owner;
  }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 999999,
    "enabled": true
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.