ETH Price: $3,422.99 (+3.71%)

Contract

0x6B39Ce8211Bc60Bf3cd346a184C75D3cEA3A4985
 
Transaction Hash
Method
Block
From
To
Lock Liquidity184308232023-10-26 0:29:23394 days ago1698280163IN
0x6B39Ce82...cEA3A4985
0 ETH0.001076123.02912194
Lock Liquidity180038282023-08-27 5:10:35454 days ago1693113035IN
0x6B39Ce82...cEA3A4985
0 ETH0.0004734610.12975216
Lock Liquidity178207502023-08-01 14:28:23480 days ago1690900103IN
0x6B39Ce82...cEA3A4985
0 ETH0.0016292534.85782074
Lock Liquidity176537712023-07-09 4:26:35503 days ago1688876795IN
0x6B39Ce82...cEA3A4985
0 ETH0.0006175513.21249205
Lock Liquidity175410242023-06-23 8:16:23519 days ago1687508183IN
0x6B39Ce82...cEA3A4985
0 ETH0.0007657916.38412976
Lock Liquidity174838752023-06-15 7:41:59527 days ago1686814919IN
0x6B39Ce82...cEA3A4985
0 ETH0.001643620.30650741
0x60806040174838132023-06-15 7:29:35527 days ago1686814175IN
 Create: UnibotLiquidityLocker
0 ETH0.0125682620.31022176

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UnibotLiquidityLocker

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 1 : unibot_lp_locker.sol
/**

    Unibot Liquidity Locker

    Team opted to not use Team Finance and Unicrypt due to security 
    concerns and avoid giving out a percent of the LP supply.

**/

// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns(address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns(bytes calldata) {
        return msg.data;
    }
}


/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}


////// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts v4.4.0 (token/ERC20/IERC20.sol)

/* pragma solidity ^0.8.0; */

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns(uint256);

/**
 * @dev Returns the amount of tokens owned by `account`.
 */
function balanceOf(address account) external view returns(uint256);

/**
 * @dev Moves `amount` tokens from the caller's account to `recipient`.
 *
 * Returns a boolean value indicating whether the operation succeeded.
 *
 * Emits a {Transfer} event.
 */
function transfer(address recipient, uint256 amount) external returns(bool);

/**
 * @dev Returns the remaining number of tokens that `spender` will be
 * allowed to spend on behalf of `owner` through {transferFrom}. This is
 * zero by default.
 *
 * This value changes when {approve} or {transferFrom} are called.
 */
function allowance(address owner, address spender) external view returns(uint256);

/**
 * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
 *
 * Returns a boolean value indicating whether the operation succeeded.
 *
 * IMPORTANT: Beware that changing an allowance with this method brings the risk
 * that someone may use both the old and the new allowance by unfortunate
 * transaction ordering. One possible solution to mitigate this race
 * condition is to first reduce the spender's allowance to 0 and set the
 * desired value afterwards:
 * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
 *
 * Emits an {Approval} event.
 */
function approve(address spender, uint256 amount) external returns(bool);

/**
 * @dev Moves `amount` tokens from `sender` to `recipient` using the
 * allowance mechanism. `amount` is then deducted from the caller's
 * allowance.
 *
 * Returns a boolean value indicating whether the operation succeeded.
 *
 * Emits a {Transfer} event.
 */
