FTM Price: $0.74 (-3.74%)
Gas: 11 GWei

Token

WOOFi Earn USD Coin (weUSDC)
 

Overview

Max Total Supply

0.000000001343191794 weUSDC

Holders

3

Total Transfers

-

Market

Price

$0.00 @ 0.000000 FTM

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information

Contract Source Code Verified (Exact Match)

Contract Name:
WOOFiVaultV2

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 14 : VaultV2.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/ERC20.sol';
import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol';
import '@openzeppelin/contracts/math/SafeMath.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/utils/ReentrancyGuard.sol';
import '@uniswap/lib/contracts/libraries/TransferHelper.sol';

import '../interfaces/IStrategy.sol';
import '../interfaces/IWETH.sol';
import '../interfaces/IWooAccessManager.sol';
import '../interfaces/IVaultV2.sol';

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
contract WOOFiVaultV2 is IVaultV2, ERC20, Ownable, ReentrancyGuard {
    using SafeERC20 for IERC20;
    using SafeMath for uint256;

    struct StratCandidate {
        address implementation;
        uint256 proposedTime;
    }

    /* ----- State Variables ----- */

    address public immutable override want;

    IWooAccessManager public immutable accessManager;

    IStrategy public strategy;
    StratCandidate public stratCandidate;

    uint256 public approvalDelay = 48 hours;

    mapping(address => uint256) public costSharePrice;

    event NewStratCandidate(address indexed implementation);
    event UpgradeStrat(address indexed implementation);

    /* ----- Constant Variables ----- */

    // WBNB: https://bscscan.com/token/0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
    // WAVAX: https://snowtrace.io/address/0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7
    address public immutable override weth;

    constructor(
        address _weth,
        address _want,
        address _accessManager
    )
        public
        ERC20(
            string(abi.encodePacked('WOOFi Earn ', ERC20(_want).name())),
            string(abi.encodePacked('we', ERC20(_want).symbol()))
        )
    {
        require(_weth != address(0), 'WOOFiVaultV2: weth_ZERO_ADDR');
        require(_want != address(0), 'WOOFiVaultV2: want_ZERO_ADDR');
        require(_accessManager != address(0), 'WOOFiVaultV2: accessManager_ZERO_ADDR');

        weth = _weth;
        want = _want;
        accessManager = IWooAccessManager(_accessManager);
    }

    modifier onlyAdmin() {
        require(owner() == msg.sender || accessManager.isVaultAdmin(msg.sender), 'WOOFiVaultV2: NOT_ADMIN');
        _;
    }

    /* ----- External Functions ----- */

    function deposit(uint256 amount) public payable override nonReentrant {
        // require(amount > 0, 'WOOFiVaultV2: amount_CAN_NOT_BE_ZERO');
        if (amount == 0) {
            return;
        }

        if (want == weth) {
            require(msg.value == amount, 'WOOFiVaultV2: msg.value_INSUFFICIENT');
        } else {
            require(msg.value == 0, 'WOOFiVaultV2: msg.value_INVALID');
        }

        if (address(strategy) != address(0)) {
            require(!strategy.paused(), 'WOOFiVaultV2: strat_paused');
            strategy.beforeDeposit();
        }

        uint256 balanceBefore = balance();
        if (want == weth) {
            IWETH(weth).deposit{value: msg.value}();
        } else {
            TransferHelper.safeTransferFrom(want, msg.sender, address(this), amount);
        }
        uint256 balanceAfter = balance();
        require(amount <= balanceAfter.sub(balanceBefore), 'WOOFiVaultV2: amount_NOT_ENOUGH');

        uint256 shares = totalSupply() == 0 ? amount : amount.mul(totalSupply()).div(balanceBefore);
        require(shares > 0, 'VaultV2: !shares');
        uint256 sharesBefore = balanceOf(msg.sender);
        uint256 costBefore = costSharePrice[msg.sender];
        uint256 costAfter = (sharesBefore.mul(costBefore).add(amount.mul(1e18))).div(sharesBefore.add(shares));
        costSharePrice[msg.sender] = costAfter;

        _mint(msg.sender, shares);

        earn();
    }

    function withdraw(uint256 shares) public override nonReentrant {
        if (shares == 0) {
            return;
        }
        // require(shares > 0, 'WOOFiVaultV2: shares_ZERO');

        require(shares <= balanceOf(msg.sender), 'WOOFiVaultV2: shares_NOT_ENOUGH');

        if (address(strategy) != address(0)) {
            strategy.beforeWithdraw();
        }

        uint256 withdrawAmount = shares.mul(balance()).div(totalSupply());
        _burn(msg.sender, shares);

        uint256 balanceBefore = IERC20(want).balanceOf(address(this));
        if (balanceBefore < withdrawAmount) {
            uint256 balanceToWithdraw = withdrawAmount.sub(balanceBefore);
            require(_isStratActive(), 'WOOFiVaultV2: STRAT_INACTIVE');
            strategy.withdraw(balanceToWithdraw);
            uint256 balanceAfter = IERC20(want).balanceOf(address(this));
            if (withdrawAmount > balanceAfter) {
                // NOTE: in case a small amount not counted in, due to the decimal precision.
                withdrawAmount = balanceAfter;
            }
        }

        if (want == weth) {
            IWETH(weth).withdraw(withdrawAmount);
            TransferHelper.safeTransferETH(msg.sender, withdrawAmount);
        } else {
            TransferHelper.safeTransfer(want, msg.sender, withdrawAmount);
        }
    }

    function earn() public override {
        if (_isStratActive()) {
            uint256 balanceAvail = available();
            TransferHelper.safeTransfer(want, address(strategy), balanceAvail);
            strategy.deposit();
        }
    }

    function available() public view override returns (uint256) {
        return IERC20(want).balanceOf(address(this));
    }

    function balance() public view override returns (uint256) {
        return address(strategy) != address(0) ? available().add(strategy.balanceOf()) : available();
    }

    function getPricePerFullShare() public view override returns (uint256) {
        return totalSupply() == 0 ? 1e18 : balance().mul(1e18).div(totalSupply());
    }

    function _isStratActive() internal view returns (bool) {
        return address(strategy) != address(0) && !strategy.paused();
    }

    /* ----- Admin Functions ----- */

    function setupStrat(address _strat) public onlyAdmin {
        require(_strat != address(0), 'WOOFiVaultV2: STRAT_ZERO_ADDR');
        require(address(strategy) == address(0), 'WOOFiVaultV2: STRAT_ALREADY_SET');
        require(address(this) == IStrategy(_strat).vault(), 'WOOFiVaultV2: STRAT_VAULT_INVALID');
        require(want == IStrategy(_strat).want(), 'WOOFiVaultV2: STRAT_WANT_INVALID');
        strategy = IStrategy(_strat);

        emit UpgradeStrat(_strat);
    }

    function proposeStrat(address _implementation) public onlyAdmin {
        require(address(this) == IStrategy(_implementation).vault(), 'WOOFiVaultV2: STRAT_VAULT_INVALID');
        require(want == IStrategy(_implementation).want(), 'WOOFiVaultV2: STRAT_WANT_INVALID');
        stratCandidate = StratCandidate({implementation: _implementation, proposedTime: block.timestamp});

        emit NewStratCandidate(_implementation);
    }

    function upgradeStrat() public onlyAdmin {
        require(stratCandidate.implementation != address(0), 'WOOFiVaultV2: NO_CANDIDATE');
        require(stratCandidate.proposedTime.add(approvalDelay) < block.timestamp, 'WOOFiVaultV2: TIME_INVALID');

        emit UpgradeStrat(stratCandidate.implementation);

        strategy.retireStrat();
        strategy = IStrategy(stratCandidate.implementation);
        stratCandidate.implementation = address(0);
        stratCandidate.proposedTime = 5000000000; // 100+ years to ensure proposedTime check

        earn();
    }

    function setApprovalDelay(uint256 _approvalDelay) external onlyAdmin {
        require(_approvalDelay > 0, 'WOOFiVaultV2: approvalDelay_ZERO');
        approvalDelay = _approvalDelay;
    }

    function inCaseTokensGetStuck(address stuckToken) external onlyAdmin {
        require(stuckToken != want, 'WOOFiVaultV2: stuckToken_NOT_WANT');
        require(stuckToken != address(0), 'WOOFiVaultV2: stuckToken_ZERO_ADDR');
        uint256 amount = IERC20(stuckToken).balanceOf(address(this));
        if (amount > 0) {
            TransferHelper.safeTransfer(stuckToken, msg.sender, amount);
        }
    }

    function inCaseNativeTokensGetStuck() external onlyAdmin {
        // NOTE: vault never needs native tokens to do the yield farming;
        // This native token balance indicates a user's incorrect transfer.
        if (address(this).balance > 0) {
            TransferHelper.safeTransferETH(msg.sender, address(this).balance);
        }
    }

    receive() external payable {}
}

