ETH Price: $2,619.04 (-0.23%)

Contract

0x335C2Fb0e6a06f42722959Ee9e36CeF210Cb2586
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040175421002023-06-23 11:54:59466 days ago1687521299IN
 Create: Airdrop
0 ETH0.0311696624.52092037

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Airdrop

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 11 : Airdrop.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol";

import "../Validatable.sol";

contract Airdrop is Validatable, ReentrancyGuardUpgradeable {
    using CountersUpgradeable for CountersUpgradeable.Counter;
    /**
     *  @notice _idCounter uint256 (counter). This is the counter for store
     *          current airdrop ID value in storage.
     */
    CountersUpgradeable.Counter private _idCounter;

    struct AirdropInfo {
        address collection;
        uint256 id;
        uint256 maximum;
        uint256 claimedQty;
        uint256 startTime;
        uint256 endTime;
        bool status;
    }

    /**
     *  @notice mapping user address => id => amount is claimable of user
     */
    mapping(address => mapping(uint256 => uint256)) public claimable;

    /**
     *  @notice mapping user address => id => amount of each user claim
     */
    mapping(address => mapping(uint256 => uint256)) public claimAmountOf;

    /**
     *  @notice mapping id => info airdrop
     */
    mapping(uint256 => AirdropInfo) public airdrops;

    event CreateAirdrop(uint256 indexed id, AirdropInfo airdropInfo);
    event UpdateAirdrop(uint256 indexed id, uint256 startTime, uint256 endTime);
    event Claimed(uint256 indexed id, address indexed user, uint256 indexed amount);
    event SetWhitelist(uint256 indexed id, address[] users, uint256[] amounts);
    event CancelledAirdrop(uint256 indexed id);

    /**
     * @notice Init contract
     * @dev    Replace for contructor
     * @param _admin Address of admin contract
     */
    function initialize(IAdmin _admin) public initializer {
        __Validatable_init(_admin);
        __ReentrancyGuard_init();
    }

    /**
     * Throw an exception if airdrop id is not valid
     */
    modifier validAirdropId(uint256 id) {
        require(id > 0 && id <= _idCounter.current(), "Invalid id");
        _;
    }

    /**
     * @notice create airdrop
     * @dev    Only admin can call this function
     * @param collection Address of collection contract
     * @param maximum Max nft can claim
     * @param startTime Time to start
     * @param endTime Time to end
     * @param receivers List of receivers
     * @param amounts List of amount
     *
     * emit {CreateAirdrop} events
     */
    function createAirdrop(
        address collection,
        uint256 maximum,
        uint256 startTime,
        uint256 endTime,
        address[] memory receivers,
        uint256[] memory amounts
    ) external onlyAdmin validGenesis(collection) notZero(maximum) {
        require(startTime > 0 && startTime < endTime, "Invalid time");

        _idCounter.increment();
        airdrops[_idCounter.current()] = AirdropInfo({
            id: _idCounter.current(),
            collection: collection,
            maximum: maximum,
            claimedQty: 0,
            startTime: startTime,
            endTime: endTime,
            status: true
        });

        _setWhitelist(_idCounter.current(), receivers, amounts);

        emit CreateAirdrop(_idCounter.current(), airdrops[_idCounter.current()]);
    }

    /**
     * @notice Update airdrop
     * @dev    Only admin can call this function
     * @param id id of airdrop
     * @param maximum Max nft can claim
     * @param startTime Time to start
     * @param endTime Time to end
     *
     * emit {UpdateAirdrop} events
     */
    function updateAirdrop(
        uint256 id,
        uint256 maximum,
        uint256 startTime,
        uint256 endTime
    ) external onlyAdmin validAirdropId(id) notZero(maximum) {
        require(startTime > 0 && startTime < endTime, "Invalid time");

        AirdropInfo storage airdropInfo = airdrops[id];
        require(airdropInfo.status, "Airdrop was cancel");

        airdropInfo.maximum = maximum;
        airdropInfo.startTime = startTime;
        airdropInfo.endTime = endTime;

        emit UpdateAirdrop(id, startTime, endTime);
    }

    /**
     * @notice Set whitelist that will be able to buy NFT
     * @dev    Only admin can call this function
     * @param id id of airdrop
     * @param receivers List of receivers
     * @param amounts List of amount
     *
     * emit {SetWhitelist} events
     */
    function setWhitelist(uint256 id, address[] memory receivers, uint256[] memory amounts) external onlyAdmin {
        _setWhitelist(id, receivers, amounts);

        emit SetWhitelist(id, receivers, amounts);
    }

    /**
     * @notice Used to airdrop
     * @dev    User in whitelist can call
     * @param id id of airdrop
     *
     * emit {Claimed} events
     */
    function claim(uint256 id, uint256 times) external nonReentrant notZero(times) {
        require(claimable[_msgSender()][id] >= times, "Insufficient claim amount");
        AirdropInfo storage airdropInfo = airdrops[id];
        require(airdropInfo.status, "Airdrop was cancel");
        require(
            airdropInfo.startTime <= block.timestamp && block.timestamp <= airdropInfo.endTime,
            "Can not airdrop at this time"
        );

        airdropInfo.claimedQty += times;
        require(airdropInfo.claimedQty <= airdropInfo.maximum, "Exceed the allowed qty");

        claimAmountOf[_msgSender()][id] += times;
        claimable[_msgSender()][id] -= times;
        // Mint Airdrop NFTs
        //slither-disable-next-line unused-return
        IHLPeaceGenesisAngel(airdropInfo.collection).mintBatch(_msgSender(), times);

        // Emit events
        emit Claimed(id, _msgSender(), times);
    }

    /**
     * @notice Admin cancel airdrop
     * @dev    Only admin can call this function
     * @param id id of airdrop
     *
     * emit {CancelledAirdrop} events
     */
    function cancelAirdrop(uint256 id) external onlyAdmin validAirdropId(id) {
        require(airdrops[id].status, "Airdrop was cancel");
        airdrops[id].status = false;

        // Emit events
        emit CancelledAirdrop(id);
    }

    /**
     * @notice setWhitelist
     */
    function _setWhitelist(
        uint256 id,
        address[] memory receivers,
        uint256[] memory amounts
    ) private validAirdropId(id) {
        require(airdrops[id].status, "Airdrop was cancel");
        require(receivers.length > 0 && receivers.length == amounts.length, "Invalid length");
        for (uint256 i = 0; i < receivers.length; i++) {
            require(receivers[i] != address(0), "Invalid address");
            claimable[receivers[i]][id] = amounts[i];
        }
    }

    /**
     *
     *  @notice Get airdrop counter
     *
     *  @dev    All caller can call this function.
     */
    function getAirdropCounter() external view returns (uint256) {
        return _idCounter.current();
    }
}

File 2 of 11 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 3 of 11 : ReentrancyGuardUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ReentrancyGuardUpgradeable is Initializable {
    // 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;

    function __ReentrancyGuard_init() internal onlyInitializing {
        __ReentrancyGuard_init_unchained();
    }

    function __ReentrancyGuard_init_unchained() internal onlyInitializing {
        _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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 4 of 11 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     *
     * [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://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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

File 5 of 11 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

File 6 of 11 : CountersUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library CountersUpgradeable {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 7 of 11 : ERC165CheckerUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.2) (utils/introspection/ERC165Checker.sol)

pragma solidity ^0.8.0;

import "./IERC165Upgradeable.sol";

/**
 * @dev Library used to query support of an interface declared via {IERC165}.
 *
 * Note that these functions return the actual result of the query: they do not
 * `revert` if an interface is not supported. It is up to the caller to decide
 * what to do in these cases.
 */
library ERC165CheckerUpgradeable {
    // As per the EIP-165 spec, no interface should ever match 0xffffffff
    bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff;

    /**
     * @dev Returns true if `account` supports the {IERC165} interface,
     */
    function supportsERC165(address account) internal view returns (bool) {
        // Any contract that implements ERC165 must explicitly indicate support of
        // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid
        return
            _supportsERC165Interface(account, type(IERC165Upgradeable).interfaceId) &&
            !_supportsERC165Interface(account, _INTERFACE_ID_INVALID);
    }

    /**
     * @dev Returns true if `account` supports the interface defined by
     * `interfaceId`. Support for {IERC165} itself is queried automatically.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) {
        // query support of both ERC165 as per the spec and support of _interfaceId
        return supportsERC165(account) && _supportsERC165Interface(account, interfaceId);
    }

    /**
     * @dev Returns a boolean array where each value corresponds to the
     * interfaces passed in and whether they're supported or not. This allows
     * you to batch check interfaces for a contract where your expectation
     * is that some interfaces may not be supported.
     *
     * See {IERC165-supportsInterface}.
     *
     * _Available since v3.4._
     */
    function getSupportedInterfaces(address account, bytes4[] memory interfaceIds)
        internal
        view
        returns (bool[] memory)
    {
        // an array of booleans corresponding to interfaceIds and whether they're supported or not
        bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length);

        // query support of ERC165 itself
        if (supportsERC165(account)) {
            // query support of each interface in interfaceIds
            for (uint256 i = 0; i < interfaceIds.length; i++) {
                interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]);
            }
        }

        return interfaceIdsSupported;
    }

    /**
     * @dev Returns true if `account` supports all the interfaces defined in
     * `interfaceIds`. Support for {IERC165} itself is queried automatically.
     *
     * Batch-querying can lead to gas savings by skipping repeated checks for
     * {IERC165} support.
     *
     * See {IERC165-supportsInterface}.
     */
    function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) {
        // query support of ERC165 itself
        if (!supportsERC165(account)) {
            return false;
        }

        // query support of each interface in _interfaceIds
        for (uint256 i = 0; i < interfaceIds.length; i++) {
            if (!_supportsERC165Interface(account, interfaceIds[i])) {
                return false;
            }
        }

        // all interfaces supported
        return true;
    }

    /**
     * @notice Query if a contract implements an interface, does not check ERC165 support
     * @param account The address of the contract to query for support of an interface
     * @param interfaceId The interface identifier, as specified in ERC-165
     * @return true if the contract at account indicates support of the interface with
     * identifier interfaceId, false otherwise
     * @dev Assumes that account contains a contract that supports ERC165, otherwise
     * the behavior of this method is undefined. This precondition can be checked
     * with {supportsERC165}.
     * Interface identification is specified in ERC-165.
     */
    function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) {
        // prepare call
        bytes memory encodedParams = abi.encodeWithSelector(IERC165Upgradeable.supportsInterface.selector, interfaceId);

        // perform static call
        bool success;
        uint256 returnSize;
        uint256 returnValue;
        assembly {
            success := staticcall(30000, account, add(encodedParams, 0x20), mload(encodedParams), 0x00, 0x20)
            returnSize := returndatasize()
            returnValue := mload(0x00)
        }

        return success && returnSize >= 0x20 && returnValue > 0;
    }
}

File 8 of 11 : IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165Upgradeable {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 9 of 11 : IAdmin.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import "@openzeppelin/contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol";

interface IAdmin is IERC165Upgradeable {
    function isPermittedPaymentToken(address _paymentToken) external view returns (bool);

    function isAdmin(address _account) external view returns (bool);

    function owner() external view returns (address);

    function registerTreasury() external;

    function treasury() external view returns (address);
}

File 10 of 11 : IHLPeaceGenesisAngel.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

/**
 *  @notice IGenesis is interface of genesis token
 */
interface IHLPeaceGenesisAngel {
    function mintBatch(address receiver, uint256 times) external;
}

File 11 of 11 : Validatable.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.16;

import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165CheckerUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";

import "./interfaces/IAdmin.sol";
import "./interfaces/IHLPeaceGenesisAngel.sol";

/**
 *  @title  Dev Validatable
 *
 *  @author IHeart Team
 *
 *  @dev This contract is using as abstract smartcontract
 *  @notice This smart contract provide the validatable methods and modifier for the inheriting contract.
 */
contract Validatable is Initializable, ContextUpgradeable {
    /**
     *  @notice Address of Admin contract
     */
    IAdmin public admin;

    event SetPause(bool indexed isPause);

    /*------------------Initializer------------------*/

    function __Validatable_init(IAdmin _admin) internal onlyInitializing {
        __Context_init();

        admin = _admin;
    }

    /*------------------Check Admins------------------*/

    modifier onlyOwner() {
        require(admin.owner() == _msgSender(), "Caller is not owner");
        _;
    }

    modifier onlyAdmin() {
        require(admin.isAdmin(_msgSender()), "Caller is not owner or admin");
        _;
    }

    /*------------------Common Checking------------------*/

    modifier notZeroAddress(address _account) {
        require(_account != address(0), "Invalid address");
        _;
    }

    modifier notZero(uint256 _amount) {
        require(_amount > 0, "Invalid amount");
        _;
    }

    modifier validGenesis(address _address) {
        require(
            ERC165CheckerUpgradeable.supportsInterface(_address, type(IHLPeaceGenesisAngel).interfaceId),
            "Invalid HLPeaceGenesisAngel contract"
        );
        _;
    }
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"CancelledAirdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"components":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maximum","type":"uint256"},{"internalType":"uint256","name":"claimedQty","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"indexed":false,"internalType":"struct Airdrop.AirdropInfo","name":"airdropInfo","type":"tuple"}],"name":"CreateAirdrop","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bool","name":"isPause","type":"bool"}],"name":"SetPause","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"address[]","name":"users","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"SetWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"UpdateAirdrop","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"contract IAdmin","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"airdrops","outputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maximum","type":"uint256"},{"internalType":"uint256","name":"claimedQty","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bool","name":"status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"cancelAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"times","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimAmountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"maximum","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"createAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAirdropCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IAdmin","name":"_admin","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address[]","name":"receivers","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"setWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"maximum","type":"uint256"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"}],"name":"updateAirdrop","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611607806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a358df9711610071578063a358df97146101cd578063b6dcff57146101e0578063c3490263146101f3578063c4d66de814610206578063f851a44014610219578063fe58f2d71461024457600080fd5b806323d392e8146100ae57806340b45418146100c957806360db5082146100de57806360efe334146101775780638ec46855146101a2575b600080fd5b6100b6610257565b6040519081526020015b60405180910390f35b6100dc6100d736600461120a565b610267565b005b6101366100ec366004611277565b60696020526000908152604090208054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169593949293919290919060ff1687565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e0016100c0565b6100b6610185366004611290565b606760209081526000928352604080842090915290825290205481565b6100b66101b0366004611290565b606860209081526000928352604080842090915290825290205481565b6100dc6101db3660046112bc565b610350565b6100dc6101ee3660046112ee565b61050b565b6100dc610201366004611380565b610805565b6100dc6102143660046113a2565b610afc565b60335461022c906001600160a01b031681565b6040516001600160a01b0390911681526020016100c0565b6100dc610252366004611277565b610c17565b600061026260665490565b905090565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156102bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e191906113c6565b6103065760405162461bcd60e51b81526004016102fd906113e8565b60405180910390fd5b610311838383610d51565b827f536544790f46afb273f165fe3e3e125d981b2b2628bffc34f8cb738e5de98b6f838360405161034392919061141f565b60405180910390a2505050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156103a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ca91906113c6565b6103e65760405162461bcd60e51b81526004016102fd906113e8565b836000811180156103f957506066548111155b6104155760405162461bcd60e51b81526004016102fd906114a3565b83600081116104365760405162461bcd60e51b81526004016102fd906114c7565b60008411801561044557508284105b6104805760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b60448201526064016102fd565b6000868152606960205260409020600681015460ff166104b25760405162461bcd60e51b81526004016102fd906114ef565b600281018690556004810185905560058101849055604080518681526020810186905288917fa394a0c09567169a3f15fb6e07e306a8b7793e677e708104f768304e17592189910160405180910390a250505050505050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610561573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058591906113c6565b6105a15760405162461bcd60e51b81526004016102fd906113e8565b856105b381630922dc7f60e21b610f00565b61060b5760405162461bcd60e51b8152602060048201526024808201527f496e76616c696420484c506561636547656e65736973416e67656c20636f6e746044820152631c9858dd60e21b60648201526084016102fd565b856000811161062c5760405162461bcd60e51b81526004016102fd906114c7565b60008611801561063b57508486105b6106765760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b60448201526064016102fd565b610684606680546001019055565b6040518060e00160405280896001600160a01b031681526020016106a760665490565b81526020018881526020016000815260200187815260200186815260200160011515815250606960006106d960665490565b81526020808201929092526040908101600020835181546001600160a01b0319166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0909101516006909101805460ff191691151591909117905560665461075f908585610d51565b6066547f819570a97bc969a38e743adeef860618f7f877e0ee3d72fb73fa538f0d11c48c606960008381526020019081526020016000206040516107f3919081546001600160a01b0316815260018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a082015260069091015460ff16151560c082015260e00190565b60405180910390a25050505050505050565b6002603454036108575760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fd565b6002603455808061087a5760405162461bcd60e51b81526004016102fd906114c7565b3360009081526067602090815260408083208684529091529020548211156108e45760405162461bcd60e51b815260206004820152601960248201527f496e73756666696369656e7420636c61696d20616d6f756e740000000000000060448201526064016102fd565b6000838152606960205260409020600681015460ff166109165760405162461bcd60e51b81526004016102fd906114ef565b4281600401541115801561092e575080600501544211155b61097a5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f742061697264726f7020617420746869732074696d650000000060448201526064016102fd565b8281600301600082825461098e9190611531565b90915550506002810154600382015411156109e45760405162461bcd60e51b81526020600482015260166024820152754578636565642074686520616c6c6f7765642071747960501b60448201526064016102fd565b33600090815260686020908152604080832087845290915281208054859290610a0e908490611531565b909155505033600090815260676020908152604080832087845290915281208054859290610a3d908490611544565b909155505080546001600160a01b031663248b71fc336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b158015610a9b57600080fd5b505af1158015610aaf573d6000803e3d6000fd5b5050505082610abb3390565b6001600160a01b0316857f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02660405160405180910390a4505060016034555050565b600054610100900460ff1615808015610b1c5750600054600160ff909116105b80610b365750303b158015610b36575060005460ff166001145b610b995760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102fd565b6000805460ff191660011790558015610bbc576000805461ff0019166101001790555b610bc582610f25565b610bcd610f76565b8015610c13576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610c6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9191906113c6565b610cad5760405162461bcd60e51b81526004016102fd906113e8565b80600081118015610cc057506066548111155b610cdc5760405162461bcd60e51b81526004016102fd906114a3565b60008281526069602052604090206006015460ff16610d0d5760405162461bcd60e51b81526004016102fd906114ef565b600082815260696020526040808220600601805460ff191690555183917fac8c143800fe087e273e64fccb4ccff6c380c7b9fb83061c97eb98f8c60fd70391a25050565b82600081118015610d6457506066548111155b610d805760405162461bcd60e51b81526004016102fd906114a3565b60008481526069602052604090206006015460ff16610db15760405162461bcd60e51b81526004016102fd906114ef565b60008351118015610dc3575081518351145b610e005760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016102fd565b60005b8351811015610ef95760006001600160a01b0316848281518110610e2957610e29611557565b60200260200101516001600160a01b031603610e795760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016102fd565b828181518110610e8b57610e8b611557565b602002602001015160676000868481518110610ea957610ea9611557565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020819055508080610ef19061156d565b915050610e03565b5050505050565b6000610f0b83610fa7565b8015610f1c5750610f1c8383610fda565b90505b92915050565b600054610100900460ff16610f4c5760405162461bcd60e51b81526004016102fd90611586565b610f54611063565b603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610f9d5760405162461bcd60e51b81526004016102fd90611586565b610fa561108a565b565b6000610fba826301ffc9a760e01b610fda565b8015610f1f5750610fd3826001600160e01b0319610fda565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d9150600051905082801561104c575060208210155b80156110585750600081115b979650505050505050565b600054610100900460ff16610fa55760405162461bcd60e51b81526004016102fd90611586565b600054610100900460ff166110b15760405162461bcd60e51b81526004016102fd90611586565b6001603455565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110f7576110f76110b8565b604052919050565b600067ffffffffffffffff821115611119576111196110b8565b5060051b60200190565b6001600160a01b038116811461113857600080fd5b50565b600082601f83011261114c57600080fd5b8135602061116161115c836110ff565b6110ce565b82815260059290921b8401810191818101908684111561118057600080fd5b8286015b848110156111a457803561119781611123565b8352918301918301611184565b509695505050505050565b600082601f8301126111c057600080fd5b813560206111d061115c836110ff565b82815260059290921b840181019181810190868411156111ef57600080fd5b8286015b848110156111a457803583529183019183016111f3565b60008060006060848603121561121f57600080fd5b83359250602084013567ffffffffffffffff8082111561123e57600080fd5b61124a8783880161113b565b9350604086013591508082111561126057600080fd5b5061126d868287016111af565b9150509250925092565b60006020828403121561128957600080fd5b5035919050565b600080604083850312156112a357600080fd5b82356112ae81611123565b946020939093013593505050565b600080600080608085870312156112d257600080fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060c0878903121561130757600080fd5b863561131281611123565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff8082111561134457600080fd5b6113508a838b0161113b565b935060a089013591508082111561136657600080fd5b5061137389828a016111af565b9150509295509295509295565b6000806040838503121561139357600080fd5b50508035926020909101359150565b6000602082840312156113b457600080fd5b81356113bf81611123565b9392505050565b6000602082840312156113d857600080fd5b815180151581146113bf57600080fd5b6020808252601c908201527f43616c6c6572206973206e6f74206f776e6572206f722061646d696e00000000604082015260600190565b604080825283519082018190526000906020906060840190828701845b828110156114615781516001600160a01b03168452928401929084019060010161143c565b5050508381038285015284518082528583019183019060005b818110156114965783518352928401929184019160010161147a565b5090979650505050505050565b6020808252600a9082015269125b9d985b1a59081a5960b21b604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b602080825260129082015271105a5c991c9bdc081dd85cc818d85b98d95b60721b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f1f57610f1f61151b565b81810381811115610f1f57610f1f61151b565b634e487b7160e01b600052603260045260246000fd5b60006001820161157f5761157f61151b565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220543eb33acbaa96870bc0269b8d38a01c94097b8895e117c265058a819ffb996b64736f6c63430008100033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063a358df9711610071578063a358df97146101cd578063b6dcff57146101e0578063c3490263146101f3578063c4d66de814610206578063f851a44014610219578063fe58f2d71461024457600080fd5b806323d392e8146100ae57806340b45418146100c957806360db5082146100de57806360efe334146101775780638ec46855146101a2575b600080fd5b6100b6610257565b6040519081526020015b60405180910390f35b6100dc6100d736600461120a565b610267565b005b6101366100ec366004611277565b60696020526000908152604090208054600182015460028301546003840154600485015460058601546006909601546001600160a01b039095169593949293919290919060ff1687565b604080516001600160a01b0390981688526020880196909652948601939093526060850191909152608084015260a0830152151560c082015260e0016100c0565b6100b6610185366004611290565b606760209081526000928352604080842090915290825290205481565b6100b66101b0366004611290565b606860209081526000928352604080842090915290825290205481565b6100dc6101db3660046112bc565b610350565b6100dc6101ee3660046112ee565b61050b565b6100dc610201366004611380565b610805565b6100dc6102143660046113a2565b610afc565b60335461022c906001600160a01b031681565b6040516001600160a01b0390911681526020016100c0565b6100dc610252366004611277565b610c17565b600061026260665490565b905090565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156102bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e191906113c6565b6103065760405162461bcd60e51b81526004016102fd906113e8565b60405180910390fd5b610311838383610d51565b827f536544790f46afb273f165fe3e3e125d981b2b2628bffc34f8cb738e5de98b6f838360405161034392919061141f565b60405180910390a2505050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156103a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ca91906113c6565b6103e65760405162461bcd60e51b81526004016102fd906113e8565b836000811180156103f957506066548111155b6104155760405162461bcd60e51b81526004016102fd906114a3565b83600081116104365760405162461bcd60e51b81526004016102fd906114c7565b60008411801561044557508284105b6104805760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b60448201526064016102fd565b6000868152606960205260409020600681015460ff166104b25760405162461bcd60e51b81526004016102fd906114ef565b600281018690556004810185905560058101849055604080518681526020810186905288917fa394a0c09567169a3f15fb6e07e306a8b7793e677e708104f768304e17592189910160405180910390a250505050505050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610561573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058591906113c6565b6105a15760405162461bcd60e51b81526004016102fd906113e8565b856105b381630922dc7f60e21b610f00565b61060b5760405162461bcd60e51b8152602060048201526024808201527f496e76616c696420484c506561636547656e65736973416e67656c20636f6e746044820152631c9858dd60e21b60648201526084016102fd565b856000811161062c5760405162461bcd60e51b81526004016102fd906114c7565b60008611801561063b57508486105b6106765760405162461bcd60e51b815260206004820152600c60248201526b496e76616c69642074696d6560a01b60448201526064016102fd565b610684606680546001019055565b6040518060e00160405280896001600160a01b031681526020016106a760665490565b81526020018881526020016000815260200187815260200186815260200160011515815250606960006106d960665490565b81526020808201929092526040908101600020835181546001600160a01b0319166001600160a01b039091161781559183015160018301558201516002820155606082015160038201556080820151600482015560a0820151600582015560c0909101516006909101805460ff191691151591909117905560665461075f908585610d51565b6066547f819570a97bc969a38e743adeef860618f7f877e0ee3d72fb73fa538f0d11c48c606960008381526020019081526020016000206040516107f3919081546001600160a01b0316815260018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a082015260069091015460ff16151560c082015260e00190565b60405180910390a25050505050505050565b6002603454036108575760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102fd565b6002603455808061087a5760405162461bcd60e51b81526004016102fd906114c7565b3360009081526067602090815260408083208684529091529020548211156108e45760405162461bcd60e51b815260206004820152601960248201527f496e73756666696369656e7420636c61696d20616d6f756e740000000000000060448201526064016102fd565b6000838152606960205260409020600681015460ff166109165760405162461bcd60e51b81526004016102fd906114ef565b4281600401541115801561092e575080600501544211155b61097a5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f742061697264726f7020617420746869732074696d650000000060448201526064016102fd565b8281600301600082825461098e9190611531565b90915550506002810154600382015411156109e45760405162461bcd60e51b81526020600482015260166024820152754578636565642074686520616c6c6f7765642071747960501b60448201526064016102fd565b33600090815260686020908152604080832087845290915281208054859290610a0e908490611531565b909155505033600090815260676020908152604080832087845290915281208054859290610a3d908490611544565b909155505080546001600160a01b031663248b71fc336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101869052604401600060405180830381600087803b158015610a9b57600080fd5b505af1158015610aaf573d6000803e3d6000fd5b5050505082610abb3390565b6001600160a01b0316857f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed02660405160405180910390a4505060016034555050565b600054610100900460ff1615808015610b1c5750600054600160ff909116105b80610b365750303b158015610b36575060005460ff166001145b610b995760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016102fd565b6000805460ff191660011790558015610bbc576000805461ff0019166101001790555b610bc582610f25565b610bcd610f76565b8015610c13576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050565b6033546001600160a01b03166324d7806c336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610c6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9191906113c6565b610cad5760405162461bcd60e51b81526004016102fd906113e8565b80600081118015610cc057506066548111155b610cdc5760405162461bcd60e51b81526004016102fd906114a3565b60008281526069602052604090206006015460ff16610d0d5760405162461bcd60e51b81526004016102fd906114ef565b600082815260696020526040808220600601805460ff191690555183917fac8c143800fe087e273e64fccb4ccff6c380c7b9fb83061c97eb98f8c60fd70391a25050565b82600081118015610d6457506066548111155b610d805760405162461bcd60e51b81526004016102fd906114a3565b60008481526069602052604090206006015460ff16610db15760405162461bcd60e51b81526004016102fd906114ef565b60008351118015610dc3575081518351145b610e005760405162461bcd60e51b815260206004820152600e60248201526d092dcecc2d8d2c840d8cadccee8d60931b60448201526064016102fd565b60005b8351811015610ef95760006001600160a01b0316848281518110610e2957610e29611557565b60200260200101516001600160a01b031603610e795760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064016102fd565b828181518110610e8b57610e8b611557565b602002602001015160676000868481518110610ea957610ea9611557565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000206000878152602001908152602001600020819055508080610ef19061156d565b915050610e03565b5050505050565b6000610f0b83610fa7565b8015610f1c5750610f1c8383610fda565b90505b92915050565b600054610100900460ff16610f4c5760405162461bcd60e51b81526004016102fd90611586565b610f54611063565b603380546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16610f9d5760405162461bcd60e51b81526004016102fd90611586565b610fa561108a565b565b6000610fba826301ffc9a760e01b610fda565b8015610f1f5750610fd3826001600160e01b0319610fda565b1592915050565b604080516001600160e01b03198316602480830191909152825180830390910181526044909101909152602080820180516001600160e01b03166301ffc9a760e01b178152825160009392849283928392918391908a617530fa92503d9150600051905082801561104c575060208210155b80156110585750600081115b979650505050505050565b600054610100900460ff16610fa55760405162461bcd60e51b81526004016102fd90611586565b600054610100900460ff166110b15760405162461bcd60e51b81526004016102fd90611586565b6001603455565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156110f7576110f76110b8565b604052919050565b600067ffffffffffffffff821115611119576111196110b8565b5060051b60200190565b6001600160a01b038116811461113857600080fd5b50565b600082601f83011261114c57600080fd5b8135602061116161115c836110ff565b6110ce565b82815260059290921b8401810191818101908684111561118057600080fd5b8286015b848110156111a457803561119781611123565b8352918301918301611184565b509695505050505050565b600082601f8301126111c057600080fd5b813560206111d061115c836110ff565b82815260059290921b840181019181810190868411156111ef57600080fd5b8286015b848110156111a457803583529183019183016111f3565b60008060006060848603121561121f57600080fd5b83359250602084013567ffffffffffffffff8082111561123e57600080fd5b61124a8783880161113b565b9350604086013591508082111561126057600080fd5b5061126d868287016111af565b9150509250925092565b60006020828403121561128957600080fd5b5035919050565b600080604083850312156112a357600080fd5b82356112ae81611123565b946020939093013593505050565b600080600080608085870312156112d257600080fd5b5050823594602084013594506040840135936060013592509050565b60008060008060008060c0878903121561130757600080fd5b863561131281611123565b9550602087013594506040870135935060608701359250608087013567ffffffffffffffff8082111561134457600080fd5b6113508a838b0161113b565b935060a089013591508082111561136657600080fd5b5061137389828a016111af565b9150509295509295509295565b6000806040838503121561139357600080fd5b50508035926020909101359150565b6000602082840312156113b457600080fd5b81356113bf81611123565b9392505050565b6000602082840312156113d857600080fd5b815180151581146113bf57600080fd5b6020808252601c908201527f43616c6c6572206973206e6f74206f776e6572206f722061646d696e00000000604082015260600190565b604080825283519082018190526000906020906060840190828701845b828110156114615781516001600160a01b03168452928401929084019060010161143c565b5050508381038285015284518082528583019183019060005b818110156114965783518352928401929184019160010161147a565b5090979650505050505050565b6020808252600a9082015269125b9d985b1a59081a5960b21b604082015260600190565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b602080825260129082015271105a5c991c9bdc081dd85cc818d85b98d95b60721b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610f1f57610f1f61151b565b81810381811115610f1f57610f1f61151b565b634e487b7160e01b600052603260045260246000fd5b60006001820161157f5761157f61151b565b5060010190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b60608201526080019056fea2646970667358221220543eb33acbaa96870bc0269b8d38a01c94097b8895e117c265058a819ffb996b64736f6c63430008100033

Block Transaction Difficulty 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
Loading...
Loading
[ 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.