Contract 0xdb66686ac8bea67400cf9e5dd6c8849575b90148

Contract Overview

Balance:
0 AVAX

AVAX Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9b12b7b7cfb9a0195da030e14d6af4722d173be958faa18c425cd89bfc0609f70x60c0604043177372021-09-14 11:07:22134 days 16 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  Create: UnilikeAdapter0 AVAX0.3017997225
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
UnilikeAdapter

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 999 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

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

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.7.0;

import "../interface/IUnilikeFactory.sol";
import "../interface/IUnilikePair.sol";
import "../interface/IERC20.sol";
import "../lib/SafeERC20.sol";
import "../lib/SafeMath.sol";
import "../YakAdapter.sol";

contract UnilikeAdapter is YakAdapter {
    using SafeERC20 for IERC20;
    using SafeMath for uint;

    bytes32 public constant ID = keccak256("UnilikeAdapter");
    uint internal constant FEE_DENOMINATOR = 1e3;
    uint public immutable feeCompliment;
    address public immutable factory;

    constructor(
        string memory _name, 
        address _factory, 
        uint _fee,
        uint _swapGasEstimate
    ) {
        require(FEE_DENOMINATOR > _fee, 'YakUnilikeAdapter: Fee greater than the denominator');
        factory = _factory;
        name = _name;
        feeCompliment = FEE_DENOMINATOR.sub(_fee);
        setSwapGasEstimate(_swapGasEstimate);
        setAllowances();
    }

    function setAllowances() public override onlyOwner {
        IERC20(WAVAX).safeApprove(WAVAX, UINT_MAX);
    }

    function _approveIfNeeded(address tokenIn, uint amount) internal override {}

    function _getAmountOut(
        uint _amountIn, 
        uint _reserveIn, 
        uint _reserveOut
    ) internal view returns (uint amountOut) {
        // Based on https://github.com/Uniswap/uniswap-v2-periphery/blob/master/contracts/UniswapV2Router02.sol
        uint amountInWithFee = _amountIn.mul(feeCompliment);
        uint numerator = amountInWithFee.mul(_reserveOut);
        uint denominator = _reserveIn.mul(FEE_DENOMINATOR).add(amountInWithFee);
        amountOut = numerator / denominator;
    }

    function _query(
        uint _amountIn, 
        address _tokenIn, 
        address _tokenOut
    ) internal override view returns (uint) {
        if (_tokenIn == _tokenOut || _amountIn==0) { return 0; }
        address pair = IUnilikeFactory(factory).getPair(_tokenIn, _tokenOut);
        if (pair == address(0)) { return 0; }
        (uint r0, uint r1, ) = IUnilikePair(pair).getReserves();
        (uint reserveIn, uint reserveOut) = _tokenIn < _tokenOut ? (r0, r1) : (r1, r0);
        if (reserveIn > 0 && reserveOut > 0) {
            return _getAmountOut(_amountIn, reserveIn, reserveOut);
        }
    }

    function _swap(
        uint _amountIn, 
        uint _amountOut, 
        address _tokenIn, 
        address _tokenOut, 
        address to
    ) internal override {
        address pair = IUnilikeFactory(factory).getPair(_tokenIn, _tokenOut);
        (uint amount0Out, uint amount1Out) = (_tokenIn < _tokenOut) ? (uint(0), _amountOut) : (_amountOut, uint(0));
        IERC20(_tokenIn).safeTransfer(pair, _amountIn);
        IUnilikePair(pair).swap(
            amount0Out, 
            amount1Out,
            to, 
            new bytes(0)
        );
    }
}

File 2 of 10 : IUnilikeFactory.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IUnilikeFactory {
    function getPair(address tokenA, address tokenB) external view returns (address pair);
}

File 3 of 10 : IUnilikePair.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IUnilikePair {
    event Swap(
        address indexed sender,
        uint amount0In,
        uint amount1In,
        uint amount0Out,
        uint amount1Out,
        address indexed to
    );
    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 swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
}

File 4 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

interface IERC20 {
    event Approval(address,address,uint);
    event Transfer(address,address,uint);
    function name() external view returns (string memory);
    function decimals() external view returns (uint8);
    function transferFrom(address,address,uint) external returns (bool);
    function allowance(address,address) external view returns (uint);
    function approve(address,uint) external returns (bool);
    function transfer(address,uint) external returns (bool);
    function balanceOf(address) external view returns (uint);
    function nonces(address) external view returns (uint);  // 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 (uint);  // Only Avalanche bridge tokens 
}

