ETH Price: $3,489.12 (-0.03%)
Gas: 2 Gwei

Contract

0x04E39c67b2047C2a8B573fBd691E30B2496CabE3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Sales201936802024-06-29 0:11:1122 days ago1719619871IN
0x04E39c67...2496CabE3
0 ETH0.000032671.35921327
Withdraw Tokens176009472023-07-01 18:21:35385 days ago1688235695IN
0x04E39c67...2496CabE3
0 ETH0.0010506714.70170459
Withdraw Tokens175970472023-07-01 5:10:35386 days ago1688188235IN
0x04E39c67...2496CabE3
0 ETH0.001061913.92371361
Withdraw Leftove...174704822023-06-13 10:28:35403 days ago1686652115IN
0x04E39c67...2496CabE3
0 ETH0.0009879814.06627618
Withdraw Tokens174292612023-06-07 15:03:47409 days ago1686150227IN
0x04E39c67...2496CabE3
0 ETH0.0034791645.61881645
Withdraw Tokens173596082023-05-28 19:30:23419 days ago1685302223IN
0x04E39c67...2496CabE3
0 ETH0.0024800232.51804757
Withdraw Tokens173354422023-05-25 10:02:59422 days ago1685008979IN
0x04E39c67...2496CabE3
0 ETH0.0026075534.19026722
Withdraw Tokens173348402023-05-25 8:00:23422 days ago1685001623IN
0x04E39c67...2496CabE3
0 ETH0.002387731.30756969
Withdraw Tokens173335102023-05-25 3:31:47423 days ago1684985507IN
0x04E39c67...2496CabE3
0 ETH0.0024320531.88909269
Withdraw Tokens173329882023-05-25 1:46:47423 days ago1684979207IN
0x04E39c67...2496CabE3
0 ETH0.0020166726.44261982
Withdraw Tokens173321712023-05-24 23:01:35423 days ago1684969295IN
0x04E39c67...2496CabE3
0 ETH0.0023535230.8594229
Withdraw Tokens173321492023-05-24 22:57:11423 days ago1684969031IN
0x04E39c67...2496CabE3
0 ETH0.0030506440
Withdraw Tokens173320712023-05-24 22:40:59423 days ago1684968059IN
0x04E39c67...2496CabE3
0 ETH0.0024087231.58318065
Withdraw Tokens173320162023-05-24 22:29:47423 days ago1684967387IN
0x04E39c67...2496CabE3
0 ETH0.0026389434.60190183
Withdraw Tokens173320132023-05-24 22:29:11423 days ago1684967351IN
0x04E39c67...2496CabE3
0 ETH0.0027446435.98784167
Withdraw Tokens173320112023-05-24 22:28:47423 days ago1684967327IN
0x04E39c67...2496CabE3
0 ETH0.002446532.07859891
Withdraw Tokens173320102023-05-24 22:28:35423 days ago1684967315IN
0x04E39c67...2496CabE3
0 ETH0.002448732.10748406
Withdraw Tokens173316342023-05-24 21:11:47423 days ago1684962707IN
0x04E39c67...2496CabE3
0 ETH0.002800336.65126392
Withdraw Tokens173315912023-05-24 21:02:59423 days ago1684962179IN
0x04E39c67...2496CabE3
0 ETH0.0035621246.62221573
Withdraw Tokens173315872023-05-24 21:01:59423 days ago1684962119IN
0x04E39c67...2496CabE3
0 ETH0.003282942.96777094
Withdraw Tokens173314752023-05-24 20:39:11423 days ago1684960751IN
0x04E39c67...2496CabE3
0 ETH0.0032102242.04339112
Withdraw Tokens173314602023-05-24 20:35:47423 days ago1684960547IN
0x04E39c67...2496CabE3
0 ETH0.0029272538.33744792
Withdraw Tokens173313412023-05-24 20:11:47423 days ago1684959107IN
0x04E39c67...2496CabE3
0 ETH0.0028312737.0804573
Withdraw Tokens173312942023-05-24 20:02:23423 days ago1684958543IN
0x04E39c67...2496CabE3
0 ETH0.0031053540.6699983
Withdraw Tokens173311262023-05-24 19:28:35423 days ago1684956515IN
0x04E39c67...2496CabE3
0 ETH0.003283843.00708958
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
173179912023-05-22 23:06:35425 days ago1684796795
0x04E39c67...2496CabE3
0.1 ETH
173179912023-05-22 23:06:35425 days ago1684796795
0x04E39c67...2496CabE3
0.2 ETH
173179902023-05-22 23:06:23425 days ago1684796783
0x04E39c67...2496CabE3
0.15 ETH
173179892023-05-22 23:06:11425 days ago1684796771
0x04E39c67...2496CabE3
0.15 ETH
173179892023-05-22 23:06:11425 days ago1684796771
0x04E39c67...2496CabE3
0.345 ETH
173179882023-05-22 23:05:59425 days ago1684796759
0x04E39c67...2496CabE3
0.1 ETH
173179882023-05-22 23:05:59425 days ago1684796759
0x04E39c67...2496CabE3
0.345 ETH
173179882023-05-22 23:05:59425 days ago1684796759
0x04E39c67...2496CabE3
0.345 ETH
173179872023-05-22 23:05:47425 days ago1684796747
0x04E39c67...2496CabE3
0.1 ETH
173179872023-05-22 23:05:47425 days ago1684796747
0x04E39c67...2496CabE3
0.1 ETH
173179862023-05-22 23:05:35425 days ago1684796735
0x04E39c67...2496CabE3
0.15 ETH
173179852023-05-22 23:05:23425 days ago1684796723
0x04E39c67...2496CabE3
0.1 ETH
173179852023-05-22 23:05:23425 days ago1684796723
0x04E39c67...2496CabE3
0.3 ETH
173179852023-05-22 23:05:23425 days ago1684796723
0x04E39c67...2496CabE3
0.345 ETH
173179852023-05-22 23:05:23425 days ago1684796723
0x04E39c67...2496CabE3
0.345 ETH
173179842023-05-22 23:05:11425 days ago1684796711
0x04E39c67...2496CabE3
0.345 ETH
173179842023-05-22 23:05:11425 days ago1684796711
0x04E39c67...2496CabE3
0.2 ETH
173179842023-05-22 23:05:11425 days ago1684796711
0x04E39c67...2496CabE3
0.1 ETH
173179842023-05-22 23:05:11425 days ago1684796711
0x04E39c67...2496CabE3
0.345 ETH
173179832023-05-22 23:04:59425 days ago1684796699
0x04E39c67...2496CabE3
0.1 ETH
173179832023-05-22 23:04:59425 days ago1684796699
0x04E39c67...2496CabE3
0.1 ETH
173179832023-05-22 23:04:59425 days ago1684796699
0x04E39c67...2496CabE3
0.1 ETH
173179822023-05-22 23:04:47425 days ago1684796687
0x04E39c67...2496CabE3
0.1 ETH
173179822023-05-22 23:04:47425 days ago1684796687
0x04E39c67...2496CabE3
0.345 ETH
173179822023-05-22 23:04:47425 days ago1684796687
0x04E39c67...2496CabE3
0.1 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FairLaunch

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 8 : FairLaunch.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

