Contract 0x0e133d914b9b5fc31e1f694a7faaf2f18346c70f

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf202b554f7faac9b8c26da8359d380b2fe092b31d179c5f56f9ebad80d767e19Start Lock76024692021-05-21 13:11:30118 days 23 hrs ago0x711168b207720ee897a741d5bf2618ef81744d3e IN  0x0e133d914b9b5fc31e1f694a7faaf2f18346c70f0 BNB0.000311745
0x188843cba0e232007ce07eea0a3d75087cd34b4b7a38f67af9a3335d74cfaad10x6080604076021532021-05-21 12:55:38118 days 23 hrs ago0x711168b207720ee897a741d5bf2618ef81744d3e IN  Contract Creation0 BNB0.00152088
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HMCLock

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv3 license
/**
 *Submitted for verification at BscScan.com on 2021-05-21
*/

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.6.12;

interface BEP20 {

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

/**
 * @title HMCLock
 * @dev Lock tokens for the given time. 
 * You must first deposit your tokens in the contract before the lockup.
 * Only the owner of this contract will be able to withdraw at the end period.
 */
contract HMCLock {
    
    uint256 _date;
    uint256 _lockTime;
    address _owner;
    
    constructor() public {
        _owner = msg.sender;
    }
    
    modifier isOwner {
        require(msg.sender == _owner, "You must be the owner");
        _;
    }
    
    event received(address, uint);
    event withdraw(address tokenContract, address to, uint256 amount);
    
    /**
     * @dev Start the Lock of the contract
     * @param date Date
     */
    function StartLock(uint256 date) isOwner external {
        _date = now;
        _lockTime = _date + date;
    }
    
    /**
     * @dev Send Tokens to the owner of this contract at the end lock period
     */
    function WithdrawTokens(address tokenContract) isOwner external {
        require(now >= _lockTime, "The contract is locked");
        BEP20 token = BEP20(tokenContract);
        uint256 balance = token.balanceOf(address(this));
        token.transfer(_owner, balance);
        emit withdraw(tokenContract, msg.sender, balance);
    }
    
    /**
     * @dev Payable contract - HMC Tokens
     */
    receive() external payable {
        emit received(msg.sender, msg.value);
    }
    
    /**
     * @dev Return Start lock up date  
     * @return uint256 date 
     */
    function StartDateLock() public view returns(uint256){
        return _date;
    }
    
    /**
     * @dev Return Current date
     * @return uint256 date 
     */
    function Date() public view returns(uint256){
        return now;
    }
    
    /**
     * @dev Return the end of LockTime
     * @return uint256 LockTime
     */
    function LockEndTime() public view returns(uint256){
        return _lockTime;
    }
    
    /**
     * @dev Return Owner address 
     * @return address owner
     */
    function Owner() public view returns(address){
        return _owner;
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"uint256","name":"","type":"uint256"}],"name":"received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenContract","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","type":"event"},{"inputs":[],"name":"Date","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LockEndTime","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":"StartDateLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"date","type":"uint256"}],"name":"StartLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"}],"name":"WithdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b50600280546001600160a01b03191633179055610428806100326000396000f3fe6080604052600436106100595760003560e01c80631ca989cf1461009f578063240382a5146100c65780636a21a584146100db5780639131a05a146100f0578063969b58b514610125578063b4a99a4e1461014f5761009a565b3661009a576040805133815234602082015281517ff11e547d796cc64acdf758e7cee90439494fd886a19159454aa61e473fdbafef929181900390910190a1005b600080fd5b3480156100ab57600080fd5b506100b4610180565b60408051918252519081900360200190f35b3480156100d257600080fd5b506100b4610184565b3480156100e757600080fd5b506100b461018a565b3480156100fc57600080fd5b506101236004803603602081101561011357600080fd5b50356001600160a01b0316610190565b005b34801561013157600080fd5b506101236004803603602081101561014857600080fd5b5035610380565b34801561015b57600080fd5b506101646103e3565b604080516001600160a01b039092168252519081900360200190f35b4290565b60005490565b60015490565b6002546001600160a01b031633146101e7576040805162461bcd60e51b81526020600482015260156024820152742cb7ba9036bab9ba103132903a34329037bbb732b960591b604482015290519081900360640190fd5b600154421015610237576040805162461bcd60e51b8152602060048201526016602482015275151a194818dbdb9d1c9858dd081a5cc81b1bd8dad95960521b604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905182916000916001600160a01b038416916370a08231916024808301926020929190829003018186803b15801561028257600080fd5b505afa158015610296573d6000803e3d6000fd5b505050506040513d60208110156102ac57600080fd5b50516002546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810184905290519293509084169163a9059cbb916044808201926020929091908290030181600087803b15801561030757600080fd5b505af115801561031b573d6000803e3d6000fd5b505050506040513d602081101561033157600080fd5b5050604080516001600160a01b038516815233602082015280820183905290517fd9caed12f81c440f63c9677a4301dff8e874a7abd93e3ecd0aaea4ffa129d9fb9181900360600190a1505050565b6002546001600160a01b031633146103d7576040805162461bcd60e51b81526020600482015260156024820152742cb7ba9036bab9ba103132903a34329037bbb732b960591b604482015290519081900360640190fd5b42600081905501600155565b6002546001600160a01b03169056fea2646970667358221220c2735b2588c60fc2b0dd07433a8843ff8275bb3fb1ed2d24d039367c3c8d481d64736f6c634300060c0033

Deployed ByteCode Sourcemap

1032:1920:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2198:31;;;2207:10;2198:31;;2219:9;2198:31;;;;;;;;;;;;;;;;;1032:1920;;;;;2515:73;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;2338:84;;;;;;;;;;;;;:::i;2691:86::-;;;;;;;;;;;;;:::i;1742:340::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1742:340:0;-1:-1:-1;;;;;1742:340:0;;:::i;:::-;;1519:115;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1519:115:0;;:::i;2872:77::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;2872:77:0;;;;;;;;;;;;;;2515:73;2577:3;2515:73;:::o;2338:84::-;2383:7;2409:5;2338:84;:::o;2691:86::-;2760:9;;2691:86;:::o;1742:340::-;1254:6;;-1:-1:-1;;;;;1254:6:0;1240:10;:20;1232:54;;;;;-1:-1:-1;;;1232:54:0;;;;;;;;;;;;-1:-1:-1;;;1232:54:0;;;;;;;;;;;;;;;1832:9:::1;;1825:3;:16;;1817:51;;;::::0;;-1:-1:-1;;;1817:51:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;-1:-1:-1;;;1817:51:0;;;;;;;;;;;;;::::1;;1942:30;::::0;;-1:-1:-1;;;1942:30:0;;1966:4:::1;1942:30;::::0;::::1;::::0;;;1899:13;;1879:11:::1;::::0;-1:-1:-1;;;;;1942:15:0;::::1;::::0;::::1;::::0;:30;;;;;::::1;::::0;;;;;;;;:15;:30;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;1942:30:0;1998:6:::1;::::0;1983:31:::1;::::0;;-1:-1:-1;;;1983:31:0;;-1:-1:-1;;;;;1998:6:0;;::::1;1983:31;::::0;::::1;::::0;;;;;;;;;1942:30;;-1:-1:-1;1983:14:0;;::::1;::::0;::::1;::::0;:31;;;;;1942:30:::1;::::0;1983:31;;;;;;;;1998:6:::1;1983:14:::0;:31;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;2030:44:0::1;::::0;;-1:-1:-1;;;;;2030:44:0;::::1;::::0;;2054:10:::1;1983:31;2030:44:::0;::::1;::::0;;;;;;;;;::::1;::::0;;;;;;;::::1;1297:1;;1742:340:::0;:::o;1519:115::-;1254:6;;-1:-1:-1;;;;;1254:6:0;1240:10;:20;1232:54;;;;;-1:-1:-1;;;1232:54:0;;;;;;;;;;;;-1:-1:-1;;;1232:54:0;;;;;;;;;;;;;;;1588:3:::1;1580:5;:11:::0;;;1614:12:::1;1602:9;:24:::0;1519:115::o;2872:77::-;2935:6;;-1:-1:-1;;;;;2935:6:0;2872:77;:::o

Swarm Source

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