Contract 0x473BEdE43716bAa1AB1b4ED34B4209bC942B7882

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xb273937417360f626ebabb632cb435781cf7655fa191f66ca0cac7042809ac39Top Up Lock316452742022-08-08 4:19:3710 days ago0x51ec622fd2d47bcb6f83ff0c617e5a11e03c6465 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001988205139 31.040000312
0x8c6e2386007bf0dbc03eafc0bf9acaf4f45f6a462a1a6ebc147c45819540a0e3Top Up Lock314881182022-08-03 22:22:4214 days 5 hrs ago0x95f9d1c7921a6673a91157f816bc8d2e312a72dc IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00185962976 31.384567207
0xbb109b952722ecda527236729363339fdc48adf8cf438cc1454ddefe435452b1Top Up Lock314024142022-08-01 17:56:4616 days 10 hrs ago0x07bd02e2b39c894378caf3fdef2a74f06e1ca89d IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00177759003 30.000000518
0x39bb055b1a8bb3765df8838f68532ac18ebd65f167c934c5acb0ed070242818cTop Up Lock312937442022-07-29 23:42:2319 days 4 hrs ago0x11534dad03f13fa12d641cabf8d45c3b9502fb7f IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001777950028 30.000000489
0xc610fd5227afbf575446741747d5b74866d60d5885a53b9b541efc932ca1404aTop Up Lock312541322022-07-28 23:28:3520 days 4 hrs ago0x95f9d1c7921a6673a91157f816bc8d2e312a72dc IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00177795 30.000000012
0x65384ecc4c0dd275cd0b0cd9b7aff58eabf0a7e01637101ed3a8c27abe6aea7dCreate Lock305608642022-07-10 11:08:2538 days 17 hrs ago0x38e0d4c38bacafb6d4e380fe2f4760db7bd97165 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.004454010004 30.00000003
0xfeff739ab8eafa6be6b7fc685fdd1735261f46e90e7d465156ffa18803d55047Top Up Lock305320982022-07-09 18:02:5339 days 10 hrs ago0x83a23b81835bddee41beeedeaea1b04bd736add7 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00206911476 34.920000016
0xd88f85357b4eb44c56dc2c266fbe4c24c89d51610c82bc91b01795b9d9cef36cTop Up Lock304520502022-07-07 17:51:2841 days 10 hrs ago0xba84436870c9a055430cfa412d8a9186802ffb92 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001925895867 30.055961845
0x7d76625d1c488dda63775339ec98e6658600a0bd74f9a79c7b17b4912916f183Top Up Lock304067772022-07-06 14:02:5242 days 14 hrs ago0x3e4f1fafb95752567c78b0dbed5a58de71cb83ae IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001777950001 30.000000022
0x8b71260f73aa1ea9466cff46cca5dcf6c7c49ef7062f93edf827182791a0fe71Top Up Lock302459442022-07-02 8:58:0746 days 19 hrs ago0x07bd02e2b39c894378caf3fdef2a74f06e1ca89d IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001988460221 33.558810879
0x82e6ef3650ab06020c87a7f15eb55b25465171a9d9040249e3c2a04efb911716Top Up Lock295296692022-06-13 20:19:0965 days 8 hrs ago0x7dd15394e1dad35afa7c439beb44e33c800e2233 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.006392389046 107.882960296
0x9f222c3b12128ac1d07aa1a8081222d22327a8789c2f718c9dc9a38ef8cb3407Top Up Lock293040912022-06-08 5:45:1970 days 22 hrs ago0x07bd02e2b39c894378caf3fdef2a74f06e1ca89d IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001961103672 33.097120361
0xceba08303ecd3884b2272d3705a8b906a3d26ff7ba95c9e7fd9c0adde4c3e318Top Up Lock291218782022-06-03 16:43:2975 days 11 hrs ago0xc14e3e2db2575290ec236901bbda3eac4500db7c IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00352525911 55.026287529
0xf4123f0b71c084b467d68766d4601b2b02281916409ff7a5bdb5c27ff5bb924fTop Up Lock290421702022-06-01 17:53:0477 days 10 hrs ago0xf263f73beb895fabb4c65a2729b24dde5a6498bc IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001777590001 30.000000022
0xc51a2fdd8e9a28f051b9df9fde29e498d45b2e0678d98a121dec9a7e83b96a64Top Up Lock279612962022-05-05 17:49:28104 days 10 hrs ago0x07bd02e2b39c894378caf3fdef2a74f06e1ca89d IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.010104997105 170.539839433
0x982a933eff973c1396552d106fe83368499de8bb3df229794a09115ba8a7df86Top Up Lock278424462022-05-02 17:12:07107 days 11 hrs ago0xf263f73beb895fabb4c65a2729b24dde5a6498bc IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.001839030734 31.03692192
0xa14697d69d12120f6c8d5f6ebda8a0e6ccfabf60713531908d9ce442179cb20dCreate Lock276200362022-04-27 2:21:38113 days 1 hr ago0x9b14a1a415e94391046d3269c53dead65b8527ba IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.000060305001 2.500000074
0x3cb2988adc7a2a2533dec9ae9753796c2d6a87a5559bac3794c0e2b1d770e752Top Up Lock275661402022-04-25 17:27:41114 days 10 hrs ago0x3e4f1fafb95752567c78b0dbed5a58de71cb83ae IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.003544775113 59.824398988
0xef5b18ee973e8001034df6b9f7dd9ef13562489f0cfefd92f01fd1e6a42f614cCreate Lock274556012022-04-22 20:48:09117 days 7 hrs ago0xefcca00c699d06c87379bc5b5036825c9d540983 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.00551865048 38.416000003
0x719830a4d66547e2836ce8e599fc34ba3a5be65ad75fcfbc6ec7197c7b530d69Create Lock273837132022-04-21 1:49:40119 days 2 hrs ago0x509a05b8907b448b2b7096dd519449c3451547ec IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.004929761767 33.207111701
0x5e69a4aaf0268b513ef6486adc18a8063233a83b16cfca847fe5f09a03a5ef46Create Lock273007202022-04-18 22:28:59121 days 5 hrs ago0x734a6263fe23c1d68ec9042e03082575c34c968c IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.026126194927 175.98730206
0x615ac6f684e3ed8262796c4c281cddd6bbdfaa40915660599a9c6b9a51039e93Top Up Lock270701122022-04-13 1:55:10127 days 2 hrs ago0x84cc43ffb48779dbd451dd340c5f7fd09f9cee06 IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.002065708897 34.862519995
0x229c202613c4ee3f4b7c27ef05f908724df3bc1a10149aaf56975f3cfccb3cc8Create Lock269459042022-04-09 22:39:50130 days 5 hrs ago0xf0cf7681e1ab4ded329c2679e8e2ab61490765dd IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.0058199064 39.200000003
0x2e8685433aaa7f7e4b8afc96e79d6edb963d401bdd4846cce67034044d2ce456Create Lock269431632022-04-09 20:59:40130 days 7 hrs ago0xf2c2b3e067ac7b2c31dfa261db5a3801e427896f IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.004368221603 30.41026436
0xd9c9376a3f85676d7f9ad2373ad19a35a27d1d116b6618c4bb2523b2b028da37Top Up Lock269102142022-04-09 0:56:05131 days 3 hrs ago0x95f9d1c7921a6673a91157f816bc8d2e312a72dc IN  0x473bede43716baa1ab1b4ed34b4209bc942b78820 MATIC0.002135313371 36.037219578
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DoubleDiceLazyPoolLocking

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 6 : DoubleDiceLazyPoolLocking.sol
// SPDX-License-Identifier: Unlicensed
pragma solidity 0.8.6;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

