ETH Price: $3,469.06 (+5.92%)
Gas: 7 Gwei

Contract

0xa6ce93D79d588c2a1e321065c9a2e6c9194edfFE
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap Once202364302024-07-04 23:29:3511 days ago1720135775IN
0xa6ce93D7...9194edfFE
0.50251256 ETH0.002536618.35780754
Swap Once202364262024-07-04 23:28:4711 days ago1720135727IN
0xa6ce93D7...9194edfFE
0.50251256 ETH0.002689478.75560896
Swap Once202364222024-07-04 23:27:5911 days ago1720135679IN
0xa6ce93D7...9194edfFE
0.50251256 ETH0.002044018.89156574
Swap Once202362652024-07-04 22:56:2311 days ago1720133783IN
0xa6ce93D7...9194edfFE
0 ETH0.001304195.03575041
Swap Once202359732024-07-04 21:57:4711 days ago1720130267IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.001085665.72433655
Swap Once202358142024-07-04 21:25:3511 days ago1720128335IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.000985186.66455962
Swap Once202355942024-07-04 20:40:5911 days ago1720125659IN
0xa6ce93D7...9194edfFE
0 ETH0.001966887.21406166
Swap Once202355012024-07-04 20:22:1111 days ago1720124531IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.001666948.51814323
Swap Once202350042024-07-04 18:41:5911 days ago1720118519IN
0xa6ce93D7...9194edfFE
0 ETH0.001651629.98572148
Swap Once202329642024-07-04 11:50:4711 days ago1720093847IN
0xa6ce93D7...9194edfFE
0 ETH0.001432349.12076572
Swap Once202288492024-07-03 22:04:1112 days ago1720044251IN
0xa6ce93D7...9194edfFE
0.08040201 ETH0.0018338210.08943238
Swap Once202288132024-07-03 21:56:5912 days ago1720043819IN
0xa6ce93D7...9194edfFE
2.01005025 ETH0.001343867.42391624
Swap Once202213942024-07-02 21:04:5913 days ago1719954299IN
0xa6ce93D7...9194edfFE
0 ETH0.001641088.0148411
Swap Once202211762024-07-02 20:21:1113 days ago1719951671IN
0xa6ce93D7...9194edfFE
0.50251256 ETH0.000907235.63861023
Swap Once202189252024-07-02 12:47:1113 days ago1719924431IN
0xa6ce93D7...9194edfFE
0.10050251 ETH0.001499728.08683224
Swap Once202167042024-07-02 5:19:5913 days ago1719897599IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.000470433.87448775
Swap Once202153492024-07-02 0:47:4714 days ago1719881267IN
0xa6ce93D7...9194edfFE
0 ETH0.001489513.39506903
Swap Once202151592024-07-02 0:09:2314 days ago1719878963IN
0xa6ce93D7...9194edfFE
0.10050251 ETH0.000639793.52878776
Swap Once202143852024-07-01 21:33:4714 days ago1719869627IN
0xa6ce93D7...9194edfFE
0 ETH0.002406095.55035562
Swap Once202143422024-07-01 21:25:1114 days ago1719869111IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.001316346.81411251
Swap Once202143002024-07-01 21:16:4714 days ago1719868607IN
0xa6ce93D7...9194edfFE
0 ETH0.002590275.68860461
Swap Once202142882024-07-01 21:14:2314 days ago1719868463IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.001132165.70922472
Swap Once202142852024-07-01 21:13:4714 days ago1719868427IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.000672345.65032503
Swap Once202142782024-07-01 21:12:2314 days ago1719868343IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.000692145.8167222
Swap Once202138302024-07-01 19:42:4714 days ago1719862967IN
0xa6ce93D7...9194edfFE
0.20100502 ETH0.0021799110.28473567
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
202364302024-07-04 23:29:3511 days ago1720135775
0xa6ce93D7...9194edfFE
0.01100109 ETH
202364302024-07-04 23:29:3511 days ago1720135775
0xa6ce93D7...9194edfFE
0.01100109 ETH
202364302024-07-04 23:29:3511 days ago1720135775
0xa6ce93D7...9194edfFE
0.50251256 ETH
202364262024-07-04 23:28:4711 days ago1720135727
0xa6ce93D7...9194edfFE
0.50251256 ETH
202364222024-07-04 23:27:5911 days ago1720135679
0xa6ce93D7...9194edfFE
0.50251256 ETH
202362652024-07-04 22:56:2311 days ago1720133783
0xa6ce93D7...9194edfFE
0.06387465 ETH
202362652024-07-04 22:56:2311 days ago1720133783
0xa6ce93D7...9194edfFE
0.06387465 ETH
202359732024-07-04 21:57:4711 days ago1720130267
0xa6ce93D7...9194edfFE
0.20100502 ETH
202358142024-07-04 21:25:3511 days ago1720128335
0xa6ce93D7...9194edfFE
0.20100502 ETH
202355942024-07-04 20:40:5911 days ago1720125659
0xa6ce93D7...9194edfFE
0.36515729 ETH
202355942024-07-04 20:40:5911 days ago1720125659
0xa6ce93D7...9194edfFE
0.36515729 ETH
202355012024-07-04 20:22:1111 days ago1720124531
0xa6ce93D7...9194edfFE
0.20100502 ETH
202350042024-07-04 18:41:5911 days ago1720118519
0xa6ce93D7...9194edfFE
0.00323193 ETH
202350042024-07-04 18:41:5911 days ago1720118519
0xa6ce93D7...9194edfFE
0.00323193 ETH
202329642024-07-04 11:50:4711 days ago1720093847
0xa6ce93D7...9194edfFE
0.55808315 ETH
202329642024-07-04 11:50:4711 days ago1720093847
0xa6ce93D7...9194edfFE
0.55808315 ETH
202288492024-07-03 22:04:1112 days ago1720044251
0xa6ce93D7...9194edfFE
0.08040201 ETH
202288132024-07-03 21:56:5912 days ago1720043819
0xa6ce93D7...9194edfFE
0.01005025 ETH
202288132024-07-03 21:56:5912 days ago1720043819
0xa6ce93D7...9194edfFE
0.01005025 ETH
202288132024-07-03 21:56:5912 days ago1720043819
0xa6ce93D7...9194edfFE
2.01005025 ETH
202213942024-07-02 21:04:5913 days ago1719954299
0xa6ce93D7...9194edfFE
0.01093864 ETH
202213942024-07-02 21:04:5913 days ago1719954299
0xa6ce93D7...9194edfFE
0.01093864 ETH
202213942024-07-02 21:04:5913 days ago1719954299
0xa6ce93D7...9194edfFE
0.56591299 ETH
202213942024-07-02 21:04:5913 days ago1719954299
0xa6ce93D7...9194edfFE
0.56591299 ETH
202211762024-07-02 20:21:1113 days ago1719951671
0xa6ce93D7...9194edfFE
0.50251256 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OfficialSameChainSwap

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion
File 1 of 18 : OfficialSameChainSwap.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.20;

