ETH Price: $1,983.41 (-1.45%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Initialize172339302023-05-11 1:44:351025 days ago1683769475IN
0x3b54B772...71f54f6F0
0 ETH0.016610489.20158229

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
GoochCrowdsale

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "./Crowdsale.sol";
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";

/**
 * @title GoochCrowdsale
 * @dev Crowdsale with per-beneficiary caps.
 */
contract GoochCrowdsale is Crowdsale {
    uint256 private _perBeneficiaryCap;
    uint256 private _totalCap;

    bool private _publicSale;

    mapping(address => uint256) private _contributions;
    mapping(address => uint256) private _caps;

    function initialize(
        bool publicSale_,
        uint256 perBeneficiaryCap_,
        uint256 totalCap_,
        uint256 rate_,
        address payable wallet_,
        IERC20 token_
    ) external initializer {
        __Ownable_init();
        __Crowdsale_init(rate_, wallet_, token_);

        _publicSale = publicSale_;

        _perBeneficiaryCap = perBeneficiaryCap_;
        _totalCap = totalCap_;
    }

    /**
     * @dev Sets a specific beneficiary's maximum contribution.
     * @param beneficiary Address to be capped
     * @param cap Wei limit for individual contribution
     */
    function setCap(address beneficiary, uint256 cap) external onlyOwner {
        _caps[beneficiary] = cap;
    }

    /**
     * @dev Sets multiple beneficiaries' maximum contribution.
     * @param beneficiaries_ Addresses to be capped
     * @param caps_ Wei limit for individual contributions
     */
    function setCaps(
        address[] calldata beneficiaries_,
        uint256[] calldata caps_
    ) external onlyOwner {
        require(
            beneficiaries_.length == caps_.length,
            "GoochCrowdsale: mismatched array lengths"
        );
        uint256 countBeneficiaries = beneficiaries_.length;
        uint256 cap;
        address beneficiary;
        for (uint256 i = 0; i < countBeneficiaries; ) {
            beneficiary = beneficiaries_[i];
            cap = caps_[i];
            _caps[beneficiary] = cap;

            unchecked {
                ++i;
            }
        }
    }

    /**
     * @dev Returns the cap of a specific beneficiary.
     * @param beneficiary Address whose cap is to be checked
     * @return Current cap for individual beneficiary
     */
    function getCap(address beneficiary) public view returns (uint256) {
        return _caps[beneficiary];
    }

    /**
     * @dev Checks whether the cap has been reached.
     * @return Whether the cap was reached
     */
    function capReached() public view returns (bool) {
        return weiRaised() >= _totalCap;
    }

    /**
     * @dev Sets/updates the whitelist.
     * @param cap Wei limit for individual contribution
     */
    function setTotalCap(uint256 cap) external onlyOwner {
        _totalCap = cap;
    }

    /**
     * @dev Returns the total cap
     * @return Current cap for individual beneficiary
     */
    function getTotalCap() public view returns (uint256) {
        return _totalCap;
    }

    /**
     * @dev Returns the cap set for all the beneficiaries
     * @return Current cap for individual beneficiary
     */
    function getPerBeneficiaryCap() public view returns (uint256) {
        return _perBeneficiaryCap;
    }

    /**
     * @dev Toggles publicSale
     * @param publicSale_ Whether or not it is a public sale
     *
     */
    function setPublicSale(bool publicSale_) external onlyOwner {
        _publicSale = publicSale_;
    }

    /**
     * @dev Returns publicSale
     * @return Whether or not it is a public sale
     *
     */
    function getPublicSale() public view returns (bool) {
        return _publicSale;
    }

    /**
     * @dev Returns the amount contributed so far by a specific beneficiary.
     * @param beneficiary Address of contributor
     * @return Beneficiary contribution so far
     */
    function getContribution(
        address beneficiary
    ) public view returns (uint256) {
        return _contributions[beneficiary];
    }

    /**
     * @dev Returns the amount contributed so far by a specific beneficiary.
     * @param beneficiary Address of contributor
     * @return Beneficiary contribution so far
     */
    function getEligibleRemainingDepositAmount(
        address beneficiary
    ) public view returns (uint256) {
        if (_publicSale) {
            if (_perBeneficiaryCap > _contributions[beneficiary]) {
                return _perBeneficiaryCap - _contributions[beneficiary];
            } else {
                return 0;
            }
        } else {
            if (_caps[beneficiary] > _contributions[beneficiary]) {
                return _caps[beneficiary] - _contributions[beneficiary];
            } else {
                return 0;
            }
        }
    }

    /**
     * @dev Extend parent behavior requiring purchase to respect the beneficiary's funding cap.
     * @param beneficiary Token purchaser
     * @param weiAmount Amount of wei contributed
     */
    function _preValidatePurchase(
        address beneficiary,
        uint256 weiAmount
    ) internal view override {
        super._preValidatePurchase(beneficiary, weiAmount);
        require(
            weiRaised() + weiAmount <= _totalCap,
            "GoochCrowdsale: cap exceeded"
        );
        // solhint-disable-next-line max-line-length
        if (_publicSale) {
            require(
                _contributions[beneficiary] + weiAmount <= _perBeneficiaryCap,
                "GoochCrowdsale: beneficiary cap exceeded"
            );
        } else {
            require(
                _contributions[beneficiary] + weiAmount <= _caps[beneficiary],
                "GoochCrowdsale: beneficiary's cap exceeded"
            );
        }
    }

    /**
     * @dev Extend parent behavior to update beneficiary contributions.
     * @param beneficiary Token purchaser
     * @param weiAmount Amount of wei contributed
     */
    function _updatePurchasingState(
        address beneficiary,
        uint256 weiAmount
    ) internal override {
        super._updatePurchasingState(beneficiary, weiAmount);
        _contributions[beneficiary] = _contributions[beneficiary] + weiAmount;
    }
}

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

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

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

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

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

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

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

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

    /**
     * @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;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.1) (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.
     *
     * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a
     * constructor.
     *
     * Emits an {Initialized} event.
     */
    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.
     *
     * 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.
     *
     * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer`
     * cannot be nested. If one is invoked in the context of another, execution will revert.
     *
     * 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.
     *
     * WARNING: setting the version to 255 will prevent any future reinitialization.
     *
     * Emits an {Initialized} event.
     */
    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.
     *
     * Emits an {Initialized} event the first time it is successfully executed.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }

    /**
     * @dev Returns the highest version that has been initialized. See {reinitializer}.
     */
    function _getInitializedVersion() internal view returns (uint8) {
        return _initialized;
    }

    /**
     * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}.
     */
    function _isInitializing() internal view returns (bool) {
        return _initializing;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

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

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

pragma solidity ^0.8.0;
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;
}

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

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

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

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

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

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

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

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

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [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 functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

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

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

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

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

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

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

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

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

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

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

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20, SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.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
    Initializable,
    ContextUpgradeable,
    OwnableUpgradeable,
    ReentrancyGuard
{
    using SafeERC20 for IERC20;

    // The token being sold
    IERC20 private _token;

    // Address where funds are collected
    address payable private _wallet;

    // How many token units a buyer gets per wei.
    // The rate is the conversion between wei and the smallest and indivisible token unit.
    // So, if you are using a rate of 1 with a ERC20Detailed token with 3 decimals called TOK
    // 1 wei will give you 1 unit, or 0.001 TOK.
    uint256 private _rate;

    // Amount of wei raised
    uint256 private _weiRaised;

    /**
     * Event for token purchase logging
     * @param purchaser who paid for the tokens
     * @param beneficiary who got the tokens
     * @param value weis paid for purchase
     * @param amount amount of tokens purchased
     */
    event TokensPurchased(
        address indexed purchaser,
        address indexed beneficiary,
        uint256 value,
        uint256 amount
    );

    /**
     * @param rate_ Number of token units a buyer gets per wei
     * @dev The rate is the conversion between wei and the smallest and indivisible
     * token unit. So, if you are using a rate of 1 with a ERC20Detailed token
     * with 3 decimals called TOK, 1 wei will give you 1 unit, or 0.001 TOK.
     * @param wallet_ Address where collected funds will be forwarded to
     * @param token_ Address of the token being sold
     */
    function __Crowdsale_init(
        uint256 rate_,
        address payable wallet_,
        IERC20 token_
    ) internal onlyInitializing {
        require(rate_ > 0, "Crowdsale: rate is 0");
        require(wallet_ != address(0), "Crowdsale: wallet is the zero address");
        require(
            address(token_) != address(0),
            "Crowdsale: token is the zero address"
        );

        _rate = rate_;
        _wallet = wallet_;
        _token = token_;
    }

    /**
     * @dev fallback function ***DO NOT OVERRIDE***
     * Note that other contracts will transfer funds with a base gas stipend
     * of 2300, which is not enough to call buyTokens. Consider calling
     * buyTokens directly when purchasing tokens from a contract.
     */
    receive() external payable {}

    /**
     * @return the token being sold.
     */
    function token() public view returns (IERC20) {
        return _token;
    }

    /**
     * @dev Sets/updates the wallet where funds are sent.
     * @param wallet_ The wallet funds should be sent to.
     */
    function setWallet(address wallet_) external onlyOwner {
        _wallet = payable(wallet_);
    }

    /**
     * @return the address where funds are collected.
     */
    function wallet() public view returns (address payable) {
        return _wallet;
    }

    /**
     * @dev Sets/updates the rate.
     * @param rate_ The new rate.
     */
    function setRate(uint256 rate_) external onlyOwner {
        _rate = rate_;
    }

    /**
     * @return the number of token units a buyer gets per wei.
     */
    function rate() public view returns (uint256) {
        return _rate;
    }

    /**
     * @return the amount of wei raised.
     */
    function weiRaised() public view returns (uint256) {
        return _weiRaised;
    }

    /**
     * @dev low level token purchase ***DO NOT OVERRIDE***
     * This function has a non-reentrancy guard, so it shouldn't be called by
     * another `nonReentrant` function.
     */
    function buyTokens() public payable nonReentrant {
        address beneficiary = _msgSender();
        uint256 weiAmount = msg.value;
        _preValidatePurchase(beneficiary, weiAmount);

        // calculate token amount to be created
        uint256 tokens = _getTokenAmount(weiAmount);

        // update state
        _weiRaised = _weiRaised + weiAmount;

        _processPurchase(beneficiary, tokens);
        emit TokensPurchased(_msgSender(), beneficiary, weiAmount, tokens);

        _updatePurchasingState(beneficiary, weiAmount);

        _forwardFunds();
        _postValidatePurchase(beneficiary, weiAmount);
    }

    /**
     * @dev Withdraw remaining tokens that were not bought in the crowdsale
     */
    function withdrawTokens() external onlyOwner {
        IERC20(_token).safeTransfer(
            msg.sender,
            IERC20(_token).balanceOf(address(this))
        );
    }

    /**
     * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met.
     * Use `super` in contracts that inherit from Crowdsale to extend their validations.
     * Example from CappedCrowdsale.sol's _preValidatePurchase method:
     *     super._preValidatePurchase(beneficiary, weiAmount);
     *     require(weiRaised().add(weiAmount) <= cap);
     * @param beneficiary Address performing the token purchase
     * @param weiAmount Value in wei involved in the purchase
     */
    function _preValidatePurchase(
        address beneficiary,
        uint256 weiAmount
    ) internal view virtual {
        require(
            beneficiary != address(0),
            "Crowdsale: beneficiary is the zero address"
        );
        require(weiAmount != 0, "Crowdsale: weiAmount is 0");
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
    }

    /**
     * @dev Validation of an executed purchase. Observe state and use revert statements to undo rollback when valid
     * conditions are not met.
     * @param beneficiary Address performing the token purchase
     * @param weiAmount Value in wei involved in the purchase
     */
    function _postValidatePurchase(
        address beneficiary,
        uint256 weiAmount
    ) internal view {
        // solhint-disable-previous-line no-empty-blocks
    }

    /**
     * @dev Source of tokens. Override this method to modify the way in which the crowdsale ultimately gets and sends
     * its tokens.
     * @param beneficiary Address performing the token purchase
     * @param tokenAmount Number of tokens to be emitted
     */
    function _deliverTokens(address beneficiary, uint256 tokenAmount) internal {
        _token.safeTransfer(beneficiary, tokenAmount);
    }

    /**
     * @dev Executed when a purchase has been validated and is ready to be executed. Doesn't necessarily emit/send
     * tokens.
     * @param beneficiary Address receiving the tokens
     * @param tokenAmount Number of tokens to be purchased
     */
    function _processPurchase(
        address beneficiary,
        uint256 tokenAmount
    ) internal virtual {
        _deliverTokens(beneficiary, tokenAmount);
    }

    /**
     * @dev Override for extensions that require an internal state to check for validity (current user contributions,
     * etc.)
     * @param beneficiary Address receiving the tokens
     * @param weiAmount Value in wei involved in the purchase
     */
    function _updatePurchasingState(
        address beneficiary,
        uint256 weiAmount
    ) internal virtual {
        // solhint-disable-previous-line no-empty-blocks
    }

    /**
     * @dev Override to extend the way in which ether is converted to tokens.
     * @param weiAmount Value in wei to be converted into tokens
     * @return Number of tokens that can be purchased with the specified _weiAmount
     */
    function _getTokenAmount(
        uint256 weiAmount
    ) internal view returns (uint256) {
        return weiAmount * _rate;
    }

    /**
     * @dev Determines how ETH is stored/forwarded on purchases.
     */
    function _forwardFunds() internal {
        _wallet.transfer(msg.value);
    }
}

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"inputs":[],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"capReached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getContribution","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"}],"name":"getEligibleRemainingDepositAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPerBeneficiaryCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPublicSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"publicSale_","type":"bool"},{"internalType":"uint256","name":"perBeneficiaryCap_","type":"uint256"},{"internalType":"uint256","name":"totalCap_","type":"uint256"},{"internalType":"uint256","name":"rate_","type":"uint256"},{"internalType":"address payable","name":"wallet_","type":"address"},{"internalType":"contract IERC20","name":"token_","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"beneficiaries_","type":"address[]"},{"internalType":"uint256[]","name":"caps_","type":"uint256[]"}],"name":"setCaps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"publicSale_","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"rate_","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"cap","type":"uint256"}],"name":"setTotalCap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet_","type":"address"}],"name":"setWallet","outputs":[],"stateMutability":"nonpayable","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 payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506001606581905550612b23806100286000396000f3fe6080604052600436106101445760003560e01c806380ad2cf3116100b6578063deaa59df1161006f578063deaa59df14610410578063e1884b0f14610439578063e48058d314610462578063ec6fd26b1461048d578063f2fde38b146104b6578063fc0c546a146104df5761014b565b806380ad2cf3146103335780638d8f2adb1461035c5780638da5cb5b14610373578063a60b693d1461039e578063b3aefb75146103c9578063d0febe4c146104065761014b565b80634042b66f116101085780634042b66f146102475780634bf53055146102725780634f9359451461029d578063521eb273146102c85780635aca1bb6146102f3578063715018a61461031c5761014b565b8063099c4c7e1461015057806321eff7fc146101795780632c4e722e146101b657806334fcf437146101e157806334ff12751461020a5761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b5061017760048036038101906101729190611a8f565b61050a565b005b34801561018557600080fd5b506101a0600480360381019061019b9190611b6e565b61060f565b6040516101ad9190611bb4565b60405180910390f35b3480156101c257600080fd5b506101cb610658565b6040516101d89190611bb4565b60405180910390f35b3480156101ed57600080fd5b5061020860048036038101906102039190611bfb565b610662565b005b34801561021657600080fd5b50610231600480360381019061022c9190611b6e565b610674565b60405161023e9190611bb4565b60405180910390f35b34801561025357600080fd5b5061025c610852565b6040516102699190611bb4565b60405180910390f35b34801561027e57600080fd5b5061028761085c565b6040516102949190611c43565b60405180910390f35b3480156102a957600080fd5b506102b2610873565b6040516102bf9190611c43565b60405180910390f35b3480156102d457600080fd5b506102dd610887565b6040516102ea9190611c7f565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190611cc6565b6108b1565b005b34801561032857600080fd5b506103316108d6565b005b34801561033f57600080fd5b5061035a60048036038101906103559190611cf3565b6108ea565b005b34801561036857600080fd5b5061037161093a565b005b34801561037f57600080fd5b50610388610a2c565b6040516103959190611d42565b60405180910390f35b3480156103aa57600080fd5b506103b3610a56565b6040516103c09190611bb4565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190611b6e565b610a60565b6040516103fd9190611bb4565b60405180910390f35b61040e610aa9565b005b34801561041c57600080fd5b5061043760048036038101906104329190611b6e565b610b8e565b005b34801561044557600080fd5b50610460600480360381019061045b9190611bfb565b610bda565b005b34801561046e57600080fd5b50610477610bec565b6040516104849190611bb4565b60405180910390f35b34801561049957600080fd5b506104b460048036038101906104af9190611dc7565b610bf6565b005b3480156104c257600080fd5b506104dd60048036038101906104d89190611b6e565b610d6d565b005b3480156104eb57600080fd5b506104f4610df0565b6040516105019190611eb3565b60405180910390f35b610512610e1a565b81819050848490501461055a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055190611f51565b60405180910390fd5b600084849050905060008060005b838110156106055787878281811061058357610582611f71565b5b90506020020160208101906105989190611b6e565b91508585828181106105ad576105ac611f71565b5b90506020020135925082606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001019050610568565b5050505050505050565b6000606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000606854905090565b61066a610e1a565b8060688190555050565b6000606c60009054906101000a900460ff161561073157606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606a54111561072857606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606a546107219190611fcf565b905061084d565b6000905061084d565b606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561084857606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108419190611fcf565b905061084d565b600090505b919050565b6000606954905090565b6000606c60009054906101000a900460ff16905090565b6000606b54610880610852565b1015905090565b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108b9610e1a565b80606c60006101000a81548160ff02191690831515021790555050565b6108de610e1a565b6108e86000610e98565b565b6108f2610e1a565b80606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b610942610e1a565b610a2a33606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109a19190611d42565b602060405180830381865afa1580156109be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e29190612018565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f5e9092919063ffffffff16565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000606b54905090565b6000606e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ab1610fe4565b6000610abb611033565b90506000349050610acc828261103b565b6000610ad782611216565b905081606954610ae79190612045565b606981905550610af7838261122d565b8273ffffffffffffffffffffffffffffffffffffffff16610b16611033565b73ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051610b5d929190612079565b60405180910390a3610b6f838361123b565b610b776112d7565b610b818383611342565b505050610b8c611346565b565b610b96610e1a565b80606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610be2610e1a565b80606b8190555050565b6000606a54905090565b60008060019054906101000a900460ff16159050808015610c275750600160008054906101000a900460ff1660ff16105b80610c545750610c3630611350565b158015610c535750600160008054906101000a900460ff1660ff16145b5b610c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8a90612114565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610cd0576001600060016101000a81548160ff0219169083151502179055505b610cd8611373565b610ce38484846113cc565b86606c60006101000a81548160ff02191690831515021790555085606a8190555084606b819055508015610d645760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d5b919061217c565b60405180910390a15b50505050505050565b610d75610e1a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddb90612209565b60405180910390fd5b610ded81610e98565b50565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610e22611033565b73ffffffffffffffffffffffffffffffffffffffff16610e40610a2c565b73ffffffffffffffffffffffffffffffffffffffff1614610e96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8d90612275565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610fdf8363a9059cbb60e01b8484604051602401610f7d929190612295565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115ca565b505050565b600260655403611029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110209061230a565b60405180910390fd5b6002606581905550565b600033905090565b6110458282611691565b606b5481611051610852565b61105b9190612045565b111561109c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109390612376565b60405180910390fd5b606c60009054906101000a900460ff161561114557606a5481606d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110ff9190612045565b1115611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612408565b60405180910390fd5b611212565b606e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481606d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111d09190612045565b1115611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061249a565b60405180910390fd5b5b5050565b60006068548261122691906124ba565b9050919050565b6112378282611747565b5050565b6112458282611798565b80606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112909190612045565b606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561133f573d6000803e3d6000fd5b50565b5050565b6001606581905550565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166113c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b99061256e565b60405180910390fd5b6113ca61179c565b565b600060019054906101000a900460ff1661141b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114129061256e565b60405180910390fd5b6000831161145e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611455906125da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c49061266c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361153c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611533906126fe565b60405180910390fd5b8260688190555081606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600061162c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166117fd9092919063ffffffff16565b905060008151111561168c578080602001905181019061164c9190612733565b61168b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611682906127d2565b60405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f790612864565b60405180910390fd5b60008103611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a906128d0565b60405180910390fd5b5050565b6117948282606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f5e9092919063ffffffff16565b5050565b5050565b600060019054906101000a900460ff166117eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e29061256e565b60405180910390fd5b6117fb6117f6611033565b610e98565b565b606061180c8484600085611815565b90509392505050565b60608247101561185a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185190612962565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161188391906129f3565b60006040518083038185875af1925050503d80600081146118c0576040519150601f19603f3d011682016040523d82523d6000602084013e6118c5565b606091505b50915091506118d6878383876118e2565b92505050949350505050565b6060831561194457600083510361193c576118fc85611957565b61193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290612a56565b60405180910390fd5b5b82905061194f565b61194e838361197a565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561198d5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c19190612acb565b60405180910390fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126119f9576119f86119d4565b5b8235905067ffffffffffffffff811115611a1657611a156119d9565b5b602083019150836020820283011115611a3257611a316119de565b5b9250929050565b60008083601f840112611a4f57611a4e6119d4565b5b8235905067ffffffffffffffff811115611a6c57611a6b6119d9565b5b602083019150836020820283011115611a8857611a876119de565b5b9250929050565b60008060008060408587031215611aa957611aa86119ca565b5b600085013567ffffffffffffffff811115611ac757611ac66119cf565b5b611ad3878288016119e3565b9450945050602085013567ffffffffffffffff811115611af657611af56119cf565b5b611b0287828801611a39565b925092505092959194509250565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b3b82611b10565b9050919050565b611b4b81611b30565b8114611b5657600080fd5b50565b600081359050611b6881611b42565b92915050565b600060208284031215611b8457611b836119ca565b5b6000611b9284828501611b59565b91505092915050565b6000819050919050565b611bae81611b9b565b82525050565b6000602082019050611bc96000830184611ba5565b92915050565b611bd881611b9b565b8114611be357600080fd5b50565b600081359050611bf581611bcf565b92915050565b600060208284031215611c1157611c106119ca565b5b6000611c1f84828501611be6565b91505092915050565b60008115159050919050565b611c3d81611c28565b82525050565b6000602082019050611c586000830184611c34565b92915050565b6000611c6982611b10565b9050919050565b611c7981611c5e565b82525050565b6000602082019050611c946000830184611c70565b92915050565b611ca381611c28565b8114611cae57600080fd5b50565b600081359050611cc081611c9a565b92915050565b600060208284031215611cdc57611cdb6119ca565b5b6000611cea84828501611cb1565b91505092915050565b60008060408385031215611d0a57611d096119ca565b5b6000611d1885828601611b59565b9250506020611d2985828601611be6565b9150509250929050565b611d3c81611b30565b82525050565b6000602082019050611d576000830184611d33565b92915050565b611d6681611c5e565b8114611d7157600080fd5b50565b600081359050611d8381611d5d565b92915050565b6000611d9482611b30565b9050919050565b611da481611d89565b8114611daf57600080fd5b50565b600081359050611dc181611d9b565b92915050565b60008060008060008060c08789031215611de457611de36119ca565b5b6000611df289828a01611cb1565b9650506020611e0389828a01611be6565b9550506040611e1489828a01611be6565b9450506060611e2589828a01611be6565b9350506080611e3689828a01611d74565b92505060a0611e4789828a01611db2565b9150509295509295509295565b6000819050919050565b6000611e79611e74611e6f84611b10565b611e54565b611b10565b9050919050565b6000611e8b82611e5e565b9050919050565b6000611e9d82611e80565b9050919050565b611ead81611e92565b82525050565b6000602082019050611ec86000830184611ea4565b92915050565b600082825260208201905092915050565b7f476f6f636843726f776473616c653a206d69736d61746368656420617272617960008201527f206c656e67746873000000000000000000000000000000000000000000000000602082015250565b6000611f3b602883611ece565b9150611f4682611edf565b604082019050919050565b60006020820190508181036000830152611f6a81611f2e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fda82611b9b565b9150611fe583611b9b565b9250828203905081811115611ffd57611ffc611fa0565b5b92915050565b60008151905061201281611bcf565b92915050565b60006020828403121561202e5761202d6119ca565b5b600061203c84828501612003565b91505092915050565b600061205082611b9b565b915061205b83611b9b565b925082820190508082111561207357612072611fa0565b5b92915050565b600060408201905061208e6000830185611ba5565b61209b6020830184611ba5565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006120fe602e83611ece565b9150612109826120a2565b604082019050919050565b6000602082019050818103600083015261212d816120f1565b9050919050565b6000819050919050565b600060ff82169050919050565b600061216661216161215c84612134565b611e54565b61213e565b9050919050565b6121768161214b565b82525050565b6000602082019050612191600083018461216d565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006121f3602683611ece565b91506121fe82612197565b604082019050919050565b60006020820190508181036000830152612222816121e6565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061225f602083611ece565b915061226a82612229565b602082019050919050565b6000602082019050818103600083015261228e81612252565b9050919050565b60006040820190506122aa6000830185611d33565b6122b76020830184611ba5565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006122f4601f83611ece565b91506122ff826122be565b602082019050919050565b60006020820190508181036000830152612323816122e7565b9050919050565b7f476f6f636843726f776473616c653a2063617020657863656564656400000000600082015250565b6000612360601c83611ece565b915061236b8261232a565b602082019050919050565b6000602082019050818103600083015261238f81612353565b9050919050565b7f476f6f636843726f776473616c653a2062656e6566696369617279206361702060008201527f6578636565646564000000000000000000000000000000000000000000000000602082015250565b60006123f2602883611ece565b91506123fd82612396565b604082019050919050565b60006020820190508181036000830152612421816123e5565b9050919050565b7f476f6f636843726f776473616c653a2062656e6566696369617279277320636160008201527f7020657863656564656400000000000000000000000000000000000000000000602082015250565b6000612484602a83611ece565b915061248f82612428565b604082019050919050565b600060208201905081810360008301526124b381612477565b9050919050565b60006124c582611b9b565b91506124d083611b9b565b92508282026124de81611b9b565b915082820484148315176124f5576124f4611fa0565b5b5092915050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000612558602b83611ece565b9150612563826124fc565b604082019050919050565b600060208201905081810360008301526125878161254b565b9050919050565b7f43726f776473616c653a20726174652069732030000000000000000000000000600082015250565b60006125c4601483611ece565b91506125cf8261258e565b602082019050919050565b600060208201905081810360008301526125f3816125b7565b9050919050565b7f43726f776473616c653a2077616c6c657420697320746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612656602583611ece565b9150612661826125fa565b604082019050919050565b6000602082019050818103600083015261268581612649565b9050919050565b7f43726f776473616c653a20746f6b656e20697320746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006126e8602483611ece565b91506126f38261268c565b604082019050919050565b60006020820190508181036000830152612717816126db565b9050919050565b60008151905061272d81611c9a565b92915050565b600060208284031215612749576127486119ca565b5b60006127578482850161271e565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006127bc602a83611ece565b91506127c782612760565b604082019050919050565b600060208201905081810360008301526127eb816127af565b9050919050565b7f43726f776473616c653a2062656e656669636961727920697320746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061284e602a83611ece565b9150612859826127f2565b604082019050919050565b6000602082019050818103600083015261287d81612841565b9050919050565b7f43726f776473616c653a20776569416d6f756e74206973203000000000000000600082015250565b60006128ba601983611ece565b91506128c582612884565b602082019050919050565b600060208201905081810360008301526128e9816128ad565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061294c602683611ece565b9150612957826128f0565b604082019050919050565b6000602082019050818103600083015261297b8161293f565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156129b657808201518184015260208101905061299b565b60008484015250505050565b60006129cd82612982565b6129d7818561298d565b93506129e7818560208601612998565b80840191505092915050565b60006129ff82846129c2565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612a40601d83611ece565b9150612a4b82612a0a565b602082019050919050565b60006020820190508181036000830152612a6f81612a33565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b6000612a9d82612a76565b612aa78185611ece565b9350612ab7818560208601612998565b612ac081612a81565b840191505092915050565b60006020820190508181036000830152612ae58184612a92565b90509291505056fea264697066735822122094b2f51081ad4d643f3c91c4745bec96cddb164b9843c57e5774c83cc3c09d8664736f6c63430008120033

Deployed Bytecode

0x6080604052600436106101445760003560e01c806380ad2cf3116100b6578063deaa59df1161006f578063deaa59df14610410578063e1884b0f14610439578063e48058d314610462578063ec6fd26b1461048d578063f2fde38b146104b6578063fc0c546a146104df5761014b565b806380ad2cf3146103335780638d8f2adb1461035c5780638da5cb5b14610373578063a60b693d1461039e578063b3aefb75146103c9578063d0febe4c146104065761014b565b80634042b66f116101085780634042b66f146102475780634bf53055146102725780634f9359451461029d578063521eb273146102c85780635aca1bb6146102f3578063715018a61461031c5761014b565b8063099c4c7e1461015057806321eff7fc146101795780632c4e722e146101b657806334fcf437146101e157806334ff12751461020a5761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b5061017760048036038101906101729190611a8f565b61050a565b005b34801561018557600080fd5b506101a0600480360381019061019b9190611b6e565b61060f565b6040516101ad9190611bb4565b60405180910390f35b3480156101c257600080fd5b506101cb610658565b6040516101d89190611bb4565b60405180910390f35b3480156101ed57600080fd5b5061020860048036038101906102039190611bfb565b610662565b005b34801561021657600080fd5b50610231600480360381019061022c9190611b6e565b610674565b60405161023e9190611bb4565b60405180910390f35b34801561025357600080fd5b5061025c610852565b6040516102699190611bb4565b60405180910390f35b34801561027e57600080fd5b5061028761085c565b6040516102949190611c43565b60405180910390f35b3480156102a957600080fd5b506102b2610873565b6040516102bf9190611c43565b60405180910390f35b3480156102d457600080fd5b506102dd610887565b6040516102ea9190611c7f565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190611cc6565b6108b1565b005b34801561032857600080fd5b506103316108d6565b005b34801561033f57600080fd5b5061035a60048036038101906103559190611cf3565b6108ea565b005b34801561036857600080fd5b5061037161093a565b005b34801561037f57600080fd5b50610388610a2c565b6040516103959190611d42565b60405180910390f35b3480156103aa57600080fd5b506103b3610a56565b6040516103c09190611bb4565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190611b6e565b610a60565b6040516103fd9190611bb4565b60405180910390f35b61040e610aa9565b005b34801561041c57600080fd5b5061043760048036038101906104329190611b6e565b610b8e565b005b34801561044557600080fd5b50610460600480360381019061045b9190611bfb565b610bda565b005b34801561046e57600080fd5b50610477610bec565b6040516104849190611bb4565b60405180910390f35b34801561049957600080fd5b506104b460048036038101906104af9190611dc7565b610bf6565b005b3480156104c257600080fd5b506104dd60048036038101906104d89190611b6e565b610d6d565b005b3480156104eb57600080fd5b506104f4610df0565b6040516105019190611eb3565b60405180910390f35b610512610e1a565b81819050848490501461055a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161055190611f51565b60405180910390fd5b600084849050905060008060005b838110156106055787878281811061058357610582611f71565b5b90506020020160208101906105989190611b6e565b91508585828181106105ad576105ac611f71565b5b90506020020135925082606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001019050610568565b5050505050505050565b6000606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000606854905090565b61066a610e1a565b8060688190555050565b6000606c60009054906101000a900460ff161561073157606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606a54111561072857606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606a546107219190611fcf565b905061084d565b6000905061084d565b606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561084857606d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546108419190611fcf565b905061084d565b600090505b919050565b6000606954905090565b6000606c60009054906101000a900460ff16905090565b6000606b54610880610852565b1015905090565b6000606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6108b9610e1a565b80606c60006101000a81548160ff02191690831515021790555050565b6108de610e1a565b6108e86000610e98565b565b6108f2610e1a565b80606e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b610942610e1a565b610a2a33606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109a19190611d42565b602060405180830381865afa1580156109be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e29190612018565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f5e9092919063ffffffff16565b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000606b54905090565b6000606e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ab1610fe4565b6000610abb611033565b90506000349050610acc828261103b565b6000610ad782611216565b905081606954610ae79190612045565b606981905550610af7838261122d565b8273ffffffffffffffffffffffffffffffffffffffff16610b16611033565b73ffffffffffffffffffffffffffffffffffffffff167f6faf93231a456e552dbc9961f58d9713ee4f2e69d15f1975b050ef0911053a7b8484604051610b5d929190612079565b60405180910390a3610b6f838361123b565b610b776112d7565b610b818383611342565b505050610b8c611346565b565b610b96610e1a565b80606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610be2610e1a565b80606b8190555050565b6000606a54905090565b60008060019054906101000a900460ff16159050808015610c275750600160008054906101000a900460ff1660ff16105b80610c545750610c3630611350565b158015610c535750600160008054906101000a900460ff1660ff16145b5b610c93576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8a90612114565b60405180910390fd5b60016000806101000a81548160ff021916908360ff1602179055508015610cd0576001600060016101000a81548160ff0219169083151502179055505b610cd8611373565b610ce38484846113cc565b86606c60006101000a81548160ff02191690831515021790555085606a8190555084606b819055508015610d645760008060016101000a81548160ff0219169083151502179055507f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024986001604051610d5b919061217c565b60405180910390a15b50505050505050565b610d75610e1a565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610de4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddb90612209565b60405180910390fd5b610ded81610e98565b50565b6000606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610e22611033565b73ffffffffffffffffffffffffffffffffffffffff16610e40610a2c565b73ffffffffffffffffffffffffffffffffffffffff1614610e96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8d90612275565b60405180910390fd5b565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610fdf8363a9059cbb60e01b8484604051602401610f7d929190612295565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506115ca565b505050565b600260655403611029576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110209061230a565b60405180910390fd5b6002606581905550565b600033905090565b6110458282611691565b606b5481611051610852565b61105b9190612045565b111561109c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109390612376565b60405180910390fd5b606c60009054906101000a900460ff161561114557606a5481606d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110ff9190612045565b1115611140576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113790612408565b60405180910390fd5b611212565b606e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481606d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111d09190612045565b1115611211576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112089061249a565b60405180910390fd5b5b5050565b60006068548261122691906124ba565b9050919050565b6112378282611747565b5050565b6112458282611798565b80606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112909190612045565b606d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b606760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561133f573d6000803e3d6000fd5b50565b5050565b6001606581905550565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b600060019054906101000a900460ff166113c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b99061256e565b60405180910390fd5b6113ca61179c565b565b600060019054906101000a900460ff1661141b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114129061256e565b60405180910390fd5b6000831161145e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611455906125da565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036114cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c49061266c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361153c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611533906126fe565b60405180910390fd5b8260688190555081606760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600061162c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166117fd9092919063ffffffff16565b905060008151111561168c578080602001905181019061164c9190612733565b61168b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611682906127d2565b60405180910390fd5b5b505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611700576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f790612864565b60405180910390fd5b60008103611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a906128d0565b60405180910390fd5b5050565b6117948282606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f5e9092919063ffffffff16565b5050565b5050565b600060019054906101000a900460ff166117eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e29061256e565b60405180910390fd5b6117fb6117f6611033565b610e98565b565b606061180c8484600085611815565b90509392505050565b60608247101561185a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161185190612962565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff16858760405161188391906129f3565b60006040518083038185875af1925050503d80600081146118c0576040519150601f19603f3d011682016040523d82523d6000602084013e6118c5565b606091505b50915091506118d6878383876118e2565b92505050949350505050565b6060831561194457600083510361193c576118fc85611957565b61193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290612a56565b60405180910390fd5b5b82905061194f565b61194e838361197a565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561198d5781518083602001fd5b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c19190612acb565b60405180910390fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b60008083601f8401126119f9576119f86119d4565b5b8235905067ffffffffffffffff811115611a1657611a156119d9565b5b602083019150836020820283011115611a3257611a316119de565b5b9250929050565b60008083601f840112611a4f57611a4e6119d4565b5b8235905067ffffffffffffffff811115611a6c57611a6b6119d9565b5b602083019150836020820283011115611a8857611a876119de565b5b9250929050565b60008060008060408587031215611aa957611aa86119ca565b5b600085013567ffffffffffffffff811115611ac757611ac66119cf565b5b611ad3878288016119e3565b9450945050602085013567ffffffffffffffff811115611af657611af56119cf565b5b611b0287828801611a39565b925092505092959194509250565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611b3b82611b10565b9050919050565b611b4b81611b30565b8114611b5657600080fd5b50565b600081359050611b6881611b42565b92915050565b600060208284031215611b8457611b836119ca565b5b6000611b9284828501611b59565b91505092915050565b6000819050919050565b611bae81611b9b565b82525050565b6000602082019050611bc96000830184611ba5565b92915050565b611bd881611b9b565b8114611be357600080fd5b50565b600081359050611bf581611bcf565b92915050565b600060208284031215611c1157611c106119ca565b5b6000611c1f84828501611be6565b91505092915050565b60008115159050919050565b611c3d81611c28565b82525050565b6000602082019050611c586000830184611c34565b92915050565b6000611c6982611b10565b9050919050565b611c7981611c5e565b82525050565b6000602082019050611c946000830184611c70565b92915050565b611ca381611c28565b8114611cae57600080fd5b50565b600081359050611cc081611c9a565b92915050565b600060208284031215611cdc57611cdb6119ca565b5b6000611cea84828501611cb1565b91505092915050565b60008060408385031215611d0a57611d096119ca565b5b6000611d1885828601611b59565b9250506020611d2985828601611be6565b9150509250929050565b611d3c81611b30565b82525050565b6000602082019050611d576000830184611d33565b92915050565b611d6681611c5e565b8114611d7157600080fd5b50565b600081359050611d8381611d5d565b92915050565b6000611d9482611b30565b9050919050565b611da481611d89565b8114611daf57600080fd5b50565b600081359050611dc181611d9b565b92915050565b60008060008060008060c08789031215611de457611de36119ca565b5b6000611df289828a01611cb1565b9650506020611e0389828a01611be6565b9550506040611e1489828a01611be6565b9450506060611e2589828a01611be6565b9350506080611e3689828a01611d74565b92505060a0611e4789828a01611db2565b9150509295509295509295565b6000819050919050565b6000611e79611e74611e6f84611b10565b611e54565b611b10565b9050919050565b6000611e8b82611e5e565b9050919050565b6000611e9d82611e80565b9050919050565b611ead81611e92565b82525050565b6000602082019050611ec86000830184611ea4565b92915050565b600082825260208201905092915050565b7f476f6f636843726f776473616c653a206d69736d61746368656420617272617960008201527f206c656e67746873000000000000000000000000000000000000000000000000602082015250565b6000611f3b602883611ece565b9150611f4682611edf565b604082019050919050565b60006020820190508181036000830152611f6a81611f2e565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611fda82611b9b565b9150611fe583611b9b565b9250828203905081811115611ffd57611ffc611fa0565b5b92915050565b60008151905061201281611bcf565b92915050565b60006020828403121561202e5761202d6119ca565b5b600061203c84828501612003565b91505092915050565b600061205082611b9b565b915061205b83611b9b565b925082820190508082111561207357612072611fa0565b5b92915050565b600060408201905061208e6000830185611ba5565b61209b6020830184611ba5565b9392505050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b60006120fe602e83611ece565b9150612109826120a2565b604082019050919050565b6000602082019050818103600083015261212d816120f1565b9050919050565b6000819050919050565b600060ff82169050919050565b600061216661216161215c84612134565b611e54565b61213e565b9050919050565b6121768161214b565b82525050565b6000602082019050612191600083018461216d565b92915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006121f3602683611ece565b91506121fe82612197565b604082019050919050565b60006020820190508181036000830152612222816121e6565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061225f602083611ece565b915061226a82612229565b602082019050919050565b6000602082019050818103600083015261228e81612252565b9050919050565b60006040820190506122aa6000830185611d33565b6122b76020830184611ba5565b9392505050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006122f4601f83611ece565b91506122ff826122be565b602082019050919050565b60006020820190508181036000830152612323816122e7565b9050919050565b7f476f6f636843726f776473616c653a2063617020657863656564656400000000600082015250565b6000612360601c83611ece565b915061236b8261232a565b602082019050919050565b6000602082019050818103600083015261238f81612353565b9050919050565b7f476f6f636843726f776473616c653a2062656e6566696369617279206361702060008201527f6578636565646564000000000000000000000000000000000000000000000000602082015250565b60006123f2602883611ece565b91506123fd82612396565b604082019050919050565b60006020820190508181036000830152612421816123e5565b9050919050565b7f476f6f636843726f776473616c653a2062656e6566696369617279277320636160008201527f7020657863656564656400000000000000000000000000000000000000000000602082015250565b6000612484602a83611ece565b915061248f82612428565b604082019050919050565b600060208201905081810360008301526124b381612477565b9050919050565b60006124c582611b9b565b91506124d083611b9b565b92508282026124de81611b9b565b915082820484148315176124f5576124f4611fa0565b5b5092915050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b6000612558602b83611ece565b9150612563826124fc565b604082019050919050565b600060208201905081810360008301526125878161254b565b9050919050565b7f43726f776473616c653a20726174652069732030000000000000000000000000600082015250565b60006125c4601483611ece565b91506125cf8261258e565b602082019050919050565b600060208201905081810360008301526125f3816125b7565b9050919050565b7f43726f776473616c653a2077616c6c657420697320746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612656602583611ece565b9150612661826125fa565b604082019050919050565b6000602082019050818103600083015261268581612649565b9050919050565b7f43726f776473616c653a20746f6b656e20697320746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006126e8602483611ece565b91506126f38261268c565b604082019050919050565b60006020820190508181036000830152612717816126db565b9050919050565b60008151905061272d81611c9a565b92915050565b600060208284031215612749576127486119ca565b5b60006127578482850161271e565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006127bc602a83611ece565b91506127c782612760565b604082019050919050565b600060208201905081810360008301526127eb816127af565b9050919050565b7f43726f776473616c653a2062656e656669636961727920697320746865207a6560008201527f726f206164647265737300000000000000000000000000000000000000000000602082015250565b600061284e602a83611ece565b9150612859826127f2565b604082019050919050565b6000602082019050818103600083015261287d81612841565b9050919050565b7f43726f776473616c653a20776569416d6f756e74206973203000000000000000600082015250565b60006128ba601983611ece565b91506128c582612884565b602082019050919050565b600060208201905081810360008301526128e9816128ad565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b600061294c602683611ece565b9150612957826128f0565b604082019050919050565b6000602082019050818103600083015261297b8161293f565b9050919050565b600081519050919050565b600081905092915050565b60005b838110156129b657808201518184015260208101905061299b565b60008484015250505050565b60006129cd82612982565b6129d7818561298d565b93506129e7818560208601612998565b80840191505092915050565b60006129ff82846129c2565b915081905092915050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000612a40601d83611ece565b9150612a4b82612a0a565b602082019050919050565b60006020820190508181036000830152612a6f81612a33565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b6000612a9d82612a76565b612aa78185611ece565b9350612ab7818560208601612998565b612ac081612a81565b840191505092915050565b60006020820190508181036000830152612ae58184612a92565b90509291505056fea264697066735822122094b2f51081ad4d643f3c91c4745bec96cddb164b9843c57e5774c83cc3c09d8664736f6c63430008120033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.