Contract 0x095702044AeCA7826DF9723983FD27e2A6FFDBE2

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x6993346a3733eaf8ad5e98635f4e7e29edc36b706dbd5eaf2608e9dd45299cb1Buy312380182022-07-28 13:40:2467 days 45 mins ago0x88402d6a2dfbbb3a835241ab6782a4508d89c88d IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.17672274 60
0x6fa353ed6f18a1570d01c0e0c1affcc50cc680a48318192307bfc0cbc9a5bf99Set Allowed Usd ...312379342022-07-28 13:37:2267 days 48 mins ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.001554666088 30.440077698
0x11e159d3341e04b2d2a4d16097e211b1e9f33b15408bbb83f5980785af7a61e8Buy312379032022-07-28 13:36:2067 days 49 mins ago0x88402d6a2dfbbb3a835241ab6782a4508d89c88d IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.00353292 60
0x3ae207288519ad480505b95f0a7b060eec83b7b28786eacbc876a6fd79d54aa6Buy312378042022-07-28 13:32:5467 days 52 mins ago0xc09e8b1b0dd12fe9852ce9b8653ee3fee257b7a1 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.17538834 60
0x3f3b0ff1b369e55acd6cea14f9a35e9160e39f4431fc90fb8e728bbba2792467Buy312376042022-07-28 13:26:0267 days 59 mins ago0xc09e8b1b0dd12fe9852ce9b8653ee3fee257b7a1 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.00423072 60
0x606c9e0bfca4cb1b5183d0e2d490268b586f42596eaa3b39d524105664ea335eBuy312374482022-07-28 13:20:4167 days 1 hr ago0x518f0246ae9416ec078ab935953b79aac54dc2ba IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.17714328 60
0xc2da29049e571ac63fd3fefa0694a05bd6edd50784efe403a3fe35218b3d9c33Delete Allowed U...312373882022-07-28 13:18:3767 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.001074723526 33.652415048
0xcd84349ef4b2e0f37331d7de5ac782c3f4d01dd9b4a09e578c3d21fa6b6d15ceSet Allowed Usd ...312373442022-07-28 13:17:0567 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.001666794656 32.635534554
0x58263c34cf285d8dd090c186d3d3b520cb194c593ff78fc8e081d62684812d7cSet Allowed Usd ...312371632022-07-28 13:10:5167 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.005916723049 115.848355286
0xe4a464fba14acad488e281b76b75df3a62eefd01554b98e52c56c314be031116Set Allowed Usd ...312371632022-07-28 13:10:5167 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.002000969966 39.178626022
0x52c69a01bb0564aefb9b2209545946977200550d262df8f99749af3e3aaf9a96Set Allowed Usd ...312369162022-07-28 13:00:1367 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.002670924471 39.178626022
0x71e04558c13e70a5aea4115cbf5fc6454aa37764176381f567bf1d0bdcf4e919Buy312368662022-07-28 12:58:3367 days 1 hr ago0x518f0246ae9416ec078ab935953b79aac54dc2ba IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.0029178 60
0xb9e32359291a8eb836984bd212e0cddaa9a7de2ccb8907b5a0dbec2dd87d0993Start312361652022-07-28 12:34:2767 days 1 hr ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  0x095702044aeca7826df9723983fd27e2a6ffdbe20 MATIC0.00247190466 51.842550714
0x444e35f931282d9d0b4df08efa7dfd7cfb992d0985e4cd39df822ec9bf8e7c3a0x60806040312358292022-07-28 12:22:4167 days 2 hrs ago0x2dfff737eb054ded9795d96d6d9b9909896bb940 IN  Create: IcoGeneric0 MATIC0.84482925250
[ Download CSV Export 
Latest 9 internal transactions
Parent Txn Hash Block From To Value
0x6993346a3733eaf8ad5e98635f4e7e29edc36b706dbd5eaf2608e9dd45299cb1312380182022-07-28 13:40:2467 days 45 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x6993346a3733eaf8ad5e98635f4e7e29edc36b706dbd5eaf2608e9dd45299cb1312380182022-07-28 13:40:2467 days 45 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x6993346a3733eaf8ad5e98635f4e7e29edc36b706dbd5eaf2608e9dd45299cb1312380182022-07-28 13:40:2467 days 45 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x3ae207288519ad480505b95f0a7b060eec83b7b28786eacbc876a6fd79d54aa6312378042022-07-28 13:32:5467 days 52 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x3ae207288519ad480505b95f0a7b060eec83b7b28786eacbc876a6fd79d54aa6312378042022-07-28 13:32:5467 days 52 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x3ae207288519ad480505b95f0a7b060eec83b7b28786eacbc876a6fd79d54aa6312378042022-07-28 13:32:5467 days 52 mins ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x606c9e0bfca4cb1b5183d0e2d490268b586f42596eaa3b39d524105664ea335e312374482022-07-28 13:20:4167 days 1 hr ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x606c9e0bfca4cb1b5183d0e2d490268b586f42596eaa3b39d524105664ea335e312374482022-07-28 13:20:4167 days 1 hr ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
0x606c9e0bfca4cb1b5183d0e2d490268b586f42596eaa3b39d524105664ea335e312374482022-07-28 13:20:4167 days 1 hr ago 0x095702044aeca7826df9723983fd27e2a6ffdbe2  Contract Creation0 MATIC
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
IcoGeneric

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200000 runs

Other Settings:
byzantium EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : IcoGeneric.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.14;

import '@openzeppelin/contracts-upgradeable/token/ERC20/extensions/IERC20MetadataUpgradeable.sol';
import '@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/math/SafeMath.sol';
import '@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol';
import '@openzeppelin/contracts-upgradeable/token/ERC20/utils/TokenTimelockUpgradeable.sol';

contract lockICO is TokenTimelockUpgradeable {
    function initialize(
        IERC20Upgradeable token_,
        address beneficiary_,
        uint256 releaseTime_
    ) public initializer {
        __TokenTimelock_init(token_, beneficiary_, releaseTime_);
    }
}

contract IcoGeneric is ReentrancyGuard, Ownable {
    using SafeMath for uint256;

    struct Sale {
        address investor;
        uint256 amount;
        address[] lockedAddress;
        string usdSymbol;
        uint256 usdAmount;
        uint256 timestamp;
        address usdAddress;
    }

    mapping(address => Sale) public sales;
    Sale[] public salesList;

    address[] public allowedUsdAddress;

    uint256 public end;
    uint256 public duration;
    uint256 public icoPriceInWei;
    uint256 public term;
    address public walletTo;

    IERC20MetadataUpgradeable public token;

    constructor(
        address _tokenAddress,
        uint256 _duration,
        uint256 _icoPriceInWei,
        uint256 _term,
        address _walletTo
    ) {
        token = IERC20MetadataUpgradeable(_tokenAddress);
        require(_duration > 0, 'duration should be > 0');
        duration = _duration;
        icoPriceInWei = _icoPriceInWei;
        term = _term;
        walletTo = _walletTo;
    }

    function getUsdInfo(address usdAddress)
        public
        view
        returns (
            string memory,
            string memory,
            uint8
        )
    {
        IERC20Metadata usd = IERC20Metadata(usdAddress);

        return (usd.name(), usd.symbol(), usd.decimals());
    }

    // The amount must be sent with the same DECIMALS that the USDT (6), DAI (18)
    function buy(uint256 amountInUsd, address usdAddress)
        external
        icoActive
        nonReentrant
        hasTokenBalance
        notInvesting
        isAllowedUsdAddress(usdAddress)
    {
        IERC20Metadata usd = IERC20Metadata(usdAddress);

        uint256 tokenAmountInWei = getFinalTokenAmount(amountInUsd, usd);

        require(tokenAmountInWei > 0, 'amount cannot be 0');

        require(tokenBalance() > 0 && tokenBalance() >= tokenAmountInWei, 'The ICO has no tokens available to sell anymore.');

        uint256 allowanceInWei = usd.allowance(msg.sender, address(this));

        // We first convert it to WEI
        uint256 usdAmountInWei = convertUsdToWei(amountInUsd, usd);

        require(allowanceInWei >= usdAmountInWei, 'You must allow this contract to send USDT or increase the amount.');

        // From WEI we convert it back to USD so we are sure it has the same decimals as requested
        uint256 amountInUsdSafe = (usdAmountInWei / 1 ether) * 10**usd.decimals();

        usd.transferFrom(msg.sender, walletTo, amountInUsdSafe);

        transferTokenToLockedAddresses(msg.sender, tokenAmountInWei, usdAmountInWei, usd);
    }

    // It will check the decimals of the STABLE COIN
    // For DAI we have 18 decimals WEI
    // For USDT we have 6 decimals
    // First we convert it back to ETHER, then to WEI
    function convertUsdToWei(uint256 usdtAmount, IERC20Metadata usd) public view returns (uint256) {
        return usdtAmount.div(10**usd.decimals()).mul(1 ether);
    }

    function setIcoPriceInWei(uint256 _icoPriceInWei) external onlyOwner {
        icoPriceInWei = _icoPriceInWei;
    }

    function setTokenAddress(address _tokenAddress) external onlyOwner {
        token = IERC20MetadataUpgradeable(_tokenAddress);
    }

    // The amount to sell must follow the TOKEN decimals
    // Usually 18, but we never know
    function getTokenAmountToSell(uint256 usdAmountInWei) public view returns (uint256) {
        return usdAmountInWei.div(icoPriceInWei).mul(10**token.decimals());
    }

    function getFinalTokenAmount(uint256 usdAmount, IERC20Metadata usd) public view returns (uint256) {
        uint256 usdAmountInWei = convertUsdToWei(usdAmount, usd);
        uint256 tokenAmountInWei = getTokenAmountToSell(usdAmountInWei);
        return tokenAmountInWei;
    }

    function getLockedAddresses(address investor) public view returns (address[] memory) {
        return sales[investor].lockedAddress;
    }

    function transferTokenToLockedAddresses(
        address to,
        uint256 amount,
        uint256 usdAmountInWei,
        IERC20Metadata usd
    ) public {
        address[] memory lockedAddresses;
        sales[to] = Sale(to, amount, lockedAddresses, usd.symbol(), usdAmountInWei, block.timestamp, address(usd));
        uint256 currentDate = block.timestamp;
        for (uint256 i = 1; i <= term; i++) {
            currentDate = currentDate.add(365 days); // It will start releasing it in one year
            lockICO timeLockContract = new lockICO();
            timeLockContract.initialize(token, to, currentDate);
            token.transfer(address(timeLockContract), amount.div(term));
            sales[to].lockedAddress.push(address(timeLockContract));
        }
        salesList.push(sales[to]);
    }

    function transferToken(address to, uint256 amount) external onlyOwner {
        token.transfer(to, amount);
    }

    function tokenBalance() public view returns (uint256) {
        return token.balanceOf(address(this));
    }

    function isIcoActive() external view icoActive returns (bool) {
        return true;
    }

    function isIcoEnded() external view icoEnded returns (bool) {
        return true;
    }

    function start() external onlyOwner icoNotActive {
        end = block.timestamp + duration;
    }

    function isAlreadyInvesting() internal view returns (bool) {
        return (sales[msg.sender].amount > 0);
    }

    function setAllowedUsdAddress(address usdAddress) external onlyOwner {
        allowedUsdAddress.push(usdAddress);
    }

    function listSales() external view returns (Sale[] memory) {
        Sale[] memory sales_ = new Sale[](salesList.length);
        for (uint256 i = 0; i < salesList.length; i++) {
            sales_[i] = salesList[i];
        }
        return sales_;
    }

    function deleteAllowedUsdAddress(address usdAddress) external onlyOwner {
        for (uint16 i = 0; i < allowedUsdAddress.length; i++) {
            if (allowedUsdAddress[i] == usdAddress) {
                delete allowedUsdAddress[i];
                break;
            }
        }
    }

    modifier isAllowedUsdAddress(address usdAddress) {
        bool isAllowed = false;
        for (uint16 i = 0; i < allowedUsdAddress.length; i++) {
            if (allowedUsdAddress[i] == usdAddress) {
                isAllowed = true;
                break;
            }
        }

        require(isAllowed, 'This USD address is not in our white list.');
        _;
    }

    modifier icoActive() {
        require(end > 0 && (end >= block.timestamp), 'ICO must be active');
        _;
    }

    modifier icoNotActive() {
        require(end == 0, 'ICO should not be active');
        _;
    }

    modifier icoEnded() {
        require(end > 0 && (block.timestamp >= end), 'ICO must have ended');
        _;
    }

    modifier hasTokenBalance() {
        require(tokenBalance() > 0, 'The ICO has no tokens available to sell anymore.');
        _;
    }

    modifier notInvesting() {
        require(!isAlreadyInvesting(), "You can't participate of the ICO more than one time.");
        _;
    }
}

File 2 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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

pragma solidity ^0.8.0;

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

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

File 4 of 14 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 5 of 14 : IERC20.sol
// 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);
}

