Contract 0xe287982d82b2b6d27db3a41bd7179def69503106 1

 

Contract Overview

Balance:
0 BNB

BNB Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x941ac399f6b6f4c944733a09641ac67e816f6130013700a262ac32e77ab52a9dGet Airdrop107641332021-09-09 12:47:0315 days 6 hrs ago0x24fee70e5940e9b211de8089b09c307921258eef IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000111455
0xc449ad8a1ec7d7f177bcd04a4d1e34eed5a28f4c47fee6487a63fb1abbcb66d0Get Airdrop102396882021-08-22 3:03:0233 days 15 hrs ago0x8cc7f389ba61ec4c305b89f65626d2a8c4496aba IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x03303abd4aa4f138a9811527fd28acd698c75a10786b05328488ab459d6271f4Get Airdrop98549362021-08-08 14:13:0347 days 4 hrs ago0xd365a4d21d3f169d5be60470bfb75ebe2007e091 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000111455
0x4638d54854ce37008574cccf6e822d3957ce09c6a91843d0f3c5f134d92dfbaaTransfer96802942021-08-02 7:26:0353 days 11 hrs ago0x348a3966319b3bb41b23153893e24dcd7a1429eb IN  0xe287982d82b2b6d27db3a41bd7179def695031060.000005 BNB0.000105
0xefd39f41684a95e029b4e129dbb6193c4c77e33af59ae6d3a3e4679ebb6782a4Get Airdrop96243702021-07-31 7:16:2955 days 11 hrs ago0xf8a898cfa605c249d1b9e1c0709a1da104edf565 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x726b87c32e6a40193d8fd047b10645d3fe341e410d3a370a6197635b2c2248f0Transfer96048632021-07-30 14:50:4356 days 3 hrs ago0x9b3c3554a5f0b7731e4f82f05be2ad070d78e3fc IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000105
0xf67a92cf67d46fcfd446dda89382f8dc869b1ec1e9629cc8e22a575ea7640093Get Airdrop96015172021-07-30 11:57:2356 days 6 hrs ago0xe63c05565565ac91aaa46b6536e167529509681c IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000111455
0x6309539eceee04457413dea13bce5f6af8b046d33badc047a9481d07998ecafeGet Airdrop95383562021-07-28 4:00:3858 days 14 hrs ago0x45da129bb3524ac5bab539651321b67723664c77 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x29e404e1e468cdbb5711ae3e957e66326c241332a9346ccd5d34d479263a219fGet Airdrop93520002021-07-21 13:30:1965 days 5 hrs ago0xe46ec10613de0d595fd54e06b289d8919008b0cb IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x586fb4a63f4ff279c5ce1569a2831fafa8ee6dc9fd4daad695f3f1175fc8280aGet Airdrop91977222021-07-16 4:51:3570 days 13 hrs ago0xe2356cb94779b7849c8f06508b5f899d82a8d563 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0xe4c2fdf5e0026ac1dc25dd3da5b11b6ceca5f31a664338840a90aa3397f9c965Get Airdrop91554692021-07-14 17:37:3172 days 1 hr ago0x72762f09f91f16b0462fbadbc9367988fcf304fb IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x72190ee97b45d171dfa2246b9be20cdb9741a53928504613aa1503035c2e1f45Get Airdrop90918782021-07-12 12:37:5674 days 6 hrs ago0xedae33e6ba8b719f38c935016bf54724aaf0e7a8 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x802fc9eeeff391646965ecabd018a8911f9d86a288a8c80d946978089924e66eGet Airdrop90397862021-07-10 17:13:0076 days 1 hr ago0x58aa43a7d73258e7f04ceafb46c81d1855cae3c1 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000111455
0x4041fa67db31e1c9da892a257952f396d3bde84498ef7db2a7b21c05d4a8649fGet Airdrop90014442021-07-09 9:15:3377 days 9 hrs ago0x05c8f326113fed6594417fa9a6fae67d333465cb IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x33960b927902a8429494b7dbf9673cee5f413d0a095f6b0b095202e9fdd5f451Get Airdrop90006622021-07-09 8:36:2777 days 10 hrs ago0x0ffe8e147f8a7a6c32ac127390fd4d00b0d66d7e IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0xd01057a7774d910d2d7e691811b8af73fe80f118e1dadc62426cfbed525fe66eGet Airdrop89907952021-07-09 0:23:0677 days 18 hrs ago0x949fff2afa180941232cf89fcb06354d79dcacf1 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x147cea4b238aeface087b5489309625925cf21bf9f00a272fe200b5e6319b9f6Get Airdrop89754992021-07-08 11:37:2278 days 7 hrs ago0xdcb00ab80e43ea6d20b36bc666b59102526c0a56 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x08205f1a80ff5dc61ebb6b2198201826837e1bf7d26791f7ecd3d02528e0ba67Get Airdrop89746202021-07-08 10:53:2378 days 7 hrs ago0xa368cf50aa77624ad21fa296c7f2794d79b83a9c IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0xbcf5d587df43671135ba3505ab652b97ace4c3f2c0be8a2e95b459250b31da8aGet Airdrop89668662021-07-08 4:25:4178 days 14 hrs ago0x949fff2afa180941232cf89fcb06354d79dcacf1 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x31515b9503993360fa29990f7170fc8cc2ff9a38377f0a527497e1c378c10111Get Airdrop89668252021-07-08 4:23:3878 days 14 hrs ago0x949fff2afa180941232cf89fcb06354d79dcacf1 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0xcd95596c48483eb247a7d0a1da2667ee003e5f0cea37fb6671a7e6abc32f23b4Get Airdrop89668032021-07-08 4:22:3278 days 14 hrs ago0x949fff2afa180941232cf89fcb06354d79dcacf1 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x1ae9cac7f59f93855e6a4f10b30ff944b246f3e9cde85dc41baa1faf692d2551Get Airdrop89232632021-07-06 16:04:2680 days 2 hrs ago0xe4df98406f038be4a09df051aafd4f176d53d7b0 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x34614134984bbceae9e7ce783f92836f438f9c06eaa9ed48d4f29acc73f98de3Get Airdrop89140132021-07-06 8:18:3080 days 10 hrs ago0x6e6c3d118e50024504a4c0eec17eb3341f17e5c2 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x8a81ad21537ea249800296accdaad0cf8f5115ea40115886d9cd9b655e5a4d5eGet Airdrop89016162021-07-05 21:51:4580 days 20 hrs ago0xea6b52469a6903634502f10083a0926a3c1a922b IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
0x46c319bb2bff98faed4264af0965ed497984a7e74288efedbc4e7ff271c8c5c0Get Airdrop88906292021-07-05 12:34:5981 days 6 hrs ago0x96ce975a75d7e0450fa3518b34d8a8cac259aac0 IN  0xe287982d82b2b6d27db3a41bd7179def695031060 BNB0.000115585
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Airdrop

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : Airdrop.sol
pragma solidity >=0.5.16;

