ETH Price: $3,310.07 (-0.75%)

Contract

0x2D50efbc3690b6D0Ea0B179C18F016ae9031c00a
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Withdraw191756502024-02-07 10:13:35344 days ago1707300815IN
0x2D50efbc...e9031c00a
0 ETH0.0012370428.00390382
Withdraw191756452024-02-07 10:12:35344 days ago1707300755IN
0x2D50efbc...e9031c00a
0 ETH0.0009352426.61242168
Collect LP Fees191750372024-02-07 8:10:23344 days ago1707293423IN
0x2D50efbc...e9031c00a
0 ETH0.0030963429.55627546
Collect LP Fees191750362024-02-07 8:10:11344 days ago1707293411IN
0x2D50efbc...e9031c00a
0 ETH0.0030057128.6911581
Deposit Weth190717452024-01-23 20:28:47358 days ago1706041727IN
0x2D50efbc...e9031c00a
0.002 ETH0.0007474113.11790867
Withdraw190146292024-01-15 20:20:11366 days ago1705350011IN
0x2D50efbc...e9031c00a
0 ETH0.0014962628.55792455
Mine189832362024-01-11 10:57:47371 days ago1704970667IN
0x2D50efbc...e9031c00a
0.2 ETH0.0086705325.88026695
Mine189777912024-01-10 16:38:11371 days ago1704904691IN
0x2D50efbc...e9031c00a
1 ETH0.0166298649.77824253
Update Rate Nume...189740272024-01-10 4:00:47372 days ago1704859247IN
0x2D50efbc...e9031c00a
0 ETH0.0006883228.7737706
Mine189602462024-01-08 5:32:23374 days ago1704691943IN
0x2D50efbc...e9031c00a
0.03 ETH0.0075901822.90138932
Mine189602462024-01-08 5:32:23374 days ago1704691943IN
0x2D50efbc...e9031c00a
0.02 ETH0.0082123122.89307757
Mine189601422024-01-08 5:10:35374 days ago1704690635IN
0x2D50efbc...e9031c00a
0.001 ETH0.0106029530.08093267
Mine189591122024-01-08 1:39:59374 days ago1704677999IN
0x2D50efbc...e9031c00a
0.05 ETH0.0088783126.34296067
Mine189591112024-01-08 1:39:47374 days ago1704677987IN
0x2D50efbc...e9031c00a
0.1 ETH0.0087810426.05342021
Mine189591102024-01-08 1:39:35374 days ago1704677975IN
0x2D50efbc...e9031c00a
0.1 ETH0.0084451224.64929829
Mine189591092024-01-08 1:39:23374 days ago1704677963IN
0x2D50efbc...e9031c00a
0.05 ETH0.0087019125.81863818
Mine189591082024-01-08 1:39:11374 days ago1704677951IN
0x2D50efbc...e9031c00a
0.1 ETH0.0081116424.06903505
Mine189591072024-01-08 1:38:59374 days ago1704677939IN
0x2D50efbc...e9031c00a
0.1 ETH0.0079159923.46807901
Mine189591062024-01-08 1:38:47374 days ago1704677927IN
0x2D50efbc...e9031c00a
0.05 ETH0.0088454824.59230271
Mine189568652024-01-07 18:04:47374 days ago1704650687IN
0x2D50efbc...e9031c00a
0.02 ETH0.0126341233.53103871
Mine189547582024-01-07 10:56:59375 days ago1704625019IN
0x2D50efbc...e9031c00a
0.05 ETH0.0084216625.47071021
Mine189547582024-01-07 10:56:59375 days ago1704625019IN
0x2D50efbc...e9031c00a
1.3 ETH0.0088097124.47171021
Mine189545702024-01-07 10:18:59375 days ago1704622739IN
0x2D50efbc...e9031c00a
0.01 ETH0.0101265931.88314024
Mine189545672024-01-07 10:18:23375 days ago1704622703IN
0x2D50efbc...e9031c00a
0.01 ETH0.010042731.6200022
Mine189545662024-01-07 10:18:11375 days ago1704622691IN
0x2D50efbc...e9031c00a
0.01 ETH0.000907532.55509252
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
190717452024-01-23 20:28:47358 days ago1706041727
0x2D50efbc...e9031c00a
0.002 ETH
189832362024-01-11 10:57:47371 days ago1704970667
0x2D50efbc...e9031c00a
0.2 ETH
189777912024-01-10 16:38:11371 days ago1704904691
0x2D50efbc...e9031c00a
1 ETH
189723512024-01-09 22:22:23372 days ago1704838943
0x2D50efbc...e9031c00a
0.15 ETH
189723512024-01-09 22:22:23372 days ago1704838943
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
189723502024-01-09 22:22:11372 days ago1704838931
0x2D50efbc...e9031c00a
0.15 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MiningRigV3

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 5000 runs

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

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { SafeERC20 } from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import { INonfungiblePositionManager, ISwapRouter } from './Helpers/UpInterfaces.sol';
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import { ISpawnManager } from './Spawning/ISpawnManager.sol';
import { IActiveChecker } from './Spawning/IActiveChecker.sol';
import { IUniswapV3Pool } from '@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol';
import { IUniswapV3Factory } from '@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol';
import { MerkleProof } from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import { MathHelpers } from './Helpers/MathHelpers.sol';
import { ExecutorManager } from './Helpers/ExecutorManager.sol';

interface IWETH is IERC20 {
    function deposit() external payable;
    function withdraw(uint amount) external;
}

contract MiningClaims {
    event ClaimBooster(address indexed claimer, uint256 boosterId);

    error CannotClaimUserBooster();
    error InvalidUserBooster();
    error BoosterInactive();

    struct UserAddedBooster {
        bytes32 merkleRoot;
        string treeDataURI;
        uint256 boosterRate;
        uint256 boostType;
        bool active;
    }

    mapping(uint256 => mapping(address => bool)) private _claimedByAddress;
    uint256 internal _currentUserBoostID = 0;
    mapping(uint256 => UserAddedBooster) private _userBoosters;

    modifier _validUserBoosterId(uint256 id) {
        if (_currentUserBoostID == 0 || id > _currentUserBoostID) revert InvalidUserBooster();
        if (_userBoosters[id].active != true) revert BoosterInactive();
        _;
    }

    function _addUserBoostTree(bytes32 _merkleRoot, string calldata _treeDataURI, uint256 _boosterRate, uint256 _boostType) internal {
        _userBoosters[++_currentUserBoostID] = UserAddedBooster({
            merkleRoot: _merkleRoot,
            active: true,
            treeDataURI: _treeDataURI,
            boosterRate: _boosterRate,
            boostType: _boostType
        });
    }

    function _inactivateBooster(uint256 _id) _validUserBoosterId(_id) internal {
        _userBoosters[_id].active = false;
    }

    function _readUserBoosterTree(uint256 _id) internal view _validUserBoosterId(_id) returns (UserAddedBooster memory) {
        return _userBoosters[_id];
    }

    function _canClaimUserBoost(
        address _address,
        uint256 _userBoostId,
        bytes32[] calldata merkleProof
    ) _validUserBoosterId(_userBoostId) internal view returns (bool) {
        if (_claimedByAddress[_userBoostId][_address]) {
            return(false);
        }

        return(MerkleProof.verify(
            merkleProof,
            _userBoosters[_userBoostId].merkleRoot,
            keccak256(bytes.concat(keccak256(abi.encode(_address))))
        ));
    }

    function _claimUserBoost(
        address _address,
        uint256 _boosterId,
        bytes32[] calldata _merkleProof
    ) _validUserBoosterId(_boosterId) internal returns(uint256) {
        if (_canClaimUserBoost(_address, _boosterId, _merkleProof) != true) revert CannotClaimUserBooster();
        _claimedByAddress[_boosterId][_address] = true;
        return(_userBoosters[_boosterId].boosterRate);
    }

    function _claimMultipleUserBoosts(
        address _address,
        uint256[] calldata _boosterIDs,
        bytes32[][] calldata _merkleProofs
    ) internal returns(uint256 sum) {
        require(_boosterIDs.length == _merkleProofs.length, 'Length Mismatch');

        for (uint256 i = 0; i < _boosterIDs.length; i++) {
            sum += _claimUserBoost(_address, _boosterIDs[i], _merkleProofs[i]);
        }

        return(sum);
    }
}

contract RigTokenBoosterManager is MathHelpers {
    error BoosterOverMaxCycle();
    error BoosterDepositLimitReached();
    error BoosterEnded();
    error BoosterDoesNotExist(uint256 boosterId);

    struct TokenBoosterParams {
        IERC20 token;
        uint256 multiplier;
        uint256 boosterLastsFor; // Zero is infinite
        uint256 maxDepositAmount;
        uint256 maxCycles;
        uint256 usesPerCycle;
    }

    struct TokenBooster {
        IERC20 token;
        uint256 multiplier;
        uint256 boosterStartTime;
        uint256 boosterEndTime; // Zero is infinite
        bool ended;
        uint256 useCount;
        uint256 totalDeposited;
        uint256 maxDepositAmount;
        uint256 maxCycles;
        uint256 usesPerCycle;
    }

    mapping(uint256 => TokenBooster) internal _tokenBoosters;
    uint256 private _nextTokenBoosterId;

    modifier validTokenBoosterId(uint256 boosterId) {
        if (boosterId == 0 || _nextTokenBoosterId < boosterId) revert BoosterDoesNotExist(boosterId);
        if (_tokenBoosters[boosterId].ended) revert BoosterEnded();
        _;
    }

    function _addTokenBooster(TokenBoosterParams calldata params) internal {
        uint256 boosterEndTime;

        if (params.boosterLastsFor != 0) {
            boosterEndTime = block.timestamp + params.boosterLastsFor;
        }

        _tokenBoosters[++_nextTokenBoosterId] = TokenBooster({
            token: params.token,
            multiplier: params.multiplier,
            boosterStartTime: block.timestamp,
            useCount: 0,
            ended: false,
            boosterEndTime: boosterEndTime,
            totalDeposited: 0,
            maxDepositAmount: params.maxDepositAmount,
            usesPerCycle: params.usesPerCycle,
            maxCycles: params.maxCycles
        });
    }

    function _getCurrentTokenBoosterId() internal view returns (uint256) {
        return(_nextTokenBoosterId);
    }

    function _getTokenBooster(uint256 boosterId) validTokenBoosterId(boosterId) internal view returns (TokenBooster memory) {
        return(_tokenBoosters[boosterId]);
    }

    function _endBooster(uint256 boosterId) internal {
        require(_tokenBoosters[boosterId].boosterEndTime < block.timestamp, 'Not Ended');
        _tokenBoosters[boosterId].ended = true;
    }

    function _computeTokenBoosterCycleState(uint256 uses, uint256 usesPerCycle, uint256 multiplier) internal pure returns (uint256 currentCycle, uint256 newMultiplier) {
        currentCycle = uses / usesPerCycle;
        newMultiplier = multiplier - ((multiplier * (uses - (currentCycle * usesPerCycle))) / usesPerCycle) + divisionDenominator;
        return(currentCycle, newMultiplier);
    }

    function _incrementBoosterCycleAndGetMultiplier(uint256 _tokenBoosterId) internal returns(uint256) {
        (uint256 boosterCycle, uint256 newMultiplier) = _computeTokenBoosterCycleState(++_tokenBoosters[_tokenBoosterId].useCount, _tokenBoosters[_tokenBoosterId].usesPerCycle, _tokenBoosters[_tokenBoosterId].multiplier);
        if (boosterCycle > _tokenBoosters[_tokenBoosterId].maxCycles) revert BoosterOverMaxCycle();
        return(newMultiplier);
    }

    function _updateBoosterTotalDeposited(uint256 _tokenBoosterId, uint256 _amount) internal {
        // Add the new amount to totalDeposited and check if it is over the max amount
        if ((_tokenBoosters[_tokenBoosterId].totalDeposited += _amount) > _tokenBoosters[_tokenBoosterId].maxDepositAmount) {
            revert BoosterDepositLimitReached();
        }
    }
}