File 6 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 7 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

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

File 8 of 14 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 9 of 14 : TokenTimelockUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/utils/TokenTimelock.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev A token holder contract that will allow a beneficiary to extract the
 * tokens after a given release time.
 *
 * Useful for simple vesting schedules like "advisors get all of their tokens
 * after 1 year".
 *
 * @custom:storage-size 53
 */
contract TokenTimelockUpgradeable is Initializable {
    using SafeERC20Upgradeable for IERC20Upgradeable;

    // ERC20 basic token contract being held
    IERC20Upgradeable private _token;

    // beneficiary of tokens after they are released
    address private _beneficiary;

    // timestamp when token release is enabled
    uint256 private _releaseTime;

    /**
     * @dev Deploys a timelock instance that is able to hold the token specified, and will only release it to
     * `beneficiary_` when {release} is invoked after `releaseTime_`. The release time is specified as a Unix timestamp
     * (in seconds).
     */
    function __TokenTimelock_init(
        IERC20Upgradeable token_,
        address beneficiary_,
        uint256 releaseTime_
    ) internal onlyInitializing {
        __TokenTimelock_init_unchained(token_, beneficiary_, releaseTime_);
    }

    function __TokenTimelock_init_unchained(
        IERC20Upgradeable token_,
        address beneficiary_,
        uint256 releaseTime_
    ) internal onlyInitializing {
        require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time");
        _token = token_;
        _beneficiary = beneficiary_;
        _releaseTime = releaseTime_;
    }

    /**
     * @dev Returns the token being held.
     */
    function token() public view virtual returns (IERC20Upgradeable) {
        return _token;
    }

    /**
     * @dev Returns the beneficiary that will receive the tokens.
     */
    function beneficiary() public view virtual returns (address) {
        return _beneficiary;
    }

    /**
     * @dev Returns the time when the tokens are released in seconds since Unix epoch (i.e. Unix timestamp).
     */
    function releaseTime() public view virtual returns (uint256) {
        return _releaseTime;
    }

    /**
     * @dev Transfers tokens held by the timelock to the beneficiary. Will only succeed if invoked after the release
     * time.
     */
    function release() public virtual {
        require(block.timestamp >= releaseTime(), "TokenTimelock: current time is before release time");

        uint256 amount = token().balanceOf(address(this));
        require(amount > 0, "TokenTimelock: no tokens to release");

        token().safeTransfer(beneficiary(), amount);
    }

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

File 10 of 14 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";
import "../../../utils/AddressUpgradeable.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 SafeERC20Upgradeable {
    using AddressUpgradeable for address;

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

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20Upgradeable 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");
        }
    }
}

File 11 of 14 : IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 12 of 14 : IERC20Upgradeable.sol
// 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 IERC20Upgradeable {
    /**
     * @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);
}

File 13 of 14 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol)

pragma solidity ^0.8.2;

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

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

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

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

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = _setInitializedVersion(1);
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

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

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

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

    function _setInitializedVersion(uint8 version) private returns (bool) {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level
        // of initializers, because in other contexts the contract may have been reentered.
        if (_initializing) {
            require(
                version == 1 && !AddressUpgradeable.isContract(address(this)),
                "Initializable: contract is already initialized"
            );
            return false;
        } else {
            require(_initialized < version, "Initializable: contract is already initialized");
            _initialized = version;
            return true;
        }
    }
}

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

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200000
  },
  "evmVersion": "byzantium",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_icoPriceInWei","type":"uint256"},{"internalType":"uint256","name":"_term","type":"uint256"},{"internalType":"address","name":"_walletTo","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowedUsdAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountInUsd","type":"uint256"},{"internalType":"address","name":"usdAddress","type":"address"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdtAmount","type":"uint256"},{"internalType":"contract IERC20Metadata","name":"usd","type":"address"}],"name":"convertUsdToWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usdAddress","type":"address"}],"name":"deleteAllowedUsdAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"end","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"contract IERC20Metadata","name":"usd","type":"address"}],"name":"getFinalTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"investor","type":"address"}],"name":"getLockedAddresses","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdAmountInWei","type":"uint256"}],"name":"getTokenAmountToSell","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usdAddress","type":"address"}],"name":"getUsdInfo","outputs":[{"internalType":"string","name":"","type":"string"},{"internalType":"string","name":"","type":"string"},{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"icoPriceInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isIcoActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isIcoEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listSales","outputs":[{"components":[{"internalType":"address","name":"investor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address[]","name":"lockedAddress","type":"address[]"},{"internalType":"string","name":"usdSymbol","type":"string"},{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"address","name":"usdAddress","type":"address"}],"internalType":"struct IcoGeneric.Sale[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"sales","outputs":[{"internalType":"address","name":"investor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"usdSymbol","type":"string"},{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"address","name":"usdAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"salesList","outputs":[{"internalType":"address","name":"investor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"usdSymbol","type":"string"},{"internalType":"uint256","name":"usdAmount","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"address","name":"usdAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"usdAddress","type":"address"}],"name":"setAllowedUsdAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_icoPriceInWei","type":"uint256"}],"name":"setIcoPriceInWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"start","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"term","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20MetadataUpgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"usdAmountInWei","type":"uint256"},{"internalType":"contract IERC20Metadata","name":"usd","type":"address"}],"name":"transferTokenToLockedAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"walletTo","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162003b9038038062003b9083398101604081905262000034916200018e565b60016000556200005f620000506401000000006200011b810204565b6401000000006200011f810204565b600a8054600160a060020a031916600160a060020a03871617905583620000e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f6475726174696f6e2073686f756c64206265203e203000000000000000000000604482015260640160405180910390fd5b60069390935560079190915560085560098054600160a060020a031916600160a060020a0390921691909117905550620001e3565b3390565b60018054600160a060020a03838116600160a060020a0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051600160a060020a03811681146200018957600080fd5b919050565b600080600080600060a08688031215620001a757600080fd5b620001b28662000171565b9450602086015193506040860151925060608601519150620001d76080870162000171565b90509295509295909350565b61399d80620001f36000396000f3fe608060405234801561001057600080fd5b50600436106101ec576000357c0100000000000000000000000000000000000000000000000000000000900480637deb602511610121578063be9a6555116100bf578063efbe1c1c1161008e578063efbe1c1c1461040f578063f2fde38b14610418578063f79505ba1461042b578063fc0c546a1461043457600080fd5b8063be9a6555146103c1578063c6b9f06a146103c9578063d317db1c146103dc578063def4576c146103ef57600080fd5b80639e1a4d19116100fb5780639e1a4d1914610395578063a10ffbed1461039d578063b0f7c445146103a6578063ba7e424d146103b957600080fd5b80637deb6025146103305780638da5cb5b1461034357806391f57d151461038257600080fd5b80633f27fa901161018e5780635831b759116101685780635831b759146102ef578063661cb77014610302578063715018a61461031557806371a075e81461031d57600080fd5b80633f27fa9014610297578063468b50fc146102aa5780634be6b282146102cf57600080fd5b80631fc27ef2116101ca5780631fc27ef21461023557806326a4e8d21461024d578063309dd60e146102605780633c76a6361461028257600080fd5b80630fb5a6b4146101f15780631072cbea1461020d5780631314fe0314610222575b600080fd5b6101fa60065481565b6040519081526020015b60405180910390f35b61022061021b3660046124dc565b610454565b005b6101fa610230366004612508565b61057c565b61023d6105a1565b6040519015158152602001610204565b61022061025b366004612538565b610622565b61027361026e366004612538565b6106ea565b604051610204939291906125cf565b61028a6108e6565b6040516102049190612608565b6102206102a5366004612538565b610b72565b6102bd6102b8366004612746565b610c6a565b6040516102049695949392919061275f565b6102e26102dd366004612538565b610d6a565b60405161020491906127b5565b6101fa6102fd366004612746565b610dfd565b6101fa610310366004612508565b610ece565b610220610f83565b61022061032b36600461280f565b611010565b61022061033e366004612508565b611597565b60015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610204565b610220610390366004612746565b611cc0565b6101fa611d46565b6101fa60085481565b61035d6103b4366004612746565b611dde565b61023d611e15565b610220611e90565b6102bd6103d7366004612538565b611f8d565b6102206103ea366004612538565b611fcc565b60095461035d9073ffffffffffffffffffffffffffffffffffffffff1681565b6101fa60055481565b610220610426366004612538565b612115565b6101fa60075481565b600a5461035d9073ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff1633146104da576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600a546040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8481166004830152602482018490529091169063a9059cbb906044016020604051808303816000875af1158015610553573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105779190612859565b505050565b6000806105898484610ece565b9050600061059682610dfd565b925050505b92915050565b6000806005541180156105b657504260055410155b61061c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f49434f206d75737420626520616374697665000000000000000000000000000060448201526064016104d1565b50600190565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600a80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6060806000808490508073ffffffffffffffffffffffffffffffffffffffff166306fdde036040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381865afa15801561075a573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526107a091908101906128aa565b8173ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381865afa158015610807573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261084d91908101906128aa565b8273ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa1580156108b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d89190612975565b935093509350509193909250565b60035460609060009067ffffffffffffffff8111156109075761090761287b565b6040519080825280602002602001820160405280156109a457816020015b6109916040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001606081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b8152602001906001900390816109255790505b50905060005b600354811015610b6c57600381815481106109c7576109c7612998565b60009182526020918290206040805160e0810182526007909302909101805473ffffffffffffffffffffffffffffffffffffffff1683526001810154838501526002810180548351818702810187018552818152949592949386019392830182828015610a6a57602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610a3f575b50505050508152602001600382018054610a83906129c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610aaf906129c7565b8015610afc5780601f10610ad157610100808354040283529160200191610afc565b820191906000526020600020905b815481529060010190602001808311610adf57829003601f168201915b5050509183525050600482015460208201526005820154604082015260069091015473ffffffffffffffffffffffffffffffffffffffff166060909101528251839083908110610b4e57610b4e612998565b60200260200101819052508080610b6490612a43565b9150506109aa565b50919050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610bf3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600480546001810182556000919091527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60038181548110610c7a57600080fd5b600091825260209091206007909102018054600182015460038301805473ffffffffffffffffffffffffffffffffffffffff9093169450909291610cbd906129c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce9906129c7565b8015610d365780601f10610d0b57610100808354040283529160200191610d36565b820191906000526020600020905b815481529060010190602001808311610d1957829003601f168201915b50505050600483015460058401546006909401549293909290915073ffffffffffffffffffffffffffffffffffffffff1686565b73ffffffffffffffffffffffffffffffffffffffff8116600090815260026020818152604092839020909101805483518184028101840190945280845260609392830182828015610df157602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610dc6575b50505050509050919050565b600061059b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015610e8b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaf9190612975565b610eba90600a612b9e565b600754610ec8908590612245565b90612251565b6000610f7c670de0b6b3a7640000610ec88473ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015610f46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6a9190612975565b610f7590600a612b9e565b8690612245565b9392505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611004576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b61100e600061225d565b565b60606040518060e001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018281526020018373ffffffffffffffffffffffffffffffffffffffff166395d89b416040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401600060405180830381865afa1580156110ac573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526110f291908101906128aa565b815260208082018690524260408084019190915273ffffffffffffffffffffffffffffffffffffffff8681166060909401939093528883166000908152600280845290829020855181547fffffffffffffffffffffffff0000000000000000000000000000000000000000169516949094178455848301516001850155908401518051611187939285019291909101906122e0565b50606082015180516111a391600384019160209091019061236a565b506080820151600482015560a0820151600582015560c090910151600690910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff9092169190911790554260015b600854811161142257611220826301e133806122d4565b91506000604051611230906123de565b604051809103906000f08015801561124c573d6000803e3d6000fd5b50600a546040517f1794bb3c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff91821660048201528a8216602482015260448101869052919250821690631794bb3c90606401600060405180830381600087803b1580156112cb57600080fd5b505af11580156112df573d6000803e3d6000fd5b5050600a5460085473ffffffffffffffffffffffffffffffffffffffff909116925063a9059cbb91508390611315908b90612245565b6040517c010000000000000000000000000000000000000000000000000000000063ffffffff851602815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015611384573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113a89190612859565b5073ffffffffffffffffffffffffffffffffffffffff88811660009081526002602081815260408320909101805460018101825590835291200180547fffffffffffffffffffffffff000000000000000000000000000000000000000016929091169190911790558061141a81612a43565b915050611209565b5073ffffffffffffffffffffffffffffffffffffffff80871660009081526002602081905260408220600380546001818101835591909452815460079094027fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b810180547fffffffffffffffffffffffff000000000000000000000000000000000000000016959096169490941785558101547fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c8401559081018054919392611510927fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85d90910191906123eb565b506003820181600301908054611525906129c7565b61153092919061242b565b506004828101549082015560058083015490820155600691820154910180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909216919091179055505050505050565b60006005541180156115ab57504260055410155b611611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f49434f206d75737420626520616374697665000000000000000000000000000060448201526064016104d1565b60026000540361167d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d1565b6002600090815561168c611d46565b11611719576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5468652049434f20686173206e6f20746f6b656e7320617661696c61626c652060448201527f746f2073656c6c20616e796d6f72652e0000000000000000000000000000000060648201526084016104d1565b33600090815260026020526040902060010154156117b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f596f752063616e2774207061727469636970617465206f66207468652049434f60448201527f206d6f7265207468616e206f6e652074696d652e00000000000000000000000060648201526084016104d1565b806000805b60045461ffff8216101561183c578273ffffffffffffffffffffffffffffffffffffffff1660048261ffff16815481106117fa576117fa612998565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff160361182a576001915061183c565b8061183481612bad565b9150506117be565b50806118ca576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f54686973205553442061646472657373206973206e6f7420696e206f7572207760448201527f68697465206c6973742e0000000000000000000000000000000000000000000060648201526084016104d1565b8260006118d7868361057c565b905060008111611943576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f616d6f756e742063616e6e6f742062652030000000000000000000000000000060448201526064016104d1565b600061194d611d46565b11801561196157508061195e611d46565b10155b6119ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603060248201527f5468652049434f20686173206e6f20746f6b656e7320617661696c61626c652060448201527f746f2073656c6c20616e796d6f72652e0000000000000000000000000000000060648201526084016104d1565b6040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815233600482015230602482015260009073ffffffffffffffffffffffffffffffffffffffff84169063dd62ed3e90604401602060405180830381865afa158015611a60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a849190612bce565b90506000611a928885610ece565b905080821015611b4a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f596f75206d75737420616c6c6f77207468697320636f6e747261637420746f2060448201527f73656e642055534454206f7220696e6372656173652074686520616d6f756e7460648201527f2e00000000000000000000000000000000000000000000000000000000000000608482015260a4016104d1565b60008473ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381865afa158015611bb3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bd79190612975565b611be290600a612b9e565b611bf4670de0b6b3a764000084612be7565b611bfe9190612c22565b6009546040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9182166024820152604481018390529192508616906323b872dd906064016020604051808303816000875af1158015611c7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ca39190612859565b50611cb033858488611010565b5050600160005550505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314611d41576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b600755565b600a546040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009173ffffffffffffffffffffffffffffffffffffffff16906370a0823190602401602060405180830381865afa158015611db5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dd99190612bce565b905090565b60048181548110611dee57600080fd5b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16905081565b600080600554118015611e2a57506005544210155b61061c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f49434f206d757374206861766520656e6465640000000000000000000000000060448201526064016104d1565b60015473ffffffffffffffffffffffffffffffffffffffff163314611f11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60055415611f7b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f49434f2073686f756c64206e6f7420626520616374697665000000000000000060448201526064016104d1565b600654611f889042612c5f565b600555565b60026020526000908152604090208054600182015460038301805473ffffffffffffffffffffffffffffffffffffffff909316939192610cbd906129c7565b60015473ffffffffffffffffffffffffffffffffffffffff16331461204d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b60005b60045461ffff82161015612111578173ffffffffffffffffffffffffffffffffffffffff1660048261ffff168154811061208c5761208c612998565b60009182526020909120015473ffffffffffffffffffffffffffffffffffffffff16036120ff5760048161ffff16815481106120ca576120ca612998565b600091825260209091200180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690555050565b8061210981612bad565b915050612050565b5050565b60015473ffffffffffffffffffffffffffffffffffffffff163314612196576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d1565b73ffffffffffffffffffffffffffffffffffffffff8116612239576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d1565b6122428161225d565b50565b6000610f7c8284612be7565b6000610f7c8284612c22565b6001805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000610f7c8284612c5f565b82805482825590600052602060002090810192821561235a579160200282015b8281111561235a57825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190612300565b506123669291506124a5565b5090565b828054612376906129c7565b90600052602060002090601f016020900481019282612398576000855561235a565b82601f106123b157805160ff191683800117855561235a565b8280016001018555821561235a579182015b8281111561235a5782518255916020019190600101906123c3565b610cf080612c7883390190565b82805482825590600052602060002090810192821561235a5760005260206000209182015b8281111561235a578254825591600101919060010190612410565b828054612437906129c7565b90600052602060002090601f016020900481019282612459576000855561235a565b82601f1061246a578054855561235a565b8280016001018555821561235a57600052602060002091601f016020900482018281111561235a578254825591600101919060010190612410565b5b8082111561236657600081556001016124a6565b73ffffffffffffffffffffffffffffffffffffffff8116811461224257600080fd5b600080604083850312156124ef57600080fd5b82356124fa816124ba565b946020939093013593505050565b6000806040838503121561251b57600080fd5b82359150602083013561252d816124ba565b809150509250929050565b60006020828403121561254a57600080fd5b8135610f7c816124ba565b60005b83811015612570578181015183820152602001612558565b8381111561257f576000848401525b50505050565b6000815180845261259d816020860160208601612555565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6060815260006125e26060830186612585565b82810360208401526125f48186612585565b91505060ff83166040830152949350505050565b6020808252825182820181905260009190604090818501908084028601830187850186805b84811015612737578984037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc00186528251805173ffffffffffffffffffffffffffffffffffffffff9081168652898201518a8701528882015160e08a88018190528151908801819052610100880192918c01919086905b808210156126c657835183168552938d0193928d0192600191909101906126a4565b50505050606080830151878303828901526126e18382612585565b608085810151908a015260a080860151908a015260c09485015173ffffffffffffffffffffffffffffffffffffffff8116868b01529490935091506127239050565b50968901969450509187019160010161262d565b50919998505050505050505050565b60006020828403121561275857600080fd5b5035919050565b600073ffffffffffffffffffffffffffffffffffffffff808916835287602084015260c0604084015261279560c0840188612585565b6060840196909652608083019490945250911660a0909101529392505050565b6020808252825182820181905260009190848201906040850190845b8181101561280357835173ffffffffffffffffffffffffffffffffffffffff16835292840192918401916001016127d1565b50909695505050505050565b6000806000806080858703121561282557600080fd5b8435612830816124ba565b93506020850135925060408501359150606085013561284e816124ba565b939692955090935050565b60006020828403121561286b57600080fd5b81518015158114610f7c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156128bc57600080fd5b815167ffffffffffffffff808211156128d457600080fd5b818401915084601f8301126128e857600080fd5b8151818111156128fa576128fa61287b565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156129405761294061287b565b8160405282815287602084870101111561295957600080fd5b61296a836020830160208801612555565b979650505050505050565b60006020828403121561298757600080fd5b815160ff81168114610f7c57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6002810460018216806129db57607f821691505b602082108103610b6c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a7457612a74612a14565b5060010190565b600181815b80851115612ad657817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612aba57612aba612a14565b80851615612ac757918102915b60029094049390800290612a80565b509250929050565b600082612aed5750600161059b565b81612afa5750600061059b565b8160018114612b105760028114612b1a57612b37565b600191505061059b565b60ff841115612b2b57612b2b612a14565b8360020a91505061059b565b5060208310610133831016604e8410600b8410161715612b5a575081810a61059b565b612b648383612a7b565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04821115612b9657612b96612a14565b029392505050565b6000610f7c60ff841683612ade565b600061ffff808316818103612bc457612bc4612a14565b6001019392505050565b600060208284031215612be057600080fd5b5051919050565b600082612c1d577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612c5a57612c5a612a14565b500290565b60008219821115612c7257612c72612a14565b50019056fe608060405234801561001057600080fd5b50610cd0806100206000396000f3fe608060405234801561001057600080fd5b5060043610610084576000357c01000000000000000000000000000000000000000000000000000000009004806386d1a69f1161006d57806386d1a69f146100e2578063b91d4001146100ea578063fc0c546a146100fb57600080fd5b80631794bb3c1461008957806338af3eed1461009e575b600080fd5b61009c610097366004610b85565b61011f565b005b60015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b61009c6101d4565b6002546040519081526020016100d9565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff166100b8565b600061012b60016103f8565b9050801561016057600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b61016b84848461057e565b80156101ce57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050565b60025442101561026b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2063757272656e742074696d65206973206260448201527f65666f72652072656c656173652074696d65000000000000000000000000000060648201526084015b60405180910390fd5b6000805462010000900473ffffffffffffffffffffffffffffffffffffffff166040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff91909116906370a0823190602401602060405180830381865afa1580156102f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031b9190610bc6565b9050600081116103ad576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602360248201527f546f6b656e54696d656c6f636b3a206e6f20746f6b656e7320746f2072656c6560448201527f61736500000000000000000000000000000000000000000000000000000000006064820152608401610262565b6103f56103cf60015473ffffffffffffffffffffffffffffffffffffffff1690565b60005462010000900473ffffffffffffffffffffffffffffffffffffffff169083610625565b50565b60008054610100900460ff16156104af578160ff16600114801561041b5750303b155b6104a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610262565b506000919050565b60005460ff808416911610610546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610262565b50600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff92909216919091179055600190565b600054610100900460ff16610615576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610262565b6106208383836106b2565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610620908490610854565b600054610100900460ff16610749576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610262565b4281116107d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603260248201527f546f6b656e54696d656c6f636b3a2072656c656173652074696d65206973206260448201527f65666f72652063757272656e742074696d6500000000000000000000000000006064820152608401610262565b600080547fffffffffffffffffffff0000000000000000000000000000000000000000ffff166201000073ffffffffffffffffffffffffffffffffffffffff95861602179055600180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169290931691909117909155600255565b60006108b6826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166109609092919063ffffffff16565b80519091501561062057808060200190518101906108d49190610bdf565b610620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610262565b606061096f8484600085610979565b90505b9392505050565b60603031831115610a0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610262565b73ffffffffffffffffffffffffffffffffffffffff85163b610a8a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610262565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051610ab39190610c2d565b60006040518083038185875af1925050503d8060008114610af0576040519150601f19603f3d011682016040523d82523d6000602084013e610af5565b606091505b5091509150610b05828286610b10565b979650505050505050565b60608315610b1f575081610972565b825115610b2f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102629190610c49565b73ffffffffffffffffffffffffffffffffffffffff811681146103f557600080fd5b600080600060608486031215610b9a57600080fd5b8335610ba581610b63565b92506020840135610bb581610b63565b929592945050506040919091013590565b600060208284031215610bd857600080fd5b5051919050565b600060208284031215610bf157600080fd5b8151801515811461097257600080fd5b60005b83811015610c1c578181015183820152602001610c04565b838111156101ce5750506000910152565b60008251610c3f818460208701610c01565b9190910192915050565b6020815260008251806020840152610c68816040850160208701610c01565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea26469706673582212202bac4e6e2d48f836f3f5d7547648b8ddcbe594381ada6e0c3c5ffee34fc03e6c64736f6c634300080e0033a26469706673582212200166acf698e18f554b725d43d2a3969fa59698dd60dd043dd53e7cad2be5be6464736f6c634300080e0033000000000000000000000000f3feedf3c9142abc5ab71efd70cd8f069d3409fa000000000000000000000000000000000000000000000000000000000024ea00000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000002f7407470d3d59db2290f2fc2497aed553d6a1b5

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

000000000000000000000000f3feedf3c9142abc5ab71efd70cd8f069d3409fa000000000000000000000000000000000000000000000000000000000024ea00000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000002f7407470d3d59db2290f2fc2497aed553d6a1b5

-----Decoded View---------------
Arg [0] : _tokenAddress (address): 0xf3feedf3c9142abc5ab71efd70cd8f069d3409fa
Arg [1] : _duration (uint256): 2419200
Arg [2] : _icoPriceInWei (uint256): 100000000000000000
Arg [3] : _term (uint256): 3
Arg [4] : _walletTo (address): 0x2f7407470d3d59db2290f2fc2497aed553d6a1b5

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000f3feedf3c9142abc5ab71efd70cd8f069d3409fa
Arg [1] : 000000000000000000000000000000000000000000000000000000000024ea00
Arg [2] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [4] : 0000000000000000000000002f7407470d3d59db2290f2fc2497aed553d6a1b5


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.