Contract 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a19

Contract Overview

Balance:
0 BNB

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
0xabe9ae75aa4bca933b3f0ff7556ead8eaea730211c908cd96505d8ae1f830b5683411162021-04-27 8:52:1958 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB0.00037844
0xaa39bebe95bd052de145c569e7dc1a21298d9cbcb56ac49ae584b728910ac82783410802021-04-27 8:50:3158 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB0.00037453
0xb0dd2e1b0a35a2a6963f0411663c3c44ef32bf5ac2b2aff2772b1813de3379a583410612021-04-27 8:49:3458 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB0.00082849
0x7eb5a0e68c88fae747b55343ae999cb87df1bf3385626e228d901cc9501b827783410512021-04-27 8:49:0458 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB0.00029604
0xa659c50a42afde5bce2b37633f27be9d0e2b83e698ecb214e980dbbdd3edc0cc83410132021-04-27 8:47:1058 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB0.00028138
0x55b9717bb355c36fe75966e36f985805575852958436e7dd5cc3b519f669316c83409732021-04-27 8:45:1058 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a191 BNB0.00080313
0x9b9d04e4a7bc8f7bda176c443d4c4e7ffa205ae82f31afaa34c7732dbb62277083409602021-04-27 8:44:3158 days 23 hrs ago0xba535ade958703ffb99b9325ca8db04a00937029 IN  0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190.01 BNB0.00155313
[ Download CSV Export 
Latest 8 internal transactions
Parent Txn Hash Block From To Value
0xabe9ae75aa4bca933b3f0ff7556ead8eaea730211c908cd96505d8ae1f830b5683411162021-04-27 8:52:1958 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a19 0x2ef6b034e14367ede5fd9d664fdb9cdf8b7dbd1f0 BNB
0xb0dd2e1b0a35a2a6963f0411663c3c44ef32bf5ac2b2aff2772b1813de3379a583410612021-04-27 8:49:3458 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a19 0x2ef6b034e14367ede5fd9d664fdb9cdf8b7dbd1f0 BNB
0x55b9717bb355c36fe75966e36f985805575852958436e7dd5cc3b519f669316c83409732021-04-27 8:45:1058 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190xba535ade958703ffb99b9325ca8db04a009370291 BNB
0x55b9717bb355c36fe75966e36f985805575852958436e7dd5cc3b519f669316c83409732021-04-27 8:45:1058 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a19 0x2ef6b034e14367ede5fd9d664fdb9cdf8b7dbd1f0 BNB
0x9b9d04e4a7bc8f7bda176c443d4c4e7ffa205ae82f31afaa34c7732dbb62277083409602021-04-27 8:44:3158 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190xba535ade958703ffb99b9325ca8db04a009370290.01 BNB
0x9b9d04e4a7bc8f7bda176c443d4c4e7ffa205ae82f31afaa34c7732dbb62277083409602021-04-27 8:44:3158 days 23 hrs ago 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a19 0x2ef6b034e14367ede5fd9d664fdb9cdf8b7dbd1f0 BNB
0x61f747627de165486d2310bd2923f607942572c5d7bc3885a82bf33fb7b9afd583408772021-04-27 8:40:2258 days 23 hrs ago 0xce03e5a7f832b57d26a8979ae78069598d46fcfa 0x2cdd3fb0b4a9f354a04fa7b44746ead9e67b2a190 BNB
0x61f747627de165486d2310bd2923f607942572c5d7bc3885a82bf33fb7b9afd583408772021-04-27 8:40:2258 days 23 hrs ago 0xce03e5a7f832b57d26a8979ae78069598d46fcfa  Contract Creation0 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PreSalePool

Compiler Version
v0.7.1+commit.f4a555be

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 9 : PreSalePool.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.1;

import "../interfaces/IERC20.sol";
import "../interfaces/IPoolFactory.sol";
import "../libraries/Ownable.sol";
import "../libraries/ReentrancyGuard.sol";
import "../libraries/SafeMath.sol";
import "../libraries/Pausable.sol";
import "../extensions/RedKiteWhitelist.sol";

contract PreSalePool is Ownable, ReentrancyGuard, Pausable, RedKiteWhitelist {
    using SafeMath for uint256;

    struct OfferedCurrency {
        uint256 decimals;
        uint256 rate;
    }

    // The token being sold
    IERC20 public token;

    // The address of factory contract
    address public factory;

    // The address of signer account
    address public signer;

    // Address where funds are collected
    address public fundingWallet;

    // Timestamps when token started to sell
    uint256 public openTime = block.timestamp;

    // Timestamps when token stopped to sell
    uint256 public closeTime;

    // Amount of wei raised
    uint256 public weiRaised = 0;

    // Amount of token sold
    uint256 public tokenSold = 0;

    // Amount of token sold
    uint256 public totalUnclaimed = 0;

    // Number of token user purchased
    mapping(address => uint256) public userPurchased;

    // Number of token user claimed
    mapping(address => uint256) public userClaimed;

    // Number of token user purchased
    mapping(address => mapping (address => uint)) public investedAmountOf;

    // Get offered currencies
    mapping(address => OfferedCurrency) public offeredCurrencies;

    // Pool extensions
    bool public useWhitelist;

    // -----------------------------------------
    // Lauchpad Starter's event
    // -----------------------------------------
    event PresalePoolCreated(
        address token,
        uint256 openTime,
        uint256 closeTime,
        address offeredCurrency,
        uint256 offeredCurrencyDecimals,
        uint256 offeredCurrencyRate,
        address wallet,
        address owner
    );
    event TokenPurchaseByEther(
        address indexed purchaser,
        address indexed beneficiary,
        uint256 value,
        uint256 amount
    );
    event TokenPurchaseByToken(
        address indexed purchaser,
        address indexed beneficiary,
        address token,
        uint256 value,
        uint256 amount
    );

    event TokenClaimed(address user, uint256 amount);
    event RefundedIcoToken(address wallet, uint256 amount);
    event PoolStatsChanged();

    // -----------------------------------------
    // Constructor
    // -----------------------------------------
    constructor() {
        factory = msg.sender;
    }

    // -----------------------------------------
    // Red Kite external interface
    // -----------------------------------------

    /**
     * @dev fallback function
     */
    fallback() external {
        revert();
    }

    /**
     * @dev fallback function
     */
    receive() external payable {
        revert();
    }

    /**
     * @param _token Address of the token being sold
     * @param _duration Duration of ICO Pool
     * @param _openTime When ICO Started
     * @param _offeredCurrency Address of offered token
     * @param _offeredCurrencyDecimals Decimals of offered token
     * @param _offeredRate Number of currency token units a buyer gets
     * @param _wallet Address where collected funds will be forwarded to
     * @param _signer Address where collected funds will be forwarded to
     */
    function initialize(
        address _token,
        uint256 _duration,
        uint256 _openTime,
        address _offeredCurrency,
        uint256 _offeredRate,
        uint256 _offeredCurrencyDecimals,
        address _wallet,
        address _signer
    ) external {
        require(msg.sender == factory, "POOL::UNAUTHORIZED");

        token = IERC20(_token);
        openTime = _openTime;
        closeTime = _openTime.add(_duration);
        fundingWallet = _wallet;
        owner = tx.origin;
        paused = false;
        signer = _signer;

        offeredCurrencies[_offeredCurrency] = OfferedCurrency({
            rate: _offeredRate,
            decimals: _offeredCurrencyDecimals
        });

        emit PresalePoolCreated(
            _token,
            _openTime,
            closeTime,
            _offeredCurrency,
            _offeredCurrencyDecimals,
            _offeredRate,
            _wallet,
            owner
        );
    }

    /**
     * @notice Returns the conversion rate when user buy by offered token
     * @return Returns only a fixed number of rate.
     */
    function getOfferedCurrencyRate(address _token) public view returns (uint256) {
        return offeredCurrencies[_token].rate;
    }

    /**
     * @notice Returns the conversion rate decimals when user buy by offered token
     * @return Returns only a fixed number of decimals.
     */
    function getOfferedCurrencyDecimals(address _token) public view returns (uint256) {
        return offeredCurrencies[_token].decimals;
    }

    /**
     * @notice Return the available tokens for purchase
     * @return availableTokens Number of total available
     */
    function getAvailableTokensForSale() public view returns (uint256 availableTokens) {
        return token.balanceOf(address(this)).add(totalUnclaimed).sub(tokenSold);
    }

    /**
     * @notice Owner can set the offered token conversion rate. Receiver tokens = tradeTokens * tokenRate / 10 ** etherConversionRateDecimals
     * @param _rate Fixed number of ether rate
     * @param _decimals Fixed number of ether rate decimals
     */
    function setOfferedCurrencyRateAndDecimals(address _token, uint256 _rate, uint256 _decimals)
        external
        onlyOwner
    {
        offeredCurrencies[_token].rate = _rate;
        offeredCurrencies[_token].decimals = _decimals;
        emit PoolStatsChanged();
    }

    /**
     * @notice Owner can set the offered token conversion rate. Receiver tokens = tradeTokens * tokenRate / 10 ** etherConversionRateDecimals
     * @param _rate Fixed number of rate
     */
    function setOfferedCurrencyRate(address _token, uint256 _rate) external onlyOwner {
        require(offeredCurrencies[_token].rate != _rate, "POOL::RATE_INVALID");
        offeredCurrencies[_token].rate = _rate;
        emit PoolStatsChanged();
    }

    /**
     * @notice Owner can set the offered token conversion rate. Receiver tokens = tradeTokens * tokenRate / 10 ** etherConversionRateDecimals
     * @param _newSigner Address of new signer
     */
    function setNewSigner(address _newSigner) external onlyOwner {
        require(signer != _newSigner, "POOL::SIGNER_INVALID");
        signer = _newSigner;
    }

    /**
     * @notice Owner can set the offered token conversion rate. Receiver tokens = tradeTokens * tokenRate / 10 ** etherConversionRateDecimals
     * @param _decimals Fixed number of decimals
     */
    function setOfferedCurrencyDecimals(address _token, uint256 _decimals) external onlyOwner {
        require(offeredCurrencies[_token].decimals != _decimals, "POOL::RATE_INVALID");
        offeredCurrencies[_token].decimals = _decimals;
        emit PoolStatsChanged();
    }

    /**
     * @notice Owner can set the close time (time in seconds). User can buy before close time.
     * @param _closeTime Value in uint256 determine when we stop user to by tokens
     */
    function setCloseTime(uint256 _closeTime) external onlyOwner() {
        require(_closeTime >= block.timestamp, "POOL::INVALID_TIME");
        closeTime = _closeTime;
        emit PoolStatsChanged();
    }

    /**
     * @notice Owner can set the open time (time in seconds). User can buy after open time.
     * @param _openTime Value in uint256 determine when we allow user to by tokens
     */
    function setOpenTime(uint256 _openTime) external onlyOwner() {
        openTime = _openTime;
        emit PoolStatsChanged();
    }

    /**
     * @notice Owner can set extentions.
     * @param _whitelist Value in bool. True if using whitelist
     */
    function setPoolExtentions(bool _whitelist) external onlyOwner() {
        useWhitelist = _whitelist;
        emit PoolStatsChanged();
    }

    function buyTokenByEtherWithPermission(
        address _beneficiary,
        address _candidate,
        uint256 _maxAmount,
        uint256 _minAmount,
        bytes memory _signature
    ) public payable whenNotPaused nonReentrant {
        uint256 weiAmount = msg.value;

        require(offeredCurrencies[address(0)].rate != 0, "POOL::PURCHASE_METHOD_NOT_ALLOWED");

        _preValidatePurchase(_beneficiary, weiAmount);

        require(_validPurchase(), "POOL::ENDED");
        require(_verifyWhitelist(_candidate, _maxAmount, _minAmount, _signature));

        // calculate token amount to be created
        uint256 tokens = _getOfferedCurrencyToTokenAmount(address(0), weiAmount);
        require(getAvailableTokensForSale() >= tokens, "POOL::NOT_ENOUGHT_TOKENS_FOR_SALE");
        require(tokens >= _minAmount || userPurchased[_candidate].add(tokens) >= _minAmount, "POOL::MIN_AMOUNT_UNREACHED");
        require(userPurchased[_candidate].add(tokens) <= _maxAmount, "POOL::PURCHASE_AMOUNT_EXCEED_ALLOWANCE");

        _forwardFunds(weiAmount);

        _updatePurchasingState(weiAmount, tokens);

        investedAmountOf[address(0)][_candidate] = investedAmountOf[address(0)][_candidate].add(weiAmount);

        emit TokenPurchaseByEther(msg.sender, _beneficiary, weiAmount, tokens);
    }

    function buyTokenByTokenWithPermission(
        address _beneficiary,
        address _token,
        uint256 _amount,
        address _candidate,
        uint256 _maxAmount,
        uint256 _minAmount,
        bytes memory _signature
    ) public whenNotPaused nonReentrant {
        require(offeredCurrencies[_token].rate != 0, "POOL::PURCHASE_METHOD_NOT_ALLOWED");
        require(_validPurchase(), "POOL::ENDED");
        require(_verifyWhitelist(_candidate, _maxAmount, _minAmount, _signature));

        _verifyAllowance(msg.sender, _token, _amount);

        _preValidatePurchase(_beneficiary, _amount);

        uint256 tokens = _getOfferedCurrencyToTokenAmount(_token, _amount);
        require(getAvailableTokensForSale() >= tokens, "POOL::NOT_ENOUGHT_TOKENS_FOR_SALE");
        require(tokens >= _minAmount || userPurchased[_candidate].add(tokens) >= _minAmount, "POOL::MIN_AMOUNT_UNREACHED");
        require(userPurchased[_candidate].add(tokens) <= _maxAmount, "POOL:PURCHASE_AMOUNT_EXCEED_ALLOWANCE");

        _forwardTokenFunds(_token, _amount);

        _updatePurchasingState(_amount, tokens);

        investedAmountOf[_token][_candidate] = investedAmountOf[address(0)][_candidate].add(_amount);

        emit TokenPurchaseByToken(
            msg.sender,
            _beneficiary,
            _token,
            _amount,
            tokens
        );
    }

    /**
     * @notice Return true if pool has ended
     * @dev User cannot purchase / trade tokens when isFinalized == true
     * @return true if the ICO Ended.
     */
    function isFinalized() public view returns (bool) {
        return block.timestamp >= closeTime;
    }

    /**
     * @notice Owner can receive their remaining tokens when ICO Ended
     * @dev  Can refund remainning token if the ico ended
     * @param _wallet Address wallet who receive the remainning tokens when Ico end
     */
    function refundRemainingTokens(address _wallet)
        external
        onlyOwner
    {
        require(isFinalized(), "POOL::ICO_NOT_ENDED");
        require(token.balanceOf(address(this)) > 0, "POOL::EMPTY_BALANCE");

        uint256 remainingTokens = getAvailableTokensForSale();
        _deliverTokens(_wallet, remainingTokens);
        emit RefundedIcoToken(_wallet, remainingTokens);
    }

    /**
     * @notice User can receive their tokens when pool finished
     */
    function claimTokens(address _candidate, uint256 _amount, bytes memory _signature) public {
        require(_verifyClaimToken(_candidate, _amount, _signature), "POOL::NOT_ALLOW_TO_CLAIM");
        require(isFinalized(), "POOL::NOT_FINALLIZED");


        uint256 claimAmount = userPurchased[_candidate];

        if (claimAmount > _amount) {
            claimAmount = _amount;
        }

        userClaimed[_candidate] = userClaimed[_candidate].add(claimAmount);

        require(userClaimed[_candidate] <= _amount, "POOL::CLAIM_EXCEED_ALLOWANCE");
        
        _deliverTokens(msg.sender, claimAmount);
        totalUnclaimed = totalUnclaimed.sub(claimAmount);

        userPurchased[_candidate] = userPurchased[_candidate].sub(claimAmount);

        emit TokenClaimed(msg.sender, claimAmount);
    }

    /**
     * @dev Validation of an incoming purchase. Use require statements to revert state when conditions are not met. Use super to concatenate validations.
     * @param _beneficiary Address performing the token purchase
     * @param _weiAmount Value in wei involved in the purchase
     */
    function _preValidatePurchase(address _beneficiary, uint256 _weiAmount)
        internal
        pure
    {
        require(_beneficiary != address(0), "POOL::INVALID_BENEFICIARY");
        require(_weiAmount != 0, "POOL::INVALID_WEI_AMOUNT");
    }

    /**
     * @dev Override to extend the way in which ether is converted to tokens.
     * @param _amount Value in wei to be converted into tokens
     * @return Number of tokens that can be purchased with the specified _weiAmount
     */
    function _getOfferedCurrencyToTokenAmount(address _token, uint256 _amount)
        internal
        view
        returns (uint256)
    {
        uint256 rate = getOfferedCurrencyRate(_token);
        uint256 decimals = getOfferedCurrencyDecimals(_token);
        return _amount.mul(rate).div(10**decimals);
    }

    /**
     * @dev Source of tokens. Transfer / mint
     * @param _beneficiary Address performing the token purchase
     * @param _tokenAmount Number of tokens to be emitted
     */
    function _deliverTokens(address _beneficiary, uint256 _tokenAmount)
        internal
    {
        token.transfer(_beneficiary, _tokenAmount);
    }

    /**
     * @dev Determines how ETH is stored/forwarded on purchases.
     */
    function _forwardFunds(uint256 _value) internal {
        address payable wallet = address(uint160(fundingWallet));
        (bool success, ) = wallet.call{value: _value}("");
        require(success, "POOL::WALLET_TRANSFER_FAILED");
    }

    /**
     * @dev Determines how Token is stored/forwarded on purchases.
     */
    function _forwardTokenFunds(address _token, uint256 _amount) internal {
        IERC20(_token).transferFrom(msg.sender, fundingWallet, _amount);
    }

    /**
     * @param _tokens Value of sold tokens
     * @param _weiAmount Value in wei involved in the purchase
     */
    function _updatePurchasingState(uint256 _weiAmount, uint256 _tokens)
        internal
    {
        weiRaised = weiRaised.add(_weiAmount);
        tokenSold = tokenSold.add(_tokens);
        userPurchased[msg.sender] = userPurchased[msg.sender].add(_tokens);
        totalUnclaimed = totalUnclaimed.add(_tokens);
    }

    // @return true if the transaction can buy tokens
    function _validPurchase() internal view returns (bool) {
        bool withinPeriod =
            block.timestamp >= openTime && block.timestamp <= closeTime;
        return withinPeriod;
    }

    /**
     * @dev Transfer eth to an address
     * @param _to Address receiving the eth
     * @param _amount Amount of wei to transfer
     */
    function _transfer(address _to, uint256 _amount) private {
        address payable payableAddress = address(uint160(_to));
        (bool success, ) = payableAddress.call{value: _amount}("");
        require(success, "POOL::TRANSFER_FEE_FAILED");
    }

    /**
     * @dev Verify allowance of purchase
     * @param _user Address of buyer
     * @param _token token address of purchasing token
     * @param _amount Amount of token to buy pool token
     */
    function _verifyAllowance(
        address _user,
        address _token,
        uint256 _amount
    ) private view {
        IERC20 tradeToken = IERC20(_token);
        uint256 allowance = tradeToken.allowance(_user, address(this));
        require(allowance >= _amount, "POOL::TOKEN_NOT_APPROVED");
    }

    /**
     * @dev Verify permission of purchase
     * @param _candidate Address of buyer
     * @param _maxAmount max token can buy
     * @param _minAmount min token can buy
     * @param _signature Signature of signers
     */
    function _verifyWhitelist(
        address _candidate,
        uint256 _maxAmount,
        uint256 _minAmount,
        bytes memory _signature
    ) private view returns (bool) {
        if (useWhitelist) {
            return (verify(signer, _candidate, _maxAmount, _minAmount, _signature));
        }
        return true;
    }

    /**
     * @dev Verify permission of purchase
     * @param _candidate Address of buyer
     * @param _amount claimable amount
     * @param _signature Signature of signers
     */
    function _verifyClaimToken(
        address _candidate,
        uint256 _amount,
        bytes memory _signature
    ) private view returns (bool) {
        return (verifyClaimToken(signer, _candidate, _amount, _signature));
    }
}

File 2 of 9 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 3 of 9 : IPoolFactory.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.1;

interface IPoolFactory {
    function getTier() external view returns (address);
}

File 4 of 9 : Ownable.sol
//SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.7.0;


/**
 * @title Ownable
 * @dev The Ownable contract has an owner address, and provides basic authorization control
 * functions, this simplifies the implementation of "user permissions".
 */
contract Ownable {
  address public owner;

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

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

  /**
   * @dev Allows the current owner to transfer control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function transferOwnership(address _newOwner) public onlyOwner {
    _transferOwnership(_newOwner);
  }

  /**
   * @dev Transfers control of the contract to a newOwner.
   * @param _newOwner The address to transfer ownership to.
   */
  function _transferOwnership(address _newOwner) internal {
    require(_newOwner != address(0));
    emit OwnershipTransferred(owner, _newOwner);
    owner = _newOwner;
  }
}

File 5 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 6 of 9 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol
// Subject to the MIT license.

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot underflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, errorMessage);

        return c;
    }

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

    /**
     * @dev Returns the integer division of two unsigned integers.
     * Reverts with custom message on division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

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

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

File 7 of 9 : Pausable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.1;


import "./Ownable.sol";


/**
 * @title Pausable
 * @dev Base contract which allows children to implement an emergency stop mechanism.
 */