File 2 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 3 of 14 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

File 4 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

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

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    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));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "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 14 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

File 6 of 14 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

import "../utils/Context.sol";
/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * 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 () internal {
        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 7 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor () internal {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 8 of 14 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

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

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

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

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

File 9 of 14 : IStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
interface IStrategy {
    function vault() external view returns (address);

    function want() external view returns (address);

    function beforeDeposit() external;

    function beforeWithdraw() external;

    function deposit() external;

    function withdraw(uint256) external;

    function balanceOf() external view returns (uint256);

    function balanceOfWant() external view returns (uint256);

    function balanceOfPool() external view returns (uint256);

    function harvest() external;

    function retireStrat() external;

    function emergencyExit() external;

    function paused() external view returns (bool);

    function inCaseTokensGetStuck(address stuckToken) external;
}

File 10 of 14 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/// @title Wrapped ETH.
/// BSC: https://bscscan.com/address/0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c#code
interface IWETH {
    /// @dev Deposit ETH into WETH
    function deposit() external payable;

    /// @dev Transfer WETH to receiver
    /// @param to address of WETH receiver
    /// @param value amount of WETH to transfer
    /// @return get true when succeed, else false
    function transfer(address to, uint256 value) external returns (bool);

    /// @dev Withdraw WETH to ETH
    function withdraw(uint256) external;
}

File 11 of 14 : IWooAccessManager.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.6.12;
pragma experimental ABIEncoderV2;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/// @title Reward manager interface for WooFi Swap.
/// @notice this is for swap rebate or potential incentive program
interface IWooAccessManager {
    /* ----- Events ----- */

    event FeeAdminUpdated(address indexed feeAdmin, bool flag);

    event VaultAdminUpdated(address indexed vaultAdmin, bool flag);

    event RebateAdminUpdated(address indexed rebateAdmin, bool flag);

    event ZeroFeeVaultUpdated(address indexed vault, bool flag);

    /* ----- External Functions ----- */

    function isFeeAdmin(address feeAdmin) external returns (bool);

    function isVaultAdmin(address vaultAdmin) external returns (bool);

    function isRebateAdmin(address rebateAdmin) external returns (bool);

    function isZeroFeeVault(address vault) external returns (bool);

    /* ----- Admin Functions ----- */

    /// @notice Sets feeAdmin
    function setFeeAdmin(address feeAdmin, bool flag) external;

    /// @notice Batch sets feeAdmin
    function batchSetFeeAdmin(address[] calldata feeAdmins, bool[] calldata flags) external;

    /// @notice Sets vaultAdmin
    function setVaultAdmin(address vaultAdmin, bool flag) external;

    /// @notice Batch sets vaultAdmin
    function batchSetVaultAdmin(address[] calldata vaultAdmins, bool[] calldata flags) external;

    /// @notice Sets rebateAdmin
    function setRebateAdmin(address rebateAdmin, bool flag) external;

    /// @notice Batch sets rebateAdmin
    function batchSetRebateAdmin(address[] calldata rebateAdmins, bool[] calldata flags) external;

    /// @notice Sets zeroFeeVault
    function setZeroFeeVault(address vault, bool flag) external;

    /// @notice Batch sets zeroFeeVault
    function batchSetZeroFeeVault(address[] calldata vaults, bool[] calldata flags) external;
}

File 12 of 14 : IVaultV2.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.12;

interface IVaultV2 {
    function want() external view returns (address);

    function weth() external view returns (address);

    function deposit(uint256 amount) external payable;

    function withdraw(uint256 shares) external;

    function earn() external;

    function available() external view returns (uint256);

    function balance() external view returns (uint256);

    function getPricePerFullShare() external view returns (uint256);
}

File 13 of 14 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <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 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 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;
    }
}