import "openzeppelin-solidity/contracts/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
import "openzeppelin-solidity/contracts/ownership/Ownable.sol";
import "./ILemd.sol";

contract Airdrop is Ownable {
    using SafeMath for uint256;
    using SafeERC20 for IERC20;

    ILemd public token;
    uint256 public starttime;
    uint256 ticketID = 1;
    uint256 public totalAmount = 0;
    mapping(address=>uint256) public amounts;
    mapping(uint256=>address) public tickets;
    mapping(address=>uint256) public ticketIDs;
    uint256[] public prizeArr = [500, 200, 100, 10, 5, 1];
    uint256[] public prizeRank1;
    uint256[] public prizeRank2;
    uint256[] public prizeRank3;
    uint256[] public prizeRank4;
    uint256[] public prizeRank5;
    uint256[] public prizeRank6;

    constructor(address _token, uint256 _starttime) public{
        token = ILemd(_token);
        starttime = _starttime;
    }

    function getTotalNumberTicketID() public returns(uint256) {
        return ticketID;
    }

    function setStartTime(uint256 _starttime) public onlyOwner{
        starttime = _starttime;
    }

    function getAirdrop() public returns(uint256){
        require(amounts[msg.sender] == 0, "Have to attend.");
        require(totalAmount <= 45000 * 10 ** 18, "The airdrop is end.");
        uint256 amount = 0;
        amount = (importSeedFromThird(9 * 10 **18,block.difficulty).add(1 * 10 **18));
        tickets[ticketID] = msg.sender;
        ticketIDs[msg.sender] = ticketID;
        amounts[msg.sender] = amount;
        ticketID = ticketID.add(1);
        totalAmount = totalAmount.add(amount);
        if(totalAmount >= 45000 * 10 ** 18){
            if(prizeArr[0] != 0){
                uint256 rand =  importSeedFromThird(1000,block.difficulty);
                if(rand <= 1){
                    prizeArr[0] = prizeArr[0].sub(1);
                    prizeRank1.push(ticketID);
                }
            }else if(prizeArr[1] != 0){
                 uint256 rand =  importSeedFromThird(2500,block.difficulty);
                if(rand <= 1){
                    prizeArr[1] = prizeArr[1].sub(1);
                    prizeRank2.push(ticketID);
                }
            }else if(prizeArr[2] != 0){
                 uint256 rand =  importSeedFromThird(5000,block.difficulty);
                if(rand <= 1){
                    prizeArr[2] = prizeArr[2].sub(1);
                    prizeRank3.push(ticketID);
                }
            }else if(prizeArr[3] != 0){
                 uint256 rand =  importSeedFromThird(50000,block.difficulty);
                if(rand <= 1){
                    prizeArr[3] = prizeArr[3].sub(1);
                    prizeRank4.push(ticketID);
                }
            }else if(prizeArr[4] != 0){
                 uint256 rand =  importSeedFromThird(100000,block.difficulty);
                if(rand <= 1){
                    prizeArr[4] = prizeArr[4].sub(1);
                    prizeRank5.push(ticketID);
                }
            }else if(prizeArr[5] != 0){
                 uint256 rand =  importSeedFromThird(500000,block.difficulty);
                if(rand <= 1){
                    prizeArr[5] = prizeArr[5].sub(1);
                    prizeRank6.push(ticketID);
                }
            }
        }
        return ticketID;
    }

    function importSeedFromThird(uint256 upper, uint256 seed) public view returns (uint256) {
        uint256 randomNumber = uint256(keccak256(abi.encodePacked(block.timestamp, seed))) ;
        return randomNumber % upper;
    }

    modifier checkStart() {
        require(block.timestamp >= starttime, 'Not start');
        _;
    }

    function getPrize() public checkStart{
        require(amounts[msg.sender] != 0, "Did not attend");
        token.mint(msg.sender, amounts[msg.sender]);
        amounts[msg.sender] = 0;
    }

}

