POL Price: $0.217665 (-0.30%)
Gas: 30 GWei
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 POL

POL Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Buy NF Ts237442722022-01-15 10:47:081193 days ago1642243628IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0007763130
Buy NF Ts234530672022-01-07 20:27:531201 days ago1641587273IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0007763130
Buy NF Ts234530672022-01-07 20:27:531201 days ago1641587273IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0007763130
Withdraw Funds219175222021-11-28 23:55:081241 days ago1638143708IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0008741130
Buy NF Ts219169242021-11-28 23:32:241241 days ago1638142344IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0014232355
Buy NF Ts219169242021-11-28 23:32:241241 days ago1638142344IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.00004051.56539795
Buy NF Ts219166512021-11-28 23:23:021241 days ago1638141782IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0016302563
Buy NF Ts219166512021-11-28 23:23:021241 days ago1638141782IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0008539433
Buy NF Ts219166362021-11-28 23:22:321241 days ago1638141752IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0012938550
Buy NF Ts219166182021-11-28 23:21:561241 days ago1638141716IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0015526260
Buy NF Ts219166112021-11-28 23:21:421241 days ago1638141702IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0087248260.5
Buy NF Ts219166102021-11-28 23:21:401241 days ago1638141700IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.013888560.5
Buy NF Ts219166092021-11-28 23:21:381241 days ago1638141698IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0368778100
Buy NF Ts219165982021-11-28 23:20:361241 days ago1638141636IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0355562100
Buy NF Ts219165102021-11-28 23:13:561241 days ago1638141236IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0048849330
Buy NF Ts219164572021-11-28 23:12:061241 days ago1638141126IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0049479330
Buy NF Ts219164512021-11-28 23:11:541241 days ago1638141114IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0112073430
Buy NF Ts219164192021-11-28 23:10:501241 days ago1638141050IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0072072420
Buy NF Ts219164172021-11-28 23:10:461241 days ago1638141046IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0070308630
Buy NF Ts219164032021-11-28 23:10:141241 days ago1638141014IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0049426230
Buy NF Ts219163382021-11-28 23:08:001241 days ago1638140880IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.011718150
Buy NF Ts219163082021-11-28 23:07:001241 days ago1638140820IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.015198550
Buy NF Ts219162852021-11-28 23:05:381241 days ago1638140738IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.000337622.04924823
Buy NF Ts219161802021-11-28 23:02:041241 days ago1638140524IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.04494062304
Buy NF Ts219161482021-11-28 23:00:561241 days ago1638140456IN
0x6Ec2aC7A...D3b80CCB7
0 POL0.0049426230
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x11bF19B2...33C194c17
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
PMHCNFTSale

Compiler Version
v0.8.2+commit.661d1103

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 7 : PMHCNFTSale.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

import "./interfaces/IPMHCNFT.sol";