//............................................................................................................................
//.BBBBBBBBBBBBBBBBBBBBBB...........BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPPPPPPPPPPPPPPP........
//.BBBBBBBBBBBBBBBBBBBBBBBB.........BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPPPPPPPPPPPPPPPPP......
//.BBBBBBBBBBBBBBBBBBBBBBBBB........BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPPPPPPPPPPPPPPPPPP.....
//.BBBBBBBBBBBBBBBBBBBBBBBBBB.......BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPPPPPPPPPPPPPPPPPPP....
//.BBBBBBBBBBBBBBBBBBBBBBBBBB.......BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPPPPPPPPPPPPPPPPPPPP...
//.BBBBBBBB........BBBBBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP......PPPPPPPPPPPP...
//.BBBBBBBB..........BBBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.........PPPPPPPPPP..
//.BBBBBBBB...........BBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBB...........BBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBB...........BBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBB...........BBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP...........PPPPPPPP..
//.BBBBBBBB..........BBBBBBBBB......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBB.......BBBBBBBBBBB.......BEEEEEEE.......................EEEEEEEE......................EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBBBBBBBBBBBBBBBBBBB........BEEEEEEEEEEEEEEEEEEEEEEEE......EEEEEEEEEEEEEEEEEEEEEEEE......EPPPPPPP..........PPPPPPPPP..
//.BBBBBBBBBBBBBBBBBBBBBBBB.........BEEEEEEEEEEEEEEEEEEEEEEEE......EEEEEEEEEEEEEEEEEEEEEEEE......EPPPPPPP.........PPPPPPPPP...
//.BBBBBBBBBBBBBBBBBBBBBBBB.........BEEEEEEEEEEEEEEEEEEEEEEEE......EEEEEEEEEEEEEEEEEEEEEEEE......EPPPPPPP.....PPPPPPPPPPPPP...
//.BBBBBBBBBBBBBBBBBBBBBBBBBB.......BEEEEEEEEEEEEEEEEEEEEEEEE......EEEEEEEEEEEEEEEEEEEEEEEE......EPPPPPPPPPPPPPPPPPPPPPPPPP...
//.BBBBBBBBBBBBBBBBBBBBBBBBBBB......BEEEEEEEEEEEEEEEEEEEEEEEE......EEEEEEEEEEEEEEEEEEEEEEEE......EPPPPPPPPPPPPPPPPPPPPPPPP....
//.BBBBBBBB.......BBBBBBBBBBBBB.....BEEEEEEE.......................EEEEEEEE......................EPPPPPPPPPPPPPPPPPPPPPPP.....
//.BBBBBBBB...........BBBBBBBBB.....BEEEEEEE.......................EEEEEEEE......................EPPPPPPPPPPPPPPPPPPPPPP......
//.BBBBBBBB............BBBBBBBB.....BEEEEEEE.......................EEEEEEEE......................EPPPPPPPPPPPPPPPPPPPP........
//.BBBBBBBB............BBBBBBBBB....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB............BBBBBBBBB....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB............BBBBBBBBB....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB............BBBBBBBBB....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB............BBBBBBBBB....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB...........BBBBBBBBB.....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBB........BBBBBBBBBBBB.....BEEEEEEE.......................EEEEEEEE......................EPPPPPPP.....................
//.BBBBBBBBBBBBBBBBBBBBBBBBBBBB.....BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPP.....................
//.BBBBBBBBBBBBBBBBBBBBBBBBBBB......BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPP.....................
//.BBBBBBBBBBBBBBBBBBBBBBBBBB.......BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPP.....................
//.BBBBBBBBBBBBBBBBBBBBBBBBB........BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPP.....................
//.BBBBBBBBBBBBBBBBBBBBBBB..........BEEEEEEEEEEEEEEEEEEEEEEEEE.....EEEEEEEEEEEEEEEEEEEEEEEEEE....EPPPPPPP.....................
//............................................................................................................................

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

