ETH Price: $3,899.97 (+0.86%)

Contract

0x7256fbC4EF5da900FED759466b773724BeFA1801

Overview

ETH Balance

0 ETH

ETH Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Direct Send USDC1222658202024-07-04 22:00:17161 days ago1720130417IN
0x7256fbC4...4BeFA1801
0 ETH0.0000015290090.06137859
Direct Send USDC1222511052024-07-04 13:49:47162 days ago1720100987IN
0x7256fbC4...4BeFA1801
0 ETH0.0000060693380.08196627
Direct Send USDC1222285682024-07-04 1:18:33162 days ago1720055913IN
0x7256fbC4...4BeFA1801
0 ETH0.0000042327260.07511268
Direct Send USDC1222279372024-07-04 0:57:31162 days ago1720054651IN
0x7256fbC4...4BeFA1801
0 ETH0.0000034492350.06123383
Direct Send USDC1222275182024-07-04 0:43:33162 days ago1720053813IN
0x7256fbC4...4BeFA1801
0 ETH0.0000045096440.06141947
Swap From USDC1222274782024-07-04 0:42:13162 days ago1720053733IN
0x7256fbC4...4BeFA1801
0 ETH0.0000098023520.06087283
Swap From USDC1222243772024-07-03 22:58:51162 days ago1720047531IN
0x7256fbC4...4BeFA1801
0 ETH0.0000097824460.06068571
Swap From USDC1222121302024-07-03 16:10:37163 days ago1720023037IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099454540.06195821
Swap From USDC1222093892024-07-03 14:39:15163 days ago1720017555IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099646940.06148781
Swap From USDC1222091622024-07-03 14:31:41163 days ago1720017101IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099125880.06101303
Swap From USDC1222083812024-07-03 14:05:39163 days ago1720015539IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099715530.06128128
Swap From USDC1221813712024-07-02 23:05:19163 days ago1719961519IN
0x7256fbC4...4BeFA1801
0 ETH0.0000021006040.06086033
Swap From USDC1221807692024-07-02 22:45:15163 days ago1719960315IN
0x7256fbC4...4BeFA1801
0 ETH0.0000098105360.06090532
Swap From USDC1221804792024-07-02 22:35:35163 days ago1719959735IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099146290.06133182
Swap From USDC1221804532024-07-02 22:34:43163 days ago1719959683IN
0x7256fbC4...4BeFA1801
0 ETH0.0000098570550.06097345
Swap From USDC1221804432024-07-02 22:34:23163 days ago1719959663IN
0x7256fbC4...4BeFA1801
0 ETH0.000009934810.06146204
Swap From USDC1221804252024-07-02 22:33:47163 days ago1719959627IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099000140.06125082
Swap From USDC1221804172024-07-02 22:33:31163 days ago1719959611IN
0x7256fbC4...4BeFA1801
0 ETH0.000009933640.06145945
Swap From USDC1221802492024-07-02 22:27:55163 days ago1719959275IN
0x7256fbC4...4BeFA1801
0 ETH0.0000021563980.0613584
Swap From USDC1221800992024-07-02 22:22:55163 days ago1719958975IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099004890.06127991
Swap From USDC1221798642024-07-02 22:15:05163 days ago1719958505IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099539160.06196606
Swap From USDC1221798632024-07-02 22:15:03163 days ago1719958503IN
0x7256fbC4...4BeFA1801
0 ETH0.0000099539160.06196606
Swap From USDC1221798622024-07-02 22:15:01163 days ago1719958501IN
0x7256fbC4...4BeFA1801
0 ETH0.0000098055910.06103745
Swap From USDC1221797452024-07-02 22:11:07163 days ago1719958267IN
0x7256fbC4...4BeFA1801
0 ETH0.0000021495460.06129845
Swap From USDC1221792622024-07-02 21:55:01163 days ago1719957301IN
0x7256fbC4...4BeFA1801
0 ETH0.0000020842550.05958641
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1222274782024-07-04 0:42:13162 days ago1720053733
0x7256fbC4...4BeFA1801
0.000259852931153 ETH
1222274782024-07-04 0:42:13162 days ago1720053733
0x7256fbC4...4BeFA1801
0.000259852931153 ETH
1222243772024-07-03 22:58:51162 days ago1720047531
0x7256fbC4...4BeFA1801
0.009911570344645 ETH
1222243772024-07-03 22:58:51162 days ago1720047531
0x7256fbC4...4BeFA1801
0.009911570344645 ETH
1222093892024-07-03 14:39:15163 days ago1720017555
0x7256fbC4...4BeFA1801
0.00037909493423 ETH
1222093892024-07-03 14:39:15163 days ago1720017555
0x7256fbC4...4BeFA1801
0.00037909493423 ETH
1222091622024-07-03 14:31:41163 days ago1720017101
0x7256fbC4...4BeFA1801
0.000039426103955 ETH
1222091622024-07-03 14:31:41163 days ago1720017101
0x7256fbC4...4BeFA1801
0.000039426103955 ETH
1222083812024-07-03 14:05:39163 days ago1720015539
0x7256fbC4...4BeFA1801
0.000136757845646 ETH
1222083812024-07-03 14:05:39163 days ago1720015539
0x7256fbC4...4BeFA1801
0.000136757845646 ETH
1221807692024-07-02 22:45:15163 days ago1719960315
0x7256fbC4...4BeFA1801
0.000958636043618 ETH
1221807692024-07-02 22:45:15163 days ago1719960315
0x7256fbC4...4BeFA1801
0.000958636043618 ETH
1221804792024-07-02 22:35:35163 days ago1719959735
0x7256fbC4...4BeFA1801
0.000957977295966 ETH
1221804792024-07-02 22:35:35163 days ago1719959735
0x7256fbC4...4BeFA1801
0.000957977295966 ETH
1221804532024-07-02 22:34:43163 days ago1719959683
0x7256fbC4...4BeFA1801
0.000957976906638 ETH
1221804532024-07-02 22:34:43163 days ago1719959683
0x7256fbC4...4BeFA1801
0.000957976906638 ETH
1221804432024-07-02 22:34:23163 days ago1719959663
0x7256fbC4...4BeFA1801
0.000957991362962 ETH
1221804432024-07-02 22:34:23163 days ago1719959663
0x7256fbC4...4BeFA1801
0.000957991362962 ETH
1221804252024-07-02 22:33:47163 days ago1719959627
0x7256fbC4...4BeFA1801
0.000957762642522 ETH
1221804252024-07-02 22:33:47163 days ago1719959627
0x7256fbC4...4BeFA1801
0.000957762642522 ETH
1221804172024-07-02 22:33:31163 days ago1719959611
0x7256fbC4...4BeFA1801
0.000957763747285 ETH
1221804172024-07-02 22:33:31163 days ago1719959611
0x7256fbC4...4BeFA1801
0.000957763747285 ETH
1221800992024-07-02 22:22:55163 days ago1719958975
0x7256fbC4...4BeFA1801
0.000957035845798 ETH
1221800992024-07-02 22:22:55163 days ago1719958975
0x7256fbC4...4BeFA1801
0.000957035845798 ETH
1221798642024-07-02 22:15:05163 days ago1719958505
0x7256fbC4...4BeFA1801
0.000957206158576 ETH
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OfficialInstantSwap

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
No with 200 runs

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