contract PMHCNFTSale is Ownable {
    using SafeERC20 for IERC20;

    IERC20 public token;

    uint256 public startTime;
    uint256 public whitelistDuration;

    IPMHCNFT public nft;
    uint256 public tokenPerNft;

    uint256 public totalBuyers;

    uint256 public minId;
    uint256 public maxId;
    uint256 public totalNFTCount;
    uint256 public totalNFTSold;

    uint256 public normalPurchaseCount;

    uint256[] public availableTokenIds;
    mapping(address => uint256) public whitelist;

    mapping(address => uint256) public userInfo;
    mapping(address => uint256[]) public userNfts;

    mapping(address => bool) public isAdmin;

    event SaleCreated(address sale, address nft, address token, uint256 tokenPerNft);
    event SaleDataSet(
        uint256 startTime,
        uint256 whitelistDuration,
        uint256 minId,
        uint256 maxId,
        uint256 normalPurchaseCount
    );
    event NFTSold(address buyer, uint256 tokenId);

    modifier onlyOwnerOrAdmin() {
        require(msg.sender == owner() || isAdmin[msg.sender], "Not admin or owner");
        _;
    }

    modifier onlyActiveSale() {
        require(block.timestamp >= startTime && availableTokenIds.length > 0, "Sale is not active now");
        _;
    }

    modifier canBuyNFTs(address buyer, uint256 nftAmount) {
        if (block.timestamp <= startTime + whitelistDuration) {
            require(whitelist[buyer] > 0, "Not whitelisted!");
            require(userInfo[buyer] + nftAmount <= whitelist[buyer], "Limit");
        } else {
            if (whitelist[buyer] > 0) {
                // for whitelisted user
                require(userInfo[buyer] + nftAmount <= whitelist[buyer], "Limit");
            } else {
                require(userInfo[buyer] + nftAmount <= normalPurchaseCount, "Limit");
            }
        }
        require(totalNFTSold + nftAmount <= totalNFTCount, "Target hit");
        _;
    }

    constructor(
        IPMHCNFT _nft,
        IERC20 _token,
        uint256 _tokenPerNft
    ) {
        require(address(_nft) != address(0), "Invalid nft");
        require(address(_token) != address(0), "Invalid token");

        nft = _nft;
        token = _token;
        tokenPerNft = _tokenPerNft;

        emit SaleCreated(address(this), address(nft), address(token), tokenPerNft);
    }

    function getUserNftIds(address user) external view returns (uint256[] memory) {
        return userNfts[user];
    }

    function getRemaining() external view returns (uint256) {
        return availableTokenIds.length;
    }

    function getStatus() external view returns (uint64) {
        if (block.timestamp < startTime) {
            return 0; // Upcoming
        }
        if (availableTokenIds.length > 0) {
            return 1; // In Sale
        }
        return 2; // Ended
    }

    function initTokenIds(uint256 _count) external onlyOwner {
        require(_count > 0, "Invalid count");
        require(block.timestamp < startTime, "Already started");
        uint256 startId = minId;

        if (availableTokenIds.length > 0) {
            startId = availableTokenIds[availableTokenIds.length - 1] + 1;
        }

        uint256 endId = startId + _count;

        if (endId > maxId) {
            endId = maxId;
        }

        for (uint256 index = startId; index <= endId; index++) {
            availableTokenIds.push(index);
        }
    }

    function initSale(
        uint256 _startTime,
        uint256 _whitelistDuration,
        uint256 _minId,
        uint256 _maxId,
        uint256 _normalPurchaseCount
    ) external onlyOwner {
        require(_startTime >= block.timestamp, "Invalid startTime");
        require(_whitelistDuration > 0, "Invalid duration");
        require(_minId >= 0 && _maxId >= _minId, "Invalid min or max id");
        require(_normalPurchaseCount > 0, "Invalid normalPurchaseCount");

        require(availableTokenIds.length == 0, "Already initialized");

        startTime = _startTime;
        whitelistDuration = _whitelistDuration;
        minId = _minId;
        maxId = _maxId;
        normalPurchaseCount = _normalPurchaseCount;

        totalNFTCount = maxId - minId + 1;

        emit SaleDataSet(startTime, whitelistDuration, minId, maxId, normalPurchaseCount);
    }

    function _setWhitelist(address addr, uint256 amount) private {
        whitelist[addr] = amount;
    }

    function setWhitelist(address addr, uint256 amount) external onlyOwnerOrAdmin {
        _setWhitelist(addr, amount);
    }

    function setWhitelists(address[] calldata addrs, uint256[] calldata amounts) external onlyOwnerOrAdmin {
        require(addrs.length == amounts.length, "Invalid params");
        for (uint256 index = 0; index < addrs.length; index++) {
            _setWhitelist(addrs[index], amounts[index]);
        }
    }

    function setStartTime(uint256 _startTime) external onlyOwnerOrAdmin {
        require(_startTime >= block.timestamp, "Invalid startTime");

        startTime = _startTime;

        emit SaleDataSet(startTime, whitelistDuration, minId, maxId, normalPurchaseCount);
    }

    function setWhitelistDuration(uint256 _whitelistDuration) external onlyOwnerOrAdmin {
        require(_whitelistDuration > 0, "Invalid duration");
        whitelistDuration = _whitelistDuration;

        emit SaleDataSet(startTime, whitelistDuration, minId, maxId, normalPurchaseCount);
    }

    function setNormalPurchaseCount(uint256 _normalPurchaseCount) external onlyOwnerOrAdmin {
        require(_normalPurchaseCount > 0, "Invalid normalPurchaseCount");
        normalPurchaseCount = _normalPurchaseCount;

        emit SaleDataSet(startTime, whitelistDuration, minId, maxId, normalPurchaseCount);
    }

    function _removeAvailableTokenIdAtIndex(uint256 index) private {
        if (index != availableTokenIds.length - 1) {
            availableTokenIds[index] = availableTokenIds[availableTokenIds.length - 1];
        }
        availableTokenIds.pop();
    }

    function _buyNFT(uint256 factor) private {
        uint256 i = uint256(uint160(address(msg.sender)));
        uint256 index = (i * (factor + 1) * block.timestamp) % availableTokenIds.length;
        uint256 tokenId = availableTokenIds[index];

        nft.mintTo(msg.sender, tokenId);

        _removeAvailableTokenIdAtIndex(index);

        userNfts[msg.sender].push(tokenId);

        if (userInfo[msg.sender] == 0) {
            totalBuyers++;
        }

        userInfo[msg.sender] = userInfo[msg.sender] + 1;

        emit NFTSold(msg.sender, tokenId);
    }

    function setTokenPerNft(uint256 _tokenPerNft) external onlyOwnerOrAdmin {
        require(_tokenPerNft > 0, "Invalid");
        require(block.timestamp < startTime, "Already started");
        tokenPerNft = _tokenPerNft;
    }

    function buyNFTs(uint256 nftAmount) external onlyActiveSale canBuyNFTs(msg.sender, nftAmount) {
        token.safeTransferFrom(msg.sender, address(this), nftAmount * tokenPerNft);

        for (uint256 index = 0; index < nftAmount; index++) {
            _buyNFT(index);
        }
        totalNFTSold = totalNFTSold + nftAmount;
    }

    function withdrawAnyToken(IERC20 erc20, uint256 amount) external onlyOwnerOrAdmin {
        erc20.safeTransfer(msg.sender, amount);
    }

    function withdrawFunds() external onlyOwnerOrAdmin {
        uint256 balance = token.balanceOf(address(this));
        token.safeTransfer(msg.sender, balance);
    }

    function setAdmin(address admin, bool set) external onlyOwner {
        isAdmin[admin] = set;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        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 virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 3 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 4 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // 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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

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

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

File 5 of 7 : IPMHCNFT.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IPMHCNFT {
    function mintTo(address _to, uint256 _tokenId) external;
}

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

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

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

pragma solidity ^0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"contract IPMHCNFT","name":"_nft","type":"address"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_tokenPerNft","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"NFTSold","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sale","type":"address"},{"indexed":false,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenPerNft","type":"uint256"}],"name":"SaleCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"whitelistDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"minId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"normalPurchaseCount","type":"uint256"}],"name":"SaleDataSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"availableTokenIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nftAmount","type":"uint256"}],"name":"buyNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStatus","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUserNftIds","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"},{"internalType":"uint256","name":"_whitelistDuration","type":"uint256"},{"internalType":"uint256","name":"_minId","type":"uint256"},{"internalType":"uint256","name":"_maxId","type":"uint256"},{"internalType":"uint256","name":"_normalPurchaseCount","type":"uint256"}],"name":"initSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"initTokenIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nft","outputs":[{"internalType":"contract IPMHCNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"normalPurchaseCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"},{"internalType":"bool","name":"set","type":"bool"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_normalPurchaseCount","type":"uint256"}],"name":"setNormalPurchaseCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenPerNft","type":"uint256"}],"name":"setTokenPerNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whitelistDuration","type":"uint256"}],"name":"setWhitelistDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addrs","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"setWhitelists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenPerNft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBuyers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNFTCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalNFTSold","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":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"userNfts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"erc20","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawAnyToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c806378e979251161012a578063c075c8f8116100bd578063dead9b281161008c578063ec3a1d4b11610071578063ec3a1d4b14610487578063f2fde38b14610490578063fc0c546a146104a357610226565b8063dead9b281461046b578063e2a2ef0e1461047e57610226565b8063c075c8f81461043e578063c5ea3c6514610447578063c7da2a3e14610450578063d6a022b81461046357610226565b8063986f46f0116100f9578063986f46f0146103e55780639b19251a146103f8578063a825a99c14610418578063c02c856a1461042b57610226565b806378e979251461039857806387a35382146103a15780638da5cb5b146103b457806392f2ff80146103c557610226565b80633e0a322d116101bd5780634e69d5601161018c57806369b262b61161017157806369b262b61461036a5780636d9f31dc1461037d578063715018a61461039057610226565b80634e69d560146103405780635023ac0e1461036157610226565b80633e0a322d146102dc57806347ccca02146102ef57806348e4d8ff1461031a5780634b0bddd21461032d57610226565b806324d7806c116101f957806324d7806c1461028e578063367d0489146102c1578063398513c8146102ca5780633abd0136146102d357610226565b80631302d03a1461022b5780631959a002146102405780631f283fc21461027357806324600fc314610286575b600080fd5b61023e610239366004611ca0565b6104b6565b005b61026061024e366004611c4c565b600e6020526000908152604090205481565b6040519081526020015b60405180910390f35b610260610281366004611d50565b610544565b61023e610565565b6102b161029c366004611c4c565b60106020526000908152604090205460ff1681565b604051901515815260200161026a565b61026060095481565b61026060055481565b61026060065481565b61023e6102ea366004611d50565b610667565b600454610302906001600160a01b031681565b6040516001600160a01b03909116815260200161026a565b61023e610328366004611d50565b610781565b61023e61033b366004611c68565b610882565b610348610907565b60405167ffffffffffffffff909116815260200161026a565b610260600a5481565b610260610378366004611ca0565b610932565b61023e61038b366004611d50565b610963565b61023e610b16565b61026060025481565b61023e6103af366004611ca0565b610bc7565b6000546001600160a01b0316610302565b6103d86103d3366004611c4c565b610c44565b60405161026a9190611dd6565b61023e6103f3366004611d80565b610cb0565b610260610406366004611c4c565b600d6020526000908152604090205481565b61023e610426366004611d50565b610f1f565b61023e610439366004611d50565b611024565b610260600b5481565b61026060085481565b61023e61045e366004611d50565b611137565b600c54610260565b61023e610479366004611ccb565b6113ec565b61026060075481565b61026060035481565b61023e61049e366004611c4c565b611543565b600154610302906001600160a01b031681565b6000546001600160a01b03163314806104de57503360009081526010602052604090205460ff165b6105245760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b60448201526064015b60405180910390fd5b6001600160a01b0382166000908152600d602052604090208190555b5050565b600c818154811061055457600080fd5b600091825260209091200154905081565b6000546001600160a01b031633148061058d57503360009081526010602052604090205460ff165b6105ce5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561061257600080fd5b505afa158015610626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061064a9190611d68565b600154909150610664906001600160a01b03163383611681565b50565b6000546001600160a01b031633148061068f57503360009081526010602052604090205460ff165b6106d05760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b428110156107205760405162461bcd60e51b815260206004820152601160248201527f496e76616c696420737461727454696d65000000000000000000000000000000604482015260640161051b565b6002819055600354600754600854600b54604080518681526020810195909552840192909252606083015260808201527f4969911be8cc4688e67d1691e1c972f718f293bb070256f89ac930dc135a55369060a0015b60405180910390a150565b6000546001600160a01b03163314806107a957503360009081526010602052604090205460ff165b6107ea5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b6000811161083a5760405162461bcd60e51b815260206004820152600760248201527f496e76616c696400000000000000000000000000000000000000000000000000604482015260640161051b565b600254421061087d5760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b604482015260640161051b565b600555565b6000546001600160a01b031633146108dc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051b565b6001600160a01b03919091166000908152601060205260409020805460ff1916911515919091179055565b600060025442101561091b5750600061092f565b600c541561092b5750600161092f565b5060025b90565b600f602052816000526040600020818154811061094e57600080fd5b90600052602060002001600091509150505481565b6000546001600160a01b031633146109bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051b565b60008111610a0d5760405162461bcd60e51b815260206004820152600d60248201527f496e76616c696420636f756e7400000000000000000000000000000000000000604482015260640161051b565b6002544210610a505760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e481cdd185c9d1959608a1b604482015260640161051b565b600754600c5415610aa357600c8054610a6b90600190611e84565b81548110610a8957634e487b7160e01b600052603260045260246000fd5b90600052602060002001546001610aa09190611e4d565b90505b6000610aaf8383611e4d565b9050600854811115610ac057506008545b815b818111610b1057600c80546001810182556000919091527fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70181905580610b0881611ec7565b915050610ac2565b50505050565b6000546001600160a01b03163314610b705760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000546001600160a01b0316331480610bef57503360009081526010602052604090205460ff165b610c305760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b6105406001600160a01b0383163383611681565b6001600160a01b0381166000908152600f6020908152604091829020805483518184028101840190945280845260609392830182828015610ca457602002820191906000526020600020905b815481526020019060010190808311610c90575b50505050509050919050565b6000546001600160a01b03163314610d0a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051b565b42851015610d5a5760405162461bcd60e51b815260206004820152601160248201527f496e76616c696420737461727454696d65000000000000000000000000000000604482015260640161051b565b60008411610d9d5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b604482015260640161051b565b82821015610ded5760405162461bcd60e51b815260206004820152601560248201527f496e76616c6964206d696e206f72206d61782069640000000000000000000000604482015260640161051b565b60008111610e3d5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206e6f726d616c5075726368617365436f756e740000000000604482015260640161051b565b600c5415610e8d5760405162461bcd60e51b815260206004820152601360248201527f416c726561647920696e697469616c697a656400000000000000000000000000604482015260640161051b565b6002859055600384905560078390556008829055600b819055610eb08383611e84565b610ebb906001611e4d565b600955600254600354600754600854600b546040805195865260208601949094528484019290925260608401526080830152517f4969911be8cc4688e67d1691e1c972f718f293bb070256f89ac930dc135a55369181900360a00190a15050505050565b6000546001600160a01b0316331480610f4757503360009081526010602052604090205460ff165b610f885760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b60008111610fcb5760405162461bcd60e51b815260206004820152601060248201526f24b73b30b634b210323ab930ba34b7b760811b604482015260640161051b565b6003819055600254600754600854600b546040805194855260208501869052840192909252606083015260808201527f4969911be8cc4688e67d1691e1c972f718f293bb070256f89ac930dc135a55369060a001610776565b6000546001600160a01b031633148061104c57503360009081526010602052604090205460ff165b61108d5760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b600081116110dd5760405162461bcd60e51b815260206004820152601b60248201527f496e76616c6964206e6f726d616c5075726368617365436f756e740000000000604482015260640161051b565b600b819055600254600354600754600854604080519485526020850193909352918301526060820152608081018290527f4969911be8cc4688e67d1691e1c972f718f293bb070256f89ac930dc135a55369060a001610776565b600254421015801561114a5750600c5415155b6111965760405162461bcd60e51b815260206004820152601660248201527f53616c65206973206e6f7420616374697665206e6f7700000000000000000000604482015260640161051b565b33816003546002546111a89190611e4d565b421161127e576001600160a01b0382166000908152600d60205260409020546112135760405162461bcd60e51b815260206004820152601060248201527f4e6f742077686974656c69737465642100000000000000000000000000000000604482015260640161051b565b6001600160a01b0382166000908152600d6020908152604080832054600e90925290912054611243908390611e4d565b11156112795760405162461bcd60e51b8152602060048201526005602482015264131a5b5a5d60da1b604482015260640161051b565b611329565b6001600160a01b0382166000908152600d6020526040902054156112cc576001600160a01b0382166000908152600d6020908152604080832054600e90925290912054611243908390611e4d565b600b546001600160a01b0383166000908152600e60205260409020546112f3908390611e4d565b11156113295760405162461bcd60e51b8152602060048201526005602482015264131a5b5a5d60da1b604482015260640161051b565b60095481600a5461133a9190611e4d565b11156113885760405162461bcd60e51b815260206004820152600a60248201527f5461726765742068697400000000000000000000000000000000000000000000604482015260640161051b565b6113af33306005548661139b9190611e65565b6001546001600160a01b0316929190611716565b60005b838110156113d5576113c38161174e565b806113cd81611ec7565b9150506113b2565b5082600a546113e49190611e4d565b600a55505050565b6000546001600160a01b031633148061141457503360009081526010602052604090205460ff165b6114555760405162461bcd60e51b81526020600482015260126024820152712737ba1030b236b4b71037b91037bbb732b960711b604482015260640161051b565b8281146114a45760405162461bcd60e51b815260206004820152600e60248201527f496e76616c696420706172616d73000000000000000000000000000000000000604482015260640161051b565b60005b8381101561153c5761152a8585838181106114d257634e487b7160e01b600052603260045260246000fd5b90506020020160208101906114e79190611c4c565b84848481811061150757634e487b7160e01b600052603260045260246000fd5b905060200201356001600160a01b039091166000908152600d6020526040902055565b8061153481611ec7565b9150506114a7565b5050505050565b6000546001600160a01b0316331461159d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161051b565b6001600160a01b0381166116195760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161051b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6040516001600160a01b03831660248201526044810182905261171190849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526118d9565b505050565b6040516001600160a01b0380851660248301528316604482015260648101829052610b109085906323b872dd60e01b906084016116ad565b600c54339060009042611762856001611e4d565b61176c9085611e65565b6117769190611e65565b6117809190611ee2565b90506000600c82815481106117a557634e487b7160e01b600052603260045260246000fd5b600091825260209091200154600480546040516308934a5f60e31b81523392810192909252602482018390529192506001600160a01b039091169063449a52f890604401600060405180830381600087803b15801561180357600080fd5b505af1158015611817573d6000803e3d6000fd5b50505050611824826119be565b336000818152600f60209081526040808320805460018101825590845282842001859055928252600e9052205461186b576006805490600061186583611ec7565b91905055505b336000908152600e6020526040902054611886906001611e4d565b336000818152600e60209081526040918290209390935580519182529181018390527ff025e0c58bf784c030caa814abce9ca7cf237831d4dff71c2ade33bed4d8dd22910160405180910390a150505050565b600061192e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611a729092919063ffffffff16565b805190915015611711578080602001905181019061194c9190611d34565b6117115760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161051b565b600c546119cd90600190611e84565b8114611a3a57600c80546119e390600190611e84565b81548110611a0157634e487b7160e01b600052603260045260246000fd5b9060005260206000200154600c8281548110611a2d57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001555b600c805480611a5957634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550565b6060611a818484600085611a8b565b90505b9392505050565b606082471015611b035760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161051b565b843b611b515760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161051b565b600080866001600160a01b03168587604051611b6d9190611dba565b60006040518083038185875af1925050503d8060008114611baa576040519150601f19603f3d011682016040523d82523d6000602084013e611baf565b606091505b5091509150611bbf828286611bca565b979650505050505050565b60608315611bd9575081611a84565b825115611be95782518084602001fd5b8160405162461bcd60e51b815260040161051b9190611e1a565b60008083601f840112611c14578182fd5b50813567ffffffffffffffff811115611c2b578182fd5b6020830191508360208083028501011115611c4557600080fd5b9250929050565b600060208284031215611c5d578081fd5b8135611a8481611f18565b60008060408385031215611c7a578081fd5b8235611c8581611f18565b91506020830135611c9581611f2d565b809150509250929050565b60008060408385031215611cb2578182fd5b8235611cbd81611f18565b946020939093013593505050565b60008060008060408587031215611ce0578182fd5b843567ffffffffffffffff80821115611cf7578384fd5b611d0388838901611c03565b90965094506020870135915080821115611d1b578384fd5b50611d2887828801611c03565b95989497509550505050565b600060208284031215611d45578081fd5b8151611a8481611f2d565b600060208284031215611d61578081fd5b5035919050565b600060208284031215611d79578081fd5b5051919050565b600080600080600060a08688031215611d97578081fd5b505083359560208501359550604085013594606081013594506080013592509050565b60008251611dcc818460208701611e9b565b9190910192915050565b6020808252825182820181905260009190848201906040850190845b81811015611e0e57835183529284019291840191600101611df2565b50909695505050505050565b6000602082528251806020840152611e39816040850160208701611e9b565b601f01601f19169190910160400192915050565b60008219821115611e6057611e60611f02565b500190565b6000816000190483118215151615611e7f57611e7f611f02565b500290565b600082821015611e9657611e96611f02565b500390565b60005b83811015611eb6578181015183820152602001611e9e565b83811115610b105750506000910152565b6000600019821415611edb57611edb611f02565b5060010190565b600082611efd57634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461066457600080fd5b801515811461066457600080fdfea164736f6c6343000802000a

Block Transaction Gas Used Reward
view all blocks produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.