contract FairLaunch is ReentrancyGuard, Ownable {
    using ECDSA for bytes32;
    using SafeERC20 for IERC20;

    /* ======== VARIABLES ======== */

    address public token;
    address public whitelistSigner;
    address payable public treasury;

    uint256 public rate;
    uint256 public ethRaised;
    uint256 public endICO;
    uint256 public minPurchase;
    uint256 public maxPurchase;
    uint256 public availableTokensICO;
    uint256 public boughtTokensICO;

    bool public buyActive = true;
    bool public withdrawActive = true;
    bool public whitelistActive = true;

    // bytes32 -> DomainSeparator
    bytes32 public DOMAIN_SEPARATOR;
    // bytes32 -> PRESALE_TYPEHASH
    bytes32 public constant PRESALE_TYPEHASH = keccak256("FairLaunch(address buyer)");

    /* ======== STRUCTS ======== */

    struct Investor {
        address wallet;
        uint256 amountToReceive;
        uint256 ethSpend;
    }

    /* ======== MAPPINGS ======== */

    mapping(address => Investor) public investor;

    /* ======== EVENTS ======== */

    event TokensPurchased(address indexed _beneficiary, address indexed _treasury, uint256 _amount);
    event SetICO(uint256 _block);
    event TokenAddress(address token);
    event WithdrawLeftovers(address _receipent, uint256 _amount);
    event WithdrawRewards(address _receipent, uint256 _amount);
    event MinPurchase(uint256 _amount);
    event MaxPurchase(uint256 _amount);
    event Rate(uint256 _amount);
    event AvailableTokensICO(uint256 _amount);
    event Sales(bool _buyActive, bool _withdrawActive);
    event WhitelistActive(bool _whitelistActive);
    event WhitelistSigner(address _whitelistSigner);
    event Treasury(address payable _amount);

    /* ======== MODIFIERS ======== */

    modifier icoActive() {
        require(endICO > 0 && block.number < endICO && availableTokensICO > 0, "ICO must be active");
        _;
    }
    
    modifier icoNotActive() {
        require(endICO < block.number, 'ICO is active');
        _;
    }

    modifier withdrawIsActive() {
        require(withdrawActive, 'Withdrawing has been paused');
        _;
    }

    modifier buyIsActive() {
        require(buyActive, 'Purchasing has been paused');
        _;
    }

    /* ======== INITIALIZATION ======== */

    constructor (
        address payable _treasury,
        uint256 _rate, 
        uint256 _availableTokensICO,
        uint256 _endICO, 
        uint256 _minPurchase, 
        uint256 _maxPurchase
    ) public {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }

        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                keccak256(bytes("FairLaunch")),
                keccak256(bytes("1")),
                chainId,
                address(this)
            )
        );

        setRate(_rate);
        setICO(_endICO);
        setMaxPurchase(_maxPurchase);
        setMinPurchase(_minPurchase);
        setAvailableTokensICO(_availableTokensICO);
        setWhitelistSigner(_msgSender());
        setTreasury(_treasury);
    }
    
    /* ======== SETTERS ======== */

    /**
    * @notice Set the new end ICO, when setting this to 0 the ico will be done
    * @param _whitelistActive Sets the whitelist active or not
    */
    function setWhitelistActive(bool _whitelistActive) public onlyOwner {
        whitelistActive = _whitelistActive;

        emit WhitelistActive(_whitelistActive);
    }

    /**
    * @notice Set the new signer of the whitelisters
    * @param _whitelistSigner The new whitelist signer
    */
    function setWhitelistSigner(address _whitelistSigner) public onlyOwner {
        whitelistSigner = _whitelistSigner;

        emit WhitelistSigner(_whitelistSigner);
    }

    /**
    * @notice Set the new end ICO, when setting this to 0 the ico will be done
    * @param _ICO The end ico block
    */
    function setICO(uint256 _ICO) public onlyOwner {
        endICO = _ICO;

        emit SetICO(_ICO);
    }

    /**
    * @notice Set Token Address
    * @param _token The token address the presale is about
    */
    function setToken(address _token) public onlyOwner {
        require(_token != address(0x0), "FairLaunch: Token is the zero address");
        token = _token;

        emit TokenAddress(_token);
    }

    /**
    * @notice Sets the new rate
    * @param _rate The rate in (Gwei)
    */
    function setRate(uint256 _rate) public onlyOwner {
        require(_rate > 0, "FairLaunch: Cannot be 0");
        rate = _rate;

        emit Rate(rate);
    }
    
    /**
    * @notice Sets the available tokens
    * @param _availableTokensICO the available tokens in gwei
    */
    function setAvailableTokensICO(uint256 _availableTokensICO) public onlyOwner {
        availableTokensICO = _availableTokensICO;

        emit AvailableTokensICO(_availableTokensICO);
    }
    
    /**
    * @notice Sets the new receiver of the funds
    * @param _treasury The address that will receive the presale funds
    */
    function setTreasury(address payable _treasury) public onlyOwner {
        require(_treasury != address(0), "FairLaunch: Invalid address");
        treasury = _treasury;
        
        emit Treasury(treasury);
    }
    
    /**
    * @notice Sets the new min purchase 
    * @param _minPurchase The new min purchase in (Gwei)
    */
    function setMinPurchase(uint256 _minPurchase) public onlyOwner {
        minPurchase = _minPurchase;

        emit MinPurchase(_minPurchase);
    }

    /**
    * @notice Sets the new max purchase 
    * @param _maxPurchase The new max purchase in (Gwei)
    */
    function setMaxPurchase(uint256 _maxPurchase) public onlyOwner {
        maxPurchase = _maxPurchase;

        emit MaxPurchase(_maxPurchase);
    }

    /**
    * @notice Sets the activity of buy / withdraw 
    * @param _buyActive Enable or disable the buy activity
    * @param _withdrawActive Enable or disable the withdraw activty
    */
    function setSales(bool _buyActive, bool _withdrawActive) public onlyOwner {
        buyActive = _buyActive;
        withdrawActive = _withdrawActive;

        emit Sales(_buyActive, _withdrawActive);
    }

    /* ======== GETTERS ======== */

    /**
    * @notice Returns the token amount based on the rewardTokenCount and the rate
    * @param _weiAmount The amount of tokens in wei
    */
    function getTokenAmount(uint256 _weiAmount) public view returns (uint256) {
        return (_weiAmount * rate) / 1E18;
    }

    /**
    * @notice Returns the amount of tokens in the contract
    */
    function getTokensInContract() public view returns (uint256) {
        return IERC20(token).balanceOf(address(this));
    }

    /**
    * @notice Returns the amount the user can withdraw after the ICO has ended
    * @param _beneficiary The wallet address for distributed amount
    */
    function withdrawalAmount(address _beneficiary) public view returns (uint256 amount) {
        return investor[_beneficiary].amountToReceive;
    }

    /* ======== CALLABLE FUNCTIONS ======== */

    /**
    * @notice deposit the tokens which will be claimed
    */
    function depositTokens(uint256 amount) external onlyOwner {
        IERC20(token).transferFrom(_msgSender(), address(this), amount);
    }

    /**
    * @notice If the ICO is not active anymore, the owner can withdraw the leftovers
    */
    function withdrawLeftoversToken() external icoNotActive onlyOwner {
        require(IERC20(token).balanceOf(address(this)) > 0, 'FairLaunch: There are no tokens to withdraw');
        IERC20(token).safeTransfer(_msgSender(), IERC20(token).balanceOf(address(this)));

        emit WithdrawLeftovers(_msgSender(), IERC20(token).balanceOf(address(this)));
    }

    /**
    * @notice Users can withdraw only when the ICO is ended and the amount is not equal to 0
    */
    function withdrawTokens() external nonReentrant icoNotActive withdrawIsActive {
        require(token != address(0), "FairLaunch: Token is the zero address");
        require(withdrawalAmount(_msgSender()) != 0, "FairLaunch: Haven't bought any tokens");
        require(withdrawalAmount(_msgSender()) <= getTokensInContract(), "FairLaunch: Not enough tokens in contract to withdraw from");

        uint256 amountToWithdraw = withdrawalAmount(_msgSender());
        investor[_msgSender()].amountToReceive = 0;

        IERC20(token).safeTransfer(_msgSender(), amountToWithdraw);

        emit WithdrawRewards(_msgSender(), amountToWithdraw);
    }

    /**
    * @notice Buy tokens
    */
    function buyTokens(bytes memory _signature) external nonReentrant icoActive buyIsActive payable {
        require(availableTokensICO != 0, "FairLaunch: No available tokens left");
        if(whitelistActive) {
            bytes32 digest = keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, keccak256(abi.encode(PRESALE_TYPEHASH, _msgSender()))));
            address recoveredAddress = digest.recover(_signature);
            require(recoveredAddress != address(0) && recoveredAddress == address(whitelistSigner), "Invalid signature");
        }

        uint256 ethPurchaseInWei = msg.value;
        uint256 tokensPurchase = getTokenAmount(ethPurchaseInWei);
        require(ethPurchaseInWei >= minPurchase, 'FairLaunch: Have to send at least minPurchase');
        require(tokensPurchase != 0, "FairLaunch: Value is 0");
        require(tokensPurchase <= availableTokensICO, "FairLaunch: No tokens left for purchase");
        require((investor[_msgSender()].ethSpend + ethPurchaseInWei) <= maxPurchase, 'FairLaunch: Max purchase has been reached');

        // Amount of ETH that has been raised
        ethRaised += ethPurchaseInWei;

        // Add person to distributed map and tokens bought
        investor[_msgSender()].wallet = _msgSender();
        investor[_msgSender()].amountToReceive += tokensPurchase;
        investor[_msgSender()].ethSpend += ethPurchaseInWei;
    
        availableTokensICO = availableTokensICO - tokensPurchase;
        boughtTokensICO += tokensPurchase;

        treasury.transfer(ethPurchaseInWei);

        emit TokensPurchased(_msgSender(), treasury, tokensPurchase);
    }
}

