Contract 0x281a2d66a979cce3e474715bdfa02bfe954e5f35

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x2987d7269594861e7e0aba669eb508c3b328dd8228ea6d308c8f77d468199723Add Pools To WL227561092022-11-23 21:32:417 days 9 mins ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  0x281a2d66a979cce3e474715bdfa02bfe954e5f350 AVAX0.008794656 26
0x1b26651e35b0e0a2b9240809400427d7d11ce198c7e771bb2afc2c0ce9f6f4deAdd Pools To WL218659672022-11-02 16:47:4528 days 4 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  0x281a2d66a979cce3e474715bdfa02bfe954e5f350 AVAX0.012351586 26
0x1d5955331f83abef52ebc8e989f129bbf53f69c357e80ac7ac7ecf9fda6156d9Add Pools To WL203107712022-09-26 18:40:5765 days 3 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  0x281a2d66a979cce3e474715bdfa02bfe954e5f350 AVAX0.005858424 26
0x86c290a16670471c64ca35d0f301fabce32923227e734a389b996c8fd62ddd37Set Quoter200292582022-09-19 9:52:2172 days 11 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  0x281a2d66a979cce3e474715bdfa02bfe954e5f350 AVAX0.00076076 26
0x00928af175dbd64d4d1644e12fa0e34e67ecd7598d423ded6afc9496d33869e20x60806040199645652022-09-17 11:26:2374 days 10 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  Create: KyberElasticAdapter0 AVAX0.6135093225
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
KyberElasticAdapter

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : KyberElasticAdapter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./UniswapV3likeAdapter.sol";

interface IKyberPool {
    function token0() external view returns (address);

    function token1() external view returns (address);

    function swap(
        address recipient,
        int256 swapQty,
        bool isToken0,
        uint160 limitSqrtP,
        bytes calldata data
    ) external returns (int256 qty0, int256 qty1);
}

contract KyberElasticAdapter is UniswapV3likeAdapter {
    using SafeERC20 for IERC20;

    mapping(address => mapping(address => address)) public tknsToPoolWL;

    constructor(
        string memory _name,
        uint256 _swapGasEstimate,
        uint256 _quoterGasLimit,
        address _quoter,
        address[] memory _whitelistedPools
    ) UniswapV3likeAdapter(_name, _swapGasEstimate, _quoter, _quoterGasLimit) {
        addPoolsToWL(_whitelistedPools);
    }

    function addPoolsToWL(address[] memory pools) public onlyMaintainer {
        for (uint256 i; i < pools.length; ++i) addPoolToWL(pools[i]);
    }

    function rmPoolsFromWL(address[] memory pools) external onlyMaintainer {
        for (uint256 i; i < pools.length; ++i) rmPoolFromWL(pools[i]);
    }

    function addPoolToWL(address pool) internal {
        address t0 = IKyberPool(pool).token0();
        address t1 = IKyberPool(pool).token1();
        tknsToPoolWL[t0][t1] = pool;
        tknsToPoolWL[t1][t0] = pool;
    }

    function rmPoolFromWL(address pool) internal {
        address t0 = IKyberPool(pool).token0();
        address t1 = IKyberPool(pool).token1();
        tknsToPoolWL[t0][t1] = address(0);
        tknsToPoolWL[t1][t0] = address(0);
    }

    function _underlyingSwap(
        QParams memory params, 
        bytes memory callbackData
    ) internal override returns (uint256) {
        address pool = getBestPool(params.tokenIn, params.tokenOut);
        (bool zeroForOne, uint160 sqrtPriceLimitX96) = 
            getZeroOneAndSqrtPriceLimitX96(params.tokenIn, params.tokenOut);
        (int256 amount0, int256 amount1) = IKyberPool(pool).swap(
            address(this),
            int256(params.amountIn),
            zeroForOne,
            sqrtPriceLimitX96,
            callbackData
        );
        return zeroForOne ? uint256(-amount1) : uint256(-amount0);
    }

    function getBestPool(
        address token0, 
        address token1
    ) internal view override returns (address) {
        return tknsToPoolWL[token0][token1];
    }

    function swapCallback(
        int256 amount0Delta,
        int256 amount1Delta,
        bytes calldata
    ) external {
        if (amount0Delta > 0) {
            IERC20(IKyberPool(msg.sender).token0()).transfer(msg.sender, uint256(amount0Delta));
        } else {
            IERC20(IKyberPool(msg.sender).token1()).transfer(msg.sender, uint256(amount1Delta));
        }
    }
}

File 2 of 13 : UniswapV3likeAdapter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "../interface/IERC20.sol";
import "../lib/SafeERC20.sol";
import "../YakAdapter.sol";

struct QParams {
    address tokenIn;
    address tokenOut;
    int256 amountIn;
    uint24 fee;
}

interface IUniV3Pool {
    function swap(
        address recipient,
        bool zeroForOne,
        int256 amountSpecified,
        uint160 sqrtPriceLimitX96,
        bytes calldata data
    ) external returns (int256 amount0, int256 amount1);

    function token0() external view returns (address);

    function token1() external view returns (address);

    function liquidity() external view returns (uint128);
}

interface IUniV3Quoter {
    function quoteExactInputSingle(
        QParams memory params
    ) external view returns (uint256);

    function quote(
        address,
        bool,
        int256,
        uint160
    ) external view returns (int256, int256);
}