contract MiningRigV3 is ReentrancyGuard, IActiveChecker, MiningClaims, MathHelpers, RigTokenBoosterManager, ExecutorManager {
    event Mine(address indexed miner, uint256 inputAmount, uint256 boosterId, uint256 outputAmount);

    error LPNotInitalized();
    error MiningInvalidValue();
    error BoosterNotWETH();
    error ExceedsMax();
    error UpdateUsedToInvalid();
    error InvalidUseCount();
    error InitialLPAlreadyCreated();

    enum VirtualWeight { LOW, MEDIUM, HIGH }

    IWETH public wethContract;
    IERC20 public pepeContract;
    IERC20 public pondContract;


    uint256 public divisionLP = 20;
    uint24 public poolFee = 3000;
    int24 public delta = 1111;
    IUniswapV3Factory public uniswapFactory;
    ISwapRouter public uniswapRouter;
    INonfungiblePositionManager public nonfungiblePositionManager;

    address public distilleryAddress;

    uint256[] lpTokenIDs;
    uint256 additionalSwapDeadline = 0 seconds;

    uint256 public cycleIndex = 0;
    mapping(address => mapping(uint256 => uint256)) public minedPerCycle;

    uint256 public activeMinedThreshold = 1 ** 18;

    uint256 public usesToOpenSpawn = 5000;
    uint256 public usesLeftForSpawn = 5000;

    uint256 public rateNumerator = 0;

    ISpawnManager public spawnManager;
    
    constructor(
        IWETH _wethContract,
        IERC20 _pepeContract,
        IERC20 _pondContract,
        ISwapRouter _uniswapRouter,
        INonfungiblePositionManager _nonfungiblePositionManager,
        address _distilleryAddress,
        ISpawnManager _spawnManager,
        IUniswapV3Factory _uniswapFactory
    ) {
        _addExecutor(msg.sender);
        _addExecutor(_distilleryAddress);

        wethContract = _wethContract;
        pepeContract = _pepeContract;
        pondContract = _pondContract;
        uniswapRouter = _uniswapRouter;
        distilleryAddress = _distilleryAddress;
        nonfungiblePositionManager = _nonfungiblePositionManager;
        spawnManager = _spawnManager;
        uniswapFactory = _uniswapFactory;

        wethContract.approve(address(uniswapRouter), type(uint256).max);
        wethContract.approve(address(nonfungiblePositionManager), type(uint256).max);
        pepeContract.approve(address(nonfungiblePositionManager), type(uint256).max);
        pepeContract.approve(address(uniswapRouter), type(uint256).max);
        pepeContract.approve(address(spawnManager), type(uint256).max);
    }

    function updateSpawnManager(ISpawnManager _spawnManager) onlyExecutor() external {
        spawnManager = _spawnManager;
    }

    function updateDelta(int24 _delta) onlyExecutor() external {
        delta = _delta;
    }

    function updatePoolFee(uint24 _poolFee) onlyExecutor() external {
        poolFee = _poolFee;
    }

    function updateUniswapFactory(IUniswapV3Factory _uniswapFactory) onlyExecutor() external {
        uniswapFactory = _uniswapFactory;
    }

    function updateSpawnValue(uint256 _usesToOpenSpawn, bool updateUsed, uint256 updateUsedTo) onlyExecutor() external {
        usesToOpenSpawn = _usesToOpenSpawn;

        if ((updateUsedTo == 0) == updateUsed) revert UpdateUsedToInvalid(); 

        if (updateUsed) {
            usesLeftForSpawn = updateUsedTo;
        }
    }

    
    function addTokenBooster(TokenBoosterParams calldata params) onlyExecutor() external {
        params.token.approve(address(uniswapRouter), type(uint256).max);
        _addTokenBooster(params);
    }

    function getTokenBooster(uint256 tokenBoosterId) external view returns (TokenBooster memory) {
        return(_getTokenBooster(tokenBoosterId));
    }

    function _updateMinedForCurrentCycle(address _address, uint256 additionalAmount) private {
        minedPerCycle[_address][cycleIndex] += additionalAmount;
    }

    function isActive(address toCheck) external view returns (bool) {
        return(minedPerCycle[toCheck][cycleIndex] > activeMinedThreshold);
    }

    function latestLPToken() public view returns (uint256) {
        if (lpTokenIDs.length == 0) revert LPNotInitalized();
        return lpTokenIDs[lpTokenIDs.length - 1];
    }

    function readLPTokens() external view returns (uint256[] memory) {
        return(lpTokenIDs);
    }

    function _mintLiquidityPosition(uint desiredPepeAmount, uint desiredWethAmount) internal returns (uint256 tokenId, uint128 liquidity, uint256 pepeAmount, uint256 wethAmount) {
        int24 tickSpacing = 60;

        // (, int24 tick) = sqrt96Tick(pepeContract);
        int24 tick = _getTick(pepeContract);

        (tokenId, liquidity, pepeAmount, wethAmount) = nonfungiblePositionManager.mint(INonfungiblePositionManager.MintParams({
            token0: address(pepeContract),
            token1: address(wethContract),
            fee: poolFee,
            tickLower: ((tick - delta) / tickSpacing) * tickSpacing,
            tickUpper: ((tick + delta) / tickSpacing) * tickSpacing,
            amount0Desired: desiredPepeAmount,
            amount1Desired: desiredWethAmount,
            amount0Min: 0,
            amount1Min: 0,
            recipient: address(this),
            deadline: block.timestamp
        }));

        lpTokenIDs.push(tokenId);

        return (tokenId, liquidity, pepeAmount, wethAmount);
    }

    function virtualWeightCast(VirtualWeight _weight) internal pure returns (uint256){
        return 16 * (16 + uint(_weight));
    }

    function _decreaseAndDistill(uint256 tokenId) internal returns(uint256 pepeAmount, uint256 wethAmount) {
        (,,,,,,,uint128 liquidity,,,,) = nonfungiblePositionManager.positions(tokenId);

        (pepeAmount, wethAmount) = nonfungiblePositionManager.decreaseLiquidity(INonfungiblePositionManager.DecreaseLiquidityParams({
            tokenId: tokenId,
            liquidity: liquidity,
            amount0Min: 0,
            amount1Min: 0,
            deadline: block.timestamp
        }));
    }

    function createInitialLP(uint256 pepeAmount, uint256 wethAmount) external onlyExecutor() {
        if(lpTokenIDs.length != 0) revert InitialLPAlreadyCreated();

        require(wethContract.transferFrom(msg.sender, address(this), wethAmount), "Could not transfer WETH");
        require(pepeContract.transferFrom(msg.sender, address(this), pepeAmount), "Could not transfer pepe");

        (,,uint256 addedPepe, uint256 addedWeth) = _mintLiquidityPosition(pepeAmount, wethAmount);

        if (addedPepe < pepeAmount) {
            require(pepeContract.transfer(msg.sender, pepeAmount - addedPepe), "Could not return pepe");
        }

        if (addedWeth < wethAmount) {
            require(wethContract.transfer(msg.sender, wethAmount - addedWeth), "Could not return weth");
        }
    }

    function _addLiquidity(uint256 pepeAmount, uint256 wethAmount) internal returns (uint128 liquidity, uint256 pepeValue, uint256 weight) {
        return nonfungiblePositionManager.increaseLiquidity(INonfungiblePositionManager.IncreaseLiquidityParams({
            tokenId: latestLPToken(),
            // virtualWeightCast move to earlier
            amount0Desired: pepeAmount,
            amount1Desired: wethAmount,
            amount0Min: 0,
            amount1Min: 0,
            deadline: block.timestamp + additionalSwapDeadline
        }));
    }

    function _collectLPFees(uint256 _lpTokenId, address recipient) internal returns (uint256, uint256) {
        return nonfungiblePositionManager.collect(INonfungiblePositionManager.CollectParams({
            tokenId: _lpTokenId,
            recipient: recipient,
            amount0Max: type(uint128).max,
            amount1Max: type(uint128).max
        }));
    }

    function collectLPFees(uint256 _lpTokenId) external {
        _collectLPFees(_lpTokenId, distilleryAddress);
    }

    function _swapTokens(IERC20 from, IERC20 to, uint256 amountIn) internal returns (uint256) {
        return uniswapRouter.exactInputSingle(ISwapRouter.ExactInputSingleParams({
            tokenIn: address(from),
            tokenOut: address(to),
            fee: poolFee,
            recipient: address(this),
            deadline: block.timestamp + additionalSwapDeadline,
            amountIn: amountIn,
            amountOutMinimum: 2,
            sqrtPriceLimitX96: 0
        }));
    }

    function _weightLPDown(uint256 amount) internal pure returns (uint256) {
        return amount / virtualWeightCast(VirtualWeight.LOW);
    }

    function updateRateNumerator(uint256 _rateNumerator) onlyExecutor() external {
        rateNumerator = _rateNumerator;
    }

    function updateDivisionLP(uint256 _divisionLP) onlyExecutor() external {
        divisionLP = _divisionLP;
    }

    function updateActiveMinedThreshold(uint256 _activeMinedThreshold) onlyExecutor() external {
        activeMinedThreshold = _activeMinedThreshold;
    }

    function computeBoosterCycleState(uint256 uses, uint256 usesPerCycle, uint256 multiplier) external pure returns (uint256 currentCycle, uint256 newMultiplier) {
        return(_computeTokenBoosterCycleState(uses, usesPerCycle, multiplier));
    }

    function _getTick(IERC20 _token) internal view returns (int24) {
        IUniswapV3Pool _pool = IUniswapV3Pool(uniswapFactory.getPool(address(_token), address(wethContract), poolFee));
        (,int24 tick,,,,,) = _pool.slot0();
        return (tick);
    }

    function _remint() internal {
        (uint256 distilledPepe, uint256 distilledWETH) = _decreaseAndDistill(latestLPToken());

        _mintLiquidityPosition(distilledPepe / divisionLP, distilledWETH / divisionLP);

        uint256 spawnAmount = pepeContract.balanceOf(address(this));
        spawnManager.createSpawn(spawnAmount);
        pepeContract.transfer(address(spawnManager), spawnAmount);
    }

    function _swapToWETHIfNeeded(IERC20 _inToken, uint256 _inAmount) private returns (uint256 wethOut) {
        if (address(_inToken) == address(wethContract)) {
            return(_inAmount);
        } else {
            return(_swapTokens(_inToken, wethContract, _inAmount));
        }
    }

    function _mine(
        address _miner,
        uint256 _tokenBoosterId,
        uint256 _amount,
        uint256[] calldata _userBoostIDs,
        bytes32[][] calldata _userBoostMerkleProofs
    ) private returns(uint256 pndcAmount, uint256 boosterMultiplier) {
        _updateBoosterTotalDeposited(_tokenBoosterId, _amount);

        uint256 wethValue = _amount;
        if (address(_tokenBoosters[_tokenBoosterId].token) != address(wethContract)) {
            wethValue = _swapTokens(_tokenBoosters[_tokenBoosterId].token, wethContract, _amount);
        }

        _updateMinedForCurrentCycle(_miner, wethValue);

        uint256 toConvertWeth = wethValue >> 1;
        uint256 recievedPepe = _swapTokens(wethContract, pepeContract, toConvertWeth);

        (,,uint256 liquidity) = _addLiquidity(_weightLPDown(recievedPepe), _weightLPDown(wethValue - toConvertWeth));

        uint256 additionalBoosterWeight = 0;
        if ((_userBoostIDs.length + _userBoostMerkleProofs.length) > 0) {
            additionalBoosterWeight = _claimMultipleUserBoosts(_miner, _userBoostIDs, _userBoostMerkleProofs);
        }

        boosterMultiplier = _incrementBoosterCycleAndGetMultiplier(_tokenBoosterId);

        // Perform rewards calc here
        pndcAmount = _multiplyWithNumerator(_multiplyWithNumerator(liquidity, rateNumerator), boosterMultiplier + additionalBoosterWeight);

        if (pndcAmount == 0) revert MiningInvalidValue();

        require(pondContract.transfer(_miner, pndcAmount));

        if (--usesLeftForSpawn == 0) {
            _remint();

            if (++cycleIndex < 5) {
                usesToOpenSpawn = 5000 - (cycleIndex * 1000);
            }

            usesLeftForSpawn = usesToOpenSpawn;
        }

        emit Mine(_miner, _amount, _tokenBoosterId, pndcAmount);

        return(pndcAmount, boosterMultiplier);
    }

    function mine(
        uint256 _tokenBoosterId,
        uint256 _amount,
        uint256[] calldata _userBoostIDs,
        bytes32[][] calldata _userBoostMerkleProofs
    ) nonReentrant validTokenBoosterId(_tokenBoosterId) external payable returns(uint256 pndcAmount, uint256 boosterMultiplier) {
        if (_amount == 0) revert MiningInvalidValue();

        if (msg.value != 0) {
            if (msg.value != _amount) revert MiningInvalidValue();
            if (address(_tokenBoosters[_tokenBoosterId].token) != address(wethContract)) revert BoosterNotWETH();
            wethContract.deposit{ value: msg.value }();
        } else {
            SafeERC20.safeTransferFrom(_tokenBoosters[_tokenBoosterId].token, msg.sender, address(this), _amount);
        }

        return(_mine(msg.sender, _tokenBoosterId, _amount, _userBoostIDs, _userBoostMerkleProofs));
    }

    function depositWeth() external payable {
        wethContract.deposit{ value: address(this).balance }();
    }

    function deposit(IERC20 token, uint256 amount) external onlyExecutor() {
        token.transferFrom(msg.sender, address(this), amount);
    }

    function withdraw(IERC20 token, uint256 amount) external onlyExecutor() {
        token.transfer(msg.sender, amount);
    }

    function addUserBoostTree(bytes32 _merkleRoot, string calldata _treeDataURI, uint256 _boosterRate, uint256 _boosterType) external onlyExecutor() {
        _addUserBoostTree(_merkleRoot, _treeDataURI, _boosterRate, _boosterType);
    }

    function readUserBoosterTree(uint256 id) external view returns (UserAddedBooster memory) {
        return(_readUserBoosterTree(id));
    }

    function canClaimUserBoost(
        address _address,
        uint256 _event,
        bytes32[] calldata merkleProof
    ) external view returns (bool) {
        return(_canClaimUserBoost(_address, _event, merkleProof));
    }

    function currentUserBoostID() external view returns(uint256) {
        return(_currentUserBoostID);
    }

    function getCurrentTokenBoosterId() external view returns (uint256 currentTokenBoosterId){
        return(_getCurrentTokenBoosterId());
    }

    function addExecutor(address _toAdd) onlyExecutor external override {
        pepeContract.approve(_toAdd, type(uint256).max);
        wethContract.approve(_toAdd, type(uint256).max);
        pondContract.approve(_toAdd, type(uint256).max);
        _addExecutor(_toAdd);
    }

    function removeExecutor(address _toRemove) onlyExecutor external override {
        pepeContract.approve(_toRemove, 0);
        wethContract.approve(_toRemove, 0);
        pondContract.approve(_toRemove, 0);
        _removeExecutor(_toRemove);
    }

    function endTokenBooster(uint256 tokenBoosterId) onlyExecutor() external {
        _endBooster(tokenBoosterId);
    }
}

File 2 of 20 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

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

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 3 of 20 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 20 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 5 of 20 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    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));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    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");
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
     * Revert on invalid signature.
     */
    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return
            success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
    }
}

File 6 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     *
     * Furthermore, `isContract` will also return true if the target contract within
     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
     * which only has an effect at the end of a transaction.
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/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.8.0/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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 7 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.2) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 proofLen = proof.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proofLen - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i]
                ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++])
                : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            require(proofPos == proofLen, "MerkleProof: invalid multiproof");
            unchecked {
                return hashes[totalHashes - 1];
            }
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 8 of 20 : IUniswapV3Factory.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title The interface for the Uniswap V3 Factory
/// @notice The Uniswap V3 Factory facilitates creation of Uniswap V3 pools and control over the protocol fees
interface IUniswapV3Factory {
    /// @notice Emitted when the owner of the factory is changed
    /// @param oldOwner The owner before the owner was changed
    /// @param newOwner The owner after the owner was changed
    event OwnerChanged(address indexed oldOwner, address indexed newOwner);