File 2 of 8 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make 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 3 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 5 of 8 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

        (bool success, bytes memory returndata) = target.delegatecall(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);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address payable","name":"_treasury","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_availableTokensICO","type":"uint256"},{"internalType":"uint256","name":"_endICO","type":"uint256"},{"internalType":"uint256","name":"_minPurchase","type":"uint256"},{"internalType":"uint256","name":"_maxPurchase","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"AvailableTokensICO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"MaxPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"MinPurchase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Rate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_buyActive","type":"bool"},{"indexed":false,"internalType":"bool","name":"_withdrawActive","type":"bool"}],"name":"Sales","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_block","type":"uint256"}],"name":"SetICO","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"TokenAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_beneficiary","type":"address"},{"indexed":true,"internalType":"address","name":"_treasury","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"TokensPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable","name":"_amount","type":"address"}],"name":"Treasury","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_whitelistActive","type":"bool"}],"name":"WhitelistActive","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_whitelistSigner","type":"address"}],"name":"WhitelistSigner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_receipent","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"WithdrawLeftovers","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_receipent","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"WithdrawRewards","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRESALE_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableTokensICO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boughtTokensICO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endICO","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ethRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_weiAmount","type":"uint256"}],"name":"getTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensInContract","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"investor","outputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"amountToReceive","type":"uint256"},{"internalType":"uint256","name":"ethSpend","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_availableTokensICO","type":"uint256"}],"name":"setAvailableTokensICO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ICO","type":"uint256"}],"name":"setICO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPurchase","type":"uint256"}],"name":"setMaxPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_minPurchase","type":"uint256"}],"name":"setMinPurchase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_buyActive","type":"bool"},{"internalType":"bool","name":"_withdrawActive","type":"bool"}],"name":"setSales","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_treasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelistActive","type":"bool"}],"name":"setWhitelistActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_whitelistSigner","type":"address"}],"name":"setWhitelistSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawLeftoversToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"withdrawalAmount","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"view","type":"function"}]