File 5 of 10 : SafeERC20.sol
// This is a simplified version of OpenZepplin's SafeERC20 library
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;
pragma experimental ABIEncoderV2;

import "../interface/IERC20.sol";
import "./SafeMath.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 {
    using SafeMath for uint256;

    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 6 of 10 : SafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

// 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, 'SafeMath: ds-math-add-overflow');
    }

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

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

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

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity >=0.7.0;

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

abstract contract YakAdapter is Ownable {
    using SafeERC20 for IERC20;

    event YakAdapterSwap(
        address indexed _tokenFrom, 
        address indexed _tokenTo, 
        uint _amountIn, 
        uint _amountOut
    );

    event UpdatedGasEstimate(
        address indexed _adapter,
        uint _newEstimate
    );

    event Recovered(
        address indexed _asset, 
        uint amount
    );

    address internal constant WAVAX = 0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7;
    address internal constant AVAX = address(0);
    uint internal constant UINT_MAX = type(uint).max;

    uint public swapGasEstimate;
    string public name;

    function setSwapGasEstimate(uint _estimate) public onlyOwner {
        swapGasEstimate = _estimate;
        emit UpdatedGasEstimate(address(this), _estimate);
    }

    /**
     * @notice Revoke token allowance
     * @param _token address
     * @param _spender address
     */
    function revokeAllowance(address _token, address _spender) external onlyOwner {
        IERC20(_token).safeApprove(_spender, 0);
    }

    /**
     * @notice Recover ERC20 from contract
     * @param _tokenAddress token address
     * @param _tokenAmount amount to recover
     */
    function recoverERC20(address _tokenAddress, uint _tokenAmount) external onlyOwner {
        require(_tokenAmount > 0, 'YakAdapter: Nothing to recover');
        IERC20(_tokenAddress).safeTransfer(msg.sender, _tokenAmount);
        emit Recovered(_tokenAddress, _tokenAmount);
    }

    /**
     * @notice Recover AVAX from contract
     * @param _amount amount
     */
    function recoverAVAX(uint _amount) external onlyOwner {
        require(_amount > 0, 'YakAdapter: Nothing to recover');
        payable(msg.sender).transfer(_amount);
        emit Recovered(address(0), _amount);
    }

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

    /**
     * Execute a swap from token to token assuming this contract already holds input tokens
     * @notice Interact through the router
     * @param _amountIn input amount in starting token
     * @param _amountOut amount out in ending token
     * @param _fromToken ERC20 token being sold
     * @param _toToken ERC20 token being bought
     * @param _to address where swapped funds should be sent to
     */
    function swap(
        uint _amountIn, 
        uint _amountOut,
        address _fromToken, 
        address _toToken, 
        address _to
    ) external {
        _approveIfNeeded(_fromToken, _amountIn);
        _swap(_amountIn, _amountOut, _fromToken, _toToken, _to);
        emit YakAdapterSwap(
            _fromToken, 
            _toToken,
            _amountIn, 
            _amountOut 
        );
    } 

    /**
     * @notice Return expected funds to user
     * @dev Skip if funds should stay in the contract
     * @param _token address
     * @param _amount tokens to return
     * @param _to address where funds should be sent to
     */
    function _returnTo(address _token, uint _amount, address _to) internal {
        if (address(this)!=_to) {
            IERC20(_token).safeTransfer(_to, _amount);
        }
    }

    /**
     * @notice Wrap AVAX
     * @param _amount amount
     */
    function _wrap(uint _amount) internal {
        IWETH(WAVAX).deposit{value: _amount}();
    }

    /**
     * @notice Unwrap WAVAX
     * @param _amount amount
     */
    function _unwrap(uint _amount) internal {
        IWETH(WAVAX).withdraw(_amount);
    }

    /**
     * @notice Internal implementation of a swap
     * @dev Must return tokens to address(this)
     * @dev Wrapping is handled external to this function
     * @param _amountIn amount being sold
     * @param _amountOut amount being bought
     * @param _fromToken ERC20 token being sold
     * @param _toToken ERC20 token being bought
     * @param _to Where recieved tokens are sent to
     */
    function _swap(
        uint _amountIn, 
        uint _amountOut, 
        address _fromToken, 
        address _toToken, 
        address _to
    ) internal virtual;

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

    /**
     * @notice Approve tokens for use in Strategy
     * @dev Should use modifier `onlyOwner` to avoid griefing
     */
    function setAllowances() public virtual;

    function _approveIfNeeded(address _tokenIn, uint _amount) internal virtual;

    receive() external payable {}
}