abstract contract UniswapV3likeAdapter is YakAdapter {
    using SafeERC20 for IERC20;

    uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342;
    uint160 internal constant MIN_SQRT_RATIO = 4295128739;
    uint256 public quoterGasLimit;
    address public quoter;

    constructor(
        string memory _name,
        uint256 _swapGasEstimate,
        address _quoter,
        uint256 _quoterGasLimit
    ) YakAdapter(_name, _swapGasEstimate) {
        setQuoterGasLimit(_quoterGasLimit);
        setQuoter(_quoter);
    }

    function setQuoter(address newQuoter) public onlyMaintainer {
        quoter = newQuoter;
    }

    function setQuoterGasLimit(uint256 newLimit) public onlyMaintainer {
        require(newLimit != 0, "queryGasLimit can't be zero");
        quoterGasLimit = newLimit;
    }

    function getQuoteForPool(
        address pool,
        int256 amountIn,
        address tokenIn,
        address tokenOut
    ) external view returns (uint256) {
        QParams memory params;
        params.amountIn = amountIn;
        params.tokenIn = tokenIn;
        params.tokenOut = tokenOut;
        return getQuoteForPool(pool, params);
    }

    function _query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) internal view override returns (uint256 quote) {
        QParams memory params = getQParams(_amountIn, _tokenIn, _tokenOut);
        quote = getQuoteForBestPool(params);
    }

    function _swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _tokenIn,
        address _tokenOut,
        address _to
    ) internal override {
        QParams memory params = getQParams(_amountIn, _tokenIn, _tokenOut);
        uint256 amountOut = _underlyingSwap(params, new bytes(0));
        require(amountOut >= _amountOut, "Insufficient amountOut");
        _returnTo(_tokenOut, amountOut, _to);
    }

    function getQParams(
        uint256 amountIn,
        address tokenIn,
        address tokenOut
    ) internal pure returns (QParams memory params) {
        params = QParams({ 
            amountIn: int256(amountIn), 
            tokenIn: tokenIn, 
            tokenOut: tokenOut, 
            fee: 0 
        });
    }

    function _underlyingSwap(
        QParams memory params, 
        bytes memory callbackData
    ) internal virtual returns (uint256) {
        address pool = getBestPool(params.tokenIn, params.tokenOut);
        (bool zeroForOne, uint160 priceLimit) = getZeroOneAndSqrtPriceLimitX96(
            params.tokenIn, 
            params.tokenOut
        );
        (int256 amount0, int256 amount1) = IUniV3Pool(pool).swap(
            address(this),
            zeroForOne,
            int256(params.amountIn),
            priceLimit,
            callbackData
        );
        return zeroForOne ? uint256(-amount1) : uint256(-amount0);
    }

    function getQuoteForBestPool(
        QParams memory params
    ) internal view returns (uint256 quote) {
        address bestPool = getBestPool(params.tokenIn, params.tokenOut);
        if (bestPool != address(0)) quote = getQuoteForPool(bestPool, params);
    }

    function getBestPool(
        address token0, 
        address token1
    ) internal view virtual returns (address mostLiquid);
    
    function getQuoteForPool(
        address pool, 
        QParams memory params
    ) internal view returns (uint256) {
        (bool zeroForOne, uint160 priceLimit) = getZeroOneAndSqrtPriceLimitX96(
            params.tokenIn, 
            params.tokenOut
        );
        (int256 amount0, int256 amount1) = getQuoteSafe(
            pool,
            zeroForOne,
            params.amountIn,
            priceLimit
        );
        return zeroForOne ? uint256(-amount1) : uint256(-amount0);
    }

    function getQuoteSafe(
        address pool, 
        bool zeroForOne,
        int256 amountIn,
        uint160 priceLimit
    ) internal view returns (int256 amount0, int256 amount1) {
        bytes memory calldata_ = abi.encodeWithSignature(
            "quote(address,bool,int256,uint160)",
            pool,
            zeroForOne,
            amountIn,
            priceLimit
        );
        (bool success, bytes memory data) = staticCallQuoterRaw(calldata_);
        if (success)
            (amount0, amount1) = abi.decode(data, (int256, int256));
    }

    function staticCallQuoterRaw(
        bytes memory calldata_
    ) internal view returns (bool success, bytes memory data) {
        (success, data) = quoter.staticcall{gas: quoterGasLimit}(calldata_);
    }

    function getZeroOneAndSqrtPriceLimitX96(address tokenIn, address tokenOut)
        internal
        pure
        returns (bool zeroForOne, uint160 sqrtPriceLimitX96)
    {
        zeroForOne = tokenIn < tokenOut;
        sqrtPriceLimitX96 = zeroForOne ? MIN_SQRT_RATIO+1 : MAX_SQRT_RATIO-1;
    }
}

File 3 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC20 {
    event Approval(address, address, uint256);
    event Transfer(address, address, uint256);

    function name() external view returns (string memory);

    function decimals() external view returns (uint8);

    function transferFrom(
        address,
        address,
        uint256
    ) external returns (bool);

    function allowance(address, address) external view returns (uint256);

    function approve(address, uint256) external returns (bool);

    function transfer(address, uint256) external returns (bool);

    function balanceOf(address) external view returns (uint256);

    function nonces(address) external view returns (uint256); // Only tokens that support permit

    function permit(
        address,
        address,
        uint256,
        uint256,
        uint8,
        bytes32,
        bytes32
    ) external; // Only tokens that support permit

    function swap(address, uint256) external; // Only Avalanche bridge tokens

    function swapSupply(address) external view returns (uint256); // Only Avalanche bridge tokens
}