contract Pausable is Ownable {
  event Pause();
  event Unpause();

  bool public paused;


  /**
   * @dev Modifier to make a function callable only when the contract is not paused.
   */
  modifier whenNotPaused() {
    require(!paused, "CONTRACT_PAUSED");
    _;
  }

  /**
   * @dev Modifier to make a function callable only when the contract is paused.
   */
  modifier whenPaused() {
    require(paused, "CONTRACT_NOT_PAUSED");
    _;
  }

  /**
   * @dev called by the owner to pause, triggers stopped state
   */
  function pause() onlyOwner whenNotPaused public {
    paused = true;
    emit Pause();
  }

  /**
   * @dev called by the owner to unpause, returns to normal state
   */
  function unpause() onlyOwner whenPaused public {
    paused = false;
    emit Unpause();
  }
}

File 8 of 9 : RedKiteWhitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;

import "openzeppelin-solidity/contracts/cryptography/ECDSA.sol";

// Signature Verification
/// @title RedKite Whitelists - Implement off-chain whitelist and on-chain verification
/// @author Thang Nguyen Quy <[email protected]>

contract RedKiteWhitelist {
    // Using Openzeppelin ECDSA cryptography library
    function getMessageHash(
        address _candidate,
        uint256 _maxAmount,
        uint256 _minAmount
    ) public pure returns (bytes32) {
        return keccak256(abi.encodePacked(_candidate, _maxAmount, _minAmount));
    }

    function getClaimMessageHash(
        address _candidate,
        uint256 _amount
    ) public pure returns (bytes32) {
        return keccak256(abi.encodePacked(_candidate, _amount));
    }

    // Verify signature function
    function verify(
        address _signer,
        address _candidate,
        uint256 _maxAmount,
        uint256 _minAmount,
        bytes memory signature
    ) public pure returns (bool) {
        bytes32 messageHash = getMessageHash(_candidate, _maxAmount, _minAmount);
        bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash);

        return getSignerAddress(ethSignedMessageHash, signature) == _signer;
    }

    // Verify signature function
    function verifyClaimToken(
        address _signer,
        address _candidate,
        uint256 _amount,
        bytes memory signature
    ) public pure returns (bool) {
        bytes32 messageHash = getClaimMessageHash(_candidate, _amount);
        bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash);

        return getSignerAddress(ethSignedMessageHash, signature) == _signer;
    }

    function getSignerAddress(bytes32 _messageHash, bytes memory _signature) public pure returns(address signer) {
        return ECDSA.recover(_messageHash, _signature);
    }

    // Split signature to r, s, v
    function splitSignature(bytes memory _signature)
        public
        pure
        returns (
            bytes32 r,
            bytes32 s,
            uint8 v
        )
    {
        require(_signature.length == 65, "invalid signature length");

        assembly {
            r := mload(add(_signature, 32))
            s := mload(add(_signature, 64))
            v := byte(0, mload(add(_signature, 96)))
        }
    }

    function getEthSignedMessageHash(bytes32 _messageHash)
        public
        pure
        returns (bytes32)
    {
        return ECDSA.toEthSignedMessageHash(_messageHash);
    }
}

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

