Contract 0xc2F44Bc508b6b50047a2F3AfB1984eD105070bE1 1

 
Txn Hash
Method
Block
From
To
Value
0xfdddd6870cae89e76097fdab1fe16e3114161856fcccaa44b8ff1a449a734871Withdraw(pending)2022-09-29 14:56:241 sec ago0x134cf20d79c38d4bb4b138c5d90399bf84f4b844 IN X2Y2: Presale0 Ether(Pending)(Pending)
0x96b33c578fc459fd7720981d91a88b5842ef40f7d209ad2c573a877ade6fe1f5Withdraw156397332022-09-29 14:56:1114 secs ago0x66543145689b11d2096c74c07278a3163e0d3756 IN  X2Y2: Presale0 Ether0.00300046 24.78471673
0x19622fd0fedb246cc5695689b55accfc2e4a1d7e69f33653eceb5cd38e34f95eWithdraw156397322022-09-29 14:55:5926 secs ago0x3b455e9055df5b5164cd30e548c48a0d3111fb33 IN  X2Y2: Presale0 Ether0.00252313 24.27006172
0x1a3211fe816be821b307076eab76a0d8c27d032db6aa47ad55273e171b822314Withdraw156397302022-09-29 14:55:3550 secs ago0x1e216a32693c029c6fb46d8ffa2b5de38caa121c IN  X2Y2: Presale0 Ether0.00317942 26.26303676
0xeef423a04edec0b2f3a881612cd510b7e77fbc03719e02fb0f1c1f1c8ff0468bWithdraw156397272022-09-29 14:54:591 min ago0x23c795ebea8e761042be7a10716745189c964efa IN  X2Y2: Presale0 Ether0.00291479 24.07707908
0x9f96e7b9140eab3f48dc356cd57791c49a8c41bce5cb4efac28d2583854fa19cWithdraw156397252022-09-29 14:54:351 min ago0x7b92d7a587d336c0b9902977d344aae8dcda54cb IN  X2Y2: Presale0 Ether0.00310785 25.6717867
0x994a6585d42c722befd1b64dba4fad8136dc79bce2d8bdadf7bfa25bb97572bbWithdraw156397232022-09-29 14:54:112 mins ago0x58f3edbfaacba21308ae1da3af75fdd916e9d169 IN  X2Y2: Presale0 Ether0.00278385 26.77791747
0x59fc3bd1df3fc09e488aead1ede721d8b19243695702eba7f74a5da155df7625Withdraw156397202022-09-29 14:53:352 mins ago0xc40f2d6942c1ddc86f1aac719974ec05a72e4a47 IN  X2Y2: Presale0 Ether0.00301926 24.94002596
0x289b514077b6e0b9168085686c555b1b7108a5f9d2f23c2858fb66dd9ceb17f5Withdraw156397182022-09-29 14:53:113 mins ago0xf02e2043505f772dced3b8fb5939faed77832248 IN  X2Y2: Presale0 Ether0.00326879 27.00119271
0xb44a5d6de6a07b925383f235e9640b50ef2894dc45633f49c36c142995cf6ebeWithdraw156397172022-09-29 14:52:593 mins ago0xb2dd594742834869be4101afd02c4ad820a2b211 IN  X2Y2: Presale0 Ether0.00292632 24.17231455
0xb6fecba5a2a7f48e89b37becb134af4df42e065b736500719e26d6aab95430a1Withdraw156397152022-09-29 14:52:353 mins ago0x4443846712d4e391d4ae8602a8db483963cbeb29 IN  X2Y2: Presale0 Ether0.00331564 27.38822318
0x11b7a4babc63774f201797ee1415531f702e0e5b559d6efab22d57bd798d178bWithdraw156397132022-09-29 14:52:114 mins ago0x4c133b6d70b81db0a136119dea719d2d2b2072aa IN  X2Y2: Presale0 Ether0.00264808 25.47191013
0xb97c24a92f615a61592d3bd3005967220493f611884f2f57bf2f10fc24f24ab7Withdraw156397122022-09-29 14:51:594 mins ago0xca64e0ad25466f44b5442a377bb10f02b75fad11 IN  X2Y2: Presale0 Ether0.00313964 25.9343871
0x83b2f77c0dff2c5fb71dd2d63b77806afd106c82f4936682d7d1b3b3423f7a20Withdraw156397112022-09-29 14:51:474 mins ago0x1d331c8286abac257ee9bdceb95de6a95fdca938 IN  X2Y2: Presale0 Ether0.00295458 24.40572273
0xefe5bcce7261b1c90bddbc0cf349bd481b22d81165f5f5071a842e9c1999e28bWithdraw156397092022-09-29 14:51:235 mins ago0x799a792d92b420180b6db82b26e3280e0ad3f86a IN  X2Y2: Presale0 Ether0.00295506 24.40975997
0x070d4370797cf12a2a6bc9a11d03aa54fd1168aaa76ee9b58bbdb95aa200f6e9Withdraw156397072022-09-29 14:50:595 mins ago0xce63c766500a8ad65bd3e6a31e829fc22b79e58a IN  X2Y2: Presale0 Ether0.0030235 24.97507618
0x9542f8854349edda69ea4ae52b8dd3395b36e4f02d4dd611886cbcdedfebd318Withdraw156397032022-09-29 14:50:116 mins ago0x4feeac0089abefc508d853542a3564d7d3e8c70e IN  X2Y2: Presale0 Ether0.00367391 30.34760714
0x619bd886a66a1c13f0ad5d3ed4ca94911d2c62e008a18bbf6c670f9bef99c20fWithdraw156396782022-09-29 14:45:1111 mins ago0xab910b0894aaffe07aab1e92e770b7840acdfd3c IN  X2Y2: Presale0 Ether0.00381228 31.49065235
0xbe01564bbf808f30ee59ea05979b13f7ddf6d31939d61af2689fe8d2fb668bb5Withdraw156396772022-09-29 14:44:5911 mins ago0x697056cb19337fc938d22020e00259e8893d43f8 IN  X2Y2: Presale0 Ether0.00330477 31.78859316
0x9b547132901f8fb705739935b800f98f6c6baa74f4023ef07565333b64491d7dWithdraw156396752022-09-29 14:44:3511 mins ago0xa1d1d2026c132f8dd81ad874433bb8c04dc4428d IN  X2Y2: Presale0 Ether0.00392011 32.38133121
0x8d8c2cd05c9efc2514b95f9caa995fe61d1f2eb6523c286bcbd2c07f301cc356Withdraw156396732022-09-29 14:44:1112 mins ago0xaf8931d858a46b1fa53b7da59f4baac18db20c0f IN  X2Y2: Presale0 Ether0.00382445 31.59117968
0x04bcfa22e4b8be6ea79688d3bcfced5503db6e32a7e29026bc1b7912d775704eWithdraw156396722022-09-29 14:43:5912 mins ago0x3077f5e3ba4073480f73401be4b3dc56182bfe9d IN  X2Y2: Presale0 Ether0.00342013 28.25131362
0x21f6eb988312b2d69dd86add718ed63440334f33c9b5eb9e7b22f710a13e9db0Withdraw156396702022-09-29 14:43:3512 mins ago0xe1efee46fc46ab82683b84acd2a5df89cb798f9d IN  X2Y2: Presale0 Ether0.00329035 27.17928814
0x8a51c8c4678b5d453905012d5b64f383c8288980e2eb9c463e014200f995edd4Withdraw156396682022-09-29 14:43:1113 mins ago0x443d081b6804c85fa3b82cc1287c6251b59d34ae IN  X2Y2: Presale0 Ether0.00293794 28.26003106
0x6257d1e76a3dd356c4361a837e4d274cf9e245a2590f29c2bca91f227744ed38Withdraw156387852022-09-29 11:44:353 hrs 11 mins ago0x181ebbd8d7f772b37c1a238234e13edf3661cf27 IN  X2Y2: Presale0 Ether0.00114125 9.42708402
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x06ef5a1d8dbfb0e7d54934a186c59606cd04dcf8b49849fdc94317ccb54bd68b142085512022-02-15 4:21:13226 days 10 hrs ago X2Y2: PresaleX2Y2: Deployer1,500 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Presale

Compiler Version
v0.8.11+commit.d7f03943

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 10 : Presale.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v2;

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

contract Presale is Ownable, ReentrancyGuard, ITokenStaked {
    using SafeERC20 for IERC20;

    enum SalePhase {
        Sale,
        SaleOver,
        Staking
    }

    struct UserInfo {
        uint256 tokensClaimed;
        uint256 rewardDebt;
        bool hasShare;
    }

    uint256 public immutable safetyBufferInBlocks;

    IERC20 public immutable x2y2Token; // x2y2
    IERC20 public immutable rewardToken; // weth

    // staking period in blocks
    uint256 public immutable STAKING_PERIOD_IN_BLOCKS;
    uint256 public immutable stakingStartBlock;
    uint256 public immutable stakingEndBlock;

    uint256 public immutable TOTAL_TOKEN_AMOUNT;
    uint256 public immutable TOTAL_RAISING_AMOUNT;
    uint256 public immutable MAX_SHARES;
    uint256 public immutable PRICE_PER_SHARE;
    uint256 public immutable TOKENS_PER_SHARE;

    SalePhase public currentPhase;

    // total shares sold (length of userInfo)
    uint256 public totalShareSold;
    // share * TOKENS_PER_SHARE
    uint256 public totalTokensSold;

    // weth harvested by user
    uint256 public totalRewardDistributed;
    // withdrawn reward token
    uint256 public tokenRewardTreasuryWithdrawn;

    mapping(address => bool) public signers;
    mapping(address => UserInfo) public userInfo;

    event SignerUpdate(address signer, bool isRemoval);
    event Deposit(address indexed user);
    event Harvest(address indexed user, uint256 amount);
    event NewPhase(SalePhase newSalePhase);
    event Withdraw(address indexed user, uint256 amount);
    event EmergencyWithdraw(address indexed user, uint256 amount);
    event TreasuryWithdraw(uint256 amount);

    constructor(
        IERC20 _x2y2Token,
        IERC20 _rewardToken,
        uint256 _stakingStartBlock,
        uint256 _stakingEndBlock,
        address[] memory _signers
    ) {
        x2y2Token = (_x2y2Token);
        rewardToken = (_rewardToken);

        for (uint256 i = 0; i < _signers.length; i++) {
            signers[_signers[i]] = true;
            emit SignerUpdate(_signers[i], false);
        }

        // 15M token presale
        TOTAL_TOKEN_AMOUNT = 15_000_000 ether;
        TOTAL_RAISING_AMOUNT = 1500 ether;
        MAX_SHARES = 1000;
        PRICE_PER_SHARE = TOTAL_RAISING_AMOUNT / MAX_SHARES;
        TOKENS_PER_SHARE = TOTAL_TOKEN_AMOUNT / MAX_SHARES;

        STAKING_PERIOD_IN_BLOCKS = _stakingEndBlock - _stakingStartBlock;
        stakingStartBlock = _stakingStartBlock;
        stakingEndBlock = _stakingEndBlock;

        currentPhase = SalePhase.Sale;
        safetyBufferInBlocks = 30 * 6500; // ~ 1 month
    }

    function getTotalStaked() external view override returns (uint256) {
        if (block.number >= stakingStartBlock && block.number < stakingEndBlock) {
            return totalTokensSold;
        }
        return 0;
    }

    function updateSigners(address[] memory toAdd, address[] memory toRemove) public onlyOwner {
        for (uint256 i = 0; i < toAdd.length; i++) {
            signers[toAdd[i]] = true;
            emit SignerUpdate(toAdd[i], false);
        }
        for (uint256 i = 0; i < toRemove.length; i++) {
            delete signers[toRemove[i]];
            emit SignerUpdate(toRemove[i], true);
        }
    }

    function deposit(
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable nonReentrant {
        require(currentPhase == SalePhase.Sale, 'Deposit: Phase must be Sale');
        require(!userInfo[msg.sender].hasShare, 'Deposit: Has deposited');
        require(msg.value == PRICE_PER_SHARE, 'Deposit: Wrong amount');
        require(totalShareSold < MAX_SHARES, 'Deposit: Not raising anymore');

        address signer = ECDSA.recover(keccak256(abi.encode(msg.sender)), v, r, s);
        require(signers[signer], 'Deposit: Signature error');

        userInfo[msg.sender].hasShare = true;

        totalShareSold += 1;
        totalTokensSold += TOKENS_PER_SHARE;

        emit Deposit(msg.sender);
    }

    function _totalReward() internal view returns (uint256) {
        return
            tokenRewardTreasuryWithdrawn +
            totalRewardDistributed +
            rewardToken.balanceOf(address(this));
    }

    function _pendingReward(address user) internal view returns (uint256, uint256) {
        uint256 totalReward = _totalReward();
        uint256 userDebt = userInfo[user].rewardDebt;
        uint256 userTokensLeft = TOKENS_PER_SHARE - userInfo[user].tokensClaimed;

        uint256 theoreticalReward = totalReward / totalShareSold;
        uint256 userReward = ((theoreticalReward - userDebt) * userTokensLeft) / TOKENS_PER_SHARE;

        return (userReward, theoreticalReward);
    }

    function pendingRewards(address[] memory users) external view returns (uint256) {
        uint256 total;
        for (uint256 i = 0; i < users.length; i++) {
            (uint256 pending, uint256 _debt) = _pendingReward(users[i]);
            total += pending;
        }
        return total;
    }

    function pendingReward(address user) external view returns (uint256) {
        (uint256 _amount, uint256 _debt) = _pendingReward(user);
        return _amount;
    }

    function _pendingTokens(address user) internal view returns (uint256) {
        uint256 claimed = userInfo[user].tokensClaimed;

        if (block.number < stakingStartBlock) {
            return 0;
        } else if (block.number >= stakingEndBlock) {
            return TOKENS_PER_SHARE - claimed;
        }

        uint256 passingBlocks = block.number - stakingStartBlock;
        uint256 unlockedAmount = (TOKENS_PER_SHARE * passingBlocks) / STAKING_PERIOD_IN_BLOCKS;

        return unlockedAmount - claimed;
    }

    function pendingTokens(address user) external view returns (uint256) {
        return _pendingTokens(user);
    }

    function _harvest(address user) internal returns (uint256) {
        (uint256 _pending, uint256 _debt) = _pendingReward(user);

        if (_pending > 0) {
            totalRewardDistributed += _pending;
            userInfo[user].rewardDebt = _debt;
            rewardToken.safeTransfer(user, _pending);
            emit Harvest(user, _pending);
        }
        return _pending;
    }

    function harvest() external nonReentrant {
        require(currentPhase == SalePhase.Staking, 'Harvest: Phase must be Staking');
        require(userInfo[msg.sender].hasShare, 'Harvest: User not eligible');

        require(_harvest(msg.sender) > 0, 'Harvest: No pending reward');
    }

    function withdraw() external nonReentrant {
        require(currentPhase == SalePhase.Staking, 'Withdraw: Phase must be Staking');
        require(userInfo[msg.sender].hasShare, 'Withdraw: User not eligible');

        uint256 pending = _pendingTokens(msg.sender);

        require(pending > 0, 'Withdraw: No pending token');

        _harvest(msg.sender);

        userInfo[msg.sender].tokensClaimed += pending;
        x2y2Token.safeTransfer(msg.sender, pending);

        emit Withdraw(msg.sender, pending);
    }

    function emergencyWithdraw() external nonReentrant {
        require(block.number >= stakingEndBlock, 'Withdraw: Too early');
        require(currentPhase == SalePhase.Staking, 'Withdraw: Phase must be Staking');
        require(userInfo[msg.sender].hasShare, 'Withdraw: User not eligible');

        uint256 amount = TOKENS_PER_SHARE - userInfo[msg.sender].tokensClaimed;
        require(amount > 0, 'Withdraw: No pending token');

        x2y2Token.safeTransfer(msg.sender, amount);
        userInfo[msg.sender].tokensClaimed = TOKENS_PER_SHARE;
        emit EmergencyWithdraw(msg.sender, amount);
    }

    // withdraw presale ETH & remaining token, update to saleover
    function withdrawPresale() external onlyOwner nonReentrant {
        require(currentPhase == SalePhase.Sale, 'Owner: Phase must be Sale');

        uint256 balance = address(this).balance;
        Address.sendValue(payable(msg.sender), balance);

        uint256 returnAmount = x2y2Token.balanceOf(address(this)) -
            totalShareSold *
            TOKENS_PER_SHARE;
        if (returnAmount > 0) {
            x2y2Token.safeTransfer(msg.sender, returnAmount);
        }

        currentPhase = SalePhase.SaleOver;
        emit NewPhase(SalePhase.SaleOver);
    }

    function updatePhaseToStaking() external onlyOwner nonReentrant {
        require(currentPhase == SalePhase.SaleOver, 'Owner: Phase must be SaleOver');
        currentPhase = SalePhase.Staking;
        emit NewPhase(SalePhase.Staking);
    }

    function treasuryWithdraw(uint256 amount) external onlyOwner nonReentrant {
        require(
            block.number > stakingEndBlock + safetyBufferInBlocks,
            'Owner: staking have not ended yet'
        );
        require(amount > 0, 'Owner: withdraw > 0');

        tokenRewardTreasuryWithdrawn += amount;
        rewardToken.safeTransfer(msg.sender, amount);
        emit TreasuryWithdraw(amount);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 3 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 4 of 10 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @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 Message, created from `s`. 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(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @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 5 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

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 6 of 10 : ITokenStaked.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ITokenStaked {
    function getTotalStaked() external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

File 8 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 9 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

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 10 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

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": 100
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_x2y2Token","type":"address"},{"internalType":"contract IERC20","name":"_rewardToken","type":"address"},{"internalType":"uint256","name":"_stakingStartBlock","type":"uint256"},{"internalType":"uint256","name":"_stakingEndBlock","type":"uint256"},{"internalType":"address[]","name":"_signers","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Harvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"enum Presale.SalePhase","name":"newSalePhase","type":"uint8"}],"name":"NewPhase","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":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bool","name":"isRemoval","type":"bool"}],"name":"SignerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TreasuryWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_SHARES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_PER_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STAKING_PERIOD_IN_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKENS_PER_SHARE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_RAISING_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_TOKEN_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPhase","outputs":[{"internalType":"enum Presale.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalStaked","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"pendingReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"pendingTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"safetyBufferInBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"signers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingEndBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"stakingStartBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenRewardTreasuryWithdrawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShareSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokensSold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"treasuryWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePhaseToStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"toAdd","type":"address[]"},{"internalType":"address[]","name":"toRemove","type":"address[]"}],"name":"updateSigners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"tokensClaimed","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"bool","name":"hasShare","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"x2y2Token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6101e06040523480156200001257600080fd5b5060405162002b2138038062002b21833981016040819052620000359162000256565b6200004033620001c5565b600180556001600160a01b0380861660a052841660c05260005b815181101562000140576001600760008484815181106200007f576200007f6200036b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507fc648f6265408cc54c0dc26d24ba51dfc9f35ce1a63baa2228f65d93aaf11cc67828281518110620000f457620000f46200036b565b60200260200101516000604051620001239291906001600160a01b039290921682521515602082015260400190565b60405180910390a180620001378162000397565b9150506200005a565b506a0c685fa11e01ec6f00000061014052685150ae84a8cdf000006101608190526103e86101808190526200017591620003b5565b6101a05261018051610140516200018d9190620003b5565b6101c0526200019d8383620003d8565b60e05250610100919091526101205250506002805460ff191690556202f9b8608052620003f2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200022b57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b8051620002518162000215565b919050565b600080600080600060a086880312156200026f57600080fd5b85516200027c8162000215565b80955050602080870151620002918162000215565b6040880151606089015160808a015192975090955093506001600160401b0380821115620002be57600080fd5b818901915089601f830112620002d357600080fd5b815181811115620002e857620002e86200022e565b8060051b604051601f19603f830116810181811085821117156200031057620003106200022e565b60405291825284820192508381018501918c8311156200032f57600080fd5b938501935b828510156200035857620003488562000244565b8452938501939285019262000334565b8096505050505050509295509295909350565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415620003ae57620003ae62000381565b5060010190565b600082620003d357634e487b7160e01b600052601260045260246000fd5b500490565b600082821015620003ed57620003ed62000381565b500390565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516125f26200052f600039600081816104bc01528181610f38015281816113580152818161154d015281816115da01528181611759015281816117db01528181611afd0152611b3901526000818161057901526111ac01526000818161035401526112130152600061046601526000610689015260008181610218015281816106da01528181610d280152818161146d015261172e0152600081816105e1015281816106af015281816116fd015261178b0152600081816102bf01526117b601526000818161065501528181610e0f015281816118730152611f0a0152600081816105ad01528181610afb01528181610f7b0152818161101001526115a00152600081816105100152610d0701526125f26000f3fe6080604052600436106101ae5760003560e01c80637267994e116100ed578063ce9d16fe11610090578063ce9d16fe14610532578063db2e21bc14610552578063df1fb71314610567578063ebde5ee61461059b578063ec2fc051146105cf578063f2fde38b14610603578063f40f0f5214610623578063f7c618c114610643578063fc9768271461067757600080fd5b80637267994e146103eb578063736c0d5b146103fe5780638337c3c01461043e5780638da1a403146104545780638da5cb5b14610488578063b9bd4730146104aa578063c031a66f146104de578063ca90c8c6146104fe57600080fd5b8063350b236911610155578063350b23691461030d5780633ccfd60b1461032d5780633e8ff57b146103425780634641257d1461037657806363b201171461038b57806365267139146103a15780636df5ee2b146103c1578063715018a6146103d657600080fd5b8063055ad42e146101b35780630917e776146101e35780630a122c8a14610206578063194bf5541461023a5780631959a002146102515780631c9b1736146102ad5780632ce9785f146102e157806330188ee8146102f7575b600080fd5b3480156101bf57600080fd5b506002546101cd9060ff1681565b6040516101da919061212d565b60405180910390f35b3480156101ef57600080fd5b506101f86106ab565b6040519081526020016101da565b34801561021257600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561024657600080fd5b5061024f61070e565b005b34801561025d57600080fd5b5061029061026c366004612171565b60086020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101da565b3480156102b957600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b3480156102ed57600080fd5b506101f860065481565b34801561030357600080fd5b506101f860055481565b34801561031957600080fd5b5061024f610328366004612239565b61081c565b34801561033957600080fd5b5061024f610a04565b34801561034e57600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561038257600080fd5b5061024f610b5f565b34801561039757600080fd5b506101f860045481565b3480156103ad57600080fd5b5061024f6103bc36600461229d565b610cab565b3480156103cd57600080fd5b5061024f610e70565b3480156103e257600080fd5b5061024f611085565b61024f6103f93660046122b6565b6110c0565b34801561040a57600080fd5b5061042e610419366004612171565b60076020526000908152604090205460ff1681565b60405190151581526020016101da565b34801561044a57600080fd5b506101f860035481565b34801561046057600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561049457600080fd5b5061049d6113c2565b6040516101da91906122f1565b3480156104b657600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b3480156104ea57600080fd5b506101f86104f9366004612171565b6113d1565b34801561050a57600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561053e57600080fd5b506101f861054d366004612305565b6113e2565b34801561055e57600080fd5b5061024f611443565b34801561057357600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b3480156105a757600080fd5b5061049d7f000000000000000000000000000000000000000000000000000000000000000081565b3480156105db57600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b34801561060f57600080fd5b5061024f61061e366004612171565b61162b565b34801561062f57600080fd5b506101f861063e366004612171565b6116cb565b34801561064f57600080fd5b5061049d7f000000000000000000000000000000000000000000000000000000000000000081565b34801561068357600080fd5b506101f87f000000000000000000000000000000000000000000000000000000000000000081565b60007f000000000000000000000000000000000000000000000000000000000000000043101580156106fc57507f000000000000000000000000000000000000000000000000000000000000000043105b15610708575060045490565b50600090565b336107176113c2565b6001600160a01b0316146107465760405162461bcd60e51b815260040161073d9061233a565b60405180910390fd5b600260015414156107695760405162461bcd60e51b815260040161073d9061236f565b600260019081556002805460ff169081111561078757610787612117565b146107d45760405162461bcd60e51b815260206004820152601d60248201527f4f776e65723a205068617365206d7573742062652053616c654f766572000000604482015260640161073d565b6002805460ff1916811781556040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b939161080e9161212d565b60405180910390a160018055565b336108256113c2565b6001600160a01b03161461084b5760405162461bcd60e51b815260040161073d9061233a565b60005b82518110156109295760016007600085848151811061086f5761086f6123a6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055507fc648f6265408cc54c0dc26d24ba51dfc9f35ce1a63baa2228f65d93aaf11cc678382815181106108e1576108e16123a6565b6020026020010151600060405161090f9291906001600160a01b039290921682521515602082015260400190565b60405180910390a180610921816123d2565b91505061084e565b5060005b81518110156109ff576007600083838151811061094c5761094c6123a6565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81549060ff02191690557fc648f6265408cc54c0dc26d24ba51dfc9f35ce1a63baa2228f65d93aaf11cc678282815181106109b7576109b76123a6565b602002602001015160016040516109e59291906001600160a01b039290921682521515602082015260400190565b60405180910390a1806109f7816123d2565b91505061092d565b505050565b60026001541415610a275760405162461bcd60e51b815260040161073d9061236f565b60026001819055805460ff1681811115610a4357610a43612117565b14610a605760405162461bcd60e51b815260040161073d906123ed565b3360009081526008602052604090206002015460ff16610a925760405162461bcd60e51b815260040161073d90612424565b6000610a9d336116e2565b905060008111610abf5760405162461bcd60e51b815260040161073d9061245b565b610ac83361181e565b503360009081526008602052604081208054839290610ae8908490612492565b90915550610b2290506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836118e4565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364906020015b60405180910390a25060018055565b60026001541415610b825760405162461bcd60e51b815260040161073d9061236f565b60026001819055805460ff1681811115610b9e57610b9e612117565b14610beb5760405162461bcd60e51b815260206004820152601e60248201527f486172766573743a205068617365206d757374206265205374616b696e670000604482015260640161073d565b3360009081526008602052604090206002015460ff16610c4d5760405162461bcd60e51b815260206004820152601a60248201527f486172766573743a2055736572206e6f7420656c696769626c65000000000000604482015260640161073d565b6000610c583361181e565b11610ca55760405162461bcd60e51b815260206004820152601a60248201527f486172766573743a204e6f2070656e64696e6720726577617264000000000000604482015260640161073d565b60018055565b33610cb46113c2565b6001600160a01b031614610cda5760405162461bcd60e51b815260040161073d9061233a565b60026001541415610cfd5760405162461bcd60e51b815260040161073d9061236f565b6002600155610d4c7f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000612492565b4311610da45760405162461bcd60e51b815260206004820152602160248201527f4f776e65723a207374616b696e672068617665206e6f7420656e6465642079656044820152601d60fa1b606482015260840161073d565b60008111610dea5760405162461bcd60e51b815260206004820152601360248201527204f776e65723a207769746864726177203e203606c1b604482015260640161073d565b8060066000828254610dfc9190612492565b90915550610e3690506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836118e4565b6040518181527ff1b96db22d7f3eb7ef19d9ddbc4d63be139f5d014216d4e42107e10cfd4ff16c9060200160405180910390a15060018055565b33610e796113c2565b6001600160a01b031614610e9f5760405162461bcd60e51b815260040161073d9061233a565b60026001541415610ec25760405162461bcd60e51b815260040161073d9061236f565b600260015560006002805460ff1690811115610ee057610ee0612117565b14610f295760405162461bcd60e51b81526020600482015260196024820152784f776e65723a205068617365206d7573742062652053616c6560381b604482015260640161073d565b47610f343382611936565b60007f0000000000000000000000000000000000000000000000000000000000000000600354610f6491906124aa565b6040516370a0823160e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610fb09030906004016122f1565b602060405180830381865afa158015610fcd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff191906124c9565b610ffb91906124e2565b90508015611037576110376001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836118e4565b6002805460ff191660019081179091556040517f31f72b44f546d9e7eaec13f65636997665e15f134a81c82924f568f5c0d07b93916110759161212d565b60405180910390a1505060018055565b3361108e6113c2565b6001600160a01b0316146110b45760405162461bcd60e51b815260040161073d9061233a565b6110be6000611a4f565b565b600260015414156110e35760405162461bcd60e51b815260040161073d9061236f565b600260015560006002805460ff169081111561110157611101612117565b1461114e5760405162461bcd60e51b815260206004820152601b60248201527f4465706f7369743a205068617365206d7573742062652053616c650000000000604482015260640161073d565b3360009081526008602052604090206002015460ff16156111aa5760405162461bcd60e51b815260206004820152601660248201527511195c1bdcda5d0e8812185cc819195c1bdcda5d195960521b604482015260640161073d565b7f000000000000000000000000000000000000000000000000000000000000000034146112115760405162461bcd60e51b815260206004820152601560248201527411195c1bdcda5d0e8815dc9bdb99c8185b5bdd5b9d605a1b604482015260640161073d565b7f0000000000000000000000000000000000000000000000000000000000000000600354106112825760405162461bcd60e51b815260206004820152601c60248201527f4465706f7369743a204e6f742072616973696e6720616e796d6f726500000000604482015260640161073d565b60006112b63360405160200161129891906122f1565b60405160208183030381529060405280519060200120858585611a9f565b6001600160a01b03811660009081526007602052604090205490915060ff1661131c5760405162461bcd60e51b81526020600482015260186024820152772232b837b9b4ba1d1029b4b3b730ba3ab9329032b93937b960411b604482015260640161073d565b336000908152600860205260408120600201805460ff19166001908117909155600380549192909161134f908490612492565b925050819055507f0000000000000000000000000000000000000000000000000000000000000000600460008282546113889190612492565b909155505060405133907f8ce0bd46ec50cf39f0d0ea8686a686eb226af5796dcda4231b26fb84b5ef123490600090a25050600180555050565b6000546001600160a01b031690565b60006113dc826116e2565b92915050565b60008060005b835181101561143c57600080611416868481518110611409576114096123a6565b6020026020010151611ac7565b90925090506114258285612492565b935050508080611434906123d2565b9150506113e8565b5092915050565b600260015414156114665760405162461bcd60e51b815260040161073d9061236f565b60026001557f00000000000000000000000000000000000000000000000000000000000000004310156114d15760405162461bcd60e51b815260206004820152601360248201527257697468647261773a20546f6f206561726c7960681b604482015260640161073d565b6002805460ff16818111156114e8576114e8612117565b146115055760405162461bcd60e51b815260040161073d906123ed565b3360009081526008602052604090206002015460ff166115375760405162461bcd60e51b815260040161073d90612424565b33600090815260086020526040812054611571907f00000000000000000000000000000000000000000000000000000000000000006124e2565b9050600081116115935760405162461bcd60e51b815260040161073d9061245b565b6115c76001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836118e4565b33600081815260086020526040908190207f00000000000000000000000000000000000000000000000000000000000000009055517f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd969590610b509084815260200190565b336116346113c2565b6001600160a01b03161461165a5760405162461bcd60e51b815260040161073d9061233a565b6001600160a01b0381166116bf5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161073d565b6116c881611a4f565b50565b60008060006116d984611ac7565b50949350505050565b6001600160a01b0381166000908152600860205260408120547f000000000000000000000000000000000000000000000000000000000000000043101561172c5750600092915050565b7f000000000000000000000000000000000000000000000000000000000000000043106117845761177d817f00000000000000000000000000000000000000000000000000000000000000006124e2565b9392505050565b60006117b07f0000000000000000000000000000000000000000000000000000000000000000436124e2565b905060007f00000000000000000000000000000000000000000000000000000000000000006117ff837f00000000000000000000000000000000000000000000000000000000000000006124aa565b61180991906124f9565b905061181583826124e2565b95945050505050565b600080600061182c84611ac7565b9092509050811561143c5781600560008282546118499190612492565b90915550506001600160a01b03808516600090815260086020526040902060010182905561189a907f00000000000000000000000000000000000000000000000000000000000000001685846118e4565b836001600160a01b03167fc9695243a805adb74c91f28311176c65b417e842d5699893cef56d18bfa48cba836040516118d591815260200190565b60405180910390a25092915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526109ff908490611b85565b804710156119865760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161073d565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146119d3576040519150601f19603f3d011682016040523d82523d6000602084013e6119d8565b606091505b50509050806109ff5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161073d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000611ab087878787611c57565b91509150611abd81611d3a565b5095945050505050565b6000806000611ad4611ef0565b6001600160a01b03851660009081526008602052604081206001810154905492935091611b21907f00000000000000000000000000000000000000000000000000000000000000006124e2565b9050600060035484611b3391906124f9565b905060007f000000000000000000000000000000000000000000000000000000000000000083611b6386856124e2565b611b6d91906124aa565b611b7791906124f9565b989197509095505050505050565b6000611bda826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611f9f9092919063ffffffff16565b8051909150156109ff5780806020019051810190611bf8919061251b565b6109ff5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161073d565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b03831115611c845750600090506003611d31565b8460ff16601b14158015611c9c57508460ff16601c14155b15611cad5750600090506004611d31565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611d01573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611d2a57600060019250925050611d31565b9150600090505b94509492505050565b6000816004811115611d4e57611d4e612117565b1415611d575750565b6001816004811115611d6b57611d6b612117565b1415611db45760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b604482015260640161073d565b6002816004811115611dc857611dc8612117565b1415611e165760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161073d565b6003816004811115611e2a57611e2a612117565b1415611e835760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161073d565b6004816004811115611e9757611e97612117565b14156116c85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161073d565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190611f3f9030906004016122f1565b602060405180830381865afa158015611f5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f8091906124c9565b600554600654611f909190612492565b611f9a9190612492565b905090565b6060611fae8484600085611fb6565b949350505050565b6060824710156120175760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161073d565b843b6120655760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161073d565b600080866001600160a01b03168587604051612081919061256d565b60006040518083038185875af1925050503d80600081146120be576040519150601f19603f3d011682016040523d82523d6000602084013e6120c3565b606091505b50915091506120d38282866120de565b979650505050505050565b606083156120ed57508161177d565b8251156120fd5782518084602001fd5b8160405162461bcd60e51b815260040161073d9190612589565b634e487b7160e01b600052602160045260246000fd5b602081016003831061214f57634e487b7160e01b600052602160045260246000fd5b91905290565b80356001600160a01b038116811461216c57600080fd5b919050565b60006020828403121561218357600080fd5b61177d82612155565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126121b357600080fd5b8135602067ffffffffffffffff808311156121d0576121d061218c565b8260051b604051601f19603f830116810181811084821117156121f5576121f561218c565b60405293845285810183019383810192508785111561221357600080fd5b83870191505b848210156120d35761222a82612155565b83529183019190830190612219565b6000806040838503121561224c57600080fd5b823567ffffffffffffffff8082111561226457600080fd5b612270868387016121a2565b9350602085013591508082111561228657600080fd5b50612293858286016121a2565b9150509250929050565b6000602082840312156122af57600080fd5b5035919050565b6000806000606084860312156122cb57600080fd5b833560ff811681146122dc57600080fd5b95602085013595506040909401359392505050565b6001600160a01b0391909116815260200190565b60006020828403121561231757600080fd5b813567ffffffffffffffff81111561232e57600080fd5b611fae848285016121a2565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156123e6576123e66123bc565b5060010190565b6020808252601f908201527f57697468647261773a205068617365206d757374206265205374616b696e6700604082015260600190565b6020808252601b908201527f57697468647261773a2055736572206e6f7420656c696769626c650000000000604082015260600190565b6020808252601a908201527f57697468647261773a204e6f2070656e64696e6720746f6b656e000000000000604082015260600190565b600082198211156124a5576124a56123bc565b500190565b60008160001904831182151516156124c4576124c46123bc565b500290565b6000602082840312156124db57600080fd5b5051919050565b6000828210156124f4576124f46123bc565b500390565b60008261251657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561252d57600080fd5b8151801515811461177d57600080fd5b60005b83811015612558578181015183820152602001612540565b83811115612567576000848401525b50505050565b6000825161257f81846020870161253d565b9190910192915050565b60208152600082518060208401526125a881604085016020870161253d565b601f01601f1916919091016040019291505056fea26469706673582212200156799ca4c281d83cfb56358298509d08fafcf9b6a142c89452a450c118d3be64736f6c634300080b00330000000000000000000000001e4ede388cbc9f4b5c79681b7f94d36a11abebc9000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000d8e0680000000000000000000000000000000000000000000000000000000000fc950800000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009b31b0bb3570fd3d62e03e1fedc8854595250071

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

0000000000000000000000001e4ede388cbc9f4b5c79681b7f94d36a11abebc9000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000d8e0680000000000000000000000000000000000000000000000000000000000fc950800000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009b31b0bb3570fd3d62e03e1fedc8854595250071

-----Decoded View---------------
Arg [0] : _x2y2Token (address): 0x1E4EDE388cbc9F4b5c79681B7f94d36a11ABEBC9
Arg [1] : _rewardToken (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _stakingStartBlock (uint256): 14213224
Arg [3] : _stakingEndBlock (uint256): 16553224
Arg [4] : _signers (address[]): 0x9b31b0BB3570Fd3d62e03E1fEDC8854595250071

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000001e4ede388cbc9f4b5c79681b7f94d36a11abebc9
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 0000000000000000000000000000000000000000000000000000000000d8e068
Arg [3] : 0000000000000000000000000000000000000000000000000000000000fc9508
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [6] : 0000000000000000000000009b31b0bb3570fd3d62e03e1fedc8854595250071


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.