File 4 of 13 : SafeERC20.sol
// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.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 ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    /**
     * @dev 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.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) {
            // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 13 : YakAdapter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.0;

import "./interface/IERC20.sol";
import "./interface/IWETH.sol";
import "./lib/SafeERC20.sol";
import "./lib/Maintainable.sol";

abstract contract YakAdapter is Maintainable {
    using SafeERC20 for IERC20;

    event YakAdapterSwap(address indexed _tokenFrom, address indexed _tokenTo, uint256 _amountIn, uint256 _amountOut);
    event UpdatedGasEstimate(address indexed _adapter, uint256 _newEstimate);
    event Recovered(address indexed _asset, uint256 amount);

    uint256 internal constant UINT_MAX = type(uint256).max;
    uint256 public swapGasEstimate;
    string public name;

    constructor(string memory _name, uint256 _gasEstimate) {
        setName(_name);
        setSwapGasEstimate(_gasEstimate);
    }

    function setName(string memory _name) internal {
        require(bytes(_name).length != 0, "Invalid adapter name");
        name = _name;
    }

    function setSwapGasEstimate(uint256 _estimate) public onlyMaintainer {
        require(_estimate != 0, "Invalid gas-estimate");
        swapGasEstimate = _estimate;
        emit UpdatedGasEstimate(address(this), _estimate);
    }

    function revokeAllowance(address _token, address _spender) external onlyMaintainer {
        IERC20(_token).safeApprove(_spender, 0);
    }

    function recoverERC20(address _tokenAddress, uint256 _tokenAmount) external onlyMaintainer {
        require(_tokenAmount > 0, "YakAdapter: Nothing to recover");
        IERC20(_tokenAddress).safeTransfer(msg.sender, _tokenAmount);
        emit Recovered(_tokenAddress, _tokenAmount);
    }

    function recoverAVAX(uint256 _amount) external onlyMaintainer {
        require(_amount > 0, "YakAdapter: Nothing to recover");
        payable(msg.sender).transfer(_amount);
        emit Recovered(address(0), _amount);
    }

    function query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) external view returns (uint256) {
        return _query(_amountIn, _tokenIn, _tokenOut);
    }

    function swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _fromToken,
        address _toToken,
        address _to
    ) external {
        _swap(_amountIn, _amountOut, _fromToken, _toToken, _to);
        emit YakAdapterSwap(_fromToken, _toToken, _amountIn, _amountOut);
    }

    function _returnTo(
        address _token,
        uint256 _amount,
        address _to
    ) internal {
        if (address(this) != _to) IERC20(_token).safeTransfer(_to, _amount);
    }

    function _swap(
        uint256 _amountIn,
        uint256 _amountOut,
        address _fromToken,
        address _toToken,
        address _to
    ) internal virtual;

    function _query(
        uint256 _amountIn,
        address _tokenIn,
        address _tokenOut
    ) internal view virtual returns (uint256);

    receive() external payable {}
}

File 6 of 13 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IWETH is IERC20 {
    function withdraw(uint256 amount) external;

    function deposit() external payable;
}

File 7 of 13 : Maintainable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/AccessControl.sol";

/**
 * @dev Contract module which extends the basic access control mechanism of Ownable
 * to include many maintainers, whom only the owner (DEFAULT_ADMIN_ROLE) may add and
 * remove.
 *
 * By default, the owner account will be the one that deploys the contract. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available this modifier:
 * `onlyMaintainer`, which can be applied to your functions to restrict their use to
 * the accounts with the role of maintainer.
 */

abstract contract Maintainable is Context, AccessControl {
    bytes32 public constant MAINTAINER_ROLE = keccak256("MAINTAINER_ROLE");

    constructor() {
        address msgSender = _msgSender();
        // members of the DEFAULT_ADMIN_ROLE alone may revoke and grant role membership
        _setupRole(DEFAULT_ADMIN_ROLE, msgSender);
        _setupRole(MAINTAINER_ROLE, msgSender);
    }

    function addMaintainer(address addedMaintainer) public virtual {
        grantRole(MAINTAINER_ROLE, addedMaintainer);
    }

    function removeMaintainer(address removedMaintainer) public virtual {
        revokeRole(MAINTAINER_ROLE, removedMaintainer);
    }

    function renounceRole(bytes32 role) public virtual {
        address msgSender = _msgSender();
        renounceRole(role, msgSender);
    }

    function transferOwnership(address newOwner) public virtual {
        address msgSender = _msgSender();
        grantRole(DEFAULT_ADMIN_ROLE, newOwner);
        renounceRole(DEFAULT_ADMIN_ROLE, msgSender);
    }

    modifier onlyMaintainer() {
        address msgSender = _msgSender();
        require(hasRole(MAINTAINER_ROLE, msgSender), "Maintainable: Caller is not a maintainer");
        _;
    }
}