contract DoubleDiceLazyPoolLocking is Ownable {

  using SafeERC20 for IERC20;

  IERC20 public token;

  uint256 public minLockDuration = 365 days;
  uint256 public minLockAmount = 1e18;

  struct UserLock {
    uint256 amount;
    uint256 startTime;
    uint256 expiryTime;
    bool    hasLock;
    bool    claimed;
  }

  mapping(address => UserLock) public userLock;

  event Claim(
    address indexed user,
    uint256 amount 
  );
  
  event UserLockInfo(
    address indexed user, 
    uint256 amount,
    uint256 startTime,
    uint256 expiryTime
  );    
  
  event TopUpLock(
    address indexed user, 
    uint256 amount,
    uint256 depositTime
  );    

  event UpdateLockExpiry(
    address indexed user, 
    uint256 oldExpiryTime,
    uint256 newExpiryTime
  );
  
  constructor(address tokenAddress, uint256 minLockAmount_) {
    require(tokenAddress != address(0), "Not a valid token address");
    require(minLockAmount_ != 0, "Minimum lock amount must not be equal to zero");

    token = IERC20(tokenAddress);
    minLockAmount = minLockAmount_;
  }

  function createLock(uint256 amount, uint256 expiryTime) external {
    require(expiryTime != 0, "Expiry can not be equal to zero");
    require(expiryTime >= (block.timestamp + minLockDuration), "Expiry time is too low");
    require(amount >= minLockAmount, "Token amount is too low");
    require(!userLock[msg.sender].hasLock, "User already created a lock");

    userLock[msg.sender] = UserLock({
      amount: amount,
      startTime: block.timestamp,
      expiryTime: expiryTime,
      hasLock: true,
      claimed: false
    });
    
    token.transferFrom(msg.sender, address(this), amount);

    emit UserLockInfo(msg.sender, amount, block.timestamp, expiryTime);
  }


  function topUpLock(uint256 amount) external {
    UserLock storage user = userLock[msg.sender];
    require(amount > 0, "Top up amount must be greater than zero");
    require(user.hasLock, "User have not created a lock");
    require(block.timestamp < user.expiryTime, "Expiry Date have been reached");


    user.amount += amount;
    
    token.transferFrom(msg.sender, address(this), amount);

    emit TopUpLock(msg.sender, amount, block.timestamp);
  }


  function claim() external {
      
    UserLock storage user = userLock[msg.sender];
    
    require(block.timestamp >= user.expiryTime, "Asset have not expired");
    require(user.hasLock, "User have not created a lock");
    
    uint256 amount = user.amount;
    
    delete userLock[msg.sender];

    token.transfer(msg.sender, amount);

    
    emit Claim(msg.sender,amount);
  }

  function updateLockExpiry(uint256 newExpiryTime) external {
    UserLock storage user = userLock[msg.sender];
    uint256 oldExpiryTime = user.expiryTime;
    
    require(!user.claimed, "Asset have already been claimed");
    require(user.hasLock, "User have not created a lock");
    require(block.timestamp < oldExpiryTime, "Expiry Date have been reached");
    require(newExpiryTime > oldExpiryTime, "Low new expiry date");
    
    user.expiryTime = newExpiryTime;
    
    emit UpdateLockExpiry(msg.sender, oldExpiryTime, newExpiryTime);
  }
  
  function updateMinLockDuration(uint256 newLockDuration) external onlyOwner {
    require(newLockDuration != 0, "New lock duration can not be equal to zero");
    minLockDuration = newLockDuration;
  }

  function updateMinLockAmount(uint256 newMinLockAmount) external onlyOwner {
    require(newMinLockAmount != 0, "New lock amount can not be equal to zero");
    minLockAmount = newMinLockAmount;
  }

  function getUserLockInfo(address user) external view returns(UserLock memory) {
    return userLock[user];
  }
    
}

