ETH Price: $1,909.32 (+4.27%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy180796662023-09-06 20:05:11902 days ago1694030711IN
0x2DCdd9cc...b06d5Fbe8
0.3 ETH0.0011298515.65000001
Buy180792962023-09-06 18:49:35902 days ago1694026175IN
0x2DCdd9cc...b06d5Fbe8
0.00003562 ETH0.001453220.7192017
Buy180785312023-09-06 16:15:59902 days ago1694016959IN
0x2DCdd9cc...b06d5Fbe8
0.000125 ETH0.0034642833.20256897
Buy180784822023-09-06 16:06:11902 days ago1694016371IN
0x2DCdd9cc...b06d5Fbe8
0.00975 ETH0.0021677230.90650773
Buy180784792023-09-06 16:05:35902 days ago1694016335IN
0x2DCdd9cc...b06d5Fbe8
0.1125 ETH0.0033569932.17423197
Buy180784762023-09-06 16:04:59902 days ago1694016299IN
0x2DCdd9cc...b06d5Fbe8
0.4 ETH0.002296531.80972829
Buy180784752023-09-06 16:04:47902 days ago1694016287IN
0x2DCdd9cc...b06d5Fbe8
0.5 ETH0.0033123131.74604958
Buy180784732023-09-06 16:04:23902 days ago1694016263IN
0x2DCdd9cc...b06d5Fbe8
0.05 ETH0.0034719333.27584185
Buy180784732023-09-06 16:04:23902 days ago1694016263IN
0x2DCdd9cc...b06d5Fbe8
0.5 ETH0.003492833.47584185
Buy180784722023-09-06 16:04:11902 days ago1694016251IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.0035121733.66149163
Buy180784702023-09-06 16:03:47902 days ago1694016227IN
0x2DCdd9cc...b06d5Fbe8
1.5 ETH0.003810336.51889734
Buy180784692023-09-06 16:03:35902 days ago1694016215IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.0038059236.47689839
Buy180784672023-09-06 16:03:11902 days ago1694016191IN
0x2DCdd9cc...b06d5Fbe8
1 ETH0.0025178435.89846499
Buy180784672023-09-06 16:03:11902 days ago1694016191IN
0x2DCdd9cc...b06d5Fbe8
0.16 ETH0.0037455735.89846499
Buy180784662023-09-06 16:02:59902 days ago1694016179IN
0x2DCdd9cc...b06d5Fbe8
0.25 ETH0.0037711136.14326605
Buy180784642023-09-06 16:02:35902 days ago1694016155IN
0x2DCdd9cc...b06d5Fbe8
1 ETH0.0037327935.77599704
Buy180784622023-09-06 16:02:11902 days ago1694016131IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.0040821239.1240874
Buy180784602023-09-06 16:01:47902 days ago1694016107IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.00430741.27932848
Buy180784592023-09-06 16:01:35902 days ago1694016095IN
0x2DCdd9cc...b06d5Fbe8
0.1 ETH0.0026689938.05344314
Buy180784542023-09-06 16:00:23902 days ago1694016023IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.0031873330.54815157
Buy180784502023-09-06 15:59:35902 days ago1694015975IN
0x2DCdd9cc...b06d5Fbe8
1 ETH0.0028281327.10555831
Buy180784422023-09-06 15:57:47902 days ago1694015867IN
0x2DCdd9cc...b06d5Fbe8
2 ETH0.0040601338.91332915
Buy180784382023-09-06 15:56:59902 days ago1694015819IN
0x2DCdd9cc...b06d5Fbe8
0.25 ETH0.0028712527.51875416
Buy180784382023-09-06 15:56:59902 days ago1694015819IN
0x2DCdd9cc...b06d5Fbe8
0.5 ETH0.0019301127.51875416
Buy180784372023-09-06 15:56:47902 days ago1694015807IN
0x2DCdd9cc...b06d5Fbe8
1 ETH0.0026032924.95056125
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer180887132023-09-08 2:26:47901 days ago1694140007
0x2DCdd9cc...b06d5Fbe8
74.99999987 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PublicSale

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import {SafeERC20} from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import {Ownable} from '@openzeppelin/contracts/access/Ownable.sol';
import {Pausable} from '@openzeppelin/contracts/security/Pausable.sol';
import {ReentrancyGuard} from '@openzeppelin/contracts/security/ReentrancyGuard.sol';

import {IERC20MintableBurnable} from '../interfaces/IERC20MintableBurnable.sol';

error INVALID_AMOUNT();
error NO_ETHER();
error LIMIT_ETHER();
error EXCEED_SALE();
error NOT_STARTED();
error ALREADY_ENDED();

contract PublicSale is Ownable, Pausable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    /// @notice SHEZMU
    IERC20MintableBurnable public immutable SHEZMU;

    /// @notice total shezmu amount
    uint256 public totalShezmuAmount;

    /// @notice total eth amount
    uint256 public totalEthAmount;

    /// @notice sold shezmu amount
    uint256 public shezmuAmount;

    /// @notice received eth amount
    uint256 public ethAmount;

    /// @notice start timestamp
    uint256 public startTimestamp;

    /// @notice end timestamp
    uint256 public endTimestamp;

    /// @notice limit eth per user
    uint256 public limitEth = 2 ether;

    /// @notice user => eth
    mapping(address => uint256) public userEth;

    /* ======== EVENTS ======== */

    event Sale(
        address indexed account,
        uint256 ethAmount,
        uint256 shezmuAmount
    );

    /* ======== INITIALIZATION ======== */

    constructor(
        IERC20MintableBurnable shezmu,
        uint256 totalShezmu,
        uint256 totalEth,
        uint256 start,
        uint256 end
    ) {
        require(totalShezmu > 0 && totalEth > 0);
        require(end > start && start > block.timestamp);

        SHEZMU = shezmu;
        totalShezmuAmount = totalShezmu;
        totalEthAmount = totalEth;
        startTimestamp = start;
        endTimestamp = end;
    }

    receive() external payable {}

    /* ======== POLICY FUNCTIONS ======== */

    function setTotalAmount(
        uint256 totalShezmu,
        uint256 totalEth
    ) external onlyOwner {
        if (totalShezmu == 0 || totalEth == 0) revert INVALID_AMOUNT();

        totalShezmuAmount = totalShezmu;
        totalEthAmount = totalEth;
    }

    function setTimestamp(uint256 start, uint256 end) external onlyOwner {
        if (end < block.timestamp || start >= end) revert ALREADY_ENDED();

        startTimestamp = start;
        endTimestamp = end;
    }

    function setLimitEth(uint256 eth) external onlyOwner {
        if (eth == 0) revert NO_ETHER();

        limitEth = eth;
    }

    function withdrawETH(address payable to) external onlyOwner {
        (bool sent, ) = to.call{value: address(this).balance}('');
        require(sent, 'Failed to send Ether');
    }

    function recoverERC20(IERC20 asset, address to) external onlyOwner {
        asset.safeTransfer(to, asset.balanceOf(address(this)));
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }

    /* ======== PUBLIC FUNCTIONS ======== */

    function maxEth(address account) external view returns (uint256) {
        return limitEth - userEth[account];
    }

    function buy() external payable whenNotPaused nonReentrant {
        if (startTimestamp > block.timestamp) revert NOT_STARTED();
        if (endTimestamp < block.timestamp) revert ALREADY_ENDED();

        uint256 eth = msg.value;
        if (eth == 0) revert NO_ETHER();

        address account = _msgSender();
        userEth[account] += eth;
        if (userEth[account] > limitEth) revert LIMIT_ETHER();

        uint256 amount = (eth * totalShezmuAmount) / totalEthAmount;
        shezmuAmount += amount;
        ethAmount += eth;

        if (shezmuAmount > totalShezmuAmount) revert EXCEED_SALE();

        SHEZMU.mint(account, amount);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)

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() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/IERC20Permit.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;

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to
     * 0 before setting it to a non-zero value.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

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

// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

interface IERC20MintableBurnable {
    function mint(address to, uint256 amount) external;

    function burn(uint256 amount) external;

    function burnFrom(address account, uint256 amount) external;
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IERC20MintableBurnable","name":"shezmu","type":"address"},{"internalType":"uint256","name":"totalShezmu","type":"uint256"},{"internalType":"uint256","name":"totalEth","type":"uint256"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ALREADY_ENDED","type":"error"},{"inputs":[],"name":"EXCEED_SALE","type":"error"},{"inputs":[],"name":"INVALID_AMOUNT","type":"error"},{"inputs":[],"name":"LIMIT_ETHER","type":"error"},{"inputs":[],"name":"NOT_STARTED","type":"error"},{"inputs":[],"name":"NO_ETHER","type":"error"},{"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shezmuAmount","type":"uint256"}],"name":"Sale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"SHEZMU","outputs":[{"internalType":"contract IERC20MintableBurnable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"endTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limitEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"maxEth","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"asset","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"eth","type":"uint256"}],"name":"setLimitEth","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"setTimestamp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"totalShezmu","type":"uint256"},{"internalType":"uint256","name":"totalEth","type":"uint256"}],"name":"setTotalAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shezmuAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEthAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShezmuAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userEth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a0604052671bc16d674ec8000060085534801561001c57600080fd5b506040516110cd3803806110cd83398101604081905261003b916100f6565b610044336100a6565b6000805460ff60a01b191690556001805583158015906100645750600083115b61006d57600080fd5b818111801561007b57504282115b61008457600080fd5b6001600160a01b0390941660805260029290925560035560065560075561014b565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600080600060a0868803121561010e57600080fd5b85516001600160a01b038116811461012557600080fd5b602087015160408801516060890151608090990151929a91995097965090945092505050565b608051610f6061016d600039600081816102e0015261071a0152610f606000f3fe6080604052600436106101395760003560e01c80638da5cb5b116100ab578063b20b3bee1161006f578063b20b3bee14610336578063c6eae0c514610356578063c98166c01461036c578063d160c7a914610382578063e6fd48bc146103a2578063f2fde38b146103b857600080fd5b80638da5cb5b1461029c5780638de43c1f146102ce5780638ebc752c14610302578063a6f2ae3a14610318578063a85adeab1461032057600080fd5b80635c975abb116100fd5780635c975abb146101f2578063690d83201461021c578063715018a61461023c578063826baaf9146102515780638456cb5914610267578063886f039a1461027c57600080fd5b80630429b9ca146101455780631984708f1461016e5780632e1bbe981461019b57806330da333d146101bd5780633f4ba83a146101dd57600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5061015b60035481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061015b610189366004610d6f565b60096020526000908152604090205481565b3480156101a757600080fd5b506101bb6101b6366004610d93565b6103d8565b005b3480156101c957600080fd5b506101bb6101d8366004610dac565b610406565b3480156101e957600080fd5b506101bb610442565b3480156101fe57600080fd5b50600054600160a01b900460ff166040519015158152602001610165565b34801561022857600080fd5b506101bb610237366004610d6f565b610454565b34801561024857600080fd5b506101bb6104ff565b34801561025d57600080fd5b5061015b60045481565b34801561027357600080fd5b506101bb610511565b34801561028857600080fd5b506101bb610297366004610dce565b610521565b3480156102a857600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610165565b3480156102da57600080fd5b506102b67f000000000000000000000000000000000000000000000000000000000000000081565b34801561030e57600080fd5b5061015b60025481565b6101bb6105a8565b34801561032c57600080fd5b5061015b60075481565b34801561034257600080fd5b5061015b610351366004610d6f565b610782565b34801561036257600080fd5b5061015b60085481565b34801561037857600080fd5b5061015b60055481565b34801561038e57600080fd5b506101bb61039d366004610dac565b6107ae565b3480156103ae57600080fd5b5061015b60065481565b3480156103c457600080fd5b506101bb6103d3366004610d6f565b6107ed565b6103e0610866565b8060000361040157604051639f2951b160e01b815260040160405180910390fd5b600855565b61040e610866565b811580610419575080155b156104375760405163fae8279160e01b815260040160405180910390fd5b600291909155600355565b61044a610866565b6104526108c0565b565b61045c610866565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146104a9576040519150601f19603f3d011682016040523d82523d6000602084013e6104ae565b606091505b50509050806104fb5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b5050565b610507610866565b6104526000610915565b610519610866565b610452610965565b610529610866565b6040516370a0823160e01b81523060048201526104fb9082906001600160a01b038516906370a0823190602401602060405180830381865afa158015610573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105979190610e07565b6001600160a01b03851691906109a8565b6105b06109ff565b6105b8610a4c565b4260065411156105db576040516315177cf960e21b815260040160405180910390fd5b4260075410156105fe576040516347c6d1f160e11b815260040160405180910390fd5b34600081900361062157604051639f2951b160e01b815260040160405180910390fd5b3360008181526009602052604081208054849290610640908490610e36565b90915550506008546001600160a01b0382166000908152600960205260409020541115610680576040516329de599760e11b815260040160405180910390fd5b6000600354600254846106939190610e49565b61069d9190610e60565b905080600460008282546106b19190610e36565b9250508190555082600560008282546106ca9190610e36565b909155505060025460045411156106f457604051636ee5837760e11b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561075e57600080fd5b505af1158015610772573d6000803e3d6000fd5b5050505050505061045260018055565b6001600160a01b0381166000908152600960205260408120546008546107a89190610e82565b92915050565b6107b6610866565b428110806107c45750808210155b156107e2576040516347c6d1f160e11b815260040160405180910390fd5b600691909155600755565b6107f5610866565b6001600160a01b03811661085a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f2565b61086381610915565b50565b6000546001600160a01b031633146104525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f2565b6108c8610aa5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61096d6109ff565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108f83390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109fa908490610af5565b505050565b600054600160a01b900460ff16156104525760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104f2565b600260015403610a9e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104f2565b6002600155565b600054600160a01b900460ff166104525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104f2565b6000610b4a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610bca9092919063ffffffff16565b9050805160001480610b6b575080806020019051810190610b6b9190610e95565b6109fa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f2565b6060610bd98484600085610be1565b949350505050565b606082471015610c425760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104f2565b600080866001600160a01b03168587604051610c5e9190610edb565b60006040518083038185875af1925050503d8060008114610c9b576040519150601f19603f3d011682016040523d82523d6000602084013e610ca0565b606091505b5091509150610cb187838387610cbc565b979650505050505050565b60608315610d2b578251600003610d24576001600160a01b0385163b610d245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f2565b5081610bd9565b610bd98383815115610d405781518083602001fd5b8060405162461bcd60e51b81526004016104f29190610ef7565b6001600160a01b038116811461086357600080fd5b600060208284031215610d8157600080fd5b8135610d8c81610d5a565b9392505050565b600060208284031215610da557600080fd5b5035919050565b60008060408385031215610dbf57600080fd5b50508035926020909101359150565b60008060408385031215610de157600080fd5b8235610dec81610d5a565b91506020830135610dfc81610d5a565b809150509250929050565b600060208284031215610e1957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107a8576107a8610e20565b80820281158282048414176107a8576107a8610e20565b600082610e7d57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156107a8576107a8610e20565b600060208284031215610ea757600080fd5b81518015158114610d8c57600080fd5b60005b83811015610ed2578181015183820152602001610eba565b50506000910152565b60008251610eed818460208701610eb7565b9190910192915050565b6020815260008251806020840152610f16816040850160208701610eb7565b601f01601f1916919091016040019291505056fea2646970667358221220be01c457bcb0e53ac1b5a1133f9b77df626e6443aa7acf3d9dcec8086bc203a864736f6c634300081100330000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162000000000000000000000000000000000000000000000cb49b44ba602d80000000000000000000000000000000000000000000000000000410d586a20a4c00000000000000000000000000000000000000000000000000000000000064f869c00000000000000000000000000000000000000000000000000000000064fdafc0

