Contract 0xe372753f66644a1197ab85ff529ed02995ed2d6c

Txn Hash
Block
From
To
Value [Txn Fee]
0xeb761b4b63064e6c081d9e464fae3d6742599b8b2097f30cd9e5f049cdccf3da97615632021-06-15 15:08:2722 secs ago0xd966ffc4d2cad251e64e849f83787a88ac5e468f IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c501.79887875107152 FTM0.0160925562
0xdb935cf39a1a665b077e587c4a384eb081eeb0fcb69001667d4d7a0674a32ea697615422021-06-15 15:08:0940 secs ago0xd966ffc4d2cad251e64e849f83787a88ac5e468f IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.0123173391
0x98386a2a7038fedd57c224ff81ab97ffbc28206a189d36f2598b9bf1f869bb2897614132021-06-15 15:06:062 mins ago0x8429524bb776223022558e83726619f591842657 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.010875535
0x987fc69be7ad742ee428e8f45cf3100d8c5eb0584dd8ae51ef8fbbe2aa709d1097612762021-06-15 15:03:415 mins ago0x3d37d2f7d1e8bc222094885093977d0338e876a1 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.014606776461
0xb13e6d16c0a7cf9da7d966254042998d77031b61620df985987c5c72a941efb097611412021-06-15 15:01:297 mins ago0x3d37d2f7d1e8bc222094885093977d0338e876a1 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.01510676872
0xc72b8bf1ffbe98456df2bbdbfcfc1b4392f968592a0f7c65f532cae83f573e0497610002021-06-15 14:58:519 mins ago0x0004849537dab5c33fc8c494d05313dfbe2d99f3 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.013345179502
0x7c773d989e900720ee119251ab8734dae6effc06d7990c19228d8287ce4bf76097608412021-06-15 14:55:4813 mins ago0x97ebf22e3ed3ff6573636d4afef82ea0e4da9127 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.010237079719
0xf79cdeb62f44031a51678eebc84447a5f502732ca46a20f11702006335f56f4797607842021-06-15 14:54:4814 mins ago0x3c61622eae461fa5d5f82e0cc1b8543e371ca235 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c210.048084209821181 FTM0.0149775986
0xa02792268dce5226c0f00ca3eee6fc0352d2ddd3db469cf09511d2e48217ea6b97607662021-06-15 14:54:2714 mins ago0x3c61622eae461fa5d5f82e0cc1b8543e371ca235 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.010566181299
0x651a5ac3ff58e1cd9a39219ac685a632e21d62ce29585d3534a8f668c8b9b60e97607662021-06-15 14:54:2714 mins ago0x3d2a233eae3e8e7ea09609815d78d2b0d8c45a81 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.013348124483
0xa1334c02e64409ae3d374cbeb12fe64826a47fa7d32adb81d647d9e4d42a766797603622021-06-15 14:46:3822 mins ago0x33236b5b99d52e8366964c43f4211b959855eb0c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.0052731
0x6210b281e4ac2fe259f07747a1e205e02e4e0b72463280534e4f8f87da2fb85197599592021-06-15 14:39:0429 mins ago0xdf791f9dd32b3d733fc415be48e18a36d91f59b1 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c101.195356302395118 FTM0.013896361845
0x07aefd949e23d662e95ff394f7a4eb588f238788f371e277383225419f71767997595962021-06-15 14:33:1835 mins ago0x58d1744518123c5f97afd35731b1b0bd7d266f3c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c747.771199742438483 FTM0.014793459134
0x4739dedee26af20aebc1af0a4b7f01457f64e39c1e79863a1be39efddb8f666c97595362021-06-15 14:32:1336 mins ago0xffb69e6abf30a6ab899a8371626aa9d06be8da8c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.013183015163
0xacca3040a07e15ffbd9fd6fbc8b9296f33baa89d56a70c78cd3f9233d5d5007c97595312021-06-15 14:32:0836 mins ago0x58d1744518123c5f97afd35731b1b0bd7d266f3c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.009587434359
0x42f6759d9485298003713817297410e285a4268535b9e39434b3ba26602fd5e897595002021-06-15 14:31:4137 mins ago0x58d1744518123c5f97afd35731b1b0bd7d266f3c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.015041853754
0xbfd4494071701e6e4183e2729901fdb0a7de58218d16b4be4349e2bd76c99ddc97594762021-06-15 14:31:2137 mins ago0x97fe467dc71ca04e179c7061d9d895a889e2d30d IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.00602205
0xc092e54c5fe2b14462d131ad5a2659cfae8a05122ce609130474f65e6275204897594082021-06-15 14:30:2038 mins ago0x58d1744518123c5f97afd35731b1b0bd7d266f3c IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.013839717529
0xb71054d6fee1a028d15930358a6842161cec794264e5307a429ef1787dcddbf997593642021-06-15 14:29:4139 mins ago0x35cdbd548a624db268afc0a387dfe899a3823b28 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c66 FTM0.010029114578
0x22c680c213e9287b05fa2d2f7ee3557a4096e85079a7a8da2ccc351ee8c25d6897593442021-06-15 14:29:1839 mins ago0x4c75cfff8df9a2d4f00c15a4d2a269fffdccacef IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.010111939719
0xdc7b113c18774c2f96a18e6e161a89c0beec554195c94eaf70d9631881de646c97589132021-06-15 14:21:2747 mins ago0xa8b5706ad18f1c4af55775e504bc9dffa167522b IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.020482387883
0xaabf18268b2c5f056680d2b8c5a49fe1860ce337baca0ac6f8fb038304ba9ba897588572021-06-15 14:20:2948 mins ago0xcd7e66528da258684dd4363f8e94838d550a9b0f IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c169.731082638045044 FTM0.023866743507
0x08ae7f97bb6896ee5c1007cb3ef185ac0e56d028f9cd835faf8086a7762e08e597588522021-06-15 14:20:2448 mins ago0x52f60f047fc065aa8028b4d5837f353495f8d59e IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.015710972453
0x6a47e6f74a5e79bd211ffe77c6033353c746c3b8c493a0cf25847c6bbc92531897588242021-06-15 14:19:5248 mins ago0x922d92e77293e7d65300fa9478114c73ea6ad6e4 IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c0 FTM0.015706955265
0xa0f809dd9eab8b0e64577315720d3db6fccc873cf743a1ddac9565ad001f8a1e97588142021-06-15 14:19:4549 mins ago0xcd7e66528da258684dd4363f8e94838d550a9b0f IN  0xe372753f66644a1197ab85ff529ed02995ed2d6c170 FTM0.01727717375
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OperaSwapRouter

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 9999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 10 : OperaSwapRouter.sol
pragma solidity =0.6.6;