File 8 of 10 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0;

import "./IERC20.sol";

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

File 9 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.7.0;

import "./Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: Caller is not the owner");
        _;
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: New owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 10 of 10 : Context.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.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 GSN 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 payable) {
        return payable(msg.sender);
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

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":"address","name":"_factory","type":"address"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_swapGasEstimate","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Recovered","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":"ID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"factory","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeCompliment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"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":[],"name":"renounceOwnership","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":[],"name":"setAllowances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_estimate","type":"uint256"}],"name":"setSwapGasEstimate","outputs":[],"stateMutability":"nonpayable","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":[],"name":"swapGasEstimate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b5060405162001d4238038062001d42833981810160405260808110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604090815260208201519082015160609092015190935090915060006200010d620001ff565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350816103e811620001995760405162461bcd60e51b815260040180806020018281038252603381526020018062001d0f6033913960400191505060405180910390fd5b6001600160601b0319606084901b1660a0528351620001c090600290602087019062000590565b50620001dd826103e86200020360201b62000b791790919060201c565b608052620001eb8162000262565b620001f562000308565b50505050620007c9565b3390565b808203828111156200025c576040805162461bcd60e51b815260206004820152601f60248201527f536166654d6174683a2064732d6d6174682d7375622d756e646572666c6f7700604482015290519081900360640190fd5b92915050565b6200026c620001ff565b6001600160a01b03166200027f620003a1565b6001600160a01b031614620002ca576040805162461bcd60e51b8152602060048201819052602482015260008051602062001cef833981519152604482015290519081900360640190fd5b600181905560408051828152905130917ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a919081900360200190a250565b62000312620001ff565b6001600160a01b031662000325620003a1565b6001600160a01b03161462000370576040805162461bcd60e51b8152602060048201819052602482015260008051602062001cef833981519152604482015290519081900360640190fd5b6200039f73b31f66aa3c1e785363f0875a1b74e27b85fd66c780600019620003b0602090811b62000bd717901c565b565b6000546001600160a01b031690565b8015806200043f5750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90620003e99030908690600401620006ba565b60206040518083038186803b1580156200040257600080fd5b505afa15801562000417573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200043d919062000665565b155b620004675760405162461bcd60e51b81526004016200045e906200076c565b60405180910390fd5b620004c28363095ea7b360e01b848460405160240162000489929190620006d4565b60408051808303601f190181529190526020810180516001600160e01b0319939093166001600160e01b0393841617905290620004c716565b505050565b600080836001600160a01b031683604051620004e491906200067e565b6000604051808303816000865af19150503d806000811462000523576040519150601f19603f3d011682016040523d82523d6000602084013e62000528565b606091505b5091509150816200054d5760405162461bcd60e51b81526004016200045e90620006ed565b8051156200058a57808060200190518101906200056b91906200063c565b6200058a5760405162461bcd60e51b81526004016200045e9062000722565b50505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620005c8576000855562000613565b82601f10620005e357805160ff191683800117855562000613565b8280016001018555821562000613579182015b8281111562000613578251825591602001919060010190620005f6565b506200062192915062000625565b5090565b5b8082111562000621576000815560010162000626565b6000602082840312156200064e578081fd5b815180151581146200065e578182fd5b9392505050565b60006020828403121562000677578081fd5b5051919050565b60008251815b81811015620006a0576020818601810151858301520162000684565b81811115620006af5782828501525b509190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6040820152691bdd081cdd58d8d9595960b21b606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e636500000000000000000000606082015260800190565b60805160a05160601c6114f0620007ff600039806109175280610d4c5280610f7152508061045f52806111da52506114f06000f3fe6080604052600436106100ec5760003560e01c80638980f11f1161008a578063dbd9a4d411610059578063dbd9a4d4146102f8578063eab90da61461030d578063ef99893a1461035e578063f2fde38b1461039f576100f3565b80638980f11f146102645780638da5cb5b1461029d578063b3cea217146102ce578063c45a0155146102e3576100f3565b806369cff80d116100c657806369cff80d146101d5578063715018a6146101ea5780637ae26773146101ff57806384a33e631461023a576100f3565b806306fdde03146100f85780633b720fca146101825780634ebb7916146101a9576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d6103d2565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018e57600080fd5b5061019761045d565b60408051918252519081900360200190f35b3480156101b557600080fd5b506101d3600480360360208110156101cc57600080fd5b5035610481565b005b3480156101e157600080fd5b506101976105b2565b3480156101f657600080fd5b506101d36105b8565b34801561020b57600080fd5b506101d36004803603604081101561022257600080fd5b506001600160a01b0381358116916020013516610683565b34801561024657600080fd5b506101d36004803603602081101561025d57600080fd5b5035610710565b34801561027057600080fd5b506101d36004803603604081101561028757600080fd5b506001600160a01b0381351690602001356107c2565b3480156102a957600080fd5b506102b26108e2565b604080516001600160a01b039092168252519081900360200190f35b3480156102da57600080fd5b506101976108f1565b3480156102ef57600080fd5b506102b2610915565b34801561030457600080fd5b506101d3610939565b34801561031957600080fd5b506101d3600480360360a081101561033057600080fd5b508035906020810135906001600160a01b0360408201358116916060810135821691608090910135166109d0565b34801561036a57600080fd5b506101976004803603606081101561038157600080fd5b508035906001600160a01b0360208201358116916040013516610a41565b3480156103ab57600080fd5b506101d3600480360360208110156103c257600080fd5b50356001600160a01b0316610a58565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104555780601f1061042a57610100808354040283529160200191610455565b820191906000526020600020905b81548152906001019060200180831161043857829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000081565b610489610d25565b6001600160a01b031661049a6108e2565b6001600160a01b0316146104f5576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161054a576040805162461bcd60e51b815260206004820152601e60248201527f59616b416461707465723a204e6f7468696e6720746f207265636f7665720000604482015290519081900360640190fd5b604051339082156108fc029083906000818181858888f19350505050158015610577573d6000803e3d6000fd5b506040805182815290516000917f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28919081900360200190a250565b60015481565b6105c0610d25565b6001600160a01b03166105d16108e2565b6001600160a01b03161461062c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61068b610d25565b6001600160a01b031661069c6108e2565b6001600160a01b0316146106f7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61070c6001600160a01b038316826000610bd7565b5050565b610718610d25565b6001600160a01b03166107296108e2565b6001600160a01b031614610784576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600181905560408051828152905130917ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a919081900360200190a250565b6107ca610d25565b6001600160a01b03166107db6108e2565b6001600160a01b031614610836576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161088b576040805162461bcd60e51b815260206004820152601e60248201527f59616b416461707465723a204e6f7468696e6720746f207265636f7665720000604482015290519081900360640190fd5b61089f6001600160a01b0383163383610d29565b6040805182815290516001600160a01b038416917f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28919081900360200190a25050565b6000546001600160a01b031690565b7f5a00738292e8f8894f4160e3c913031e8c8786932c57a8c836165d1801a15f1081565b7f000000000000000000000000000000000000000000000000000000000000000081565b610941610d25565b6001600160a01b03166109526108e2565b6001600160a01b0316146109ad576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6109ce73b31f66aa3c1e785363f0875a1b74e27b85fd66c780600019610bd7565b565b6109da838661070c565b6109e78585858585610d48565b816001600160a01b0316836001600160a01b03167fe2bdbc6b7225eb0a972ac943c485a6cc05f7c6811838bce8903f23200fb744fa8787604051808381526020018281526020019250505060405180910390a35050505050565b6000610a4e848484610f40565b90505b9392505050565b610a60610d25565b6001600160a01b0316610a716108e2565b6001600160a01b031614610acc576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610b115760405162461bcd60e51b81526004018080602001828103825260268152602001806114956026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b80820382811115610bd1576040805162461bcd60e51b815260206004820152601f60248201527f536166654d6174683a2064732d6d6174682d7375622d756e646572666c6f7700604482015290519081900360640190fd5b92915050565b801580610c7857506040517fdd62ed3e0000000000000000000000000000000000000000000000000000000081526001600160a01b0384169063dd62ed3e90610c269030908690600401611372565b60206040518083038186803b158015610c3e57600080fd5b505afa158015610c52573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c769190611321565b155b610c9d5760405162461bcd60e51b8152600401610c9490611437565b60405180910390fd5b610d208363095ea7b360e01b8484604051602401610cbc92919061138c565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611115565b505050565b3390565b610d208363a9059cbb60e01b8484604051602401610cbc92919061138c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e6a4390585856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015610dc857600080fd5b505afa158015610ddc573d6000803e3d6000fd5b505050506040513d6020811015610df257600080fd5b505190506000806001600160a01b0380861690871610610e1457866000610e18565b6000875b9092509050610e316001600160a01b038716848a610d29565b60408051600080825260208201928390527f022c0d9f00000000000000000000000000000000000000000000000000000000835260248201858152604483018590526001600160a01b038881166064850152608060848501908152845160a486018190529189169563022c0d9f95899589958d9592949093909260c48601928190849084905b83811015610ecf578181015183820152602001610eb7565b50505050905090810190601f168015610efc5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015610f1e57600080fd5b505af1158015610f32573d6000803e3d6000fd5b505050505050505050505050565b6000816001600160a01b0316836001600160a01b03161480610f60575083155b15610f6d57506000610a51565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663e6a4390585856040518363ffffffff1660e01b815260040180836001600160a01b03168152602001826001600160a01b031681526020019250505060206040518083038186803b158015610fed57600080fd5b505afa158015611001573d6000803e3d6000fd5b505050506040513d602081101561101757600080fd5b505190506001600160a01b038116611033576000915050610a51565b600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561106f57600080fd5b505afa158015611083573d6000803e3d6000fd5b505050506040513d606081101561109957600080fd5b5080516020909101516dffffffffffffffffffffffffffff91821693501690506000806001600160a01b03808816908916106110d65782846110d9565b83835b915091506000821180156110ed5750600081115b15611109576110fd8983836111d1565b95505050505050610a51565b50505050509392505050565b600080836001600160a01b0316836040516111309190611339565b6000604051808303816000865af19150503d806000811461116d576040519150601f19603f3d011682016040523d82523d6000602084013e611172565b606091505b5091509150816111945760405162461bcd60e51b8152600401610c94906113a5565b8051156111cb57808060200190518101906111af9190611301565b6111cb5760405162461bcd60e51b8152600401610c94906113da565b50505050565b6000806111fe857f000000000000000000000000000000000000000000000000000000000000000061123d565b9050600061120c828561123d565b9050600061122683611220886103e861123d565b906112a9565b905080828161123157fe5b04979650505050505050565b60008115806112585750508082028282828161125557fe5b04145b610bd1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a2064732d6d6174682d6d756c2d6f766572666c6f770000604482015290519081900360640190fd5b80820182811015610bd1576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a2064732d6d6174682d6164642d6f766572666c6f770000604482015290519081900360640190fd5b600060208284031215611312578081fd5b81518015158114610a51578182fd5b600060208284031215611332578081fd5b5051919050565b60008251815b81811015611359576020818601810151858301520161133f565b818111156113675782828501525b509190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060608201526080019056fe4f776e61626c653a204e6577206f776e657220697320746865207a65726f2061646472657373a26469706673582212202d301cf632bae78c9150c99152b5e8eedfb04e140f8d8d80ae3f9b616559c06f64736f6c634300070600334f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e657259616b556e696c696b65416461707465723a204665652067726561746572207468616e207468652064656e6f6d696e61746f7200000000000000000000000000000000000000000000000000000000000000800000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa100000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000000155472616465724a6f6559616b4164617074657256300000000000000000000000

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

00000000000000000000000000000000000000000000000000000000000000800000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa100000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000001d4c000000000000000000000000000000000000000000000000000000000000000155472616465724a6f6559616b4164617074657256300000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): TraderJoeYakAdapterV0
Arg [1] : _factory (address): 0x9ad6c38be94206ca50bb0d90783181662f0cfa10
Arg [2] : _fee (uint256): 3
Arg [3] : _swapGasEstimate (uint256): 120000

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 0000000000000000000000009ad6c38be94206ca50bb0d90783181662f0cfa10
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [3] : 000000000000000000000000000000000000000000000000000000000001d4c0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000015
Arg [5] : 5472616465724a6f6559616b4164617074657256300000000000000000000000


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.