    /// @notice Emitted when a pool is created
    /// @param token0 The first token of the pool by address sort order
    /// @param token1 The second token of the pool by address sort order
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks
    /// @param pool The address of the created pool
    event PoolCreated(
        address indexed token0,
        address indexed token1,
        uint24 indexed fee,
        int24 tickSpacing,
        address pool
    );

    /// @notice Emitted when a new fee amount is enabled for pool creation via the factory
    /// @param fee The enabled fee, denominated in hundredths of a bip
    /// @param tickSpacing The minimum number of ticks between initialized ticks for pools created with the given fee
    event FeeAmountEnabled(uint24 indexed fee, int24 indexed tickSpacing);

    /// @notice Returns the current owner of the factory
    /// @dev Can be changed by the current owner via setOwner
    /// @return The address of the factory owner
    function owner() external view returns (address);

    /// @notice Returns the tick spacing for a given fee amount, if enabled, or 0 if not enabled
    /// @dev A fee amount can never be removed, so this value should be hard coded or cached in the calling context
    /// @param fee The enabled fee, denominated in hundredths of a bip. Returns 0 in case of unenabled fee
    /// @return The tick spacing
    function feeAmountTickSpacing(uint24 fee) external view returns (int24);

    /// @notice Returns the pool address for a given pair of tokens and a fee, or address 0 if it does not exist
    /// @dev tokenA and tokenB may be passed in either token0/token1 or token1/token0 order
    /// @param tokenA The contract address of either token0 or token1
    /// @param tokenB The contract address of the other token
    /// @param fee The fee collected upon every swap in the pool, denominated in hundredths of a bip
    /// @return pool The pool address
    function getPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external view returns (address pool);

    /// @notice Creates a pool for the given two tokens and fee
    /// @param tokenA One of the two tokens in the desired pool
    /// @param tokenB The other of the two tokens in the desired pool
    /// @param fee The desired fee for the pool
    /// @dev tokenA and tokenB may be passed in either order: token0/token1 or token1/token0. tickSpacing is retrieved
    /// from the fee. The call will revert if the pool already exists, the fee is invalid, or the token arguments
    /// are invalid.
    /// @return pool The address of the newly created pool
    function createPool(
        address tokenA,
        address tokenB,
        uint24 fee
    ) external returns (address pool);

    /// @notice Updates the owner of the factory
    /// @dev Must be called by the current owner
    /// @param _owner The new owner of the factory
    function setOwner(address _owner) external;

    /// @notice Enables a fee amount with the given tickSpacing
    /// @dev Fee amounts may never be removed once enabled
    /// @param fee The fee amount to enable, denominated in hundredths of a bip (i.e. 1e-6)
    /// @param tickSpacing The spacing between ticks to be enforced for all pools created with the given fee amount
    function enableFeeAmount(uint24 fee, int24 tickSpacing) external;
}

File 9 of 20 : IUniswapV3Pool.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

import './pool/IUniswapV3PoolImmutables.sol';
import './pool/IUniswapV3PoolState.sol';
import './pool/IUniswapV3PoolDerivedState.sol';
import './pool/IUniswapV3PoolActions.sol';
import './pool/IUniswapV3PoolOwnerActions.sol';
import './pool/IUniswapV3PoolEvents.sol';

/// @title The interface for a Uniswap V3 Pool
/// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform
/// to the ERC20 specification
/// @dev The pool interface is broken up into many smaller pieces
interface IUniswapV3Pool is
    IUniswapV3PoolImmutables,
    IUniswapV3PoolState,
    IUniswapV3PoolDerivedState,
    IUniswapV3PoolActions,
    IUniswapV3PoolOwnerActions,
    IUniswapV3PoolEvents
{

}

File 10 of 20 : IUniswapV3PoolActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissionless pool actions
/// @notice Contains pool methods that can be called by anyone
interface IUniswapV3PoolActions {
    /// @notice Sets the initial price for the pool
    /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value
    /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96
    function initialize(uint160 sqrtPriceX96) external;

    /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position
    /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback
    /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends
    /// on tickLower, tickUpper, the amount of liquidity, and the current price.
    /// @param recipient The address for which the liquidity will be created
    /// @param tickLower The lower tick of the position in which to add liquidity
    /// @param tickUpper The upper tick of the position in which to add liquidity
    /// @param amount The amount of liquidity to mint
    /// @param data Any data that should be passed through to the callback
    /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback
    /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback
    function mint(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount,
        bytes calldata data
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Collects tokens owed to a position
    /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity.
    /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or
    /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the
    /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity.
    /// @param recipient The address which should receive the fees collected
    /// @param tickLower The lower tick of the position for which to collect fees
    /// @param tickUpper The upper tick of the position for which to collect fees
    /// @param amount0Requested How much token0 should be withdrawn from the fees owed
    /// @param amount1Requested How much token1 should be withdrawn from the fees owed
    /// @return amount0 The amount of fees collected in token0
    /// @return amount1 The amount of fees collected in token1
    function collect(
        address recipient,
        int24 tickLower,
        int24 tickUpper,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);

    /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position
    /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0
    /// @dev Fees must be collected separately via a call to #collect
    /// @param tickLower The lower tick of the position for which to burn liquidity
    /// @param tickUpper The upper tick of the position for which to burn liquidity
    /// @param amount How much liquidity to burn
    /// @return amount0 The amount of token0 sent to the recipient
    /// @return amount1 The amount of token1 sent to the recipient
    function burn(
        int24 tickLower,
        int24 tickUpper,
        uint128 amount
    ) external returns (uint256 amount0, uint256 amount1);

    /// @notice Swap token0 for token1, or token1 for token0
    /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback
    /// @param recipient The address to receive the output of the swap
    /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0
    /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative)
    /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this
    /// value after the swap. If one for zero, the price cannot be greater than this value after the swap
    /// @param data Any data to be passed through to the callback
    /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive
    /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback
    /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback
    /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling
    /// with 0 amount{0,1} and sending the donation amount(s) from the callback
    /// @param recipient The address which will receive the token0 and token1 amounts
    /// @param amount0 The amount of token0 to send
    /// @param amount1 The amount of token1 to send
    /// @param data Any data to be passed through to the callback
    function flash(
        address recipient,
        uint256 amount0,
        uint256 amount1,
        bytes calldata data
    ) external;

    /// @notice Increase the maximum number of price and liquidity observations that this pool will store
    /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to
    /// the input observationCardinalityNext.
    /// @param observationCardinalityNext The desired minimum number of observations for the pool to store
    function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external;
}

File 11 of 20 : IUniswapV3PoolDerivedState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that is not stored
/// @notice Contains view functions to provide information about the pool that is computed rather than stored on the
/// blockchain. The functions here may have variable gas costs.
interface IUniswapV3PoolDerivedState {
    /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp
    /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing
    /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick,
    /// you must call it with secondsAgos = [3600, 0].
    /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in
    /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio.
    /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned
    /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp
    /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block
    /// timestamp
    function observe(uint32[] calldata secondsAgos)
        external
        view
        returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s);

    /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range
    /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed.
    /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first
    /// snapshot is taken and the second snapshot is taken.
    /// @param tickLower The lower tick of the range
    /// @param tickUpper The upper tick of the range
    /// @return tickCumulativeInside The snapshot of the tick accumulator for the range
    /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range
    /// @return secondsInside The snapshot of seconds per liquidity for the range
    function snapshotCumulativesInside(int24 tickLower, int24 tickUpper)
        external
        view
        returns (
            int56 tickCumulativeInside,
            uint160 secondsPerLiquidityInsideX128,
            uint32 secondsInside
        );
}

File 12 of 20 : IUniswapV3PoolEvents.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Events emitted by a pool
/// @notice Contains all events emitted by the pool
interface IUniswapV3PoolEvents {
    /// @notice Emitted exactly once by a pool when #initialize is first called on the pool
    /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize
    /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96
    /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool
    event Initialize(uint160 sqrtPriceX96, int24 tick);

    /// @notice Emitted when liquidity is minted for a given position
    /// @param sender The address that minted the liquidity
    /// @param owner The owner of the position and recipient of any minted liquidity
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity minted to the position range
    /// @param amount0 How much token0 was required for the minted liquidity
    /// @param amount1 How much token1 was required for the minted liquidity
    event Mint(
        address sender,
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted when fees are collected by the owner of a position
    /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees
    /// @param owner The owner of the position for which fees are collected
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount0 The amount of token0 fees collected
    /// @param amount1 The amount of token1 fees collected
    event Collect(
        address indexed owner,
        address recipient,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount0,
        uint128 amount1
    );

    /// @notice Emitted when a position's liquidity is removed
    /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect
    /// @param owner The owner of the position for which liquidity is removed
    /// @param tickLower The lower tick of the position
    /// @param tickUpper The upper tick of the position
    /// @param amount The amount of liquidity to remove
    /// @param amount0 The amount of token0 withdrawn
    /// @param amount1 The amount of token1 withdrawn
    event Burn(
        address indexed owner,
        int24 indexed tickLower,
        int24 indexed tickUpper,
        uint128 amount,
        uint256 amount0,
        uint256 amount1
    );

    /// @notice Emitted by the pool for any swaps between token0 and token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the output of the swap
    /// @param amount0 The delta of the token0 balance of the pool
    /// @param amount1 The delta of the token1 balance of the pool
    /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96
    /// @param liquidity The liquidity of the pool after the swap
    /// @param tick The log base 1.0001 of price of the pool after the swap
    event Swap(
        address indexed sender,
        address indexed recipient,
        int256 amount0,
        int256 amount1,
        uint160 sqrtPriceX96,
        uint128 liquidity,
        int24 tick
    );

    /// @notice Emitted by the pool for any flashes of token0/token1
    /// @param sender The address that initiated the swap call, and that received the callback
    /// @param recipient The address that received the tokens from flash
    /// @param amount0 The amount of token0 that was flashed
    /// @param amount1 The amount of token1 that was flashed
    /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee
    /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee
    event Flash(
        address indexed sender,
        address indexed recipient,
        uint256 amount0,
        uint256 amount1,
        uint256 paid0,
        uint256 paid1
    );

    /// @notice Emitted by the pool for increases to the number of observations that can be stored
    /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index
    /// just before a mint/swap/burn.
    /// @param observationCardinalityNextOld The previous value of the next observation cardinality
    /// @param observationCardinalityNextNew The updated value of the next observation cardinality
    event IncreaseObservationCardinalityNext(
        uint16 observationCardinalityNextOld,
        uint16 observationCardinalityNextNew
    );

    /// @notice Emitted when the protocol fee is changed by the pool
    /// @param feeProtocol0Old The previous value of the token0 protocol fee
    /// @param feeProtocol1Old The previous value of the token1 protocol fee
    /// @param feeProtocol0New The updated value of the token0 protocol fee
    /// @param feeProtocol1New The updated value of the token1 protocol fee
    event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New);

    /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner
    /// @param sender The address that collects the protocol fees
    /// @param recipient The address that receives the collected protocol fees
    /// @param amount0 The amount of token0 protocol fees that is withdrawn
    /// @param amount0 The amount of token1 protocol fees that is withdrawn
    event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1);
}

File 13 of 20 : IUniswapV3PoolImmutables.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that never changes
/// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values
interface IUniswapV3PoolImmutables {
    /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface
    /// @return The contract address
    function factory() external view returns (address);

    /// @notice The first of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token0() external view returns (address);

    /// @notice The second of the two tokens of the pool, sorted by address
    /// @return The token contract address
    function token1() external view returns (address);

    /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6
    /// @return The fee
    function fee() external view returns (uint24);

    /// @notice The pool tick spacing
    /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive
    /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ...
    /// This value is an int24 to avoid casting even though it is always positive.
    /// @return The tick spacing
    function tickSpacing() external view returns (int24);

    /// @notice The maximum amount of position liquidity that can use any tick in the range
    /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and
    /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool
    /// @return The max amount of liquidity per tick
    function maxLiquidityPerTick() external view returns (uint128);
}

File 14 of 20 : IUniswapV3PoolOwnerActions.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Permissioned pool actions
/// @notice Contains pool methods that may only be called by the factory owner
interface IUniswapV3PoolOwnerActions {
    /// @notice Set the denominator of the protocol's % share of the fees
    /// @param feeProtocol0 new protocol fee for token0 of the pool
    /// @param feeProtocol1 new protocol fee for token1 of the pool
    function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external;

    /// @notice Collect the protocol fee accrued to the pool
    /// @param recipient The address to which collected protocol fees should be sent
    /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1
    /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0
    /// @return amount0 The protocol fee collected in token0
    /// @return amount1 The protocol fee collected in token1
    function collectProtocol(
        address recipient,
        uint128 amount0Requested,
        uint128 amount1Requested
    ) external returns (uint128 amount0, uint128 amount1);
}

File 15 of 20 : IUniswapV3PoolState.sol
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.5.0;

/// @title Pool state that can change
/// @notice These methods compose the pool's state, and can change with any frequency including multiple times
/// per transaction
interface IUniswapV3PoolState {
    /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas
    /// when accessed externally.
    /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value
    /// tick The current tick of the pool, i.e. according to the last tick transition that was run.
    /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick
    /// boundary.
    /// observationIndex The index of the last oracle observation that was written,
    /// observationCardinality The current maximum number of observations stored in the pool,
    /// observationCardinalityNext The next maximum number of observations, to be updated when the observation.
    /// feeProtocol The protocol fee for both tokens of the pool.
    /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0
    /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee.
    /// unlocked Whether the pool is currently locked to reentrancy
    function slot0()
        external
        view
        returns (
            uint160 sqrtPriceX96,
            int24 tick,
            uint16 observationIndex,
            uint16 observationCardinality,
            uint16 observationCardinalityNext,
            uint8 feeProtocol,
            bool unlocked
        );