import './interfaces/IOperaSwapFactory.sol';
import './interfaces/IOperaSwapRouter02.sol';
import './libraries/TransferHelper.sol';
import './libraries/OperaSwapLibrary.sol';
import './libraries/SafeMath.sol';
import './interfaces/IERC20.sol';
import './interfaces/IWETH.sol';

contract OperaSwapRouter is IOperaSwapRouter02 {
    using SafeMath for uint;

    address public immutable override factory;
    address public immutable override WETH;

    modifier ensure(uint deadline) {
        require(deadline >= block.timestamp, 'OperaSwapRouter: EXPIRED');
        _;
    }

    constructor(address _factory, address _WETH) public {
        factory = _factory;
        WETH = _WETH;
    }

    receive() external payable {
        assert(msg.sender == WETH); // only accept ETH via fallback from the WETH contract
    }

    // **** ADD LIQUIDITY ****
    function _addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin
    ) internal virtual returns (uint amountA, uint amountB) {
        // create the pair if it doesn't exist yet
        if (IOperaSwapFactory(factory).getPair(tokenA, tokenB) == address(0)) {
            IOperaSwapFactory(factory).createPair(tokenA, tokenB);
        }
        (uint reserveA, uint reserveB) = OperaSwapLibrary.getReserves(factory, tokenA, tokenB);
        if (reserveA == 0 && reserveB == 0) {
            (amountA, amountB) = (amountADesired, amountBDesired);
        } else {
            uint amountBOptimal = OperaSwapLibrary.quote(amountADesired, reserveA, reserveB);
            if (amountBOptimal <= amountBDesired) {
                require(amountBOptimal >= amountBMin, 'OperaSwapRouter: INSUFFICIENT_B_AMOUNT');
                (amountA, amountB) = (amountADesired, amountBOptimal);
            } else {
                uint amountAOptimal = OperaSwapLibrary.quote(amountBDesired, reserveB, reserveA);
                assert(amountAOptimal <= amountADesired);
                require(amountAOptimal >= amountAMin, 'OperaSwapRouter: INSUFFICIENT_A_AMOUNT');
                (amountA, amountB) = (amountAOptimal, amountBDesired);
            }
        }
    }
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) {
        (amountA, amountB) = _addLiquidity(tokenA, tokenB, amountADesired, amountBDesired, amountAMin, amountBMin);
        address pair = OperaSwapLibrary.pairFor(factory, tokenA, tokenB);
        TransferHelper.safeTransferFrom(tokenA, msg.sender, pair, amountA);
        TransferHelper.safeTransferFrom(tokenB, msg.sender, pair, amountB);
        liquidity = IOperaSwapPair(pair).mint(to);
    }
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) {
        (amountToken, amountETH) = _addLiquidity(
            token,
            WETH,
            amountTokenDesired,
            msg.value,
            amountTokenMin,
            amountETHMin
        );
        address pair = OperaSwapLibrary.pairFor(factory, token, WETH);
        TransferHelper.safeTransferFrom(token, msg.sender, pair, amountToken);
        IWETH(WETH).deposit{value: amountETH}();
        assert(IWETH(WETH).transfer(pair, amountETH));
        liquidity = IOperaSwapPair(pair).mint(to);
        // refund dust eth, if any
        if (msg.value > amountETH) TransferHelper.safeTransferETH(msg.sender, msg.value - amountETH);
    }

    // **** REMOVE LIQUIDITY ****
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) {
        address pair = OperaSwapLibrary.pairFor(factory, tokenA, tokenB);
        IOperaSwapPair(pair).transferFrom(msg.sender, pair, liquidity); // send liquidity to pair
        (uint amount0, uint amount1) = IOperaSwapPair(pair).burn(to);
        (address token0,) = OperaSwapLibrary.sortTokens(tokenA, tokenB);
        (amountA, amountB) = tokenA == token0 ? (amount0, amount1) : (amount1, amount0);
        require(amountA >= amountAMin, 'OperaSwapRouter: INSUFFICIENT_A_AMOUNT');
        require(amountB >= amountBMin, 'OperaSwapRouter: INSUFFICIENT_B_AMOUNT');
    }
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) {
        (amountToken, amountETH) = removeLiquidity(
            token,
            WETH,
            liquidity,
            amountTokenMin,
            amountETHMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, amountToken);
        IWETH(WETH).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountA, uint amountB) {
        address pair = OperaSwapLibrary.pairFor(factory, tokenA, tokenB);
        uint value = approveMax ? uint(-1) : liquidity;
        IOperaSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountA, amountB) = removeLiquidity(tokenA, tokenB, liquidity, amountAMin, amountBMin, to, deadline);
    }
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountToken, uint amountETH) {
        address pair = OperaSwapLibrary.pairFor(factory, token, WETH);
        uint value = approveMax ? uint(-1) : liquidity;
        IOperaSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        (amountToken, amountETH) = removeLiquidityETH(token, liquidity, amountTokenMin, amountETHMin, to, deadline);
    }

    // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) ****
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) public virtual override ensure(deadline) returns (uint amountETH) {
        (, amountETH) = removeLiquidity(
            token,
            WETH,
            liquidity,
            amountTokenMin,
            amountETHMin,
            address(this),
            deadline
        );
        TransferHelper.safeTransfer(token, to, IERC20(token).balanceOf(address(this)));
        IWETH(WETH).withdraw(amountETH);
        TransferHelper.safeTransferETH(to, amountETH);
    }
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external virtual override returns (uint amountETH) {
        address pair = OperaSwapLibrary.pairFor(factory, token, WETH);
        uint value = approveMax ? uint(-1) : liquidity;
        IOperaSwapPair(pair).permit(msg.sender, address(this), value, deadline, v, r, s);
        amountETH = removeLiquidityETHSupportingFeeOnTransferTokens(
            token, liquidity, amountTokenMin, amountETHMin, to, deadline
        );
    }

    // **** SWAP ****
    // requires the initial amount to have already been sent to the first pair
    function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = OperaSwapLibrary.sortTokens(input, output);
            uint amountOut = amounts[i + 1];
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOut) : (amountOut, uint(0));
            address to = i < path.length - 2 ? OperaSwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            IOperaSwapPair(OperaSwapLibrary.pairFor(factory, input, output)).swap(
                amount0Out, amount1Out, to, new bytes(0)
            );
        }
    }
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = OperaSwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) returns (uint[] memory amounts) {
        amounts = OperaSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'OperaSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, to);
    }
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WETH, 'OperaSwapRouter: INVALID_PATH');
        amounts = OperaSwapLibrary.getAmountsOut(factory, msg.value, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWETH(WETH).deposit{value: amounts[0]}();
        assert(IWETH(WETH).transfer(OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
    }
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WETH, 'OperaSwapRouter: INVALID_PATH');
        amounts = OperaSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= amountInMax, 'OperaSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWETH(WETH).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[path.length - 1] == WETH, 'OperaSwapRouter: INVALID_PATH');
        amounts = OperaSwapLibrary.getAmountsOut(factory, amountIn, path);
        require(amounts[amounts.length - 1] >= amountOutMin, 'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]
        );
        _swap(amounts, path, address(this));
        IWETH(WETH).withdraw(amounts[amounts.length - 1]);
        TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]);
    }
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        virtual
        override
        payable
        ensure(deadline)
        returns (uint[] memory amounts)
    {
        require(path[0] == WETH, 'OperaSwapRouter: INVALID_PATH');
        amounts = OperaSwapLibrary.getAmountsIn(factory, amountOut, path);
        require(amounts[0] <= msg.value, 'OperaSwapRouter: EXCESSIVE_INPUT_AMOUNT');
        IWETH(WETH).deposit{value: amounts[0]}();
        assert(IWETH(WETH).transfer(OperaSwapLibrary.pairFor(factory, path[0], path[1]), amounts[0]));
        _swap(amounts, path, to);
        // refund dust eth, if any
        if (msg.value > amounts[0]) TransferHelper.safeTransferETH(msg.sender, msg.value - amounts[0]);
    }

    // **** SWAP (supporting fee-on-transfer tokens) ****
    // requires the initial amount to have already been sent to the first pair
    function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual {
        for (uint i; i < path.length - 1; i++) {
            (address input, address output) = (path[i], path[i + 1]);
            (address token0,) = OperaSwapLibrary.sortTokens(input, output);
            IOperaSwapPair pair = IOperaSwapPair(OperaSwapLibrary.pairFor(factory, input, output));
            uint amountInput;
            uint amountOutput;
            { // scope to avoid stack too deep errors
            (uint reserve0, uint reserve1,) = pair.getReserves();
            (uint reserveInput, uint reserveOutput) = input == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
            amountInput = IERC20(input).balanceOf(address(pair)).sub(reserveInput);
            amountOutput = OperaSwapLibrary.getAmountOut(amountInput, reserveInput, reserveOutput);
            }
            (uint amount0Out, uint amount1Out) = input == token0 ? (uint(0), amountOutput) : (amountOutput, uint(0));
            address to = i < path.length - 2 ? OperaSwapLibrary.pairFor(factory, output, path[i + 2]) : _to;
            pair.swap(amount0Out, amount1Out, to, new bytes(0));
        }
    }
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external virtual override ensure(deadline) {
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        payable
        ensure(deadline)
    {
        require(path[0] == WETH, 'OperaSwapRouter: INVALID_PATH');
        uint amountIn = msg.value;
        IWETH(WETH).deposit{value: amountIn}();
        assert(IWETH(WETH).transfer(OperaSwapLibrary.pairFor(factory, path[0], path[1]), amountIn));
        uint balanceBefore = IERC20(path[path.length - 1]).balanceOf(to);
        _swapSupportingFeeOnTransferTokens(path, to);
        require(
            IERC20(path[path.length - 1]).balanceOf(to).sub(balanceBefore) >= amountOutMin,
            'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
        );
    }
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    )
        external
        virtual
        override
        ensure(deadline)
    {
        require(path[path.length - 1] == WETH, 'OperaSwapRouter: INVALID_PATH');
        TransferHelper.safeTransferFrom(
            path[0], msg.sender, OperaSwapLibrary.pairFor(factory, path[0], path[1]), amountIn
        );
        _swapSupportingFeeOnTransferTokens(path, address(this));
        uint amountOut = IERC20(WETH).balanceOf(address(this));
        require(amountOut >= amountOutMin, 'OperaSwapRouter: INSUFFICIENT_OUTPUT_AMOUNT');
        IWETH(WETH).withdraw(amountOut);
        TransferHelper.safeTransferETH(to, amountOut);
    }

    // **** LIBRARY FUNCTIONS ****
    function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) {
        return OperaSwapLibrary.quote(amountA, reserveA, reserveB);
    }

    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountOut)
    {
        return OperaSwapLibrary.getAmountOut(amountIn, reserveIn, reserveOut);
    }

    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut)
        public
        pure
        virtual
        override
        returns (uint amountIn)
    {
        return OperaSwapLibrary.getAmountIn(amountOut, reserveIn, reserveOut);
    }

    function getAmountsOut(uint amountIn, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return OperaSwapLibrary.getAmountsOut(factory, amountIn, path);
    }

    function getAmountsIn(uint amountOut, address[] memory path)
        public
        view
        virtual
        override
        returns (uint[] memory amounts)
    {
        return OperaSwapLibrary.getAmountsIn(factory, amountOut, path);
    }
}