import "@openzeppelin/contracts/access/Ownable.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";

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 OfficialInstantSwap is Ownable, ReentrancyGuard {
  using SafeERC20 for IERC20;

  IUniswapV2Router02 public v2Router;
  IV3SwapRouter public v3Router;

  address public USDC;
  address public weth;
  address public executor;

  modifier onlyExecutor() {
    require(msg.sender == executor, "not executor");
    _;
  }


  //////////================= Events ====================================================
  event SwapFromUSDC(
    address indexed receiver,
    address indexed token,
    uint256 amountIn,
    uint256 amountOut,
    uint256 time
  );

  event ExecutorUpdated(address indexed oldExecutor, address indexed newExecutor);
  constructor(
    address _v3Router,
    address _v2Router,
    address _executor,
    address _usdc,
    address _weth
  ) Ownable(msg.sender) {
    v3Router = IV3SwapRouter(_v3Router);
    v2Router = IUniswapV2Router02(_v2Router);
    executor= _executor;
    USDC = _usdc;
    weth= _weth;
  }

  function swapFromUSDC(
    address _outputToken,
    uint256 _amountIn,
    uint256 _minAmountOut,
    bool _useV2,
    address[] memory _pathV2,
    bytes memory _pathV3,
    address to,
    bool unwrapETH
  ) public  nonReentrant onlyExecutor {
    // USDC -> Token
    uint256 outputAmount;
    if(_useV2) {
      outputAmount = v2Swap(_pathV2, _amountIn, _minAmountOut, to, unwrapETH);
    } else {
      outputAmount = v3Swap(USDC, _pathV3, _amountIn, _minAmountOut, to, unwrapETH);
    }
    emit SwapFromUSDC(to, _outputToken, _amountIn, outputAmount, block.timestamp);
  }

  function directSendUSDC(address to, uint256 amount) external onlyExecutor {
    require(to != address(0), "can not send address(0)");
    IERC20(USDC).transfer(to, amount);
    emit SwapFromUSDC(to, USDC, amount,amount, block.timestamp);
  }

  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
    address to,
    bool unwrapETH
  ) internal returns (uint256) {
    address tokenOut = _path[_path.length - 1];
    checkAndApproveAll(_path[0], address(v2Router), _amountIn);
    uint256 initial = IERC20(tokenOut).balanceOf(to);
    v2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(
        _amountIn,
        _minAmountOut,
        _path,
        unwrapETH ? address(this) : to,
        block.timestamp + 10 minutes
    );
    uint256 finalAmount = IERC20(tokenOut).balanceOf(to);
    if (unwrapETH) { // Get ETH at the end
        uint256 wethBalance = IERC20(weth).balanceOf(address(this));
        IWETH(weth).withdraw(wethBalance);
        payable(to).transfer(address(this).balance);
    }
    return finalAmount - initial;
  }

  function v3Swap(
    address _tokenIn,
    bytes memory _path,
    uint256 _amountIn,
    uint256 _minAmountOut,
    address to,
    bool unwrapETH
  ) internal returns (uint256 amountOutput) {
    checkAndApproveAll(_tokenIn, address(v3Router), _amountIn);
    IV3SwapRouter.ExactInputParams memory params = IV3SwapRouter.ExactInputParams(
      _path, unwrapETH ? address(this) : to, _amountIn, _minAmountOut
    );
    amountOutput = v3Router.exactInput( params );
    if (unwrapETH) { // Get ETH at the end
        uint256 wethBalance = IERC20(weth).balanceOf(address(this));
        IWETH(weth).withdraw(wethBalance);
        payable(to).transfer(address(this).balance);
    }
  }

  function setExecutor(address _newExecutor) external onlyOwner {
    emit ExecutorUpdated(executor, _newExecutor);
    executor = _newExecutor;
  }

  function recoverStuckETH(address payable _beneficiary) public onlyOwner {
    _beneficiary.transfer(address(this).balance);
  }

  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 16 : 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 16 : 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 4 of 16 : 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 5 of 16 : 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 6 of 16 : 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 7 of 16 : 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 8 of 16 : 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 9 of 16 : 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 10 of 16 : 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 11 of 16 : 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 12 of 16 : 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 13 of 16 : 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 14 of 16 : 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 15 of 16 : 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 16 of 16 : 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
        );
}

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":"address","name":"_v3Router","type":"address"},{"internalType":"address","name":"_v2Router","type":"address"},{"internalType":"address","name":"_executor","type":"address"},{"internalType":"address","name":"_usdc","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":"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":"oldExecutor","type":"address"},{"indexed":true,"internalType":"address","name":"newExecutor","type":"address"}],"name":"ExecutorUpdated","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":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"time","type":"uint256"}],"name":"SwapFromUSDC","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"directSendUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"executor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"_newExecutor","type":"address"}],"name":"setExecutor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_outputToken","type":"address"},{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_minAmountOut","type":"uint256"},{"internalType":"bool","name":"_useV2","type":"bool"},{"internalType":"address[]","name":"_pathV2","type":"address[]"},{"internalType":"bytes","name":"_pathV3","type":"bytes"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"unwrapETH","type":"bool"}],"name":"swapFromUSDC","outputs":[],"stateMutability":"nonpayable","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":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b50604051620026dc380380620026dc833981810160405281019062000037919062000344565b33600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000ad5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000a49190620003dd565b60405180910390fd5b620000be816200021660201b60201c565b506001808190555084600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050620003fa565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006200030c82620002df565b9050919050565b6200031e81620002ff565b81146200032a57600080fd5b50565b6000815190506200033e8162000313565b92915050565b600080600080600060a08688031215620003635762000362620002da565b5b600062000373888289016200032d565b955050602062000386888289016200032d565b945050604062000399888289016200032d565b9350506060620003ac888289016200032d565b9250506080620003bf888289016200032d565b9150509295509295909350565b620003d781620002ff565b82525050565b6000602082019050620003f46000830184620003cc565b92915050565b6122d2806200040a6000396000f3fe6080604052600436106100c65760003560e01c806389a302711161007f578063c34c08e511610059578063c34c08e514610236578063d12b6f3f14610261578063deadbc141461028a578063f2fde38b146102b5576100cd565b806389a30271146101b75780638da5cb5b146101e2578063bea742621461020d576100cd565b80630dc91306146100cf5780631c3c0ea8146100fa5780633fc8cef3146101235780634be55d1f1461014e5780636899cb7014610177578063715018a6146101a0576100cd565b366100cd57005b005b3480156100db57600080fd5b506100e46102de565b6040516100f191906117bf565b60405180910390f35b34801561010657600080fd5b50610121600480360381019061011c919061182c565b610304565b005b34801561012f57600080fd5b506101386103cc565b6040516101459190611868565b60405180910390f35b34801561015a57600080fd5b506101756004803603810190610170919061182c565b6103f2565b005b34801561018357600080fd5b5061019e600480360381019061019991906118c1565b6104ae565b005b3480156101ac57600080fd5b506101b5610500565b005b3480156101c357600080fd5b506101cc610514565b6040516101d99190611868565b60405180910390f35b3480156101ee57600080fd5b506101f761053a565b6040516102049190611868565b60405180910390f35b34801561021957600080fd5b50610234600480360381019061022f9190611b6a565b610563565b005b34801561024257600080fd5b5061024b6106c6565b6040516102589190611868565b60405180910390f35b34801561026d57600080fd5b5061028860048036038101906102839190611c58565b6106ec565b005b34801561029657600080fd5b5061029f61091b565b6040516102ac9190611cb9565b60405180910390f35b3480156102c157600080fd5b506102dc60048036038101906102d7919061182c565b610941565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61030c6109c7565b8073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0ef3c7eb9dbcf33ddf032f4cce366a07eda85eed03e3172e4a90c4cc16d5788660405160405180910390a380600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103fa6109c7565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104359190611868565b602060405180830381865afa158015610452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104769190611ce9565b90506104aa61048361053a565b828473ffffffffffffffffffffffffffffffffffffffff16610a4e9092919063ffffffff16565b5050565b6104b66109c7565b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156104fc573d6000803e3d6000fd5b5050565b6105086109c7565b6105126000610acd565b565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056b610b91565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290611d73565b60405180910390fd5b60008515610617576106108589898686610bd7565b905061064a565b610647600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858a8a8787610f8c565b90505b8873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f4ea87dd056ef5ce24cedc92be2d3804522c3a4a02f4b6d0ba570f23120d1d6348a84426040516106ab93929190611da2565b60405180910390a3506106bc611229565b5050505050505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390611d73565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e290611e25565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610848929190611e45565b6020604051808303816000875af1158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190611e83565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4ea87dd056ef5ce24cedc92be2d3804522c3a4a02f4b6d0ba570f23120d1d63483844260405161090f93929190611da2565b60405180910390a35050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109496109c7565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109bb5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016109b29190611868565b60405180910390fd5b6109c481610acd565b50565b6109cf611232565b73ffffffffffffffffffffffffffffffffffffffff166109ed61053a565b73ffffffffffffffffffffffffffffffffffffffff1614610a4c57610a10611232565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610a439190611868565b60405180910390fd5b565b610ac8838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401610a81929190611e45565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061123a565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600260015403610bcd576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b6000808660018851610be99190611edf565b81518110610bfa57610bf9611f13565b5b60200260200101519050610c4c87600081518110610c1b57610c1a611f13565b5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886112d1565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401610c879190611868565b602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190611ce9565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d79588888b88610d165789610d18565b305b61025842610d269190611f42565b6040518663ffffffff1660e01b8152600401610d46959493929190612034565b600060405180830381600087803b158015610d6057600080fd5b505af1158015610d74573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401610db39190611868565b602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df49190611ce9565b90508415610f72576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e599190611868565b602060405180830381865afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611ce9565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610ef7919061208e565b600060405180830381600087803b158015610f1157600080fd5b505af1158015610f25573d6000803e3d6000fd5b505050508673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610f6f573d6000803e3d6000fd5b50505b8181610f7e9190611edf565b935050505095945050505050565b6000610fbb87600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876112d1565b6000604051806080016040528088815260200184610fd95785610fdb565b305b73ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b858183f826040518263ffffffff1660e01b815260040161105d919061219a565b6020604051808303816000875af115801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a09190611ce9565b9150821561121e576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111059190611868565b602060405180830381865afa158015611122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111469190611ce9565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016111a3919061208e565b600060405180830381600087803b1580156111bd57600080fd5b505af11580156111d1573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561121b573d6000803e3d6000fd5b50505b509695505050505050565b60018081905550565b600033905090565b6000611265828473ffffffffffffffffffffffffffffffffffffffff166113b390919063ffffffff16565b9050600081511415801561128a5750808060200190518101906112889190611e83565b155b156112cc57826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016112c39190611868565b60405180910390fd5b505050565b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b815260040161130d9291906121bc565b602060405180830381865afa15801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611ce9565b10156113ae576113808260008573ffffffffffffffffffffffffffffffffffffffff166113c99092919063ffffffff16565b6113ad826000198573ffffffffffffffffffffffffffffffffffffffff166113c99092919063ffffffff16565b5b505050565b60606113c1838360006114d8565b905092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663095ea7b384846040516024016113fa929190611e45565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061144884826115a5565b6114d2576114c7848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3866000604051602401611480929190612220565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061123a565b6114d1848261123a565b5b50505050565b60608147101561151f57306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016115169190611868565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516115489190612285565b60006040518083038185875af1925050503d8060008114611585576040519150601f19603f3d011682016040523d82523d6000602084013e61158a565b606091505b509150915061159a86838361166c565b925050509392505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff16846040516115cf9190612285565b6000604051808303816000865af19150503d806000811461160c576040519150601f19603f3d011682016040523d82523d6000602084013e611611565b606091505b509150915081801561163f575060008151148061163e57508080602001905181019061163d9190611e83565b5b5b8015611662575060008573ffffffffffffffffffffffffffffffffffffffff163b115b9250505092915050565b6060826116815761167c826116fb565b6116f3565b600082511480156116a9575060008473ffffffffffffffffffffffffffffffffffffffff163b145b156116eb57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016116e29190611868565b60405180910390fd5b8190506116f4565b5b9392505050565b60008151111561170e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061178561178061177b84611740565b611760565b611740565b9050919050565b60006117978261176a565b9050919050565b60006117a98261178c565b9050919050565b6117b98161179e565b82525050565b60006020820190506117d460008301846117b0565b92915050565b6000604051905090565b600080fd5b600080fd5b60006117f982611740565b9050919050565b611809816117ee565b811461181457600080fd5b50565b60008135905061182681611800565b92915050565b600060208284031215611842576118416117e4565b5b600061185084828501611817565b91505092915050565b611862816117ee565b82525050565b600060208201905061187d6000830184611859565b92915050565b600061188e82611740565b9050919050565b61189e81611883565b81146118a957600080fd5b50565b6000813590506118bb81611895565b92915050565b6000602082840312156118d7576118d66117e4565b5b60006118e5848285016118ac565b91505092915050565b6000819050919050565b611901816118ee565b811461190c57600080fd5b50565b60008135905061191e816118f8565b92915050565b60008115159050919050565b61193981611924565b811461194457600080fd5b50565b60008135905061195681611930565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6119aa82611961565b810181811067ffffffffffffffff821117156119c9576119c8611972565b5b80604052505050565b60006119dc6117da565b90506119e882826119a1565b919050565b600067ffffffffffffffff821115611a0857611a07611972565b5b602082029050602081019050919050565b600080fd5b6000611a31611a2c846119ed565b6119d2565b90508083825260208201905060208402830185811115611a5457611a53611a19565b5b835b81811015611a7d5780611a698882611817565b845260208401935050602081019050611a56565b5050509392505050565b600082601f830112611a9c57611a9b61195c565b5b8135611aac848260208601611a1e565b91505092915050565b600080fd5b600067ffffffffffffffff821115611ad557611ad4611972565b5b611ade82611961565b9050602081019050919050565b82818337600083830152505050565b6000611b0d611b0884611aba565b6119d2565b905082815260208101848484011115611b2957611b28611ab5565b5b611b34848285611aeb565b509392505050565b600082601f830112611b5157611b5061195c565b5b8135611b61848260208601611afa565b91505092915050565b600080600080600080600080610100898b031215611b8b57611b8a6117e4565b5b6000611b998b828c01611817565b9850506020611baa8b828c0161190f565b9750506040611bbb8b828c0161190f565b9650506060611bcc8b828c01611947565b955050608089013567ffffffffffffffff811115611bed57611bec6117e9565b5b611bf98b828c01611a87565b94505060a089013567ffffffffffffffff811115611c1a57611c196117e9565b5b611c268b828c01611b3c565b93505060c0611c378b828c01611817565b92505060e0611c488b828c01611947565b9150509295985092959890939650565b60008060408385031215611c6f57611c6e6117e4565b5b6000611c7d85828601611817565b9250506020611c8e8582860161190f565b9150509250929050565b6000611ca38261178c565b9050919050565b611cb381611c98565b82525050565b6000602082019050611cce6000830184611caa565b92915050565b600081519050611ce3816118f8565b92915050565b600060208284031215611cff57611cfe6117e4565b5b6000611d0d84828501611cd4565b91505092915050565b600082825260208201905092915050565b7f6e6f74206578656375746f720000000000000000000000000000000000000000600082015250565b6000611d5d600c83611d16565b9150611d6882611d27565b602082019050919050565b60006020820190508181036000830152611d8c81611d50565b9050919050565b611d9c816118ee565b82525050565b6000606082019050611db76000830186611d93565b611dc46020830185611d93565b611dd16040830184611d93565b949350505050565b7f63616e206e6f742073656e642061646472657373283029000000000000000000600082015250565b6000611e0f601783611d16565b9150611e1a82611dd9565b602082019050919050565b60006020820190508181036000830152611e3e81611e02565b9050919050565b6000604082019050611e5a6000830185611859565b611e676020830184611d93565b9392505050565b600081519050611e7d81611930565b92915050565b600060208284031215611e9957611e986117e4565b5b6000611ea784828501611e6e565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611eea826118ee565b9150611ef5836118ee565b9250828203905081811115611f0d57611f0c611eb0565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000611f4d826118ee565b9150611f58836118ee565b9250828201905080821115611f7057611f6f611eb0565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611fab816117ee565b82525050565b6000611fbd8383611fa2565b60208301905092915050565b6000602082019050919050565b6000611fe182611f76565b611feb8185611f81565b9350611ff683611f92565b8060005b8381101561202757815161200e8882611fb1565b975061201983611fc9565b925050600181019050611ffa565b5085935050505092915050565b600060a0820190506120496000830188611d93565b6120566020830187611d93565b81810360408301526120688186611fd6565b90506120776060830185611859565b6120846080830184611d93565b9695505050505050565b60006020820190506120a36000830184611d93565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120e35780820151818401526020810190506120c8565b60008484015250505050565b60006120fa826120a9565b61210481856120b4565b93506121148185602086016120c5565b61211d81611961565b840191505092915050565b612131816118ee565b82525050565b6000608083016000830151848203600086015261215482826120ef565b91505060208301516121696020860182611fa2565b50604083015161217c6040860182612128565b50606083015161218f6060860182612128565b508091505092915050565b600060208201905081810360008301526121b48184612137565b905092915050565b60006040820190506121d16000830185611859565b6121de6020830184611859565b9392505050565b6000819050919050565b600061220a612205612200846121e5565b611760565b6118ee565b9050919050565b61221a816121ef565b82525050565b60006040820190506122356000830185611859565b6122426020830184612211565b9392505050565b600081905092915050565b600061225f826120a9565b6122698185612249565b93506122798185602086016120c5565b80840191505092915050565b60006122918284612254565b91508190509291505056fea264697066735822122026061d17efd318e13cf7b547665ce8cd7bfd65f4a388e23c2550897e37d5fc2964736f6c6343000814003300000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc450000000000000000000000004a7b5da61326a6379179b40d00f57e5bbdc962c20000000000000000000000009ec1acae39d07e1e8d8b3cebe7022790d87d744a0000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff850000000000000000000000004200000000000000000000000000000000000006

Deployed Bytecode

0x6080604052600436106100c65760003560e01c806389a302711161007f578063c34c08e511610059578063c34c08e514610236578063d12b6f3f14610261578063deadbc141461028a578063f2fde38b146102b5576100cd565b806389a30271146101b75780638da5cb5b146101e2578063bea742621461020d576100cd565b80630dc91306146100cf5780631c3c0ea8146100fa5780633fc8cef3146101235780634be55d1f1461014e5780636899cb7014610177578063715018a6146101a0576100cd565b366100cd57005b005b3480156100db57600080fd5b506100e46102de565b6040516100f191906117bf565b60405180910390f35b34801561010657600080fd5b50610121600480360381019061011c919061182c565b610304565b005b34801561012f57600080fd5b506101386103cc565b6040516101459190611868565b60405180910390f35b34801561015a57600080fd5b506101756004803603810190610170919061182c565b6103f2565b005b34801561018357600080fd5b5061019e600480360381019061019991906118c1565b6104ae565b005b3480156101ac57600080fd5b506101b5610500565b005b3480156101c357600080fd5b506101cc610514565b6040516101d99190611868565b60405180910390f35b3480156101ee57600080fd5b506101f761053a565b6040516102049190611868565b60405180910390f35b34801561021957600080fd5b50610234600480360381019061022f9190611b6a565b610563565b005b34801561024257600080fd5b5061024b6106c6565b6040516102589190611868565b60405180910390f35b34801561026d57600080fd5b5061028860048036038101906102839190611c58565b6106ec565b005b34801561029657600080fd5b5061029f61091b565b6040516102ac9190611cb9565b60405180910390f35b3480156102c157600080fd5b506102dc60048036038101906102d7919061182c565b610941565b005b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61030c6109c7565b8073ffffffffffffffffffffffffffffffffffffffff16600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0ef3c7eb9dbcf33ddf032f4cce366a07eda85eed03e3172e4a90c4cc16d5788660405160405180910390a380600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6103fa6109c7565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016104359190611868565b602060405180830381865afa158015610452573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104769190611ce9565b90506104aa61048361053a565b828473ffffffffffffffffffffffffffffffffffffffff16610a4e9092919063ffffffff16565b5050565b6104b66109c7565b8073ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f193505050501580156104fc573d6000803e3d6000fd5b5050565b6105086109c7565b6105126000610acd565b565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61056b610b91565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290611d73565b60405180910390fd5b60008515610617576106108589898686610bd7565b905061064a565b610647600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858a8a8787610f8c565b90505b8873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f4ea87dd056ef5ce24cedc92be2d3804522c3a4a02f4b6d0ba570f23120d1d6348a84426040516106ab93929190611da2565b60405180910390a3506106bc611229565b5050505050505050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390611d73565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107eb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107e290611e25565b60405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401610848929190611e45565b6020604051808303816000875af1158015610867573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088b9190611e83565b50600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4ea87dd056ef5ce24cedc92be2d3804522c3a4a02f4b6d0ba570f23120d1d63483844260405161090f93929190611da2565b60405180910390a35050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109496109c7565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036109bb5760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016109b29190611868565b60405180910390fd5b6109c481610acd565b50565b6109cf611232565b73ffffffffffffffffffffffffffffffffffffffff166109ed61053a565b73ffffffffffffffffffffffffffffffffffffffff1614610a4c57610a10611232565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401610a439190611868565b60405180910390fd5b565b610ac8838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401610a81929190611e45565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061123a565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600260015403610bcd576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600181905550565b6000808660018851610be99190611edf565b81518110610bfa57610bf9611f13565b5b60200260200101519050610c4c87600081518110610c1b57610c1a611f13565b5b6020026020010151600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886112d1565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231866040518263ffffffff1660e01b8152600401610c879190611868565b602060405180830381865afa158015610ca4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc89190611ce9565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c11d79588888b88610d165789610d18565b305b61025842610d269190611f42565b6040518663ffffffff1660e01b8152600401610d46959493929190612034565b600060405180830381600087803b158015610d6057600080fd5b505af1158015610d74573d6000803e3d6000fd5b5050505060008273ffffffffffffffffffffffffffffffffffffffff166370a08231876040518263ffffffff1660e01b8152600401610db39190611868565b602060405180830381865afa158015610dd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df49190611ce9565b90508415610f72576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610e599190611868565b602060405180830381865afa158015610e76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9a9190611ce9565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b8152600401610ef7919061208e565b600060405180830381600087803b158015610f1157600080fd5b505af1158015610f25573d6000803e3d6000fd5b505050508673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610f6f573d6000803e3d6000fd5b50505b8181610f7e9190611edf565b935050505095945050505050565b6000610fbb87600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16876112d1565b6000604051806080016040528088815260200184610fd95785610fdb565b305b73ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152509050600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b858183f826040518263ffffffff1660e01b815260040161105d919061219a565b6020604051808303816000875af115801561107c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a09190611ce9565b9150821561121e576000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111059190611868565b602060405180830381865afa158015611122573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111469190611ce9565b9050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d826040518263ffffffff1660e01b81526004016111a3919061208e565b600060405180830381600087803b1580156111bd57600080fd5b505af11580156111d1573d6000803e3d6000fd5b505050508473ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f1935050505015801561121b573d6000803e3d6000fd5b50505b509695505050505050565b60018081905550565b600033905090565b6000611265828473ffffffffffffffffffffffffffffffffffffffff166113b390919063ffffffff16565b9050600081511415801561128a5750808060200190518101906112889190611e83565b155b156112cc57826040517f5274afe70000000000000000000000000000000000000000000000000000000081526004016112c39190611868565b60405180910390fd5b505050565b808373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b815260040161130d9291906121bc565b602060405180830381865afa15801561132a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134e9190611ce9565b10156113ae576113808260008573ffffffffffffffffffffffffffffffffffffffff166113c99092919063ffffffff16565b6113ad826000198573ffffffffffffffffffffffffffffffffffffffff166113c99092919063ffffffff16565b5b505050565b60606113c1838360006114d8565b905092915050565b60008373ffffffffffffffffffffffffffffffffffffffff1663095ea7b384846040516024016113fa929190611e45565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050905061144884826115a5565b6114d2576114c7848573ffffffffffffffffffffffffffffffffffffffff1663095ea7b3866000604051602401611480929190612220565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505061123a565b6114d1848261123a565b5b50505050565b60608147101561151f57306040517fcd7860590000000000000000000000000000000000000000000000000000000081526004016115169190611868565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1684866040516115489190612285565b60006040518083038185875af1925050503d8060008114611585576040519150601f19603f3d011682016040523d82523d6000602084013e61158a565b606091505b509150915061159a86838361166c565b925050509392505050565b60008060008473ffffffffffffffffffffffffffffffffffffffff16846040516115cf9190612285565b6000604051808303816000865af19150503d806000811461160c576040519150601f19603f3d011682016040523d82523d6000602084013e611611565b606091505b509150915081801561163f575060008151148061163e57508080602001905181019061163d9190611e83565b5b5b8015611662575060008573ffffffffffffffffffffffffffffffffffffffff163b115b9250505092915050565b6060826116815761167c826116fb565b6116f3565b600082511480156116a9575060008473ffffffffffffffffffffffffffffffffffffffff163b145b156116eb57836040517f9996b3150000000000000000000000000000000000000000000000000000000081526004016116e29190611868565b60405180910390fd5b8190506116f4565b5b9392505050565b60008151111561170e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061178561178061177b84611740565b611760565b611740565b9050919050565b60006117978261176a565b9050919050565b60006117a98261178c565b9050919050565b6117b98161179e565b82525050565b60006020820190506117d460008301846117b0565b92915050565b6000604051905090565b600080fd5b600080fd5b60006117f982611740565b9050919050565b611809816117ee565b811461181457600080fd5b50565b60008135905061182681611800565b92915050565b600060208284031215611842576118416117e4565b5b600061185084828501611817565b91505092915050565b611862816117ee565b82525050565b600060208201905061187d6000830184611859565b92915050565b600061188e82611740565b9050919050565b61189e81611883565b81146118a957600080fd5b50565b6000813590506118bb81611895565b92915050565b6000602082840312156118d7576118d66117e4565b5b60006118e5848285016118ac565b91505092915050565b6000819050919050565b611901816118ee565b811461190c57600080fd5b50565b60008135905061191e816118f8565b92915050565b60008115159050919050565b61193981611924565b811461194457600080fd5b50565b60008135905061195681611930565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6119aa82611961565b810181811067ffffffffffffffff821117156119c9576119c8611972565b5b80604052505050565b60006119dc6117da565b90506119e882826119a1565b919050565b600067ffffffffffffffff821115611a0857611a07611972565b5b602082029050602081019050919050565b600080fd5b6000611a31611a2c846119ed565b6119d2565b90508083825260208201905060208402830185811115611a5457611a53611a19565b5b835b81811015611a7d5780611a698882611817565b845260208401935050602081019050611a56565b5050509392505050565b600082601f830112611a9c57611a9b61195c565b5b8135611aac848260208601611a1e565b91505092915050565b600080fd5b600067ffffffffffffffff821115611ad557611ad4611972565b5b611ade82611961565b9050602081019050919050565b82818337600083830152505050565b6000611b0d611b0884611aba565b6119d2565b905082815260208101848484011115611b2957611b28611ab5565b5b611b34848285611aeb565b509392505050565b600082601f830112611b5157611b5061195c565b5b8135611b61848260208601611afa565b91505092915050565b600080600080600080600080610100898b031215611b8b57611b8a6117e4565b5b6000611b998b828c01611817565b9850506020611baa8b828c0161190f565b9750506040611bbb8b828c0161190f565b9650506060611bcc8b828c01611947565b955050608089013567ffffffffffffffff811115611bed57611bec6117e9565b5b611bf98b828c01611a87565b94505060a089013567ffffffffffffffff811115611c1a57611c196117e9565b5b611c268b828c01611b3c565b93505060c0611c378b828c01611817565b92505060e0611c488b828c01611947565b9150509295985092959890939650565b60008060408385031215611c6f57611c6e6117e4565b5b6000611c7d85828601611817565b9250506020611c8e8582860161190f565b9150509250929050565b6000611ca38261178c565b9050919050565b611cb381611c98565b82525050565b6000602082019050611cce6000830184611caa565b92915050565b600081519050611ce3816118f8565b92915050565b600060208284031215611cff57611cfe6117e4565b5b6000611d0d84828501611cd4565b91505092915050565b600082825260208201905092915050565b7f6e6f74206578656375746f720000000000000000000000000000000000000000600082015250565b6000611d5d600c83611d16565b9150611d6882611d27565b602082019050919050565b60006020820190508181036000830152611d8c81611d50565b9050919050565b611d9c816118ee565b82525050565b6000606082019050611db76000830186611d93565b611dc46020830185611d93565b611dd16040830184611d93565b949350505050565b7f63616e206e6f742073656e642061646472657373283029000000000000000000600082015250565b6000611e0f601783611d16565b9150611e1a82611dd9565b602082019050919050565b60006020820190508181036000830152611e3e81611e02565b9050919050565b6000604082019050611e5a6000830185611859565b611e676020830184611d93565b9392505050565b600081519050611e7d81611930565b92915050565b600060208284031215611e9957611e986117e4565b5b6000611ea784828501611e6e565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611eea826118ee565b9150611ef5836118ee565b9250828203905081811115611f0d57611f0c611eb0565b5b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000611f4d826118ee565b9150611f58836118ee565b9250828201905080821115611f7057611f6f611eb0565b5b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611fab816117ee565b82525050565b6000611fbd8383611fa2565b60208301905092915050565b6000602082019050919050565b6000611fe182611f76565b611feb8185611f81565b9350611ff683611f92565b8060005b8381101561202757815161200e8882611fb1565b975061201983611fc9565b925050600181019050611ffa565b5085935050505092915050565b600060a0820190506120496000830188611d93565b6120566020830187611d93565b81810360408301526120688186611fd6565b90506120776060830185611859565b6120846080830184611d93565b9695505050505050565b60006020820190506120a36000830184611d93565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120e35780820151818401526020810190506120c8565b60008484015250505050565b60006120fa826120a9565b61210481856120b4565b93506121148185602086016120c5565b61211d81611961565b840191505092915050565b612131816118ee565b82525050565b6000608083016000830151848203600086015261215482826120ef565b91505060208301516121696020860182611fa2565b50604083015161217c6040860182612128565b50606083015161218f6060860182612128565b508091505092915050565b600060208201905081810360008301526121b48184612137565b905092915050565b60006040820190506121d16000830185611859565b6121de6020830184611859565b9392505050565b6000819050919050565b600061220a612205612200846121e5565b611760565b6118ee565b9050919050565b61221a816121ef565b82525050565b60006040820190506122356000830185611859565b6122426020830184612211565b9392505050565b600081905092915050565b600061225f826120a9565b6122698185612249565b93506122798185602086016120c5565b80840191505092915050565b60006122918284612254565b91508190509291505056fea264697066735822122026061d17efd318e13cf7b547665ce8cd7bfd65f4a388e23c2550897e37d5fc2964736f6c63430008140033

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

00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc450000000000000000000000004a7b5da61326a6379179b40d00f57e5bbdc962c20000000000000000000000009ec1acae39d07e1e8d8b3cebe7022790d87d744a0000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff850000000000000000000000004200000000000000000000000000000000000006

-----Decoded View---------------
Arg [0] : _v3Router (address): 0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45
Arg [1] : _v2Router (address): 0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2
Arg [2] : _executor (address): 0x9eC1ACAe39d07E1e8D8B3cEbe7022790D87D744A
Arg [3] : _usdc (address): 0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85
Arg [4] : _weth (address): 0x4200000000000000000000000000000000000006

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000068b3465833fb72a70ecdf485e0e4c7bd8665fc45
Arg [1] : 0000000000000000000000004a7b5da61326a6379179b40d00f57e5bbdc962c2
Arg [2] : 0000000000000000000000009ec1acae39d07e1e8d8b3cebe7022790d87d744a
Arg [3] : 0000000000000000000000000b2c639c533813f4aa9d7837caf62653d097ff85
Arg [4] : 0000000000000000000000004200000000000000000000000000000000000006


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
[ 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.