function transferFrom(
    address sender,
    address recipient,
    uint256 amount
) external returns(bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

contract UnibotLiquidityLocker is Ownable {

    mapping(address => uint) public lpUnlockTime;

    constructor() {}

    receive() external payable { }


    // @dev Deposits and locks tokens until unlockEpochTime
    function lockLiquidity(address lpTokenAddress, uint unlockEpochTime) external onlyOwner {
        require(unlockEpochTime > lpUnlockTime[lpTokenAddress], "Unlock time must be greater than previous locks");
        require(unlockEpochTime >= block.timestamp + 2592000, "Unlock time must be greater than a month");
        // require(unlockEpochTime >= block.timestamp + 180, "Unlock time must be greater than 3 minutes"); // -- FOR TESTING
      
        IERC20 tokenForLock = IERC20(lpTokenAddress);

        uint userBalance = tokenForLock.balanceOf(msg.sender);
        require(userBalance > 0, "Sender does not hold any LP tokens");


        tokenForLock.transferFrom(msg.sender, address(this), userBalance);
        lpUnlockTime[lpTokenAddress] = unlockEpochTime;
    }

    // @dev Extends token lock
    function extendLiquidityLock(address lpTokenAddress, uint newUnlockEpochTime) external onlyOwner {
        require(newUnlockEpochTime > lpUnlockTime[lpTokenAddress], "LP is still locked");
        require(lpUnlockTime[lpTokenAddress] != 0, "LP does not have a set unlock time");

        lpUnlockTime[lpTokenAddress] = newUnlockEpochTime;
    } 

    // @dev Unlocks and withdraws LP if current time is past unlock time
    function unlockWithdrawLP(address lpTokenAddress, address _to) external onlyOwner {
        require(block.timestamp > lpUnlockTime[lpTokenAddress], "LP is still locked");
        require(lpUnlockTime[lpTokenAddress] != 0, "LP does not have a set unlock time");
        uint256 _contractBalance = IERC20(lpTokenAddress).balanceOf(address(this));
        IERC20(lpTokenAddress).transfer(_to, _contractBalance);
    }

    function withdrawStuckEth(address toAddr) external onlyOwner {
        (bool success, ) = toAddr.call{
            value: address(this).balance
        } ("");
        require(success);
    }

}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"lpTokenAddress","type":"address"},{"internalType":"uint256","name":"newUnlockEpochTime","type":"uint256"}],"name":"extendLiquidityLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lpTokenAddress","type":"address"},{"internalType":"uint256","name":"unlockEpochTime","type":"uint256"}],"name":"lockLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"lpUnlockTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lpTokenAddress","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"unlockWithdrawLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"toAddr","type":"address"}],"name":"withdrawStuckEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561000f575f80fd5b506100193361001e565b61006d565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6109c38061007a5f395ff3fe60806040526004361061007c575f3560e01c8063cdbc5b551161004c578063cdbc5b5514610106578063f2fde38b14610125578063f67cd9cd14610144578063fd5c9d241461017d575f80fd5b80636a33630414610087578063715018a6146100a85780637ca8448a146100bc5780638da5cb5b146100db575f80fd5b3661008357005b5f80fd5b348015610092575f80fd5b506100a66100a1366004610842565b61019c565b005b3480156100b3575f80fd5b506100a6610411565b3480156100c7575f80fd5b506100a66100d636600461086a565b610445565b3480156100e6575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b348015610111575f80fd5b506100a6610120366004610842565b6104cd565b348015610130575f80fd5b506100a661013f36600461086a565b6105a2565b34801561014f575f80fd5b5061016f61015e36600461086a565b60016020525f908152604090205481565b6040519081526020016100fd565b348015610188575f80fd5b506100a661019736600461088a565b61063c565b5f546001600160a01b031633146101ce5760405162461bcd60e51b81526004016101c5906108bb565b60405180910390fd5b6001600160a01b0382165f90815260016020526040902054811161024c5760405162461bcd60e51b815260206004820152602f60248201527f556e6c6f636b2074696d65206d7573742062652067726561746572207468616e60448201526e2070726576696f7573206c6f636b7360881b60648201526084016101c5565b6102594262278d006108f0565b8110156102b95760405162461bcd60e51b815260206004820152602860248201527f556e6c6f636b2074696d65206d7573742062652067726561746572207468616e604482015267040c240dadedce8d60c31b60648201526084016101c5565b6040516370a0823160e01b815233600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156102ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103239190610915565b90505f811161037f5760405162461bcd60e51b815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420616e79204c5020746f6b656044820152616e7360f01b60648201526084016101c5565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303815f875af11580156103cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103f3919061092c565b5050506001600160a01b039091165f90815260016020526040902055565b5f546001600160a01b0316331461043a5760405162461bcd60e51b81526004016101c5906108bb565b6104435f6107d8565b565b5f546001600160a01b0316331461046e5760405162461bcd60e51b81526004016101c5906108bb565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146104b7576040519150601f19603f3d011682016040523d82523d5f602084013e6104bc565b606091505b50509050806104c9575f80fd5b5050565b5f546001600160a01b031633146104f65760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0382165f9081526001602052604090205481116105515760405162461bcd60e51b81526020600482015260126024820152711314081a5cc81cdd1a5b1b081b1bd8dad95960721b60448201526064016101c5565b6001600160a01b0382165f9081526001602052604081205490036105875760405162461bcd60e51b81526004016101c59061094b565b6001600160a01b039091165f90815260016020526040902055565b5f546001600160a01b031633146105cb5760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0381166106305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c5565b610639816107d8565b50565b5f546001600160a01b031633146106655760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0382165f9081526001602052604090205442116106c05760405162461bcd60e51b81526020600482015260126024820152711314081a5cc81cdd1a5b1b081b1bd8dad95960721b60448201526064016101c5565b6001600160a01b0382165f9081526001602052604081205490036106f65760405162461bcd60e51b81526004016101c59061094b565b6040516370a0823160e01b81523060048201525f906001600160a01b038416906370a0823190602401602060405180830381865afa15801561073a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075e9190610915565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303815f875af11580156107ae573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d2919061092c565b50505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461083d575f80fd5b919050565b5f8060408385031215610853575f80fd5b61085c83610827565b946020939093013593505050565b5f6020828403121561087a575f80fd5b61088382610827565b9392505050565b5f806040838503121561089b575f80fd5b6108a483610827565b91506108b260208401610827565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8082018082111561090f57634e487b7160e01b5f52601160045260245ffd5b92915050565b5f60208284031215610925575f80fd5b5051919050565b5f6020828403121561093c575f80fd5b81518015158114610883575f80fd5b60208082526022908201527f4c5020646f6573206e6f74206861766520612073657420756e6c6f636b2074696040820152616d6560f01b60608201526080019056fea2646970667358221220514a20e5f1aa0a666a433d4fbdc3b3321b7121b6e69bfe4db432336a3bdf414664736f6c63430008140033