File 8 of 13 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 9 of 13 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 10 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 11 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 12 of 13 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 13 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

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

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_swapGasEstimate","type":"uint256"},{"internalType":"uint256","name":"_quoterGasLimit","type":"uint256"},{"internalType":"address","name":"_quoter","type":"address"},{"internalType":"address[]","name":"_whitelistedPools","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_adapter","type":"address"},{"indexed":false,"internalType":"uint256","name":"_newEstimate","type":"uint256"}],"name":"UpdatedGasEstimate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_tokenFrom","type":"address"},{"indexed":true,"internalType":"address","name":"_tokenTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_amountOut","type":"uint256"}],"name":"YakAdapterSwap","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAINTAINER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addedMaintainer","type":"address"}],"name":"addMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"pools","type":"address[]"}],"name":"addPoolsToWL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"int256","name":"amountIn","type":"int256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"address","name":"tokenOut","type":"address"}],"name":"getQuoteForPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"address","name":"_tokenIn","type":"address"},{"internalType":"address","name":"_tokenOut","type":"address"}],"name":"query","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quoterGasLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"recoverAVAX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_tokenAmount","type":"uint256"}],"name":"recoverERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"removedMaintainer","type":"address"}],"name":"removeMaintainer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"revokeAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"pools","type":"address[]"}],"name":"rmPoolsFromWL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newQuoter","type":"address"}],"name":"setQuoter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"setQuoterGasLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_estimate","type":"uint256"}],"name":"setSwapGasEstimate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amountIn","type":"uint256"},{"internalType":"uint256","name":"_amountOut","type":"uint256"},{"internalType":"address","name":"_fromToken","type":"address"},{"internalType":"address","name":"_toToken","type":"address"},{"internalType":"address","name":"_to","type":"address"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"swapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapGasEstimate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"tknsToPoolWL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60806040523480156200001157600080fd5b5060405162002ea838038062002ea88339810160408190526200003491620006b5565b848483858383600062000046620000c0565b905062000055600082620000c4565b6200007060008051602062002e8883398151915282620000c4565b506200007c82620000d4565b620000878162000113565b5062000095905081620001c0565b620000a0826200022e565b50505050620000b5816200029960201b60201c565b505050505062000957565b3390565b620000d082826200033f565b5050565b8051620000fe5760405162461bcd60e51b8152600401620000f59062000802565b60405180910390fd5b8051620000d09060029060208401906200053b565b60006200011f620000c0565b90506200013c60008051602062002e8883398151915282620003c9565b6200015b5760405162461bcd60e51b8152600401620000f590620007ba565b816200017b5760405162461bcd60e51b8152600401620000f59062000870565b600182905560405130907ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a90620001b4908590620008a7565b60405180910390a25050565b6000620001cc620000c0565b9050620001e960008051602062002e8883398151915282620003c9565b620002085760405162461bcd60e51b8152600401620000f590620007ba565b81620002285760405162461bcd60e51b8152600401620000f59062000839565b50600355565b60006200023a620000c0565b90506200025760008051602062002e8883398151915282620003c9565b620002765760405162461bcd60e51b8152600401620000f590620007ba565b50600480546001600160a01b0319166001600160a01b0392909216919091179055565b6000620002a5620000c0565b9050620002c260008051602062002e8883398151915282620003c9565b620002e15760405162461bcd60e51b8152600401620000f590620007ba565b60005b82518110156200033a57620003278382815181106200031357634e487b7160e01b600052603260045260246000fd5b6020026020010151620003f260201b60201c565b620003328162000919565b9050620002e4565b505050565b6200034b8282620003c9565b620000d0576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905562000385620000c0565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156200042e57600080fd5b505afa15801562000443573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000469919062000691565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015620004a757600080fd5b505afa158015620004bc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620004e2919062000691565b6001600160a01b03928316600081815260056020818152604080842095881684529481528483208054979098166001600160a01b0319978816811790985590815283822092825291909152208054909216909217905550565b8280546200054990620008dc565b90600052602060002090601f0160209004810192826200056d5760008555620005b8565b82601f106200058857805160ff1916838001178555620005b8565b82800160010185558215620005b8579182015b82811115620005b85782518255916020019190600101906200059b565b50620005c6929150620005ca565b5090565b5b80821115620005c65760008155600101620005cb565b80516001600160a01b0381168114620005f957600080fd5b919050565b600082601f8301126200060f578081fd5b815160206001600160401b038211156200062d576200062d62000941565b8082026200063d828201620008b0565b83815282810190868401838801850189101562000658578687fd5b8693505b8584101562000685576200067081620005e1565b8352600193909301929184019184016200065c565b50979650505050505050565b600060208284031215620006a3578081fd5b620006ae82620005e1565b9392505050565b600080600080600060a08688031215620006cd578081fd5b85516001600160401b0380821115620006e4578283fd5b818801915088601f830112620006f8578283fd5b8151818111156200070d576200070d62000941565b602062000723601f8301601f19168201620008b0565b8281528b8284870101111562000737578586fd5b855b838110156200075657858101830151828201840152820162000739565b838111156200076757868385840101525b50908a015160408b01519199509750955062000788905060608901620005e1565b935060808801519150808211156200079e578283fd5b50620007ad88828901620005fe565b9150509295509295909350565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201526734b73a30b4b732b960c11b606082015260800190565b60208082526014908201527f496e76616c69642061646170746572206e616d65000000000000000000000000604082015260600190565b6020808252601b908201527f71756572794761734c696d69742063616e2774206265207a65726f0000000000604082015260600190565b60208082526014908201527f496e76616c6964206761732d657374696d617465000000000000000000000000604082015260600190565b90815260200190565b6040518181016001600160401b0381118282101715620008d457620008d462000941565b604052919050565b600281046001821680620008f157607f821691505b602082108114156200091357634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156200093a57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61252180620009676000396000f3fe6080604052600436106101c65760003560e01c80638bb9c5bf116100f7578063eab90da611610095578063f35c4d4511610064578063f35c4d45146104fa578063f87422541461051a578063f912c64b1461052f578063fa483e721461054f576101cd565b8063eab90da61461047a578063ef99893a1461049a578063f06c21eb146104ba578063f2fde38b146104da576101cd565b8063c6bbd5a7116100d1578063c6bbd5a7146103f8578063d547741f1461041a578063d7e944491461043a578063d8baf7cf1461045a576101cd565b80638bb9c5bf146103a357806391d14854146103c3578063a217fddf146103e3576101cd565b806336568abe116101645780636b453c1f1161013e5780636b453c1f146103235780637ae267731461034357806384a33e63146103635780638980f11f14610383576101cd565b806336568abe146102ce5780634ebb7916146102ee57806369cff80d1461030e576101cd565b8063248a9ca3116101a0578063248a9ca3146102575780632bc857a0146102775780632f2ff15d1461028c57806335f7c24d146102ae576101cd565b806301ffc9a7146101d257806305e3f4dc1461020857806306fdde0314610235576101cd565b366101cd57005b600080fd5b3480156101de57600080fd5b506101f26101ed366004611d56565b61056f565b6040516101ff9190612048565b60405180910390f35b34801561021457600080fd5b50610228610223366004611bbc565b6105b5565b6040516101ff9190612053565b34801561024157600080fd5b5061024a6105ee565b6040516101ff919061205c565b34801561026357600080fd5b50610228610272366004611d1a565b61067c565b34801561028357600080fd5b50610228610691565b34801561029857600080fd5b506102ac6102a7366004611d32565b610697565b005b3480156102ba57600080fd5b506102ac6102c9366004611c39565b6106b8565b3480156102da57600080fd5b506102ac6102e9366004611d32565b61074d565b3480156102fa57600080fd5b506102ac610309366004611d1a565b610793565b34801561031a57600080fd5b50610228610867565b34801561032f57600080fd5b506102ac61033e366004611b4c565b61086d565b34801561034f57600080fd5b506102ac61035e366004611b84565b610888565b34801561036f57600080fd5b506102ac61037e366004611d1a565b6108dd565b34801561038f57600080fd5b506102ac61039e366004611c0e565b610971565b3480156103af57600080fd5b506102ac6103be366004611d1a565b610a2b565b3480156103cf57600080fd5b506101f26103de366004611d32565b610a41565b3480156103ef57600080fd5b50610228610a6a565b34801561040457600080fd5b5061040d610a6f565b6040516101ff9190611f9c565b34801561042657600080fd5b506102ac610435366004611d32565b610a7e565b34801561044657600080fd5b5061040d610455366004611b84565b610a9a565b34801561046657600080fd5b506102ac610475366004611b4c565b610ac0565b34801561048657600080fd5b506102ac610495366004611e75565b610ad8565b3480156104a657600080fd5b506102286104b5366004611e34565b610b39565b3480156104c657600080fd5b506102ac6104d5366004611c39565b610b4e565b3480156104e657600080fd5b506102ac6104f5366004611b4c565b610bda565b34801561050657600080fd5b506102ac610515366004611d1a565b610bfc565b34801561052657600080fd5b50610228610c5f565b34801561053b57600080fd5b506102ac61054a366004611b4c565b610c71565b34801561055b57600080fd5b506102ac61056a366004611da1565b610ce1565b60006001600160e01b031982167f7965db0b0000000000000000000000000000000000000000000000000000000014806105ad57506105ad82610ed8565b90505b919050565b60006105bf611b1a565b604081018590526001600160a01b038085168252831660208201526105e48682610f0a565b9695505050505050565b600280546105fb90612404565b80601f016020809104026020016040519081016040528092919081815260200182805461062790612404565b80156106745780601f1061064957610100808354040283529160200191610674565b820191906000526020600020905b81548152906001019060200180831161065757829003601f168201915b505050505081565b60009081526020819052604090206001015490565b60035481565b6106a08261067c565b6106a981610f63565b6106b38383610f74565b505050565b60006106c2610ff9565b90506106dc6000805160206124cc83398151915282610a41565b6107015760405162461bcd60e51b81526004016106f8906120db565b60405180910390fd5b60005b82518110156106b35761073d83828151811061073057634e487b7160e01b600052603260045260246000fd5b6020026020010151610ffd565b61074681612439565b9050610704565b610755610ff9565b6001600160a01b0316816001600160a01b0316146107855760405162461bcd60e51b81526004016106f8906122cc565b61078f8282611146565b5050565b600061079d610ff9565b90506107b76000805160206124cc83398151915282610a41565b6107d35760405162461bcd60e51b81526004016106f8906120db565b600082116107f35760405162461bcd60e51b81526004016106f890612138565b604051339083156108fc029084906000818181858888f19350505050158015610820573d6000803e3d6000fd5b5060006001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa288360405161085b9190612053565b60405180910390a25050565b60015481565b6108856000805160206124cc83398151915282610697565b50565b6000610892610ff9565b90506108ac6000805160206124cc83398151915282610a41565b6108c85760405162461bcd60e51b81526004016106f8906120db565b6106b36001600160a01b0384168360006111c9565b60006108e7610ff9565b90506109016000805160206124cc83398151915282610a41565b61091d5760405162461bcd60e51b81526004016106f8906120db565b8161093a5760405162461bcd60e51b81526004016106f8906121db565b600182905560405130907ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a9061085b908590612053565b600061097b610ff9565b90506109956000805160206124cc83398151915282610a41565b6109b15760405162461bcd60e51b81526004016106f8906120db565b600082116109d15760405162461bcd60e51b81526004016106f890612138565b6109e56001600160a01b03841633846112f1565b826001600160a01b03167f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa2883604051610a1e9190612053565b60405180910390a2505050565b6000610a35610ff9565b905061078f828261074d565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600081565b6004546001600160a01b031681565b610a878261067c565b610a9081610f63565b6106b38383611146565b60056020908152600092835260408084209091529082529020546001600160a01b031681565b6108856000805160206124cc83398151915282610a7e565b610ae58585858585611310565b816001600160a01b0316836001600160a01b03167fe2bdbc6b7225eb0a972ac943c485a6cc05f7c6811838bce8903f23200fb744fa8787604051610b2a929190612329565b60405180910390a35050505050565b6000610b46848484611372565b949350505050565b6000610b58610ff9565b9050610b726000805160206124cc83398151915282610a41565b610b8e5760405162461bcd60e51b81526004016106f8906120db565b60005b82518110156106b357610bca838281518110610bbd57634e487b7160e01b600052603260045260246000fd5b6020026020010151611394565b610bd381612439565b9050610b91565b6000610be4610ff9565b9050610bf1600083610697565b61078f60008261074d565b6000610c06610ff9565b9050610c206000805160206124cc83398151915282610a41565b610c3c5760405162461bcd60e51b81526004016106f8906120db565b81610c595760405162461bcd60e51b81526004016106f8906121a4565b50600355565b6000805160206124cc83398151915281565b6000610c7b610ff9565b9050610c956000805160206124cc83398151915282610a41565b610cb15760405162461bcd60e51b81526004016106f8906120db565b506004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000841315610de057336001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2357600080fd5b505afa158015610d37573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5b9190611b68565b6001600160a01b031663a9059cbb33866040518363ffffffff1660e01b8152600401610d8892919061202f565b602060405180830381600087803b158015610da257600080fd5b505af1158015610db6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dda9190611cfa565b50610ed2565b336001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b158015610e1957600080fd5b505afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e519190611b68565b6001600160a01b031663a9059cbb33856040518363ffffffff1660e01b8152600401610e7e92919061202f565b602060405180830381600087803b158015610e9857600080fd5b505af1158015610eac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed09190611cfa565b505b50505050565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b6000806000610f21846000015185602001516114e2565b91509150600080610f388785886040015186611535565b9150915083610f4f57610f4a82612454565b610f58565b610f5881612454565b979650505050505050565b61088581610f6f610ff9565b6115e7565b610f7e8282610a41565b61078f576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610fb5610ff9565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b3390565b6000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b15801561103857600080fd5b505afa15801561104c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110709190611b68565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b1580156110ad57600080fd5b505afa1580156110c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e59190611b68565b6001600160a01b039283166000818152600560208181526040808420979095168352958652838220805473ffffffffffffffffffffffffffffffffffffffff1990811690915590865283822092825291909452922080549092169091555050565b6111508282610a41565b1561078f576000828152602081815260408083206001600160a01b03851684529091529020805460ff19169055611185610ff9565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b80158061126a57506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063dd62ed3e906112189030908690600401611fb0565b60206040518083038186803b15801561123057600080fd5b505afa158015611244573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112689190611e1c565b155b6112865760405162461bcd60e51b81526004016106f89061226f565b6106b38363095ea7b360e01b84846040516024016112a592919061202f565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b03199093169290921790915261164b565b6106b38363a9059cbb60e01b84846040516024016112a592919061202f565b600061131d868585611701565b604080516000808252602082019092529192509061133c90839061173b565b90508581101561135e5760405162461bcd60e51b81526004016106f8906120a4565b611369848285611823565b50505050505050565b600080611380858585611701565b905061138b81611847565b95945050505050565b6000816001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156113cf57600080fd5b505afa1580156113e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114079190611b68565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561144457600080fd5b505afa158015611458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147c9190611b68565b6001600160a01b039283166000818152600560208181526040808420958816845294815284832080549790981673ffffffffffffffffffffffffffffffffffffffff19978816811790985590815283822092825291909152208054909216909217905550565b6001600160a01b038082169083161060008161151c57611517600173fffd8963efd1fc6a506488495d951d5263988d26612399565b61152c565b61152c6401000276a36001612337565b90509250929050565b6000806000868686866040516024016115519493929190611fca565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f90405d360000000000000000000000000000000000000000000000000000000017905290506000806115b783611880565b9150915081156115db57808060200190518101906115d59190611d7e565b90955093505b50505094509492505050565b6115f18282610a41565b61078f57611609816001600160a01b031660146118f2565b6116148360206118f2565b604051602001611625929190611f1b565b60408051601f198184030181529082905262461bcd60e51b82526106f89160040161205c565b600080836001600160a01b0316836040516116669190611eff565b6000604051808303816000865af19150503d80600081146116a3576040519150601f19603f3d011682016040523d82523d6000602084013e6116a8565b606091505b5091509150816116ca5760405162461bcd60e51b81526004016106f89061216f565b805115610ed257808060200190518101906116e59190611cfa565b610ed25760405162461bcd60e51b81526004016106f890612212565b611709611b1a565b50604080516080810182526001600160a01b039384168152919092166020820152908101919091526000606082015290565b60008061175084600001518560200151611af0565b9050600080611767866000015187602001516114e2565b91509150600080846001600160a01b03166324b31a0c308a6040015187878c6040518663ffffffff1660e01b81526004016117a6959493929190611ff5565b6040805180830381600087803b1580156117bf57600080fd5b505af11580156117d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117f79190611d7e565b915091508361180e5761180982612454565b611817565b61181781612454565b98975050505050505050565b306001600160a01b038216146106b3576106b36001600160a01b03841682846112f1565b60008061185c83600001518460200151611af0565b90506001600160a01b0381161561187a576118778184610f0a565b91505b50919050565b6004546003546040516000926060926001600160a01b03909116916118a6908690611eff565b6000604051808303818686fa925050503d80600081146118e2576040519150601f19603f3d011682016040523d82523d6000602084013e6118e7565b606091505b509094909350915050565b6060600061190183600261237a565b61190c906002612362565b67ffffffffffffffff81111561193257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f19166020018201604052801561195c576020820181803683370190505b5090507f3000000000000000000000000000000000000000000000000000000000000000816000815181106119a157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106119fa57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000611a1e84600261237a565b611a29906001612362565b90505b6001811115611aca577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110611a7857634e487b7160e01b600052603260045260246000fd5b1a60f81b828281518110611a9c57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c93611ac3816123ed565b9050611a2c565b508315611ae95760405162461bcd60e51b81526004016106f89061206f565b9392505050565b6001600160a01b039182166000908152600560209081526040808320938516835292905220541690565b60408051608081018252600080825260208201819052918101829052606081019190915290565b80356105b0816124b6565b600060208284031215611b5d578081fd5b8135611ae9816124b6565b600060208284031215611b79578081fd5b8151611ae9816124b6565b60008060408385031215611b96578081fd5b8235611ba1816124b6565b91506020830135611bb1816124b6565b809150509250929050565b60008060008060808587031215611bd1578182fd5b8435611bdc816124b6565b9350602085013592506040850135611bf3816124b6565b91506060850135611c03816124b6565b939692955090935050565b60008060408385031215611c20578182fd5b8235611c2b816124b6565b946020939093013593505050565b60006020808385031215611c4b578182fd5b823567ffffffffffffffff80821115611c62578384fd5b818501915085601f830112611c75578384fd5b813581811115611c8757611c876124a0565b83810260405185828201018181108582111715611ca657611ca66124a0565b604052828152858101935084860182860187018a1015611cc4578788fd5b8795505b83861015611ced57611cd981611b41565b855260019590950194938601938601611cc8565b5098975050505050505050565b600060208284031215611d0b578081fd5b81518015158114611ae9578182fd5b600060208284031215611d2b578081fd5b5035919050565b60008060408385031215611d44578182fd5b823591506020830135611bb1816124b6565b600060208284031215611d67578081fd5b81356001600160e01b031981168114611ae9578182fd5b60008060408385031215611d90578182fd5b505080516020909101519092909150565b60008060008060608587031215611db6578384fd5b8435935060208501359250604085013567ffffffffffffffff80821115611ddb578384fd5b818701915087601f830112611dee578384fd5b813581811115611dfc578485fd5b886020828501011115611e0d578485fd5b95989497505060200194505050565b600060208284031215611e2d578081fd5b5051919050565b600080600060608486031215611e48578081fd5b833592506020840135611e5a816124b6565b91506040840135611e6a816124b6565b809150509250925092565b600080600080600060a08688031215611e8c578283fd5b85359450602086013593506040860135611ea5816124b6565b92506060860135611eb5816124b6565b91506080860135611ec5816124b6565b809150509295509295909350565b60008151808452611eeb8160208601602086016123c1565b601f01601f19169290920160200192915050565b60008251611f118184602087016123c1565b9190910192915050565b60007f416363657373436f6e74726f6c3a206163636f756e742000000000000000000082528351611f538160178501602088016123c1565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611f908160288401602088016123c1565b01602801949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03948516815292151560208401526040830191909152909116606082015260800190565b60006001600160a01b038088168352866020840152851515604084015280851660608401525060a06080830152610f5860a0830184611ed3565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b600060208252611ae96020830184611ed3565b6020808252818101527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604082015260600190565b60208082526016908201527f496e73756666696369656e7420616d6f756e744f757400000000000000000000604082015260600190565b60208082526028908201527f4d61696e7461696e61626c653a2043616c6c6572206973206e6f742061206d6160408201527f696e7461696e6572000000000000000000000000000000000000000000000000606082015260800190565b6020808252601e908201527f59616b416461707465723a204e6f7468696e6720746f207265636f7665720000604082015260600190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252601b908201527f71756572794761734c696d69742063616e2774206265207a65726f0000000000604082015260600190565b60208082526014908201527f496e76616c6964206761732d657374696d617465000000000000000000000000604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b6020808252602f908201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560408201527f20726f6c657320666f722073656c660000000000000000000000000000000000606082015260800190565b918252602082015260400190565b60006001600160a01b038083168185168083038211156123595761235961248a565b01949350505050565b600082198211156123755761237561248a565b500190565b60008160001904831182151516156123945761239461248a565b500290565b60006001600160a01b03838116908316818110156123b9576123b961248a565b039392505050565b60005b838110156123dc5781810151838201526020016123c4565b83811115610ed25750506000910152565b6000816123fc576123fc61248a565b506000190190565b60028104600182168061241857607f821691505b6020821081141561187a57634e487b7160e01b600052602260045260246000fd5b600060001982141561244d5761244d61248a565b5060010190565b60007f80000000000000000000000000000000000000000000000000000000000000008214156124865761248661248a565b0390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461088557600080fdfe339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab95a2646970667358221220ca0fb90b54ed96b3cb6c78e1e9228e9e6af2e32b583d458e8a1913ab79d78fa764736f6c63430008000033339759585899103d2ace64958e37e18ccb0504652c81d4a1b8aa80fe2126ab9500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000334500000000000000000000000000000000000000000000000000000000000033450000000000000000000000000aea96b816c17ebb7cb36f12a2c6854af238853a900000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000134b79626572456c617374696341646170746572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000897a83cf016f33fb061e756e4ca89baa9f17990a00000000000000000000000042845783dee627f47b40b5ad7f1c5147c052a21c000000000000000000000000df9aa2156be229783e8b18c38e51b0c01778c9ca0000000000000000000000002b80f8fe0064112e7d53880025e7731e246303bc0000000000000000000000000c3b6ee14cf0eddab91276e7ee71280f6ff611280000000000000000000000002d9361f4110e7bf8b8f39559a61c2d2777d14002000000000000000000000000d0a06776de66a53e94601c7200f00b6584c1861e0000000000000000000000002304fa3abcb57fe2957cf449f67e03ed5c7205e2000000000000000000000000a83e7eebcf91097d116feacfc0d53ea5e4d03fa7

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

00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000334500000000000000000000000000000000000000000000000000000000000033450000000000000000000000000aea96b816c17ebb7cb36f12a2c6854af238853a900000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000134b79626572456c617374696341646170746572000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000897a83cf016f33fb061e756e4ca89baa9f17990a00000000000000000000000042845783dee627f47b40b5ad7f1c5147c052a21c000000000000000000000000df9aa2156be229783e8b18c38e51b0c01778c9ca0000000000000000000000002b80f8fe0064112e7d53880025e7731e246303bc0000000000000000000000000c3b6ee14cf0eddab91276e7ee71280f6ff611280000000000000000000000002d9361f4110e7bf8b8f39559a61c2d2777d14002000000000000000000000000d0a06776de66a53e94601c7200f00b6584c1861e0000000000000000000000002304fa3abcb57fe2957cf449f67e03ed5c7205e2000000000000000000000000a83e7eebcf91097d116feacfc0d53ea5e4d03fa7

-----Decoded View---------------
Arg [0] : _name (string): KyberElasticAdapter
Arg [1] : _swapGasEstimate (uint256): 210000
Arg [2] : _quoterGasLimit (uint256): 210000
Arg [3] : _quoter (address): 0xaea96b816c17ebb7cb36f12a2c6854af238853a9
Arg [4] : _whitelistedPools (address[]): 0x897a83cf016f33fb061e756e4ca89baa9f17990a,0x42845783dee627f47b40b5ad7f1c5147c052a21c,0xdf9aa2156be229783e8b18c38e51b0c01778c9ca,0x2b80f8fe0064112e7d53880025e7731e246303bc,0x0c3b6ee14cf0eddab91276e7ee71280f6ff61128,0x2d9361f4110e7bf8b8f39559a61c2d2777d14002,0xd0a06776de66a53e94601c7200f00b6584c1861e,0x2304fa3abcb57fe2957cf449f67e03ed5c7205e2,0xa83e7eebcf91097d116feacfc0d53ea5e4d03fa7

-----Encoded View---------------
17 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000033450
Arg [2] : 0000000000000000000000000000000000000000000000000000000000033450
Arg [3] : 000000000000000000000000aea96b816c17ebb7cb36f12a2c6854af238853a9
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [6] : 4b79626572456c61737469634164617074657200000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [8] : 000000000000000000000000897a83cf016f33fb061e756e4ca89baa9f17990a
Arg [9] : 00000000000000000000000042845783dee627f47b40b5ad7f1c5147c052a21c
Arg [10] : 000000000000000000000000df9aa2156be229783e8b18c38e51b0c01778c9ca
Arg [11] : 0000000000000000000000002b80f8fe0064112e7d53880025e7731e246303bc
Arg [12] : 0000000000000000000000000c3b6ee14cf0eddab91276e7ee71280f6ff61128
Arg [13] : 0000000000000000000000002d9361f4110e7bf8b8f39559a61c2d2777d14002
Arg [14] : 000000000000000000000000d0a06776de66a53e94601c7200f00b6584c1861e
Arg [15] : 0000000000000000000000002304fa3abcb57fe2957cf449f67e03ed5c7205e2
Arg [16] : 000000000000000000000000a83e7eebcf91097d116feacfc0d53ea5e4d03fa7


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.