File 2 of 10 : IERC20.sol
pragma solidity >=0.5.0;

interface IERC20 {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function decimals() external view returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);
}

File 3 of 10 : IOperaSwapFactory.sol
pragma solidity >=0.6.6;

interface IOperaSwapFactory {
    event PairCreated(address indexed token0, address indexed token1, address pair, uint);

    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);

    function getPair(address tokenA, address tokenB) external view returns (address pair);
    function allPairs(uint) external view returns (address pair);
    function allPairsLength() external view returns (uint);

    function createPair(address tokenA, address tokenB) external returns (address pair);

    function setFeeTo(address) external;
    function setFeeToSetter(address) external;
}

File 4 of 10 : IOperaSwapPair.sol
pragma solidity >=0.6.6;

interface IOperaSwapPair {
    event Approval(address indexed owner, address indexed spender, uint value);
    event Transfer(address indexed from, address indexed to, uint value);

    function name() external pure returns (string memory);
    function symbol() external pure returns (string memory);
    function decimals() external pure returns (uint8);
    function totalSupply() external view returns (uint);
    function balanceOf(address owner) external view returns (uint);
    function allowance(address owner, address spender) external view returns (uint);

    function approve(address spender, uint value) external returns (bool);
    function transfer(address to, uint value) external returns (bool);
    function transferFrom(address from, address to, uint value) external returns (bool);

    function DOMAIN_SEPARATOR() external view returns (bytes32);
    function PERMIT_TYPEHASH() external pure returns (bytes32);
    function nonces(address owner) external view returns (uint);

    function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;

    event Mint(address indexed sender, uint amount0, uint amount1);
    event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    event Sync(uint112 reserve0, uint112 reserve1);

    function MINIMUM_LIQUIDITY() external pure returns (uint);
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function price0CumulativeLast() external view returns (uint);
    function price1CumulativeLast() external view returns (uint);
    function kLast() external view returns (uint);

    function mint(address to) external returns (uint liquidity);
    function burn(address to) external returns (uint amount0, uint amount1);
    function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
    function skim(address to) external;
    function sync() external;

    function initialize(address, address) external;
}

File 5 of 10 : IOperaSwapRouter01.sol
pragma solidity >=0.6.2;