pragma solidity >=0.6.0 <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 {
    /**
     * @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) {
        // Check the signature length
        if (signature.length != 65) {
            revert("ECDSA: invalid signature length");
        }

        // Divide the signature in r, s and v variables
        bytes32 r;
        bytes32 s;
        uint8 v;

        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        // solhint-disable-next-line no-inline-assembly
        assembly {
            r := mload(add(signature, 0x20))
            s := mload(add(signature, 0x40))
            v := byte(0, mload(add(signature, 0x60)))
        }

        return recover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) {
        // 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 (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): 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.
        require(uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value");
        require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value");

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * replicates the behavior of the
     * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
     * JSON-RPC method.
     *
     * 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));
    }
}

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

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Pause","type":"event"},{"anonymous":false,"inputs":[],"name":"PoolStatsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"openTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"closeTime","type":"uint256"},{"indexed":false,"internalType":"address","name":"offeredCurrency","type":"address"},{"indexed":false,"internalType":"uint256","name":"offeredCurrencyDecimals","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"offeredCurrencyRate","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"address","name":"owner","type":"address"}],"name":"PresalePoolCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RefundedIcoToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchaseByEther","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"purchaser","type":"address"},{"indexed":true,"internalType":"address","name":"beneficiary","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchaseByToken","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpause","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_minAmount","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyTokenByEtherWithPermission","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_minAmount","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"buyTokenByTokenWithPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAvailableTokensForSale","outputs":[{"internalType":"uint256","name":"availableTokens","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"getClaimMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageHash","type":"bytes32"}],"name":"getEthSignedMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_minAmount","type":"uint256"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getOfferedCurrencyDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"getOfferedCurrencyRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"getSignerAddress","outputs":[{"internalType":"address","name":"signer","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"},{"internalType":"uint256","name":"_openTime","type":"uint256"},{"internalType":"address","name":"_offeredCurrency","type":"address"},{"internalType":"uint256","name":"_offeredRate","type":"uint256"},{"internalType":"uint256","name":"_offeredCurrencyDecimals","type":"uint256"},{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"address","name":"_signer","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"investedAmountOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isFinalized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"offeredCurrencies","outputs":[{"internalType":"uint256","name":"decimals","type":"uint256"},{"internalType":"uint256","name":"rate","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"openTime","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"refundRemainingTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_closeTime","type":"uint256"}],"name":"setCloseTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newSigner","type":"address"}],"name":"setNewSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_decimals","type":"uint256"}],"name":"setOfferedCurrencyDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"}],"name":"setOfferedCurrencyRate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_rate","type":"uint256"},{"internalType":"uint256","name":"_decimals","type":"uint256"}],"name":"setOfferedCurrencyRateAndDecimals","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_openTime","type":"uint256"}],"name":"setOpenTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelist","type":"bool"}],"name":"setPoolExtentions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"splitSignature","outputs":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUnclaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userPurchased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_maxAmount","type":"uint256"},{"internalType":"uint256","name":"_minAmount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_candidate","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifyClaimToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"weiRaised","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405242600655600060085560006009556000600a5534801561002357600080fd5b5060018055600380546001600160a01b03191633179055612e0e806100496000396000f3fe6080604052600436106102d55760003560e01c806383c6394a11610179578063b837df1e116100d6578063e1f7133d1161008a578063f60ba33811610064578063f60ba33814610df0578063fa54080114610e1a578063fc0c546a14610e44576102df565b8063e1f7133d14610d75578063e630025a14610da8578063f2fde38b14610dbd576102df565b8063c96f14b8116100bb578063c96f14b814610c49578063cffc18eb14610c5e578063d2b0737b14610d36576102df565b8063b837df1e14610bf9578063c45a015514610c34576102df565b8063a1491efc1161012d578063a7bb580311610112578063a7bb580314610add578063b425688814610bb1578063b651833914610bc6576102df565b8063a1491efc14610925578063a4fcb3ea14610a0a576102df565b80638d4e40831161015e5780638d4e4083146108cf5780638da5cb5b146108e45780638db79ffe146108f9576102df565b806383c6394a146108a55780638456cb59146108ba576102df565b80634042b66f116102325780635a3a85cb116101e65780636301d4c2116101c05780636301d4c21461080057806375d785a9146108395780637a3d27671461086c576102df565b80635a3a85cb146107765780635c975abb146107c2578063627749e6146107eb576102df565b80634c016408116102175780634c016408146106be5780634d5c3dfa146106fd578063519ee19e14610761576102df565b80634042b66f146105e157806349e80422146105f6576102df565b80632ee58943116102895780633be3a3f51161026e5780633be3a3f51461058d5780633c4b40b8146105b75780633f4ba83a146105cc576102df565b80632ee58943146105155780633b7fcdca1461055a576102df565b8063238ac933116102ba578063238ac933146103fc57806324c5aae7146104115780632868193a146104dc576102df565b80630f7d8e39146102f15780630f9c5d9e146103c7576102df565b366102df57600080fd5b3480156102eb57600080fd5b50600080fd5b3480156102fd57600080fd5b506103ab6004803603604081101561031457600080fd5b8135919081019060408101602082013564010000000081111561033657600080fd5b82018360208201111561034857600080fd5b8035906020019184600183028401116401000000008311171561036a57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610e59945050505050565b604080516001600160a01b039092168252519081900360200190f35b3480156103d357600080fd5b506103fa600480360360208110156103ea57600080fd5b50356001600160a01b0316610e6e565b005b34801561040857600080fd5b506103ab610f17565b6103fa600480360360a081101561042757600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a08101608082013564010000000081111561046757600080fd5b82018360208201111561047957600080fd5b8035906020019184600183028401116401000000008311171561049b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f26945050505050565b3480156104e857600080fd5b506103fa600480360360408110156104ff57600080fd5b506001600160a01b0381351690602001356112b5565b34801561052157600080fd5b506105486004803603602081101561053857600080fd5b50356001600160a01b0316611384565b60408051918252519081900360200190f35b34801561056657600080fd5b506105486004803603602081101561057d57600080fd5b50356001600160a01b0316611396565b34801561059957600080fd5b506103fa600480360360208110156105b057600080fd5b50356113a8565b3480156105c357600080fd5b506103ab611445565b3480156105d857600080fd5b506103fa611454565b3480156105ed57600080fd5b506105486114f7565b34801561060257600080fd5b506103fa6004803603606081101561061957600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561064957600080fd5b82018360208201111561065b57600080fd5b8035906020019184600183028401116401000000008311171561067d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506114fd945050505050565b3480156106ca57600080fd5b506103fa600480360360608110156106e157600080fd5b506001600160a01b038135169060208101359060400135611702565b34801561070957600080fd5b506103fa600480360361010081101561072157600080fd5b506001600160a01b038135811691602081013591604082013591606081013582169160808201359160a08101359160c082013581169160e0013516611766565b34801561076d57600080fd5b50610548611901565b34801561078257600080fd5b506107a96004803603602081101561079957600080fd5b50356001600160a01b0316611907565b6040805192835260208301919091528051918290030190f35b3480156107ce57600080fd5b506107d7611920565b604080519115158252519081900360200190f35b3480156107f757600080fd5b50610548611929565b34801561080c57600080fd5b506103fa6004803603604081101561082357600080fd5b506001600160a01b03813516906020013561192f565b34801561084557600080fd5b506105486004803603602081101561085c57600080fd5b50356001600160a01b03166119f8565b34801561087857600080fd5b506105486004803603604081101561088f57600080fd5b506001600160a01b038135169060200135611a16565b3480156108b157600080fd5b50610548611a5b565b3480156108c657600080fd5b506103fa611b08565b3480156108db57600080fd5b506107d7611ba1565b3480156108f057600080fd5b506103ab611baa565b34801561090557600080fd5b506103fa6004803603602081101561091c57600080fd5b50351515611bb9565b34801561093157600080fd5b506103fa600480360360e081101561094857600080fd5b6001600160a01b03823581169260208101358216926040820135926060830135169160808101359160a0820135919081019060e0810160c082013564010000000081111561099557600080fd5b8201836020820111156109a757600080fd5b803590602001918460018302840111640100000000831117156109c957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611c0a945050505050565b348015610a1657600080fd5b506107d760048036036080811015610a2d57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135640100000000811115610a6857600080fd5b820183602082011115610a7a57600080fd5b80359060200191846001830284011164010000000083111715610a9c57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611f84945050505050565b348015610ae957600080fd5b50610b9060048036036020811015610b0057600080fd5b810190602081018135640100000000811115610b1b57600080fd5b820183602082011115610b2d57600080fd5b80359060200191846001830284011164010000000083111715610b4f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611fcb945050505050565b60408051938452602084019290925260ff1682820152519081900360600190f35b348015610bbd57600080fd5b50610548612044565b348015610bd257600080fd5b506103fa60048036036020811015610be957600080fd5b50356001600160a01b031661204a565b348015610c0557600080fd5b5061054860048036036040811015610c1c57600080fd5b506001600160a01b03813581169160200135166121ff565b348015610c4057600080fd5b506103ab61221c565b348015610c5557600080fd5b5061054861222b565b348015610c6a57600080fd5b506107d7600480360360a0811015610c8157600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135640100000000811115610cc157600080fd5b820183602082011115610cd357600080fd5b80359060200191846001830284011164010000000083111715610cf557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612231945050505050565b348015610d4257600080fd5b5061054860048036036060811015610d5957600080fd5b506001600160a01b038135169060208101359060400135612278565b348015610d8157600080fd5b5061054860048036036020811015610d9857600080fd5b50356001600160a01b03166122c5565b348015610db457600080fd5b506107d76122e0565b348015610dc957600080fd5b506103fa60048036036020811015610de057600080fd5b50356001600160a01b03166122e9565b348015610dfc57600080fd5b506103fa60048036036020811015610e1357600080fd5b503561230c565b348015610e2657600080fd5b5061054860048036036020811015610e3d57600080fd5b5035612354565b348015610e5057600080fd5b506103ab61235f565b6000610e658383612373565b90505b92915050565b6000546001600160a01b03163314610e8557600080fd5b6004546001600160a01b0382811691161415610ee8576040805162461bcd60e51b815260206004820152601460248201527f504f4f4c3a3a5349474e45525f494e56414c4944000000000000000000000000604482015290519081900360640190fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6004546001600160a01b031681565b60025460ff1615610f70576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415610fc8576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260015560008052600e6020527fe710864318d4a32f37d6ce54cb3fadbef648dd12d8dbdf53973564d56b7f881d5434906110355760405162461bcd60e51b8152600401808060200182810382526021815260200180612d976021913960400191505060405180910390fd5b61103f86826123f3565b6110476124a4565b611086576040805162461bcd60e51b815260206004820152600b60248201526a1413d3d30e8e915391115160aa1b604482015290519081900360640190fd5b611092858585856124c1565b61109b57600080fd5b60006110a86000836124fa565b9050806110b3611a5b565b10156110f05760405162461bcd60e51b8152600401808060200182810382526021815260200180612db86021913960400191505060405180910390fd5b838110158061112257506001600160a01b0386166000908152600b6020526040902054849061111f9083612536565b10155b611173576040805162461bcd60e51b815260206004820152601a60248201527f504f4f4c3a3a4d494e5f414d4f554e545f554e52454143484544000000000000604482015290519081900360640190fd5b6001600160a01b0386166000908152600b602052604090205485906111989083612536565b11156111d55760405162461bcd60e51b8152600401808060200182810382526026815260200180612d2e6026913960400191505060405180910390fd5b6111de82612590565b6111e88282612641565b6001600160a01b03861660009081527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee602052604090205461122a9083612536565b6001600160a01b0387811660009081527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee60209081526040918290209390935580518581529283018490528051918a169233927fd6e14f869a4a94e470ad9068cd72554abf10add2c7004aaeed6ea664aede76bd929181900390910190a35050600180555050505050565b6000546001600160a01b031633146112cc57600080fd5b6001600160a01b0382166000908152600e602052604090206001015481141561133c576040805162461bcd60e51b815260206004820152601260248201527f504f4f4c3a3a524154455f494e56414c49440000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600e6020526040808220600101839055517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f95629190a15050565b600b6020526000908152604090205481565b600c6020526000908152604090205481565b6000546001600160a01b031633146113bf57600080fd5b42811015611414576040805162461bcd60e51b815260206004820152601260248201527f504f4f4c3a3a494e56414c49445f54494d450000000000000000000000000000604482015290519081900360640190fd5b60078190556040517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f956290600090a150565b6005546001600160a01b031681565b6000546001600160a01b0316331461146b57600080fd5b60025460ff166114c2576040805162461bcd60e51b815260206004820152601360248201527f434f4e54524143545f4e4f545f50415553454400000000000000000000000000604482015290519081900360640190fd5b6002805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60085481565b61150883838361269f565b611559576040805162461bcd60e51b815260206004820152601860248201527f504f4f4c3a3a4e4f545f414c4c4f575f544f5f434c41494d0000000000000000604482015290519081900360640190fd5b611561611ba1565b6115b2576040805162461bcd60e51b815260206004820152601460248201527f504f4f4c3a3a4e4f545f46494e414c4c495a4544000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0383166000908152600b6020526040902054828111156115d65750815b6001600160a01b0384166000908152600c60205260409020546115f99082612536565b6001600160a01b0385166000908152600c60205260409020819055831015611668576040805162461bcd60e51b815260206004820152601c60248201527f504f4f4c3a3a434c41494d5f4558434545445f414c4c4f57414e434500000000604482015290519081900360640190fd5b61167233826126ba565b600a5461167f908261275f565b600a556001600160a01b0384166000908152600b60205260409020546116a5908261275f565b6001600160a01b0385166000908152600b602090815260409182902092909255805133815291820183905280517fe42df0d9493dfd0d7f69902c895b94c190a53e8c27876a86f45e7c997d9d8f7c9281900390910190a150505050565b6000546001600160a01b0316331461171957600080fd5b6001600160a01b0383166000908152600e602052604080822060018101859055839055517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f95629190a1505050565b6003546001600160a01b031633146117c5576040805162461bcd60e51b815260206004820152601260248201527f504f4f4c3a3a554e415554484f52495a45440000000000000000000000000000604482015290519081900360640190fd5b600280547fffffffffffffffffffffff0000000000000000000000000000000000000000ff166101006001600160a01b038b1602179055600686905561180b8688612536565b6007908155600580546001600160a01b0380861673ffffffffffffffffffffffffffffffffffffffff199283168117909355600080548316321781556002805460ff191690556004805487841694169390931790925560408051808201825288815260208082018b81528c8516808752600e8352848720935184559051600193909301929092559554935482518f851681529687018d90528683019490945260608601526080850188905260a0850189905260c08501939093521660e0830152517ffd045e83cc69e7df57693ebd8d1436135571f49c273838cde1c94108b1a20cb3918190036101000190a15050505050505050565b60095481565b600e602052600090815260409020805460019091015482565b60025460ff1681565b60075481565b6000546001600160a01b0316331461194657600080fd5b6001600160a01b0382166000908152600e60205260409020548114156119b3576040805162461bcd60e51b815260206004820152601260248201527f504f4f4c3a3a524154455f494e56414c49440000000000000000000000000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600e6020526040808220839055517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f95629190a15050565b6001600160a01b03166000908152600e602052604090206001015490565b6000828260405160200180836001600160a01b031660601b81526014018281526020019250505060405160208183030381529060405280519060200120905092915050565b6000611b03600954611afd600a54600260019054906101000a90046001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611acb57600080fd5b505afa158015611adf573d6000803e3d6000fd5b505050506040513d6020811015611af557600080fd5b505190612536565b9061275f565b905090565b6000546001600160a01b03163314611b1f57600080fd5b60025460ff1615611b69576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b6002805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b60075442101590565b6000546001600160a01b031681565b6000546001600160a01b03163314611bd057600080fd5b600f805460ff19168215151790556040517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f956290600090a150565b60025460ff1615611c54576040805162461bcd60e51b815260206004820152600f60248201526e10d3d395149050d517d4105554d151608a1b604482015290519081900360640190fd5b60026001541415611cac576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600260019081556001600160a01b0387166000908152600e602052604090200154611d085760405162461bcd60e51b8152600401808060200182810382526021815260200180612d976021913960400191505060405180910390fd5b611d106124a4565b611d4f576040805162461bcd60e51b815260206004820152600b60248201526a1413d3d30e8e915391115160aa1b604482015290519081900360640190fd5b611d5b848484846124c1565b611d6457600080fd5b611d6f3387876127a1565b611d7987866123f3565b6000611d8587876124fa565b905080611d90611a5b565b1015611dcd5760405162461bcd60e51b8152600401808060200182810382526021815260200180612db86021913960400191505060405180910390fd5b8281101580611dff57506001600160a01b0385166000908152600b60205260409020548390611dfc9083612536565b10155b611e50576040805162461bcd60e51b815260206004820152601a60248201527f504f4f4c3a3a4d494e5f414d4f554e545f554e52454143484544000000000000604482015290519081900360640190fd5b6001600160a01b0385166000908152600b60205260409020548490611e759083612536565b1115611eb25760405162461bcd60e51b8152600401808060200182810382526025815260200180612ce76025913960400191505060405180910390fd5b611ebc8787612899565b611ec68682612641565b6001600160a01b03851660009081527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee6020526040902054611f089087612536565b6001600160a01b038089166000818152600d602090815260408083208b861684528252918290209490945580519182529281018990528083018490529151908a169133917f7298563060885829720d658271e2cf90735f0dedf473ea50428added4b4f78819181900360600190a3505060018055505050505050565b600080611f918585611a16565b90506000611f9e82612354565b9050866001600160a01b0316611fb48286610e59565b6001600160a01b031614925050505b949350505050565b60008060008351604114612026576040805162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e6774680000000000000000604482015290519081900360640190fd5b50505060208101516040820151606090920151909260009190911a90565b60065481565b6000546001600160a01b0316331461206157600080fd5b612069611ba1565b6120ba576040805162461bcd60e51b815260206004820152601360248201527f504f4f4c3a3a49434f5f4e4f545f454e44454400000000000000000000000000604482015290519081900360640190fd5b600254604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905160009261010090046001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561212357600080fd5b505afa158015612137573d6000803e3d6000fd5b505050506040513d602081101561214d57600080fd5b5051116121a1576040805162461bcd60e51b815260206004820152601360248201527f504f4f4c3a3a454d5054595f42414c414e434500000000000000000000000000604482015290519081900360640190fd5b60006121ab611a5b565b90506121b782826126ba565b604080516001600160a01b03841681526020810183905281517f80131f7b739a992331f435eb35e82a069ef4dd665120eb2c4e0fff9996cca2e1929181900390910190a15050565b600d60209081526000928352604080842090915290825290205481565b6003546001600160a01b031681565b600a5481565b60008061223f868686612278565b9050600061224c82612354565b9050876001600160a01b03166122628286610e59565b6001600160a01b03161498975050505050505050565b6040805160609490941b6bffffffffffffffffffffffff19166020808601919091526034850193909352605480850192909252805180850390920182526074909301909252815191012090565b6001600160a01b03166000908152600e602052604090205490565b600f5460ff1681565b6000546001600160a01b0316331461230057600080fd5b6123098161290e565b50565b6000546001600160a01b0316331461232357600080fd5b60068190556040517f915bfd81dbd055d8da358fc4e8b3765b49c2622a2c9ae16e8ae64ed4b18f956290600090a150565b6000610e6882612989565b60025461010090046001600160a01b031681565b600081516041146123cb576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a6123e9868285856129da565b9695505050505050565b6001600160a01b03821661244e576040805162461bcd60e51b815260206004820152601960248201527f504f4f4c3a3a494e56414c49445f42454e454649434941525900000000000000604482015290519081900360640190fd5b806124a0576040805162461bcd60e51b815260206004820152601860248201527f504f4f4c3a3a494e56414c49445f5745495f414d4f554e540000000000000000604482015290519081900360640190fd5b5050565b60008060065442101580156124bb57506007544211155b91505090565b600f5460009060ff16156124ef576004546124e8906001600160a01b031686868686612231565b9050611fc3565b506001949350505050565b600080612506846119f8565b90506000612513856122c5565b905061252d600a82900a6125278685612b4f565b90612ba8565b95945050505050565b600082820183811015610e65576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6005546040516001600160a01b0390911690600090829084908381818185875af1925050503d80600081146125e1576040519150601f19603f3d011682016040523d82523d6000602084013e6125e6565b606091505b505090508061263c576040805162461bcd60e51b815260206004820152601c60248201527f504f4f4c3a3a57414c4c45545f5452414e534645525f4641494c454400000000604482015290519081900360640190fd5b505050565b60085461264e9083612536565b60085560095461265e9082612536565b600955336000908152600b602052604090205461267b9082612536565b336000908152600b6020526040902055600a546126989082612536565b600a555050565b600454600090611fc3906001600160a01b0316858585611f84565b600254604080517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b0385811660048301526024820185905291516101009093049091169163a9059cbb916044808201926020929091908290030181600087803b15801561272f57600080fd5b505af1158015612743573d6000803e3d6000fd5b505050506040513d602081101561275957600080fd5b50505050565b6000610e6583836040518060400160405280601f81526020017f536166654d6174683a207375627472616374696f6e20756e646572666c6f7700815250612bea565b604080517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152306024830152915184926000929084169163dd62ed3e91604480820192602092909190829003018186803b15801561280f57600080fd5b505afa158015612823573d6000803e3d6000fd5b505050506040513d602081101561283957600080fd5b5051905082811015612892576040805162461bcd60e51b815260206004820152601860248201527f504f4f4c3a3a544f4b454e5f4e4f545f415050524f5645440000000000000000604482015290519081900360640190fd5b5050505050565b600554604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b039283166024820152604481018490529051918416916323b872dd916064808201926020929091908290030181600087803b15801561272f57600080fd5b6001600160a01b03811661292157600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115612a3b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612d0c6022913960400191505060405180910390fd5b8360ff16601b1480612a5057508360ff16601c145b612a8b5760405162461bcd60e51b8152600401808060200182810382526022815260200180612d546022913960400191505060405180910390fd5b600060018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015612ae7573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661252d576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b600082612b5e57506000610e68565b82820282848281612b6b57fe5b0414610e655760405162461bcd60e51b8152600401808060200182810382526021815260200180612d766021913960400191505060405180910390fd5b6000610e6583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612c81565b60008184841115612c795760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612c3e578181015183820152602001612c26565b50505050905090810190601f168015612c6b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183612cd05760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315612c3e578181015183820152602001612c26565b506000838581612cdc57fe5b049594505050505056fe504f4f4c3a50555243484153455f414d4f554e545f4558434545445f414c4c4f57414e434545434453413a20696e76616c6964207369676e6174757265202773272076616c7565504f4f4c3a3a50555243484153455f414d4f554e545f4558434545445f414c4c4f57414e434545434453413a20696e76616c6964207369676e6174757265202776272076616c7565536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77504f4f4c3a3a50555243484153455f4d4554484f445f4e4f545f414c4c4f574544504f4f4c3a3a4e4f545f454e4f554748545f544f4b454e535f464f525f53414c45a264697066735822122074f80f81bc8d2a79b52c1ea99372925766de3f09f7125a311c72ddda639e288f64736f6c63430007010033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading