Contract 0xa64c5c58fc1510de3ff2ee644e030d666b660ea6

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xf7991c97df6d6585d48de2243837c6904c1039d1f290088928d04132442952e70x60c06040121125012022-03-14 20:17:49375 days 18 hrs ago0xd22044706dea3c342f68396bedbcf6a2536d951d IN  Create: WoofiAdapter0 AVAX0.3138246225
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WoofiAdapter

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 9 : WoofiAdapter.sol
//       ╟╗                                                                      ╔╬
//       ╞╬╬                                                                    ╬╠╬
//      ╔╣╬╬╬                                                                  ╠╠╠╠╦
//     ╬╬╬╬╬╩                                                                  ╘╠╠╠╠╬
//    ║╬╬╬╬╬                                                                    ╘╠╠╠╠╬
//    ╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬      ╒╬╬╬╬╬╬╬╜   ╠╠╬╬╬╬╬╬╬         ╠╬╬╬╬╬╬╬    ╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠
//    ╙╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╕    ╬╬╬╬╬╬╬╜   ╣╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬   ╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╩
//     ╙╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬  ╔╬╬╬╬╬╬╬    ╔╠╠╠╬╬╬╬╬╬╬╬        ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╝╙
//               ╘╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬    ╒╠╠╠╬╠╬╩╬╬╬╬╬╬       ╠╬╬╬╬╬╬╬╣╬╬╬╬╬╬╬╙
//                 ╣╬╬╬╬╬╬╬╬╬╬╠╣     ╣╬╠╠╠╬╩ ╚╬╬╬╬╬╬      ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                  ╣╬╬╬╬╬╬╬╬╬╣     ╣╬╠╠╠╬╬   ╣╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬
//                   ╟╬╬╬╬╬╬╬╩      ╬╬╠╠╠╠╬╬╬╬╬╬╬╬╬╬╬     ╠╬╬╬╬╬╬╬╠╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╒╬╬╠╠╬╠╠╬╬╬╬╬╬╬╬╬╬╬╬    ╠╬╬╬╬╬╬╬ ╣╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬     ╬╬╬╠╠╠╠╝╝╝╝╝╝╝╠╬╬╬╬╬╬   ╠╬╬╬╬╬╬╬  ╚╬╬╬╬╬╬╬╬
//                    ╬╬╬╬╬╬╬    ╣╬╬╬╬╠╠╩       ╘╬╬╬╬╬╬╬  ╠╬╬╬╬╬╬╬   ╙╬╬╬╬╬╬╬╬
//                              

// SPDX-License-Identifier: GPL-3.0-only

pragma solidity >=0.7.0;

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

contract WoofiAdapter is YakAdapter {
    using SafeERC20 for IERC20;

    bytes32 public constant id = keccak256("WoofiAdapter");
    address public immutable quoteToken;
    address public rebateCollector;
    address public immutable pool;

    constructor(
        string memory _name, 
        uint _swapGasEstimate, 
        address _pool
    ) {
        setSwapGasEstimate(_swapGasEstimate);
        quoteToken = IWooPP(_pool).quoteToken();
        pool = _pool;
        name = _name;
    }

    function setRebateCollector(address _rebateCollector) external onlyOwner {
        rebateCollector = _rebateCollector;
    }

    function _approveIfNeeded(
        address _tokenIn, 
        uint _amount
    ) internal override {
        uint allowance = IERC20(_tokenIn).allowance(address(this), pool);
        if (allowance < _amount) {
            IERC20(_tokenIn).safeApprove(pool, UINT_MAX);
        }
    }

    function _safeQuery(
        function (address, uint) external view returns (uint) qFn,
        address _baseToken, 
        uint _baseAmount
    ) internal view returns (uint) {
        try qFn(_baseToken, _baseAmount) returns (uint amountOut) {
            return amountOut;
        } catch {
            return 0;
        }
    }

    function _query(
        uint _amountIn, 
        address _tokenIn, 
        address _tokenOut
    ) internal override view returns (uint amountOut) {
        if (_amountIn == 0) { 
            return 0; 
        }
        if (_tokenIn == quoteToken) {
            amountOut = _safeQuery(IWooPP(pool).querySellQuote, _tokenOut, _amountIn);
        } else if (_tokenOut == quoteToken) {
            amountOut = _safeQuery(IWooPP(pool).querySellBase, _tokenIn, _amountIn);
        } else {
            uint quoteAmount = _safeQuery(IWooPP(pool).querySellBase, _tokenIn, _amountIn);
            amountOut = _safeQuery(IWooPP(pool).querySellQuote, _tokenOut, quoteAmount);
        }
    }

    function _swap(
        uint _amountIn, 
        uint _amountOut, 
        address _tokenIn, 
        address _tokenOut, 
        address _to
    ) internal override {
        uint realToAmount;
        if (_tokenIn == quoteToken) {
            realToAmount = IWooPP(pool).sellQuote(
                _tokenOut,
                _amountIn,
                _amountOut,
                _to,
                address(this)
            );
        } else if (_tokenOut == quoteToken) {
            realToAmount = IWooPP(pool).sellBase(
                _tokenIn, 
                _amountIn, 
                _amountOut, 
                _to, 
                rebateCollector
            );
        } else {
            uint256 quoteAmount = IWooPP(pool).sellBase(
                _tokenIn, 
                _amountIn, 
                0, 
                address(this), 
                rebateCollector
            );
            _approveIfNeeded(quoteToken, quoteAmount);
            realToAmount = IWooPP(pool).sellQuote(
                _tokenOut, 
                quoteAmount, 
                _amountOut, 
                _to, 
                rebateCollector
            );
        }
    }

    function setAllowances() public override onlyOwner {}

}

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