6080604052600c805462ffffff1916620101011790553480156200002257600080fd5b50604051620028e2380380620028e2833981016040819052620000459162000641565b6001600055620000553362000182565b604080518082018252600a81526908cc2d2e498c2eadcc6d60b31b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f3a8884384e70e4ab428b3081f6a3a97ca1fd3d432421549869593a1722afecd9818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015246608082018190523060a0808401919091528451808403909101815260c09092019093528051910120600d556200013386620001d4565b6200013e84620002b1565b620001498262000332565b6200015483620003b3565b6200015f8562000434565b6200016a33620004b5565b62000175876200054f565b50505050505050620006a2565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b03163314620002235760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064015b60405180910390fd5b60008111620002755760405162461bcd60e51b815260206004820152601760248201527f466169724c61756e63683a2043616e6e6f74206265203000000000000000000060448201526064016200021a565b60058190556040518181527f3e7f4cf5fff23ca5c3b06a93850397f53c61b3f180714cf98f14e0b000a94ab9906020015b60405180910390a150565b6001546001600160a01b03163314620002fc5760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b60078190556040518181527f1d38bb88b61bdb0f26697edd3f564ab49e387335fefa8c90cca1480e44a10b8d90602001620002a6565b6001546001600160a01b031633146200037d5760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b60098190556040518181527fd0a2888ea922cf4afd8994970a741063689461b2357dfc632b2c75d11a8993bb90602001620002a6565b6001546001600160a01b03163314620003fe5760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b60088190556040518181527f904f10220ffaa2cec993d849a0eaf251a7df5faf2e9dac97638a530f05e60bda90602001620002a6565b6001546001600160a01b031633146200047f5760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b600a8190556040518181527f33823769c0f6a380b711495f8c8a42dad3b6737df540f2feb817a90e624d485990602001620002a6565b6001546001600160a01b03163314620005005760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fc81cda530347e6788009652fdfad623577aef05e38cfe99b51fc4492ea32253390602001620002a6565b6001546001600160a01b031633146200059a5760405162461bcd60e51b81526020600482018190526024820152600080516020620028c283398151915260448201526064016200021a565b6001600160a01b038116620005f25760405162461bcd60e51b815260206004820152601b60248201527f466169724c61756e63683a20496e76616c69642061646472657373000000000060448201526064016200021a565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527ffb26c00f7d7dba814173c8a2db3466cb26ee25fdcec8867af7da3aa1f296addd90602001620002a6565b60008060008060008060c087890312156200065b57600080fd5b86516001600160a01b03811681146200067357600080fd5b6020880151604089015160608a015160808b015160a0909b0151939c929b509099909850965090945092505050565b61221080620006b26000396000f3fe60806040526004361061020f5760003560e01c80639f74854011610118578063daa91f2e116100a0578063f0f442601161006f578063f0f442601461062e578063f2fde38b1461064e578063fc0a74421461066e578063fc0c546a14610681578063fddf0fc0146106a157600080fd5b8063daa91f2e14610595578063dd49756e146105ce578063e8307d00146105ee578063ef81b4d41461060e57600080fd5b8063b79a42eb116100e7578063b79a42eb146104e2578063c2507ac114610501578063c3b754dc14610521578063d338143814610541578063d4ae75221461056157600080fd5b80639f7485401461047c578063a11a1add14610492578063a41a028b146104ac578063b4e71994146104c257600080fd5b806361d027b31161019b578063715018a61161016a578063715018a6146103fe5780637a07b5ef146104135780638d8f2adb146104335780638da5cb5b14610448578063977b055b1461046657600080fd5b806361d027b31461037157806364ff9056146103a95780636b5b0c08146103be57806371189742146103de57600080fd5b806333b5b62e116101e257806333b5b62e146102fa57806334fcf437146103105780633644e515146103305780633c2f1806146103465780634f2484091461035b57600080fd5b806302ce581314610214578063144fa6d7146102495780631b1cd4ff1461026b5780632c4e722e146102d6575b600080fd5b34801561022057600080fd5b50600c546102349062010000900460ff1681565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611ecb565b6106b7565b005b34801561027757600080fd5b506102b1610286366004611ecb565b600e602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b604080516001600160a01b039094168452602084019290925290820152606001610240565b3480156102e257600080fd5b506102ec60055481565b604051908152602001610240565b34801561030657600080fd5b506102ec60085481565b34801561031c57600080fd5b5061026961032b366004611ee8565b610765565b34801561033c57600080fd5b506102ec600d5481565b34801561035257600080fd5b506102ec610814565b34801561036757600080fd5b506102ec60075481565b34801561037d57600080fd5b50600454610391906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b3480156103b557600080fd5b50610269610886565b3480156103ca57600080fd5b506102696103d9366004611ee8565b610af4565b3480156103ea57600080fd5b506102696103f9366004611ee8565b610b53565b34801561040a57600080fd5b50610269610bb2565b34801561041f57600080fd5b5061026961042e366004611f0f565b610be8565b34801561043f57600080fd5b50610269610c75565b34801561045457600080fd5b506001546001600160a01b0316610391565b34801561047257600080fd5b506102ec60095481565b34801561048857600080fd5b506102ec600b5481565b34801561049e57600080fd5b50600c546102349060ff1681565b3480156104b857600080fd5b506102ec600a5481565b3480156104ce57600080fd5b506102696104dd366004611ee8565b610efa565b3480156104ee57600080fd5b50600c5461023490610100900460ff1681565b34801561050d57600080fd5b506102ec61051c366004611ee8565b610f59565b34801561052d57600080fd5b5061026961053c366004611f48565b610f82565b34801561054d57600080fd5b5061026961055c366004611ecb565b610ff7565b34801561056d57600080fd5b506102ec7f1dcb3357833a4edddbafe596d6fbedb3eb1a60c0e74e97ff01d0fe1eb7bfa36f81565b3480156105a157600080fd5b506102ec6105b0366004611ecb565b6001600160a01b03166000908152600e602052604090206001015490565b3480156105da57600080fd5b506102696105e9366004611ee8565b61106f565b3480156105fa57600080fd5b50610269610609366004611ee8565b611126565b34801561061a57600080fd5b50600354610391906001600160a01b031681565b34801561063a57600080fd5b50610269610649366004611ecb565b611185565b34801561065a57600080fd5b50610269610669366004611ecb565b611253565b61026961067c366004611f7b565b6112ee565b34801561068d57600080fd5b50600254610391906001600160a01b031681565b3480156106ad57600080fd5b506102ec60065481565b6001546001600160a01b031633146106ea5760405162461bcd60e51b81526004016106e19061202c565b60405180910390fd5b6001600160a01b0381166107105760405162461bcd60e51b81526004016106e190612061565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f9687492a9531bc3914d553389cdcbe0e12eec84d28f59a91175ad3f563fb11be906020015b60405180910390a150565b6001546001600160a01b0316331461078f5760405162461bcd60e51b81526004016106e19061202c565b600081116107df5760405162461bcd60e51b815260206004820152601760248201527f466169724c61756e63683a2043616e6e6f74206265203000000000000000000060448201526064016106e1565b60058190556040518181527f3e7f4cf5fff23ca5c3b06a93850397f53c61b3f180714cf98f14e0b000a94ab99060200161075a565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088191906120a6565b905090565b43600754106108c75760405162461bcd60e51b815260206004820152600d60248201526c49434f2069732061637469766560981b60448201526064016106e1565b6001546001600160a01b031633146108f15760405162461bcd60e51b81526004016106e19061202c565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e91906120a6565b116109bf5760405162461bcd60e51b815260206004820152602b60248201527f466169724c61756e63683a20546865726520617265206e6f20746f6b656e732060448201526a746f20776974686472617760a81b60648201526084016106e1565b610a42336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f91906120a6565b6002546001600160a01b0316919061185d565b7fd7d27c63d00e8d36bb53f5cb11acb2b767c2c01b62012cbdccddb3205f6e66bc336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad091906120a6565b604080516001600160a01b03909316835260208301919091520160405180910390a1565b6001546001600160a01b03163314610b1e5760405162461bcd60e51b81526004016106e19061202c565b600a8190556040518181527f33823769c0f6a380b711495f8c8a42dad3b6737df540f2feb817a90e624d48599060200161075a565b6001546001600160a01b03163314610b7d5760405162461bcd60e51b81526004016106e19061202c565b60098190556040518181527fd0a2888ea922cf4afd8994970a741063689461b2357dfc632b2c75d11a8993bb9060200161075a565b6001546001600160a01b03163314610bdc5760405162461bcd60e51b81526004016106e19061202c565b610be660006118b4565b565b6001546001600160a01b03163314610c125760405162461bcd60e51b81526004016106e19061202c565b600c8054821515610100810261ff001986151590811661ffff1990941693909317179092556040805191825260208201929092527f70117f661a289d59037b100451f9199ea90373d377db3be8ab2848ed4ba70646910160405180910390a15050565b600260005403610cc75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e1565b60026000556007544311610d0d5760405162461bcd60e51b815260206004820152600d60248201526c49434f2069732061637469766560981b60448201526064016106e1565b600c54610100900460ff16610d645760405162461bcd60e51b815260206004820152601b60248201527f5769746864726177696e6720686173206265656e20706175736564000000000060448201526064016106e1565b6002546001600160a01b0316610d8c5760405162461bcd60e51b81526004016106e190612061565b610d95336105b0565b600003610df25760405162461bcd60e51b815260206004820152602560248201527f466169724c61756e63683a20486176656e277420626f7567687420616e7920746044820152646f6b656e7360d81b60648201526084016106e1565b610dfa610814565b610e03336105b0565b1115610e775760405162461bcd60e51b815260206004820152603a60248201527f466169724c61756e63683a204e6f7420656e6f75676820746f6b656e7320696e60448201527f20636f6e747261637420746f2077697468647261772066726f6d00000000000060648201526084016106e1565b6000610e82336105b0565b336000818152600e6020526040812060010155600254919250610eaf916001600160a01b0316908361185d565b7faa1377f7ec93c239e959efa811f7b8554c036fd7a706c23e58024626a8f3db9633604080516001600160a01b039092168252602082018490520160405180910390a1506001600055565b6001546001600160a01b03163314610f245760405162461bcd60e51b81526004016106e19061202c565b60078190556040518181527f1d38bb88b61bdb0f26697edd3f564ab49e387335fefa8c90cca1480e44a10b8d9060200161075a565b6000670de0b6b3a764000060055483610f7291906120d5565b610f7c91906120ec565b92915050565b6001546001600160a01b03163314610fac5760405162461bcd60e51b81526004016106e19061202c565b600c8054821515620100000262ff0000199091161790556040517f6b5206c2e71025c60cb0f0442786c5cb91a18e66727fb072cb52265c4a28e45e9061075a90831515815260200190565b6001546001600160a01b031633146110215760405162461bcd60e51b81526004016106e19061202c565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fc81cda530347e6788009652fdfad623577aef05e38cfe99b51fc4492ea3225339060200161075a565b6001546001600160a01b031633146110995760405162461bcd60e51b81526004016106e19061202c565b6002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018490526064016020604051808303816000875af11580156110fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611122919061210e565b5050565b6001546001600160a01b031633146111505760405162461bcd60e51b81526004016106e19061202c565b60088190556040518181527f904f10220ffaa2cec993d849a0eaf251a7df5faf2e9dac97638a530f05e60bda9060200161075a565b6001546001600160a01b031633146111af5760405162461bcd60e51b81526004016106e19061202c565b6001600160a01b0381166112055760405162461bcd60e51b815260206004820152601b60248201527f466169724c61756e63683a20496e76616c69642061646472657373000000000060448201526064016106e1565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527ffb26c00f7d7dba814173c8a2db3466cb26ee25fdcec8867af7da3aa1f296addd9060200161075a565b6001546001600160a01b0316331461127d5760405162461bcd60e51b81526004016106e19061202c565b6001600160a01b0381166112e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e1565b6112eb816118b4565b50565b6002600054036113405760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e1565b600260005560075415801590611357575060075443105b801561136557506000600a54115b6113a65760405162461bcd60e51b815260206004820152601260248201527149434f206d7573742062652061637469766560701b60448201526064016106e1565b600c5460ff166113f85760405162461bcd60e51b815260206004820152601a60248201527f50757263686173696e6720686173206265656e2070617573656400000000000060448201526064016106e1565b600a546000036114565760405162461bcd60e51b8152602060048201526024808201527f466169724c61756e63683a204e6f20617661696c61626c6520746f6b656e73206044820152631b19599d60e21b60648201526084016106e1565b600c5462010000900460ff1615611584576000600d547f1dcb3357833a4edddbafe596d6fbedb3eb1a60c0e74e97ff01d0fe1eb7bfa36f6114943390565b6040516020016114b79291909182526001600160a01b0316602082015260400190565b604051602081830303815290604052805190602001206040516020016114f492919061190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815291905280516020909101209050600061151a8284611906565b90506001600160a01b0381161580159061154157506003546001600160a01b038281169116145b6115815760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016106e1565b50505b34600061159082610f59565b90506008548210156115fa5760405162461bcd60e51b815260206004820152602d60248201527f466169724c61756e63683a204861766520746f2073656e64206174206c65617360448201526c74206d696e507572636861736560981b60648201526084016106e1565b806000036116435760405162461bcd60e51b81526020600482015260166024820152750466169724c61756e63683a2056616c756520697320360541b60448201526064016106e1565b600a548111156116a55760405162461bcd60e51b815260206004820152602760248201527f466169724c61756e63683a204e6f20746f6b656e73206c65667420666f7220706044820152667572636861736560c81b60648201526084016106e1565b600954336000908152600e60205260409020600201546116c690849061212b565b11156117265760405162461bcd60e51b815260206004820152602960248201527f466169724c61756e63683a204d617820707572636861736520686173206265656044820152681b881c995858da195960ba1b60648201526084016106e1565b8160066000828254611738919061212b565b9091555050336000818152600e6020526040812080546001600160a01b03191690921782556001909101805483929061177290849061212b565b9091555050336000908152600e60205260408120600201805484929061179990849061212b565b9091555050600a546117ac90829061213e565b600a8190555080600b60008282546117c4919061212b565b90915550506004546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611803573d6000803e3d6000fd5b506004546001600160a01b0316336001600160a01b03167ff9b4eb3e43eebbf559e9b96ceff1c786a7edab2938c7f5f80678197c2e0edba58360405161184b91815260200190565b60405180910390a35050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526118af90849061192a565b505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600061191585856119fc565b9150915061192281611a6a565b509392505050565b600061197f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611c209092919063ffffffff16565b8051909150156118af578080602001905181019061199d919061210e565b6118af5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106e1565b6000808251604103611a325760208301516040840151606085015160001a611a2687828585611c39565b94509450505050611a63565b8251604003611a5b5760208301516040840151611a50868383611d26565b935093505050611a63565b506000905060025b9250929050565b6000816004811115611a7e57611a7e612151565b03611a865750565b6001816004811115611a9a57611a9a612151565b03611ae75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106e1565b6002816004811115611afb57611afb612151565b03611b485760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106e1565b6003816004811115611b5c57611b5c612151565b03611bb45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106e1565b6004816004811115611bc857611bc8612151565b036112eb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106e1565b6060611c2f8484600085611d55565b90505b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611c705750600090506003611d1d565b8460ff16601b14158015611c8857508460ff16601c14155b15611c995750600090506004611d1d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611ced573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d1657600060019250925050611d1d565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01611d4787828885611c39565b935093505050935093915050565b606082471015611db65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106e1565b843b611e045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106e1565b600080866001600160a01b03168587604051611e20919061218b565b60006040518083038185875af1925050503d8060008114611e5d576040519150601f19603f3d011682016040523d82523d6000602084013e611e62565b606091505b5091509150611e72828286611e7d565b979650505050505050565b60608315611e8c575081611c32565b825115611e9c5782518084602001fd5b8160405162461bcd60e51b81526004016106e191906121a7565b6001600160a01b03811681146112eb57600080fd5b600060208284031215611edd57600080fd5b8135611c3281611eb6565b600060208284031215611efa57600080fd5b5035919050565b80151581146112eb57600080fd5b60008060408385031215611f2257600080fd5b8235611f2d81611f01565b91506020830135611f3d81611f01565b809150509250929050565b600060208284031215611f5a57600080fd5b8135611c3281611f01565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611f8d57600080fd5b813567ffffffffffffffff80821115611fa557600080fd5b818401915084601f830112611fb957600080fd5b813581811115611fcb57611fcb611f65565b604051601f8201601f19908116603f01168101908382118183101715611ff357611ff3611f65565b8160405282815287602084870101111561200c57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f466169724c61756e63683a20546f6b656e20697320746865207a65726f206164604082015264647265737360d81b606082015260800190565b6000602082840312156120b857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610f7c57610f7c6120bf565b60008261210957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561212057600080fd5b8151611c3281611f01565b80820180821115610f7c57610f7c6120bf565b81810381811115610f7c57610f7c6120bf565b634e487b7160e01b600052602160045260246000fd5b60005b8381101561218257818101518382015260200161216a565b50506000910152565b6000825161219d818460208701612167565b9190910192915050565b60208152600082518060208401526121c6816040850160208701612167565b601f01601f1916919091016040019291505056fea2646970667358221220e30a27658878d4773968a82c99a7ccce8ff87a2a9c45c526cb446b34cda4403d64736f6c634300081200334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572000000000000000000000000f915785502c7cd1716c20c79dadad1f01d3bc94d00000000000000000000000000000000000000006518e99e9474881fd1fe0000000000000000000000000000000000000000001bcbb129cfd7e2d0e53fe000000000000000000000000000000000000000000000000000000000000005f5e0ff000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000004c9afac0f828000