File 2 of 8 : SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

File 3 of 8 : SafeERC20.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";
import "../../math/SafeMath.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 ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    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));
    }

    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'
        // solhint-disable-next-line max-line-length
        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).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 4 of 8 : Ownable.sol
pragma solidity ^0.5.0;

import "../GSN/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.
 *
 * 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.
 */
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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _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 onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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 onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 5 of 8 : ILemd.sol
pragma solidity 0.5.16;

interface ILemd {
    function mint(address _account, uint256 _amount) external;
}

File 6 of 8 : IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
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 7 of 8 : Address.sol
pragma solidity ^0.5.5;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

    /**
     * @dev Converts an `address` into `address payable`. Note that this is
     * simply a type cast: the actual underlying value is not changed.
     *
     * _Available since v2.4.0._
     */
    function toPayable(address account) internal pure returns (address payable) {
        return address(uint160(account));
    }

    /**
     * @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].
     *
     * _Available since v2.4.0._
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-call-value
        (bool success, ) = recipient.call.value(amount)("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }
}

File 8 of 8 : Context.sol
pragma solidity ^0.5.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 GSN 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.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_starttime","type":"uint256"}],"payable":false,"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"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"amounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getAirdrop","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getPrize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getTotalNumberTicketID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"upper","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"importSeedFromThird","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeArr","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank3","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank4","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank5","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"prizeRank6","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_starttime","type":"uint256"}],"name":"setStartTime","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"starttime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ticketIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tickets","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"internalType":"contract ILemd","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

6001600381905560006004556101406040526101f4608090815260c860a052606460c052600a60e05260056101005261012091909152610043906008906006610107565b5034801561005057600080fd5b506040516110243803806110248339818101604052604081101561007357600080fd5b508051602090910151600061008f6001600160e01b0361010216565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b039390931692909217909155600255610172565b335b90565b828054828255906000526020600020908101928215610148579160200282015b82811115610148578251829061ffff16905591602001919060010190610127565b50610154929150610158565b5090565b61010491905b80821115610154576000815560010161015e565b610ea3806101816000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c8063715018a6116100b85780638f32d59b1161007c5780638f32d59b146102f657806396402d8e14610312578063c34f6b0d1461032f578063d25f82a014610337578063f2fde38b1461033f578063fc0c546a1461036557610142565b8063715018a6146102a4578063897fe84b146102ac5780638cf2bb69146102c95780638da58897146102e65780638da5cb5b146102ee57610142565b80633336f0cf1161010a5780633336f0cf146101c05780633e0a322d146101e357806350b447121461020257806355a3b2c11461023b5780635710d675146102615780635bcb3d221461027e57610142565b80630412ab801461014757806311f0141914610176578063124da250146101935780631a39d8ef146101b05780633235e7e4146101b8575b600080fd5b6101646004803603602081101561015d57600080fd5b503561036d565b60408051918252519081900360200190f35b6101646004803603602081101561018c57600080fd5b503561038b565b610164600480360360208110156101a957600080fd5b5035610398565b6101646103a5565b6101646103ab565b610164600480360360408110156101d657600080fd5b50803590602001356103b1565b610200600480360360208110156101f957600080fd5b50356103f0565b005b61021f6004803603602081101561021857600080fd5b503561044e565b604080516001600160a01b039092168252519081900360200190f35b6101646004803603602081101561025157600080fd5b50356001600160a01b0316610469565b6101646004803603602081101561027757600080fd5b503561047b565b6101646004803603602081101561029457600080fd5b50356001600160a01b0316610488565b61020061049a565b610164600480360360208110156102c257600080fd5b503561053d565b610164600480360360208110156102df57600080fd5b503561054a565b610164610557565b61021f61055d565b6102fe61056c565b604080519115158252519081900360200190f35b6101646004803603602081101561032857600080fd5b5035610590565b61020061059d565b6101646106b9565b6102006004803603602081101561035557600080fd5b50356001600160a01b0316610bf6565b61021f610c5b565b600c818154811061037a57fe5b600091825260209091200154905081565b600b818154811061037a57fe5b600a818154811061037a57fe5b60045481565b60035490565b6040805142602080830191909152818301849052825180830384018152606090920190925280519101206000908381816103e757fe5b06949350505050565b6103f861056c565b610449576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600255565b6006602052600090815260409020546001600160a01b031681565b60056020526000908152604090205481565b6009818154811061037a57fe5b60076020526000908152604090205481565b6104a261056c565b6104f3576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6008818154811061037a57fe5b600e818154811061037a57fe5b60025481565b6000546001600160a01b031690565b600080546001600160a01b0316610581610c6a565b6001600160a01b031614905090565b600d818154811061037a57fe5b6002544210156105e0576040805162461bcd60e51b8152602060048201526009602482015268139bdd081cdd185c9d60ba1b604482015290519081900360640190fd5b33600090815260056020526040902054610632576040805162461bcd60e51b815260206004820152600e60248201526d111a59081b9bdd08185d1d195b9960921b604482015290519081900360640190fd5b600154336000818152600560205260408082205481516340c10f1960e01b815260048101949094526024840152516001600160a01b03909316926340c10f1992604480820193929182900301818387803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b5050336000908152600560205260408120555050565b336000908152600560205260408120541561070d576040805162461bcd60e51b815260206004820152600f60248201526e2430bb32903a379030ba3a32b7321760891b604482015290519081900360640190fd5b69098774738bc8222000006004541115610764576040805162461bcd60e51b81526020600482015260136024820152722a34329030b4b9323937b81034b99032b7321760691b604482015290519081900360640190fd5b6000610790670de0b6b3a7640000610784677ce66c50e2840000446103b1565b9063ffffffff610c6e16565b60038054600090815260066020908152604080832080546001600160a01b031916339081179091558454908452600783528184205560059091529020829055549091506107e490600163ffffffff610c6e16565b6003556004546107fa908263ffffffff610c6e16565b600481905569098774738bc82220000011610bee57600860008154811061081d57fe5b90600052602060002001546000146108ca57600061083d6103e8446103b1565b9050600181116108c4576108736001600860008154811061085a57fe5b9060005260206000200154610ccf90919063ffffffff16565b600860008154811061088157fe5b60009182526020822001919091556003546009805460018101825592527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af909101555b50610bee565b60086001815481106108d857fe5b906000526020600020015460001461096b5760006108f86109c4446103b1565b9050600181116108c4576109156001600860018154811061085a57fe5b600860018154811061092357fe5b6000918252602082200191909155600354600a805460018101825592527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a89091015550610bee565b600860028154811061097957fe5b9060005260206000200154600014610a0c576000610999611388446103b1565b9050600181116108c4576109b66001600860028154811061085a57fe5b60086002815481106109c457fe5b6000918252602082200191909155600354600b805460018101825592527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db99091015550610bee565b6008600381548110610a1a57fe5b9060005260206000200154600014610aad576000610a3a61c350446103b1565b9050600181116108c457610a576001600860038154811061085a57fe5b6008600381548110610a6557fe5b6000918252602082200191909155600354600c805460018101825592527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c79091015550610bee565b6008600481548110610abb57fe5b9060005260206000200154600014610b4f576000610adc620186a0446103b1565b9050600181116108c457610af96001600860048154811061085a57fe5b6008600481548110610b0757fe5b6000918252602082200191909155600354600d805460018101825592527fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb59091015550610bee565b6008600581548110610b5d57fe5b9060005260206000200154600014610bee576000610b7e6207a120446103b1565b905060018111610bec57610b9b6001600860058154811061085a57fe5b6008600581548110610ba957fe5b6000918252602082200191909155600354600e805460018101825592527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd909101555b505b505060035490565b610bfe61056c565b610c4f576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b610c5881610d11565b50565b6001546001600160a01b031681565b3390565b600082820183811015610cc8576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6000610cc883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610db1565b6001600160a01b038116610d565760405162461bcd60e51b8152600401808060200182810382526026815260200180610e496026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008184841115610e405760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610e05578181015183820152602001610ded565b50505050905090810190601f168015610e325780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a723158200b94426ef530b83a40dba71354497b2adb2901d544ecb4b46613989567277ad564736f6c63430005100032000000000000000000000000c0e8c16e54653736f9b96ddcc206bc1d9ae635080000000000000000000000000000000000000000000000000000000000000000

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

000000000000000000000000c0e8c16e54653736f9b96ddcc206bc1d9ae635080000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _token (address): 0xc0e8c16e54653736f9b96ddcc206bc1d9ae63508
Arg [1] : _starttime (uint256): 0

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c0e8c16e54653736f9b96ddcc206bc1d9ae63508
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000


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.