    /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal0X128() external view returns (uint256);

    /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool
    /// @dev This value can overflow the uint256
    function feeGrowthGlobal1X128() external view returns (uint256);

    /// @notice The amounts of token0 and token1 that are owed to the protocol
    /// @dev Protocol fees will never exceed uint128 max in either token
    function protocolFees() external view returns (uint128 token0, uint128 token1);

    /// @notice The currently in range liquidity available to the pool
    /// @dev This value has no relationship to the total liquidity across all ticks
    function liquidity() external view returns (uint128);

    /// @notice Look up information about a specific tick in the pool
    /// @param tick The tick to look up
    /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or
    /// tick upper,
    /// liquidityNet how much liquidity changes when the pool price crosses the tick,
    /// feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0,
    /// feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1,
    /// tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick
    /// secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick,
    /// secondsOutside the seconds spent on the other side of the tick from the current tick,
    /// initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false.
    /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0.
    /// In addition, these values are only relative and must be used only in comparison to previous snapshots for
    /// a specific position.
    function ticks(int24 tick)
        external
        view
        returns (
            uint128 liquidityGross,
            int128 liquidityNet,
            uint256 feeGrowthOutside0X128,
            uint256 feeGrowthOutside1X128,
            int56 tickCumulativeOutside,
            uint160 secondsPerLiquidityOutsideX128,
            uint32 secondsOutside,
            bool initialized
        );

    /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information
    function tickBitmap(int16 wordPosition) external view returns (uint256);

    /// @notice Returns the information about a position by the position's key
    /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper
    /// @return _liquidity The amount of liquidity in the position,
    /// Returns feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke,
    /// Returns feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke,
    /// Returns tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke,
    /// Returns tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke
    function positions(bytes32 key)
        external
        view
        returns (
            uint128 _liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
        );

    /// @notice Returns data about a specific observation index
    /// @param index The element of the observations array to fetch
    /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time
    /// ago, rather than at a specific index in the array.
    /// @return blockTimestamp The timestamp of the observation,
    /// Returns tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp,
    /// Returns secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp,
    /// Returns initialized whether the observation has been initialized and the values are safe to use
    function observations(uint256 index)
        external
        view
        returns (
            uint32 blockTimestamp,
            int56 tickCumulative,
            uint160 secondsPerLiquidityCumulativeX128,
            bool initialized
        );
}

File 16 of 20 : ExecutorManager.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract ExecutorManager {
    error NotExecutor(address attempted);
    error CannotRemoveSelf();

    mapping(address => bool) public executors;

    constructor() {
        _addExecutor(msg.sender);
    }

    modifier onlyExecutor() {
        if (isExecutor(msg.sender) != true) revert NotExecutor(msg.sender);
        _;
    }

    function isExecutor(address _executor) public view returns(bool) {
        return(executors[_executor] == true);
    }

    function _addExecutor(address _toAdd) internal {
        executors[_toAdd] = true;
    }

    function addExecutor(address _toAdd) onlyExecutor external virtual {
        _addExecutor(_toAdd);
    }

    function _removeExecutor(address _toRemove) internal {
        if (_toRemove == msg.sender) revert CannotRemoveSelf();
        executors[_toRemove] = false;
    }

    function removeExecutor(address _toRemove) onlyExecutor external virtual {
        _removeExecutor(_toRemove);
    }
}

File 17 of 20 : MathHelpers.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract MathHelpers {
    uint256 public constant divisionDenominator = 10**18;

    function _multiplyWithNumerator(uint256 _amount, uint256 _numerator) internal pure returns(uint256) {
        return((_amount * _numerator) / divisionDenominator);
    }
}

File 18 of 20 : UpInterfaces.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface INonfungiblePositionManager {
    struct MintParams {
        address token0;
        address token1;
        uint24 fee;
        int24 tickLower;
        int24 tickUpper;
        uint amount0Desired;
        uint amount1Desired;
        uint amount0Min;
        uint amount1Min;
        address recipient;
        uint deadline;
    }

    function mint(
        MintParams calldata params
    )
        external
        payable
        returns (uint tokenId, uint128 liquidity, uint amount0, uint amount1);

    struct IncreaseLiquidityParams {
        uint tokenId;
        uint amount0Desired;
        uint amount1Desired;
        uint amount0Min;
        uint amount1Min;
        uint deadline;
    }

    function increaseLiquidity(
        IncreaseLiquidityParams calldata params
    ) external payable returns (uint128 liquidity, uint amount0, uint amount1);

    struct DecreaseLiquidityParams {
        uint tokenId;
        uint128 liquidity;
        uint amount0Min;
        uint amount1Min;
        uint deadline;
    }

    function decreaseLiquidity(
        DecreaseLiquidityParams calldata params
    ) external payable returns (uint amount0, uint amount1);

    struct CollectParams {
        uint tokenId;
        address recipient;
        uint128 amount0Max;
        uint128 amount1Max;
    }

    function positions(uint256 tokenId)
        external
        view
        returns (
            uint96 nonce,
            address operator,
            address token0,
            address token1,
            uint24 fee,
            int24 tickLower,
            int24 tickUpper,
            uint128 liquidity,
            uint256 feeGrowthInside0LastX128,
            uint256 feeGrowthInside1LastX128,
            uint128 tokensOwed0,
            uint128 tokensOwed1
    );

    function collect(
        CollectParams calldata params
    ) external payable returns (uint amount0, uint amount1);

    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);

}
interface ISwapRouter {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint deadline;
        uint amountIn;
        uint amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }
    function exactInputSingle(
        ExactInputSingleParams calldata params
    ) external payable returns (uint amountOut);

    struct ExactInputParams {
        bytes path;
        address recipient;
        uint deadline;
        uint amountIn;
        uint amountOutMinimum;
    }
    function exactInput(
        ExactInputParams calldata params
    ) external payable returns (uint amountOut);
}


interface IPondCoinSpawner {
    function spawn(address invoker, uint256 amount) external returns (bool);
}

File 19 of 20 : IActiveChecker.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IActiveChecker {
    function isActive(address toCheck) external view returns (bool);
}

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

interface ISpawnManager {
    function createSpawn(uint256 maxAmount) external;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IWETH","name":"_wethContract","type":"address"},{"internalType":"contract IERC20","name":"_pepeContract","type":"address"},{"internalType":"contract IERC20","name":"_pondContract","type":"address"},{"internalType":"contract ISwapRouter","name":"_uniswapRouter","type":"address"},{"internalType":"contract INonfungiblePositionManager","name":"_nonfungiblePositionManager","type":"address"},{"internalType":"address","name":"_distilleryAddress","type":"address"},{"internalType":"contract ISpawnManager","name":"_spawnManager","type":"address"},{"internalType":"contract IUniswapV3Factory","name":"_uniswapFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BoosterDepositLimitReached","type":"error"},{"inputs":[{"internalType":"uint256","name":"boosterId","type":"uint256"}],"name":"BoosterDoesNotExist","type":"error"},{"inputs":[],"name":"BoosterEnded","type":"error"},{"inputs":[],"name":"BoosterInactive","type":"error"},{"inputs":[],"name":"BoosterNotWETH","type":"error"},{"inputs":[],"name":"BoosterOverMaxCycle","type":"error"},{"inputs":[],"name":"CannotClaimUserBooster","type":"error"},{"inputs":[],"name":"CannotRemoveSelf","type":"error"},{"inputs":[],"name":"ExceedsMax","type":"error"},{"inputs":[],"name":"InitialLPAlreadyCreated","type":"error"},{"inputs":[],"name":"InvalidUseCount","type":"error"},{"inputs":[],"name":"InvalidUserBooster","type":"error"},{"inputs":[],"name":"LPNotInitalized","type":"error"},{"inputs":[],"name":"MiningInvalidValue","type":"error"},{"inputs":[{"internalType":"address","name":"attempted","type":"address"}],"name":"NotExecutor","type":"error"},{"inputs":[],"name":"UpdateUsedToInvalid","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"boosterId","type":"uint256"}],"name":"ClaimBooster","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"miner","type":"address"},{"indexed":false,"internalType":"uint256","name":"inputAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"boosterId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"outputAmount","type":"uint256"}],"name":"Mine","type":"event"},{"inputs":[],"name":"activeMinedThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_toAdd","type":"address"}],"name":"addExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"boosterLastsFor","type":"uint256"},{"internalType":"uint256","name":"maxDepositAmount","type":"uint256"},{"internalType":"uint256","name":"maxCycles","type":"uint256"},{"internalType":"uint256","name":"usesPerCycle","type":"uint256"}],"internalType":"struct RigTokenBoosterManager.TokenBoosterParams","name":"params","type":"tuple"}],"name":"addTokenBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"},{"internalType":"string","name":"_treeDataURI","type":"string"},{"internalType":"uint256","name":"_boosterRate","type":"uint256"},{"internalType":"uint256","name":"_boosterType","type":"uint256"}],"name":"addUserBoostTree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_event","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"canClaimUserBoost","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_lpTokenId","type":"uint256"}],"name":"collectLPFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"uses","type":"uint256"},{"internalType":"uint256","name":"usesPerCycle","type":"uint256"},{"internalType":"uint256","name":"multiplier","type":"uint256"}],"name":"computeBoosterCycleState","outputs":[{"internalType":"uint256","name":"currentCycle","type":"uint256"},{"internalType":"uint256","name":"newMultiplier","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"pepeAmount","type":"uint256"},{"internalType":"uint256","name":"wethAmount","type":"uint256"}],"name":"createInitialLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentUserBoostID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cycleIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"delta","outputs":[{"internalType":"int24","name":"","type":"int24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositWeth","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"distilleryAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"divisionDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"divisionLP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenBoosterId","type":"uint256"}],"name":"endTokenBooster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"executors","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTokenBoosterId","outputs":[{"internalType":"uint256","name":"currentTokenBoosterId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenBoosterId","type":"uint256"}],"name":"getTokenBooster","outputs":[{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"multiplier","type":"uint256"},{"internalType":"uint256","name":"boosterStartTime","type":"uint256"},{"internalType":"uint256","name":"boosterEndTime","type":"uint256"},{"internalType":"bool","name":"ended","type":"bool"},{"internalType":"uint256","name":"useCount","type":"uint256"},{"internalType":"uint256","name":"totalDeposited","type":"uint256"},{"internalType":"uint256","name":"maxDepositAmount","type":"uint256"},{"internalType":"uint256","name":"maxCycles","type":"uint256"},{"internalType":"uint256","name":"usesPerCycle","type":"uint256"}],"internalType":"struct RigTokenBoosterManager.TokenBooster","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"toCheck","type":"address"}],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_executor","type":"address"}],"name":"isExecutor","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestLPToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenBoosterId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint256[]","name":"_userBoostIDs","type":"uint256[]"},{"internalType":"bytes32[][]","name":"_userBoostMerkleProofs","type":"bytes32[][]"}],"name":"mine","outputs":[{"internalType":"uint256","name":"pndcAmount","type":"uint256"},{"internalType":"uint256","name":"boosterMultiplier","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"minedPerCycle","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nonfungiblePositionManager","outputs":[{"internalType":"contract INonfungiblePositionManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pepeContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pondContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rateNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"readLPTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"readUserBoosterTree","outputs":[{"components":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"},{"internalType":"string","name":"treeDataURI","type":"string"},{"internalType":"uint256","name":"boosterRate","type":"uint256"},{"internalType":"uint256","name":"boostType","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct MiningClaims.UserAddedBooster","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_toRemove","type":"address"}],"name":"removeExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"spawnManager","outputs":[{"internalType":"contract ISpawnManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapFactory","outputs":[{"internalType":"contract IUniswapV3Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_activeMinedThreshold","type":"uint256"}],"name":"updateActiveMinedThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int24","name":"_delta","type":"int24"}],"name":"updateDelta","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_divisionLP","type":"uint256"}],"name":"updateDivisionLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_poolFee","type":"uint24"}],"name":"updatePoolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rateNumerator","type":"uint256"}],"name":"updateRateNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISpawnManager","name":"_spawnManager","type":"address"}],"name":"updateSpawnManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_usesToOpenSpawn","type":"uint256"},{"internalType":"bool","name":"updateUsed","type":"bool"},{"internalType":"uint256","name":"updateUsedTo","type":"uint256"}],"name":"updateSpawnValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IUniswapV3Factory","name":"_uniswapFactory","type":"address"}],"name":"updateUniswapFactory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"usesLeftForSpawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"usesToOpenSpawn","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethContract","outputs":[{"internalType":"contract IWETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052600060028190556014600a819055600b805465ffffffffffff1916640457000bb8179055601082905560118290556001601355611388908190556015556016553480156200005157600080fd5b50604051620048aa380380620048aa8339810160408190526200007491620003ce565b6001600081815533815260066020526040808220805460ff1990811685179091556001600160a01b0387168352912080549091169091179055600780546001600160a01b03199081166001600160a01b038b81169182179093556008805483168b85161790556009805483168a8516179055600c80548316898516908117909155600e80548416888616179055600d805484168986161790556017805490931686851617909255600b8054600160301b600160d01b0319166601000000000000948616949094029390931790925560405163095ea7b360e01b81526004810191909152600019602482015263095ea7b3906044016020604051808303816000875af115801562000188573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001ae91906200048f565b50600754600d5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801562000206573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200022c91906200048f565b50600854600d5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801562000284573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002aa91906200048f565b50600854600c5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801562000302573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200032891906200048f565b5060085460175460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af115801562000380573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620003a691906200048f565b505050505050505050620004ba565b6001600160a01b0381168114620003cb57600080fd5b50565b600080600080600080600080610100898b031215620003ec57600080fd5b8851620003f981620003b5565b60208a01519098506200040c81620003b5565b60408a01519097506200041f81620003b5565b60608a01519096506200043281620003b5565b60808a01519095506200044581620003b5565b60a08a01519094506200045881620003b5565b60c08a01519093506200046b81620003b5565b60e08a01519092506200047e81620003b5565b809150509295985092959890939650565b600060208284031215620004a257600080fd5b81518015158114620004b357600080fd5b9392505050565b6143e080620004ca6000396000f3fe6080604052600436106103135760003560e01c80637c6490211161019a578063b4d68b35116100e1578063e3f8ab701161008a578063f3fef3a311610064578063f3fef3a31461093d578063fcddef951461095d578063ff7406301461097d57600080fd5b8063e3f8ab70146108f2578063ee69993914610912578063ef77f8381461092757600080fd5b8063d5ad8bd1116100bb578063d5ad8bd11461085c578063ddc356171461087c578063debfda30146108b457600080fd5b8063b4d68b35146107ef578063c4d1aa791461081c578063d5322e2f1461083c57600080fd5b80639ac2a01111610143578063ae727e7c1161011d578063ae727e7c1461078d578063afa1e473146107ad578063b44a2722146107cf57600080fd5b80639ac2a011146106fe5780639f8a13d71461072e578063a57a7e381461077757600080fd5b80638bdb2afa116101745780638bdb2afa1461069e5780638d981e36146106c8578063994eec8b146106e857600080fd5b80637c649021146106315780638a790e84146106515780638b120b4d1461067157600080fd5b80632a48cd781161025e5780636c89bf13116102075780636ddf2fa2116101e15780636ddf2fa2146105c1578063735de9f7146105f15780637b763ed41461061157600080fd5b80636c89bf131461056b5780636d735208146105815780636d7c98d1146105a157600080fd5b806347e7ef241161023857806347e7ef241461052057806357bb0c23146105405780636aff8eac1461055557600080fd5b80632a48cd78146104b8578063411db87f146104e05780634780eac11461050057600080fd5b80631887a4d0116102c05780631f5a0bbe1161029a5780631f5a0bbe1461045c578063247884291461047c57806327a101f51461049c57600080fd5b80631887a4d0146103fc5780631be2ba74146104345780631d370ac81461045457600080fd5b80630ef33e4f116102f15780630ef33e4f1461039357806312b495a8146103a857806312eff661146103dc57600080fd5b8063089fe6aa146103185780630b36b8db1461034d5780630e9bc8ae14610371575b600080fd5b34801561032457600080fd5b50600b546103349062ffffff1681565b60405162ffffff90911681526020015b60405180910390f35b34801561035957600080fd5b5061036360165481565b604051908152602001610344565b34801561037d57600080fd5b5061039161038c366004613797565b61099d565b005b34801561039f57600080fd5b50610363610a6f565b3480156103b457600080fd5b50600b546103c9906301000000900460020b81565b60405160029190910b8152602001610344565b3480156103e857600080fd5b506103916103f73660046137be565b610add565b34801561040857600080fd5b5060085461041c906001600160a01b031681565b6040516001600160a01b039091168152602001610344565b34801561044057600080fd5b5061039161044f3660046137be565b610b5d565b610391610bd3565b34801561046857600080fd5b506103916104773660046137be565b610c3e565b34801561048857600080fd5b506103916104973660046137be565b610e0d565b3480156104a857600080fd5b50610363670de0b6b3a764000081565b6104cb6104c6366004613820565b610fba565b60408051928352602083019190915201610344565b3480156104ec57600080fd5b506103916104fb3660046138a3565b6111e5565b34801561050c57600080fd5b5060075461041c906001600160a01b031681565b34801561052c57600080fd5b5061039161053b3660046138bc565b611226565b34801561054c57600080fd5b50600254610363565b34801561056157600080fd5b5061036360135481565b34801561057757600080fd5b5061036360155481565b34801561058d57600080fd5b5061039161059c3660046138a3565b6112f8565b3480156105ad57600080fd5b506103916105bc3660046138a3565b61130f565b3480156105cd57600080fd5b506105e16105dc3660046138e8565b611354565b6040519015158152602001610344565b3480156105fd57600080fd5b50600c5461041c906001600160a01b031681565b34801561061d57600080fd5b5061039161062c366004613944565b61136d565b34801561063d57600080fd5b5061039161064c3660046139dd565b6113b6565b34801561065d57600080fd5b506104cb61066c366004613a15565b611440565b34801561067d57600080fd5b5061069161068c3660046138a3565b61145a565b6040516103449190613a41565b3480156106aa57600080fd5b50600b5461041c90660100000000000090046001600160a01b031681565b3480156106d457600080fd5b50600e5461041c906001600160a01b031681565b3480156106f457600080fd5b5061036360145481565b34801561070a57600080fd5b506105e16107193660046137be565b60066020526000908152604090205460ff1681565b34801561073a57600080fd5b506105e16107493660046137be565b6013546001600160a01b03909116600090815260126020908152604080832060115484529091529020541190565b34801561078357600080fd5b50610363600a5481565b34801561079957600080fd5b506103916107a83660046138a3565b6114ca565b3480156107b957600080fd5b506107c261150b565b6040516103449190613ac1565b3480156107db57600080fd5b50600d5461041c906001600160a01b031681565b3480156107fb57600080fd5b5061080f61080a3660046138a3565b611563565b6040516103449190613b55565b34801561082857600080fd5b5060095461041c906001600160a01b031681565b34801561084857600080fd5b50610391610857366004613ba7565b6115a3565b34801561086857600080fd5b5060175461041c906001600160a01b031681565b34801561088857600080fd5b506103636108973660046138bc565b601260209081526000928352604080842090915290825290205481565b3480156108c057600080fd5b506105e16108cf3660046137be565b6001600160a01b031660009081526006602052604090205460ff16151560011490565b3480156108fe57600080fd5b5061039161090d3660046138a3565b6119e0565b34801561091e57600080fd5b50610363611a21565b34801561093357600080fd5b5061036360115481565b34801561094957600080fd5b506103916109583660046138bc565b611a31565b34801561096957600080fd5b50610391610978366004613bda565b611ab9565b34801561098957600080fd5b50610391610998366004613c06565b611b2b565b3360009081526006602052604090205460ff16151560011415156001146109de57604051635cf20d6360e01b81523360048201526024015b60405180910390fd5b6109eb60208201826137be565b600c5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190613c23565b50610a6c81611ba4565b50565b600f546000908103610aad576040517fef2cf26f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610abd90600190613c6f565b81548110610acd57610acd613c82565b9060005260206000200154905090565b3360009081526006602052604090205460ff1615156001141515600114610b1957604051635cf20d6360e01b81523360048201526024016109d5565b600b80546001600160a01b039092166601000000000000027fffffffffffff0000000000000000000000000000000000000000ffffffffffff909216919091179055565b3360009081526006602052604090205460ff1615156001141515600114610b9957604051635cf20d6360e01b81523360048201526024016109d5565b601780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c2357600080fd5b505af1158015610c37573d6000803e3d6000fd5b5050505050565b3360009081526006602052604090205460ff1615156001141515600114610c7a57604051635cf20d6360e01b81523360048201526024016109d5565b60085460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190613c23565b5060075460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b9190613c23565b5060095460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190613c23565b50610a6c816001600160a01b03166000908152600660205260409020805460ff19166001179055565b3360009081526006602052604090205460ff1615156001141515600114610e4957604051635cf20d6360e01b81523360048201526024016109d5565b60085460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec09190613c23565b5060075460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f389190613c23565b5060095460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb09190613c23565b50610a6c81611cfe565b600080610fc5611d61565b87801580610fd4575080600554105b1561100e576040517fba5f8ce5000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600460208190526040909120015460ff161561105b576040517f21733b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87600003611095576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3415611198578734146110d4576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075460008a8152600460205260409020546001600160a01b0390811691161461112a576040517f7b06f29700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561117a57600080fd5b505af115801561118e573d6000803e3d6000fd5b50505050506111bc565b6000898152600460205260409020546111bc906001600160a01b031633308b611dba565b6111cb338a8a8a8a8a8a611e42565b92509250506111da6001600055565b965096945050505050565b3360009081526006602052604090205460ff161515600114151560011461122157604051635cf20d6360e01b81523360048201526024016109d5565b601655565b3360009081526006602052604090205460ff161515600114151560011461126257604051635cf20d6360e01b81523360048201526024016109d5565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064015b6020604051808303816000875af11580156112cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f39190613c23565b505050565b600e546112f39082906001600160a01b03166120eb565b3360009081526006602052604090205460ff161515600114151560011461134b57604051635cf20d6360e01b81523360048201526024016109d5565b610a6c816121d1565b600061136285858585612250565b90505b949350505050565b3360009081526006602052604090205460ff16151560011415156001146113a957604051635cf20d6360e01b81523360048201526024016109d5565b610c3785858585856123c6565b3360009081526006602052604090205460ff16151560011415156001146113f257604051635cf20d6360e01b81523360048201526024016109d5565b6014839055811515811503611433576040517f4257b53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156112f3576015555050565b60008061144e85858561249f565b91509150935093915050565b6114bb60405180610140016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6114c4826124fe565b92915050565b3360009081526006602052604090205460ff161515600114151560011461150657604051635cf20d6360e01b81523360048201526024016109d5565b601355565b6060600f80548060200260200160405190810160405280929190818152602001828054801561155957602002820191906000526020600020905b815481526020019060010190808311611545575b5050505050905090565b61159a6040518060a00160405280600080191681526020016060815260200160008152602001600081526020016000151581525090565b6114c48261268b565b3360009081526006602052604090205460ff16151560011415156001146115df57604051635cf20d6360e01b81523360048201526024016109d5565b600f5415611619576040517f6e8f24a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190613c23565b6116f95760405162461bcd60e51b815260206004820152601760248201527f436f756c64206e6f74207472616e73666572205745544800000000000000000060448201526064016109d5565b6008546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015611769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178d9190613c23565b6117d95760405162461bcd60e51b815260206004820152601760248201527f436f756c64206e6f74207472616e73666572207065706500000000000000000060448201526064016109d5565b6000806117e68484612841565b935093505050838210156118e3576008546001600160a01b031663a9059cbb336118108588613c6f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190613c23565b6118e35760405162461bcd60e51b815260206004820152601560248201527f436f756c64206e6f742072657475726e2070657065000000000000000000000060448201526064016109d5565b828110156119da576007546001600160a01b031663a9059cbb336119078487613c6f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190613c23565b6119da5760405162461bcd60e51b815260206004820152601560248201527f436f756c64206e6f742072657475726e2077657468000000000000000000000060448201526064016109d5565b50505050565b3360009081526006602052604090205460ff1615156001141515600114611a1c57604051635cf20d6360e01b81523360048201526024016109d5565b600a55565b6000611a2c60055490565b905090565b3360009081526006602052604090205460ff1615156001141515600114611a6d57604051635cf20d6360e01b81523360048201526024016109d5565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016112b0565b3360009081526006602052604090205460ff1615156001141515600114611af557604051635cf20d6360e01b81523360048201526024016109d5565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000001662ffffff92909216919091179055565b3360009081526006602052604090205460ff1615156001141515600114611b6757604051635cf20d6360e01b81523360048201526024016109d5565b600b805462ffffff9092166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff000000ffffff909216919091179055565b6000604082013515611bc157611bbe604083013542613cb1565b90505b60408051610140810190915280611bdb60208501856137be565b6001600160a01b0316815260200183602001358152602001428152602001828152602001600015158152602001600081526020016000815260200183606001358152602001836080013581526020018360a0013581525060046000600560008154611c4590613cc4565b918290555081526020808201929092526040908101600020835181547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178155918301516001830155820151600282015560608201516003820155608082015160048201805460ff191691151591909117905560a0820151600582015560c0820151600682015560e082015160078201556101008201516008820155610120909101516009909101555050565b336001600160a01b03821603611d40576040517f5e03d55f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b600260005403611db35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d5565b6002600055565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119da9085906129ef565b600080611e4f8888612ad7565b60075460008981526004602052604090205488916001600160a01b03918216911614611ea157600089815260046020526040902054600754611e9e916001600160a01b0390811691168a612b42565b90505b611eab8a82612c84565b600754600854600183901c91600091611ed1916001600160a01b03908116911684612b42565b90506000611ef8611ee183612cc2565b611ef3611eee8688613c6f565b612cc2565b612cd8565b925060009150819050611f0b898c613cb1565b1115611f2157611f1e8e8c8c8c8c612dee565b90505b611f2a8d612eb8565b9550611f4a611f3b83601654612f5d565b611f458389613cb1565b612f5d565b965086600003611f86576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600960009054906101000a90046001600160a01b03166001600160a01b031663a9059cbb8f896040518363ffffffff1660e01b8152600401611fdd9291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015611ffc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120209190613c23565b61202957600080fd5b60156000815461203890613cde565b918290555060000361208e5761204c612f7c565b600560116000815461205d90613cc4565b9182905550101561208757601154612077906103e8613cf5565b61208390611388613c6f565b6014555b6014546015555b604080518d8152602081018f90529081018890526001600160a01b038f16907fcbd7fd38c5a2c3881dce11aca6f92d1026e4eb58dbdba50361b165381b383ebb9060600160405180910390a2505050505097509795505050505050565b600d54604080516080810182528481526001600160a01b03848116602083019081526fffffffffffffffffffffffffffffffff8385018181526060850182815295517ffc6f786500000000000000000000000000000000000000000000000000000000815294516004860152915183166024850152905181166044840152925190921660648201526000928392169063fc6f78659060840160408051808303816000875af11580156121a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c59190613d0c565b915091505b9250929050565b60008181526004602052604090206003015442116122315760405162461bcd60e51b815260206004820152600960248201527f4e6f7420456e646564000000000000000000000000000000000000000000000060448201526064016109d5565b600090815260046020819052604090912001805460ff19166001179055565b60008360025460001480612265575060025481115b1561229c576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff1615156001146122ec576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526001602090815260408083206001600160a01b038a16845290915290205460ff161561232057600091506123bd565b6123ba84848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600360209081526040918290205482516001600160a01b038f169281019290925294500191506123829050565b60408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012061314c565b91505b50949350505050565b6040518060a0016040528086815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060208201859052604082018490526001606090920191909152600280546003929190829061243c90613cc4565b91829055508152602080820192909252604001600020825181559082015160018201906124699082613dfa565b5060408201516002820155606082015160038201556080909101516004909101805460ff19169115159190911790555050505050565b6000806124ac8486613ee9565b9150670de0b6b3a7640000846124c28185613cf5565b6124cc9088613c6f565b6124d69086613cf5565b6124e09190613ee9565b6124ea9085613c6f565b6124f49190613cb1565b9050935093915050565b61255f60405180610140016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b8180158061256e575080600554105b156125a8576040517fba5f8ce5000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600460208190526040909120015460ff16156125f5576040517f21733b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526004602081815260409283902083516101408101855281546001600160a01b03168152600182015492810192909252600281015493820193909352600383015460608201529082015460ff1615156080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260099091015461012082015291505b50919050565b6126c26040518060a00160405280600080191681526020016060815260200160008152602001600081526020016000151581525090565b81600254600014806126d5575060025481115b1561270c576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff16151560011461275c576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008481526020019081526020016000206040518060a00160405290816000820154815260200160018201805461279490613d5f565b80601f01602080910402602001604051908101604052809291908181526020018280546127c090613d5f565b801561280d5780601f106127e25761010080835404028352916020019161280d565b820191906000526020600020905b8154815290600101906020018083116127f057829003601f168201915b5050509183525050600282015460208201526003820154604082015260049091015460ff1615156060909101529392505050565b600854600090819081908190603c908290612864906001600160a01b0316613162565b600d5460408051610160810182526008546001600160a01b03908116825260075481166020830152600b5462ffffff81169383019390935293945092909116916388316456916060820190869081906128c7906301000000900460020b88613efd565b6128d19190613f22565b6128db9190613f5c565b60020b81526020018586600b60039054906101000a900460020b876129009190613f83565b61290a9190613f22565b6129149190613f5c565b60020b81526020018b81526020018a81526020016000815260200160008152602001306001600160a01b03168152602001428152506040518263ffffffff1660e01b81526004016129659190613fa8565b6080604051808303816000875af1158015612984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a89190614091565b600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80201849055929b919a509850909650945050505050565b6000612a44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132829092919063ffffffff16565b9050805160001480612a65575080806020019051810190612a659190613c23565b6112f35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109d5565b600082815260046020526040812060078101546006909101805491928492612b00908490613cb1565b9250508190551115612b3e576040517f29ba29c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600c5460408051610100810182526001600160a01b0386811682528581166020830152600b5462ffffff1692820192909252306060820152601054600093929092169163414bf38991906080820190612b9b9042613cb1565b81526020018581526020016002815260200160006001600160a01b03168152506040518263ffffffff1660e01b8152600401612c4191906000610100820190506001600160a01b0380845116835280602085015116602084015262ffffff60408501511660408401528060608501511660608401526080840151608084015260a084015160a084015260c084015160c08401528060e08501511660e08401525092915050565b6020604051808303816000875af1158015612c60573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906140cd565b6001600160a01b0382166000908152601260209081526040808320601154845290915281208054839290612cb9908490613cb1565b90915550505050565b6000612cce6000613291565b6114c49083613ee9565b600d546040805160c08101909152600091829182916001600160a01b03169063219f5d179080612d06610a6f565b8152602001888152602001878152602001600081526020016000815260200160105442612d339190613cb1565b9052604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681528251600482015260208301516024820152908201516044820152606082015160648201526080820151608482015260a09091015160a482015260c4016060604051808303816000875af1158015612dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de191906140e6565b9250925092509250925092565b6000838214612e3f5760405162461bcd60e51b815260206004820152600f60248201527f4c656e677468204d69736d61746368000000000000000000000000000000000060448201526064016109d5565b60005b84811015612eae57612e9087878784818110612e6057612e60613c82565b90506020020135868685818110612e7957612e79613c82565b9050602002810190612e8b919061411b565b6132bb565b612e9a9083613cb1565b915080612ea681613cc4565b915050612e42565b5095945050505050565b6000806000612f066004600086815260200190815260200160002060050160008154612ee390613cc4565b91829055506000868152600460205260409020600981015460019091015461249f565b6000868152600460205260409020600801549193509150821115612f56576040517fb6a512ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b6000670de0b6b3a7640000612f728385613cf5565b612f569190613ee9565b600080612f8f612f8a610a6f565b6133e3565b91509150612fb6600a5483612fa49190613ee9565b600a54612fb19084613ee9565b612841565b50506008546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa15801561301e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304291906140cd565b6017546040517f9b6d3253000000000000000000000000000000000000000000000000000000008152600481018390529192506001600160a01b031690639b6d325390602401600060405180830381600087803b1580156130a257600080fd5b505af11580156130b6573d6000803e3d6000fd5b50506008546017546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018690529116925063a9059cbb91506044016020604051808303816000875af1158015613128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119da9190613c23565b600082613159858461358b565b14949350505050565b600b546007546040517f1698ee820000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152918216602482015262ffffff83166044820152600092839266010000000000009091041690631698ee8290606401602060405180830381865afa1580156131e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320d919061418e565b90506000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa15801561324f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327391906141c8565b50939998505050505050505050565b606061136584846000856135d8565b60008160028111156132a5576132a5614260565b6132b0906010613cb1565b6114c4906010613cf5565b600083600254600014806132d0575060025481115b15613307576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff161515600114613357576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61336386868686612250565b151560011461339e576040517fbad439a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060008281526001602081815260408084206001600160a01b03979097168452958152858320805460ff1916909217909155928152600390925250206002015490565b600d546040517f99fbab8800000000000000000000000000000000000000000000000000000000815260048101839052600091829182916001600160a01b0316906399fbab889060240161018060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f919061429a565b50505050975050505050505050600d60009054906101000a90046001600160a01b03166001600160a01b0316630c49ccbe6040518060a00160405280878152602001846fffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001428152506040518263ffffffff1660e01b815260040161353e9190600060a082019050825182526fffffffffffffffffffffffffffffffff602084015116602083015260408301516040830152606083015160608301526080830151608083015292915050565b60408051808303816000875af115801561355c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135809190613d0c565b909590945092505050565b600081815b84518110156135d0576135bc828683815181106135af576135af613c82565b60200260200101516136ca565b9150806135c881613cc4565b915050613590565b509392505050565b6060824710156136505760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109d5565b600080866001600160a01b0316858760405161366c919061437b565b60006040518083038185875af1925050503d80600081146136a9576040519150601f19603f3d011682016040523d82523d6000602084013e6136ae565b606091505b50915091506136bf878383876136f9565b979650505050505050565b60008183106136e6576000828152602084905260409020612f56565b6000838152602083905260409020612f56565b60608315613768578251600003613761576001600160a01b0385163b6137615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109d5565b5081611365565b611365838381511561377d5781518083602001fd5b8060405162461bcd60e51b81526004016109d59190614397565b600060c0828403121561268557600080fd5b6001600160a01b0381168114610a6c57600080fd5b6000602082840312156137d057600080fd5b8135612f56816137a9565b60008083601f8401126137ed57600080fd5b50813567ffffffffffffffff81111561380557600080fd5b6020830191508360208260051b85010111156121ca57600080fd5b6000806000806000806080878903121561383957600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561385f57600080fd5b61386b8a838b016137db565b9096509450606089013591508082111561388457600080fd5b5061389189828a016137db565b979a9699509497509295939492505050565b6000602082840312156138b557600080fd5b5035919050565b600080604083850312156138cf57600080fd5b82356138da816137a9565b946020939093013593505050565b600080600080606085870312156138fe57600080fd5b8435613909816137a9565b935060208501359250604085013567ffffffffffffffff81111561392c57600080fd5b613938878288016137db565b95989497509550505050565b60008060008060006080868803121561395c57600080fd5b85359450602086013567ffffffffffffffff8082111561397b57600080fd5b818801915088601f83011261398f57600080fd5b81358181111561399e57600080fd5b8960208285010111156139b057600080fd5b9699602092909201985095966040810135965060600135945092505050565b8015158114610a6c57600080fd5b6000806000606084860312156139f257600080fd5b833592506020840135613a04816139cf565b929592945050506040919091013590565b600080600060608486031215613a2a57600080fd5b505081359360208301359350604090920135919050565b81516001600160a01b0316815261014081016020830151602083015260408301516040830152606083015160608301526080830151613a84608084018215159052565b5060a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525092915050565b6020808252825182820181905260009190848201906040850190845b81811015613af957835183529284019291840191600101613add565b50909695505050505050565b60005b83811015613b20578181015183820152602001613b08565b50506000910152565b60008151808452613b41816020860160208601613b05565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160a06040840152613b7b60c0840182613b29565b905060408401516060840152606084015160808401526080840151151560a08401528091505092915050565b60008060408385031215613bba57600080fd5b50508035926020909101359150565b62ffffff81168114610a6c57600080fd5b600060208284031215613bec57600080fd5b8135612f5681613bc9565b8060020b8114610a6c57600080fd5b600060208284031215613c1857600080fd5b8135612f5681613bf7565b600060208284031215613c3557600080fd5b8151612f56816139cf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156114c4576114c4613c40565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156114c4576114c4613c40565b60006000198203613cd757613cd7613c40565b5060010190565b600081613ced57613ced613c40565b506000190190565b80820281158282048414176114c4576114c4613c40565b60008060408385031215613d1f57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c90821680613d7357607f821691505b602082108103612685577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f8211156112f357600081815260208120601f850160051c81016020861015613dd35750805b601f850160051c820191505b81811015613df257828155600101613ddf565b505050505050565b815167ffffffffffffffff811115613e1457613e14613d30565b613e2881613e228454613d5f565b84613dac565b602080601f831160018114613e5d5760008415613e455750858301515b600019600386901b1c1916600185901b178555613df2565b600085815260208120601f198616915b82811015613e8c57888601518255948401946001909101908401613e6d565b5085821015613eaa5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613ef857613ef8613eba565b500490565b600282810b9082900b03627fffff198112627fffff821317156114c4576114c4613c40565b60008160020b8360020b80613f3957613f39613eba565b6000198114627fffff1983141615613f5357613f53613c40565b90059392505050565b60008260020b8260020b028060020b9150808214613f7c57613f7c613c40565b5092915050565b600281810b9083900b01627fffff8113627fffff19821217156114c4576114c4613c40565b81516001600160a01b0316815261016081016020830151613fd460208401826001600160a01b03169052565b506040830151613feb604084018262ffffff169052565b506060830151614000606084018260020b9052565b506080830151614015608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015161405b828501826001600160a01b03169052565b505061014092830151919092015290565b80516fffffffffffffffffffffffffffffffff8116811461408c57600080fd5b919050565b600080600080608085870312156140a757600080fd5b845193506140b76020860161406c565b6040860151606090960151949790965092505050565b6000602082840312156140df57600080fd5b5051919050565b6000806000606084860312156140fb57600080fd5b6141048461406c565b925060208401519150604084015190509250925092565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261415057600080fd5b83018035915067ffffffffffffffff82111561416b57600080fd5b6020019150600581901b36038213156121ca57600080fd5b805161408c816137a9565b6000602082840312156141a057600080fd5b8151612f56816137a9565b805161408c81613bf7565b805161ffff8116811461408c57600080fd5b600080600080600080600060e0888a0312156141e357600080fd5b87516141ee816137a9565b60208901519097506141ff81613bf7565b955061420d604089016141b6565b945061421b606089016141b6565b9350614229608089016141b6565b925060a088015160ff8116811461423f57600080fd5b60c0890151909250614250816139cf565b8091505092959891949750929550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805161408c81613bc9565b6000806000806000806000806000806000806101808d8f0312156142bd57600080fd5b8c516bffffffffffffffffffffffff811681146142d957600080fd5b9b506142e760208e01614183565b9a506142f560408e01614183565b995061430360608e01614183565b985061431160808e0161428f565b975061431f60a08e016141ab565b965061432d60c08e016141ab565b955061433b60e08e0161406c565b94506101008d015193506101208d0151925061435a6101408e0161406c565b91506143696101608e0161406c565b90509295989b509295989b509295989b565b6000825161438d818460208701613b05565b9190910192915050565b602081526000612f566020830184613b2956fea2646970667358221220ac0de0d97473e6317df064e4553a2a0cf57de055194de221d5948072898bb6c764736f6c63430008130033000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006982508145454ce325ddbe47a25d4ec3d2311933000000000000000000000000423f4e6138e475d85cf7ea071ac92097ed631eea000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000017cc6042605381c158d2adab487434bde79aa61c0000000000000000000000004c0da551bc56c55139c87abdf00cf9bc754aec360000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984

Deployed Bytecode

0x6080604052600436106103135760003560e01c80637c6490211161019a578063b4d68b35116100e1578063e3f8ab701161008a578063f3fef3a311610064578063f3fef3a31461093d578063fcddef951461095d578063ff7406301461097d57600080fd5b8063e3f8ab70146108f2578063ee69993914610912578063ef77f8381461092757600080fd5b8063d5ad8bd1116100bb578063d5ad8bd11461085c578063ddc356171461087c578063debfda30146108b457600080fd5b8063b4d68b35146107ef578063c4d1aa791461081c578063d5322e2f1461083c57600080fd5b80639ac2a01111610143578063ae727e7c1161011d578063ae727e7c1461078d578063afa1e473146107ad578063b44a2722146107cf57600080fd5b80639ac2a011146106fe5780639f8a13d71461072e578063a57a7e381461077757600080fd5b80638bdb2afa116101745780638bdb2afa1461069e5780638d981e36146106c8578063994eec8b146106e857600080fd5b80637c649021146106315780638a790e84146106515780638b120b4d1461067157600080fd5b80632a48cd781161025e5780636c89bf13116102075780636ddf2fa2116101e15780636ddf2fa2146105c1578063735de9f7146105f15780637b763ed41461061157600080fd5b80636c89bf131461056b5780636d735208146105815780636d7c98d1146105a157600080fd5b806347e7ef241161023857806347e7ef241461052057806357bb0c23146105405780636aff8eac1461055557600080fd5b80632a48cd78146104b8578063411db87f146104e05780634780eac11461050057600080fd5b80631887a4d0116102c05780631f5a0bbe1161029a5780631f5a0bbe1461045c578063247884291461047c57806327a101f51461049c57600080fd5b80631887a4d0146103fc5780631be2ba74146104345780631d370ac81461045457600080fd5b80630ef33e4f116102f15780630ef33e4f1461039357806312b495a8146103a857806312eff661146103dc57600080fd5b8063089fe6aa146103185780630b36b8db1461034d5780630e9bc8ae14610371575b600080fd5b34801561032457600080fd5b50600b546103349062ffffff1681565b60405162ffffff90911681526020015b60405180910390f35b34801561035957600080fd5b5061036360165481565b604051908152602001610344565b34801561037d57600080fd5b5061039161038c366004613797565b61099d565b005b34801561039f57600080fd5b50610363610a6f565b3480156103b457600080fd5b50600b546103c9906301000000900460020b81565b60405160029190910b8152602001610344565b3480156103e857600080fd5b506103916103f73660046137be565b610add565b34801561040857600080fd5b5060085461041c906001600160a01b031681565b6040516001600160a01b039091168152602001610344565b34801561044057600080fd5b5061039161044f3660046137be565b610b5d565b610391610bd3565b34801561046857600080fd5b506103916104773660046137be565b610c3e565b34801561048857600080fd5b506103916104973660046137be565b610e0d565b3480156104a857600080fd5b50610363670de0b6b3a764000081565b6104cb6104c6366004613820565b610fba565b60408051928352602083019190915201610344565b3480156104ec57600080fd5b506103916104fb3660046138a3565b6111e5565b34801561050c57600080fd5b5060075461041c906001600160a01b031681565b34801561052c57600080fd5b5061039161053b3660046138bc565b611226565b34801561054c57600080fd5b50600254610363565b34801561056157600080fd5b5061036360135481565b34801561057757600080fd5b5061036360155481565b34801561058d57600080fd5b5061039161059c3660046138a3565b6112f8565b3480156105ad57600080fd5b506103916105bc3660046138a3565b61130f565b3480156105cd57600080fd5b506105e16105dc3660046138e8565b611354565b6040519015158152602001610344565b3480156105fd57600080fd5b50600c5461041c906001600160a01b031681565b34801561061d57600080fd5b5061039161062c366004613944565b61136d565b34801561063d57600080fd5b5061039161064c3660046139dd565b6113b6565b34801561065d57600080fd5b506104cb61066c366004613a15565b611440565b34801561067d57600080fd5b5061069161068c3660046138a3565b61145a565b6040516103449190613a41565b3480156106aa57600080fd5b50600b5461041c90660100000000000090046001600160a01b031681565b3480156106d457600080fd5b50600e5461041c906001600160a01b031681565b3480156106f457600080fd5b5061036360145481565b34801561070a57600080fd5b506105e16107193660046137be565b60066020526000908152604090205460ff1681565b34801561073a57600080fd5b506105e16107493660046137be565b6013546001600160a01b03909116600090815260126020908152604080832060115484529091529020541190565b34801561078357600080fd5b50610363600a5481565b34801561079957600080fd5b506103916107a83660046138a3565b6114ca565b3480156107b957600080fd5b506107c261150b565b6040516103449190613ac1565b3480156107db57600080fd5b50600d5461041c906001600160a01b031681565b3480156107fb57600080fd5b5061080f61080a3660046138a3565b611563565b6040516103449190613b55565b34801561082857600080fd5b5060095461041c906001600160a01b031681565b34801561084857600080fd5b50610391610857366004613ba7565b6115a3565b34801561086857600080fd5b5060175461041c906001600160a01b031681565b34801561088857600080fd5b506103636108973660046138bc565b601260209081526000928352604080842090915290825290205481565b3480156108c057600080fd5b506105e16108cf3660046137be565b6001600160a01b031660009081526006602052604090205460ff16151560011490565b3480156108fe57600080fd5b5061039161090d3660046138a3565b6119e0565b34801561091e57600080fd5b50610363611a21565b34801561093357600080fd5b5061036360115481565b34801561094957600080fd5b506103916109583660046138bc565b611a31565b34801561096957600080fd5b50610391610978366004613bda565b611ab9565b34801561098957600080fd5b50610391610998366004613c06565b611b2b565b3360009081526006602052604090205460ff16151560011415156001146109de57604051635cf20d6360e01b81523360048201526024015b60405180910390fd5b6109eb60208201826137be565b600c5460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b3906044016020604051808303816000875af1158015610a3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a629190613c23565b50610a6c81611ba4565b50565b600f546000908103610aad576040517fef2cf26f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600f8054610abd90600190613c6f565b81548110610acd57610acd613c82565b9060005260206000200154905090565b3360009081526006602052604090205460ff1615156001141515600114610b1957604051635cf20d6360e01b81523360048201526024016109d5565b600b80546001600160a01b039092166601000000000000027fffffffffffff0000000000000000000000000000000000000000ffffffffffff909216919091179055565b3360009081526006602052604090205460ff1615156001141515600114610b9957604051635cf20d6360e01b81523360048201526024016109d5565b601780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610c2357600080fd5b505af1158015610c37573d6000803e3d6000fd5b5050505050565b3360009081526006602052604090205460ff1615156001141515600114610c7a57604051635cf20d6360e01b81523360048201526024016109d5565b60085460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190613c23565b5060075460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b9190613c23565b5060095460405163095ea7b360e01b81526001600160a01b03838116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af1158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190613c23565b50610a6c816001600160a01b03166000908152600660205260409020805460ff19166001179055565b3360009081526006602052604090205460ff1615156001141515600114610e4957604051635cf20d6360e01b81523360048201526024016109d5565b60085460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610e9c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec09190613c23565b5060075460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610f14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f389190613c23565b5060095460405163095ea7b360e01b81526001600160a01b038381166004830152600060248301529091169063095ea7b3906044016020604051808303816000875af1158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fb09190613c23565b50610a6c81611cfe565b600080610fc5611d61565b87801580610fd4575080600554105b1561100e576040517fba5f8ce5000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600460208190526040909120015460ff161561105b576040517f21733b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b87600003611095576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3415611198578734146110d4576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60075460008a8152600460205260409020546001600160a01b0390811691161461112a576040517f7b06f29700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561117a57600080fd5b505af115801561118e573d6000803e3d6000fd5b50505050506111bc565b6000898152600460205260409020546111bc906001600160a01b031633308b611dba565b6111cb338a8a8a8a8a8a611e42565b92509250506111da6001600055565b965096945050505050565b3360009081526006602052604090205460ff161515600114151560011461122157604051635cf20d6360e01b81523360048201526024016109d5565b601655565b3360009081526006602052604090205460ff161515600114151560011461126257604051635cf20d6360e01b81523360048201526024016109d5565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018290526001600160a01b038316906323b872dd906064015b6020604051808303816000875af11580156112cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f39190613c23565b505050565b600e546112f39082906001600160a01b03166120eb565b3360009081526006602052604090205460ff161515600114151560011461134b57604051635cf20d6360e01b81523360048201526024016109d5565b610a6c816121d1565b600061136285858585612250565b90505b949350505050565b3360009081526006602052604090205460ff16151560011415156001146113a957604051635cf20d6360e01b81523360048201526024016109d5565b610c3785858585856123c6565b3360009081526006602052604090205460ff16151560011415156001146113f257604051635cf20d6360e01b81523360048201526024016109d5565b6014839055811515811503611433576040517f4257b53100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81156112f3576015555050565b60008061144e85858561249f565b91509150935093915050565b6114bb60405180610140016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b6114c4826124fe565b92915050565b3360009081526006602052604090205460ff161515600114151560011461150657604051635cf20d6360e01b81523360048201526024016109d5565b601355565b6060600f80548060200260200160405190810160405280929190818152602001828054801561155957602002820191906000526020600020905b815481526020019060010190808311611545575b5050505050905090565b61159a6040518060a00160405280600080191681526020016060815260200160008152602001600081526020016000151581525090565b6114c48261268b565b3360009081526006602052604090205460ff16151560011415156001146115df57604051635cf20d6360e01b81523360048201526024016109d5565b600f5415611619576040517f6e8f24a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad9190613c23565b6116f95760405162461bcd60e51b815260206004820152601760248201527f436f756c64206e6f74207472616e73666572205745544800000000000000000060448201526064016109d5565b6008546040517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015611769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178d9190613c23565b6117d95760405162461bcd60e51b815260206004820152601760248201527f436f756c64206e6f74207472616e73666572207065706500000000000000000060448201526064016109d5565b6000806117e68484612841565b935093505050838210156118e3576008546001600160a01b031663a9059cbb336118108588613c6f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611873573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118979190613c23565b6118e35760405162461bcd60e51b815260206004820152601560248201527f436f756c64206e6f742072657475726e2070657065000000000000000000000060448201526064016109d5565b828110156119da576007546001600160a01b031663a9059cbb336119078487613c6f565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561196a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061198e9190613c23565b6119da5760405162461bcd60e51b815260206004820152601560248201527f436f756c64206e6f742072657475726e2077657468000000000000000000000060448201526064016109d5565b50505050565b3360009081526006602052604090205460ff1615156001141515600114611a1c57604051635cf20d6360e01b81523360048201526024016109d5565b600a55565b6000611a2c60055490565b905090565b3360009081526006602052604090205460ff1615156001141515600114611a6d57604051635cf20d6360e01b81523360048201526024016109d5565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb906044016112b0565b3360009081526006602052604090205460ff1615156001141515600114611af557604051635cf20d6360e01b81523360048201526024016109d5565b600b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000001662ffffff92909216919091179055565b3360009081526006602052604090205460ff1615156001141515600114611b6757604051635cf20d6360e01b81523360048201526024016109d5565b600b805462ffffff9092166301000000027fffffffffffffffffffffffffffffffffffffffffffffffffffff000000ffffff909216919091179055565b6000604082013515611bc157611bbe604083013542613cb1565b90505b60408051610140810190915280611bdb60208501856137be565b6001600160a01b0316815260200183602001358152602001428152602001828152602001600015158152602001600081526020016000815260200183606001358152602001836080013581526020018360a0013581525060046000600560008154611c4590613cc4565b918290555081526020808201929092526040908101600020835181547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03909116178155918301516001830155820151600282015560608201516003820155608082015160048201805460ff191691151591909117905560a0820151600582015560c0820151600682015560e082015160078201556101008201516008820155610120909101516009909101555050565b336001600160a01b03821603611d40576040517f5e03d55f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b600260005403611db35760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016109d5565b6002600055565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526119da9085906129ef565b600080611e4f8888612ad7565b60075460008981526004602052604090205488916001600160a01b03918216911614611ea157600089815260046020526040902054600754611e9e916001600160a01b0390811691168a612b42565b90505b611eab8a82612c84565b600754600854600183901c91600091611ed1916001600160a01b03908116911684612b42565b90506000611ef8611ee183612cc2565b611ef3611eee8688613c6f565b612cc2565b612cd8565b925060009150819050611f0b898c613cb1565b1115611f2157611f1e8e8c8c8c8c612dee565b90505b611f2a8d612eb8565b9550611f4a611f3b83601654612f5d565b611f458389613cb1565b612f5d565b965086600003611f86576040517f48dd9bfb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600960009054906101000a90046001600160a01b03166001600160a01b031663a9059cbb8f896040518363ffffffff1660e01b8152600401611fdd9291906001600160a01b03929092168252602082015260400190565b6020604051808303816000875af1158015611ffc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120209190613c23565b61202957600080fd5b60156000815461203890613cde565b918290555060000361208e5761204c612f7c565b600560116000815461205d90613cc4565b9182905550101561208757601154612077906103e8613cf5565b61208390611388613c6f565b6014555b6014546015555b604080518d8152602081018f90529081018890526001600160a01b038f16907fcbd7fd38c5a2c3881dce11aca6f92d1026e4eb58dbdba50361b165381b383ebb9060600160405180910390a2505050505097509795505050505050565b600d54604080516080810182528481526001600160a01b03848116602083019081526fffffffffffffffffffffffffffffffff8385018181526060850182815295517ffc6f786500000000000000000000000000000000000000000000000000000000815294516004860152915183166024850152905181166044840152925190921660648201526000928392169063fc6f78659060840160408051808303816000875af11580156121a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c59190613d0c565b915091505b9250929050565b60008181526004602052604090206003015442116122315760405162461bcd60e51b815260206004820152600960248201527f4e6f7420456e646564000000000000000000000000000000000000000000000060448201526064016109d5565b600090815260046020819052604090912001805460ff19166001179055565b60008360025460001480612265575060025481115b1561229c576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff1615156001146122ec576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526001602090815260408083206001600160a01b038a16845290915290205460ff161561232057600091506123bd565b6123ba84848080602002602001604051908101604052809392919081815260200183836020028082843760009201829052508a8152600360209081526040918290205482516001600160a01b038f169281019290925294500191506123829050565b60408051601f19818403018152828252805160209182012090830152016040516020818303038152906040528051906020012061314c565b91505b50949350505050565b6040518060a0016040528086815260200185858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093855250505060208201859052604082018490526001606090920191909152600280546003929190829061243c90613cc4565b91829055508152602080820192909252604001600020825181559082015160018201906124699082613dfa565b5060408201516002820155606082015160038201556080909101516004909101805460ff19169115159190911790555050505050565b6000806124ac8486613ee9565b9150670de0b6b3a7640000846124c28185613cf5565b6124cc9088613c6f565b6124d69086613cf5565b6124e09190613ee9565b6124ea9085613c6f565b6124f49190613cb1565b9050935093915050565b61255f60405180610140016040528060006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b8180158061256e575080600554105b156125a8576040517fba5f8ce5000000000000000000000000000000000000000000000000000000008152600481018290526024016109d5565b6000818152600460208190526040909120015460ff16156125f5576040517f21733b7d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008381526004602081815260409283902083516101408101855281546001600160a01b03168152600182015492810192909252600281015493820193909352600383015460608201529082015460ff1615156080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260099091015461012082015291505b50919050565b6126c26040518060a00160405280600080191681526020016060815260200160008152602001600081526020016000151581525090565b81600254600014806126d5575060025481115b1561270c576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff16151560011461275c576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600360008481526020019081526020016000206040518060a00160405290816000820154815260200160018201805461279490613d5f565b80601f01602080910402602001604051908101604052809291908181526020018280546127c090613d5f565b801561280d5780601f106127e25761010080835404028352916020019161280d565b820191906000526020600020905b8154815290600101906020018083116127f057829003601f168201915b5050509183525050600282015460208201526003820154604082015260049091015460ff1615156060909101529392505050565b600854600090819081908190603c908290612864906001600160a01b0316613162565b600d5460408051610160810182526008546001600160a01b03908116825260075481166020830152600b5462ffffff81169383019390935293945092909116916388316456916060820190869081906128c7906301000000900460020b88613efd565b6128d19190613f22565b6128db9190613f5c565b60020b81526020018586600b60039054906101000a900460020b876129009190613f83565b61290a9190613f22565b6129149190613f5c565b60020b81526020018b81526020018a81526020016000815260200160008152602001306001600160a01b03168152602001428152506040518263ffffffff1660e01b81526004016129659190613fa8565b6080604051808303816000875af1158015612984573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a89190614091565b600f80546001810182556000919091527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80201849055929b919a509850909650945050505050565b6000612a44826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132829092919063ffffffff16565b9050805160001480612a65575080806020019051810190612a659190613c23565b6112f35760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016109d5565b600082815260046020526040812060078101546006909101805491928492612b00908490613cb1565b9250508190551115612b3e576040517f29ba29c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b600c5460408051610100810182526001600160a01b0386811682528581166020830152600b5462ffffff1692820192909252306060820152601054600093929092169163414bf38991906080820190612b9b9042613cb1565b81526020018581526020016002815260200160006001600160a01b03168152506040518263ffffffff1660e01b8152600401612c4191906000610100820190506001600160a01b0380845116835280602085015116602084015262ffffff60408501511660408401528060608501511660608401526080840151608084015260a084015160a084015260c084015160c08401528060e08501511660e08401525092915050565b6020604051808303816000875af1158015612c60573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136591906140cd565b6001600160a01b0382166000908152601260209081526040808320601154845290915281208054839290612cb9908490613cb1565b90915550505050565b6000612cce6000613291565b6114c49083613ee9565b600d546040805160c08101909152600091829182916001600160a01b03169063219f5d179080612d06610a6f565b8152602001888152602001878152602001600081526020016000815260200160105442612d339190613cb1565b9052604080517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681528251600482015260208301516024820152908201516044820152606082015160648201526080820151608482015260a09091015160a482015260c4016060604051808303816000875af1158015612dbd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de191906140e6565b9250925092509250925092565b6000838214612e3f5760405162461bcd60e51b815260206004820152600f60248201527f4c656e677468204d69736d61746368000000000000000000000000000000000060448201526064016109d5565b60005b84811015612eae57612e9087878784818110612e6057612e60613c82565b90506020020135868685818110612e7957612e79613c82565b9050602002810190612e8b919061411b565b6132bb565b612e9a9083613cb1565b915080612ea681613cc4565b915050612e42565b5095945050505050565b6000806000612f066004600086815260200190815260200160002060050160008154612ee390613cc4565b91829055506000868152600460205260409020600981015460019091015461249f565b6000868152600460205260409020600801549193509150821115612f56576040517fb6a512ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9392505050565b6000670de0b6b3a7640000612f728385613cf5565b612f569190613ee9565b600080612f8f612f8a610a6f565b6133e3565b91509150612fb6600a5483612fa49190613ee9565b600a54612fb19084613ee9565b612841565b50506008546040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa15801561301e573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304291906140cd565b6017546040517f9b6d3253000000000000000000000000000000000000000000000000000000008152600481018390529192506001600160a01b031690639b6d325390602401600060405180830381600087803b1580156130a257600080fd5b505af11580156130b6573d6000803e3d6000fd5b50506008546017546040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b039182166004820152602481018690529116925063a9059cbb91506044016020604051808303816000875af1158015613128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119da9190613c23565b600082613159858461358b565b14949350505050565b600b546007546040517f1698ee820000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152918216602482015262ffffff83166044820152600092839266010000000000009091041690631698ee8290606401602060405180830381865afa1580156131e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061320d919061418e565b90506000816001600160a01b0316633850c7bd6040518163ffffffff1660e01b815260040160e060405180830381865afa15801561324f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061327391906141c8565b50939998505050505050505050565b606061136584846000856135d8565b60008160028111156132a5576132a5614260565b6132b0906010613cb1565b6114c4906010613cf5565b600083600254600014806132d0575060025481115b15613307576040517f0ebdb40c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526003602052604090206004015460ff161515600114613357576040517fd494de2f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61336386868686612250565b151560011461339e576040517fbad439a200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505060008281526001602081815260408084206001600160a01b03979097168452958152858320805460ff1916909217909155928152600390925250206002015490565b600d546040517f99fbab8800000000000000000000000000000000000000000000000000000000815260048101839052600091829182916001600160a01b0316906399fbab889060240161018060405180830381865afa15801561344b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061346f919061429a565b50505050975050505050505050600d60009054906101000a90046001600160a01b03166001600160a01b0316630c49ccbe6040518060a00160405280878152602001846fffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001428152506040518263ffffffff1660e01b815260040161353e9190600060a082019050825182526fffffffffffffffffffffffffffffffff602084015116602083015260408301516040830152606083015160608301526080830151608083015292915050565b60408051808303816000875af115801561355c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135809190613d0c565b909590945092505050565b600081815b84518110156135d0576135bc828683815181106135af576135af613c82565b60200260200101516136ca565b9150806135c881613cc4565b915050613590565b509392505050565b6060824710156136505760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016109d5565b600080866001600160a01b0316858760405161366c919061437b565b60006040518083038185875af1925050503d80600081146136a9576040519150601f19603f3d011682016040523d82523d6000602084013e6136ae565b606091505b50915091506136bf878383876136f9565b979650505050505050565b60008183106136e6576000828152602084905260409020612f56565b6000838152602083905260409020612f56565b60608315613768578251600003613761576001600160a01b0385163b6137615760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109d5565b5081611365565b611365838381511561377d5781518083602001fd5b8060405162461bcd60e51b81526004016109d59190614397565b600060c0828403121561268557600080fd5b6001600160a01b0381168114610a6c57600080fd5b6000602082840312156137d057600080fd5b8135612f56816137a9565b60008083601f8401126137ed57600080fd5b50813567ffffffffffffffff81111561380557600080fd5b6020830191508360208260051b85010111156121ca57600080fd5b6000806000806000806080878903121561383957600080fd5b8635955060208701359450604087013567ffffffffffffffff8082111561385f57600080fd5b61386b8a838b016137db565b9096509450606089013591508082111561388457600080fd5b5061389189828a016137db565b979a9699509497509295939492505050565b6000602082840312156138b557600080fd5b5035919050565b600080604083850312156138cf57600080fd5b82356138da816137a9565b946020939093013593505050565b600080600080606085870312156138fe57600080fd5b8435613909816137a9565b935060208501359250604085013567ffffffffffffffff81111561392c57600080fd5b613938878288016137db565b95989497509550505050565b60008060008060006080868803121561395c57600080fd5b85359450602086013567ffffffffffffffff8082111561397b57600080fd5b818801915088601f83011261398f57600080fd5b81358181111561399e57600080fd5b8960208285010111156139b057600080fd5b9699602092909201985095966040810135965060600135945092505050565b8015158114610a6c57600080fd5b6000806000606084860312156139f257600080fd5b833592506020840135613a04816139cf565b929592945050506040919091013590565b600080600060608486031215613a2a57600080fd5b505081359360208301359350604090920135919050565b81516001600160a01b0316815261014081016020830151602083015260408301516040830152606083015160608301526080830151613a84608084018215159052565b5060a083015160a083015260c083015160c083015260e083015160e083015261010080840151818401525061012080840151818401525092915050565b6020808252825182820181905260009190848201906040850190845b81811015613af957835183529284019291840191600101613add565b50909695505050505050565b60005b83811015613b20578181015183820152602001613b08565b50506000910152565b60008151808452613b41816020860160208601613b05565b601f01601f19169290920160200192915050565b60208152815160208201526000602083015160a06040840152613b7b60c0840182613b29565b905060408401516060840152606084015160808401526080840151151560a08401528091505092915050565b60008060408385031215613bba57600080fd5b50508035926020909101359150565b62ffffff81168114610a6c57600080fd5b600060208284031215613bec57600080fd5b8135612f5681613bc9565b8060020b8114610a6c57600080fd5b600060208284031215613c1857600080fd5b8135612f5681613bf7565b600060208284031215613c3557600080fd5b8151612f56816139cf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818103818111156114c4576114c4613c40565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b808201808211156114c4576114c4613c40565b60006000198203613cd757613cd7613c40565b5060010190565b600081613ced57613ced613c40565b506000190190565b80820281158282048414176114c4576114c4613c40565b60008060408385031215613d1f57600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600181811c90821680613d7357607f821691505b602082108103612685577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b601f8211156112f357600081815260208120601f850160051c81016020861015613dd35750805b601f850160051c820191505b81811015613df257828155600101613ddf565b505050505050565b815167ffffffffffffffff811115613e1457613e14613d30565b613e2881613e228454613d5f565b84613dac565b602080601f831160018114613e5d5760008415613e455750858301515b600019600386901b1c1916600185901b178555613df2565b600085815260208120601f198616915b82811015613e8c57888601518255948401946001909101908401613e6d565b5085821015613eaa5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082613ef857613ef8613eba565b500490565b600282810b9082900b03627fffff198112627fffff821317156114c4576114c4613c40565b60008160020b8360020b80613f3957613f39613eba565b6000198114627fffff1983141615613f5357613f53613c40565b90059392505050565b60008260020b8260020b028060020b9150808214613f7c57613f7c613c40565b5092915050565b600281810b9083900b01627fffff8113627fffff19821217156114c4576114c4613c40565b81516001600160a01b0316815261016081016020830151613fd460208401826001600160a01b03169052565b506040830151613feb604084018262ffffff169052565b506060830151614000606084018260020b9052565b506080830151614015608084018260020b9052565b5060a083015160a083015260c083015160c083015260e083015160e08301526101008084015181840152506101208084015161405b828501826001600160a01b03169052565b505061014092830151919092015290565b80516fffffffffffffffffffffffffffffffff8116811461408c57600080fd5b919050565b600080600080608085870312156140a757600080fd5b845193506140b76020860161406c565b6040860151606090960151949790965092505050565b6000602082840312156140df57600080fd5b5051919050565b6000806000606084860312156140fb57600080fd5b6141048461406c565b925060208401519150604084015190509250925092565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261415057600080fd5b83018035915067ffffffffffffffff82111561416b57600080fd5b6020019150600581901b36038213156121ca57600080fd5b805161408c816137a9565b6000602082840312156141a057600080fd5b8151612f56816137a9565b805161408c81613bf7565b805161ffff8116811461408c57600080fd5b600080600080600080600060e0888a0312156141e357600080fd5b87516141ee816137a9565b60208901519097506141ff81613bf7565b955061420d604089016141b6565b945061421b606089016141b6565b9350614229608089016141b6565b925060a088015160ff8116811461423f57600080fd5b60c0890151909250614250816139cf565b8091505092959891949750929550565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805161408c81613bc9565b6000806000806000806000806000806000806101808d8f0312156142bd57600080fd5b8c516bffffffffffffffffffffffff811681146142d957600080fd5b9b506142e760208e01614183565b9a506142f560408e01614183565b995061430360608e01614183565b985061431160808e0161428f565b975061431f60a08e016141ab565b965061432d60c08e016141ab565b955061433b60e08e0161406c565b94506101008d015193506101208d0151925061435a6101408e0161406c565b91506143696101608e0161406c565b90509295989b509295989b509295989b565b6000825161438d818460208701613b05565b9190910192915050565b602081526000612f566020830184613b2956fea2646970667358221220ac0de0d97473e6317df064e4553a2a0cf57de055194de221d5948072898bb6c764736f6c63430008130033

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

000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000006982508145454ce325ddbe47a25d4ec3d2311933000000000000000000000000423f4e6138e475d85cf7ea071ac92097ed631eea000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe8800000000000000000000000017cc6042605381c158d2adab487434bde79aa61c0000000000000000000000004c0da551bc56c55139c87abdf00cf9bc754aec360000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984

-----Decoded View---------------
Arg [0] : _wethContract (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [1] : _pepeContract (address): 0x6982508145454Ce325dDbE47a25d4ec3d2311933
Arg [2] : _pondContract (address): 0x423f4e6138E475D85CF7Ea071AC92097Ed631eea
Arg [3] : _uniswapRouter (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [4] : _nonfungiblePositionManager (address): 0xC36442b4a4522E871399CD717aBDD847Ab11FE88
Arg [5] : _distilleryAddress (address): 0x17CC6042605381c158D2adab487434Bde79Aa61C
Arg [6] : _spawnManager (address): 0x4c0da551BC56C55139C87aBdF00CF9BC754aEc36
Arg [7] : _uniswapFactory (address): 0x1F98431c8aD98523631AE4a59f267346ea31F984

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [1] : 0000000000000000000000006982508145454ce325ddbe47a25d4ec3d2311933
Arg [2] : 000000000000000000000000423f4e6138e475d85cf7ea071ac92097ed631eea
Arg [3] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [4] : 000000000000000000000000c36442b4a4522e871399cd717abdd847ab11fe88
Arg [5] : 00000000000000000000000017cc6042605381c158d2adab487434bde79aa61c
Arg [6] : 0000000000000000000000004c0da551bc56c55139c87abdf00cf9bc754aec36
Arg [7] : 0000000000000000000000001f98431c8ad98523631ae4a59f267346ea31f984


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.