Contract 0xf1ad3754d4f690a7736a6e8c11c3ec7ea96eba1f

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x77c8649f2f1aa2a24e4d70a180977de56d96070c34cd9ea5422f6b1f1f62abf5Withdraw238699842022-01-18 14:53:5510 days 19 hrs ago0x00d46d105507a04d7e4592cf43bbbad964bc77ab IN  0xf1ad3754d4f690a7736a6e8c11c3ec7ea96eba1f0 MATIC0.005378921097 110.468271952
0xe670e7f2bf4c05616f4d45a77f141bca3be7aea15ed6c056081247576c634238Deposit218316452021-11-26 19:02:3063 days 14 hrs ago0x00d46d105507a04d7e4592cf43bbbad964bc77ab IN  0xf1ad3754d4f690a7736a6e8c11c3ec7ea96eba1f0 MATIC0.00792500555
0x982f8203c64dd2e9dfb0eeb2b13ff1ee8e92e6751f4e9a0dd2e48dcb0e57f769Withdraw218295892021-11-26 17:36:3863 days 16 hrs ago0x00d46d105507a04d7e4592cf43bbbad964bc77ab IN  0xf1ad3754d4f690a7736a6e8c11c3ec7ea96eba1f0 MATIC0.001527650
0x40a54caa5e4d024c7d109c7a908bf2189dd1fb5550e1d84dcf33f31b9b0b7a87Deposit218188242021-11-26 10:41:5963 days 23 hrs ago0x00d46d105507a04d7e4592cf43bbbad964bc77ab IN  0xf1ad3754d4f690a7736a6e8c11c3ec7ea96eba1f0 MATIC0.0048974130
0x81e2f22f84134c6c9b03cbc18980cfc7d37c9c3ccc9e6406d5fb29cbdc4114e10x60806040217396222021-11-24 8:47:4466 days 1 hr ago0x00d46d105507a04d7e4592cf43bbbad964bc77ab IN  Create: LiquidityLock0 MATIC0.0192431730
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LiquidityLock

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at polygonscan.com on 2021-11-24
*/

// File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol


// OpenZeppelin Contracts v4.3.2 (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);
}

// File: contracts/LiquidityLock.sol

//SPDX-License-Identifier: MIT

pragma solidity >=0.8.4;