import "@openzeppelin/contracts/access/Ownable2Step.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import "./libs/BytesLib.sol";

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

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

  struct ExactOutputSingleParams {
    address tokenIn;
    address tokenOut;
    uint24 fee;
    address recipient;
    uint256 amountOut;
    uint256 amountInMaximum;
    uint160 sqrtPriceLimitX96;
  }
  function exactOutputSingle(
    ExactOutputSingleParams calldata params
  ) external payable returns (uint256 amountIn);

  struct ExactOutputParams {
    bytes path;
    address recipient;
    uint256 amountOut;
    uint256 amountInMaximum;
  }
  function exactOutput(
    ExactOutputParams calldata params
  ) external payable returns (uint256 amountIn);

  function uniswapV3SwapCallback(
    int256 amount0Delta,
    int256 amount1Delta,
    bytes calldata data
  ) external;

  function swapExactTokensForTokens(
    uint256 amountIn,
    uint256 amountOutMin,
    address[] calldata path,
    address to
  ) external payable returns (uint256 amountOut);
  function swapTokensForExactTokens(
    uint256 amountOut,
    uint256 amountInMax,
    address[] calldata path,
    address to
  ) external payable returns (uint256 amountIn);

  function WETH9() external view returns (address);
}

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

    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external payable;
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external;

    function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
}

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint amount) external;
}

contract OfficialSameChainSwap is Ownable2Step, ReentrancyGuard {
  using SafeERC20 for IERC20;
  using BytesLib for bytes;

  mapping(address => bool) public feeTokens;
  uint256 public platformFee; // Fee must be by 1000, so if you want 5% this will be 5000
  address public feeReceiver;
  uint256 public constant feeBps = 1000; // 1000 is 1% so we can have many decimals

  IUniswapV2Router02 public immutable v2Router;
  IV3SwapRouter public immutable v3Router;
  address public immutable wethToken;

  error FailedCall(); // Used when transfer function is failed.
  //////////================= Events ====================================================
  event SwapExecuted(
    address indexed tokenIn,
    address indexed tokenOut,
    uint amountIn,
    uint amountOut
  );
  event FeeReceiverSet(
    address indexed _oldReceiver,
    address indexed _newReceiver
  );
  event Fee(
    address indexed user, 
    uint256 amount, 
    address indexed token
  );

  constructor(
    uint256 _fee,
    address _feeReceiver,
    address _v3Router,
    address _v2Router,
    address _weth
  ) Ownable(msg.sender) {
    platformFee = _fee;
    feeReceiver = _feeReceiver;
    v3Router = IV3SwapRouter(_v3Router);
    v2Router = IUniswapV2Router02(_v2Router);
    wethToken = _weth;
  }

  uint256 public constant MAX_PLATFORM_FEE = 2000; // 20% in basis points
  uint256 public threshold = 0.01 * 10**18; // 20% in basis points
  function changeFeeData(uint256 _fee, address _feeReceiver, uint256 _threshold) external onlyOwner {
    require(_fee <= MAX_PLATFORM_FEE, "Platform fee exceeds the maximum limit");
    address oldReceiver = feeReceiver;
    platformFee = _fee;
    feeReceiver = _feeReceiver;
    threshold = _threshold;
    emit FeeReceiverSet(oldReceiver, _feeReceiver);
  }

  function swapOnce(
    address _tokenA,
    address _tokenB,
    bool _unwrappETH,
    uint256 _amountIn,
    uint256 _minAmountOutV2,
    uint256 _minAmountOutV3,
    uint8 _buyOneTwoOrThree, // 1 means buy only v2, 2 means buy v3 only, 3 means buy first v2 then v3, 4 means buy first v3 then v2
    address[] memory _pathV2,
    bytes memory _pathV3,
    bool isWethIn
  ) public payable nonReentrant {
    // ETH -> Token
    if (!isWethIn && _tokenA == wethToken) {
      require(msg.value > 0, "invalid msg.value");
      IWETH(wethToken).deposit{value: msg.value}();
    } else {
      require(msg.value == 0, "invalid msg.value");
      uint256 beforeTransfer = IERC20(_tokenA).balanceOf(address(this));
      IERC20(_tokenA).safeTransferFrom(msg.sender, address(this), _amountIn);
      uint256 afterTransfer = IERC20(_tokenA).balanceOf(address(this));
      _amountIn = afterTransfer - beforeTransfer;
    }
    
    uint256 amountIn = (msg.value > 0 ? msg.value : _amountIn);    
    uint256 output;
    if (_buyOneTwoOrThree == 1) {
      uint256 feeAmount = amountIn * platformFee / (feeBps * 100);
      if(_pathV2[0] != wethToken) { // WETH => Token
        address[] memory path = new address[](2);
        path[0] = _pathV2[0];
        path[1] = wethToken;
        v2Swap(path, feeAmount, 0);
      }
      output = v2Swap(_pathV2, amountIn-feeAmount, _minAmountOutV2);
    } else if (_buyOneTwoOrThree == 2) {
      uint256 feeAmount = amountIn * platformFee / (feeBps * 100);
      if(_pathV3.toAddress(0) == wethToken) { // WETH => output Token
        output = v3Swap(_tokenA, _pathV3, amountIn-feeAmount, _minAmountOutV3);
      } else if (_pathV3.toAddress(23) == wethToken && _tokenB == wethToken) { // Token => WETH 
        output = v3Swap(_tokenA, _pathV3, amountIn, _minAmountOutV3);
        feeAmount = output * platformFee / (feeBps * 100);
        output = output - feeAmount;
      } else  { // Token => WETH (stable coins) => Token
        v3Swap(_tokenA, _pathV3.slice(0, 43), feeAmount, 0);
        output = v3Swap(_tokenA, _pathV3, amountIn - feeAmount, _minAmountOutV3);
      }
    } else if (_buyOneTwoOrThree == 3) {
      output = v2Swap(_pathV2, amountIn, _minAmountOutV2);
      uint256 feeAmount = output * platformFee / (feeBps * 100);
      output = v3Swap(_pathV2[_pathV2.length - 1], _pathV3, output-feeAmount, _minAmountOutV3);
    } else if (_buyOneTwoOrThree == 4) {
      output = v3Swap(_tokenA, _pathV3, amountIn, _minAmountOutV3);
      uint256 feeAmount = output * platformFee / (feeBps * 100);
      output = v2Swap(_pathV2, output-feeAmount, _minAmountOutV2);
    }

    if (_unwrappETH) {
      IWETH(wethToken).withdraw(output);
      // payable(msg.sender).transfer(output);
      (bool success, ) = msg.sender.call{value: output}("");
      if(!success) {
        revert FailedCall();
      }
    } else {
      IERC20(_tokenB).safeTransfer(msg.sender, output);
    }

    if(IWETH(wethToken).balanceOf(address(this)) >= threshold) {
      IWETH(wethToken).withdraw(IWETH(wethToken).balanceOf(address(this)));
      payable(feeReceiver).transfer(address(this).balance);
    }

    emit SwapExecuted(_tokenA, _tokenB, _amountIn, output);
  }
  
  function checkAndApproveAll(address _token, address _target, uint256 _amountToCheck) internal {
    if (IERC20(_token).allowance(address(this), _target) < _amountToCheck) {
        IERC20(_token).forceApprove(_target, 0);
        IERC20(_token).forceApprove(_target, ~uint256(0));
    }
  }

  function v2Swap(
    address[] memory _path,
    uint256 _amountIn,
    uint256 _minAmountOut // Slippage in base of 1000 meaning 10 is 1% and 1 is 0.1% where 1000 is 1
  ) internal returns (uint256) {
    address tokenOut = _path[_path.length - 1];
    checkAndApproveAll(_path[0], address(v2Router), _amountIn);
    uint256 initial = IERC20(tokenOut).balanceOf(address(this));
    v2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
        _amountIn,
        _minAmountOut,
        _path,
        address(this),
        block.timestamp + 1 hours
    );
    uint256 finalAmount = IERC20(tokenOut).balanceOf(address(this));
    return finalAmount - initial;
  }

  function v3Swap(
    address _tokenIn,
    bytes memory _path,
    uint256 _amountIn,
    uint256 _minAmountOut
  ) internal returns (uint256 amountOutput) {
    checkAndApproveAll(_tokenIn, address(v3Router), _amountIn);
    IV3SwapRouter.ExactInputParams memory params = IV3SwapRouter.ExactInputParams(
      _path, address(this), _amountIn, _minAmountOut
    );
    amountOutput = v3Router.exactInput( params );
  }

  function recoverStuckETH(address payable _beneficiary) public onlyOwner {
    // _beneficiary.transfer(address(this).balance);
    (bool success, ) = _beneficiary.call{value: address(this).balance}("");
    if(!success) {
      revert FailedCall();
    }
  }

  function recoverStuckTokens(address _token) external onlyOwner {
    uint256 amount = IERC20(_token).balanceOf(address(this));
    IERC20(_token).safeTransfer(owner(), amount);
  }

  receive() external payable {}

  fallback() external payable {}
}

