ETH Price: $2,533.42 (-3.97%)

Contract

0x0511bB49059C8196277C4Fa5298d401c81179Cc4
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim188383952023-12-22 2:24:35315 days ago1703211875IN
0x0511bB49...c81179Cc4
0 ETH0.0035707427.7092043
Claim188383892023-12-22 2:23:11315 days ago1703211791IN
0x0511bB49...c81179Cc4
0 ETH0.003474826.96472373
Claim188373912023-12-21 23:02:23315 days ago1703199743IN
0x0511bB49...c81179Cc4
0 ETH0.0039304229.44891409
Claim188357902023-12-21 17:39:59315 days ago1703180399IN
0x0511bB49...c81179Cc4
0 ETH0.0060713645.48998687
Claim188357412023-12-21 17:30:11315 days ago1703179811IN
0x0511bB49...c81179Cc4
0 ETH0.0067223750.36767821
Claim188355492023-12-21 16:51:47315 days ago1703177507IN
0x0511bB49...c81179Cc4
0 ETH0.0078205158.59558875
Claim188355482023-12-21 16:51:35315 days ago1703177495IN
0x0511bB49...c81179Cc4
0 ETH0.0076207857.0990886
Claim188355462023-12-21 16:51:11315 days ago1703177471IN
0x0511bB49...c81179Cc4
0 ETH0.0077225457.86150561
Claim188355412023-12-21 16:50:11315 days ago1703177411IN
0x0511bB49...c81179Cc4
0 ETH0.0073946855.40499355
Claim188355132023-12-21 16:44:35315 days ago1703177075IN
0x0511bB49...c81179Cc4
0 ETH0.0083820562.80295543
Claim188355112023-12-21 16:44:11315 days ago1703177051IN
0x0511bB49...c81179Cc4
0 ETH0.0085303763.9142331
Claim188354952023-12-21 16:40:59315 days ago1703176859IN
0x0511bB49...c81179Cc4
0 ETH0.0095425471.49798045
Claim188354942023-12-21 16:40:47315 days ago1703176847IN
0x0511bB49...c81179Cc4
0 ETH0.009690172.60357723
Claim188354202023-12-21 16:25:59315 days ago1703175959IN
0x0511bB49...c81179Cc4
0 ETH0.0106843780.05314391
Claim188354152023-12-21 16:24:59315 days ago1703175899IN
0x0511bB49...c81179Cc4
0 ETH0.0102040576.45433852
Claim188354052023-12-21 16:22:47315 days ago1703175767IN
0x0511bB49...c81179Cc4
0 ETH0.0079507559.57141508
Claim188354042023-12-21 16:22:35315 days ago1703175755IN
0x0511bB49...c81179Cc4
0 ETH0.0079593259.63557806
Claim188354032023-12-21 16:22:23315 days ago1703175743IN
0x0511bB49...c81179Cc4
0 ETH0.0081558961.10844287
Claim188354012023-12-21 16:21:59315 days ago1703175719IN
0x0511bB49...c81179Cc4
0 ETH0.0083397162.48567502
Claim188354012023-12-21 16:21:59315 days ago1703175719IN
0x0511bB49...c81179Cc4
0 ETH0.0083397162.48567502
Claim188354002023-12-21 16:21:47315 days ago1703175707IN
0x0511bB49...c81179Cc4
0 ETH0.0085960564.40629506
Claim188353802023-12-21 16:17:47315 days ago1703175467IN
0x0511bB49...c81179Cc4
0 ETH0.0085329763.93371511
Claim188353692023-12-21 16:15:35315 days ago1703175335IN
0x0511bB49...c81179Cc4
0 ETH0.0083792662.78202864
Claim188353682023-12-21 16:15:23315 days ago1703175323IN
0x0511bB49...c81179Cc4
0 ETH0.0089148966.79528514
Claim188353662023-12-21 16:14:59315 days ago1703175299IN
0x0511bB49...c81179Cc4
0 ETH0.0090207967.58870745
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NpWhitelistCrowdsale

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
shanghai EvmVersion
File 1 of 11 : NpWhitelistCrowdsale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./Crowdsale.sol";
import "./TimedCrowdsale.sol";