contract LiquidityLock {
    event Deposit(
        address owner,
        address token,
        uint256 amount,
        uint256 deadline,
        uint256 lockID
    );

    event Withdraw(address owner, address token, uint256 amount);

    struct Lock {
        address owner;
        address token;
        uint256 amount;
        uint256 deadline;
    }

    mapping(uint256 => Lock) public locks;

    uint256 public lockCount = 0;

    function deposit(
        address _token,
        uint256 _amount,
        uint256 _length
    ) public returns (uint256) {
        require(
            IERC20(_token).transferFrom(msg.sender, address(this), _amount)
        );

        lockCount += 1;

        uint256 _deadline = block.timestamp + _length;

        locks[lockCount] = Lock({
            owner: msg.sender,
            token: _token,
            amount: _amount,
            deadline: _deadline
        });

        emit Deposit(msg.sender, _token, _amount, _deadline, lockCount);
        
        return lockCount;
    }

    function withdraw(uint256 _lockID) public {
        Lock storage currentLock = locks[_lockID];

        require(currentLock.owner == msg.sender, "Not owner");
        require(currentLock.deadline <= block.timestamp, "Not reached deadline");

        IERC20(currentLock.token).transfer(msg.sender, currentLock.amount);

        emit Withdraw(currentLock.owner, currentLock.token, currentLock.amount);

        delete locks[_lockID];
    }
    
    function currentTimestamp() public view returns (uint256) {
        return block.timestamp;
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockID","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"currentTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"_length","type":"uint256"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"locks","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lockID","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060015534801561001557600080fd5b50610aa2806100256000396000f3fe608060405234801561001057600080fd5b50600436106100575760003560e01c80630efe6a8b1461005c5780631e2ff94f1461008c5780632e1a7d4d146100aa5780639b10b6f5146100c6578063f4dadc61146100e4575b600080fd5b6100766004803603810190610071919061068e565b610117565b60405161008391906108d7565b60405180910390f35b61009461032e565b6040516100a191906108d7565b60405180910390f35b6100c460048036038101906100bf919061070e565b610336565b005b6100ce6105d9565b6040516100db91906108d7565b60405180910390f35b6100fe60048036038101906100f9919061070e565b6105df565b60405161010e94939291906107d6565b60405180910390f35b60008373ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016101569392919061079f565b602060405180830381600087803b15801561017057600080fd5b505af1158015610184573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a891906106e1565b6101b157600080fd5b60018060008282546101c39190610903565b92505081905550600082426101d89190610903565b905060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018673ffffffffffffffffffffffffffffffffffffffff16815260200185815260200182815250600080600154815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301559050507f4e2ca0515ed1aef1395f66b5303bb5d6f1bf9d61a353fa53f73f8ac9973fa9f63386868460015460405161031995949392919061081b565b60405180910390a16001549150509392505050565b600042905090565b600080600083815260200190815260200160002090503373ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146103de576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103d5906108b7565b60405180910390fd5b4281600301541115610425576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161041c90610897565b60405180910390fd5b8060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb3383600201546040518363ffffffff1660e01b815260040161048892919061086e565b602060405180830381600087803b1580156104a257600080fd5b505af11580156104b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104da91906106e1565b507f9b1bfa7fa9ee420a16e124f794c35ac9f90472acc99140eb2f6447c714cad8eb8160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836002015460405161055a9392919061079f565b60405180910390a1600080838152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160009055600382016000905550505050565b60015481565b60006020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154905084565b60008135905061065e81610a27565b92915050565b60008151905061067381610a3e565b92915050565b60008135905061068881610a55565b92915050565b6000806000606084860312156106a7576106a66109d0565b5b60006106b58682870161064f565b93505060206106c686828701610679565b92505060406106d786828701610679565b9150509250925092565b6000602082840312156106f7576106f66109d0565b5b600061070584828501610664565b91505092915050565b600060208284031215610724576107236109d0565b5b600061073284828501610679565b91505092915050565b61074481610959565b82525050565b60006107576014836108f2565b9150610762826109d5565b602082019050919050565b600061077a6009836108f2565b9150610785826109fe565b602082019050919050565b61079981610997565b82525050565b60006060820190506107b4600083018661073b565b6107c1602083018561073b565b6107ce6040830184610790565b949350505050565b60006080820190506107eb600083018761073b565b6107f8602083018661073b565b6108056040830185610790565b6108126060830184610790565b95945050505050565b600060a082019050610830600083018861073b565b61083d602083018761073b565b61084a6040830186610790565b6108576060830185610790565b6108646080830184610790565b9695505050505050565b6000604082019050610883600083018561073b565b6108906020830184610790565b9392505050565b600060208201905081810360008301526108b08161074a565b9050919050565b600060208201905081810360008301526108d08161076d565b9050919050565b60006020820190506108ec6000830184610790565b92915050565b600082825260208201905092915050565b600061090e82610997565b915061091983610997565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561094e5761094d6109a1565b5b828201905092915050565b600061096482610977565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b7f4e6f74207265616368656420646561646c696e65000000000000000000000000600082015250565b7f4e6f74206f776e65720000000000000000000000000000000000000000000000600082015250565b610a3081610959565b8114610a3b57600080fd5b50565b610a478161096b565b8114610a5257600080fd5b50565b610a5e81610997565b8114610a6957600080fd5b5056fea2646970667358221220575c1ca9b8a29565464fd64b9da462513deac0f344484f93227c1129241ca19164736f6c63430008070033

Deployed ByteCode Sourcemap

3053:1646:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3517:612;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4597:99;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;4137:448;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;3480:28;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;3434:37;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;;;:::i;:::-;;;;;;;;3517:612;3634:7;3683:6;3676:27;;;3704:10;3724:4;3731:7;3676:63;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;3654:96;;;;;;3776:1;3763:9;;:14;;;;;;;:::i;:::-;;;;;;;;3790:17;3828:7;3810:15;:25;;;;:::i;:::-;3790:45;;3867:141;;;;;;;;3894:10;3867:141;;;;;;3926:6;3867:141;;;;;;3955:7;3867:141;;;;3987:9;3867:141;;;3848:5;:16;3854:9;;3848:16;;;;;;;;;;;:160;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4026:58;4034:10;4046:6;4054:7;4063:9;4074;;4026:58;;;;;;;;;;:::i;:::-;;;;;;;;4112:9;;4105:16;;;3517:612;;;;;:::o;4597:99::-;4646:7;4673:15;4666:22;;4597:99;:::o;4137:448::-;4190:24;4217:5;:14;4223:7;4217:14;;;;;;;;;;;4190:41;;4273:10;4252:31;;:11;:17;;;;;;;;;;;;:31;;;4244:53;;;;;;;;;;;;:::i;:::-;;;;;;;;;4340:15;4316:11;:20;;;:39;;4308:72;;;;;;;;;;;;:::i;:::-;;;;;;;;;4400:11;:17;;;;;;;;;;;;4393:34;;;4428:10;4440:11;:18;;;4393:66;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;4477;4486:11;:17;;;;;;;;;;;;4505:11;:17;;;;;;;;;;;;4524:11;:18;;;4477:66;;;;;;;;:::i;:::-;;;;;;;;4563:5;:14;4569:7;4563:14;;;;;;;;;;;;4556:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4179:406;4137:448;:::o;3480:28::-;;;;:::o;3434:37::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;7:139;;;;:::o;152:137::-;206:5;237:6;231:13;222:22;;253:30;277:5;253:30;:::i;:::-;152:137;;;;:::o;295:139::-;341:5;379:6;366:20;357:29;;395:33;422:5;395:33;:::i;:::-;295:139;;;;:::o;440:619::-;517:6;525;533;582:2;570:9;561:7;557:23;553:32;550:119;;;588:79;;:::i;:::-;550:119;708:1;733:53;778:7;769:6;758:9;754:22;733:53;:::i;:::-;723:63;;679:117;835:2;861:53;906:7;897:6;886:9;882:22;861:53;:::i;:::-;851:63;;806:118;963:2;989:53;1034:7;1025:6;1014:9;1010:22;989:53;:::i;:::-;979:63;;934:118;440:619;;;;;:::o;1065:345::-;1132:6;1181:2;1169:9;1160:7;1156:23;1152:32;1149:119;;;1187:79;;:::i;:::-;1149:119;1307:1;1332:61;1385:7;1376:6;1365:9;1361:22;1332:61;:::i;:::-;1322:71;;1278:125;1065:345;;;;:::o;1416:329::-;1475:6;1524:2;1512:9;1503:7;1499:23;1495:32;1492:119;;;1530:79;;:::i;:::-;1492:119;1650:1;1675:53;1720:7;1711:6;1700:9;1696:22;1675:53;:::i;:::-;1665:63;;1621:117;1416:329;;;;:::o;1751:118::-;1838:24;1856:5;1838:24;:::i;:::-;1833:3;1826:37;1751:118;;:::o;1875:366::-;2017:3;2038:67;2102:2;2097:3;2038:67;:::i;:::-;2031:74;;2114:93;2203:3;2114:93;:::i;:::-;2232:2;2227:3;2223:12;2216:19;;1875:366;;;:::o;2247:365::-;2389:3;2410:66;2474:1;2469:3;2410:66;:::i;:::-;2403:73;;2485:93;2574:3;2485:93;:::i;:::-;2603:2;2598:3;2594:12;2587:19;;2247:365;;;:::o;2618:118::-;2705:24;2723:5;2705:24;:::i;:::-;2700:3;2693:37;2618:118;;:::o;2742:442::-;2891:4;2929:2;2918:9;2914:18;2906:26;;2942:71;3010:1;2999:9;2995:17;2986:6;2942:71;:::i;:::-;3023:72;3091:2;3080:9;3076:18;3067:6;3023:72;:::i;:::-;3105;3173:2;3162:9;3158:18;3149:6;3105:72;:::i;:::-;2742:442;;;;;;:::o;3190:553::-;3367:4;3405:3;3394:9;3390:19;3382:27;;3419:71;3487:1;3476:9;3472:17;3463:6;3419:71;:::i;:::-;3500:72;3568:2;3557:9;3553:18;3544:6;3500:72;:::i;:::-;3582;3650:2;3639:9;3635:18;3626:6;3582:72;:::i;:::-;3664;3732:2;3721:9;3717:18;3708:6;3664:72;:::i;:::-;3190:553;;;;;;;:::o;3749:664::-;3954:4;3992:3;3981:9;3977:19;3969:27;;4006:71;4074:1;4063:9;4059:17;4050:6;4006:71;:::i;:::-;4087:72;4155:2;4144:9;4140:18;4131:6;4087:72;:::i;:::-;4169;4237:2;4226:9;4222:18;4213:6;4169:72;:::i;:::-;4251;4319:2;4308:9;4304:18;4295:6;4251:72;:::i;:::-;4333:73;4401:3;4390:9;4386:19;4377:6;4333:73;:::i;:::-;3749:664;;;;;;;;:::o;4419:332::-;4540:4;4578:2;4567:9;4563:18;4555:26;;4591:71;4659:1;4648:9;4644:17;4635:6;4591:71;:::i;:::-;4672:72;4740:2;4729:9;4725:18;4716:6;4672:72;:::i;:::-;4419:332;;;;;:::o;4757:419::-;4923:4;4961:2;4950:9;4946:18;4938:26;;5010:9;5004:4;5000:20;4996:1;4985:9;4981:17;4974:47;5038:131;5164:4;5038:131;:::i;:::-;5030:139;;4757:419;;;:::o;5182:::-;5348:4;5386:2;5375:9;5371:18;5363:26;;5435:9;5429:4;5425:20;5421:1;5410:9;5406:17;5399:47;5463:131;5589:4;5463:131;:::i;:::-;5455:139;;5182:419;;;:::o;5607:222::-;5700:4;5738:2;5727:9;5723:18;5715:26;;5751:71;5819:1;5808:9;5804:17;5795:6;5751:71;:::i;:::-;5607:222;;;;:::o;5916:169::-;6000:11;6034:6;6029:3;6022:19;6074:4;6069:3;6065:14;6050:29;;5916:169;;;;:::o;6091:305::-;6131:3;6150:20;6168:1;6150:20;:::i;:::-;6145:25;;6184:20;6202:1;6184:20;:::i;:::-;6179:25;;6338:1;6270:66;6266:74;6263:1;6260:81;6257:107;;;6344:18;;:::i;:::-;6257:107;6388:1;6385;6381:9;6374:16;;6091:305;;;;:::o;6402:96::-;6439:7;6468:24;6486:5;6468:24;:::i;:::-;6457:35;;6402:96;;;:::o;6504:90::-;6538:7;6581:5;6574:13;6567:21;6556:32;;6504:90;;;:::o;6600:126::-;6637:7;6677:42;6670:5;6666:54;6655:65;;6600:126;;;:::o;6732:77::-;6769:7;6798:5;6787:16;;6732:77;;;:::o;6815:180::-;6863:77;6860:1;6853:88;6960:4;6957:1;6950:15;6984:4;6981:1;6974:15;7124:117;7233:1;7230;7223:12;7247:170;7387:22;7383:1;7375:6;7371:14;7364:46;7247:170;:::o;7423:159::-;7563:11;7559:1;7551:6;7547:14;7540:35;7423:159;:::o;7588:122::-;7661:24;7679:5;7661:24;:::i;:::-;7654:5;7651:35;7641:63;;7700:1;7697;7690:12;7641:63;7588:122;:::o;7716:116::-;7786:21;7801:5;7786:21;:::i;:::-;7779:5;7776:32;7766:60;;7822:1;7819;7812:12;7766:60;7716:116;:::o;7838:122::-;7911:24;7929:5;7911:24;:::i;:::-;7904:5;7901:35;7891:63;;7950:1;7947;7940:12;7891:63;7838:122;:::o

Swarm Source

ipfs://575c1ca9b8a29565464fd64b9da462513deac0f344484f93227c1129241ca191
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.