File 2 of 6 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 6 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 6 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 5 of 6 : IERC20.sol
// SPDX-License-Identifier: MIT

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);
}

File 6 of 6 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"minLockAmount_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"depositTime","type":"uint256"}],"name":"TopUpLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"oldExpiryTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newExpiryTime","type":"uint256"}],"name":"UpdateLockExpiry","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiryTime","type":"uint256"}],"name":"UserLockInfo","type":"event"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"}],"name":"createLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserLockInfo","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"bool","name":"hasLock","type":"bool"},{"internalType":"bool","name":"claimed","type":"bool"}],"internalType":"struct DoubleDiceLazyPoolLocking.UserLock","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minLockDuration","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":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"topUpLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newExpiryTime","type":"uint256"}],"name":"updateLockExpiry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMinLockAmount","type":"uint256"}],"name":"updateMinLockAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLockDuration","type":"uint256"}],"name":"updateMinLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userLock","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"expiryTime","type":"uint256"},{"internalType":"bool","name":"hasLock","type":"bool"},{"internalType":"bool","name":"claimed","type":"bool"}],"stateMutability":"view","type":"function"}]

60806040526301e13380600255670de0b6b3a764000060035534801561002457600080fd5b50604051610fc3380380610fc383398101604081905261004391610183565b61004c33610133565b6001600160a01b0382166100a75760405162461bcd60e51b815260206004820152601960248201527f4e6f7420612076616c696420746f6b656e20616464726573730000000000000060448201526064015b60405180910390fd5b8061010a5760405162461bcd60e51b815260206004820152602d60248201527f4d696e696d756d206c6f636b20616d6f756e74206d757374206e6f742062652060448201526c657175616c20746f207a65726f60981b606482015260840161009e565b600180546001600160a01b0319166001600160a01b0393909316929092179091556003556101bd565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806040838503121561019657600080fd5b82516001600160a01b03811681146101ad57600080fd5b6020939093015192949293505050565b610df7806101cc6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063b601c7d41161008c578063ef69bcc511610066578063ef69bcc51461024a578063f2fde38b1461025d578063f9d5200614610270578063fc0c546a1461028357600080fd5b8063b601c7d41461021b578063d6a298e91461022e578063e63733c41461023757600080fd5b80635617a6e8116100c85780635617a6e81461016e578063715018a6146101db5780638da5cb5b146101e3578063b52c05fe1461020857600080fd5b806308804275146100ef57806331cb27021461010b5780634e71d92d14610164575b600080fd5b6100f860035481565b6040519081526020015b60405180910390f35b61011e610119366004610ca2565b610296565b6040516101029190600060a08201905082518252602083015160208301526040830151604083015260608301511515606083015260808301511515608083015292915050565b61016c61032f565b005b6101af61017c366004610ca2565b60046020526000908152604090208054600182015460028301546003909301549192909160ff8082169161010090041685565b60408051958652602086019490945292840191909152151560608301521515608082015260a001610102565b61016c6104a3565b6000546001600160a01b03165b6040516001600160a01b039091168152602001610102565b61016c610216366004610d0d565b6104d9565b61016c610229366004610cf4565b610770565b6100f860025481565b61016c610245366004610cf4565b6107fd565b61016c610258366004610cf4565b61088c565b61016c61026b366004610ca2565b610a4a565b61016c61027e366004610cf4565b610ae5565b6001546101f0906001600160a01b031681565b6102cc6040518060a001604052806000815260200160008152602001600081526020016000151581526020016000151581525090565b506001600160a01b0316600090815260046020908152604091829020825160a0810184528154815260018201549281019290925260028101549282019290925260039091015460ff80821615156060840152610100909104161515608082015290565b33600090815260046020526040902060028101544210156103905760405162461bcd60e51b8152602060048201526016602482015275105cdcd95d081a185d99481b9bdd08195e1c1a5c995960521b60448201526064015b60405180910390fd5b600381015460ff166103b45760405162461bcd60e51b815260040161038790610d64565b805433600081815260046020819052604080832083815560018082018590556002820194909455600301805461ffff191690559154915163a9059cbb60e01b815290810192909252602482018390526001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561043057600080fd5b505af1158015610444573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104689190610cd2565b5060405181815233907f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d4906020015b60405180910390a25050565b6000546001600160a01b031633146104cd5760405162461bcd60e51b815260040161038790610d2f565b6104d76000610c52565b565b806105265760405162461bcd60e51b815260206004820152601f60248201527f4578706972792063616e206e6f7420626520657175616c20746f207a65726f006044820152606401610387565b6002546105339042610d9b565b81101561057b5760405162461bcd60e51b81526020600482015260166024820152754578706972792074696d6520697320746f6f206c6f7760501b6044820152606401610387565b6003548210156105cd5760405162461bcd60e51b815260206004820152601760248201527f546f6b656e20616d6f756e7420697320746f6f206c6f770000000000000000006044820152606401610387565b3360009081526004602052604090206003015460ff16156106305760405162461bcd60e51b815260206004820152601b60248201527f5573657220616c726561647920637265617465642061206c6f636b00000000006044820152606401610387565b6040805160a081018252838152426020808301918252828401858152600160608501818152600060808701818152338083526004968790529189902097518855955187840155925160028701555160039095018054945115156101000261ff00199615159690961661ffff199095169490941794909417909255915492516323b872dd60e01b815291820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156106f857600080fd5b505af115801561070c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107309190610cd2565b506040805183815242602082015290810182905233907fd28a9bf3653de1e3ed40d9e6f96e3bb49ecf1a779fbc0e135e650113c992639a90606001610497565b6000546001600160a01b0316331461079a5760405162461bcd60e51b815260040161038790610d2f565b806107f85760405162461bcd60e51b815260206004820152602860248201527f4e6577206c6f636b20616d6f756e742063616e206e6f7420626520657175616c60448201526720746f207a65726f60c01b6064820152608401610387565b600355565b6000546001600160a01b031633146108275760405162461bcd60e51b815260040161038790610d2f565b806108875760405162461bcd60e51b815260206004820152602a60248201527f4e6577206c6f636b206475726174696f6e2063616e206e6f7420626520657175604482015269616c20746f207a65726f60b01b6064820152608401610387565b600255565b336000908152600460205260409020816108f85760405162461bcd60e51b815260206004820152602760248201527f546f7020757020616d6f756e74206d7573742062652067726561746572207468604482015266616e207a65726f60c81b6064820152608401610387565b600381015460ff1661091c5760405162461bcd60e51b815260040161038790610d64565b8060020154421061096f5760405162461bcd60e51b815260206004820152601d60248201527f45787069727920446174652068617665206265656e20726561636865640000006044820152606401610387565b818160000160008282546109839190610d9b565b90915550506001546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401602060405180830381600087803b1580156109da57600080fd5b505af11580156109ee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a129190610cd2565b506040805183815242602082015233917f734082c67a8621aff2d0649dc56d65c2b8ed3b3e416dfcdf4c67f513354725be9101610497565b6000546001600160a01b03163314610a745760405162461bcd60e51b815260040161038790610d2f565b6001600160a01b038116610ad95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610387565b610ae281610c52565b50565b33600090815260046020526040902060028101546003820154610100900460ff1615610b535760405162461bcd60e51b815260206004820152601f60248201527f4173736574206861766520616c7265616479206265656e20636c61696d6564006044820152606401610387565b600382015460ff16610b775760405162461bcd60e51b815260040161038790610d64565b804210610bc65760405162461bcd60e51b815260206004820152601d60248201527f45787069727920446174652068617665206265656e20726561636865640000006044820152606401610387565b808311610c0b5760405162461bcd60e51b81526020600482015260136024820152724c6f77206e657720657870697279206461746560681b6044820152606401610387565b60028201839055604080518281526020810185905233917f63c1d798cec6cecd8e2f6bc611caa2779c068e0664c97f5900e2447e61e49a68910160405180910390a2505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600060208284031215610cb457600080fd5b81356001600160a01b0381168114610ccb57600080fd5b9392505050565b600060208284031215610ce457600080fd5b81518015158114610ccb57600080fd5b600060208284031215610d0657600080fd5b5035919050565b60008060408385031215610d2057600080fd5b50508035926020909101359150565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601c908201527f557365722068617665206e6f7420637265617465642061206c6f636b00000000604082015260600190565b60008219821115610dbc57634e487b7160e01b600052601160045260246000fd5b50019056fea264697066735822122038a94780c2a29ac9ec551ab88335de3b442c1d722faf803764960a6c7401f65464736f6c634300080600330000000000000000000000005b03ac408938c97e50db3bc5675d182606a013770000000000000000000000000000000000000000000000000000000000000001

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

0000000000000000000000005b03ac408938c97e50db3bc5675d182606a013770000000000000000000000000000000000000000000000000000000000000001

-----Decoded View---------------
Arg [0] : tokenAddress (address): 0x5b03ac408938c97e50db3bc5675d182606a01377
Arg [1] : minLockAmount_ (uint256): 1

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005b03ac408938c97e50db3bc5675d182606a01377
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.