interface IWooPP {

    function quoteToken() external view returns (address);
    function querySellQuote(address, uint256) external view returns (uint256);
    function querySellBase(address, uint256) external view returns (uint256);

    function sellBase(
        address baseToken,
        uint256 baseAmount,
        uint256 minQuoteAmount,
        address to,
        address rebateTo
    ) external returns (uint256 quoteAmount);
    function sellQuote(
        address baseToken,
        uint256 quoteAmount,
        uint256 minBaseAmount,
        address to,
        address rebateTo
    ) external returns (uint256 baseAmount);

}

File 3 of 9 : 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 4 of 9 : 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 5 of 9 : 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 6 of 9 : 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 9 : 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 8 of 9 : 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 9 of 9 : 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":"uint256","name":"_swapGasEstimate","type":"uint256"},{"internalType":"address","name":"_pool","type":"address"}],"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":"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":[],"name":"pool","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":[],"name":"quoteToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebateCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"_rebateCollector","type":"address"}],"name":"setRebateCollector","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"}]

60c06040523480156200001157600080fd5b5060405162001aab38038062001aab833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604090815260208201519101519092509050600062000105620001fc565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200015a8262000200565b806001600160a01b031663217a4b706040518163ffffffff1660e01b815260040160206040518083038186803b1580156200019457600080fd5b505afa158015620001a9573d6000803e3d6000fd5b505050506040513d6020811015620001c057600080fd5b50516001600160601b0319606091821b81166080529082901b1660a0528251620001f2906002906020860190620002c6565b5050505062000372565b3390565b6200020a620001fc565b6001600160a01b03166200021d620002b7565b6001600160a01b03161462000279576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600181905560408051828152905130917ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a919081900360200190a250565b6000546001600160a01b031690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620002fe576000855562000349565b82601f106200031957805160ff191683800117855562000349565b8280016001018555821562000349579182015b82811115620003495782518255916020019190600101906200032c565b50620003579291506200035b565b5090565b5b808211156200035757600081556001016200035c565b60805160601c60a05160601c6116c4620003e7600039806104cd5280610dee5280610e865280610f27528061102252806110b05280611195528061126652806112e0528061131b52806113565250806104f15280610eb15280610fa7528061112d528061122952806112a352506116c46000f3fe6080604052600436106101125760003560e01c806384a33e63116100a5578063c2f92d4411610074578063eab90da611610059578063eab90da61461037b578063ef99893a146103cc578063f2fde38b1461040d57610119565b8063c2f92d4414610333578063dbd9a4d41461036657610119565b806384a33e63146102a65780638980f11f146102d05780638da5cb5b14610309578063af640d0f1461031e57610119565b806354f03cdd116100e157806354f03cdd1461021a57806369cff80d1461022f578063715018a6146102565780637ae267731461026b57610119565b806306fdde031461011e57806316f0115b146101a8578063217a4b70146101d95780634ebb7916146101ee57610119565b3661011957005b600080fd5b34801561012a57600080fd5b50610133610440565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016d578181015183820152602001610155565b50505050905090810190601f16801561019a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b457600080fd5b506101bd6104cb565b604080516001600160a01b039092168252519081900360200190f35b3480156101e557600080fd5b506101bd6104ef565b3480156101fa57600080fd5b506102186004803603602081101561021157600080fd5b5035610513565b005b34801561022657600080fd5b506101bd610644565b34801561023b57600080fd5b50610244610653565b60408051918252519081900360200190f35b34801561026257600080fd5b50610218610659565b34801561027757600080fd5b506102186004803603604081101561028e57600080fd5b506001600160a01b0381358116916020013516610724565b3480156102b257600080fd5b50610218600480360360208110156102c957600080fd5b50356107b1565b3480156102dc57600080fd5b50610218600480360360408110156102f357600080fd5b506001600160a01b038135169060200135610863565b34801561031557600080fd5b506101bd610983565b34801561032a57600080fd5b50610244610992565b34801561033f57600080fd5b506102186004803603602081101561035657600080fd5b50356001600160a01b03166109b6565b34801561037257600080fd5b50610218610a59565b34801561038757600080fd5b50610218600480360360a081101561039e57600080fd5b508035906020810135906001600160a01b036040820135811691606081013582169160809091013516610acf565b3480156103d857600080fd5b50610244600480360360608110156103ef57600080fd5b508035906001600160a01b0360208201358116916040013516610b40565b34801561041957600080fd5b506102186004803603602081101561043057600080fd5b50356001600160a01b0316610b57565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104c35780601f10610498576101008083540402835291602001916104c3565b820191906000526020600020905b8154815290600101906020018083116104a657829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b61051b610c78565b6001600160a01b031661052c610983565b6001600160a01b031614610587576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600081116105dc576040805162461bcd60e51b815260206004820152601e60248201527f59616b416461707465723a204e6f7468696e6720746f207265636f7665720000604482015290519081900360640190fd5b604051339082156108fc029083906000818181858888f19350505050158015610609573d6000803e3d6000fd5b506040805182815290516000917f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28919081900360200190a250565b6003546001600160a01b031681565b60015481565b610661610c78565b6001600160a01b0316610672610983565b6001600160a01b0316146106cd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36000805473ffffffffffffffffffffffffffffffffffffffff19169055565b61072c610c78565b6001600160a01b031661073d610983565b6001600160a01b031614610798576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6107ad6001600160a01b038316826000610c7c565b5050565b6107b9610c78565b6001600160a01b03166107ca610983565b6001600160a01b031614610825576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600181905560408051828152905130917ff43f23b7a28e6f8ce6843a21bd7b48bce778aa913b8c8cf459edf7d770e8d38a919081900360200190a250565b61086b610c78565b6001600160a01b031661087c610983565b6001600160a01b0316146108d7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161092c576040805162461bcd60e51b815260206004820152601e60248201527f59616b416461707465723a204e6f7468696e6720746f207265636f7665720000604482015290519081900360640190fd5b6109406001600160a01b0383163383610db1565b6040805182815290516001600160a01b038416917f8c1256b8896378cd5044f80c202f9772b9d77dc85c8a6eb51967210b09bfaa28919081900360200190a25050565b6000546001600160a01b031690565b7fdf78c51ac952d244d8b9ed0b2fc283b67ca768e9e7b9e7f547e8039f3bf9900381565b6109be610c78565b6001600160a01b03166109cf610983565b6001600160a01b031614610a2a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6003805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b610a61610c78565b6001600160a01b0316610a72610983565b6001600160a01b031614610acd576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b565b610ad98386610dd0565b610ae68585858585610ead565b816001600160a01b0316836001600160a01b03167fe2bdbc6b7225eb0a972ac943c485a6cc05f7c6811838bce8903f23200fb744fa8787604051808381526020018281526020019250505060405180910390a35050505050565b6000610b4d848484611218565b90505b9392505050565b610b5f610c78565b6001600160a01b0316610b70610983565b6001600160a01b031614610bcb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2043616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b038116610c105760405162461bcd60e51b81526004018080602001828103825260268152602001806116696026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b3390565b801580610d045750604051636eb1769f60e11b81526001600160a01b0384169063dd62ed3e90610cb29030908690600401611546565b60206040518083038186803b158015610cca57600080fd5b505afa158015610cde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0291906114f5565b155b610d295760405162461bcd60e51b8152600401610d209061160b565b60405180910390fd5b610dac8363095ea7b360e01b8484604051602401610d48929190611560565b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611393565b505050565b610dac8363a9059cbb60e01b8484604051602401610d48929190611560565b60408051636eb1769f60e11b81523060048201526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166024830152915160009285169163dd62ed3e916044808301926020929190829003018186803b158015610e4157600080fd5b505afa158015610e55573d6000803e3d6000fd5b505050506040513d6020811015610e6b57600080fd5b5051905081811015610dac57610dac6001600160a01b0384167f0000000000000000000000000000000000000000000000000000000000000000600019610c7c565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316846001600160a01b03161415610fa5576040805163f3287c2f60e01b81526001600160a01b0385811660048301526024820189905260448201889052848116606483015230608483015291517f00000000000000000000000000000000000000000000000000000000000000009092169163f3287c2f9160a4808201926020929091908290030181600087803b158015610f7257600080fd5b505af1158015610f86573d6000803e3d6000fd5b505050506040513d6020811015610f9c57600080fd5b50519050611210565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b0316141561106d57600354604080516306846fb560e41b81526001600160a01b038781166004830152602482018a9052604482018990528581166064830152928316608482015290517f000000000000000000000000000000000000000000000000000000000000000090921691636846fb509160a4808201926020929091908290030181600087803b158015610f7257600080fd5b600354604080516306846fb560e41b81526001600160a01b038781166004830152602482018a9052600060448301819052306064840152938116608483015291517f000000000000000000000000000000000000000000000000000000000000000090921691636846fb509160a48082019260209290919082900301818787803b1580156110fa57600080fd5b505af115801561110e573d6000803e3d6000fd5b505050506040513d602081101561112457600080fd5b505190506111527f000000000000000000000000000000000000000000000000000000000000000082610dd0565b6003546040805163f3287c2f60e01b81526001600160a01b03878116600483015260248201859052604482018a90528681166064830152928316608482015290517f00000000000000000000000000000000000000000000000000000000000000009092169163f3287c2f9160a4808201926020929091908290030181600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b505050506040513d602081101561120a57600080fd5b50519150505b505050505050565b60008361122757506000610b50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614156112a15761129a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366410a21848761144f565b9050610b50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156113145761129a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379a04876858761144f565b600061134f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166379a04876868861144f565b905061138a7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166366410a21858461144f565b95945050505050565b600080836001600160a01b0316836040516113ae919061150d565b6000604051808303816000865af19150503d80600081146113eb576040519150601f19603f3d011682016040523d82523d6000602084013e6113f0565b606091505b5091509150816114125760405162461bcd60e51b8152600401610d2090611579565b805115611449578080602001905181019061142d91906114d5565b6114495760405162461bcd60e51b8152600401610d20906115ae565b50505050565b6000848484846040518363ffffffff1660e01b815260040180836001600160a01b031681526020018281526020019250505060206040518083038186803b15801561149957600080fd5b505afa9250505080156114be57506040513d60208110156114b957600080fd5b505160015b6114ca575060006114cd565b90505b949350505050565b6000602082840312156114e6578081fd5b81518015158114610b50578182fd5b600060208284031215611506578081fd5b5051919050565b60008251815b8181101561152d5760208186018101518583015201611513565b8181111561153b5782828501525b509190910192915050565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6020808252818101527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604082015260600190565b6020808252602a908201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60408201527f6f74207375636365656400000000000000000000000000000000000000000000606082015260800190565b60208082526036908201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60408201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060608201526080019056fe4f776e61626c653a204e6577206f776e657220697320746865207a65726f2061646472657373a2646970667358221220f1ce53a3a686a5703ab185794d0e1a3d1bff2ef69a4776062b04e041f2e67b2064736f6c63430007060033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000802c8000000000000000000000000f8ce0d043891b62c55380fb1efbfb4f186153d96000000000000000000000000000000000000000000000000000000000000000c576f6f6669416461707465720000000000000000000000000000000000000000

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000802c8000000000000000000000000f8ce0d043891b62c55380fb1efbfb4f186153d96000000000000000000000000000000000000000000000000000000000000000c576f6f6669416461707465720000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): WoofiAdapter
Arg [1] : _swapGasEstimate (uint256): 525000
Arg [2] : _pool (address): 0xf8ce0d043891b62c55380fb1efbfb4f186153d96

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000802c8
Arg [2] : 000000000000000000000000f8ce0d043891b62c55380fb1efbfb4f186153d96
Arg [3] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [4] : 576f6f6669416461707465720000000000000000000000000000000000000000


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.