Deployed Bytecode

0x60806040526004361061020f5760003560e01c80639f74854011610118578063daa91f2e116100a0578063f0f442601161006f578063f0f442601461062e578063f2fde38b1461064e578063fc0a74421461066e578063fc0c546a14610681578063fddf0fc0146106a157600080fd5b8063daa91f2e14610595578063dd49756e146105ce578063e8307d00146105ee578063ef81b4d41461060e57600080fd5b8063b79a42eb116100e7578063b79a42eb146104e2578063c2507ac114610501578063c3b754dc14610521578063d338143814610541578063d4ae75221461056157600080fd5b80639f7485401461047c578063a11a1add14610492578063a41a028b146104ac578063b4e71994146104c257600080fd5b806361d027b31161019b578063715018a61161016a578063715018a6146103fe5780637a07b5ef146104135780638d8f2adb146104335780638da5cb5b14610448578063977b055b1461046657600080fd5b806361d027b31461037157806364ff9056146103a95780636b5b0c08146103be57806371189742146103de57600080fd5b806333b5b62e116101e257806333b5b62e146102fa57806334fcf437146103105780633644e515146103305780633c2f1806146103465780634f2484091461035b57600080fd5b806302ce581314610214578063144fa6d7146102495780631b1cd4ff1461026b5780632c4e722e146102d6575b600080fd5b34801561022057600080fd5b50600c546102349062010000900460ff1681565b60405190151581526020015b60405180910390f35b34801561025557600080fd5b50610269610264366004611ecb565b6106b7565b005b34801561027757600080fd5b506102b1610286366004611ecb565b600e602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b604080516001600160a01b039094168452602084019290925290820152606001610240565b3480156102e257600080fd5b506102ec60055481565b604051908152602001610240565b34801561030657600080fd5b506102ec60085481565b34801561031c57600080fd5b5061026961032b366004611ee8565b610765565b34801561033c57600080fd5b506102ec600d5481565b34801561035257600080fd5b506102ec610814565b34801561036757600080fd5b506102ec60075481565b34801561037d57600080fd5b50600454610391906001600160a01b031681565b6040516001600160a01b039091168152602001610240565b3480156103b557600080fd5b50610269610886565b3480156103ca57600080fd5b506102696103d9366004611ee8565b610af4565b3480156103ea57600080fd5b506102696103f9366004611ee8565b610b53565b34801561040a57600080fd5b50610269610bb2565b34801561041f57600080fd5b5061026961042e366004611f0f565b610be8565b34801561043f57600080fd5b50610269610c75565b34801561045457600080fd5b506001546001600160a01b0316610391565b34801561047257600080fd5b506102ec60095481565b34801561048857600080fd5b506102ec600b5481565b34801561049e57600080fd5b50600c546102349060ff1681565b3480156104b857600080fd5b506102ec600a5481565b3480156104ce57600080fd5b506102696104dd366004611ee8565b610efa565b3480156104ee57600080fd5b50600c5461023490610100900460ff1681565b34801561050d57600080fd5b506102ec61051c366004611ee8565b610f59565b34801561052d57600080fd5b5061026961053c366004611f48565b610f82565b34801561054d57600080fd5b5061026961055c366004611ecb565b610ff7565b34801561056d57600080fd5b506102ec7f1dcb3357833a4edddbafe596d6fbedb3eb1a60c0e74e97ff01d0fe1eb7bfa36f81565b3480156105a157600080fd5b506102ec6105b0366004611ecb565b6001600160a01b03166000908152600e602052604090206001015490565b3480156105da57600080fd5b506102696105e9366004611ee8565b61106f565b3480156105fa57600080fd5b50610269610609366004611ee8565b611126565b34801561061a57600080fd5b50600354610391906001600160a01b031681565b34801561063a57600080fd5b50610269610649366004611ecb565b611185565b34801561065a57600080fd5b50610269610669366004611ecb565b611253565b61026961067c366004611f7b565b6112ee565b34801561068d57600080fd5b50600254610391906001600160a01b031681565b3480156106ad57600080fd5b506102ec60065481565b6001546001600160a01b031633146106ea5760405162461bcd60e51b81526004016106e19061202c565b60405180910390fd5b6001600160a01b0381166107105760405162461bcd60e51b81526004016106e190612061565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f9687492a9531bc3914d553389cdcbe0e12eec84d28f59a91175ad3f563fb11be906020015b60405180910390a150565b6001546001600160a01b0316331461078f5760405162461bcd60e51b81526004016106e19061202c565b600081116107df5760405162461bcd60e51b815260206004820152601760248201527f466169724c61756e63683a2043616e6e6f74206265203000000000000000000060448201526064016106e1565b60058190556040518181527f3e7f4cf5fff23ca5c3b06a93850397f53c61b3f180714cf98f14e0b000a94ab99060200161075a565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561085d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088191906120a6565b905090565b43600754106108c75760405162461bcd60e51b815260206004820152600d60248201526c49434f2069732061637469766560981b60448201526064016106e1565b6001546001600160a01b031633146108f15760405162461bcd60e51b81526004016106e19061202c565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561093a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095e91906120a6565b116109bf5760405162461bcd60e51b815260206004820152602b60248201527f466169724c61756e63683a20546865726520617265206e6f20746f6b656e732060448201526a746f20776974686472617760a81b60648201526084016106e1565b610a42336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f91906120a6565b6002546001600160a01b0316919061185d565b7fd7d27c63d00e8d36bb53f5cb11acb2b767c2c01b62012cbdccddb3205f6e66bc336002546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015610aac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad091906120a6565b604080516001600160a01b03909316835260208301919091520160405180910390a1565b6001546001600160a01b03163314610b1e5760405162461bcd60e51b81526004016106e19061202c565b600a8190556040518181527f33823769c0f6a380b711495f8c8a42dad3b6737df540f2feb817a90e624d48599060200161075a565b6001546001600160a01b03163314610b7d5760405162461bcd60e51b81526004016106e19061202c565b60098190556040518181527fd0a2888ea922cf4afd8994970a741063689461b2357dfc632b2c75d11a8993bb9060200161075a565b6001546001600160a01b03163314610bdc5760405162461bcd60e51b81526004016106e19061202c565b610be660006118b4565b565b6001546001600160a01b03163314610c125760405162461bcd60e51b81526004016106e19061202c565b600c8054821515610100810261ff001986151590811661ffff1990941693909317179092556040805191825260208201929092527f70117f661a289d59037b100451f9199ea90373d377db3be8ab2848ed4ba70646910160405180910390a15050565b600260005403610cc75760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e1565b60026000556007544311610d0d5760405162461bcd60e51b815260206004820152600d60248201526c49434f2069732061637469766560981b60448201526064016106e1565b600c54610100900460ff16610d645760405162461bcd60e51b815260206004820152601b60248201527f5769746864726177696e6720686173206265656e20706175736564000000000060448201526064016106e1565b6002546001600160a01b0316610d8c5760405162461bcd60e51b81526004016106e190612061565b610d95336105b0565b600003610df25760405162461bcd60e51b815260206004820152602560248201527f466169724c61756e63683a20486176656e277420626f7567687420616e7920746044820152646f6b656e7360d81b60648201526084016106e1565b610dfa610814565b610e03336105b0565b1115610e775760405162461bcd60e51b815260206004820152603a60248201527f466169724c61756e63683a204e6f7420656e6f75676820746f6b656e7320696e60448201527f20636f6e747261637420746f2077697468647261772066726f6d00000000000060648201526084016106e1565b6000610e82336105b0565b336000818152600e6020526040812060010155600254919250610eaf916001600160a01b0316908361185d565b7faa1377f7ec93c239e959efa811f7b8554c036fd7a706c23e58024626a8f3db9633604080516001600160a01b039092168252602082018490520160405180910390a1506001600055565b6001546001600160a01b03163314610f245760405162461bcd60e51b81526004016106e19061202c565b60078190556040518181527f1d38bb88b61bdb0f26697edd3f564ab49e387335fefa8c90cca1480e44a10b8d9060200161075a565b6000670de0b6b3a764000060055483610f7291906120d5565b610f7c91906120ec565b92915050565b6001546001600160a01b03163314610fac5760405162461bcd60e51b81526004016106e19061202c565b600c8054821515620100000262ff0000199091161790556040517f6b5206c2e71025c60cb0f0442786c5cb91a18e66727fb072cb52265c4a28e45e9061075a90831515815260200190565b6001546001600160a01b031633146110215760405162461bcd60e51b81526004016106e19061202c565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fc81cda530347e6788009652fdfad623577aef05e38cfe99b51fc4492ea3225339060200161075a565b6001546001600160a01b031633146110995760405162461bcd60e51b81526004016106e19061202c565b6002546001600160a01b03166323b872dd336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018490526064016020604051808303816000875af11580156110fe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611122919061210e565b5050565b6001546001600160a01b031633146111505760405162461bcd60e51b81526004016106e19061202c565b60088190556040518181527f904f10220ffaa2cec993d849a0eaf251a7df5faf2e9dac97638a530f05e60bda9060200161075a565b6001546001600160a01b031633146111af5760405162461bcd60e51b81526004016106e19061202c565b6001600160a01b0381166112055760405162461bcd60e51b815260206004820152601b60248201527f466169724c61756e63683a20496e76616c69642061646472657373000000000060448201526064016106e1565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527ffb26c00f7d7dba814173c8a2db3466cb26ee25fdcec8867af7da3aa1f296addd9060200161075a565b6001546001600160a01b0316331461127d5760405162461bcd60e51b81526004016106e19061202c565b6001600160a01b0381166112e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e1565b6112eb816118b4565b50565b6002600054036113405760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016106e1565b600260005560075415801590611357575060075443105b801561136557506000600a54115b6113a65760405162461bcd60e51b815260206004820152601260248201527149434f206d7573742062652061637469766560701b60448201526064016106e1565b600c5460ff166113f85760405162461bcd60e51b815260206004820152601a60248201527f50757263686173696e6720686173206265656e2070617573656400000000000060448201526064016106e1565b600a546000036114565760405162461bcd60e51b8152602060048201526024808201527f466169724c61756e63683a204e6f20617661696c61626c6520746f6b656e73206044820152631b19599d60e21b60648201526084016106e1565b600c5462010000900460ff1615611584576000600d547f1dcb3357833a4edddbafe596d6fbedb3eb1a60c0e74e97ff01d0fe1eb7bfa36f6114943390565b6040516020016114b79291909182526001600160a01b0316602082015260400190565b604051602081830303815290604052805190602001206040516020016114f492919061190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815291905280516020909101209050600061151a8284611906565b90506001600160a01b0381161580159061154157506003546001600160a01b038281169116145b6115815760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b60448201526064016106e1565b50505b34600061159082610f59565b90506008548210156115fa5760405162461bcd60e51b815260206004820152602d60248201527f466169724c61756e63683a204861766520746f2073656e64206174206c65617360448201526c74206d696e507572636861736560981b60648201526084016106e1565b806000036116435760405162461bcd60e51b81526020600482015260166024820152750466169724c61756e63683a2056616c756520697320360541b60448201526064016106e1565b600a548111156116a55760405162461bcd60e51b815260206004820152602760248201527f466169724c61756e63683a204e6f20746f6b656e73206c65667420666f7220706044820152667572636861736560c81b60648201526084016106e1565b600954336000908152600e60205260409020600201546116c690849061212b565b11156117265760405162461bcd60e51b815260206004820152602960248201527f466169724c61756e63683a204d617820707572636861736520686173206265656044820152681b881c995858da195960ba1b60648201526084016106e1565b8160066000828254611738919061212b565b9091555050336000818152600e6020526040812080546001600160a01b03191690921782556001909101805483929061177290849061212b565b9091555050336000908152600e60205260408120600201805484929061179990849061212b565b9091555050600a546117ac90829061213e565b600a8190555080600b60008282546117c4919061212b565b90915550506004546040516001600160a01b039091169083156108fc029084906000818181858888f19350505050158015611803573d6000803e3d6000fd5b506004546001600160a01b0316336001600160a01b03167ff9b4eb3e43eebbf559e9b96ceff1c786a7edab2938c7f5f80678197c2e0edba58360405161184b91815260200190565b60405180910390a35050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526118af90849061192a565b505050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600080600061191585856119fc565b9150915061192281611a6a565b509392505050565b600061197f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611c209092919063ffffffff16565b8051909150156118af578080602001905181019061199d919061210e565b6118af5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106e1565b6000808251604103611a325760208301516040840151606085015160001a611a2687828585611c39565b94509450505050611a63565b8251604003611a5b5760208301516040840151611a50868383611d26565b935093505050611a63565b506000905060025b9250929050565b6000816004811115611a7e57611a7e612151565b03611a865750565b6001816004811115611a9a57611a9a612151565b03611ae75760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016106e1565b6002816004811115611afb57611afb612151565b03611b485760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016106e1565b6003816004811115611b5c57611b5c612151565b03611bb45760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016106e1565b6004816004811115611bc857611bc8612151565b036112eb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016106e1565b6060611c2f8484600085611d55565b90505b9392505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611c705750600090506003611d1d565b8460ff16601b14158015611c8857508460ff16601c14155b15611c995750600090506004611d1d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611ced573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d1657600060019250925050611d1d565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01611d4787828885611c39565b935093505050935093915050565b606082471015611db65760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106e1565b843b611e045760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106e1565b600080866001600160a01b03168587604051611e20919061218b565b60006040518083038185875af1925050503d8060008114611e5d576040519150601f19603f3d011682016040523d82523d6000602084013e611e62565b606091505b5091509150611e72828286611e7d565b979650505050505050565b60608315611e8c575081611c32565b825115611e9c5782518084602001fd5b8160405162461bcd60e51b81526004016106e191906121a7565b6001600160a01b03811681146112eb57600080fd5b600060208284031215611edd57600080fd5b8135611c3281611eb6565b600060208284031215611efa57600080fd5b5035919050565b80151581146112eb57600080fd5b60008060408385031215611f2257600080fd5b8235611f2d81611f01565b91506020830135611f3d81611f01565b809150509250929050565b600060208284031215611f5a57600080fd5b8135611c3281611f01565b634e487b7160e01b600052604160045260246000fd5b600060208284031215611f8d57600080fd5b813567ffffffffffffffff80821115611fa557600080fd5b818401915084601f830112611fb957600080fd5b813581811115611fcb57611fcb611f65565b604051601f8201601f19908116603f01168101908382118183101715611ff357611ff3611f65565b8160405282815287602084870101111561200c57600080fd5b826020860160208301376000928101602001929092525095945050505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526025908201527f466169724c61756e63683a20546f6b656e20697320746865207a65726f206164604082015264647265737360d81b606082015260800190565b6000602082840312156120b857600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610f7c57610f7c6120bf565b60008261210957634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561212057600080fd5b8151611c3281611f01565b80820180821115610f7c57610f7c6120bf565b81810381811115610f7c57610f7c6120bf565b634e487b7160e01b600052602160045260246000fd5b60005b8381101561218257818101518382015260200161216a565b50506000910152565b6000825161219d818460208701612167565b9190910192915050565b60208152600082518060208401526121c6816040850160208701612167565b601f01601f1916919091016040019291505056fea2646970667358221220e30a27658878d4773968a82c99a7ccce8ff87a2a9c45c526cb446b34cda4403d64736f6c63430008120033

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

000000000000000000000000f915785502c7cd1716c20c79dadad1f01d3bc94d00000000000000000000000000000000000000006518e99e9474881fd1fe0000000000000000000000000000000000000000001bcbb129cfd7e2d0e53fe000000000000000000000000000000000000000000000000000000000000005f5e0ff000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000004c9afac0f828000

-----Decoded View---------------
Arg [0] : _treasury (address): 0xF915785502C7cd1716c20C79DaDAD1f01d3BC94d
Arg [1] : _rate (uint256): 31288103448300000000000000000
Arg [2] : _availableTokensICO (uint256): 2202200022200000000000000000000
Arg [3] : _endICO (uint256): 99999999
Arg [4] : _minPurchase (uint256): 100000000000000000
Arg [5] : _maxPurchase (uint256): 345000000000000000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000f915785502c7cd1716c20c79dadad1f01d3bc94d
Arg [1] : 00000000000000000000000000000000000000006518e99e9474881fd1fe0000
Arg [2] : 000000000000000000000000000000000000001bcbb129cfd7e2d0e53fe00000
Arg [3] : 0000000000000000000000000000000000000000000000000000000005f5e0ff
Arg [4] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [5] : 00000000000000000000000000000000000000000000000004c9afac0f828000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.