ETH Price: $3,611.84 (+4.80%)
 
Transaction Hash
Method
Block
From
To
Emergency192933452024-02-23 22:43:11315 days ago1708728191IN
0x5F91Aa0e...215d48980
0 ETH0.0007172528.41947007
Emergency Withdr...171673602023-05-01 17:08:11613 days ago1682960891IN
0x5F91Aa0e...215d48980
0 ETH0.0072079483.42524151
Emergency Withdr...171574052023-04-30 7:33:47614 days ago1682840027IN
0x5F91Aa0e...215d48980
0 ETH0.0029607834.44578371
Emergency Withdr...170348482023-04-12 22:23:11632 days ago1681338191IN
0x5F91Aa0e...215d48980
0 ETH0.0016672919.3973118
Emergency Withdr...170306802023-04-12 8:16:11632 days ago1681287371IN
0x5F91Aa0e...215d48980
0 ETH0.0020797924.19634433
Emergency Withdr...170296382023-04-12 4:42:59632 days ago1681274579IN
0x5F91Aa0e...215d48980
0 ETH0.0021626425.16022148
Emergency Withdr...170283442023-04-12 0:20:59633 days ago1681258859IN
0x5F91Aa0e...215d48980
0 ETH0.0018733621.79475464
0x746f2065170247852023-04-11 12:13:59633 days ago1681215239IN
0x5F91Aa0e...215d48980
0 ETH0.0014253119.929496
Emergency Withdr...170247022023-04-11 11:57:11633 days ago1681214231IN
0x5F91Aa0e...215d48980
0 ETH0.001787520.68875834
Emergency Withdr...170231672023-04-11 6:44:47633 days ago1681195487IN
0x5F91Aa0e...215d48980
0 ETH0.0021512820.87507257
Emergency Withdr...170230092023-04-11 6:12:59633 days ago1681193579IN
0x5F91Aa0e...215d48980
0 ETH0.0017303220.02685521
Emergency Withdr...170196752023-04-10 18:53:11634 days ago1681152791IN
0x5F91Aa0e...215d48980
0 ETH0.0019921323.05706238
Deposit170196712023-04-10 18:52:23634 days ago1681152743IN
0x5F91Aa0e...215d48980
0 ETH0.0017347122.36288889
Deposit170186112023-04-10 15:15:11634 days ago1681139711IN
0x5F91Aa0e...215d48980
0 ETH0.0035548237.54922374
Withdraw170183752023-04-10 14:26:23634 days ago1681136783IN
0x5F91Aa0e...215d48980
0 ETH0.0039979826.58144833
Emergency Withdr...170178452023-04-10 12:38:35634 days ago1681130315IN
0x5F91Aa0e...215d48980
0 ETH0.0020670324.0478554
Deposit170175582023-04-10 11:38:59634 days ago1681126739IN
0x5F91Aa0e...215d48980
0 ETH0.0024626718.43113409
Deposit170173932023-04-10 11:05:47634 days ago1681124747IN
0x5F91Aa0e...215d48980
0 ETH0.001437217.8821282
Deposit170171412023-04-10 10:14:35634 days ago1681121675IN
0x5F91Aa0e...215d48980
0 ETH0.0019742520.25483305
Emergency Withdr...170171162023-04-10 10:09:35634 days ago1681121375IN
0x5F91Aa0e...215d48980
0 ETH0.0015659918.21874445
Deposit170170832023-04-10 10:02:59634 days ago1681120979IN
0x5F91Aa0e...215d48980
0 ETH0.0014255318.37713905
Deposit170169652023-04-10 9:38:47634 days ago1681119527IN
0x5F91Aa0e...215d48980
0 ETH0.0019236920.31979247
Deposit170169122023-04-10 9:27:59634 days ago1681118879IN
0x5F91Aa0e...215d48980
0 ETH0.0015067519.42419046
Deposit170168022023-04-10 9:05:11634 days ago1681117511IN
0x5F91Aa0e...215d48980
0 ETH0.0020120520.64255735
Withdraw170167732023-04-10 8:59:23634 days ago1681117163IN
0x5F91Aa0e...215d48980
0 ETH0.0031131520.70011684
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
170196712023-04-10 18:52:23634 days ago1681152743
0x5F91Aa0e...215d48980
0.01919303 ETH
170186112023-04-10 15:15:11634 days ago1681139711
0x5F91Aa0e...215d48980
0.1386431 ETH
170183752023-04-10 14:26:23634 days ago1681136783
0x5F91Aa0e...215d48980
0.00774067 ETH
170173932023-04-10 11:05:47634 days ago1681124747
0x5F91Aa0e...215d48980
0.00893364 ETH
170171412023-04-10 10:14:35634 days ago1681121675
0x5F91Aa0e...215d48980
0.03276274 ETH
170170832023-04-10 10:02:59634 days ago1681120979
0x5F91Aa0e...215d48980
0.11748125 ETH
170169652023-04-10 9:38:47634 days ago1681119527
0x5F91Aa0e...215d48980
0.0188336 ETH
170169122023-04-10 9:27:59634 days ago1681118879
0x5F91Aa0e...215d48980
0.08466509 ETH
170168022023-04-10 9:05:11634 days ago1681117511
0x5F91Aa0e...215d48980
0.024925 ETH
170167732023-04-10 8:59:23634 days ago1681117163
0x5F91Aa0e...215d48980
0.03298927 ETH
170167002023-04-10 8:44:11634 days ago1681116251
0x5F91Aa0e...215d48980
0.05133383 ETH
170164882023-04-10 8:00:47634 days ago1681113647
0x5F91Aa0e...215d48980
0.04002016 ETH
170164652023-04-10 7:56:11634 days ago1681113371
0x5F91Aa0e...215d48980
0.02826481 ETH
170162742023-04-10 7:17:47634 days ago1681111067
0x5F91Aa0e...215d48980
0.03410553 ETH
170162112023-04-10 7:05:11634 days ago1681110311
0x5F91Aa0e...215d48980
0.11799865 ETH
170137052023-04-09 22:35:47635 days ago1681079747
0x5F91Aa0e...215d48980
0.03259178 ETH
170118632023-04-09 16:18:47635 days ago1681057127
0x5F91Aa0e...215d48980
0.10871343 ETH
170075782023-04-09 1:42:35635 days ago1681004555
0x5F91Aa0e...215d48980
0.0553676 ETH
170070642023-04-08 23:58:35636 days ago1680998315
0x5F91Aa0e...215d48980
0.08779 ETH
170070582023-04-08 23:57:23636 days ago1680998243
0x5F91Aa0e...215d48980
0.23302822 ETH
170058852023-04-08 19:58:35636 days ago1680983915
0x5F91Aa0e...215d48980
0.00835783 ETH
170055692023-04-08 18:54:47636 days ago1680980087
0x5F91Aa0e...215d48980
0.03166572 ETH
170035322023-04-08 11:57:47636 days ago1680955067
0x5F91Aa0e...215d48980
0.00682761 ETH
170034312023-04-08 11:37:23636 days ago1680953843
0x5F91Aa0e...215d48980
0.10806406 ETH
169967462023-04-07 12:56:11637 days ago1680872171
0x5F91Aa0e...215d48980
0.04827762 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FreqAIStaking

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 9 : FreqAIStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

import "Context.sol";
import "Ownable.sol";
import "IERC20.sol";
import "SafeERC20.sol";

import "ReentrancyGuard.sol";
import "IUniswapV2Router02.sol";
import "IFreqAI.sol";