contract NpWhitelistCrowdsale is Crowdsale, TimedCrowdsale {
    using SafeERC20 for IERC20;

    bytes32 public merkleRoot;
    uint public hardCap;
    uint public individualCap;

    constructor(
        uint hardCap_,
        uint individualCap_,
        bytes32 merkleRoot_,
        uint numerator_,
        uint denominator_,
        address wallet_,
        IERC20 subject_,
        IERC20 token_,
        uint openingTime,
        uint closingTime
    ) Crowdsale(numerator_, denominator_, wallet_, subject_, token_) TimedCrowdsale(openingTime, closingTime) {
        merkleRoot = merkleRoot_;
        hardCap = hardCap_;
        individualCap = individualCap_;
    }

    function setCap(uint hardCap_, uint individualCap_) external onlyOwner {
        hardCap = hardCap_;
        individualCap = individualCap_;
    }

    function getPurchasableAmount(address user, uint amount) public view returns (uint) {
        uint currentPurchase = purchasedAddresses[user];
        uint totalDesiredPurchase = currentPurchase + amount;
        if (totalDesiredPurchase > individualCap) {
            amount = individualCap - currentPurchase;
        }
        uint totalAfterPurchase = subjectRaised + amount;
        if (totalAfterPurchase > hardCap) {
            amount = hardCap - subjectRaised;
        }
        return amount;
    }

    function setRoot(bytes32 merkleRoot_) external onlyOwner {
        merkleRoot = merkleRoot_;
    }

    function buyTokens(uint amount, bytes32[] calldata merkleProof) external onlyWhileOpen nonReentrant {
        amount = getPurchasableAmount(msg.sender, amount);
        require(amount > 0, "WhitelistCrowdsale: invalid purchase amount");

        require(MerkleProof.verifyCalldata(merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender))), "WhitelistCrowdsale: invalid proof");

        subject.safeTransferFrom(msg.sender, wallet, amount);

        // update state
        subjectRaised += amount;
        purchasedAddresses[msg.sender] += amount;

        emit TokenPurchased(msg.sender, amount);
    }

    function claim() external nonReentrant {
        require(hasClosed(), "WhitelistCrowdsale: not closed");
        require(!claimed[msg.sender], "WhitelistCrowdsale: already claimed");

        uint tokenAmount = getTokenAmount(purchasedAddresses[msg.sender]);
        require(tokenAmount > 0, "WhitelistCrowdsale: not purchased");

        require(address(token) != address(0), "WhitelistCrowdsale: token not set");
        claimed[msg.sender] = true;
        token.safeTransfer(msg.sender, tokenAmount);

        emit TokenClaimed(msg.sender, tokenAmount);
    }
}

File 2 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 3 of 11 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

File 4 of 11 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

File 5 of 11 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../utils/Address.sol";

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

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

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

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

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

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

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

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

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

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

File 6 of 11 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

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

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

File 7 of 11 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 8 of 11 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.20;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the Merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates Merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     *@dev The multiproof provided is not valid.
     */
    error MerkleProofInvalidMultiproof();

    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details.
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the Merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        if (leavesLen + proofLen != totalHashes + 1) {
            revert MerkleProofInvalidMultiproof();
        }

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            if (proofPos != proofLen) {
                revert MerkleProofInvalidMultiproof();
            }
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Sorts the pair (a, b) and hashes the result.
     */
    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    /**
     * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory.
     */
    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 9 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

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

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

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

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

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

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

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

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

File 10 of 11 : Crowdsale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

/**
 * @title Crowdsale
 * @dev Crowdsale is a base contract for managing a token crowdsale,
 * allowing investors to purchase tokens with ether. This contract implements
 * such functionality in its most fundamental form and can be extended to provide additional
 * functionality and/or custom behavior.
 * The external interface represents the basic interface for purchasing tokens, and conforms
 * the base architecture for crowdsales. It is *not* intended to be modified / overridden.
 * The internal interface conforms the extensible and modifiable surface of crowdsales. Override
 * the methods to add functionality. Consider using 'super' where appropriate to concatenate
 * behavior.
 */
abstract contract Crowdsale is Context, ReentrancyGuard, Ownable {
    // The token being sold
    IERC20 public token;

    // The token being used to buy token
    IERC20 public subject;

    // Address where funds are collected
    address public wallet;

    uint public numerator;
    uint public denominator;

    uint public subjectRaised;

    mapping(address => uint) public purchasedAddresses;
    mapping(address => bool) public claimed;

    event TokenPurchased(address indexed user, uint value);
    event TokenClaimed(address indexed user, uint value);

    constructor (uint numerator_, uint denominator_, address wallet_, IERC20 subject_, IERC20 token_) Ownable(_msgSender()) {
        setParameters(numerator_, denominator_, wallet_, subject_, token_);
    }

    function setParameters(uint numerator_, uint denominator_, address wallet_, IERC20 subject_, IERC20 token_) public onlyOwner {
        require(numerator_ > 0 && denominator_ > 0, "Crowdsale: rate is 0");
        require(wallet_ != address(0), "Crowdsale: wallet is the zero address");
        require(address(subject_) != address(0), "Crowdsale: subjuct is the zero address");
        numerator = numerator_;
        denominator = denominator_;
        wallet = wallet_;
        token = token_;
        subject = subject_;
    }

    function setToken(IERC20 token_) external onlyOwner {
        require(address(token_) != address(0), "Crowdsale: token is the zero address");
        token = token_;
    }

    function getTokenAmount(uint amount) public view returns (uint) {
        return amount * numerator / denominator;
    }

    function emergencyWithdraw(address token_) external onlyOwner {
        IERC20(token_).transfer(msg.sender, IERC20(token_).balanceOf(address(this)));
    }
}