Deployed Bytecode

0x6080604052600436106101395760003560e01c80638da5cb5b116100ab578063b20b3bee1161006f578063b20b3bee14610336578063c6eae0c514610356578063c98166c01461036c578063d160c7a914610382578063e6fd48bc146103a2578063f2fde38b146103b857600080fd5b80638da5cb5b1461029c5780638de43c1f146102ce5780638ebc752c14610302578063a6f2ae3a14610318578063a85adeab1461032057600080fd5b80635c975abb116100fd5780635c975abb146101f2578063690d83201461021c578063715018a61461023c578063826baaf9146102515780638456cb5914610267578063886f039a1461027c57600080fd5b80630429b9ca146101455780631984708f1461016e5780632e1bbe981461019b57806330da333d146101bd5780633f4ba83a146101dd57600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5061015b60035481565b6040519081526020015b60405180910390f35b34801561017a57600080fd5b5061015b610189366004610d6f565b60096020526000908152604090205481565b3480156101a757600080fd5b506101bb6101b6366004610d93565b6103d8565b005b3480156101c957600080fd5b506101bb6101d8366004610dac565b610406565b3480156101e957600080fd5b506101bb610442565b3480156101fe57600080fd5b50600054600160a01b900460ff166040519015158152602001610165565b34801561022857600080fd5b506101bb610237366004610d6f565b610454565b34801561024857600080fd5b506101bb6104ff565b34801561025d57600080fd5b5061015b60045481565b34801561027357600080fd5b506101bb610511565b34801561028857600080fd5b506101bb610297366004610dce565b610521565b3480156102a857600080fd5b506000546001600160a01b03165b6040516001600160a01b039091168152602001610165565b3480156102da57600080fd5b506102b67f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce16281565b34801561030e57600080fd5b5061015b60025481565b6101bb6105a8565b34801561032c57600080fd5b5061015b60075481565b34801561034257600080fd5b5061015b610351366004610d6f565b610782565b34801561036257600080fd5b5061015b60085481565b34801561037857600080fd5b5061015b60055481565b34801561038e57600080fd5b506101bb61039d366004610dac565b6107ae565b3480156103ae57600080fd5b5061015b60065481565b3480156103c457600080fd5b506101bb6103d3366004610d6f565b6107ed565b6103e0610866565b8060000361040157604051639f2951b160e01b815260040160405180910390fd5b600855565b61040e610866565b811580610419575080155b156104375760405163fae8279160e01b815260040160405180910390fd5b600291909155600355565b61044a610866565b6104526108c0565b565b61045c610866565b6000816001600160a01b03164760405160006040518083038185875af1925050503d80600081146104a9576040519150601f19603f3d011682016040523d82523d6000602084013e6104ae565b606091505b50509050806104fb5760405162461bcd60e51b81526020600482015260146024820152732330b4b632b2103a379039b2b7321022ba3432b960611b60448201526064015b60405180910390fd5b5050565b610507610866565b6104526000610915565b610519610866565b610452610965565b610529610866565b6040516370a0823160e01b81523060048201526104fb9082906001600160a01b038516906370a0823190602401602060405180830381865afa158015610573573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105979190610e07565b6001600160a01b03851691906109a8565b6105b06109ff565b6105b8610a4c565b4260065411156105db576040516315177cf960e21b815260040160405180910390fd5b4260075410156105fe576040516347c6d1f160e11b815260040160405180910390fd5b34600081900361062157604051639f2951b160e01b815260040160405180910390fd5b3360008181526009602052604081208054849290610640908490610e36565b90915550506008546001600160a01b0382166000908152600960205260409020541115610680576040516329de599760e11b815260040160405180910390fd5b6000600354600254846106939190610e49565b61069d9190610e60565b905080600460008282546106b19190610e36565b9250508190555082600560008282546106ca9190610e36565b909155505060025460045411156106f457604051636ee5837760e11b815260040160405180910390fd5b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce16216906340c10f1990604401600060405180830381600087803b15801561075e57600080fd5b505af1158015610772573d6000803e3d6000fd5b5050505050505061045260018055565b6001600160a01b0381166000908152600960205260408120546008546107a89190610e82565b92915050565b6107b6610866565b428110806107c45750808210155b156107e2576040516347c6d1f160e11b815260040160405180910390fd5b600691909155600755565b6107f5610866565b6001600160a01b03811661085a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104f2565b61086381610915565b50565b6000546001600160a01b031633146104525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104f2565b6108c8610aa5565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61096d6109ff565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586108f83390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109fa908490610af5565b505050565b600054600160a01b900460ff16156104525760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016104f2565b600260015403610a9e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104f2565b6002600155565b600054600160a01b900460ff166104525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b60448201526064016104f2565b6000610b4a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610bca9092919063ffffffff16565b9050805160001480610b6b575080806020019051810190610b6b9190610e95565b6109fa5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016104f2565b6060610bd98484600085610be1565b949350505050565b606082471015610c425760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016104f2565b600080866001600160a01b03168587604051610c5e9190610edb565b60006040518083038185875af1925050503d8060008114610c9b576040519150601f19603f3d011682016040523d82523d6000602084013e610ca0565b606091505b5091509150610cb187838387610cbc565b979650505050505050565b60608315610d2b578251600003610d24576001600160a01b0385163b610d245760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016104f2565b5081610bd9565b610bd98383815115610d405781518083602001fd5b8060405162461bcd60e51b81526004016104f29190610ef7565b6001600160a01b038116811461086357600080fd5b600060208284031215610d8157600080fd5b8135610d8c81610d5a565b9392505050565b600060208284031215610da557600080fd5b5035919050565b60008060408385031215610dbf57600080fd5b50508035926020909101359150565b60008060408385031215610de157600080fd5b8235610dec81610d5a565b91506020830135610dfc81610d5a565b809150509250929050565b600060208284031215610e1957600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b808201808211156107a8576107a8610e20565b80820281158282048414176107a8576107a8610e20565b600082610e7d57634e487b7160e01b600052601260045260246000fd5b500490565b818103818111156107a8576107a8610e20565b600060208284031215610ea757600080fd5b81518015158114610d8c57600080fd5b60005b83811015610ed2578181015183820152602001610eba565b50506000910152565b60008251610eed818460208701610eb7565b9190910192915050565b6020815260008251806020840152610f16816040850160208701610eb7565b601f01601f1916919091016040019291505056fea2646970667358221220be01c457bcb0e53ac1b5a1133f9b77df626e6443aa7acf3d9dcec8086bc203a864736f6c63430008110033

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

0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162000000000000000000000000000000000000000000000cb49b44ba602d80000000000000000000000000000000000000000000000000000410d586a20a4c00000000000000000000000000000000000000000000000000000000000064f869c00000000000000000000000000000000000000000000000000000000064fdafc0

-----Decoded View---------------
Arg [0] : shezmu (address): 0x5fE72ed557d8a02FFf49B3B826792c765d5cE162
Arg [1] : totalShezmu (uint256): 60000000000000000000000
Arg [2] : totalEth (uint256): 75000000000000000000
Arg [3] : start (uint256): 1694001600
Arg [4] : end (uint256): 1694347200

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000005fe72ed557d8a02fff49b3b826792c765d5ce162
Arg [1] : 000000000000000000000000000000000000000000000cb49b44ba602d800000
Arg [2] : 00000000000000000000000000000000000000000000000410d586a20a4c0000
Arg [3] : 0000000000000000000000000000000000000000000000000000000064f869c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000064fdafc0


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.