contract FreqAIStaking is Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    //store data of each user in UserInfo
    struct UserInfo {
        uint16 lockTimeBoost; //time lock multiplier - max (1 + boostMultiplier)x
        uint32 lockedUntil; //lock end in UNIX seconds, used to compute the lockTimeBoost
        uint96 claimableETH; //amount of eth ready to be claimed
        uint112 amount; //amount of staked tokens
        uint112 weightedBalance; //amount of staked tokens * multiplier
        uint256 withdrawn; //sum of withdrawn ETH
        uint112 ETHRewardDebt; //ETH debt for each staking session. Session resets upon withdrawal
    }
    // store data of each pool
    struct PoolInfo {
        IERC20 lpToken; // Address of LP token contract.
        uint64 allocPoint; // How many allocation points assigned to this pool.
        uint64 lastRewardBlock; // Last reward block.
        uint112 accETHPerShare; // Accumulated ETH rewards
        uint112 weightedBalance; // weightedBalances from all users.
    }


    uint256 constant ONE_DAY = 86400; //total seconds in one day
    IFreqAI public FreqAI; // The FreqAI token
    address public router; // The uniswap V2 router
    address public WETH; // The WETH token contract
    address public TaxDistributor; // address of taxDistributor. Just in case TD transfers the ETH without arbitrary data
    uint256 public ETHPerBlock; // amount of ETH per block
    uint256 public ETHLeftUnshared; // amount of ETH that is not distributed to stakers
    uint256 public ETHLeftUnclaimed; // amount of ETH that is distributed but unclaimed
    uint256 public numDays; // number of days used to calculate rewards. Feed the staking contract with ETH within numDays days
    uint256 public boostMultiplier; // boost multiplier for time locking based rewards
    uint256 public blocksPerDay = 7200; //total blocks in one day

    PoolInfo[] public poolInfo; // pool info storage
    mapping(uint256 => mapping(address => UserInfo)) public userInfo; // userinfo storage


    uint256 public totalAllocPoint; // total allocation points
    uint256 public startBlock; // starting block
    bool public isEmergency; //if Emergency users can withdraw their tokens without caring about the locks and rewards


    //events
    event Deposit(address indexed user, uint256 indexed pid, uint256 amount, uint256 lockTime);
    event Withdraw(address indexed user, uint256 indexed pid, uint256 amount);
    event EmergencyWithdraw(
        address indexed user,
        uint256 indexed pid,
        uint256 amount
    );

    event TokensLocked(
        address indexed user,
        uint256 timestamp,
        uint256 lockTime
    );
    event Emergency(uint256 timestamp, bool ifEmergency);

    mapping(IERC20 => bool) public poolExistence;
    modifier nonDuplicated(IERC20 _lpToken) {
        require(poolExistence[_lpToken] == false, "nonDuplicated: LP Token already added");
        _;
    }

    modifier onlyEmergency() {
        require(isEmergency == true, "onlyEmergency: Emergency use only!");
        _;
    }
    mapping(address => bool) public authorized;
    modifier onlyAuthorized() {
        require(authorized[msg.sender] == true, "onlyAuthorized: address not authorized");
        _;
    }

    constructor(IFreqAI _freqAI, address _router) {
        FreqAI = _freqAI;
        router = _router;
        WETH = IUniswapV2Router02(router).WETH();
        startBlock = type(uint256).max;
        FreqAI.approve(router, FreqAI.totalSupply());
        //approve staking-router
        numDays = 30;
    }

    /**
    * poolLength
    * Returns total number of pools
    */
    function poolLength() external view returns (uint256) {
        return poolInfo.length;
    }

    /**
    * getMultiplier
    * Return reward multiplier over the given _from to _to block.
    */
    function getMultiplier(uint256 _from, uint256 _to)
    public
    pure
    returns (uint256)
    {
        return (_to - _from);
    }

    /**
    * pendingRewards
    * Calculate pending rewards
    */
    function pendingRewards(uint256 _pid, address _user) external view returns (uint256)
    {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 userWeightedAmount = user.weightedBalance;
        uint256 accETHPerShare = pool.accETHPerShare;
        uint256 weightedBalance = pool.weightedBalance;
        uint256 PendingETH;
        if (block.number > pool.lastRewardBlock && weightedBalance != 0) {
            uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);
            uint256 ETHReward = multiplier * ETHPerBlock * pool.allocPoint / totalAllocPoint;
            accETHPerShare = accETHPerShare + ETHReward * 1e12 / weightedBalance;
            PendingETH = (userWeightedAmount * accETHPerShare / 1e12) - user.ETHRewardDebt + user.claimableETH;
        }
        return (PendingETH);
    }

    // Update reward variables for all pools. Be careful of gas spending!
    function massUpdatePools() public {
        uint256 length = poolInfo.length;
        for (uint256 pid = 0; pid < length; ++pid) {
            updatePool(pid);
        }
    }

    //Receive ETH from the tax splitter contract. triggered on a value transfer with .call("arbitraryData").
    fallback() external payable {
        ETHLeftUnshared += msg.value;
        updateETHRewards();
    }

    //Receive ETH sent through .send, .transfer, or .call(""). These wont be taken into account in the rewards.
    receive() external payable {
        require(msg.sender != TaxDistributor);
    }

    // Update reward variables of the given pool to be up-to-date.
    function updatePool(uint256 _pid) public {
        PoolInfo storage pool = poolInfo[_pid];
        if (block.number <= pool.lastRewardBlock) {
            return;
        }
        uint256 lpSupply = pool.weightedBalance;
        if (lpSupply == 0 || pool.allocPoint == 0) {
            pool.lastRewardBlock = uint64(block.number);
            return;
        }
        uint256 multiplier = getMultiplier(pool.lastRewardBlock, block.number);

        uint256 ETHReward = multiplier * ETHPerBlock * pool.allocPoint / totalAllocPoint;

        ETHLeftUnclaimed = ETHLeftUnclaimed + ETHReward;
        ETHLeftUnshared = ETHLeftUnshared - ETHReward;
        pool.accETHPerShare = uint112(pool.accETHPerShare + ETHReward * 1e12 / lpSupply);
        pool.lastRewardBlock = uint64(block.number);
    }

    // Deposit tokens for rewards.
    function deposit(uint256 _pid, uint256 _amount, uint256 lockTime) public nonReentrant {
        _deposit(msg.sender, _pid, _amount, lockTime);
    }

    // Withdraw unlocked tokens.
    function withdraw(uint32 _pid, uint256 _amount) public nonReentrant {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        require(user.lockedUntil < block.timestamp, "withdraw: Tokens locked, if you're trying to claim your rewards use the deposit function");
        require(user.amount >= _amount && _amount > 0, "withdraw: not good");
        updatePool(_pid);
        if (user.weightedBalance > 0) {
            _addToClaimable(_pid, msg.sender);
            if (user.claimableETH > 0) {
                safeETHTransfer(msg.sender, user.claimableETH);
                user.withdrawn += user.claimableETH;
                user.claimableETH = 0;
            }
        }
        user.amount = uint112(user.amount - _amount);
        pool.lpToken.safeTransfer(address(msg.sender), _amount);
        updateUserWeightedBalance(_pid, msg.sender);

        emit Withdraw(msg.sender, _pid, _amount);
    }

    // Withdraw unlocked tokens without caring about rewards. EMERGENCY ONLY.
    function emergencyWithdraw(uint256 _pid) public nonReentrant onlyEmergency {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][msg.sender];
        uint256 amount = user.amount;
        pool.weightedBalance -= user.weightedBalance;
        user.amount = 0;
        user.weightedBalance = 0;
        user.ETHRewardDebt = 0;
        user.claimableETH = 0;
        pool.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, _pid, amount);
    }

    /**
    * addLiquidityNoFeeAndStake
    * take $FreqAI and ETH and add it to liquidity. Return unspent ETH.
    */
    function addLiquidityNoFeeAndStake(uint256 amountTokensIn, uint256 amountETHMin, uint256 amountTokenMin, uint256 lockTime) public payable nonReentrant {
        IFreqAI.LiquidityETHParams memory params;
        UserInfo storage user = userInfo[0][msg.sender];
        require(msg.value > 0);
        require((lockTime >= 0 && lockTime <= 90 * ONE_DAY && user.lockedUntil <= lockTime + block.timestamp), "addLiquidityNoFeeAndStake : Lock out of range");
        updatePool(0);
        if (user.weightedBalance > 0) {
            _addToClaimable(0, msg.sender);
        }
        FreqAI.transferFrom(msg.sender, address(this), amountTokensIn);
        params.pair = address(poolInfo[0].lpToken);
        params.to = address(this);
        params.amountTokenMin = amountTokenMin;
        params.amountETHMin = amountETHMin;
        params.amountTokenOrLP = amountTokensIn;
        params.deadline = block.timestamp;

        IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(router);

        (, uint256 ETHUsed, uint256 numLiquidityAdded) = _uniswapV2Router.addLiquidityETH{value : msg.value}(
            address(FreqAI),
            params.amountTokenOrLP,
            params.amountTokenMin,
            params.amountETHMin,
            params.to,
            block.timestamp
        );

        payable(msg.sender).transfer(msg.value - ETHUsed);
        user.amount += uint112(numLiquidityAdded);
        if (lockTime > 0) {
            lockTokens(msg.sender, 0, lockTime);
        } else {
            updateUserWeightedBalance(0, msg.sender);
        }
        emit Deposit(msg.sender, 0, numLiquidityAdded, lockTime);
    }

    // Reinvest users rewards. Only works for token staking
    function reinvestETHRewards(uint256 amountOutMin) public nonReentrant {
        UserInfo storage user = userInfo[1][msg.sender];
        updatePool(1);
        uint256 ETHPending = (user.weightedBalance * poolInfo[1].accETHPerShare / 1e12) - user.ETHRewardDebt + user.claimableETH;
        require(ETHPending > 0);
        address[] memory path = new address[](2);
        path[0] = WETH;
        path[1] = address(FreqAI);
        if (ETHPending > ETHLeftUnclaimed) {
            ETHPending = ETHLeftUnclaimed;
        }
        uint256 balanceBefore = FreqAI.balanceOf(address(this));
        IUniswapV2Router02(router).swapExactETHForTokensSupportingFeeOnTransferTokens{value: ETHPending}(
            amountOutMin,
            path,
            address(this),
            block.timestamp
        );

        uint256 amountSwapped = FreqAI.balanceOf(address(this)) - balanceBefore;
        user.amount += uint112(amountSwapped);
        user.claimableETH = 0;
        user.withdrawn += ETHPending;
        updateUserWeightedBalance(1, msg.sender);
        emit Deposit(msg.sender, 1, amountSwapped, 0);
    }

    function addToClaimable(uint256 _pid, address sender) public nonReentrant {
        require(userInfo[_pid][sender].weightedBalance > 0);
        updatePool(_pid);
        _addToClaimable(_pid, sender);
    }

    function depositFor(address sender, uint256 _pid, uint256 amount, uint256 lockTime) public onlyAuthorized {
        _deposit(sender, _pid, amount, lockTime);
    }

    //add new pool. LP staking should be 0, token staking 1
    function add(uint64 _allocPoint, IERC20 _lpToken, bool _withUpdate) public onlyOwner nonDuplicated(_lpToken) {
        if (_withUpdate) {
            massUpdatePools();
        }
        uint64 lastRewardBlock = uint64(block.number > startBlock ? block.number : startBlock);
        totalAllocPoint = totalAllocPoint + _allocPoint;
        poolExistence[_lpToken] = true;
        poolInfo.push(
            PoolInfo({
        lpToken : _lpToken,
        allocPoint : _allocPoint,
        lastRewardBlock : lastRewardBlock,
        accETHPerShare : 0,
        weightedBalance : 0
        }));
    }


    // change taxDistributor address
    function setTaxDistributor(address _TaxDistributor) public onlyOwner {
        TaxDistributor = _TaxDistributor;
    }

    // change router address
    function setRouter(address _router) public onlyOwner {
        router = _router;
    }

    // transfer non-FreqAI tokens that were sent to staking contract by accident
    function rescueToken(address tokenAddress) public onlyOwner {
        require(!poolExistence[IERC20(tokenAddress)], "rescueToken : wrong token address");
        uint256 bal = IERC20(tokenAddress).balanceOf(address(this));
        IERC20(tokenAddress).transfer(msg.sender, bal);
    }

    // update pool allocation points
    function set(uint256 _pid, uint64 _allocPoint, bool _withUpdate) public onlyOwner {
        if (_withUpdate) {
            massUpdatePools();
        }
        totalAllocPoint = totalAllocPoint - poolInfo[_pid].allocPoint + _allocPoint;
        poolInfo[_pid].allocPoint = _allocPoint;
    }

    // start rewards
    function startRewards() public onlyOwner {
        require(startBlock > block.number, "startRewards: rewards already started");
        startBlock = block.number;
        for (uint256 i; i < poolInfo.length; i++) {
            poolInfo[i].lastRewardBlock = uint64(block.number);
        }
    }

    // check if emergency mode is enabled
    function emergency(bool _isEmergency) public onlyOwner {
        isEmergency = _isEmergency;
        emit Emergency(block.timestamp, _isEmergency);
    }

    // authorize the address
    function authorize(address _address) public onlyOwner {
        authorized[_address] = true;
    }

    // unauthorize the address
    function unauthorize(address _address) public onlyOwner {
        authorized[_address] = false;
    }

    // set new interval for rewards
    function setNumDays(uint256 _days) public onlyOwner {
        require(_days > 0 && _days < 180);
        numDays = _days;
    }

    // set boost factor for lock time
    function setBoostMultiplier(uint256 _boostMultiplier) public onlyOwner {
        require(_boostMultiplier < 10);
        boostMultiplier = _boostMultiplier;
    }

    // set new blocks for a day
    function setBlocksPerDay(uint256 _blocks) public onlyOwner {
        blocksPerDay = _blocks;
    }

    // deposit tokens to pool >1
    // if lockTime set lock the tokens
    function _deposit(address sender, uint256 _pid, uint256 _amount, uint256 lockTime) internal {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][sender];
        updatePool(_pid);
        if (user.weightedBalance > 0) {
            if (_amount == 0 && lockTime == 0) {
                uint256 ETHPending = (user.weightedBalance * pool.accETHPerShare / 1e12) - user.ETHRewardDebt + user.claimableETH;
                if (ETHPending > 0) {
                    safeETHTransfer(sender, ETHPending);
                    user.withdrawn += ETHPending;
                    user.ETHRewardDebt = user.weightedBalance * pool.accETHPerShare / 1e12;
                }
                user.claimableETH = 0;
            } else {
                _addToClaimable(_pid, sender);
            }
        }
        if (_amount > 0) {
            require(
                (lockTime >= 0 && lockTime <= 90 * ONE_DAY && user.lockedUntil <= lockTime + block.timestamp),
                "deposit : Lock out of range or previously locked tokens are locked longer than new desired lock"
            );
            pool.lpToken.safeTransferFrom(address(msg.sender), address(this), _amount);
            user.amount = uint112(user.amount + _amount);
            if (lockTime == 0) {
                updateUserWeightedBalance(_pid, sender);
            }
        }

        if (lockTime > 0) {
            lockTokens(sender, _pid, lockTime);
        }
        if (user.lockedUntil < block.timestamp) {
            updateUserWeightedBalance(_pid, sender);
        }
        emit Deposit(sender, _pid, _amount, lockTime);
    }

    //Lock tokens up to 90 days for rewards boost, (max rewards = x(1+boostMultiplier), rewards increase linearly with lock time)
    function lockTokens(address sender, uint256 _pid, uint256 lockTime) internal {
        UserInfo storage user = userInfo[_pid][sender];
        require(user.amount > 0, "lockTokens: No tokens to lock");
        require(user.lockedUntil <= block.timestamp + lockTime, "lockTokens: Tokens already locked");
        require(lockTime >= ONE_DAY, "lockTokens: Lock time too short");
        require(lockTime <= 90 * ONE_DAY, "lockTokens: Lock time too long");
        user.lockedUntil = uint32(block.timestamp + lockTime);
        user.lockTimeBoost = uint16((boostMultiplier * 1000 * lockTime) / (90 * ONE_DAY));
        updateUserWeightedBalance(_pid, sender);
        emit TokensLocked(sender, block.timestamp, lockTime);
    }

    // calculate and update the user weighted balance
    function updateUserWeightedBalance(uint256 _pid, address _user) public {
        PoolInfo storage pool = poolInfo[_pid];
        UserInfo storage user = userInfo[_pid][_user];
        uint256 poolBalance = pool.weightedBalance - user.weightedBalance;
        if (user.lockedUntil < block.timestamp) {
            user.lockTimeBoost = 0;
        }

        user.weightedBalance = (user.amount * (1000 + user.lockTimeBoost) / 1000);

        pool.weightedBalance = uint112(poolBalance + user.weightedBalance);
        user.ETHRewardDebt = user.weightedBalance * pool.accETHPerShare / 1e12;
    }

    function updateETHRewards() internal {
        massUpdatePools();
        ETHPerBlock = ETHLeftUnshared / (blocksPerDay * numDays);
    }

    function _addToClaimable(uint256 _pid, address sender) internal {
        UserInfo storage user = userInfo[_pid][sender];
        PoolInfo storage pool = poolInfo[_pid];

        uint256 ETHPending = (user.weightedBalance * pool.accETHPerShare / 1e12) - user.ETHRewardDebt;
        if (ETHPending > 0) {
            user.claimableETH += uint96(ETHPending);
            user.ETHRewardDebt = user.weightedBalance * pool.accETHPerShare / 1e12;
        }
    }

    function safeETHTransfer(address _to, uint256 _amount) internal {
        if (_amount > ETHLeftUnclaimed) {
            _amount = ETHLeftUnclaimed;
        }
        payable(_to).transfer(_amount);
        ETHLeftUnclaimed -= _amount;
    }
}

File 2 of 9 : 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 3 of 9 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "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 4 of 9 : 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 5 of 9 : 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 "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 9 : 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);
            }
        }
    }
}

File 7 of 9 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

// ReentrancyGuard (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol)
/**
 * @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 8 of 9 : IUniswapV2Router02.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;
pragma experimental ABIEncoderV2;

interface IUniswapV2Router02 {
    function factory() external pure returns (address);

    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint256 amountADesired,
        uint256 amountBDesired,
        uint256 amountAMin,
        uint256 amountBMin,
        address to,
        uint256 deadline
    )
        external
        returns (
            uint256 amountA,
            uint256 amountB,
            uint256 liquidity
        );

    function addLiquidityETH(
        address token,
        uint256 amountTokenDesired,
        uint256 amountTokenMin,
        uint256 amountETHMin,
        address to,
        uint256 deadline
    )
        external
        payable
        returns (
            uint256 amountToken,
            uint256 amountETH,
            uint256 liquidity
        );

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;

    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external payable;

    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint256 amountIn,
        uint256 amountOutMin,
        address[] calldata path,
        address to,
        uint256 deadline
    ) external;
}

File 9 of 9 : IFreqAI.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;

import "IERC20.sol";

interface IFreqAI is IERC20 {
    struct LiquidityETHParams {
        address pair;
        address to;
        uint256 amountTokenOrLP;
        uint256 amountTokenMin;
        uint256 amountETHMin;
        uint256 deadline;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IFreqAI","name":"_freqAI","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTime","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bool","name":"ifEmergency","type":"bool"}],"name":"Emergency","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"lockTime","type":"uint256"}],"name":"TokensLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"pid","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ETHLeftUnclaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHLeftUnshared","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ETHPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FreqAI","outputs":[{"internalType":"contract IFreqAI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TaxDistributor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"_allocPoint","type":"uint64"},{"internalType":"contract IERC20","name":"_lpToken","type":"address"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"add","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountTokensIn","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"}],"name":"addLiquidityNoFeeAndStake","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"sender","type":"address"}],"name":"addToClaimable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"authorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"authorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"blocksPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"boostMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"lockTime","type":"uint256"}],"name":"depositFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isEmergency","type":"bool"}],"name":"emergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_from","type":"uint256"},{"internalType":"uint256","name":"_to","type":"uint256"}],"name":"getMultiplier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"isEmergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"massUpdatePools","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numDays","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"name":"poolExistence","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint64","name":"allocPoint","type":"uint64"},{"internalType":"uint64","name":"lastRewardBlock","type":"uint64"},{"internalType":"uint112","name":"accETHPerShare","type":"uint112"},{"internalType":"uint112","name":"weightedBalance","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"reinvestETHRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"rescueToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"uint64","name":"_allocPoint","type":"uint64"},{"internalType":"bool","name":"_withUpdate","type":"bool"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_blocks","type":"uint256"}],"name":"setBlocksPerDay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_boostMultiplier","type":"uint256"}],"name":"setBoostMultiplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_days","type":"uint256"}],"name":"setNumDays","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_TaxDistributor","type":"address"}],"name":"setTaxDistributor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"startRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalAllocPoint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"unauthorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"}],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pid","type":"uint256"},{"internalType":"address","name":"_user","type":"address"}],"name":"updateUserWeightedBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint16","name":"lockTimeBoost","type":"uint16"},{"internalType":"uint32","name":"lockedUntil","type":"uint32"},{"internalType":"uint96","name":"claimableETH","type":"uint96"},{"internalType":"uint112","name":"amount","type":"uint112"},{"internalType":"uint112","name":"weightedBalance","type":"uint112"},{"internalType":"uint256","name":"withdrawn","type":"uint256"},{"internalType":"uint112","name":"ETHRewardDebt","type":"uint112"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_pid","type":"uint32"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052611c20600b553480156200001757600080fd5b506040516200375a3803806200375a8339810160408190526200003a9162000258565b6200004533620001ef565b60018055600280546001600160a01b038085166001600160a01b031992831617909255600380549284169290911682179055604080516315ab88c960e31b8152905163ad5c4648916004808201926020929091908290030181865afa158015620000b3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d9919062000297565b600480546001600160a01b0319166001600160a01b03928316178155600019600f55600254600354604080516318160ddd60e01b815290519285169463095ea7b39492169285926318160ddd928082019260209290918290030181865afa15801562000149573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016f9190620002be565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015620001bb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001e19190620002d8565b5050601e60095550620002fc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03811681146200025557600080fd5b50565b600080604083850312156200026c57600080fd5b825162000279816200023f565b60208401519092506200028c816200023f565b809150509250929050565b600060208284031215620002aa57600080fd5b8151620002b7816200023f565b9392505050565b600060208284031215620002d157600080fd5b5051919050565b600060208284031215620002eb57600080fd5b81518015158114620002b757600080fd5b61344e806200030c6000396000f3fe6080604052600436106102755760003560e01c8063630b5ba11161014f578063a5bb096d116100c1578063cbd258b51161007a578063cbd258b514610851578063d18df53c14610881578063d89ea34b146108a1578063f0b37c04146108c1578063f2fde38b146108e1578063f887ea401461090157610293565b8063a5bb096d14610781578063aa97b0a0146107a1578063ad5c4648146107c1578063b6a5d7de146107e1578063b918161114610801578063c0d786551461083157610293565b8063720fd3c711610113578063720fd3c71461060f5780638da5cb5b1461062f5780638dbb1e3a1461064d57806393f1a40b1461066d578063a003aac41461074b578063a04e5c041461076157610293565b8063630b5ba11461059957806363cf070c146105ae57806365177b07146105c457806367dcaf94146105e4578063715018a6146105fa57610293565b806348cd4cb1116101e857806353398119116101ac57806353398119146104e357806354f29ce2146105035780635dd19829146105195780635f2ecf8a146105395780635f9e8f821461054f578063614f33641461057957610293565b806348cd4cb1146104575780634cfea68a1461046d5780634d90dd421461048357806351eb05a6146104a35780635312ea8e146104c357610293565b80631526fe271161023a5780631526fe271461036257806317caf6f1146103cc5780632dfd0bdc146103e2578063353b6c2c146103f7578063401519b6146104175780634460d3cf1461043757610293565b8062aeef8a146102b357806306f43a8c146102d3578063081e3eda146102e657806308207fb01461030a5780630e19dc3a1461034257610293565b36610293576005546001600160a01b0316330361029157600080fd5b005b34600760008282546102a59190612ee2565b909155506102919050610921565b3480156102bf57600080fd5b506102916102ce366004612ef5565b61094b565b6102916102e1366004612f21565b610990565b3480156102f257600080fd5b50600c545b6040519081526020015b60405180910390f35b34801561031657600080fd5b5060025461032a906001600160a01b031681565b6040516001600160a01b039091168152602001610301565b34801561034e57600080fd5b5061029161035d366004612f53565b610d38565b34801561036e57600080fd5b5061038261037d366004612f88565b611006565b604080516001600160a01b0390961686526001600160401b03948516602087015293909216928401929092526001600160701b03918216606084015216608082015260a001610301565b3480156103d857600080fd5b506102f7600e5481565b3480156103ee57600080fd5b5061029161106d565b34801561040357600080fd5b50610291610412366004612f88565b611166565b34801561042357600080fd5b50610291610432366004612fcb565b611195565b34801561044357600080fd5b50610291610452366004613020565b611276565b34801561046357600080fd5b506102f7600f5481565b34801561047957600080fd5b506102f7600b5481565b34801561048f57600080fd5b5061029161049e36600461303d565b6113f7565b3480156104af57600080fd5b506102916104be366004612f88565b611471565b3480156104cf57600080fd5b506102916104de366004612f88565b611600565b3480156104ef57600080fd5b506102916104fe36600461306d565b611795565b34801561050f57600080fd5b506102f760075481565b34801561052557600080fd5b5061029161053436600461303d565b61180d565b34801561054557600080fd5b506102f760085481565b34801561055b57600080fd5b506010546105699060ff1681565b6040519015158152602001610301565b34801561058557600080fd5b5061029161059436600461308a565b611986565b3480156105a557600080fd5b50610291611a0b565b3480156105ba57600080fd5b506102f760095481565b3480156105d057600080fd5b506102916105df366004612f88565b611a36565b3480156105f057600080fd5b506102f760065481565b34801561060657600080fd5b50610291611a7e565b34801561061b57600080fd5b5061029161062a366004612f88565b611ab4565b34801561063b57600080fd5b506000546001600160a01b031661032a565b34801561065957600080fd5b506102f76106683660046130c5565b611af0565b34801561067957600080fd5b506106f361068836600461303d565b600d602090815260009283526040808420909152908252902080546001820154600283015460039093015461ffff83169363ffffffff62010000850416936001600160601b03600160301b820416936001600160701b03600160901b90920482169390821692911687565b6040805161ffff909816885263ffffffff90961660208801526001600160601b03909416948601949094526001600160701b0391821660608601528116608085015260a08401929092521660c082015260e001610301565b34801561075757600080fd5b506102f7600a5481565b34801561076d57600080fd5b5060055461032a906001600160a01b031681565b34801561078d57600080fd5b5061029161079c366004613020565b611b05565b3480156107ad57600080fd5b506102916107bc3660046130e7565b611b51565b3480156107cd57600080fd5b5060045461032a906001600160a01b031681565b3480156107ed57600080fd5b506102916107fc366004613020565b611d84565b34801561080d57600080fd5b5061056961081c366004613020565b60126020526000908152604090205460ff1681565b34801561083d57600080fd5b5061029161084c366004613020565b611dd2565b34801561085d57600080fd5b5061056961086c366004613020565b60116020526000908152604090205460ff1681565b34801561088d57600080fd5b506102f761089c36600461303d565b611e1e565b3480156108ad57600080fd5b506102916108bc366004612f88565b611f8d565b3480156108cd57600080fd5b506102916108dc366004613020565b61235d565b3480156108ed57600080fd5b506102916108fc366004613020565b6123a8565b34801561090d57600080fd5b5060035461032a906001600160a01b031681565b610929611a0b565b600954600b546109399190613115565b6007546109469190613142565b600655565b6002600154036109765760405162461bcd60e51b815260040161096d90613156565b60405180910390fd5b600260015561098733848484612440565b50506001805550565b6002600154036109b25760405162461bcd60e51b815260040161096d90613156565b60026001556040805160c08101825260008082526020808301829052828401829052606083018290526080830182905260a083018290523382527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee90529190912034610a1d57600080fd5b610a2b62015180605a613115565b8311158015610a505750610a3f4284612ee2565b815462010000900463ffffffff1611155b610ab25760405162461bcd60e51b815260206004820152602d60248201527f6164644c69717569646974794e6f466565416e645374616b65203a204c6f636b60448201526c206f7574206f662072616e676560981b606482015260840161096d565b610abc6000611471565b60018101546001600160701b031615610ada57610ada600033612787565b6002546040516323b872dd60e01b8152336004820152306024820152604481018890526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b55919061318d565b50600c600081548110610b6a57610b6a6131aa565b60009182526020808320600392830201546001600160a01b03908116865230918601829052606086018890526080860189905260408087018b90524260a088018190529354600254915163f305d71960e01b81529183166004830152602482018c9052604482018a9052606482018b9052608482019390935260a48101939093521691908190839063f305d71990349060c40160606040518083038185885af1158015610c1b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c4091906131c0565b90935091503390506108fc610c5584346131ee565b6040518115909202916000818181858888f19350505050158015610c7d573d6000803e3d6000fd5b50835481908590601290610ca2908490600160901b90046001600160701b0316613201565b92506101000a8154816001600160701b0302191690836001600160701b031602179055506000861115610ce057610cdb336000886128d4565b610ceb565b610ceb60003361180d565b604080518281526020810188905260009133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a350506001805550505050505050565b600260015403610d5a5760405162461bcd60e51b815260040161096d90613156565b60026001819055506000600c8363ffffffff1681548110610d7d57610d7d6131aa565b6000918252602080832063ffffffff8088168552600d835260408086203387529093529190932080546003909302909301935042620100009092041610610e525760405162461bcd60e51b815260206004820152605860248201527f77697468647261773a20546f6b656e73206c6f636b65642c20696620796f752760448201527f726520747279696e6720746f20636c61696d20796f757220726577617264732060648201527f75736520746865206465706f7369742066756e6374696f6e0000000000000000608482015260a40161096d565b8054600160901b90046001600160701b03168311801590610e735750600083115b610eb45760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161096d565b610ec38463ffffffff16611471565b60018101546001600160701b031615610f5957610ee68463ffffffff1633612787565b8054600160301b90046001600160601b031615610f59578054610f1a903390600160301b90046001600160601b0316612b34565b8054600282018054600160301b9092046001600160601b031691600090610f42908490612ee2565b90915550508054600160301b600160901b03191681555b8054610f76908490600160901b90046001600160701b03166131ee565b81546001600160701b0391909116600160901b026001600160901b039091161781558154610fae906001600160a01b03163385612b95565b610fbe8463ffffffff163361180d565b60405183815263ffffffff85169033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b600c818154811061101657600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03821693506001600160401b03600160a01b909204821692918216916001600160701b03600160401b9091048116911685565b6000546001600160a01b031633146110975760405162461bcd60e51b815260040161096d90613228565b43600f54116110f65760405162461bcd60e51b815260206004820152602560248201527f7374617274526577617264733a207265776172647320616c7265616479207374604482015264185c9d195960da1b606482015260840161096d565b43600f5560005b600c548110156111635743600c828154811061111b5761111b6131aa565b906000526020600020906003020160010160006101000a8154816001600160401b0302191690836001600160401b03160217905550808061115b9061325d565b9150506110fd565b50565b6000546001600160a01b031633146111905760405162461bcd60e51b815260040161096d90613228565b600b55565b6000546001600160a01b031633146111bf5760405162461bcd60e51b815260040161096d90613228565b80156111cd576111cd611a0b565b816001600160401b0316600c84815481106111ea576111ea6131aa565b6000918252602090912060039091020154600e5461121891600160a01b90046001600160401b0316906131ee565b6112229190612ee2565b600e8190555081600c848154811061123c5761123c6131aa565b906000526020600020906003020160000160146101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b6000546001600160a01b031633146112a05760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03811660009081526011602052604090205460ff16156113135760405162461bcd60e51b815260206004820152602160248201527f726573637565546f6b656e203a2077726f6e6720746f6b656e206164647265736044820152607360f81b606482015260840161096d565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561135a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137e9190613276565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156113ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f2919061318d565b505050565b6002600154036114195760405162461bcd60e51b815260040161096d90613156565b600260019081556000838152600d602090815260408083206001600160a01b0386168452909152902001546001600160701b031661145657600080fd5b61145f82611471565b6114698282612787565b505060018055565b6000600c8281548110611486576114866131aa565b6000918252602090912060039091020160018101549091506001600160401b031643116114b1575050565b60028101546001600160701b03168015806114db57508154600160a01b90046001600160401b0316155b156115015750600101805467ffffffffffffffff1916436001600160401b031617905550565b600182015460009061151c906001600160401b031643611af0565b600e548454600654929350600092600160a01b9091046001600160401b0316906115469085613115565b6115509190613115565b61155a9190613142565b90508060085461156a9190612ee2565b60085560075461157b9082906131ee565b6007558261158e8264e8d4a51000613115565b6115989190613142565b60018501546115b79190600160401b90046001600160701b0316612ee2565b60019490940180546001600160b01b031916600160401b6001600160701b039096169590950267ffffffffffffffff191694909417436001600160401b03161790935550505050565b6002600154036116225760405162461bcd60e51b815260040161096d90613156565b6002600190815560105460ff161515146116895760405162461bcd60e51b815260206004820152602260248201527f6f6e6c79456d657267656e63793a20456d657267656e637920757365206f6e6c604482015261792160f01b606482015260840161096d565b6000600c828154811061169e5761169e6131aa565b60009182526020808320858452600d82526040808520338652909252908320805460018201546003949094029092016002810180549196509194600160901b9093046001600160701b0390811694811693916116fc9185911661328f565b82546001600160701b039182166101009390930a92830291909202199091161790555081546001830180546001600160701b0319908116909155600384018054909116905565ffffffffffff1682558254611761906001600160a01b03163383612b95565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610ff4565b6000546001600160a01b031633146117bf5760405162461bcd60e51b815260040161096d90613228565b6010805460ff19168215159081179091556040805142815260208101929092527fff8db90c07460bbb951945fef7481379809de7701710f89abe56cbaa5216df1e910160405180910390a150565b6000600c8381548110611822576118226131aa565b60009182526020808320868452600d825260408085206001600160a01b0388168652909252908320600181015460026003909402909201928301549294509291611878916001600160701b03908116911661328f565b82546001600160701b03919091169150426201000090910463ffffffff1610156118a657815461ffff191682555b81546103e8906118ba9061ffff16826132af565b83546118da9161ffff1690600160901b90046001600160701b03166132ca565b6118e491906132f5565b6001830180546001600160701b0319166001600160701b0392909216918217905561190f9082612ee2565b6002840180546001600160701b0319166001600160701b039283161790556001808501549084015464e8d4a510009261195292600160401b9004811691166132ca565b61195c91906132f5565b60039290920180546001600160701b0319166001600160701b039093169290921790915550505050565b3360009081526012602052604090205460ff1615156001146119f95760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79417574686f72697a65643a2061646472657373206e6f7420617574686044820152651bdc9a5e995960d21b606482015260840161096d565b611a0584848484612440565b50505050565b600c5460005b81811015611a3257611a2281611471565b611a2b8161325d565b9050611a11565b5050565b6000546001600160a01b03163314611a605760405162461bcd60e51b815260040161096d90613228565b600081118015611a70575060b481105b611a7957600080fd5b600955565b6000546001600160a01b03163314611aa85760405162461bcd60e51b815260040161096d90613228565b611ab26000612bf8565b565b6000546001600160a01b03163314611ade5760405162461bcd60e51b815260040161096d90613228565b600a8110611aeb57600080fd5b600a55565b6000611afc83836131ee565b90505b92915050565b6000546001600160a01b03163314611b2f5760405162461bcd60e51b815260040161096d90613228565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611b7b5760405162461bcd60e51b815260040161096d90613228565b6001600160a01b038216600090815260116020526040902054829060ff1615611bf45760405162461bcd60e51b815260206004820152602560248201527f6e6f6e4475706c6963617465643a204c5020546f6b656e20616c726561647920604482015264185919195960da1b606482015260840161096d565b8115611c0257611c02611a0b565b6000600f544311611c1557600f54611c17565b435b9050846001600160401b0316600e54611c309190612ee2565b600e556001600160a01b039384166000818152601160209081526040808320805460ff19166001908117909155815160a0810183529485526001600160401b03998a169285019283529489169084019081526060840183815260808501848152600c80549788018155909452935160039095027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c78101805493518b16600160a01b026001600160e01b031990941696909916959095179190911790965594517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c88301805492516001600160701b03908116600160401b026001600160b01b0319909416929098169190911791909117905592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c99093018054939094166001600160701b0319909316929092179092555050565b6000546001600160a01b03163314611dae5760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000546001600160a01b03163314611dfc5760405162461bcd60e51b815260040161096d90613228565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080600c8481548110611e3457611e346131aa565b60009182526020808320878452600d825260408085206001600160a01b0389168652909252908320600180820154600390940290920191820154600283015492955090936001600160701b0393841693600160401b830481169316916001600160401b031643118015611ea657508115155b15611f81576001860154600090611ec6906001600160401b031643611af0565b600e548854600654929350600092600160a01b9091046001600160401b031690611ef09085613115565b611efa9190613115565b611f049190613142565b905083611f168264e8d4a51000613115565b611f209190613142565b611f2a9086612ee2565b87546003890154919650600160301b90046001600160601b0316906001600160701b031664e8d4a51000611f5e888a613115565b611f689190613142565b611f7291906131ee565b611f7c9190612ee2565b925050505b98975050505050505050565b600260015403611faf5760405162461bcd60e51b815260040161096d90613156565b600260019081553360009081527ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c56020526040902090611fee90611471565b80546003820154600c8054600093600160301b90046001600160601b0316926001600160701b03169164e8d4a5100091600190811061202f5761202f6131aa565b60009182526020909120600160039092020181015490860154612065916001600160701b03600160401b909104811691166132ca565b61206f91906132f5565b612079919061328f565b6120839190613201565b6001600160701b031690506000811161209b57600080fd5b604080516002808252606082018352600092602083019080368337505060045482519293506001600160a01b0316918391506000906120dc576120dc6131aa565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061210d5761210d6131aa565b60200260200101906001600160a01b031690816001600160a01b03168152505060085482111561213d5760085491505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121aa9190613276565b60035460405163b6f9de9560e01b81529192506001600160a01b03169063b6f9de959085906121e390899087903090429060040161331b565b6000604051808303818588803b1580156121fc57600080fd5b505af1158015612210573d6000803e3d6000fd5b50506002546040516370a0823160e01b8152306004820152600094508593506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015612262573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122869190613276565b61229091906131ee565b8554909150819086906012906122b7908490600160901b90046001600160701b0316613201565b82546001600160701b039182166101009390930a9283029190920219909116179055508454600160301b600160901b0319168555600285018054859190600090612302908490612ee2565b90915550612313905060013361180d565b604080518281526000602082015260019133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a350506001805550505050565b6000546001600160a01b031633146123875760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03166000908152601260205260409020805460ff19169055565b6000546001600160a01b031633146123d25760405162461bcd60e51b815260040161096d90613228565b6001600160a01b0381166124375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161096d565b61116381612bf8565b6000600c8481548110612455576124556131aa565b60009182526020808320878452600d825260408085206001600160a01b038b16865290925292206003909102909101915061248f85611471565b60018101546001600160701b0316156125ce57831580156124ae575082155b156125c4578054600382015460018481015490840154600093600160301b90046001600160601b0316926001600160701b039081169264e8d4a510009261250092600160401b909204821691166132ca565b61250a91906132f5565b612514919061328f565b61251e9190613201565b6001600160701b0316905080156125ad576125398782612b34565b8082600201600082825461254d9190612ee2565b90915550506001808401549083015464e8d4a5100091612580916001600160701b03600160401b909204821691166132ca565b61258a91906132f5565b6003830180546001600160701b0319166001600160701b03929092169190911790555b508054600160301b600160901b03191681556125ce565b6125ce8587612787565b8315612708576125e262015180605a613115565b831115801561260757506125f64284612ee2565b815462010000900463ffffffff1611155b61269f5760405162461bcd60e51b815260206004820152605f60248201527f6465706f736974203a204c6f636b206f7574206f662072616e6765206f72207060448201527f726576696f75736c79206c6f636b656420746f6b656e7320617265206c6f636b60648201527f6564206c6f6e676572207468616e206e65772064657369726564206c6f636b00608482015260a40161096d565b81546126b6906001600160a01b0316333087612c48565b80546126d3908590600160901b90046001600160701b0316612ee2565b81546001600160701b0391909116600160901b026001600160901b03909116178155600083900361270857612708858761180d565b8215612719576127198686856128d4565b8054426201000090910463ffffffff16101561273957612739858761180d565b604080518581526020810185905286916001600160a01b038916917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a3505050505050565b6000828152600d602090815260408083206001600160a01b03851684529091528120600c8054919291859081106127c0576127c06131aa565b600091825260208220600385810154920201600181810154908601549194506001600160701b039283169264e8d4a510009261280692600160401b9004821691166132ca565b61281091906132f5565b61281a919061328f565b6001600160701b0316905080156128cd5782548190849060069061284f908490600160301b90046001600160601b0316613385565b82546001600160601b039182166101009390930a9283029190920219909116179055506001828101549084015464e8d4a51000916128a0916001600160701b03600160401b909204821691166132ca565b6128aa91906132f5565b6003840180546001600160701b0319166001600160701b03929092169190911790555b5050505050565b6000828152600d602090815260408083206001600160a01b038716845290915290208054600160901b90046001600160701b03166129545760405162461bcd60e51b815260206004820152601d60248201527f6c6f636b546f6b656e733a204e6f20746f6b656e7320746f206c6f636b000000604482015260640161096d565b61295e8242612ee2565b815462010000900463ffffffff1611156129c45760405162461bcd60e51b815260206004820152602160248201527f6c6f636b546f6b656e733a20546f6b656e7320616c7265616479206c6f636b656044820152601960fa1b606482015260840161096d565b62015180821015612a175760405162461bcd60e51b815260206004820152601f60248201527f6c6f636b546f6b656e733a204c6f636b2074696d6520746f6f2073686f727400604482015260640161096d565b612a2562015180605a613115565b821115612a745760405162461bcd60e51b815260206004820152601e60248201527f6c6f636b546f6b656e733a204c6f636b2074696d6520746f6f206c6f6e670000604482015260640161096d565b612a7e8242612ee2565b815463ffffffff91909116620100000265ffffffff000019909116178155612aaa62015180605a613115565b82600a546103e8612abb9190613115565b612ac59190613115565b612acf9190613142565b815461ffff191661ffff91909116178155612aea838561180d565b60408051428152602081018490526001600160a01b038616917fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d910160405180910390a250505050565b600854811115612b4357506008545b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015612b79573d6000803e3d6000fd5b508060086000828254612b8c91906131ee565b90915550505050565b6040516001600160a01b0383166024820152604481018290526113f290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c80565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a059085906323b872dd60e01b90608401612bc1565b6000612cd5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d529092919063ffffffff16565b8051909150156113f25780806020019051810190612cf3919061318d565b6113f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161096d565b6060612d618484600085612d6b565b90505b9392505050565b606082471015612dcc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161096d565b843b612e1a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161096d565b600080866001600160a01b03168587604051612e3691906133c9565b60006040518083038185875af1925050503d8060008114612e73576040519150601f19603f3d011682016040523d82523d6000602084013e612e78565b606091505b5091509150612e88828286612e93565b979650505050505050565b60608315612ea2575081612d64565b825115612eb25782518084602001fd5b8160405162461bcd60e51b815260040161096d91906133e5565b634e487b7160e01b600052601160045260246000fd5b80820180821115611aff57611aff612ecc565b600080600060608486031215612f0a57600080fd5b505081359360208301359350604090920135919050565b60008060008060808587031215612f3757600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215612f6657600080fd5b823563ffffffff81168114612f7a57600080fd5b946020939093013593505050565b600060208284031215612f9a57600080fd5b5035919050565b80356001600160401b0381168114612fb857600080fd5b919050565b801515811461116357600080fd5b600080600060608486031215612fe057600080fd5b83359250612ff060208501612fa1565b9150604084013561300081612fbd565b809150509250925092565b6001600160a01b038116811461116357600080fd5b60006020828403121561303257600080fd5b8135612d648161300b565b6000806040838503121561305057600080fd5b8235915060208301356130628161300b565b809150509250929050565b60006020828403121561307f57600080fd5b8135612d6481612fbd565b600080600080608085870312156130a057600080fd5b84356130ab8161300b565b966020860135965060408601359560600135945092505050565b600080604083850312156130d857600080fd5b50508035926020909101359150565b6000806000606084860312156130fc57600080fd5b61310584612fa1565b92506020840135612ff08161300b565b8082028115828204841417611aff57611aff612ecc565b634e487b7160e01b600052601260045260246000fd5b6000826131515761315161312c565b500490565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561319f57600080fd5b8151612d6481612fbd565b634e487b7160e01b600052603260045260246000fd5b6000806000606084860312156131d557600080fd5b8351925060208401519150604084015190509250925092565b81810381811115611aff57611aff612ecc565b6001600160701b0381811683821601908082111561322157613221612ecc565b5092915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001820161326f5761326f612ecc565b5060010190565b60006020828403121561328857600080fd5b5051919050565b6001600160701b0382811682821603908082111561322157613221612ecc565b61ffff81811683821601908082111561322157613221612ecc565b6001600160701b038181168382160280821691908281146132ed576132ed612ecc565b505092915050565b60006001600160701b038084168061330f5761330f61312c565b92169190910492915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156133655784516001600160a01b031683529383019391830191600101613340565b50506001600160a01b039690961660408501525050506060015292915050565b6001600160601b0381811683821601908082111561322157613221612ecc565b60005b838110156133c05781810151838201526020016133a8565b50506000910152565b600082516133db8184602087016133a5565b9190910192915050565b60208152600082518060208401526134048160408501602087016133a5565b601f01601f1916919091016040019291505056fea26469706673582212209a2660d3f74918e038794daa20771163a6bcebd9840c3b28dc0516545517cfcc64736f6c63430008110033000000000000000000000000b685145d7f127b9093d7f9278bae902ef59ff4860000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

Deployed Bytecode

0x6080604052600436106102755760003560e01c8063630b5ba11161014f578063a5bb096d116100c1578063cbd258b51161007a578063cbd258b514610851578063d18df53c14610881578063d89ea34b146108a1578063f0b37c04146108c1578063f2fde38b146108e1578063f887ea401461090157610293565b8063a5bb096d14610781578063aa97b0a0146107a1578063ad5c4648146107c1578063b6a5d7de146107e1578063b918161114610801578063c0d786551461083157610293565b8063720fd3c711610113578063720fd3c71461060f5780638da5cb5b1461062f5780638dbb1e3a1461064d57806393f1a40b1461066d578063a003aac41461074b578063a04e5c041461076157610293565b8063630b5ba11461059957806363cf070c146105ae57806365177b07146105c457806367dcaf94146105e4578063715018a6146105fa57610293565b806348cd4cb1116101e857806353398119116101ac57806353398119146104e357806354f29ce2146105035780635dd19829146105195780635f2ecf8a146105395780635f9e8f821461054f578063614f33641461057957610293565b806348cd4cb1146104575780634cfea68a1461046d5780634d90dd421461048357806351eb05a6146104a35780635312ea8e146104c357610293565b80631526fe271161023a5780631526fe271461036257806317caf6f1146103cc5780632dfd0bdc146103e2578063353b6c2c146103f7578063401519b6146104175780634460d3cf1461043757610293565b8062aeef8a146102b357806306f43a8c146102d3578063081e3eda146102e657806308207fb01461030a5780630e19dc3a1461034257610293565b36610293576005546001600160a01b0316330361029157600080fd5b005b34600760008282546102a59190612ee2565b909155506102919050610921565b3480156102bf57600080fd5b506102916102ce366004612ef5565b61094b565b6102916102e1366004612f21565b610990565b3480156102f257600080fd5b50600c545b6040519081526020015b60405180910390f35b34801561031657600080fd5b5060025461032a906001600160a01b031681565b6040516001600160a01b039091168152602001610301565b34801561034e57600080fd5b5061029161035d366004612f53565b610d38565b34801561036e57600080fd5b5061038261037d366004612f88565b611006565b604080516001600160a01b0390961686526001600160401b03948516602087015293909216928401929092526001600160701b03918216606084015216608082015260a001610301565b3480156103d857600080fd5b506102f7600e5481565b3480156103ee57600080fd5b5061029161106d565b34801561040357600080fd5b50610291610412366004612f88565b611166565b34801561042357600080fd5b50610291610432366004612fcb565b611195565b34801561044357600080fd5b50610291610452366004613020565b611276565b34801561046357600080fd5b506102f7600f5481565b34801561047957600080fd5b506102f7600b5481565b34801561048f57600080fd5b5061029161049e36600461303d565b6113f7565b3480156104af57600080fd5b506102916104be366004612f88565b611471565b3480156104cf57600080fd5b506102916104de366004612f88565b611600565b3480156104ef57600080fd5b506102916104fe36600461306d565b611795565b34801561050f57600080fd5b506102f760075481565b34801561052557600080fd5b5061029161053436600461303d565b61180d565b34801561054557600080fd5b506102f760085481565b34801561055b57600080fd5b506010546105699060ff1681565b6040519015158152602001610301565b34801561058557600080fd5b5061029161059436600461308a565b611986565b3480156105a557600080fd5b50610291611a0b565b3480156105ba57600080fd5b506102f760095481565b3480156105d057600080fd5b506102916105df366004612f88565b611a36565b3480156105f057600080fd5b506102f760065481565b34801561060657600080fd5b50610291611a7e565b34801561061b57600080fd5b5061029161062a366004612f88565b611ab4565b34801561063b57600080fd5b506000546001600160a01b031661032a565b34801561065957600080fd5b506102f76106683660046130c5565b611af0565b34801561067957600080fd5b506106f361068836600461303d565b600d602090815260009283526040808420909152908252902080546001820154600283015460039093015461ffff83169363ffffffff62010000850416936001600160601b03600160301b820416936001600160701b03600160901b90920482169390821692911687565b6040805161ffff909816885263ffffffff90961660208801526001600160601b03909416948601949094526001600160701b0391821660608601528116608085015260a08401929092521660c082015260e001610301565b34801561075757600080fd5b506102f7600a5481565b34801561076d57600080fd5b5060055461032a906001600160a01b031681565b34801561078d57600080fd5b5061029161079c366004613020565b611b05565b3480156107ad57600080fd5b506102916107bc3660046130e7565b611b51565b3480156107cd57600080fd5b5060045461032a906001600160a01b031681565b3480156107ed57600080fd5b506102916107fc366004613020565b611d84565b34801561080d57600080fd5b5061056961081c366004613020565b60126020526000908152604090205460ff1681565b34801561083d57600080fd5b5061029161084c366004613020565b611dd2565b34801561085d57600080fd5b5061056961086c366004613020565b60116020526000908152604090205460ff1681565b34801561088d57600080fd5b506102f761089c36600461303d565b611e1e565b3480156108ad57600080fd5b506102916108bc366004612f88565b611f8d565b3480156108cd57600080fd5b506102916108dc366004613020565b61235d565b3480156108ed57600080fd5b506102916108fc366004613020565b6123a8565b34801561090d57600080fd5b5060035461032a906001600160a01b031681565b610929611a0b565b600954600b546109399190613115565b6007546109469190613142565b600655565b6002600154036109765760405162461bcd60e51b815260040161096d90613156565b60405180910390fd5b600260015561098733848484612440565b50506001805550565b6002600154036109b25760405162461bcd60e51b815260040161096d90613156565b60026001556040805160c08101825260008082526020808301829052828401829052606083018290526080830182905260a083018290523382527f81955a0a11e65eac625c29e8882660bae4e165a75d72780094acae8ece9a29ee90529190912034610a1d57600080fd5b610a2b62015180605a613115565b8311158015610a505750610a3f4284612ee2565b815462010000900463ffffffff1611155b610ab25760405162461bcd60e51b815260206004820152602d60248201527f6164644c69717569646974794e6f466565416e645374616b65203a204c6f636b60448201526c206f7574206f662072616e676560981b606482015260840161096d565b610abc6000611471565b60018101546001600160701b031615610ada57610ada600033612787565b6002546040516323b872dd60e01b8152336004820152306024820152604481018890526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610b31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b55919061318d565b50600c600081548110610b6a57610b6a6131aa565b60009182526020808320600392830201546001600160a01b03908116865230918601829052606086018890526080860189905260408087018b90524260a088018190529354600254915163f305d71960e01b81529183166004830152602482018c9052604482018a9052606482018b9052608482019390935260a48101939093521691908190839063f305d71990349060c40160606040518083038185885af1158015610c1b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c4091906131c0565b90935091503390506108fc610c5584346131ee565b6040518115909202916000818181858888f19350505050158015610c7d573d6000803e3d6000fd5b50835481908590601290610ca2908490600160901b90046001600160701b0316613201565b92506101000a8154816001600160701b0302191690836001600160701b031602179055506000861115610ce057610cdb336000886128d4565b610ceb565b610ceb60003361180d565b604080518281526020810188905260009133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a350506001805550505050505050565b600260015403610d5a5760405162461bcd60e51b815260040161096d90613156565b60026001819055506000600c8363ffffffff1681548110610d7d57610d7d6131aa565b6000918252602080832063ffffffff8088168552600d835260408086203387529093529190932080546003909302909301935042620100009092041610610e525760405162461bcd60e51b815260206004820152605860248201527f77697468647261773a20546f6b656e73206c6f636b65642c20696620796f752760448201527f726520747279696e6720746f20636c61696d20796f757220726577617264732060648201527f75736520746865206465706f7369742066756e6374696f6e0000000000000000608482015260a40161096d565b8054600160901b90046001600160701b03168311801590610e735750600083115b610eb45760405162461bcd60e51b81526020600482015260126024820152711dda5d1a191c985dce881b9bdd0819dbdbd960721b604482015260640161096d565b610ec38463ffffffff16611471565b60018101546001600160701b031615610f5957610ee68463ffffffff1633612787565b8054600160301b90046001600160601b031615610f59578054610f1a903390600160301b90046001600160601b0316612b34565b8054600282018054600160301b9092046001600160601b031691600090610f42908490612ee2565b90915550508054600160301b600160901b03191681555b8054610f76908490600160901b90046001600160701b03166131ee565b81546001600160701b0391909116600160901b026001600160901b039091161781558154610fae906001600160a01b03163385612b95565b610fbe8463ffffffff163361180d565b60405183815263ffffffff85169033907ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568906020015b60405180910390a35050600180555050565b600c818154811061101657600080fd5b60009182526020909120600390910201805460018201546002909201546001600160a01b03821693506001600160401b03600160a01b909204821692918216916001600160701b03600160401b9091048116911685565b6000546001600160a01b031633146110975760405162461bcd60e51b815260040161096d90613228565b43600f54116110f65760405162461bcd60e51b815260206004820152602560248201527f7374617274526577617264733a207265776172647320616c7265616479207374604482015264185c9d195960da1b606482015260840161096d565b43600f5560005b600c548110156111635743600c828154811061111b5761111b6131aa565b906000526020600020906003020160010160006101000a8154816001600160401b0302191690836001600160401b03160217905550808061115b9061325d565b9150506110fd565b50565b6000546001600160a01b031633146111905760405162461bcd60e51b815260040161096d90613228565b600b55565b6000546001600160a01b031633146111bf5760405162461bcd60e51b815260040161096d90613228565b80156111cd576111cd611a0b565b816001600160401b0316600c84815481106111ea576111ea6131aa565b6000918252602090912060039091020154600e5461121891600160a01b90046001600160401b0316906131ee565b6112229190612ee2565b600e8190555081600c848154811061123c5761123c6131aa565b906000526020600020906003020160000160146101000a8154816001600160401b0302191690836001600160401b03160217905550505050565b6000546001600160a01b031633146112a05760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03811660009081526011602052604090205460ff16156113135760405162461bcd60e51b815260206004820152602160248201527f726573637565546f6b656e203a2077726f6e6720746f6b656e206164647265736044820152607360f81b606482015260840161096d565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561135a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061137e9190613276565b60405163a9059cbb60e01b8152336004820152602481018290529091506001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156113ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113f2919061318d565b505050565b6002600154036114195760405162461bcd60e51b815260040161096d90613156565b600260019081556000838152600d602090815260408083206001600160a01b0386168452909152902001546001600160701b031661145657600080fd5b61145f82611471565b6114698282612787565b505060018055565b6000600c8281548110611486576114866131aa565b6000918252602090912060039091020160018101549091506001600160401b031643116114b1575050565b60028101546001600160701b03168015806114db57508154600160a01b90046001600160401b0316155b156115015750600101805467ffffffffffffffff1916436001600160401b031617905550565b600182015460009061151c906001600160401b031643611af0565b600e548454600654929350600092600160a01b9091046001600160401b0316906115469085613115565b6115509190613115565b61155a9190613142565b90508060085461156a9190612ee2565b60085560075461157b9082906131ee565b6007558261158e8264e8d4a51000613115565b6115989190613142565b60018501546115b79190600160401b90046001600160701b0316612ee2565b60019490940180546001600160b01b031916600160401b6001600160701b039096169590950267ffffffffffffffff191694909417436001600160401b03161790935550505050565b6002600154036116225760405162461bcd60e51b815260040161096d90613156565b6002600190815560105460ff161515146116895760405162461bcd60e51b815260206004820152602260248201527f6f6e6c79456d657267656e63793a20456d657267656e637920757365206f6e6c604482015261792160f01b606482015260840161096d565b6000600c828154811061169e5761169e6131aa565b60009182526020808320858452600d82526040808520338652909252908320805460018201546003949094029092016002810180549196509194600160901b9093046001600160701b0390811694811693916116fc9185911661328f565b82546001600160701b039182166101009390930a92830291909202199091161790555081546001830180546001600160701b0319908116909155600384018054909116905565ffffffffffff1682558254611761906001600160a01b03163383612b95565b604051818152849033907fbb757047c2b5f3974fe26b7c10f732e7bce710b0952a71082702781e62ae059590602001610ff4565b6000546001600160a01b031633146117bf5760405162461bcd60e51b815260040161096d90613228565b6010805460ff19168215159081179091556040805142815260208101929092527fff8db90c07460bbb951945fef7481379809de7701710f89abe56cbaa5216df1e910160405180910390a150565b6000600c8381548110611822576118226131aa565b60009182526020808320868452600d825260408085206001600160a01b0388168652909252908320600181015460026003909402909201928301549294509291611878916001600160701b03908116911661328f565b82546001600160701b03919091169150426201000090910463ffffffff1610156118a657815461ffff191682555b81546103e8906118ba9061ffff16826132af565b83546118da9161ffff1690600160901b90046001600160701b03166132ca565b6118e491906132f5565b6001830180546001600160701b0319166001600160701b0392909216918217905561190f9082612ee2565b6002840180546001600160701b0319166001600160701b039283161790556001808501549084015464e8d4a510009261195292600160401b9004811691166132ca565b61195c91906132f5565b60039290920180546001600160701b0319166001600160701b039093169290921790915550505050565b3360009081526012602052604090205460ff1615156001146119f95760405162461bcd60e51b815260206004820152602660248201527f6f6e6c79417574686f72697a65643a2061646472657373206e6f7420617574686044820152651bdc9a5e995960d21b606482015260840161096d565b611a0584848484612440565b50505050565b600c5460005b81811015611a3257611a2281611471565b611a2b8161325d565b9050611a11565b5050565b6000546001600160a01b03163314611a605760405162461bcd60e51b815260040161096d90613228565b600081118015611a70575060b481105b611a7957600080fd5b600955565b6000546001600160a01b03163314611aa85760405162461bcd60e51b815260040161096d90613228565b611ab26000612bf8565b565b6000546001600160a01b03163314611ade5760405162461bcd60e51b815260040161096d90613228565b600a8110611aeb57600080fd5b600a55565b6000611afc83836131ee565b90505b92915050565b6000546001600160a01b03163314611b2f5760405162461bcd60e51b815260040161096d90613228565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314611b7b5760405162461bcd60e51b815260040161096d90613228565b6001600160a01b038216600090815260116020526040902054829060ff1615611bf45760405162461bcd60e51b815260206004820152602560248201527f6e6f6e4475706c6963617465643a204c5020546f6b656e20616c726561647920604482015264185919195960da1b606482015260840161096d565b8115611c0257611c02611a0b565b6000600f544311611c1557600f54611c17565b435b9050846001600160401b0316600e54611c309190612ee2565b600e556001600160a01b039384166000818152601160209081526040808320805460ff19166001908117909155815160a0810183529485526001600160401b03998a169285019283529489169084019081526060840183815260808501848152600c80549788018155909452935160039095027fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c78101805493518b16600160a01b026001600160e01b031990941696909916959095179190911790965594517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c88301805492516001600160701b03908116600160401b026001600160b01b0319909416929098169190911791909117905592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c99093018054939094166001600160701b0319909316929092179092555050565b6000546001600160a01b03163314611dae5760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03166000908152601260205260409020805460ff19166001179055565b6000546001600160a01b03163314611dfc5760405162461bcd60e51b815260040161096d90613228565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b600080600c8481548110611e3457611e346131aa565b60009182526020808320878452600d825260408085206001600160a01b0389168652909252908320600180820154600390940290920191820154600283015492955090936001600160701b0393841693600160401b830481169316916001600160401b031643118015611ea657508115155b15611f81576001860154600090611ec6906001600160401b031643611af0565b600e548854600654929350600092600160a01b9091046001600160401b031690611ef09085613115565b611efa9190613115565b611f049190613142565b905083611f168264e8d4a51000613115565b611f209190613142565b611f2a9086612ee2565b87546003890154919650600160301b90046001600160601b0316906001600160701b031664e8d4a51000611f5e888a613115565b611f689190613142565b611f7291906131ee565b611f7c9190612ee2565b925050505b98975050505050505050565b600260015403611faf5760405162461bcd60e51b815260040161096d90613156565b600260019081553360009081527ffd54ff1ed53f34a900b24c5ba64f85761163b5d82d98a47b9bd80e45466993c56020526040902090611fee90611471565b80546003820154600c8054600093600160301b90046001600160601b0316926001600160701b03169164e8d4a5100091600190811061202f5761202f6131aa565b60009182526020909120600160039092020181015490860154612065916001600160701b03600160401b909104811691166132ca565b61206f91906132f5565b612079919061328f565b6120839190613201565b6001600160701b031690506000811161209b57600080fd5b604080516002808252606082018352600092602083019080368337505060045482519293506001600160a01b0316918391506000906120dc576120dc6131aa565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061210d5761210d6131aa565b60200260200101906001600160a01b031690816001600160a01b03168152505060085482111561213d5760085491505b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612186573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121aa9190613276565b60035460405163b6f9de9560e01b81529192506001600160a01b03169063b6f9de959085906121e390899087903090429060040161331b565b6000604051808303818588803b1580156121fc57600080fd5b505af1158015612210573d6000803e3d6000fd5b50506002546040516370a0823160e01b8152306004820152600094508593506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015612262573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122869190613276565b61229091906131ee565b8554909150819086906012906122b7908490600160901b90046001600160701b0316613201565b82546001600160701b039182166101009390930a9283029190920219909116179055508454600160301b600160901b0319168555600285018054859190600090612302908490612ee2565b90915550612313905060013361180d565b604080518281526000602082015260019133917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a350506001805550505050565b6000546001600160a01b031633146123875760405162461bcd60e51b815260040161096d90613228565b6001600160a01b03166000908152601260205260409020805460ff19169055565b6000546001600160a01b031633146123d25760405162461bcd60e51b815260040161096d90613228565b6001600160a01b0381166124375760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161096d565b61116381612bf8565b6000600c8481548110612455576124556131aa565b60009182526020808320878452600d825260408085206001600160a01b038b16865290925292206003909102909101915061248f85611471565b60018101546001600160701b0316156125ce57831580156124ae575082155b156125c4578054600382015460018481015490840154600093600160301b90046001600160601b0316926001600160701b039081169264e8d4a510009261250092600160401b909204821691166132ca565b61250a91906132f5565b612514919061328f565b61251e9190613201565b6001600160701b0316905080156125ad576125398782612b34565b8082600201600082825461254d9190612ee2565b90915550506001808401549083015464e8d4a5100091612580916001600160701b03600160401b909204821691166132ca565b61258a91906132f5565b6003830180546001600160701b0319166001600160701b03929092169190911790555b508054600160301b600160901b03191681556125ce565b6125ce8587612787565b8315612708576125e262015180605a613115565b831115801561260757506125f64284612ee2565b815462010000900463ffffffff1611155b61269f5760405162461bcd60e51b815260206004820152605f60248201527f6465706f736974203a204c6f636b206f7574206f662072616e6765206f72207060448201527f726576696f75736c79206c6f636b656420746f6b656e7320617265206c6f636b60648201527f6564206c6f6e676572207468616e206e65772064657369726564206c6f636b00608482015260a40161096d565b81546126b6906001600160a01b0316333087612c48565b80546126d3908590600160901b90046001600160701b0316612ee2565b81546001600160701b0391909116600160901b026001600160901b03909116178155600083900361270857612708858761180d565b8215612719576127198686856128d4565b8054426201000090910463ffffffff16101561273957612739858761180d565b604080518581526020810185905286916001600160a01b038916917f36af321ec8d3c75236829c5317affd40ddb308863a1236d2d277a4025cccee1e910160405180910390a3505050505050565b6000828152600d602090815260408083206001600160a01b03851684529091528120600c8054919291859081106127c0576127c06131aa565b600091825260208220600385810154920201600181810154908601549194506001600160701b039283169264e8d4a510009261280692600160401b9004821691166132ca565b61281091906132f5565b61281a919061328f565b6001600160701b0316905080156128cd5782548190849060069061284f908490600160301b90046001600160601b0316613385565b82546001600160601b039182166101009390930a9283029190920219909116179055506001828101549084015464e8d4a51000916128a0916001600160701b03600160401b909204821691166132ca565b6128aa91906132f5565b6003840180546001600160701b0319166001600160701b03929092169190911790555b5050505050565b6000828152600d602090815260408083206001600160a01b038716845290915290208054600160901b90046001600160701b03166129545760405162461bcd60e51b815260206004820152601d60248201527f6c6f636b546f6b656e733a204e6f20746f6b656e7320746f206c6f636b000000604482015260640161096d565b61295e8242612ee2565b815462010000900463ffffffff1611156129c45760405162461bcd60e51b815260206004820152602160248201527f6c6f636b546f6b656e733a20546f6b656e7320616c7265616479206c6f636b656044820152601960fa1b606482015260840161096d565b62015180821015612a175760405162461bcd60e51b815260206004820152601f60248201527f6c6f636b546f6b656e733a204c6f636b2074696d6520746f6f2073686f727400604482015260640161096d565b612a2562015180605a613115565b821115612a745760405162461bcd60e51b815260206004820152601e60248201527f6c6f636b546f6b656e733a204c6f636b2074696d6520746f6f206c6f6e670000604482015260640161096d565b612a7e8242612ee2565b815463ffffffff91909116620100000265ffffffff000019909116178155612aaa62015180605a613115565b82600a546103e8612abb9190613115565b612ac59190613115565b612acf9190613142565b815461ffff191661ffff91909116178155612aea838561180d565b60408051428152602081018490526001600160a01b038616917fd741e738a23fd18a03a26522320d9fc6cac1fed483e215ea9150fbc2fc43385d910160405180910390a250505050565b600854811115612b4357506008545b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015612b79573d6000803e3d6000fd5b508060086000828254612b8c91906131ee565b90915550505050565b6040516001600160a01b0383166024820152604481018290526113f290849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612c80565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b0380851660248301528316604482015260648101829052611a059085906323b872dd60e01b90608401612bc1565b6000612cd5826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d529092919063ffffffff16565b8051909150156113f25780806020019051810190612cf3919061318d565b6113f25760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161096d565b6060612d618484600085612d6b565b90505b9392505050565b606082471015612dcc5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161096d565b843b612e1a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161096d565b600080866001600160a01b03168587604051612e3691906133c9565b60006040518083038185875af1925050503d8060008114612e73576040519150601f19603f3d011682016040523d82523d6000602084013e612e78565b606091505b5091509150612e88828286612e93565b979650505050505050565b60608315612ea2575081612d64565b825115612eb25782518084602001fd5b8160405162461bcd60e51b815260040161096d91906133e5565b634e487b7160e01b600052601160045260246000fd5b80820180821115611aff57611aff612ecc565b600080600060608486031215612f0a57600080fd5b505081359360208301359350604090920135919050565b60008060008060808587031215612f3757600080fd5b5050823594602084013594506040840135936060013592509050565b60008060408385031215612f6657600080fd5b823563ffffffff81168114612f7a57600080fd5b946020939093013593505050565b600060208284031215612f9a57600080fd5b5035919050565b80356001600160401b0381168114612fb857600080fd5b919050565b801515811461116357600080fd5b600080600060608486031215612fe057600080fd5b83359250612ff060208501612fa1565b9150604084013561300081612fbd565b809150509250925092565b6001600160a01b038116811461116357600080fd5b60006020828403121561303257600080fd5b8135612d648161300b565b6000806040838503121561305057600080fd5b8235915060208301356130628161300b565b809150509250929050565b60006020828403121561307f57600080fd5b8135612d6481612fbd565b600080600080608085870312156130a057600080fd5b84356130ab8161300b565b966020860135965060408601359560600135945092505050565b600080604083850312156130d857600080fd5b50508035926020909101359150565b6000806000606084860312156130fc57600080fd5b61310584612fa1565b92506020840135612ff08161300b565b8082028115828204841417611aff57611aff612ecc565b634e487b7160e01b600052601260045260246000fd5b6000826131515761315161312c565b500490565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60006020828403121561319f57600080fd5b8151612d6481612fbd565b634e487b7160e01b600052603260045260246000fd5b6000806000606084860312156131d557600080fd5b8351925060208401519150604084015190509250925092565b81810381811115611aff57611aff612ecc565b6001600160701b0381811683821601908082111561322157613221612ecc565b5092915050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006001820161326f5761326f612ecc565b5060010190565b60006020828403121561328857600080fd5b5051919050565b6001600160701b0382811682821603908082111561322157613221612ecc565b61ffff81811683821601908082111561322157613221612ecc565b6001600160701b038181168382160280821691908281146132ed576132ed612ecc565b505092915050565b60006001600160701b038084168061330f5761330f61312c565b92169190910492915050565b600060808201868352602060808185015281875180845260a086019150828901935060005b818110156133655784516001600160a01b031683529383019391830191600101613340565b50506001600160a01b039690961660408501525050506060015292915050565b6001600160601b0381811683821601908082111561322157613221612ecc565b60005b838110156133c05781810151838201526020016133a8565b50506000910152565b600082516133db8184602087016133a5565b9190910192915050565b60208152600082518060208401526134048160408501602087016133a5565b601f01601f1916919091016040019291505056fea26469706673582212209a2660d3f74918e038794daa20771163a6bcebd9840c3b28dc0516545517cfcc64736f6c63430008110033

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

000000000000000000000000b685145d7f127b9093d7f9278bae902ef59ff4860000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d

-----Decoded View---------------
Arg [0] : _freqAI (address): 0xB685145D7F127b9093d7f9278BaE902EF59Ff486
Arg [1] : _router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b685145d7f127b9093d7f9278bae902ef59ff486
Arg [1] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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