File 11 of 11 : TimedCrowdsale.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./Crowdsale.sol";

/**
 * @title TimedCrowdsale
 * @dev Crowdsale accepting contributions only within a time frame.
 */
abstract contract TimedCrowdsale is Crowdsale {
    uint public openingTime;
    uint public closingTime;

    /**
     * Event for crowdsale extending
     * @param newClosingTime new closing time
     * @param prevClosingTime old closing time
     */
    event TimedCrowdsaleExtended(uint prevClosingTime, uint newClosingTime);

    /**
     * @dev Reverts if not in crowdsale time range.
     */
    modifier onlyWhileOpen() {
        require(isOpen(), "TimedCrowdsale: not open");
        _;
    }

    /**
     * @dev Constructor, takes crowdsale opening and closing times.
     * @param openingTime_ Crowdsale opening time
     * @param closingTime_ Crowdsale closing time
     */
    constructor(uint openingTime_, uint closingTime_) {
        // solhint-disable-next-line not-rely-on-time
        require(openingTime_ >= block.timestamp, "TimedCrowdsale: opening time is before current time");
        // solhint-disable-next-line max-line-length
        require(closingTime_ > openingTime_, "TimedCrowdsale: opening time is not before closing time");

        openingTime = openingTime_;
        closingTime = closingTime_;
    }

    /**
     * @return true if the crowdsale is open, false otherwise.
     */
    function isOpen() public view returns (bool) {
        // solhint-disable-next-line not-rely-on-time
        return block.timestamp >= openingTime && block.timestamp <= closingTime;
    }

    /**
     * @dev Checks whether the period in which the crowdsale is open has already elapsed.
     * @return Whether crowdsale period has elapsed
     */
    function hasClosed() public view returns (bool) {
        // solhint-disable-next-line not-rely-on-time
        return block.timestamp > closingTime;
    }

    /**
     * @dev Extend crowdsale.
     * @param newClosingTime Crowdsale closing time
     */
    function extendTime(uint newClosingTime) external onlyOwner {
        require(!hasClosed(), "TimedCrowdsale: already closed");
        // solhint-disable-next-line max-line-length
        require(newClosingTime > closingTime, "TimedCrowdsale: new closing time is before current closing time");

        emit TimedCrowdsaleExtended(closingTime, newClosingTime);
        closingTime = newClosingTime;
    }

    function canClaim(address user) external view returns (bool) {
        if (address(token) == address(0)) {
            return false;
        }
        uint tokenAmount = getTokenAmount(purchasedAddresses[user]);
        return
            !(!hasClosed() ||
                claimed[user] ||
                tokenAmount == 0 ||
                token.balanceOf(address(this)) < tokenAmount);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"hardCap_","type":"uint256"},{"internalType":"uint256","name":"individualCap_","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint256","name":"numerator_","type":"uint256"},{"internalType":"uint256","name":"denominator_","type":"uint256"},{"internalType":"address","name":"wallet_","type":"address"},{"internalType":"contract IERC20","name":"subject_","type":"address"},{"internalType":"contract IERC20","name":"token_","type":"address"},{"internalType":"uint256","name":"openingTime","type":"uint256"},{"internalType":"uint256","name":"closingTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevClosingTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newClosingTime","type":"uint256"}],"name":"TimedCrowdsaleExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TokenPurchased","type":"event"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"buyTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"canClaim","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"closingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"denominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newClosingTime","type":"uint256"}],"name":"extendTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getPurchasableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"getTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hardCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasClosed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"individualCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openingTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"purchasedAddresses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"hardCap_","type":"uint256"},{"internalType":"uint256","name":"individualCap_","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numerator_","type":"uint256"},{"internalType":"uint256","name":"denominator_","type":"uint256"},{"internalType":"address","name":"wallet_","type":"address"},{"internalType":"contract IERC20","name":"subject_","type":"address"},{"internalType":"contract IERC20","name":"token_","type":"address"}],"name":"setParameters","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token_","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"subject","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"subjectRaised","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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