interface IOperaSwapRouter01 {
    function factory() external pure returns (address);
    function WETH() external pure returns (address);

    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);
    function removeLiquidityWithPermit(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountA, uint amountB);
    function removeLiquidityETHWithPermit(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountToken, uint amountETH);
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapTokensForExactTokens(
        uint amountOut,
        uint amountInMax,
        address[] calldata path,
        address to,
        uint deadline
    ) external returns (uint[] memory amounts);
    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);
    function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);

    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 getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
    function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}

File 6 of 10 : IOperaSwapRouter02.sol
pragma solidity >=0.6.2;

import './IOperaSwapRouter01.sol';

interface IOperaSwapRouter02 is IOperaSwapRouter01 {
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountETH);
    function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool approveMax, uint8 v, bytes32 r, bytes32 s
    ) external returns (uint amountETH);

    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;
}

File 7 of 10 : IWETH.sol
pragma solidity >=0.5.0;

interface IWETH {
    function deposit() external payable;
    function transfer(address to, uint value) external returns (bool);
    function withdraw(uint) external;
}

File 8 of 10 : OperaSwapLibrary.sol
pragma solidity >=0.5.0;

import '../interfaces/IOperaSwapPair.sol';

import "./SafeMath.sol";

library OperaSwapLibrary {
    using SafeMath for uint;

    // returns sorted token addresses, used to handle return values from pairs sorted in this order
    function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
        require(tokenA != tokenB, 'OperaSwapLibrary: IDENTICAL_ADDRESSES');
        (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
        require(token0 != address(0), 'OperaSwapLibrary: ZERO_ADDRESS');
    }

    // calculates the CREATE2 address for a pair without making any external calls
    function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
        (address token0, address token1) = sortTokens(tokenA, tokenB);
        pair = address(uint(keccak256(abi.encodePacked(
                hex'ff',
                factory,
                keccak256(abi.encodePacked(token0, token1)),
                hex'4dae55ac574f09d2438c6d15574497d455c5a2319013bb4570ab7bdd31e867b4' // init code hash
            ))));
    }

    // fetches and sorts the reserves for a pair
    function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
        (address token0,) = sortTokens(tokenA, tokenB);
        pairFor(factory, tokenA, tokenB);
        (uint reserve0, uint reserve1,) = IOperaSwapPair(pairFor(factory, tokenA, tokenB)).getReserves();
        (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
    }

    // given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
    function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
        require(amountA > 0, 'OperaSwapLibrary: INSUFFICIENT_AMOUNT');
        require(reserveA > 0 && reserveB > 0, 'OperaSwapLibrary: INSUFFICIENT_LIQUIDITY');
        amountB = amountA.mul(reserveB) / reserveA;
    }

    // given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
    function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
        require(amountIn > 0, 'OperaSwapLibrary: INSUFFICIENT_INPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'OperaSwapLibrary: INSUFFICIENT_LIQUIDITY');
        uint amountInWithFee = amountIn.mul(998);
        uint numerator = amountInWithFee.mul(reserveOut);
        uint denominator = reserveIn.mul(1000).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    // given an output amount of an asset and pair reserves, returns a required input amount of the other asset
    function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
        require(amountOut > 0, 'OperaSwapLibrary: INSUFFICIENT_OUTPUT_AMOUNT');
        require(reserveIn > 0 && reserveOut > 0, 'OperaSwapLibrary: INSUFFICIENT_LIQUIDITY');
        uint numerator = reserveIn.mul(amountOut).mul(1000);
        uint denominator = reserveOut.sub(amountOut).mul(998);
        amountIn = (numerator / denominator).add(1);
    }

    // performs chained getAmountOut calculations on any number of pairs
    function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'OperaSwapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[0] = amountIn;
        for (uint i; i < path.length - 1; i++) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
            amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
        }
    }

    // performs chained getAmountIn calculations on any number of pairs
    function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
        require(path.length >= 2, 'OperaSwapLibrary: INVALID_PATH');
        amounts = new uint[](path.length);
        amounts[amounts.length - 1] = amountOut;
        for (uint i = path.length - 1; i > 0; i--) {
            (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
            amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
        }
    }
}

File 9 of 10 : SafeMath.sol
pragma solidity =0.6.6;

// a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math)

library SafeMath {
    function add(uint x, uint y) internal pure returns (uint z) {
        require((z = x + y) >= x, 'ds-math-add-overflow');
    }

    function sub(uint x, uint y) internal pure returns (uint z) {
        require((z = x - y) <= x, 'ds-math-sub-underflow');
    }

    function mul(uint x, uint y) internal pure returns (uint z) {
        require(y == 0 || (z = x * y) / y == x, 'ds-math-mul-overflow');
    }
}