File 2 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

File 3 of 18 : Ownable2Step.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol)

pragma solidity ^0.8.20;

import {Ownable} from "./Ownable.sol";

/**
 * @dev Contract module which provides access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is specified at deployment time in the constructor for `Ownable`. This
 * can later be changed with {transferOwnership} and {acceptOwnership}.
 *
 * This module is used through inheritance. It will make available all functions
 * from parent (Ownable).
 */
abstract contract Ownable2Step is Ownable {
    address private _pendingOwner;

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

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

    /**
     * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual override onlyOwner {
        _pendingOwner = newOwner;
        emit OwnershipTransferStarted(owner(), newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner.
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual override {
        delete _pendingOwner;
        super._transferOwnership(newOwner);
    }

    /**
     * @dev The new owner accepts the ownership transfer.
     */
    function acceptOwnership() public virtual {
        address sender = _msgSender();
        if (pendingOwner() != sender) {
            revert OwnableUnauthorizedAccount(sender);
        }
        _transferOwnership(sender);
    }
}

File 4 of 18 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
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].
     *
     * CAUTION: See Security Considerations above.
     */
    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 5 of 18 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 6 of 18 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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 An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @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.encodeCall(token.transfer, (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.encodeCall(token.transferFrom, (from, to, 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);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @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.encodeCall(token.approve, (spender, value));

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

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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(token).code.length > 0;
    }
}

File 7 of 18 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

File 8 of 18 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

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

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 9 of 18 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @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;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    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
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // 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 10 of 18 : 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 11 of 18 : 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 12 of 18 : 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 13 of 18 : 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 14 of 18 : 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 15 of 18 : 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 16 of 18 : 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 17 of 18 : 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 18 of 18 : BytesLib.sol
// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * @title Solidity Bytes Arrays Utils
 * @author Gonçalo Sá <[email protected]>
 *
 * @dev Bytes tightly packed arrays utility library for ethereum contracts written in Solidity.
 *      The library lets you concatenate, slice and type cast bytes arrays both in memory and storage.
 */
pragma solidity =0.8.20;

library BytesLib {
    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    ) internal pure returns (bytes memory) {
        require(_length + 31 >= _length, 'slice_overflow');
        require(_start + _length >= _start, 'slice_overflow');
        require(_bytes.length >= _start + _length, 'slice_outOfBounds');

        bytes memory tempBytes;

        assembly {
            switch iszero(_length)
                case 0 {
                    // Get a location of some free memory and store it in tempBytes as
                    // Solidity does for memory variables.
                    tempBytes := mload(0x40)

                    // The first word of the slice result is potentially a partial
                    // word read from the original array. To read it, we calculate
                    // the length of that partial word and start copying that many
                    // bytes into the array. The first word we copy will start with
                    // data we don't care about, but the last `lengthmod` bytes will
                    // land at the beginning of the contents of the new array. When
                    // we're done copying, we overwrite the full first word with
                    // the actual length of the slice.
                    let lengthmod := and(_length, 31)

                    // The multiplication in the next line is necessary
                    // because when slicing multiples of 32 bytes (lengthmod == 0)
                    // the following copy loop was copying the origin's length
                    // and then ending prematurely not copying everything it should.
                    let mc := add(add(tempBytes, lengthmod), mul(0x20, iszero(lengthmod)))
                    let end := add(mc, _length)

                    for {
                        // The multiplication in the next line has the same exact purpose
                        // as the one above.
                        let cc := add(add(add(_bytes, lengthmod), mul(0x20, iszero(lengthmod))), _start)
                    } lt(mc, end) {
                        mc := add(mc, 0x20)
                        cc := add(cc, 0x20)
                    } {
                        mstore(mc, mload(cc))
                    }

                    mstore(tempBytes, _length)

                    //update free-memory pointer
                    //allocating the array padded to 32 bytes like the compiler does now
                    mstore(0x40, and(add(mc, 31), not(31)))
                }
                //if we want a zero-length slice let's just return a zero-length array
                default {
                    tempBytes := mload(0x40)
                    //zero out the 32 bytes slice we are about to return
                    //we need to do it because Solidity does not garbage collect
                    mstore(tempBytes, 0)

                    mstore(0x40, add(tempBytes, 0x20))
                }
        }

        return tempBytes;
    }

    function toAddress(bytes memory _bytes, uint256 _start) internal pure returns (address) {
        require(_start + 20 >= _start, 'toAddress_overflow');
        require(_bytes.length >= _start + 20, 'toAddress_outOfBounds');
        address tempAddress;

        assembly {
            tempAddress := div(mload(add(add(_bytes, 0x20), _start)), 0x1000000000000000000000000)
        }

        return tempAddress;
    }

    function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) {
        require(_start + 3 >= _start, 'toUint24_overflow');
        require(_bytes.length >= _start + 3, 'toUint24_outOfBounds');
        uint24 tempUint;

        assembly {
            tempUint := mload(add(add(_bytes, 0x3), _start))
        }

        return tempUint;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"address","name":"_v3Router","type":"address"},{"internalType":"address","name":"_v2Router","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"FailedCall","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"Fee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_oldReceiver","type":"address"},{"indexed":true,"internalType":"address","name":"_newReceiver","type":"address"}],"name":"FeeReceiverSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"SwapExecuted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"MAX_PLATFORM_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"changeFeeData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeBps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"feeTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"platformFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_beneficiary","type":"address"}],"name":"recoverStuckETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"}],"name":"recoverStuckTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenA","type":"address"},{"internalType":"address","name":"_tokenB","type":"address"},{"internalType":"bool","name":"_unwrappETH","type":"bool"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_minAmountOutV2","type":"uint256"},{"internalType":"uint256","name":"_minAmountOutV3","type":"uint256"},{"internalType":"uint8","name":"_buyOneTwoOrThree","type":"uint8"},{"internalType":"address[]","name":"_pathV2","type":"address[]"},{"internalType":"bytes","name":"_pathV3","type":"bytes"},{"internalType":"bool","name":"isWethIn","type":"bool"}],"name":"swapOnce","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"v2Router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"v3Router","outputs":[{"internalType":"contract IV3SwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e0604052662386f26fc100006006553480156200001c57600080fd5b50604051620035a6380380620035a6833981810160405281019062000042919062000363565b33600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000b85760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000af9190620003fc565b60405180910390fd5b620000c981620001c160201b60201c565b5060016002819055508460048190555083600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff1660c08173ffffffffffffffffffffffffffffffffffffffff1681525050505050505062000419565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055620001f781620001fa60201b60201c565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b6000819050919050565b620002d881620002c3565b8114620002e457600080fd5b50565b600081519050620002f881620002cd565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200032b82620002fe565b9050919050565b6200033d816200031e565b81146200034957600080fd5b50565b6000815190506200035d8162000332565b92915050565b600080600080600060a08688031215620003825762000381620002be565b5b60006200039288828901620002e7565b9550506020620003a5888289016200034c565b9450506040620003b8888289016200034c565b9350506060620003cb888289016200034c565b9250506080620003de888289016200034c565b9150509295509295909350565b620003f6816200031e565b82525050565b6000602082019050620004136000830184620003eb565b92915050565b60805160a05160c0516130f4620004b26000396000818161044d015281816108020152818161089a01528181610ae801528181610c0e01528181610ce001528181610d6401528181610dcd01528181610fa101528181611104015281816111a301526111df0152600081816103f1015281816119a00152611a020152600081816113ae015281816116fa015261179f01526130f46000f3fe60806040526004361061010d5760003560e01c80636899cb7011610095578063b3f0067411610064578063b3f0067414610329578063d8b499cd14610354578063deadbc1414610370578063e30c39781461039b578063f2fde38b146103c657610114565b80636899cb70146102a7578063715018a6146102d057806379ba5097146102e75780638da5cb5b146102fe57610114565b80633998a681116100dc5780633998a681146101d457806342cde4e8146101ff5780634b57b0be1461022a5780634be55d1f14610255578063506a23f91461027e57610114565b80630dc913061461011657806316605a0d1461014157806324a9d8531461017e57806326232a2e146101a957610114565b3661011457005b005b34801561012257600080fd5b5061012b6103ef565b6040516101389190612266565b60405180910390f35b34801561014d57600080fd5b50610168600480360381019061016391906122d3565b610413565b604051610175919061231b565b60405180910390f35b34801561018a57600080fd5b50610193610433565b6040516101a0919061234f565b60405180910390f35b3480156101b557600080fd5b506101be610439565b6040516101cb919061234f565b60405180910390f35b3480156101e057600080fd5b506101e961043f565b6040516101f6919061234f565b60405180910390f35b34801561020b57600080fd5b50610214610445565b604051610221919061234f565b60405180910390f35b34801561023657600080fd5b5061023f61044b565b60405161024c9190612379565b60405180910390f35b34801561026157600080fd5b5061027c600480360381019061027791906122d3565b61046f565b005b34801561028a57600080fd5b506102a560048036038101906102a091906123c0565b61052b565b005b3480156102b357600080fd5b506102ce60048036038101906102c99190612451565b61064e565b005b3480156102dc57600080fd5b506102e56106fd565b005b3480156102f357600080fd5b506102fc610711565b005b34801561030a57600080fd5b506103136107a0565b6040516103209190612379565b60405180910390f35b34801561033557600080fd5b5061033e6107c9565b60405161034b9190612379565b60405180910390f35b61036e600480360381019061036991906126f1565b6107ef565b005b34801561037c57600080fd5b506103856113ac565b6040516103929190612829565b60405180910390f35b3480156103a757600080fd5b506103b06113d0565b6040516103bd9190612379565b60405180910390f35b3480156103d257600080fd5b506103ed60048036038101906103e891906122d3565b6113fa565b005b7f000000000000000000000000000000000000000000000000000000000000000081565b60036020528060005260406000206000915054906101000a900460ff1681565b6103e881565b60045481565b6107d081565b60065481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6104776114a7565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104b29190612379565b602060405180830381865afa1580156104cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f39190612859565b90506105276105006107a0565b828473ffffffffffffffffffffffffffffffffffffffff1661152e9092919063ffffffff16565b5050565b6105336114a7565b6107d0831115610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612909565b60405180910390fd5b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508360048190555082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816006819055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f49bc8f1c292131e71bfca22660d0716072ff2442b58d72840474dd83a390411c60405160405180910390a350505050565b6106566114a7565b60008173ffffffffffffffffffffffffffffffffffffffff164760405161067c9061295a565b60006040518083038185875af1925050503d80600081146106b9576040519150601f19603f3d011682016040523d82523d6000602084013e6106be565b606091505b50509050806106f9576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6107056114a7565b61070f60006115ad565b565b600061071b6115de565b90508073ffffffffffffffffffffffffffffffffffffffff1661073c6113d0565b73ffffffffffffffffffffffffffffffffffffffff161461079457806040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161078b9190612379565b60405180910390fd5b61079d816115ad565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107f76115e6565b8015801561085057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff16145b1561091e5760003411610898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088f906129bb565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561090057600080fd5b505af1158015610914573d6000803e3d6000fd5b5050505050610a9b565b60003414610961576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610958906129bb565b60405180910390fd5b60008a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161099c9190612379565b602060405180830381865afa1580156109b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dd9190612859565b9050610a0c33308a8e73ffffffffffffffffffffffffffffffffffffffff1661162a909392919063ffffffff16565b60008b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610a479190612379565b602060405180830381865afa158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a889190612859565b90508181610a969190612a0a565b985050505b6000803411610aaa5787610aac565b345b9050600060018660ff1603610ca857600060646103e8610acc9190612a3e565b60045484610ada9190612a3e565b610ae49190612aaf565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1686600081518110610b3157610b30612ae0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614610c8a576000600267ffffffffffffffff811115610b7157610b706124f9565b5b604051908082528060200260200182016040528015610b9f5781602001602082028036833780820191505090505b50905086600081518110610bb657610bb5612ae0565b5b602002602001015181600081518110610bd257610bd1612ae0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000000000000000000000000000000000000000000081600181518110610c4157610c40612ae0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610c87818360006116ac565b50505b610ca0868285610c9a9190612a0a565b8b6116ac565b915050610f99565b60028660ff1603610eaf57600060646103e8610cc49190612a3e565b60045484610cd29190612a3e565b610cdc9190612aaf565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610d296000876118d390919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1603610d6257610d5b8d868386610d559190612a0a565b8b611998565b9150610ea9565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610dad6017876118d390919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16148015610e1b57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff16145b15610e6a57610e2c8d86858b611998565b915060646103e8610e3d9190612a3e565b60045483610e4b9190612a3e565b610e559190612aaf565b90508082610e639190612a0a565b9150610ea8565b610e8d8d610e856000602b89611aa79092919063ffffffff16565b836000611998565b50610ea58d868386610e9f9190612a0a565b8b611998565b91505b5b50610f98565b60038660ff1603610f3857610ec585838a6116ac565b9050600060646103e8610ed89190612a3e565b60045483610ee69190612a3e565b610ef09190612aaf565b9050610f308660018851610f049190612a0a565b81518110610f1557610f14612ae0565b5b6020026020010151868385610f2a9190612a0a565b8b611998565b915050610f97565b60048660ff1603610f9657610f4f8c85848a611998565b9050600060646103e8610f629190612a3e565b60045483610f709190612a3e565b610f7a9190612aaf565b9050610f92868284610f8c9190612a0a565b8b6116ac565b9150505b5b5b5b89156110d3577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610ff8919061234f565b600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b5050505060003373ffffffffffffffffffffffffffffffffffffffff16826040516110509061295a565b60006040518083038185875af1925050503d806000811461108d576040519150601f19603f3d011682016040523d82523d6000602084013e611092565b606091505b50509050806110cd576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506110ff565b6110fe33828d73ffffffffffffffffffffffffffffffffffffffff1661152e9092919063ffffffff16565b5b6006547f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161115b9190612379565b602060405180830381865afa158015611178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c9190612859565b1061132f577f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016112369190612379565b602060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112779190612859565b6040518263ffffffff1660e01b8152600401611293919061234f565b600060405180830381600087803b1580156112ad57600080fd5b505af11580156112c1573d6000803e3d6000fd5b50505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561132d573d6000803e3d6000fd5b505b8a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c4078b8460405161138e929190612b0f565b60405180910390a350506113a0611c13565b50505050505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6114026114a7565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166114626107a0565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6114af6115de565b73ffffffffffffffffffffffffffffffffffffffff166114cd6107a0565b73ffffffffffffffffffffffffffffffffffffffff161461152c576114f06115de565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016115239190612379565b60405180910390fd5b565b6115a8838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611561929190612b38565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b505050565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556115db81611cb4565b50565b600033905090565b6002805403611621576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028081905550565b6116a6848573ffffffffffffffffffffffffffffffffffffffff166323b872dd86868660405160240161165f93929190612b61565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b50505050565b60008084600186516116be9190612a0a565b815181106116cf576116ce612ae0565b5b6020026020010151905061171f856000815181106116f0576116ef612ae0565b5b60200260200101517f000000000000000000000000000000000000000000000000000000000000000086611d78565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161175a9190612379565b602060405180830381865afa158015611777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179b9190612859565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16635c11d79586868930610e10426117eb9190612b98565b6040518663ffffffff1660e01b815260040161180b959493929190612c8a565b600060405180830381600087803b15801561182557600080fd5b505af1158015611839573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016118789190612379565b602060405180830381865afa158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190612859565b905081816118c79190612a0a565b93505050509392505050565b6000816014836118e39190612b98565b1015611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191b90612d30565b60405180910390fd5b6014826119319190612b98565b83511015611974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196b90612d9c565b60405180910390fd5b60006c01000000000000000000000000836020860101510490508091505092915050565b60006119c5857f000000000000000000000000000000000000000000000000000000000000000085611d78565b600060405180608001604052808681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525090507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b858183f826040518263ffffffff1660e01b8152600401611a599190612ead565b6020604051808303816000875af1158015611a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9c9190612859565b915050949350505050565b606081601f83611ab79190612b98565b1015611af8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aef90612f1b565b60405180910390fd5b828284611b059190612b98565b1015611b46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3d90612f1b565b60405180910390fd5b8183611b529190612b98565b84511015611b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8c90612f87565b60405180910390fd5b6060821560008114611bb65760405191506000825260208201604052611c07565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611bf45780518352602083019250602081019050611bd7565b50868552601f19601f8301166040525050505b50809150509392505050565b6001600281905550565b6000611c48828473ffffffffffffffffffffffffffffffffffffffff16611e5a90919063ffffffff16565b90506000815114158015611c6d575080806020019051810190611c6b9190612fbc565b155b15611caf57826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611ca69190612379565b60405180910390fd5b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611db4929190612fe9565b602060405180830381865afa158015611dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df59190612859565b1015611e5557611e278260008573ffffffffffffffffffffffffffffffffffffffff16611e709092919063ffffffff16565b611e54826000198573ffffffffffffffffffffffffffffffffffffffff16611e709092919063ffffffff16565b5b505050565b6060611e6883836000611f7f565b905092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38484604051602401611ea1929190612b38565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eef848261204c565b611f7957611f6e848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3866000604051602401611f2792919061304d565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b611f788482611c1d565b5b50505050565b606081471015611fc657306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401611fbd9190612379565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051611fef91906130a7565b60006040518083038185875af1925050503d806000811461202c576040519150601f19603f3d011682016040523d82523d6000602084013e612031565b606091505b5091509150612041868383612113565b925050509392505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff168460405161207691906130a7565b6000604051808303816000865af19150503d80600081146120b3576040519150601f19603f3d011682016040523d82523d6000602084013e6120b8565b606091505b50915091508180156120e657506000815114806120e55750808060200190518101906120e49190612fbc565b5b5b8015612109575060008573ffffffffffffffffffffffffffffffffffffffff163b115b9250505092915050565b60608261212857612123826121a2565b61219a565b60008251148015612150575060008473ffffffffffffffffffffffffffffffffffffffff163b145b1561219257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121899190612379565b60405180910390fd5b81905061219b565b5b9392505050565b6000815111156121b55780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061222c612227612222846121e7565b612207565b6121e7565b9050919050565b600061223e82612211565b9050919050565b600061225082612233565b9050919050565b61226081612245565b82525050565b600060208201905061227b6000830184612257565b92915050565b6000604051905090565b600080fd5b600080fd5b60006122a0826121e7565b9050919050565b6122b081612295565b81146122bb57600080fd5b50565b6000813590506122cd816122a7565b92915050565b6000602082840312156122e9576122e861228b565b5b60006122f7848285016122be565b91505092915050565b60008115159050919050565b61231581612300565b82525050565b6000602082019050612330600083018461230c565b92915050565b6000819050919050565b61234981612336565b82525050565b60006020820190506123646000830184612340565b92915050565b61237381612295565b82525050565b600060208201905061238e600083018461236a565b92915050565b61239d81612336565b81146123a857600080fd5b50565b6000813590506123ba81612394565b92915050565b6000806000606084860312156123d9576123d861228b565b5b60006123e7868287016123ab565b93505060206123f8868287016122be565b9250506040612409868287016123ab565b9150509250925092565b600061241e826121e7565b9050919050565b61242e81612413565b811461243957600080fd5b50565b60008135905061244b81612425565b92915050565b6000602082840312156124675761246661228b565b5b60006124758482850161243c565b91505092915050565b61248781612300565b811461249257600080fd5b50565b6000813590506124a48161247e565b92915050565b600060ff82169050919050565b6124c0816124aa565b81146124cb57600080fd5b50565b6000813590506124dd816124b7565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612531826124e8565b810181811067ffffffffffffffff821117156125505761254f6124f9565b5b80604052505050565b6000612563612281565b905061256f8282612528565b919050565b600067ffffffffffffffff82111561258f5761258e6124f9565b5b602082029050602081019050919050565b600080fd5b60006125b86125b384612574565b612559565b905080838252602082019050602084028301858111156125db576125da6125a0565b5b835b8181101561260457806125f088826122be565b8452602084019350506020810190506125dd565b5050509392505050565b600082601f830112612623576126226124e3565b5b81356126338482602086016125a5565b91505092915050565b600080fd5b600067ffffffffffffffff82111561265c5761265b6124f9565b5b612665826124e8565b9050602081019050919050565b82818337600083830152505050565b600061269461268f84612641565b612559565b9050828152602081018484840111156126b0576126af61263c565b5b6126bb848285612672565b509392505050565b600082601f8301126126d8576126d76124e3565b5b81356126e8848260208601612681565b91505092915050565b6000806000806000806000806000806101408b8d0312156127155761271461228b565b5b60006127238d828e016122be565b9a505060206127348d828e016122be565b99505060406127458d828e01612495565b98505060606127568d828e016123ab565b97505060806127678d828e016123ab565b96505060a06127788d828e016123ab565b95505060c06127898d828e016124ce565b94505060e08b013567ffffffffffffffff8111156127aa576127a9612290565b5b6127b68d828e0161260e565b9350506101008b013567ffffffffffffffff8111156127d8576127d7612290565b5b6127e48d828e016126c3565b9250506101206127f68d828e01612495565b9150509295989b9194979a5092959850565b600061281382612233565b9050919050565b61282381612808565b82525050565b600060208201905061283e600083018461281a565b92915050565b60008151905061285381612394565b92915050565b60006020828403121561286f5761286e61228b565b5b600061287d84828501612844565b91505092915050565b600082825260208201905092915050565b7f506c6174666f726d20666565206578636565647320746865206d6178696d756d60008201527f206c696d69740000000000000000000000000000000000000000000000000000602082015250565b60006128f3602683612886565b91506128fe82612897565b604082019050919050565b60006020820190508181036000830152612922816128e6565b9050919050565b600081905092915050565b50565b6000612944600083612929565b915061294f82612934565b600082019050919050565b600061296582612937565b9150819050919050565b7f696e76616c6964206d73672e76616c7565000000000000000000000000000000600082015250565b60006129a5601183612886565b91506129b08261296f565b602082019050919050565b600060208201905081810360008301526129d481612998565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612a1582612336565b9150612a2083612336565b9250828203905081811115612a3857612a376129db565b5b92915050565b6000612a4982612336565b9150612a5483612336565b9250828202612a6281612336565b91508282048414831517612a7957612a786129db565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612aba82612336565b9150612ac583612336565b925082612ad557612ad4612a80565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050612b246000830185612340565b612b316020830184612340565b9392505050565b6000604082019050612b4d600083018561236a565b612b5a6020830184612340565b9392505050565b6000606082019050612b76600083018661236a565b612b83602083018561236a565b612b906040830184612340565b949350505050565b6000612ba382612336565b9150612bae83612336565b9250828201905080821115612bc657612bc56129db565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c0181612295565b82525050565b6000612c138383612bf8565b60208301905092915050565b6000602082019050919050565b6000612c3782612bcc565b612c418185612bd7565b9350612c4c83612be8565b8060005b83811015612c7d578151612c648882612c07565b9750612c6f83612c1f565b925050600181019050612c50565b5085935050505092915050565b600060a082019050612c9f6000830188612340565b612cac6020830187612340565b8181036040830152612cbe8186612c2c565b9050612ccd606083018561236a565b612cda6080830184612340565b9695505050505050565b7f746f416464726573735f6f766572666c6f770000000000000000000000000000600082015250565b6000612d1a601283612886565b9150612d2582612ce4565b602082019050919050565b60006020820190508181036000830152612d4981612d0d565b9050919050565b7f746f416464726573735f6f75744f66426f756e64730000000000000000000000600082015250565b6000612d86601583612886565b9150612d9182612d50565b602082019050919050565b60006020820190508181036000830152612db581612d79565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612df6578082015181840152602081019050612ddb565b60008484015250505050565b6000612e0d82612dbc565b612e178185612dc7565b9350612e27818560208601612dd8565b612e30816124e8565b840191505092915050565b612e4481612336565b82525050565b60006080830160008301518482036000860152612e678282612e02565b9150506020830151612e7c6020860182612bf8565b506040830151612e8f6040860182612e3b565b506060830151612ea26060860182612e3b565b508091505092915050565b60006020820190508181036000830152612ec78184612e4a565b905092915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b6000612f05600e83612886565b9150612f1082612ecf565b602082019050919050565b60006020820190508181036000830152612f3481612ef8565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b6000612f71601183612886565b9150612f7c82612f3b565b602082019050919050565b60006020820190508181036000830152612fa081612f64565b9050919050565b600081519050612fb68161247e565b92915050565b600060208284031215612fd257612fd161228b565b5b6000612fe084828501612fa7565b91505092915050565b6000604082019050612ffe600083018561236a565b61300b602083018461236a565b9392505050565b6000819050919050565b600061303761303261302d84613012565b612207565b612336565b9050919050565b6130478161301c565b82525050565b6000604082019050613062600083018561236a565b61306f602083018461303e565b9392505050565b600061308182612dbc565b61308b8185612929565b935061309b818560208601612dd8565b80840191505092915050565b60006130b38284613076565b91508190509291505056fea264697066735822122054aa7ebfc1dc08519f4b8b276642cac8eb40d1ecd85fbb1fa9baa8826f03d9a764736f6c6343000814003300000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc450000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x60806040526004361061010d5760003560e01c80636899cb7011610095578063b3f0067411610064578063b3f0067414610329578063d8b499cd14610354578063deadbc1414610370578063e30c39781461039b578063f2fde38b146103c657610114565b80636899cb70146102a7578063715018a6146102d057806379ba5097146102e75780638da5cb5b146102fe57610114565b80633998a681116100dc5780633998a681146101d457806342cde4e8146101ff5780634b57b0be1461022a5780634be55d1f14610255578063506a23f91461027e57610114565b80630dc913061461011657806316605a0d1461014157806324a9d8531461017e57806326232a2e146101a957610114565b3661011457005b005b34801561012257600080fd5b5061012b6103ef565b6040516101389190612266565b60405180910390f35b34801561014d57600080fd5b50610168600480360381019061016391906122d3565b610413565b604051610175919061231b565b60405180910390f35b34801561018a57600080fd5b50610193610433565b6040516101a0919061234f565b60405180910390f35b3480156101b557600080fd5b506101be610439565b6040516101cb919061234f565b60405180910390f35b3480156101e057600080fd5b506101e961043f565b6040516101f6919061234f565b60405180910390f35b34801561020b57600080fd5b50610214610445565b604051610221919061234f565b60405180910390f35b34801561023657600080fd5b5061023f61044b565b60405161024c9190612379565b60405180910390f35b34801561026157600080fd5b5061027c600480360381019061027791906122d3565b61046f565b005b34801561028a57600080fd5b506102a560048036038101906102a091906123c0565b61052b565b005b3480156102b357600080fd5b506102ce60048036038101906102c99190612451565b61064e565b005b3480156102dc57600080fd5b506102e56106fd565b005b3480156102f357600080fd5b506102fc610711565b005b34801561030a57600080fd5b506103136107a0565b6040516103209190612379565b60405180910390f35b34801561033557600080fd5b5061033e6107c9565b60405161034b9190612379565b60405180910390f35b61036e600480360381019061036991906126f1565b6107ef565b005b34801561037c57600080fd5b506103856113ac565b6040516103929190612829565b60405180910390f35b3480156103a757600080fd5b506103b06113d0565b6040516103bd9190612379565b60405180910390f35b3480156103d257600080fd5b506103ed60048036038101906103e891906122d3565b6113fa565b005b7f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4581565b60036020528060005260406000206000915054906101000a900460ff1681565b6103e881565b60045481565b6107d081565b60065481565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b6104776114a7565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104b29190612379565b602060405180830381865afa1580156104cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f39190612859565b90506105276105006107a0565b828473ffffffffffffffffffffffffffffffffffffffff1661152e9092919063ffffffff16565b5050565b6105336114a7565b6107d0831115610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f90612909565b60405180910390fd5b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508360048190555082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550816006819055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f49bc8f1c292131e71bfca22660d0716072ff2442b58d72840474dd83a390411c60405160405180910390a350505050565b6106566114a7565b60008173ffffffffffffffffffffffffffffffffffffffff164760405161067c9061295a565b60006040518083038185875af1925050503d80600081146106b9576040519150601f19603f3d011682016040523d82523d6000602084013e6106be565b606091505b50509050806106f9576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050565b6107056114a7565b61070f60006115ad565b565b600061071b6115de565b90508073ffffffffffffffffffffffffffffffffffffffff1661073c6113d0565b73ffffffffffffffffffffffffffffffffffffffff161461079457806040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161078b9190612379565b60405180910390fd5b61079d816115ad565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107f76115e6565b8015801561085057507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168a73ffffffffffffffffffffffffffffffffffffffff16145b1561091e5760003411610898576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161088f906129bb565b60405180910390fd5b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561090057600080fd5b505af1158015610914573d6000803e3d6000fd5b5050505050610a9b565b60003414610961576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610958906129bb565b60405180910390fd5b60008a73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161099c9190612379565b602060405180830381865afa1580156109b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109dd9190612859565b9050610a0c33308a8e73ffffffffffffffffffffffffffffffffffffffff1661162a909392919063ffffffff16565b60008b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610a479190612379565b602060405180830381865afa158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a889190612859565b90508181610a969190612a0a565b985050505b6000803411610aaa5787610aac565b345b9050600060018660ff1603610ca857600060646103e8610acc9190612a3e565b60045484610ada9190612a3e565b610ae49190612aaf565b90507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff1686600081518110610b3157610b30612ae0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614610c8a576000600267ffffffffffffffff811115610b7157610b706124f9565b5b604051908082528060200260200182016040528015610b9f5781602001602082028036833780820191505090505b50905086600081518110610bb657610bb5612ae0565b5b602002602001015181600081518110610bd257610bd1612ae0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600181518110610c4157610c40612ae0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050610c87818360006116ac565b50505b610ca0868285610c9a9190612a0a565b8b6116ac565b915050610f99565b60028660ff1603610eaf57600060646103e8610cc49190612a3e565b60045484610cd29190612a3e565b610cdc9190612aaf565b90507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16610d296000876118d390919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff1603610d6257610d5b8d868386610d559190612a0a565b8b611998565b9150610ea9565b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16610dad6017876118d390919063ffffffff16565b73ffffffffffffffffffffffffffffffffffffffff16148015610e1b57507f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff16145b15610e6a57610e2c8d86858b611998565b915060646103e8610e3d9190612a3e565b60045483610e4b9190612a3e565b610e559190612aaf565b90508082610e639190612a0a565b9150610ea8565b610e8d8d610e856000602b89611aa79092919063ffffffff16565b836000611998565b50610ea58d868386610e9f9190612a0a565b8b611998565b91505b5b50610f98565b60038660ff1603610f3857610ec585838a6116ac565b9050600060646103e8610ed89190612a3e565b60045483610ee69190612a3e565b610ef09190612aaf565b9050610f308660018851610f049190612a0a565b81518110610f1557610f14612ae0565b5b6020026020010151868385610f2a9190612a0a565b8b611998565b915050610f97565b60048660ff1603610f9657610f4f8c85848a611998565b9050600060646103e8610f629190612a3e565b60045483610f709190612a3e565b610f7a9190612aaf565b9050610f92868284610f8c9190612a0a565b8b6116ac565b9150505b5b5b5b89156110d3577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610ff8919061234f565b600060405180830381600087803b15801561101257600080fd5b505af1158015611026573d6000803e3d6000fd5b5050505060003373ffffffffffffffffffffffffffffffffffffffff16826040516110509061295a565b60006040518083038185875af1925050503d806000811461108d576040519150601f19603f3d011682016040523d82523d6000602084013e611092565b606091505b50509050806110cd576040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506110ff565b6110fe33828d73ffffffffffffffffffffffffffffffffffffffff1661152e9092919063ffffffff16565b5b6006547f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161115b9190612379565b602060405180830381865afa158015611178573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119c9190612859565b1061132f577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016112369190612379565b602060405180830381865afa158015611253573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112779190612859565b6040518263ffffffff1660e01b8152600401611293919061234f565b600060405180830381600087803b1580156112ad57600080fd5b505af11580156112c1573d6000803e3d6000fd5b50505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561132d573d6000803e3d6000fd5b505b8a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fdd36740e2a012d93061a0d99eaa9107860955de4e90027d3cf465a055026c4078b8460405161138e929190612b0f565b60405180910390a350506113a0611c13565b50505050505050505050565b7f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6114026114a7565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff166114626107a0565b73ffffffffffffffffffffffffffffffffffffffff167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6114af6115de565b73ffffffffffffffffffffffffffffffffffffffff166114cd6107a0565b73ffffffffffffffffffffffffffffffffffffffff161461152c576114f06115de565b6040517f118cdaa70000000000000000000000000000000000000000000000000000000081526004016115239190612379565b60405180910390fd5b565b6115a8838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611561929190612b38565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b505050565b600160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556115db81611cb4565b50565b600033905090565b6002805403611621576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028081905550565b6116a6848573ffffffffffffffffffffffffffffffffffffffff166323b872dd86868660405160240161165f93929190612b61565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b50505050565b60008084600186516116be9190612a0a565b815181106116cf576116ce612ae0565b5b6020026020010151905061171f856000815181106116f0576116ef612ae0565b5b60200260200101517f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d86611d78565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161175a9190612379565b602060405180830381865afa158015611777573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179b9190612859565b90507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff16635c11d79586868930610e10426117eb9190612b98565b6040518663ffffffff1660e01b815260040161180b959493929190612c8a565b600060405180830381600087803b15801561182557600080fd5b505af1158015611839573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016118789190612379565b602060405180830381865afa158015611895573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118b99190612859565b905081816118c79190612a0a565b93505050509392505050565b6000816014836118e39190612b98565b1015611924576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191b90612d30565b60405180910390fd5b6014826119319190612b98565b83511015611974576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161196b90612d9c565b60405180910390fd5b60006c01000000000000000000000000836020860101510490508091505092915050565b60006119c5857f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4585611d78565b600060405180608001604052808681526020013073ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481525090507f00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc4573ffffffffffffffffffffffffffffffffffffffff1663b858183f826040518263ffffffff1660e01b8152600401611a599190612ead565b6020604051808303816000875af1158015611a78573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a9c9190612859565b915050949350505050565b606081601f83611ab79190612b98565b1015611af8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aef90612f1b565b60405180910390fd5b828284611b059190612b98565b1015611b46576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3d90612f1b565b60405180910390fd5b8183611b529190612b98565b84511015611b95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8c90612f87565b60405180910390fd5b6060821560008114611bb65760405191506000825260208201604052611c07565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015611bf45780518352602083019250602081019050611bd7565b50868552601f19601f8301166040525050505b50809150509392505050565b6001600281905550565b6000611c48828473ffffffffffffffffffffffffffffffffffffffff16611e5a90919063ffffffff16565b90506000815114158015611c6d575080806020019051810190611c6b9190612fbc565b155b15611caf57826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401611ca69190612379565b60405180910390fd5b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401611db4929190612fe9565b602060405180830381865afa158015611dd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611df59190612859565b1015611e5557611e278260008573ffffffffffffffffffffffffffffffffffffffff16611e709092919063ffffffff16565b611e54826000198573ffffffffffffffffffffffffffffffffffffffff16611e709092919063ffffffff16565b5b505050565b6060611e6883836000611f7f565b905092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663095ea7b38484604051602401611ea1929190612b38565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050611eef848261204c565b611f7957611f6e848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3866000604051602401611f2792919061304d565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050611c1d565b611f788482611c1d565b5b50505050565b606081471015611fc657306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401611fbd9190612379565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051611fef91906130a7565b60006040518083038185875af1925050503d806000811461202c576040519150601f19603f3d011682016040523d82523d6000602084013e612031565b606091505b5091509150612041868383612113565b925050509392505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff168460405161207691906130a7565b6000604051808303816000865af19150503d80600081146120b3576040519150601f19603f3d011682016040523d82523d6000602084013e6120b8565b606091505b50915091508180156120e657506000815114806120e55750808060200190518101906120e49190612fbc565b5b5b8015612109575060008573ffffffffffffffffffffffffffffffffffffffff163b115b9250505092915050565b60608261212857612123826121a2565b61219a565b60008251148015612150575060008473ffffffffffffffffffffffffffffffffffffffff163b145b1561219257836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016121899190612379565b60405180910390fd5b81905061219b565b5b9392505050565b6000815111156121b55780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061222c612227612222846121e7565b612207565b6121e7565b9050919050565b600061223e82612211565b9050919050565b600061225082612233565b9050919050565b61226081612245565b82525050565b600060208201905061227b6000830184612257565b92915050565b6000604051905090565b600080fd5b600080fd5b60006122a0826121e7565b9050919050565b6122b081612295565b81146122bb57600080fd5b50565b6000813590506122cd816122a7565b92915050565b6000602082840312156122e9576122e861228b565b5b60006122f7848285016122be565b91505092915050565b60008115159050919050565b61231581612300565b82525050565b6000602082019050612330600083018461230c565b92915050565b6000819050919050565b61234981612336565b82525050565b60006020820190506123646000830184612340565b92915050565b61237381612295565b82525050565b600060208201905061238e600083018461236a565b92915050565b61239d81612336565b81146123a857600080fd5b50565b6000813590506123ba81612394565b92915050565b6000806000606084860312156123d9576123d861228b565b5b60006123e7868287016123ab565b93505060206123f8868287016122be565b9250506040612409868287016123ab565b9150509250925092565b600061241e826121e7565b9050919050565b61242e81612413565b811461243957600080fd5b50565b60008135905061244b81612425565b92915050565b6000602082840312156124675761246661228b565b5b60006124758482850161243c565b91505092915050565b61248781612300565b811461249257600080fd5b50565b6000813590506124a48161247e565b92915050565b600060ff82169050919050565b6124c0816124aa565b81146124cb57600080fd5b50565b6000813590506124dd816124b7565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612531826124e8565b810181811067ffffffffffffffff821117156125505761254f6124f9565b5b80604052505050565b6000612563612281565b905061256f8282612528565b919050565b600067ffffffffffffffff82111561258f5761258e6124f9565b5b602082029050602081019050919050565b600080fd5b60006125b86125b384612574565b612559565b905080838252602082019050602084028301858111156125db576125da6125a0565b5b835b8181101561260457806125f088826122be565b8452602084019350506020810190506125dd565b5050509392505050565b600082601f830112612623576126226124e3565b5b81356126338482602086016125a5565b91505092915050565b600080fd5b600067ffffffffffffffff82111561265c5761265b6124f9565b5b612665826124e8565b9050602081019050919050565b82818337600083830152505050565b600061269461268f84612641565b612559565b9050828152602081018484840111156126b0576126af61263c565b5b6126bb848285612672565b509392505050565b600082601f8301126126d8576126d76124e3565b5b81356126e8848260208601612681565b91505092915050565b6000806000806000806000806000806101408b8d0312156127155761271461228b565b5b60006127238d828e016122be565b9a505060206127348d828e016122be565b99505060406127458d828e01612495565b98505060606127568d828e016123ab565b97505060806127678d828e016123ab565b96505060a06127788d828e016123ab565b95505060c06127898d828e016124ce565b94505060e08b013567ffffffffffffffff8111156127aa576127a9612290565b5b6127b68d828e0161260e565b9350506101008b013567ffffffffffffffff8111156127d8576127d7612290565b5b6127e48d828e016126c3565b9250506101206127f68d828e01612495565b9150509295989b9194979a5092959850565b600061281382612233565b9050919050565b61282381612808565b82525050565b600060208201905061283e600083018461281a565b92915050565b60008151905061285381612394565b92915050565b60006020828403121561286f5761286e61228b565b5b600061287d84828501612844565b91505092915050565b600082825260208201905092915050565b7f506c6174666f726d20666565206578636565647320746865206d6178696d756d60008201527f206c696d69740000000000000000000000000000000000000000000000000000602082015250565b60006128f3602683612886565b91506128fe82612897565b604082019050919050565b60006020820190508181036000830152612922816128e6565b9050919050565b600081905092915050565b50565b6000612944600083612929565b915061294f82612934565b600082019050919050565b600061296582612937565b9150819050919050565b7f696e76616c6964206d73672e76616c7565000000000000000000000000000000600082015250565b60006129a5601183612886565b91506129b08261296f565b602082019050919050565b600060208201905081810360008301526129d481612998565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612a1582612336565b9150612a2083612336565b9250828203905081811115612a3857612a376129db565b5b92915050565b6000612a4982612336565b9150612a5483612336565b9250828202612a6281612336565b91508282048414831517612a7957612a786129db565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000612aba82612336565b9150612ac583612336565b925082612ad557612ad4612a80565b5b828204905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050612b246000830185612340565b612b316020830184612340565b9392505050565b6000604082019050612b4d600083018561236a565b612b5a6020830184612340565b9392505050565b6000606082019050612b76600083018661236a565b612b83602083018561236a565b612b906040830184612340565b949350505050565b6000612ba382612336565b9150612bae83612336565b9250828201905080821115612bc657612bc56129db565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612c0181612295565b82525050565b6000612c138383612bf8565b60208301905092915050565b6000602082019050919050565b6000612c3782612bcc565b612c418185612bd7565b9350612c4c83612be8565b8060005b83811015612c7d578151612c648882612c07565b9750612c6f83612c1f565b925050600181019050612c50565b5085935050505092915050565b600060a082019050612c9f6000830188612340565b612cac6020830187612340565b8181036040830152612cbe8186612c2c565b9050612ccd606083018561236a565b612cda6080830184612340565b9695505050505050565b7f746f416464726573735f6f766572666c6f770000000000000000000000000000600082015250565b6000612d1a601283612886565b9150612d2582612ce4565b602082019050919050565b60006020820190508181036000830152612d4981612d0d565b9050919050565b7f746f416464726573735f6f75744f66426f756e64730000000000000000000000600082015250565b6000612d86601583612886565b9150612d9182612d50565b602082019050919050565b60006020820190508181036000830152612db581612d79565b9050919050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612df6578082015181840152602081019050612ddb565b60008484015250505050565b6000612e0d82612dbc565b612e178185612dc7565b9350612e27818560208601612dd8565b612e30816124e8565b840191505092915050565b612e4481612336565b82525050565b60006080830160008301518482036000860152612e678282612e02565b9150506020830151612e7c6020860182612bf8565b506040830151612e8f6040860182612e3b565b506060830151612ea26060860182612e3b565b508091505092915050565b60006020820190508181036000830152612ec78184612e4a565b905092915050565b7f736c6963655f6f766572666c6f77000000000000000000000000000000000000600082015250565b6000612f05600e83612886565b9150612f1082612ecf565b602082019050919050565b60006020820190508181036000830152612f3481612ef8565b9050919050565b7f736c6963655f6f75744f66426f756e6473000000000000000000000000000000600082015250565b6000612f71601183612886565b9150612f7c82612f3b565b602082019050919050565b60006020820190508181036000830152612fa081612f64565b9050919050565b600081519050612fb68161247e565b92915050565b600060208284031215612fd257612fd161228b565b5b6000612fe084828501612fa7565b91505092915050565b6000604082019050612ffe600083018561236a565b61300b602083018461236a565b9392505050565b6000819050919050565b600061303761303261302d84613012565b612207565b612336565b9050919050565b6130478161301c565b82525050565b6000604082019050613062600083018561236a565b61306f602083018461303e565b9392505050565b600061308182612dbc565b61308b8185612929565b935061309b818560208601612dd8565b80840191505092915050565b60006130b38284613076565b91508190509291505056fea264697066735822122054aa7ebfc1dc08519f4b8b276642cac8eb40d1ecd85fbb1fa9baa8826f03d9a764736f6c63430008140033

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

00000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc450000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _fee (uint256): 500
Arg [1] : _feeReceiver (address): 0xe1Ff5a4C489B11E094BFBB5d23c6d4597a3a79AD
Arg [2] : _v3Router (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
Arg [3] : _v2Router (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [4] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001f4
Arg [1] : 000000000000000000000000e1ff5a4c489b11e094bfbb5d23c6d4597a3a79ad
Arg [2] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45
Arg [3] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [4] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


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.