608060405234801562000010575f80fd5b50604051620017ff380380620017ff83398101604081905262000033916200038c565b60015f558181888888888833806200006557604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000708162000175565b50620000808585858585620001c6565b505050505042821015620000eb5760405162461bcd60e51b815260206004820152603360248201525f80516020620017df83398151915260448201527f6265666f72652063757272656e742074696d650000000000000000000000000060648201526084016200005c565b818111620001505760405162461bcd60e51b815260206004820152603760248201525f80516020620017df83398151915260448201527f6e6f74206265666f726520636c6f73696e672074696d6500000000000000000060648201526084016200005c565b600a91909155600b55505050600c94909455505050600d92909255600e555062000420565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b620001d062000343565b5f85118015620001df57505f84115b6200022d5760405162461bcd60e51b815260206004820152601460248201527f43726f776473616c653a2072617465206973203000000000000000000000000060448201526064016200005c565b6001600160a01b038316620002935760405162461bcd60e51b815260206004820152602560248201527f43726f776473616c653a2077616c6c657420697320746865207a65726f206164604482015264647265737360d81b60648201526084016200005c565b6001600160a01b038216620002fa5760405162461bcd60e51b815260206004820152602660248201527f43726f776473616c653a207375626a75637420697320746865207a65726f206160448201526564647265737360d01b60648201526084016200005c565b600594909455600692909255600480546001600160a01b03199081166001600160a01b039384161790915560028054821694831694909417909355600380549093169116179055565b6001546001600160a01b03163314620003725760405163118cdaa760e01b81523360048201526024016200005c565b565b6001600160a01b038116811462000389575f80fd5b50565b5f805f805f805f805f806101408b8d031215620003a7575f80fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151955060a08b0151620003d78162000374565b60c08c0151909550620003ea8162000374565b60e08c0151909450620003fd8162000374565b809350506101008b015191506101208b015190509295989b9194979a5092959850565b6113b1806200042e5f395ff3fe608060405234801561000f575f80fd5b50600436106101c6575f3560e01c8063989292da116100fe578063c884ef831161009e578063dab5f3401161006e578063dab5f34014610387578063f2fde38b1461039a578063fb86a404146103ad578063fc0c546a146103b6575f80fd5b8063c884ef8314610336578063cb2ed4f014610358578063cbc432a91461036b578063ce5f94541461037e575f80fd5b8063b7a8807c116100d9578063b7a8807c146102f4578063b91c4e6f146102fd578063bf3506c114610310578063c2507ac114610323575f80fd5b8063989292da146102c55780639eb9efcf146102d8578063a27aebbc146102e1575f80fd5b80634b6753bc116101695780636ff1c9bc116101445780636ff1c9bc14610290578063715018a6146102a35780638da5cb5b146102ab57806396ce0795146102bc575f80fd5b80634b6753bc1461026c5780634e71d92d14610275578063521eb2731461027d575f80fd5b80631515bc2b116101a45780631515bc2b1461022657806328df04161461023c5780632eb4a7ab1461025b57806347535d7b14610264575f80fd5b80630276650b146101ca5780630a59a98c146101e6578063144fa6d714610211575b5f80fd5b6101d3600e5481565b6040519081526020015b60405180910390f35b6003546101f9906001600160a01b031681565b6040516001600160a01b0390911681526020016101dd565b61022461021f366004611146565b6103c9565b005b600b5442115b60405190151581526020016101dd565b6101d361024a366004611146565b60086020525f908152604090205481565b6101d3600c5481565b61022c61045a565b6101d3600b5481565b610224610474565b6004546101f9906001600160a01b031681565b61022461029e366004611146565b610681565b610224610769565b6001546001600160a01b03166101f9565b6101d360065481565b6102246102d3366004611161565b61077a565b6101d360075481565b6102246102ef366004611181565b61078d565b6101d3600a5481565b61022461030b366004611198565b61089f565b61022c61031e366004611146565b610aa0565b6101d3610331366004611181565b610b8d565b61022c610344366004611146565b60096020525f908152604090205460ff1681565b6101d3610366366004611210565b610baf565b61022461037936600461123a565b610c27565b6101d360055481565b610224610395366004611181565b610d92565b6102246103a8366004611146565b610d9f565b6101d3600d5481565b6002546101f9906001600160a01b031681565b6103d1610ddc565b6001600160a01b0381166104385760405162461bcd60e51b8152602060048201526024808201527f43726f776473616c653a20746f6b656e20697320746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f600a54421015801561046f5750600b544211155b905090565b61047c610e09565b600b5442116104cd5760405162461bcd60e51b815260206004820152601e60248201527f57686974656c69737443726f776473616c653a206e6f7420636c6f7365640000604482015260640161042f565b335f9081526009602052604090205460ff16156105385760405162461bcd60e51b815260206004820152602360248201527f57686974656c69737443726f776473616c653a20616c726561647920636c61696044820152621b595960ea1b606482015260840161042f565b335f9081526008602052604081205461055090610b8d565b90505f81116105ab5760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a206e6f742070757263686173656044820152601960fa1b606482015260840161042f565b6002546001600160a01b031661060d5760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a20746f6b656e206e6f742073656044820152601d60fa1b606482015260840161042f565b335f818152600960205260409020805460ff19166001179055600254610640916001600160a01b03919091169083610e31565b60405181815233907fe42df0d9493dfd0d7f69902c895b94c190a53e8c27876a86f45e7c997d9d8f7c9060200160405180910390a25061067f60015f55565b565b610689610ddc565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156106d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f99190611295565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610741573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076591906112ac565b5050565b610771610ddc565b61067f5f610e90565b610782610ddc565b600d91909155600e55565b610795610ddc565b600b544211156107e75760405162461bcd60e51b815260206004820152601e60248201527f54696d656443726f776473616c653a20616c726561647920636c6f7365640000604482015260640161042f565b600b54811161085e5760405162461bcd60e51b815260206004820152603f60248201527f54696d656443726f776473616c653a206e657720636c6f73696e672074696d6560448201527f206973206265666f72652063757272656e7420636c6f73696e672074696d6500606482015260840161042f565b600b5460408051918252602082018390527f46711e222f558a07afd26e5e71b48ecb0a8b2cdcd40faeb1323e05e2c76a2f32910160405180910390a1600b55565b6108a761045a565b6108f35760405162461bcd60e51b815260206004820152601860248201527f54696d656443726f776473616c653a206e6f74206f70656e0000000000000000604482015260640161042f565b6108fb610e09565b6109053384610baf565b92505f831161096a5760405162461bcd60e51b815260206004820152602b60248201527f57686974656c69737443726f776473616c653a20696e76616c6964207075726360448201526a1a185cd948185b5bdd5b9d60aa1b606482015260840161042f565b600c546040516bffffffffffffffffffffffff193360601b1660208201526109af91849184919060340160405160208183030381529060405280519060200120610ee1565b610a055760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a20696e76616c69642070726f6f6044820152603360f91b606482015260840161042f565b600454600354610a24916001600160a01b039182169133911686610ef8565b8260075f828254610a3591906112df565b9091555050335f9081526008602052604081208054859290610a589084906112df565b909155505060405183815233907f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d9060200160405180910390a2610a9b60015f55565b505050565b6002545f906001600160a01b0316610ab957505f919050565b6001600160a01b0382165f90815260086020526040812054610ada90610b8d565b9050610ae7600b54421190565b1580610b0a57506001600160a01b0383165f9081526009602052604090205460ff165b80610b13575080155b80610b8557506002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b5f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b839190611295565b105b159392505050565b5f60065460055483610b9f91906112f2565b610ba99190611309565b92915050565b6001600160a01b0382165f9081526008602052604081205481610bd284836112df565b9050600e54811115610bef5781600e54610bec9190611328565b93505b5f84600754610bfe91906112df565b9050600d54811115610c1d57600754600d54610c1a9190611328565b94505b5092949350505050565b610c2f610ddc565b5f85118015610c3d57505f84115b610c805760405162461bcd60e51b8152602060048201526014602482015273043726f776473616c653a207261746520697320360641b604482015260640161042f565b6001600160a01b038316610ce45760405162461bcd60e51b815260206004820152602560248201527f43726f776473616c653a2077616c6c657420697320746865207a65726f206164604482015264647265737360d81b606482015260840161042f565b6001600160a01b038216610d495760405162461bcd60e51b815260206004820152602660248201527f43726f776473616c653a207375626a75637420697320746865207a65726f206160448201526564647265737360d01b606482015260840161042f565b600594909455600692909255600480546001600160a01b03199081166001600160a01b039384161790915560028054821694831694909417909355600380549093169116179055565b610d9a610ddc565b600c55565b610da7610ddc565b6001600160a01b038116610dd057604051631e4fbdf760e01b81525f600482015260240161042f565b610dd981610e90565b50565b6001546001600160a01b0316331461067f5760405163118cdaa760e01b815233600482015260240161042f565b60025f5403610e2b57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6040516001600160a01b03838116602483015260448201839052610a9b91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610f37565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f82610eee868685610f98565b1495945050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610f319186918216906323b872dd90608401610e5e565b50505050565b5f610f4b6001600160a01b03841683610fdb565b905080515f14158015610f6f575080806020019051810190610f6d91906112ac565b155b15610a9b57604051635274afe760e01b81526001600160a01b038416600482015260240161042f565b5f81815b84811015610fd057610fc682878784818110610fba57610fba61133b565b90506020020135610fe8565b9150600101610f9c565b5090505b9392505050565b6060610fd483835f611014565b5f818310611002575f828152602084905260409020610fd4565b5f838152602083905260409020610fd4565b6060814710156110395760405163cd78605960e01b815230600482015260240161042f565b5f80856001600160a01b03168486604051611054919061134f565b5f6040518083038185875af1925050503d805f811461108e576040519150601f19603f3d011682016040523d82523d5f602084013e611093565b606091505b50915091506110a38683836110ad565b9695505050505050565b6060826110c2576110bd82611109565b610fd4565b81511580156110d957506001600160a01b0384163b155b1561110257604051639996b31560e01b81526001600160a01b038516600482015260240161042f565b5080610fd4565b8051156111195780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610dd9575f80fd5b5f60208284031215611156575f80fd5b8135610fd481611132565b5f8060408385031215611172575f80fd5b50508035926020909101359150565b5f60208284031215611191575f80fd5b5035919050565b5f805f604084860312156111aa575f80fd5b83359250602084013567ffffffffffffffff808211156111c8575f80fd5b818601915086601f8301126111db575f80fd5b8135818111156111e9575f80fd5b8760208260051b85010111156111fd575f80fd5b6020830194508093505050509250925092565b5f8060408385031215611221575f80fd5b823561122c81611132565b946020939093013593505050565b5f805f805f60a0868803121561124e575f80fd5b8535945060208601359350604086013561126781611132565b9250606086013561127781611132565b9150608086013561128781611132565b809150509295509295909350565b5f602082840312156112a5575f80fd5b5051919050565b5f602082840312156112bc575f80fd5b81518015158114610fd4575f80fd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ba957610ba96112cb565b8082028115828204841417610ba957610ba96112cb565b5f8261132357634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610ba957610ba96112cb565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b8181101561136e5760208186018101518583015201611354565b505f92019182525091905056fea26469706673582212205049f5bebe02c060cc94bc24f5420124ccfe4b12c7b4838d15c1dc0d7e172b6364736f6c6343000817003354696d656443726f776473616c653a206f70656e696e672074696d65206973200000000000000000000000000000000000000000000000000000008bb2c97000000000000000000000000000000000000000000000000000000000012a05f2004c624c08b466a069e558db2993376efd5fae70ffd4a3f284bf7eac09858146f10000000000000000000000000000000000000000000000000000000000989680000000000000000000000000000000000000000000000000000000000000013b0000000000000000000000001792822ff139da1a0d909455b0ada97104db37fa000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000af1eeb83c364ad9ffeb5f97f223c1705d4810033000000000000000000000000000000000000000000000000000000006582f3600000000000000000000000000000000000000000000000000000000065830f80

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106101c6575f3560e01c8063989292da116100fe578063c884ef831161009e578063dab5f3401161006e578063dab5f34014610387578063f2fde38b1461039a578063fb86a404146103ad578063fc0c546a146103b6575f80fd5b8063c884ef8314610336578063cb2ed4f014610358578063cbc432a91461036b578063ce5f94541461037e575f80fd5b8063b7a8807c116100d9578063b7a8807c146102f4578063b91c4e6f146102fd578063bf3506c114610310578063c2507ac114610323575f80fd5b8063989292da146102c55780639eb9efcf146102d8578063a27aebbc146102e1575f80fd5b80634b6753bc116101695780636ff1c9bc116101445780636ff1c9bc14610290578063715018a6146102a35780638da5cb5b146102ab57806396ce0795146102bc575f80fd5b80634b6753bc1461026c5780634e71d92d14610275578063521eb2731461027d575f80fd5b80631515bc2b116101a45780631515bc2b1461022657806328df04161461023c5780632eb4a7ab1461025b57806347535d7b14610264575f80fd5b80630276650b146101ca5780630a59a98c146101e6578063144fa6d714610211575b5f80fd5b6101d3600e5481565b6040519081526020015b60405180910390f35b6003546101f9906001600160a01b031681565b6040516001600160a01b0390911681526020016101dd565b61022461021f366004611146565b6103c9565b005b600b5442115b60405190151581526020016101dd565b6101d361024a366004611146565b60086020525f908152604090205481565b6101d3600c5481565b61022c61045a565b6101d3600b5481565b610224610474565b6004546101f9906001600160a01b031681565b61022461029e366004611146565b610681565b610224610769565b6001546001600160a01b03166101f9565b6101d360065481565b6102246102d3366004611161565b61077a565b6101d360075481565b6102246102ef366004611181565b61078d565b6101d3600a5481565b61022461030b366004611198565b61089f565b61022c61031e366004611146565b610aa0565b6101d3610331366004611181565b610b8d565b61022c610344366004611146565b60096020525f908152604090205460ff1681565b6101d3610366366004611210565b610baf565b61022461037936600461123a565b610c27565b6101d360055481565b610224610395366004611181565b610d92565b6102246103a8366004611146565b610d9f565b6101d3600d5481565b6002546101f9906001600160a01b031681565b6103d1610ddc565b6001600160a01b0381166104385760405162461bcd60e51b8152602060048201526024808201527f43726f776473616c653a20746f6b656e20697320746865207a65726f206164646044820152637265737360e01b60648201526084015b60405180910390fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b5f600a54421015801561046f5750600b544211155b905090565b61047c610e09565b600b5442116104cd5760405162461bcd60e51b815260206004820152601e60248201527f57686974656c69737443726f776473616c653a206e6f7420636c6f7365640000604482015260640161042f565b335f9081526009602052604090205460ff16156105385760405162461bcd60e51b815260206004820152602360248201527f57686974656c69737443726f776473616c653a20616c726561647920636c61696044820152621b595960ea1b606482015260840161042f565b335f9081526008602052604081205461055090610b8d565b90505f81116105ab5760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a206e6f742070757263686173656044820152601960fa1b606482015260840161042f565b6002546001600160a01b031661060d5760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a20746f6b656e206e6f742073656044820152601d60fa1b606482015260840161042f565b335f818152600960205260409020805460ff19166001179055600254610640916001600160a01b03919091169083610e31565b60405181815233907fe42df0d9493dfd0d7f69902c895b94c190a53e8c27876a86f45e7c997d9d8f7c9060200160405180910390a25061067f60015f55565b565b610689610ddc565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa1580156106d5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106f99190611295565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303815f875af1158015610741573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061076591906112ac565b5050565b610771610ddc565b61067f5f610e90565b610782610ddc565b600d91909155600e55565b610795610ddc565b600b544211156107e75760405162461bcd60e51b815260206004820152601e60248201527f54696d656443726f776473616c653a20616c726561647920636c6f7365640000604482015260640161042f565b600b54811161085e5760405162461bcd60e51b815260206004820152603f60248201527f54696d656443726f776473616c653a206e657720636c6f73696e672074696d6560448201527f206973206265666f72652063757272656e7420636c6f73696e672074696d6500606482015260840161042f565b600b5460408051918252602082018390527f46711e222f558a07afd26e5e71b48ecb0a8b2cdcd40faeb1323e05e2c76a2f32910160405180910390a1600b55565b6108a761045a565b6108f35760405162461bcd60e51b815260206004820152601860248201527f54696d656443726f776473616c653a206e6f74206f70656e0000000000000000604482015260640161042f565b6108fb610e09565b6109053384610baf565b92505f831161096a5760405162461bcd60e51b815260206004820152602b60248201527f57686974656c69737443726f776473616c653a20696e76616c6964207075726360448201526a1a185cd948185b5bdd5b9d60aa1b606482015260840161042f565b600c546040516bffffffffffffffffffffffff193360601b1660208201526109af91849184919060340160405160208183030381529060405280519060200120610ee1565b610a055760405162461bcd60e51b815260206004820152602160248201527f57686974656c69737443726f776473616c653a20696e76616c69642070726f6f6044820152603360f91b606482015260840161042f565b600454600354610a24916001600160a01b039182169133911686610ef8565b8260075f828254610a3591906112df565b9091555050335f9081526008602052604081208054859290610a589084906112df565b909155505060405183815233907f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d9060200160405180910390a2610a9b60015f55565b505050565b6002545f906001600160a01b0316610ab957505f919050565b6001600160a01b0382165f90815260086020526040812054610ada90610b8d565b9050610ae7600b54421190565b1580610b0a57506001600160a01b0383165f9081526009602052604090205460ff165b80610b13575080155b80610b8557506002546040516370a0823160e01b815230600482015282916001600160a01b0316906370a0823190602401602060405180830381865afa158015610b5f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b839190611295565b105b159392505050565b5f60065460055483610b9f91906112f2565b610ba99190611309565b92915050565b6001600160a01b0382165f9081526008602052604081205481610bd284836112df565b9050600e54811115610bef5781600e54610bec9190611328565b93505b5f84600754610bfe91906112df565b9050600d54811115610c1d57600754600d54610c1a9190611328565b94505b5092949350505050565b610c2f610ddc565b5f85118015610c3d57505f84115b610c805760405162461bcd60e51b8152602060048201526014602482015273043726f776473616c653a207261746520697320360641b604482015260640161042f565b6001600160a01b038316610ce45760405162461bcd60e51b815260206004820152602560248201527f43726f776473616c653a2077616c6c657420697320746865207a65726f206164604482015264647265737360d81b606482015260840161042f565b6001600160a01b038216610d495760405162461bcd60e51b815260206004820152602660248201527f43726f776473616c653a207375626a75637420697320746865207a65726f206160448201526564647265737360d01b606482015260840161042f565b600594909455600692909255600480546001600160a01b03199081166001600160a01b039384161790915560028054821694831694909417909355600380549093169116179055565b610d9a610ddc565b600c55565b610da7610ddc565b6001600160a01b038116610dd057604051631e4fbdf760e01b81525f600482015260240161042f565b610dd981610e90565b50565b6001546001600160a01b0316331461067f5760405163118cdaa760e01b815233600482015260240161042f565b60025f5403610e2b57604051633ee5aeb560e01b815260040160405180910390fd5b60025f55565b6040516001600160a01b03838116602483015260448201839052610a9b91859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b038381831617835250505050610f37565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f82610eee868685610f98565b1495945050505050565b6040516001600160a01b038481166024830152838116604483015260648201839052610f319186918216906323b872dd90608401610e5e565b50505050565b5f610f4b6001600160a01b03841683610fdb565b905080515f14158015610f6f575080806020019051810190610f6d91906112ac565b155b15610a9b57604051635274afe760e01b81526001600160a01b038416600482015260240161042f565b5f81815b84811015610fd057610fc682878784818110610fba57610fba61133b565b90506020020135610fe8565b9150600101610f9c565b5090505b9392505050565b6060610fd483835f611014565b5f818310611002575f828152602084905260409020610fd4565b5f838152602083905260409020610fd4565b6060814710156110395760405163cd78605960e01b815230600482015260240161042f565b5f80856001600160a01b03168486604051611054919061134f565b5f6040518083038185875af1925050503d805f811461108e576040519150601f19603f3d011682016040523d82523d5f602084013e611093565b606091505b50915091506110a38683836110ad565b9695505050505050565b6060826110c2576110bd82611109565b610fd4565b81511580156110d957506001600160a01b0384163b155b1561110257604051639996b31560e01b81526001600160a01b038516600482015260240161042f565b5080610fd4565b8051156111195780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b6001600160a01b0381168114610dd9575f80fd5b5f60208284031215611156575f80fd5b8135610fd481611132565b5f8060408385031215611172575f80fd5b50508035926020909101359150565b5f60208284031215611191575f80fd5b5035919050565b5f805f604084860312156111aa575f80fd5b83359250602084013567ffffffffffffffff808211156111c8575f80fd5b818601915086601f8301126111db575f80fd5b8135818111156111e9575f80fd5b8760208260051b85010111156111fd575f80fd5b6020830194508093505050509250925092565b5f8060408385031215611221575f80fd5b823561122c81611132565b946020939093013593505050565b5f805f805f60a0868803121561124e575f80fd5b8535945060208601359350604086013561126781611132565b9250606086013561127781611132565b9150608086013561128781611132565b809150509295509295909350565b5f602082840312156112a5575f80fd5b5051919050565b5f602082840312156112bc575f80fd5b81518015158114610fd4575f80fd5b634e487b7160e01b5f52601160045260245ffd5b80820180821115610ba957610ba96112cb565b8082028115828204841417610ba957610ba96112cb565b5f8261132357634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115610ba957610ba96112cb565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b8181101561136e5760208186018101518583015201611354565b505f92019182525091905056fea26469706673582212205049f5bebe02c060cc94bc24f5420124ccfe4b12c7b4838d15c1dc0d7e172b6364736f6c63430008170033

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