File 10 of 10 : TransferHelper.sol
pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value:value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 9999
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesired","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amountTokenDesired","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"addLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"},{"internalType":"uint256","name":"liquidity","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountIn","outputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"reserveIn","type":"uint256"},{"internalType":"uint256","name":"reserveOut","type":"uint256"}],"name":"getAmountOut","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsIn","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"reserveA","type":"uint256"},{"internalType":"uint256","name":"reserveB","type":"uint256"}],"name":"quote","outputs":[{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidity","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETH","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"removeLiquidityETHSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermit","outputs":[{"internalType":"uint256","name":"amountToken","type":"uint256"},{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountTokenMin","type":"uint256"},{"internalType":"uint256","name":"amountETHMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityETHWithPermitSupportingFeeOnTransferTokens","outputs":[{"internalType":"uint256","name":"amountETH","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"liquidity","type":"uint256"},{"internalType":"uint256","name":"amountAMin","type":"uint256"},{"internalType":"uint256","name":"amountBMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bool","name":"approveMax","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"removeLiquidityWithPermit","outputs":[{"internalType":"uint256","name":"amountA","type":"uint256"},{"internalType":"uint256","name":"amountB","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapETHForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactETHForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForETHSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapExactTokensForTokensSupportingFeeOnTransferTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactETH","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"amountInMax","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"swapTokensForExactTokens","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405234801561001057600080fd5b5060405162004af538038062004af58339818101604052604081101561003557600080fd5b5080516020909101516001600160601b0319606092831b8116608052911b1660a05260805160601c60a05160601c614970620001856000398061019f5280610d4c5280610d875280610e9052806110c0528061148752806115ff5280611a035280611b285280611bde5280611cbe5280611e165280611e9e52806120f55280612182528061224a528061232852806123cf528061244352806129855280612c355280612c8b5280612cbf5280612d335280612ee5528061303a52806130c2525080610f305280611007528061118652806111bf5280611325528061152752806115dd52806117785280611d635280611ed05280612045528061247552806126e0528061290a528061293352806129635280612afb5280612c695280612f8a52806130f45280613a7c5280613abf5280613da25280613f285280614392528061445952806144d952506149706000f3fe60806040526004361061018f5760003560e01c80638803dbee116100d6578063c45a01551161007f578063e8e3370011610059578063e8e3370014610ba1578063f305d71914610c21578063fb3bdb4114610c67576101c8565b8063c45a015514610a62578063d06ca61f14610a77578063ded9382a14610b2e576101c8565b8063af2979eb116100b0578063af2979eb1461092c578063b6f9de951461097f578063baa2abde14610a05576101c8565b80638803dbee1461082d578063ad5c4648146108c5578063ad615dec146108f6576101c8565b80634a25d94a11610138578063791ac94711610112578063791ac947146106d95780637ff36ab51461077157806385f8c259146107f7576101c8565b80634a25d94a146105365780635b0d5984146105ce5780635c11d79514610641576101c8565b80631f00ca74116101695780631f00ca74146103695780632195995c1461042057806338ed17391461049e576101c8565b806302751cec146101cd578063054d50d41461023957806318cbafe514610281576101c8565b366101c857336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101c657fe5b005b600080fd5b3480156101d957600080fd5b50610220600480360360c08110156101f057600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135610ced565b6040805192835260208301919091528051918290030190f35b34801561024557600080fd5b5061026f6004803603606081101561025c57600080fd5b5080359060208101359060400135610e19565b60408051918252519081900360200190f35b34801561028d57600080fd5b50610319600480360360a08110156102a457600080fd5b8135916020810135918101906060810160408201356401000000008111156102cb57600080fd5b8201836020820111156102dd57600080fd5b803590602001918460208302840111640100000000831117156102ff57600080fd5b91935091506001600160a01b038135169060200135610e2e565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561035557818101518382015260200161033d565b505050509050019250505060405180910390f35b34801561037557600080fd5b506103196004803603604081101561038c57600080fd5b813591908101906040810160208201356401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460208302840111640100000000831117156103e257600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061117f945050505050565b34801561042c57600080fd5b50610220600480360361016081101561044457600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c08101359060e081013515159060ff61010082013516906101208101359061014001356111b5565b3480156104aa57600080fd5b50610319600480360360a08110156104c157600080fd5b8135916020810135918101906060810160408201356401000000008111156104e857600080fd5b8201836020820111156104fa57600080fd5b8035906020019184602083028401116401000000008311171561051c57600080fd5b91935091506001600160a01b0381351690602001356112c8565b34801561054257600080fd5b50610319600480360360a081101561055957600080fd5b81359160208101359181019060608101604082013564010000000081111561058057600080fd5b82018360208201111561059257600080fd5b803590602001918460208302840111640100000000831117156105b457600080fd5b91935091506001600160a01b038135169060200135611425565b3480156105da57600080fd5b5061026f60048036036101408110156105f257600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e082013516906101008101359061012001356115d5565b34801561064d57600080fd5b506101c6600480360360a081101561066457600080fd5b81359160208101359181019060608101604082013564010000000081111561068b57600080fd5b82018360208201111561069d57600080fd5b803590602001918460208302840111640100000000831117156106bf57600080fd5b91935091506001600160a01b0381351690602001356116fc565b3480156106e557600080fd5b506101c6600480360360a08110156106fc57600080fd5b81359160208101359181019060608101604082013564010000000081111561072357600080fd5b82018360208201111561073557600080fd5b8035906020019184602083028401116401000000008311171561075757600080fd5b91935091506001600160a01b0381351690602001356119a3565b6103196004803603608081101561078757600080fd5b813591908101906040810160208201356401000000008111156107a957600080fd5b8201836020820111156107bb57600080fd5b803590602001918460208302840111640100000000831117156107dd57600080fd5b91935091506001600160a01b038135169060200135611c64565b34801561080357600080fd5b5061026f6004803603606081101561081a57600080fd5b5080359060208101359060400135611fdb565b34801561083957600080fd5b50610319600480360360a081101561085057600080fd5b81359160208101359181019060608101604082013564010000000081111561087757600080fd5b82018360208201111561088957600080fd5b803590602001918460208302840111640100000000831117156108ab57600080fd5b91935091506001600160a01b038135169060200135611fe8565b3480156108d157600080fd5b506108da6120f3565b604080516001600160a01b039092168252519081900360200190f35b34801561090257600080fd5b5061026f6004803603606081101561091957600080fd5b5080359060208101359060400135612117565b34801561093857600080fd5b5061026f600480360360c081101561094f57600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612124565b6101c66004803603608081101561099557600080fd5b813591908101906040810160208201356401000000008111156109b757600080fd5b8201836020820111156109c957600080fd5b803590602001918460208302840111640100000000831117156109eb57600080fd5b91935091506001600160a01b0381351690602001356122d0565b348015610a1157600080fd5b50610220600480360360e0811015610a2857600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359091169060c00135612680565b348015610a6e57600080fd5b506108da612908565b348015610a8357600080fd5b5061031960048036036040811015610a9a57600080fd5b81359190810190604081016020820135640100000000811115610abc57600080fd5b820183602082011115610ace57600080fd5b80359060200191846020830284011164010000000083111715610af057600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955061292c945050505050565b348015610b3a57600080fd5b506102206004803603610140811015610b5257600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a08101359060c081013515159060ff60e08201351690610100810135906101200135612959565b348015610bad57600080fd5b50610c036004803603610100811015610bc557600080fd5b506001600160a01b038135811691602081013582169160408201359160608101359160808201359160a08101359160c0820135169060e00135612a86565b60408051938452602084019290925282820152519081900360600190f35b610c03600480360360c0811015610c3757600080fd5b506001600160a01b0381358116916020810135916040820135916060810135916080820135169060a00135612bd4565b61031960048036036080811015610c7d57600080fd5b81359190810190604081016020820135640100000000811115610c9f57600080fd5b820183602082011115610cb157600080fd5b80359060200191846020830284011164010000000083111715610cd357600080fd5b91935091506001600160a01b038135169060200135612e8b565b6000808242811015610d46576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b610d75897f00000000000000000000000000000000000000000000000000000000000000008a8a8a308a612680565b9093509150610d85898685613231565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015610deb57600080fd5b505af1158015610dff573d6000803e3d6000fd5b50505050610e0d85836133e7565b50965096945050505050565b6000610e268484846134fd565b949350505050565b60608142811015610e86576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001686866000198101818110610ec057fe5b905060200201356001600160a01b03166001600160a01b031614610f2b576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b610f897f0000000000000000000000000000000000000000000000000000000000000000898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506135ed92505050565b91508682600184510381518110610f9c57fe5b60200260200101511015610fe15760405162461bcd60e51b815260040180806020018281038252602b8152602001806147b3602b913960400191505060405180910390fd5b61107f86866000818110610ff157fe5b905060200201356001600160a01b0316336110657f00000000000000000000000000000000000000000000000000000000000000008a8a600081811061103357fe5b905060200201356001600160a01b03168b8b600181811061105057fe5b905060200201356001600160a01b0316613739565b8560008151811061107257fe5b6020026020010151613824565b6110be828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152503092506139cd915050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836001855103815181106110fd57fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561113b57600080fd5b505af115801561114f573d6000803e3d6000fd5b50505050611174848360018551038151811061116757fe5b60200260200101516133e7565b509695505050505050565b60606111ac7f00000000000000000000000000000000000000000000000000000000000000008484613c13565b90505b92915050565b60008060006111e57f00000000000000000000000000000000000000000000000000000000000000008f8f613739565b90506000876111f4578c6111f8565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b15801561128757600080fd5b505af115801561129b573d6000803e3d6000fd5b505050506112ae8f8f8f8f8f8f8f612680565b809450819550505050509b509b9950505050505050505050565b60608142811015611320576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b61137e7f0000000000000000000000000000000000000000000000000000000000000000898888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506135ed92505050565b9150868260018451038151811061139157fe5b602002602001015110156113d65760405162461bcd60e51b815260040180806020018281038252602b8152602001806147b3602b913960400191505060405180910390fd5b6113e686866000818110610ff157fe5b611174828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506139cd915050565b6060814281101561147d576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016868660001981018181106114b757fe5b905060200201356001600160a01b03166001600160a01b031614611522576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b6115807f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613c1392505050565b9150868260008151811061159057fe5b60200260200101511115610fe15760405162461bcd60e51b81526004018080602001828103825260278152602001806148556027913960400191505060405180910390fd5b6000806116237f00000000000000000000000000000000000000000000000000000000000000008d7f0000000000000000000000000000000000000000000000000000000000000000613739565b9050600086611632578b611636565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018b905260ff8916608482015260a4810188905260c4810187905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b1580156116c557600080fd5b505af11580156116d9573d6000803e3d6000fd5b505050506116eb8d8d8d8d8d8d612124565b9d9c50505050505050505050505050565b8042811015611752576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6117c78585600081811061176257fe5b905060200201356001600160a01b0316336117c17f0000000000000000000000000000000000000000000000000000000000000000898960008181106117a457fe5b905060200201356001600160a01b03168a8a600181811061105057fe5b8a613824565b6000858560001981018181106117d957fe5b905060200201356001600160a01b03166001600160a01b03166370a08231856040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561183e57600080fd5b505afa158015611852573d6000803e3d6000fd5b505050506040513d602081101561186857600080fd5b505160408051602088810282810182019093528882529293506118aa929091899189918291850190849080828437600092019190915250889250613d4b915050565b8661195c82888860001981018181106118bf57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561192457600080fd5b505afa158015611938573d6000803e3d6000fd5b505050506040513d602081101561194e57600080fd5b50519063ffffffff61407616565b10156119995760405162461bcd60e51b815260040180806020018281038252602b8152602001806147b3602b913960400191505060405180910390fd5b5050505050505050565b80428110156119f9576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001685856000198101818110611a3357fe5b905060200201356001600160a01b03166001600160a01b031614611a9e576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b611aae8585600081811061176257fe5b611aec858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250309250613d4b915050565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290516000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916370a0823191602480820192602092909190829003018186803b158015611b6f57600080fd5b505afa158015611b83573d6000803e3d6000fd5b505050506040513d6020811015611b9957600080fd5b5051905086811015611bdc5760405162461bcd60e51b815260040180806020018281038252602b8152602001806147b3602b913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611c4257600080fd5b505af1158015611c56573d6000803e3d6000fd5b5050505061199984826133e7565b60608142811015611cbc576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110611cf357fe5b905060200201356001600160a01b03166001600160a01b031614611d5e576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b611dbc7f0000000000000000000000000000000000000000000000000000000000000000348888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506135ed92505050565b91508682600184510381518110611dcf57fe5b60200260200101511015611e145760405162461bcd60e51b815260040180806020018281038252602b8152602001806147b3602b913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db083600081518110611e5057fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b158015611e8357600080fd5b505af1158015611e97573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb611efc7f0000000000000000000000000000000000000000000000000000000000000000898960008181106117a457fe5b84600081518110611f0957fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611f6057600080fd5b505af1158015611f74573d6000803e3d6000fd5b505050506040513d6020811015611f8a57600080fd5b5051611f9257fe5b611fd1828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506139cd915050565b5095945050505050565b6000610e268484846140ce565b60608142811015612040576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b61209e7f000000000000000000000000000000000000000000000000000000000000000089888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613c1392505050565b915086826000815181106120ae57fe5b602002602001015111156113d65760405162461bcd60e51b81526004018080602001828103825260278152602001806148556027913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610e268484846141be565b6000814281101561217c576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b6121ab887f00000000000000000000000000000000000000000000000000000000000000008989893089612680565b604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905191945061224892508a9187916001600160a01b038416916370a0823191602480820192602092909190829003018186803b15801561221757600080fd5b505afa15801561222b573d6000803e3d6000fd5b505050506040513d602081101561224157600080fd5b5051613231565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156122ae57600080fd5b505af11580156122c2573d6000803e3d6000fd5b5050505061117484836133e7565b8042811015612326576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168585600081811061235d57fe5b905060200201356001600160a01b03166001600160a01b0316146123c8576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b60003490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561242857600080fd5b505af115801561243c573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6124a17f0000000000000000000000000000000000000000000000000000000000000000898960008181106117a457fe5b836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156124f157600080fd5b505af1158015612505573d6000803e3d6000fd5b505050506040513d602081101561251b57600080fd5b505161252357fe5b60008686600019810181811061253557fe5b905060200201356001600160a01b03166001600160a01b03166370a08231866040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561259a57600080fd5b505afa1580156125ae573d6000803e3d6000fd5b505050506040513d60208110156125c457600080fd5b505160408051602089810282810182019093528982529293506126069290918a918a918291850190849080828437600092019190915250899250613d4b915050565b8761195c828989600019810181811061261b57fe5b905060200201356001600160a01b03166001600160a01b03166370a08231896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561192457600080fd5b60008082428110156126d9576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b60006127067f00000000000000000000000000000000000000000000000000000000000000008c8c613739565b604080517f23b872dd0000000000000000000000000000000000000000000000000000000081523360048201526001600160a01b03831660248201819052604482018d9052915192935090916323b872dd916064808201926020929091908290030181600087803b15801561277a57600080fd5b505af115801561278e573d6000803e3d6000fd5b505050506040513d60208110156127a457600080fd5b5050604080517f89afcb440000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015282516000938493928616926389afcb44926024808301939282900301818787803b15801561280a57600080fd5b505af115801561281e573d6000803e3d6000fd5b505050506040513d604081101561283457600080fd5b5080516020909101519092509050600061284e8e8e61426a565b509050806001600160a01b03168e6001600160a01b031614612871578183612874565b82825b90975095508a8710156128b85760405162461bcd60e51b815260040180806020018281038252602681526020018061478d6026913960400191505060405180910390fd5b898610156128f75760405162461bcd60e51b81526004018080602001828103825260268152602001806148036026913960400191505060405180910390fd5b505050505097509795505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60606111ac7f000000000000000000000000000000000000000000000000000000000000000084846135ed565b60008060006129a97f00000000000000000000000000000000000000000000000000000000000000008e7f0000000000000000000000000000000000000000000000000000000000000000613739565b90506000876129b8578c6129bc565b6000195b604080517fd505accf00000000000000000000000000000000000000000000000000000000815233600482015230602482015260448101839052606481018c905260ff8a16608482015260a4810189905260c4810188905290519192506001600160a01b0384169163d505accf9160e48082019260009290919082900301818387803b158015612a4b57600080fd5b505af1158015612a5f573d6000803e3d6000fd5b50505050612a718e8e8e8e8e8e610ced565b909f909e509c50505050505050505050505050565b60008060008342811015612ae1576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b612aef8c8c8c8c8c8c614348565b90945092506000612b217f00000000000000000000000000000000000000000000000000000000000000008e8e613739565b9050612b2f8d338388613824565b612b3b8c338387613824565b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015612b9357600080fd5b505af1158015612ba7573d6000803e3d6000fd5b505050506040513d6020811015612bbd57600080fd5b5051949d939c50939a509198505050505050505050565b60008060008342811015612c2f576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b612c5d8a7f00000000000000000000000000000000000000000000000000000000000000008b348c8c614348565b90945092506000612caf7f00000000000000000000000000000000000000000000000000000000000000008c7f0000000000000000000000000000000000000000000000000000000000000000613739565b9050612cbd8b338388613824565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0856040518263ffffffff1660e01b81526004016000604051808303818588803b158015612d1857600080fd5b505af1158015612d2c573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb82866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612db157600080fd5b505af1158015612dc5573d6000803e3d6000fd5b505050506040513d6020811015612ddb57600080fd5b5051612de357fe5b806001600160a01b0316636a627842886040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b03168152602001915050602060405180830381600087803b158015612e3b57600080fd5b505af1158015612e4f573d6000803e3d6000fd5b505050506040513d6020811015612e6557600080fd5b5051925034841015612e7d57612e7d338534036133e7565b505096509650969350505050565b60608142811015612ee3576040805162461bcd60e51b815260206004820152601860248201527f4f7065726153776170526f757465723a20455850495245440000000000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031686866000818110612f1a57fe5b905060200201356001600160a01b03166001600160a01b031614612f85576040805162461bcd60e51b815260206004820152601d60248201527f4f7065726153776170526f757465723a20494e56414c49445f50415448000000604482015290519081900360640190fd5b612fe37f000000000000000000000000000000000000000000000000000000000000000088888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250613c1392505050565b91503482600081518110612ff357fe5b602002602001015111156130385760405162461bcd60e51b81526004018080602001828103825260278152602001806148556027913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db08360008151811061307457fe5b60200260200101516040518263ffffffff1660e01b81526004016000604051808303818588803b1580156130a757600080fd5b505af11580156130bb573d6000803e3d6000fd5b50505050507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb6131207f0000000000000000000000000000000000000000000000000000000000000000898960008181106117a457fe5b8460008151811061312d57fe5b60200260200101516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561318457600080fd5b505af1158015613198573d6000803e3d6000fd5b505050506040513d60208110156131ae57600080fd5b50516131b657fe5b6131f5828787808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508992506139cd915050565b8160008151811061320257fe5b6020026020010151341115611fd157611fd1338360008151811061322257fe5b602002602001015134036133e7565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000178152925182516000946060949389169392918291908083835b602083106132fa57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016132bd565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461335c576040519150601f19603f3d011682016040523d82523d6000602084013e613361565b606091505b509150915081801561338f57508051158061338f575080806020019051602081101561338c57600080fd5b50515b6133e0576040805162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c454400604482015290519081900360640190fd5b5050505050565b604080516000808252602082019092526001600160a01b0384169083906040518082805190602001908083835b6020831061345157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101613414565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146134b3576040519150601f19603f3d011682016040523d82523d6000602084013e6134b8565b606091505b50509050806134f85760405162461bcd60e51b81526004018080602001828103825260238152602001806148c96023913960400191505060405180910390fd5b505050565b600080841161353d5760405162461bcd60e51b815260040180806020018281038252602b815260200180614910602b913960400191505060405180910390fd5b60008311801561354d5750600082115b6135885760405162461bcd60e51b81526004018080602001828103825260288152602001806148a16028913960400191505060405180910390fd5b600061359c856103e663ffffffff6145ee16565b905060006135b0828563ffffffff6145ee16565b905060006135d6836135ca886103e863ffffffff6145ee16565b9063ffffffff61465a16565b90508082816135e157fe5b04979650505050505050565b6060600282511015613646576040805162461bcd60e51b815260206004820152601e60248201527f4f70657261537761704c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff8111801561365e57600080fd5b50604051908082528060200260200182016040528015613688578160200160208202803683370190505b509050828160008151811061369957fe5b60200260200101818152505060005b6001835103811015613731576000806136eb878685815181106136c757fe5b60200260200101518786600101815181106136de57fe5b60200260200101516146b2565b9150915061370d8484815181106136fe57fe5b602002602001015183836134fd565b84846001018151811061371c57fe5b602090810291909101015250506001016136a8565b509392505050565b6000806000613748858561426a565b604080517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501207fff0000000000000000000000000000000000000000000000000000000000000060688401529a90941b9093166069840152607d8301989098527f4dae55ac574f09d2438c6d15574497d455c5a2319013bb4570ab7bdd31e867b4609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017815292518251600094606094938a169392918291908083835b602083106138f557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016138b8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114613957576040519150601f19603f3d011682016040523d82523d6000602084013e61395c565b606091505b509150915081801561398a57508051158061398a575080806020019051602081101561398757600080fd5b50515b6139c55760405162461bcd60e51b81526004018080602001828103825260248152602001806148ec6024913960400191505060405180910390fd5b505050505050565b60005b6001835103811015613c0d576000808483815181106139eb57fe5b6020026020010151858460010181518110613a0257fe5b6020026020010151915091506000613a1a838361426a565b5090506000878560010181518110613a2e57fe5b60200260200101519050600080836001600160a01b0316866001600160a01b031614613a5c57826000613a60565b6000835b91509150600060028a51038810613a775788613ab8565b613ab87f0000000000000000000000000000000000000000000000000000000000000000878c8b60020181518110613aab57fe5b6020026020010151613739565b9050613ae57f00000000000000000000000000000000000000000000000000000000000000008888613739565b6001600160a01b031663022c0d9f84848460006040519080825280601f01601f191660200182016040528015613b22576020820181803683370190505b506040518563ffffffff1660e01b815260040180858152602001848152602001836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613b93578181015183820152602001613b7b565b50505050905090810190601f168015613bc05780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015613be257600080fd5b505af1158015613bf6573d6000803e3d6000fd5b5050600190990198506139d0975050505050505050565b50505050565b6060600282511015613c6c576040805162461bcd60e51b815260206004820152601e60248201527f4f70657261537761704c6962726172793a20494e56414c49445f504154480000604482015290519081900360640190fd5b815167ffffffffffffffff81118015613c8457600080fd5b50604051908082528060200260200182016040528015613cae578160200160208202803683370190505b5090508281600183510381518110613cc257fe5b60209081029190910101528151600019015b801561373157600080613d0487866001860381518110613cf057fe5b60200260200101518786815181106136de57fe5b91509150613d26848481518110613d1757fe5b602002602001015183836140ce565b846001850381518110613d3557fe5b6020908102919091010152505060001901613cd4565b60005b60018351038110156134f857600080848381518110613d6957fe5b6020026020010151858460010181518110613d8057fe5b6020026020010151915091506000613d98838361426a565b5090506000613dc87f00000000000000000000000000000000000000000000000000000000000000008585613739565b9050600080600080846001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015613e0957600080fd5b505afa158015613e1d573d6000803e3d6000fd5b505050506040513d6060811015613e3357600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506000806001600160a01b038a811690891614613e70578284613e73565b83835b91509150613ed1828b6001600160a01b03166370a082318a6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561192457600080fd5b9550613ede8683836134fd565b945050505050600080856001600160a01b0316886001600160a01b031614613f0857826000613f0c565b6000835b91509150600060028c51038a10613f23578a613f57565b613f577f0000000000000000000000000000000000000000000000000000000000000000898e8d60020181518110613aab57fe5b60408051600080825260208201928390527f022c0d9f00000000000000000000000000000000000000000000000000000000835260248201878152604483018790526001600160a01b038086166064850152608060848501908152845160a48601819052969750908c169563022c0d9f958a958a958a9591949193919260c486019290918190849084905b83811015613ffa578181015183820152602001613fe2565b50505050905090810190601f1680156140275780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561404957600080fd5b505af115801561405d573d6000803e3d6000fd5b50506001909b019a50613d4e9950505050505050505050565b808203828111156111af576040805162461bcd60e51b815260206004820152601560248201527f64732d6d6174682d7375622d756e646572666c6f770000000000000000000000604482015290519081900360640190fd5b600080841161410e5760405162461bcd60e51b815260040180806020018281038252602c815260200180614829602c913960400191505060405180910390fd5b60008311801561411e5750600082115b6141595760405162461bcd60e51b81526004018080602001828103825260288152602001806148a16028913960400191505060405180910390fd5b600061417d6103e8614171868863ffffffff6145ee16565b9063ffffffff6145ee16565b905060006141976103e6614171868963ffffffff61407616565b90506141b460018284816141a757fe5b049063ffffffff61465a16565b9695505050505050565b60008084116141fe5760405162461bcd60e51b815260040180806020018281038252602581526020018061487c6025913960400191505060405180910390fd5b60008311801561420e5750600082115b6142495760405162461bcd60e51b81526004018080602001828103825260288152602001806148a16028913960400191505060405180910390fd5b8261425a858463ffffffff6145ee16565b8161426157fe5b04949350505050565b600080826001600160a01b0316846001600160a01b031614156142be5760405162461bcd60e51b81526004018080602001828103825260258152602001806147de6025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b0316106142de5782846142e1565b83835b90925090506001600160a01b038216614341576040805162461bcd60e51b815260206004820152601e60248201527f4f70657261537761704c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b604080517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b03888116600483015287811660248301529151600092839283927f00000000000000000000000000000000000000000000000000000000000000009092169163e6a4390591604480820192602092909190829003018186803b1580156143db57600080fd5b505afa1580156143ef573d6000803e3d6000fd5b505050506040513d602081101561440557600080fd5b50516001600160a01b031614156144d157604080517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b038a81166004830152898116602483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163c9c65396916044808201926020929091908290030181600087803b1580156144a457600080fd5b505af11580156144b8573d6000803e3d6000fd5b505050506040513d60208110156144ce57600080fd5b50505b6000806144ff7f00000000000000000000000000000000000000000000000000000000000000008b8b6146b2565b91509150816000148015614511575080155b15614521578793508692506145e1565b600061452e8984846141be565b905087811161458157858110156145765760405162461bcd60e51b81526004018080602001828103825260268152602001806148036026913960400191505060405180910390fd5b8894509250826145df565b600061458e8984866141be565b90508981111561459a57fe5b878110156145d95760405162461bcd60e51b815260040180806020018281038252602681526020018061478d6026913960400191505060405180910390fd5b94508793505b505b5050965096945050505050565b60008115806146095750508082028282828161460657fe5b04145b6111af576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6d756c2d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b808201828110156111af576040805162461bcd60e51b815260206004820152601460248201527f64732d6d6174682d6164642d6f766572666c6f77000000000000000000000000604482015290519081900360640190fd5b60008060006146c1858561426a565b5090506146cf868686613739565b506000806146de888888613739565b6001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561471657600080fd5b505afa15801561472a573d6000803e3d6000fd5b505050506040513d606081101561474057600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506001600160a01b038781169084161461477a57808261477d565b81815b9099909850965050505050505056fe4f7065726153776170526f757465723a20494e53554646494349454e545f415f414d4f554e544f7065726153776170526f757465723a20494e53554646494349454e545f4f55545055545f414d4f554e544f70657261537761704c6962726172793a204944454e544943414c5f4144445245535345534f7065726153776170526f757465723a20494e53554646494349454e545f425f414d4f554e544f70657261537761704c6962726172793a20494e53554646494349454e545f4f55545055545f414d4f554e544f7065726153776170526f757465723a204558434553534956455f494e5055545f414d4f554e544f70657261537761704c6962726172793a20494e53554646494349454e545f414d4f554e544f70657261537761704c6962726172793a20494e53554646494349454e545f4c49515549444954595472616e7366657248656c7065723a204554485f5452414e534645525f4641494c45445472616e7366657248656c7065723a205452414e534645525f46524f4d5f4641494c45444f70657261537761704c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e54a26469706673582212208bc9d3b00e923723f15f581a721624638b9e372f7015bf852bc35c49cbd3aa2864736f6c634300060600330000000000000000000000008ebb6b4ed61b6b2ea663569d0be3f7b33a48117800000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

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

0000000000000000000000008ebb6b4ed61b6b2ea663569d0be3f7b33a48117800000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008ebb6b4ed61b6b2ea663569d0be3f7b33a481178
Arg [1] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.