File 14 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_accessManager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"NewStratCandidate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"UpgradeStrat","type":"event"},{"inputs":[],"name":"accessManager","outputs":[{"internalType":"contract IWooAccessManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"approvalDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"costSharePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inCaseNativeTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"address","name":"_implementation","type":"address"}],"name":"proposeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_approvalDelay","type":"uint256"}],"name":"setApprovalDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strat","type":"address"}],"name":"setupStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stratCandidate","outputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"proposedTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"upgradeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60e06040526202a300600a553480156200001857600080fd5b5060405162003883380380620038838339810160408190526200003b916200035e565b816001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156200007557600080fd5b505afa1580156200008a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000b49190810190620003b1565b604051602001620000c691906200047f565b604051602081830303815290604052826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156200010f57600080fd5b505afa15801562000124573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200014e9190810190620003b1565b60405160200162000160919062000453565b60408051601f19818403018152919052815162000185906003906020850190620002c2565b5080516200019b906004906020840190620002c2565b50506005805460ff19166012179055506000620001b7620002be565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060016006556001600160a01b038316620002445760405162461bcd60e51b81526004016200023b90620004b4565b60405180910390fd5b6001600160a01b0382166200026d5760405162461bcd60e51b81526004016200023b9062000530565b6001600160a01b038116620002965760405162461bcd60e51b81526004016200023b90620004eb565b6001600160601b0319606093841b811660c05291831b821660805290911b1660a052620005b3565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200030557805160ff191683800117855562000335565b8280016001018555821562000335579182015b828111156200033557825182559160200191906001019062000318565b506200034392915062000347565b5090565b5b8082111562000343576000815560010162000348565b60008060006060848603121562000373578283fd5b835162000380816200059a565b602085015190935062000393816200059a565b6040850151909250620003a6816200059a565b809150509250925092565b600060208284031215620003c3578081fd5b81516001600160401b0380821115620003da578283fd5b818401915084601f830112620003ee578283fd5b815181811115620003fd578384fd5b604051601f8201601f1916810160200183811182821017156200041e578586fd5b60405281815283820160200187101562000436578485fd5b6200044982602083016020870162000567565b9695505050505050565b600061776560f01b825282516200047281600285016020870162000567565b9190910160020192915050565b60006a02ba7a7a3349022b0b937160ad1b82528251620004a781600b85016020870162000567565b91909101600b0192915050565b6020808252601c908201527f574f4f46695661756c7456323a20776574685f5a45524f5f4144445200000000604082015260600190565b60208082526025908201527f574f4f46695661756c7456323a206163636573734d616e616765725f5a45524f6040820152642fa0a2222960d91b606082015260800190565b6020808252601c908201527f574f4f46695661756c7456323a2077616e745f5a45524f5f4144445200000000604082015260600190565b60005b83811015620005845781810151838201526020016200056a565b8381111562000594576000848401525b50505050565b6001600160a01b0381168114620005b057600080fd5b50565b60805160601c60a05160601c60c05160601c6132276200065c60003980610a075280610a765280610b7b52806112af528061147452806114ce525080610c71528061101f52806116a35280611a595280611c405280611d385280611fd65250806106615280610832528061096e5280610a315280610af15280610bb75280610e3152806112d9528061149e528061154a52806118b252806119645280611afe52506132276000f3fe6080604052600436106101f25760003560e01c8063858574191161010d578063c5a3b2cc116100a0578063e2d1e75c1161006f578063e2d1e75c14610526578063e5550e451461053b578063e66852441461055b578063f2fde38b14610570578063fdcb606814610590576101f9565b8063c5a3b2cc146104b1578063d389800f146104d1578063dd62ed3e146104e6578063def68a9c14610506576101f9565b8063a8c62e76116100dc578063a8c62e7614610454578063a9059cbb14610469578063b69ef8a814610489578063b6b55f251461049e576101f9565b806385857419146103f55780638da5cb5b1461040a57806395d89b411461041f578063a457c2d714610434576101f9565b80633fc8cef31161018557806370a082311161015457806370a0823114610388578063715018a6146103a857806376dfabb8146103bd57806377c7b8fc146103e0576101f9565b80633fc8cef31461031e57806348a0d754146103335780635b12ff9b146103485780636226399114610368576101f9565b806323b872dd116101c157806323b872dd1461029a5780632e1a7d4d146102ba578063313ce567146102dc57806339509351146102fe576101f9565b806306fdde03146101fe578063095ea7b31461022957806318160ddd146102565780631f1fcd5114610278576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b506102136105a5565b60405161022091906128f8565b60405180910390f35b34801561023557600080fd5b50610249610244366004612805565b61063b565b60405161022091906128ed565b34801561026257600080fd5b5061026b610659565b60405161022091906130fd565b34801561028457600080fd5b5061028d61065f565b604051610220919061289c565b3480156102a657600080fd5b506102496102b53660046127c5565b610683565b3480156102c657600080fd5b506102da6102d5366004612850565b61070a565b005b3480156102e857600080fd5b506102f1610b22565b6040516102209190613106565b34801561030a57600080fd5b50610249610319366004612805565b610b2b565b34801561032a57600080fd5b5061028d610b79565b34801561033f57600080fd5b5061026b610b9d565b34801561035457600080fd5b506102da610363366004612755565b610c41565b34801561037457600080fd5b5061026b610383366004612755565b610ed8565b34801561039457600080fd5b5061026b6103a3366004612755565b610eea565b3480156103b457600080fd5b506102da610f05565b3480156103c957600080fd5b506103d2610f94565b6040516102209291906128d4565b3480156103ec57600080fd5b5061026b610fa9565b34801561040157600080fd5b506102da610fef565b34801561041657600080fd5b5061028d6110d4565b34801561042b57600080fd5b506102136110e8565b34801561044057600080fd5b5061024961044f366004612805565b611149565b34801561046057600080fd5b5061028d6111b1565b34801561047557600080fd5b50610249610484366004612805565b6111c0565b34801561049557600080fd5b5061026b6111d4565b6102da6104ac366004612850565b61127b565b3480156104bd57600080fd5b506102da6104cc366004612755565b611673565b3480156104dd57600080fd5b506102da611941565b3480156104f257600080fd5b5061026b61050136600461278d565b6119fe565b34801561051257600080fd5b506102da610521366004612755565b611a29565b34801561053257600080fd5b5061026b611c0a565b34801561054757600080fd5b506102da610556366004612850565b611c10565b34801561056757600080fd5b506102da611d08565b34801561057c57600080fd5b506102da61058b366004612755565b611f08565b34801561059c57600080fd5b5061028d611fd4565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106315780601f1061060657610100808354040283529160200191610631565b820191906000526020600020905b81548152906001019060200180831161061457829003601f168201915b5050505050905090565b600061064f610648611ff8565b8484611ffc565b5060015b92915050565b60025490565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006106908484846120b0565b6107008461069c611ff8565b6106fb856040518060600160405280602881526020016131a5602891396001600160a01b038a166000908152600160205260408120906106da611ff8565b6001600160a01b0316815260208101919091526040016000205491906121c5565b611ffc565b5060019392505050565b600260065414156107365760405162461bcd60e51b815260040161072d90613058565b60405180910390fd5b60026006558061074557610b1a565b61074e33610eea565b81111561076d5760405162461bcd60e51b815260040161072d9061296e565b6007546001600160a01b0316156107e757600760009054906101000a90046001600160a01b03166001600160a01b031663419f77536040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b505050505b600061080c6107f4610659565b6108066107ff6111d4565b85906121f1565b90612232565b90506108183383612264565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a082319061086790309060040161289c565b60206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190612868565b905081811015610a055760006108cd8383612346565b90506108d761236e565b6108f35760405162461bcd60e51b815260040161072d9061308f565b600754604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d906109239084906004016130fd565b600060405180830381600087803b15801561093d57600080fd5b505af1158015610951573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691506370a08231906109a490309060040161289c565b60206040518083038186803b1580156109bc57600080fd5b505afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612868565b905080841115610a02578093505b50505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415610aec57604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632e1a7d4d90610aab9085906004016130fd565b600060405180830381600087803b158015610ac557600080fd5b505af1158015610ad9573d6000803e3d6000fd5b50505050610ae73383612412565b610b17565b610b177f000000000000000000000000000000000000000000000000000000000000000033846124a4565b50505b506001600655565b60055460ff1690565b600061064f610b38611ff8565b846106fb8560016000610b49611ff8565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061258b565b7f000000000000000000000000000000000000000000000000000000000000000081565b6040516370a0823160e01b81526000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190610bec90309060040161289c565b60206040518083038186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3c9190612868565b905090565b33610c4a6110d4565b6001600160a01b03161480610cf8575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b90610ca690339060040161289c565b602060405180830381600087803b158015610cc057600080fd5b505af1158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf89190612830565b610d145760405162461bcd60e51b815260040161072d90612a64565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190612771565b6001600160a01b0316306001600160a01b031614610db55760405162461bcd60e51b815260040161072d90612f51565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b158015610dee57600080fd5b505afa158015610e02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e269190612771565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610e765760405162461bcd60e51b815260040161072d90612ad2565b6040805180820182526001600160a01b038316808252426020909201829052600880546001600160a01b0319168217905560099190915590517f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df90600090a250565b600b6020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b610f0d611ff8565b6001600160a01b0316610f1e6110d4565b6001600160a01b031614610f445760405162461bcd60e51b815260040161072d90612d0a565b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b6008546009546001600160a01b039091169082565b6000610fb3610659565b15610fe257610fdd610fc3610659565b610806670de0b6b3a7640000610fd76111d4565b906121f1565b610c3c565b50670de0b6b3a764000090565b33610ff86110d4565b6001600160a01b031614806110a6575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b9061105490339060040161289c565b602060405180830381600087803b15801561106e57600080fd5b505af1158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a69190612830565b6110c25760405162461bcd60e51b815260040161072d90612a64565b47156110d2576110d23347612412565b565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106315780601f1061060657610100808354040283529160200191610631565b600061064f611156611ff8565b846106fb856040518060600160405280602581526020016131cd6025913960016000611180611ff8565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906121c5565b6007546001600160a01b031681565b600061064f6111cd611ff8565b84846120b0565b6007546000906001600160a01b03166111ef57610fdd610b9d565b6007546040805163722713f760e01b81529051610c3c926001600160a01b03169163722713f7916004808301926020929190829003018186803b15801561123557600080fd5b505afa158015611249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126d9190612868565b611275610b9d565b9061258b565b6002600654141561129e5760405162461bcd60e51b815260040161072d90613058565b6002600655806112ad57610b1a565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316141561132b578034146113265760405162461bcd60e51b815260040161072d90612dab565b611349565b34156113495760405162461bcd60e51b815260040161072d90612e9f565b6007546001600160a01b03161561146657600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a857600080fd5b505afa1580156113bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e09190612830565b156113fd5760405162461bcd60e51b815260040161072d90612d3f565b600760009054906101000a90046001600160a01b03166001600160a01b031663573fef0a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b505050505b60006114706111d4565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03161415611545577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561152757600080fd5b505af115801561153b573d6000803e3d6000fd5b5050505050611571565b6115717f00000000000000000000000000000000000000000000000000000000000000003330856125b0565b600061157b6111d4565b90506115878183612346565b8311156115a65760405162461bcd60e51b815260040161072d90612c1a565b60006115b0610659565b156115d0576115cb836108066115c4610659565b87906121f1565b6115d2565b835b9050600081116115f45760405162461bcd60e51b815260040161072d90612def565b60006115ff33610eea565b336000908152600b602052604081205491925061163e61161f848661258b565b6108066116348a670de0b6b3a76400006121f1565b61127587876121f1565b336000818152600b6020526040902082905590915061165d90856126a1565b611665611941565b505050505050506001600655565b3361167c6110d4565b6001600160a01b0316148061172a575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b906116d890339060040161289c565b602060405180830381600087803b1580156116f257600080fd5b505af1158015611706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172a9190612830565b6117465760405162461bcd60e51b815260040161072d90612a64565b6001600160a01b03811661176c5760405162461bcd60e51b815260040161072d90612a2d565b6007546001600160a01b0316156117955760405162461bcd60e51b815260040161072d90612cd3565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ce57600080fd5b505afa1580156117e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118069190612771565b6001600160a01b0316306001600160a01b0316146118365760405162461bcd60e51b815260040161072d90612f51565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b15801561186f57600080fd5b505afa158015611883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a79190612771565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316146118f75760405162461bcd60e51b815260040161072d90612ad2565b600780546001600160a01b0319166001600160a01b0383169081179091556040517f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a250565b61194961236e565b156110d2576000611958610b9d565b600754909150611993907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b0316836124a4565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119e357600080fd5b505af11580156119f7573d6000803e3d6000fd5b5050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b33611a326110d4565b6001600160a01b03161480611ae0575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b90611a8e90339060040161289c565b602060405180830381600087803b158015611aa857600080fd5b505af1158015611abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae09190612830565b611afc5760405162461bcd60e51b815260040161072d90612a64565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03161415611b4e5760405162461bcd60e51b815260040161072d90612c51565b6001600160a01b038116611b745760405162461bcd60e51b815260040161072d90613016565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611ba390309060040161289c565b60206040518083038186803b158015611bbb57600080fd5b505afa158015611bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf39190612868565b90508015611c0657611c068233836124a4565b5050565b600a5481565b33611c196110d4565b6001600160a01b03161480611cc7575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b90611c7590339060040161289c565b602060405180830381600087803b158015611c8f57600080fd5b505af1158015611ca3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc79190612830565b611ce35760405162461bcd60e51b815260040161072d90612a64565b60008111611d035760405162461bcd60e51b815260040161072d90612d76565b600a55565b33611d116110d4565b6001600160a01b03161480611dbf575060405163af5b052b60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af5b052b90611d6d90339060040161289c565b602060405180830381600087803b158015611d8757600080fd5b505af1158015611d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dbf9190612830565b611ddb5760405162461bcd60e51b815260040161072d90612a64565b6008546001600160a01b0316611e035760405162461bcd60e51b815260040161072d90612f1a565b600a546009544291611e15919061258b565b10611e325760405162461bcd60e51b815260040161072d90612fdf565b6008546040516001600160a01b03909116907f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a2600760009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505060088054600780546001600160a01b03199081166001600160a01b03841617909155169055505064012a05f2006009556110d2611941565b611f10611ff8565b6001600160a01b0316611f216110d4565b6001600160a01b031614611f475760405162461bcd60e51b815260040161072d90612d0a565b6001600160a01b038116611f6d5760405162461bcd60e51b815260040161072d906129a5565b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b3390565b6001600160a01b0383166120225760405162461bcd60e51b815260040161072d90612ed6565b6001600160a01b0382166120485760405162461bcd60e51b815260040161072d906129eb565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906120a39085906130fd565b60405180910390a3505050565b6001600160a01b0383166120d65760405162461bcd60e51b815260040161072d90612e5a565b6001600160a01b0382166120fc5760405162461bcd60e51b815260040161072d9061292b565b61210783838361249f565b6121448160405180606001604052806026815260200161317f602691396001600160a01b03861660009081526020819052604090205491906121c5565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612173908261258b565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906120a39085906130fd565b600081848411156121e95760405162461bcd60e51b815260040161072d91906128f8565b505050900390565b60008261220057506000610653565b8282028284828161220d57fe5b041461222b5760405162461bcd60e51b815260040161072d90612c92565b9392505050565b60008082116122535760405162461bcd60e51b815260040161072d90612be3565b81838161225c57fe5b049392505050565b6001600160a01b03821661228a5760405162461bcd60e51b815260040161072d90612e19565b6122968260008361249f565b6122d38160405180606001604052806022815260200161315d602291396001600160a01b03851660009081526020819052604090205491906121c5565b6001600160a01b0383166000908152602081905260409020556002546122f99082612346565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061233a9085906130fd565b60405180910390a35050565b6000828211156123685760405162461bcd60e51b815260040161072d90612bac565b50900390565b6007546000906001600160a01b031615801590610c3c5750600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d457600080fd5b505afa1580156123e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240c9190612830565b15905090565b604080516000808252602082019092526001600160a01b03841690839060405161243c9190612880565b60006040518083038185875af1925050503d8060008114612479576040519150601f19603f3d011682016040523d82523d6000602084013e61247e565b606091505b505090508061249f5760405162461bcd60e51b815260040161072d90612b58565b505050565b60006060846001600160a01b031663a9059cbb85856040516024016124ca9291906128d4565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516125039190612880565b6000604051808303816000865af19150503d8060008114612540576040519150601f19603f3d011682016040523d82523d6000602084013e612545565b606091505b509150915081801561256f57508051158061256f57508080602001905181019061256f9190612830565b6119f75760405162461bcd60e51b815260040161072d90612f92565b60008282018381101561222b5760405162461bcd60e51b815260040161072d90612a9b565b60006060856001600160a01b03166323b872dd8686866040516024016125d8939291906128b0565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516126119190612880565b6000604051808303816000865af19150503d806000811461264e576040519150601f19603f3d011682016040523d82523d6000602084013e612653565b606091505b509150915081801561267d57508051158061267d57508080602001905181019061267d9190612830565b6126995760405162461bcd60e51b815260040161072d90612b07565b505050505050565b6001600160a01b0382166126c75760405162461bcd60e51b815260040161072d906130c6565b6126d36000838361249f565b6002546126e0908261258b565b6002556001600160a01b038216600090815260208190526040902054612706908261258b565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061233a9085906130fd565b600060208284031215612766578081fd5b813561222b81613144565b600060208284031215612782578081fd5b815161222b81613144565b6000806040838503121561279f578081fd5b82356127aa81613144565b915060208301356127ba81613144565b809150509250929050565b6000806000606084860312156127d9578081fd5b83356127e481613144565b925060208401356127f481613144565b929592945050506040919091013590565b60008060408385031215612817578182fd5b823561282281613144565b946020939093013593505050565b600060208284031215612841578081fd5b8151801515811461222b578182fd5b600060208284031215612861578081fd5b5035919050565b600060208284031215612879578081fd5b5051919050565b60008251612892818460208701613114565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152612917816040850160208701613114565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a207368617265735f4e4f545f454e4f55474800604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601d908201527f574f4f46695661756c7456323a2053545241545f5a45524f5f41444452000000604082015260600190565b60208082526017908201527f574f4f46695661756c7456323a204e4f545f41444d494e000000000000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252818101527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c4944604082015260600190565b60208082526031908201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604082015270185b9cd9995c919c9bdb4819985a5b1959607a1b606082015260800190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601f908201527f574f4f46695661756c7456323a20616d6f756e745f4e4f545f454e4f55474800604082015260600190565b60208082526021908201527f574f4f46695661756c7456323a20737475636b546f6b656e5f4e4f545f57414e6040820152601560fa1b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a2053545241545f414c52454144595f53455400604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f574f4f46695661756c7456323a2073747261745f706175736564000000000000604082015260600190565b6020808252818101527f574f4f46695661756c7456323a20617070726f76616c44656c61795f5a45524f604082015260600190565b60208082526024908201527f574f4f46695661756c7456323a206d73672e76616c75655f494e5355464649436040820152631251539560e21b606082015260800190565b60208082526010908201526f5661756c7456323a202173686172657360801b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a206d73672e76616c75655f494e56414c494400604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601a908201527f574f4f46695661756c7456323a204e4f5f43414e444944415445000000000000604082015260600190565b60208082526021908201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c496040820152601160fa1b606082015260800190565b6020808252602d908201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260408201526c185b9cd9995c8819985a5b1959609a1b606082015260800190565b6020808252601a908201527f574f4f46695661756c7456323a2054494d455f494e56414c4944000000000000604082015260600190565b60208082526022908201527f574f4f46695661756c7456323a20737475636b546f6b656e5f5a45524f5f4144604082015261222960f11b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601c908201527f574f4f46695661756c7456323a2053545241545f494e41435449564500000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60005b8381101561312f578181015183820152602001613117565b8381111561313e576000848401525b50505050565b6001600160a01b038116811461315957600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b7c234d0e33746477d5eee798aae06113ead9a566acbebe562492ec5e0995c7264736f6c634300060c003300000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8

Deployed Bytecode

0x6080604052600436106101f25760003560e01c8063858574191161010d578063c5a3b2cc116100a0578063e2d1e75c1161006f578063e2d1e75c14610526578063e5550e451461053b578063e66852441461055b578063f2fde38b14610570578063fdcb606814610590576101f9565b8063c5a3b2cc146104b1578063d389800f146104d1578063dd62ed3e146104e6578063def68a9c14610506576101f9565b8063a8c62e76116100dc578063a8c62e7614610454578063a9059cbb14610469578063b69ef8a814610489578063b6b55f251461049e576101f9565b806385857419146103f55780638da5cb5b1461040a57806395d89b411461041f578063a457c2d714610434576101f9565b80633fc8cef31161018557806370a082311161015457806370a0823114610388578063715018a6146103a857806376dfabb8146103bd57806377c7b8fc146103e0576101f9565b80633fc8cef31461031e57806348a0d754146103335780635b12ff9b146103485780636226399114610368576101f9565b806323b872dd116101c157806323b872dd1461029a5780632e1a7d4d146102ba578063313ce567146102dc57806339509351146102fe576101f9565b806306fdde03146101fe578063095ea7b31461022957806318160ddd146102565780631f1fcd5114610278576101f9565b366101f957005b600080fd5b34801561020a57600080fd5b506102136105a5565b60405161022091906128f8565b60405180910390f35b34801561023557600080fd5b50610249610244366004612805565b61063b565b60405161022091906128ed565b34801561026257600080fd5b5061026b610659565b60405161022091906130fd565b34801561028457600080fd5b5061028d61065f565b604051610220919061289c565b3480156102a657600080fd5b506102496102b53660046127c5565b610683565b3480156102c657600080fd5b506102da6102d5366004612850565b61070a565b005b3480156102e857600080fd5b506102f1610b22565b6040516102209190613106565b34801561030a57600080fd5b50610249610319366004612805565b610b2b565b34801561032a57600080fd5b5061028d610b79565b34801561033f57600080fd5b5061026b610b9d565b34801561035457600080fd5b506102da610363366004612755565b610c41565b34801561037457600080fd5b5061026b610383366004612755565b610ed8565b34801561039457600080fd5b5061026b6103a3366004612755565b610eea565b3480156103b457600080fd5b506102da610f05565b3480156103c957600080fd5b506103d2610f94565b6040516102209291906128d4565b3480156103ec57600080fd5b5061026b610fa9565b34801561040157600080fd5b506102da610fef565b34801561041657600080fd5b5061028d6110d4565b34801561042b57600080fd5b506102136110e8565b34801561044057600080fd5b5061024961044f366004612805565b611149565b34801561046057600080fd5b5061028d6111b1565b34801561047557600080fd5b50610249610484366004612805565b6111c0565b34801561049557600080fd5b5061026b6111d4565b6102da6104ac366004612850565b61127b565b3480156104bd57600080fd5b506102da6104cc366004612755565b611673565b3480156104dd57600080fd5b506102da611941565b3480156104f257600080fd5b5061026b61050136600461278d565b6119fe565b34801561051257600080fd5b506102da610521366004612755565b611a29565b34801561053257600080fd5b5061026b611c0a565b34801561054757600080fd5b506102da610556366004612850565b611c10565b34801561056757600080fd5b506102da611d08565b34801561057c57600080fd5b506102da61058b366004612755565b611f08565b34801561059c57600080fd5b5061028d611fd4565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106315780601f1061060657610100808354040283529160200191610631565b820191906000526020600020905b81548152906001019060200180831161061457829003601f168201915b5050505050905090565b600061064f610648611ff8565b8484611ffc565b5060015b92915050565b60025490565b7f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7581565b60006106908484846120b0565b6107008461069c611ff8565b6106fb856040518060600160405280602881526020016131a5602891396001600160a01b038a166000908152600160205260408120906106da611ff8565b6001600160a01b0316815260208101919091526040016000205491906121c5565b611ffc565b5060019392505050565b600260065414156107365760405162461bcd60e51b815260040161072d90613058565b60405180910390fd5b60026006558061074557610b1a565b61074e33610eea565b81111561076d5760405162461bcd60e51b815260040161072d9061296e565b6007546001600160a01b0316156107e757600760009054906101000a90046001600160a01b03166001600160a01b031663419f77536040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156107ce57600080fd5b505af11580156107e2573d6000803e3d6000fd5b505050505b600061080c6107f4610659565b6108066107ff6111d4565b85906121f1565b90612232565b90506108183383612264565b6040516370a0823160e01b81526000906001600160a01b037f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7516906370a082319061086790309060040161289c565b60206040518083038186803b15801561087f57600080fd5b505afa158015610893573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b79190612868565b905081811015610a055760006108cd8383612346565b90506108d761236e565b6108f35760405162461bcd60e51b815260040161072d9061308f565b600754604051632e1a7d4d60e01b81526001600160a01b0390911690632e1a7d4d906109239084906004016130fd565b600060405180830381600087803b15801561093d57600080fd5b505af1158015610951573d6000803e3d6000fd5b50506040516370a0823160e01b8152600092506001600160a01b037f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b751691506370a08231906109a490309060040161289c565b60206040518083038186803b1580156109bc57600080fd5b505afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612868565b905080841115610a02578093505b50505b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c836001600160a01b03167f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b03161415610aec57604051632e1a7d4d60e01b81526001600160a01b037f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c831690632e1a7d4d90610aab9085906004016130fd565b600060405180830381600087803b158015610ac557600080fd5b505af1158015610ad9573d6000803e3d6000fd5b50505050610ae73383612412565b610b17565b610b177f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7533846124a4565b50505b506001600655565b60055460ff1690565b600061064f610b38611ff8565b846106fb8560016000610b49611ff8565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549061258b565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8381565b6040516370a0823160e01b81526000906001600160a01b037f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b7516906370a0823190610bec90309060040161289c565b60206040518083038186803b158015610c0457600080fd5b505afa158015610c18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3c9190612868565b905090565b33610c4a6110d4565b6001600160a01b03161480610cf8575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b90610ca690339060040161289c565b602060405180830381600087803b158015610cc057600080fd5b505af1158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf89190612830565b610d145760405162461bcd60e51b815260040161072d90612a64565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d4d57600080fd5b505afa158015610d61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d859190612771565b6001600160a01b0316306001600160a01b031614610db55760405162461bcd60e51b815260040161072d90612f51565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b158015610dee57600080fd5b505afa158015610e02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e269190612771565b6001600160a01b03167f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b031614610e765760405162461bcd60e51b815260040161072d90612ad2565b6040805180820182526001600160a01b038316808252426020909201829052600880546001600160a01b0319168217905560099190915590517f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df90600090a250565b600b6020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b610f0d611ff8565b6001600160a01b0316610f1e6110d4565b6001600160a01b031614610f445760405162461bcd60e51b815260040161072d90612d0a565b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b6008546009546001600160a01b039091169082565b6000610fb3610659565b15610fe257610fdd610fc3610659565b610806670de0b6b3a7640000610fd76111d4565b906121f1565b610c3c565b50670de0b6b3a764000090565b33610ff86110d4565b6001600160a01b031614806110a6575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b9061105490339060040161289c565b602060405180830381600087803b15801561106e57600080fd5b505af1158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a69190612830565b6110c25760405162461bcd60e51b815260040161072d90612a64565b47156110d2576110d23347612412565b565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106315780601f1061060657610100808354040283529160200191610631565b600061064f611156611ff8565b846106fb856040518060600160405280602581526020016131cd6025913960016000611180611ff8565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906121c5565b6007546001600160a01b031681565b600061064f6111cd611ff8565b84846120b0565b6007546000906001600160a01b03166111ef57610fdd610b9d565b6007546040805163722713f760e01b81529051610c3c926001600160a01b03169163722713f7916004808301926020929190829003018186803b15801561123557600080fd5b505afa158015611249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126d9190612868565b611275610b9d565b9061258b565b6002600654141561129e5760405162461bcd60e51b815260040161072d90613058565b6002600655806112ad57610b1a565b7f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c836001600160a01b03167f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b0316141561132b578034146113265760405162461bcd60e51b815260040161072d90612dab565b611349565b34156113495760405162461bcd60e51b815260040161072d90612e9f565b6007546001600160a01b03161561146657600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a857600080fd5b505afa1580156113bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e09190612830565b156113fd5760405162461bcd60e51b815260040161072d90612d3f565b600760009054906101000a90046001600160a01b03166001600160a01b031663573fef0a6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b505050505b60006114706111d4565b90507f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c836001600160a01b03167f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b03161415611545577f00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c836001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561152757600080fd5b505af115801561153b573d6000803e3d6000fd5b5050505050611571565b6115717f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b753330856125b0565b600061157b6111d4565b90506115878183612346565b8311156115a65760405162461bcd60e51b815260040161072d90612c1a565b60006115b0610659565b156115d0576115cb836108066115c4610659565b87906121f1565b6115d2565b835b9050600081116115f45760405162461bcd60e51b815260040161072d90612def565b60006115ff33610eea565b336000908152600b602052604081205491925061163e61161f848661258b565b6108066116348a670de0b6b3a76400006121f1565b61127587876121f1565b336000818152600b6020526040902082905590915061165d90856126a1565b611665611941565b505050505050506001600655565b3361167c6110d4565b6001600160a01b0316148061172a575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b906116d890339060040161289c565b602060405180830381600087803b1580156116f257600080fd5b505af1158015611706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061172a9190612830565b6117465760405162461bcd60e51b815260040161072d90612a64565b6001600160a01b03811661176c5760405162461bcd60e51b815260040161072d90612a2d565b6007546001600160a01b0316156117955760405162461bcd60e51b815260040161072d90612cd3565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b815260040160206040518083038186803b1580156117ce57600080fd5b505afa1580156117e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118069190612771565b6001600160a01b0316306001600160a01b0316146118365760405162461bcd60e51b815260040161072d90612f51565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b815260040160206040518083038186803b15801561186f57600080fd5b505afa158015611883573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118a79190612771565b6001600160a01b03167f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b0316146118f75760405162461bcd60e51b815260040161072d90612ad2565b600780546001600160a01b0319166001600160a01b0383169081179091556040517f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a250565b61194961236e565b156110d2576000611958610b9d565b600754909150611993907f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75906001600160a01b0316836124a4565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119e357600080fd5b505af11580156119f7573d6000803e3d6000fd5b5050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b33611a326110d4565b6001600160a01b03161480611ae0575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b90611a8e90339060040161289c565b602060405180830381600087803b158015611aa857600080fd5b505af1158015611abc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ae09190612830565b611afc5760405162461bcd60e51b815260040161072d90612a64565b7f00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b756001600160a01b0316816001600160a01b03161415611b4e5760405162461bcd60e51b815260040161072d90612c51565b6001600160a01b038116611b745760405162461bcd60e51b815260040161072d90613016565b6040516370a0823160e01b81526000906001600160a01b038316906370a0823190611ba390309060040161289c565b60206040518083038186803b158015611bbb57600080fd5b505afa158015611bcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bf39190612868565b90508015611c0657611c068233836124a4565b5050565b600a5481565b33611c196110d4565b6001600160a01b03161480611cc7575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b90611c7590339060040161289c565b602060405180830381600087803b158015611c8f57600080fd5b505af1158015611ca3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc79190612830565b611ce35760405162461bcd60e51b815260040161072d90612a64565b60008111611d035760405162461bcd60e51b815260040161072d90612d76565b600a55565b33611d116110d4565b6001600160a01b03161480611dbf575060405163af5b052b60e01b81526001600160a01b037f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8169063af5b052b90611d6d90339060040161289c565b602060405180830381600087803b158015611d8757600080fd5b505af1158015611d9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dbf9190612830565b611ddb5760405162461bcd60e51b815260040161072d90612a64565b6008546001600160a01b0316611e035760405162461bcd60e51b815260040161072d90612f1a565b600a546009544291611e15919061258b565b10611e325760405162461bcd60e51b815260040161072d90612fdf565b6008546040516001600160a01b03909116907f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a2600760009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611eba57600080fd5b505af1158015611ece573d6000803e3d6000fd5b505060088054600780546001600160a01b03199081166001600160a01b03841617909155169055505064012a05f2006009556110d2611941565b611f10611ff8565b6001600160a01b0316611f216110d4565b6001600160a01b031614611f475760405162461bcd60e51b815260040161072d90612d0a565b6001600160a01b038116611f6d5760405162461bcd60e51b815260040161072d906129a5565b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b7f000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb881565b3390565b6001600160a01b0383166120225760405162461bcd60e51b815260040161072d90612ed6565b6001600160a01b0382166120485760405162461bcd60e51b815260040161072d906129eb565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906120a39085906130fd565b60405180910390a3505050565b6001600160a01b0383166120d65760405162461bcd60e51b815260040161072d90612e5a565b6001600160a01b0382166120fc5760405162461bcd60e51b815260040161072d9061292b565b61210783838361249f565b6121448160405180606001604052806026815260200161317f602691396001600160a01b03861660009081526020819052604090205491906121c5565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612173908261258b565b6001600160a01b0380841660008181526020819052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906120a39085906130fd565b600081848411156121e95760405162461bcd60e51b815260040161072d91906128f8565b505050900390565b60008261220057506000610653565b8282028284828161220d57fe5b041461222b5760405162461bcd60e51b815260040161072d90612c92565b9392505050565b60008082116122535760405162461bcd60e51b815260040161072d90612be3565b81838161225c57fe5b049392505050565b6001600160a01b03821661228a5760405162461bcd60e51b815260040161072d90612e19565b6122968260008361249f565b6122d38160405180606001604052806022815260200161315d602291396001600160a01b03851660009081526020819052604090205491906121c5565b6001600160a01b0383166000908152602081905260409020556002546122f99082612346565b6002556040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061233a9085906130fd565b60405180910390a35050565b6000828211156123685760405162461bcd60e51b815260040161072d90612bac565b50900390565b6007546000906001600160a01b031615801590610c3c5750600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156123d457600080fd5b505afa1580156123e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240c9190612830565b15905090565b604080516000808252602082019092526001600160a01b03841690839060405161243c9190612880565b60006040518083038185875af1925050503d8060008114612479576040519150601f19603f3d011682016040523d82523d6000602084013e61247e565b606091505b505090508061249f5760405162461bcd60e51b815260040161072d90612b58565b505050565b60006060846001600160a01b031663a9059cbb85856040516024016124ca9291906128d4565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516125039190612880565b6000604051808303816000865af19150503d8060008114612540576040519150601f19603f3d011682016040523d82523d6000602084013e612545565b606091505b509150915081801561256f57508051158061256f57508080602001905181019061256f9190612830565b6119f75760405162461bcd60e51b815260040161072d90612f92565b60008282018381101561222b5760405162461bcd60e51b815260040161072d90612a9b565b60006060856001600160a01b03166323b872dd8686866040516024016125d8939291906128b0565b6040516020818303038152906040529060e01b6020820180516001600160e01b0383818316178352505050506040516126119190612880565b6000604051808303816000865af19150503d806000811461264e576040519150601f19603f3d011682016040523d82523d6000602084013e612653565b606091505b509150915081801561267d57508051158061267d57508080602001905181019061267d9190612830565b6126995760405162461bcd60e51b815260040161072d90612b07565b505050505050565b6001600160a01b0382166126c75760405162461bcd60e51b815260040161072d906130c6565b6126d36000838361249f565b6002546126e0908261258b565b6002556001600160a01b038216600090815260208190526040902054612706908261258b565b6001600160a01b0383166000818152602081905260408082209390935591519091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061233a9085906130fd565b600060208284031215612766578081fd5b813561222b81613144565b600060208284031215612782578081fd5b815161222b81613144565b6000806040838503121561279f578081fd5b82356127aa81613144565b915060208301356127ba81613144565b809150509250929050565b6000806000606084860312156127d9578081fd5b83356127e481613144565b925060208401356127f481613144565b929592945050506040919091013590565b60008060408385031215612817578182fd5b823561282281613144565b946020939093013593505050565b600060208284031215612841578081fd5b8151801515811461222b578182fd5b600060208284031215612861578081fd5b5035919050565b600060208284031215612879578081fd5b5051919050565b60008251612892818460208701613114565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b6000602082528251806020840152612917816040850160208701613114565b601f01601f19169190910160400192915050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a207368617265735f4e4f545f454e4f55474800604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b6020808252601d908201527f574f4f46695661756c7456323a2053545241545f5a45524f5f41444452000000604082015260600190565b60208082526017908201527f574f4f46695661756c7456323a204e4f545f41444d494e000000000000000000604082015260600190565b6020808252601b908201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604082015260600190565b6020808252818101527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c4944604082015260600190565b60208082526031908201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472604082015270185b9cd9995c919c9bdb4819985a5b1959607a1b606082015260800190565b60208082526034908201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60408201527308115512081d1c985b9cd9995c8819985a5b195960621b606082015260800190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252601a908201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604082015260600190565b6020808252601f908201527f574f4f46695661756c7456323a20616d6f756e745f4e4f545f454e4f55474800604082015260600190565b60208082526021908201527f574f4f46695661756c7456323a20737475636b546f6b656e5f4e4f545f57414e6040820152601560fa1b606082015260800190565b60208082526021908201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6040820152607760f81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a2053545241545f414c52454144595f53455400604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601a908201527f574f4f46695661756c7456323a2073747261745f706175736564000000000000604082015260600190565b6020808252818101527f574f4f46695661756c7456323a20617070726f76616c44656c61795f5a45524f604082015260600190565b60208082526024908201527f574f4f46695661756c7456323a206d73672e76616c75655f494e5355464649436040820152631251539560e21b606082015260800190565b60208082526010908201526f5661756c7456323a202173686172657360801b604082015260600190565b60208082526021908201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601f908201527f574f4f46695661756c7456323a206d73672e76616c75655f494e56414c494400604082015260600190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b6020808252601a908201527f574f4f46695661756c7456323a204e4f5f43414e444944415445000000000000604082015260600190565b60208082526021908201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c496040820152601160fa1b606082015260800190565b6020808252602d908201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260408201526c185b9cd9995c8819985a5b1959609a1b606082015260800190565b6020808252601a908201527f574f4f46695661756c7456323a2054494d455f494e56414c4944000000000000604082015260600190565b60208082526022908201527f574f4f46695661756c7456323a20737475636b546f6b656e5f5a45524f5f4144604082015261222960f11b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252601c908201527f574f4f46695661756c7456323a2053545241545f494e41435449564500000000604082015260600190565b6020808252601f908201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604082015260600190565b90815260200190565b60ff91909116815260200190565b60005b8381101561312f578181015183820152602001613117565b8381111561313e576000848401525b50505050565b6001600160a01b038116811461315957600080fd5b5056fe45524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b7c234d0e33746477d5eee798aae06113ead9a566acbebe562492ec5e0995c7264736f6c634300060c0033

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

00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c8300000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8

-----Decoded View---------------
Arg [0] : _weth (address): 0x21be370D5312f44cB42ce377BC9b8a0cEF1A4C83
Arg [1] : _want (address): 0x04068DA6C83AFCFA0e13ba15A6696662335D5B75
Arg [2] : _accessManager (address): 0xd6d6A0828a80E1832cD4C3585aDED8971087fCb8

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000021be370d5312f44cb42ce377bc9b8a0cef1a4c83
Arg [1] : 00000000000000000000000004068da6c83afcfa0e13ba15a6696662335d5b75
Arg [2] : 000000000000000000000000d6d6a0828a80e1832cd4c3585aded8971087fcb8


Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.