0000000000000000000000000000000000000000000000000000008bb2c97000000000000000000000000000000000000000000000000000000000012a05f2004c624c08b466a069e558db2993376efd5fae70ffd4a3f284bf7eac09858146f10000000000000000000000000000000000000000000000000000000000989680000000000000000000000000000000000000000000000000000000000000013b0000000000000000000000001792822ff139da1a0d909455b0ada97104db37fa000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000af1eeb83c364ad9ffeb5f97f223c1705d4810033000000000000000000000000000000000000000000000000000000006582f3600000000000000000000000000000000000000000000000000000000065830f80

-----Decoded View---------------
Arg [0] : hardCap_ (uint256): 600000000000
Arg [1] : individualCap_ (uint256): 5000000000
Arg [2] : merkleRoot_ (bytes32): 0x4c624c08b466a069e558db2993376efd5fae70ffd4a3f284bf7eac09858146f1
Arg [3] : numerator_ (uint256): 10000000
Arg [4] : denominator_ (uint256): 315
Arg [5] : wallet_ (address): 0x1792822Ff139Da1a0d909455b0adA97104Db37FA
Arg [6] : subject_ (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [7] : token_ (address): 0xaF1eEb83c364aD9ffeb5f97F223C1705D4810033
Arg [8] : openingTime (uint256): 1703080800
Arg [9] : closingTime (uint256): 1703088000

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000008bb2c97000
Arg [1] : 000000000000000000000000000000000000000000000000000000012a05f200
Arg [2] : 4c624c08b466a069e558db2993376efd5fae70ffd4a3f284bf7eac09858146f1
Arg [3] : 0000000000000000000000000000000000000000000000000000000000989680
Arg [4] : 000000000000000000000000000000000000000000000000000000000000013b
Arg [5] : 0000000000000000000000001792822ff139da1a0d909455b0ada97104db37fa
Arg [6] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [7] : 000000000000000000000000af1eeb83c364ad9ffeb5f97f223c1705d4810033
Arg [8] : 000000000000000000000000000000000000000000000000000000006582f360
Arg [9] : 0000000000000000000000000000000000000000000000000000000065830f80


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.