Deployed Bytecode

0x60806040526004361061007c575f3560e01c8063cdbc5b551161004c578063cdbc5b5514610106578063f2fde38b14610125578063f67cd9cd14610144578063fd5c9d241461017d575f80fd5b80636a33630414610087578063715018a6146100a85780637ca8448a146100bc5780638da5cb5b146100db575f80fd5b3661008357005b5f80fd5b348015610092575f80fd5b506100a66100a1366004610842565b61019c565b005b3480156100b3575f80fd5b506100a6610411565b3480156100c7575f80fd5b506100a66100d636600461086a565b610445565b3480156100e6575f80fd5b505f546040516001600160a01b0390911681526020015b60405180910390f35b348015610111575f80fd5b506100a6610120366004610842565b6104cd565b348015610130575f80fd5b506100a661013f36600461086a565b6105a2565b34801561014f575f80fd5b5061016f61015e36600461086a565b60016020525f908152604090205481565b6040519081526020016100fd565b348015610188575f80fd5b506100a661019736600461088a565b61063c565b5f546001600160a01b031633146101ce5760405162461bcd60e51b81526004016101c5906108bb565b60405180910390fd5b6001600160a01b0382165f90815260016020526040902054811161024c5760405162461bcd60e51b815260206004820152602f60248201527f556e6c6f636b2074696d65206d7573742062652067726561746572207468616e60448201526e2070726576696f7573206c6f636b7360881b60648201526084016101c5565b6102594262278d006108f0565b8110156102b95760405162461bcd60e51b815260206004820152602860248201527f556e6c6f636b2074696d65206d7573742062652067726561746572207468616e604482015267040c240dadedce8d60c31b60648201526084016101c5565b6040516370a0823160e01b815233600482015282905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156102ff573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103239190610915565b90505f811161037f5760405162461bcd60e51b815260206004820152602260248201527f53656e64657220646f6573206e6f7420686f6c6420616e79204c5020746f6b656044820152616e7360f01b60648201526084016101c5565b6040516323b872dd60e01b8152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064016020604051808303815f875af11580156103cf573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906103f3919061092c565b5050506001600160a01b039091165f90815260016020526040902055565b5f546001600160a01b0316331461043a5760405162461bcd60e51b81526004016101c5906108bb565b6104435f6107d8565b565b5f546001600160a01b0316331461046e5760405162461bcd60e51b81526004016101c5906108bb565b5f816001600160a01b0316476040515f6040518083038185875af1925050503d805f81146104b7576040519150601f19603f3d011682016040523d82523d5f602084013e6104bc565b606091505b50509050806104c9575f80fd5b5050565b5f546001600160a01b031633146104f65760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0382165f9081526001602052604090205481116105515760405162461bcd60e51b81526020600482015260126024820152711314081a5cc81cdd1a5b1b081b1bd8dad95960721b60448201526064016101c5565b6001600160a01b0382165f9081526001602052604081205490036105875760405162461bcd60e51b81526004016101c59061094b565b6001600160a01b039091165f90815260016020526040902055565b5f546001600160a01b031633146105cb5760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0381166106305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016101c5565b610639816107d8565b50565b5f546001600160a01b031633146106655760405162461bcd60e51b81526004016101c5906108bb565b6001600160a01b0382165f9081526001602052604090205442116106c05760405162461bcd60e51b81526020600482015260126024820152711314081a5cc81cdd1a5b1b081b1bd8dad95960721b60448201526064016101c5565b6001600160a01b0382165f9081526001602052604081205490036106f65760405162461bcd60e51b81526004016101c59061094b565b6040516370a0823160e01b81523060048201525f906001600160a01b038416906370a0823190602401602060405180830381865afa15801561073a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075e9190610915565b60405163a9059cbb60e01b81526001600160a01b038481166004830152602482018390529192509084169063a9059cbb906044016020604051808303815f875af11580156107ae573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d2919061092c565b50505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80356001600160a01b038116811461083d575f80fd5b919050565b5f8060408385031215610853575f80fd5b61085c83610827565b946020939093013593505050565b5f6020828403121561087a575f80fd5b61088382610827565b9392505050565b5f806040838503121561089b575f80fd5b6108a483610827565b91506108b260208401610827565b90509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b8082018082111561090f57634e487b7160e01b5f52601160045260245ffd5b92915050565b5f60208284031215610925575f80fd5b5051919050565b5f6020828403121561093c575f80fd5b81518015158114610883575f80fd5b60208082526022908201527f4c5020646f6573206e6f74206861766520612073657420756e6c6f636b2074696040820152616d6560f01b60608201526080019056fea2646970667358221220514a20e5f1aa0a666a433d4fbdc3b3321b7121b6e69bfe4db432336a3bdf414664736f6c63430008140033

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.