GLMR Price: $0.01916 (-3.89%)

Contract

0x9346FC872C563CA71147BDEfddEFe7cEC8e2d56c

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Harvest34195662023-04-24 10:46:061012 days ago1682333166IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.14979905176
Harvest31340992023-03-14 0:54:301053 days ago1678755270IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08482788101
Set Harvest On D...31340992023-03-14 0:54:301053 days ago1678755270IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.00501646101
Harvest31181282023-03-10 20:40:481056 days ago1678480848IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08750658105
Harvest31111852023-03-09 20:40:181057 days ago1678394418IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest31041672023-03-08 20:40:241058 days ago1678308024IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30971162023-03-07 20:40:421059 days ago1678221642IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0886074105
Harvest30900422023-03-06 20:41:001060 days ago1678135260IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30829882023-03-05 20:40:481061 days ago1678048848IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30759762023-03-04 20:41:061062 days ago1677962466IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08780058105
Harvest30688612023-03-03 20:33:181063 days ago1677875598IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0901929105
Harvest30594502023-03-02 12:33:241064 days ago1677760404IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0881874105
Harvest30524412023-03-01 12:33:301065 days ago1677674010IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0906969105
Harvest30454082023-02-28 12:33:421066 days ago1677587622IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30383932023-02-27 12:31:181067 days ago1677501078IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30313592023-02-26 12:30:361068 days ago1677414636IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0884814105
Harvest30243472023-02-25 12:30:361069 days ago1677328236IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30173072023-02-24 12:31:181070 days ago1677241878IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0886074105
Harvest30102502023-02-23 12:31:301071 days ago1677155490IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0889014105
Harvest30032052023-02-22 12:30:541072 days ago1677069054IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08757325105
Harvest29962332023-02-21 12:31:061073 days ago1676982666IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.0884814105
Harvest29892732023-02-20 12:31:361074 days ago1676896296IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08647243105
Harvest29822652023-02-19 12:30:481075 days ago1676809848IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08757325105
Harvest29729342023-02-18 4:31:061077 days ago1676694666IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08757325105
Harvest29659662023-02-17 4:31:061078 days ago1676608266IN
Beefy: Strategy Solarbeam Meta Stable V1
0 GLMR0.08786725105
View all transactions

View more zero value Internal Transactions in Advanced View mode

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategySolarbeamMetaStable

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin-4/contracts/token/ERC20/utils/SafeERC20.sol";

import "../../interfaces/common/IUniswapRouterETH.sol";
import "../../interfaces/common/IWrappedNative.sol";
import "../../interfaces/solar/ISolarStableRouter.sol";
import "../../interfaces/solar/ISolarChef.sol";
import "../Common/StratFeeManager.sol";
import "../../utils/GasFeeThrottler.sol";

struct StablePool {
    address pool;
    address router;
    uint8 depositIndex;
}

contract StrategySolarbeamMetaStable is StratFeeManager, GasFeeThrottler {   
    using SafeERC20 for IERC20;

    // Tokens used
    address public native;
    address public output;
    address public want;
    address public input;

    // Pools
    StablePool public metapool;
    StablePool public basepool;

    // Third party contracts
    address public chef;
    uint256 public poolId;
    
    bool public harvestOnDeposit;
    uint256 public lastHarvest;

    // Routes
    address[] public outputToNativeRoute;
    address[] public outputToInputRoute;
    address[][] public rewardToOutputRoute;

    event StratHarvest(address indexed harvester, uint256 wantHarvested, uint256 tvl);
    event Deposit(uint256 tvl);
    event Withdraw(uint256 tvl);
    event ChargedFees(uint256 callFees, uint256 beefyFees, uint256 strategistFees);

    constructor(
        address _want,
        uint256 _poolId,
        address _chef,
        address[] memory _metapoolAndRouter,
        address[] memory _basepoolAndRouter,
        CommonAddresses memory _commonAddresses,
        address[] memory _outputToNativeRoute,
        address[] memory _outputToInputRoute
    ) StratFeeManager(_commonAddresses) {
        want = _want;
        poolId = _poolId;
        chef = _chef;

        StablePool memory _metapool;
        StablePool memory _basepool;

        input = _outputToInputRoute[_outputToInputRoute.length - 1];

        require(_basepoolAndRouter.length == 2, "_basepoolAndRouter.length != 2");
        _basepool.pool = _basepoolAndRouter[0];
        _basepool.router = _basepoolAndRouter[1];
        _basepool.depositIndex = ISolarStableRouter(_basepool.router).getTokenIndex(input);
        basepool = _basepool;

        require(_metapoolAndRouter.length == 2, "_metapoolAndRouter.length != 2");
        _metapool.pool = _metapoolAndRouter[0];
        _metapool.router = _metapoolAndRouter[1];
        _metapool.depositIndex = ISolarStableRouter(_metapool.router).getTokenIndex(_basepool.pool);
        metapool = _metapool;

        output = _outputToNativeRoute[0];
        require(output == _outputToInputRoute[0], "output must match between routes");

        native = _outputToNativeRoute[_outputToNativeRoute.length - 1];
        outputToNativeRoute = _outputToNativeRoute;
        outputToInputRoute = _outputToInputRoute;

        _giveAllowances();
    }

    // puts the funds to work
    function deposit() public whenNotPaused {
        uint256 wantBal = IERC20(want).balanceOf(address(this));

        if (wantBal > 0) {
            ISolarChef(chef).deposit(poolId, wantBal);
            emit Deposit(balanceOf());
        }
    }

    function withdraw(uint256 _amount) external {
        require(msg.sender == vault, "!vault");

        uint256 wantBal = IERC20(want).balanceOf(address(this));

        if (wantBal < _amount) {
            ISolarChef(chef).withdraw(poolId, _amount - wantBal);
            wantBal = IERC20(want).balanceOf(address(this));
        }

        if (wantBal > _amount) {
            wantBal = _amount;
        }

        if (tx.origin != owner() && !paused()) {
            uint256 withdrawalFeeAmount = wantBal * withdrawalFee / WITHDRAWAL_MAX;
            wantBal = wantBal - withdrawalFeeAmount;
        }

        IERC20(want).safeTransfer(vault, wantBal);

        emit Withdraw(balanceOf());
    }

    function beforeDeposit() external override {
        if (harvestOnDeposit) {
            require(msg.sender == vault, "!vault");
            _harvest(tx.origin);
        }
    }

    function harvest() external gasThrottle virtual  {
        _harvest(tx.origin);
    }

    function harvest(address callFeeRecipient) external gasThrottle virtual {
        _harvest(callFeeRecipient);
    }

    function managerHarvest() external onlyManager {
        _harvest(tx.origin);
    }

    // compounds earnings and charges performance fee
    function _harvest(address callFeeRecipient) internal {
        ISolarChef(chef).deposit(poolId, 0);
        uint256 outputBal = IERC20(output).balanceOf(address(this));
        if (outputBal > 0) {
            chargeFees(callFeeRecipient);
            addLiquidity();
            uint256 wantHarvested = balanceOfWant();
            deposit();

            lastHarvest = block.timestamp;
            emit StratHarvest(msg.sender, wantHarvested, balanceOf());
        }
    }

    // performance fees
    function chargeFees(address callFeeRecipient) internal {
        IFeeConfig.FeeCategory memory fees = getFees();

        if (rewardToOutputRoute.length != 0) {
            uint256 _length = rewardToOutputRoute.length;
            for (uint256 i; i < _length;) {
                address _reward = rewardToOutputRoute[i][0];
                if (_reward == native) {
                    uint256 _nativeBal = address(this).balance;
                    if (_nativeBal > 0) {
                        IWrappedNative(native).deposit{value: _nativeBal}();
                    }
                }
                uint256 _rewardBal = IERC20(_reward).balanceOf(address(this));
                if (_rewardBal > 0) {
                    IUniswapRouterETH(unirouter).swapExactTokensForTokens(_rewardBal, 0, rewardToOutputRoute[i], address(this), block.timestamp);
                }
                unchecked { ++i; }
            }
        }

        uint256 toNative = IERC20(output).balanceOf(address(this)) * fees.total / DIVISOR;
        IUniswapRouterETH(unirouter).swapExactTokensForTokens(toNative, 0, outputToNativeRoute, address(this), block.timestamp);

        uint256 nativeBal = IERC20(native).balanceOf(address(this));

        uint256 callFeeAmount = nativeBal * fees.call / DIVISOR;
        IERC20(native).safeTransfer(callFeeRecipient, callFeeAmount);

        uint256 beefyFeeAmount = nativeBal * fees.beefy / DIVISOR;
        IERC20(native).safeTransfer(beefyFeeRecipient, beefyFeeAmount);

        uint256 strategistFeeAmount = nativeBal * fees.strategist / DIVISOR;
        IERC20(native).safeTransfer(strategist, strategistFeeAmount);

        emit ChargedFees(callFeeAmount, beefyFeeAmount, strategistFeeAmount);
    }

    // Adds liquidity to AMM and gets more LP tokens.
    function addLiquidity() internal {
        address _baserouter = basepool.router;
        address _metarouter = metapool.router;

        // Swap output to input
        uint256 outputBal = IERC20(output).balanceOf(address(this));
        IUniswapRouterETH(unirouter).swapExactTokensForTokens(outputBal, 0, outputToInputRoute, address(this), block.timestamp);

        // Deposit input to basepool
        uint256 numberOfTokens = ISolarStableRouter(_baserouter).getNumberOfTokens();
        uint256[] memory inputs = new uint256[](numberOfTokens);
        inputs[basepool.depositIndex] = IERC20(input).balanceOf(address(this));
        ISolarStableRouter(_baserouter).addLiquidity(inputs, 1, block.timestamp);

        numberOfTokens = ISolarStableRouter(_metarouter).getNumberOfTokens();
        inputs = new uint256[](numberOfTokens);
        inputs[metapool.depositIndex] = IERC20(basepool.pool).balanceOf(address(this));
        ISolarStableRouter(_metarouter).addLiquidity(inputs, 1, block.timestamp);

    }

    // calculate the total underlaying 'want' held by the strat.
    function balanceOf() public view returns (uint256) {
        return balanceOfWant() + balanceOfPool();
    }

    // it calculates how much 'want' this contract holds.
    function balanceOfWant() public view returns (uint256) {
        return IERC20(want).balanceOf(address(this));
    }

    // it calculates how much 'want' the strategy has working in the farm.
    function balanceOfPool() public view returns (uint256) {
        (uint256 _amount,,,) = ISolarChef(chef).userInfo(poolId, address(this));
        return _amount;
    }

    function rewardsAvailable() public view returns (address[] memory, uint256[] memory) {
        (address[] memory addresses,,,uint256[] memory amounts) = ISolarChef(chef).pendingTokens(poolId, address(this));
        return (addresses, amounts);
    }

    function callReward() public view returns (uint256) {
        IFeeConfig.FeeCategory memory fees = getFees();
        (address[] memory rewardAdd, uint256[] memory rewardBal) = rewardsAvailable();
        address _output = output;
        uint256 _rewardRouteCount = rewardToOutputRoute.length;

        uint256 _outputBal;
        for (uint i; i < rewardAdd.length;) {
            if (rewardAdd[i] == _output) {
                _outputBal += rewardBal[i];
            } else {
                for (uint j; j < _rewardRouteCount;) {
                    if (rewardAdd[i] == rewardToOutputRoute[j][0]) {
                        uint256[] memory _balances = IUniswapRouterETH(unirouter).getAmountsOut(rewardBal[i], rewardToOutputRoute[j]);
                        _outputBal += _balances[_balances.length - 1];
                    }
                    unchecked { ++j; }
                }
            }
            unchecked { ++i; }
        }

        uint256 _nativeBal;
        if (_outputBal > 0) {
            uint256[] memory amountOut = IUniswapRouterETH(unirouter).getAmountsOut(_outputBal, outputToNativeRoute);
            _nativeBal = amountOut[amountOut.length - 1];
        }

        return _nativeBal * fees.total / DIVISOR * fees.call / DIVISOR;
    }

    function setHarvestOnDeposit(bool _harvestOnDeposit) external onlyManager {
        harvestOnDeposit = _harvestOnDeposit;

        if (harvestOnDeposit) {
            setWithdrawalFee(0);
        } else {
            setWithdrawalFee(10);
        }
    }

    function setShouldGasThrottle(bool _shouldGasThrottle) external onlyManager {
        shouldGasThrottle = _shouldGasThrottle;
    }

    // called as part of strat migration. Sends all the available funds back to the vault.
    function retireStrat() external {
        require(msg.sender == vault, "!vault");

        ISolarChef(chef).emergencyWithdraw(poolId);

        uint256 wantBal = IERC20(want).balanceOf(address(this));
        IERC20(want).transfer(vault, wantBal);
    }

    // pauses deposits and withdraws all funds from third party systems.
    function panic() public onlyManager {
        pause();
        ISolarChef(chef).emergencyWithdraw(poolId);
    }

    function pause() public onlyManager {
        _pause();

        _removeAllowances();
    }

    function unpause() external onlyManager {
        _unpause();

        _giveAllowances();

        deposit();
    }

    function _giveAllowances() internal {
        IERC20(want).safeApprove(chef, type(uint256).max);
        IERC20(output).safeApprove(unirouter, type(uint256).max);
        IERC20(input).safeApprove(basepool.router, type(uint256).max);
        IERC20(basepool.pool).safeApprove(metapool.router, type(uint256).max);

        if (rewardToOutputRoute.length != 0) {
            for (uint i; i < rewardToOutputRoute.length; i++) {
                IERC20(rewardToOutputRoute[i][0]).safeApprove(unirouter, 0);
                IERC20(rewardToOutputRoute[i][0]).safeApprove(unirouter, type(uint256).max);
            }
        }
    }

    function _removeAllowances() internal {
        IERC20(want).safeApprove(chef, 0);
        IERC20(output).safeApprove(unirouter, 0);
        IERC20(input).safeApprove(basepool.router, 0);
        IERC20(basepool.pool).safeApprove(metapool.router, 0);

        if (rewardToOutputRoute.length != 0) {
            for (uint i; i < rewardToOutputRoute.length; i++) {
                IERC20(rewardToOutputRoute[i][0]).safeApprove(unirouter, 0);
            }
        }
    }

    function addRewardRoute(address[] memory _rewardToOutputRoute) external onlyOwner {
        IERC20(_rewardToOutputRoute[0]).safeApprove(unirouter, 0);
        IERC20(_rewardToOutputRoute[0]).safeApprove(unirouter, type(uint256).max);
        rewardToOutputRoute.push(_rewardToOutputRoute);
    }

    function removeLastRewardRoute() external onlyManager {
        address reward = rewardToOutputRoute[rewardToOutputRoute.length - 1][0];
        IERC20(reward).safeApprove(unirouter, 0);
        rewardToOutputRoute.pop();
    }

    function outputToNative() external view returns (address[] memory) {
        return outputToNativeRoute;
    }

    function outputToInput() external view returns (address[] memory) {
        return outputToInputRoute;
    }

    function rewardToOutput() external view returns (address[][] memory) {
        return rewardToOutputRoute;
    }
     
    function getMetapool() external view returns (StablePool memory) {
        return metapool;
    }

    function getBasepool() external view returns (StablePool memory) {
        return basepool;
    }

    receive () external payable {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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 Contracts guidelines: functions revert
 * instead 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, IERC20Metadata {
    mapping(address => uint256) private _balances;

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override 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 this function is
     * overridden;
     *
     * 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 override returns (uint8) {
        return 18;
    }

    /**
     * @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:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, 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}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, 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}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        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) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + 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) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This 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:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, 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:
     *
     * - `account` 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 += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(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);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(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 Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @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 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 {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.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 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'
        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) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _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
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface IUniswapRouterETH {
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB, uint liquidity);

    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);

    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);

    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline
    ) external returns (uint amountToken, uint amountETH);

    function swapExactTokensForTokens(
        uint amountIn, 
        uint amountOutMin, 
        address[] calldata path, 
        address to, 
        uint deadline
    ) external returns (uint[] memory amounts);

    function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        payable
        returns (uint[] memory amounts);
    
    function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
        external
        returns (uint[] memory amounts);

    function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface IWrappedNative {
    function deposit() external payable;

    function withdraw(uint256 wad) external;
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface ISolarStableRouter {
    function addLiquidity(
        uint256[] calldata amounts,
        uint256 minToMint,
        uint256 deadline
    ) external returns (uint256);

    function getNumberOfTokens() external view returns (uint256);
    function getTokenIndex(address tokenAddress) external view returns (uint8);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;
pragma experimental ABIEncoderV2;

interface ISolarChef {
    function deposit(uint256 _pid, uint256 _amount) external;
    function withdraw(uint256 _pid, uint256 _amount) external;
    function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256, uint256, uint256);
    function emergencyWithdraw(uint256 _pid) external;
    function pendingTokens(uint256 _pid, address _user)
        external
        view
        returns (address[] calldata addresses, string calldata symbols, uint256[] calldata decimals, uint256[] calldata amounts);
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin-4/contracts/access/Ownable.sol";
import "@openzeppelin-4/contracts/security/Pausable.sol";
import "../../interfaces/common/IFeeConfig.sol";

contract StratFeeManager is Ownable, Pausable {

    struct CommonAddresses {
        address vault;
        address unirouter;
        address keeper;
        address strategist;
        address beefyFeeRecipient;
        address beefyFeeConfig;
    }

    // common addresses for the strategy
    address public vault;
    address public unirouter;
    address public keeper;
    address public strategist;
    address public beefyFeeRecipient;
    IFeeConfig public beefyFeeConfig;

    uint256 constant DIVISOR = 1 ether;
    uint256 constant public WITHDRAWAL_FEE_CAP = 50;
    uint256 constant public WITHDRAWAL_MAX = 10000;
    uint256 internal withdrawalFee = 10;

    event SetStratFeeId(uint256 feeId);
    event SetWithdrawalFee(uint256 withdrawalFee);
    event SetVault(address vault);
    event SetUnirouter(address unirouter);
    event SetKeeper(address keeper);
    event SetStrategist(address strategist);
    event SetBeefyFeeRecipient(address beefyFeeRecipient);
    event SetBeefyFeeConfig(address beefyFeeConfig);

    constructor(
        CommonAddresses memory _commonAddresses
    ) {
        vault = _commonAddresses.vault;
        unirouter = _commonAddresses.unirouter;
        keeper = _commonAddresses.keeper;
        strategist = _commonAddresses.strategist;
        beefyFeeRecipient = _commonAddresses.beefyFeeRecipient;
        beefyFeeConfig = IFeeConfig(_commonAddresses.beefyFeeConfig);
    }

    // checks that caller is either owner or keeper.
    modifier onlyManager() {
        require(msg.sender == owner() || msg.sender == keeper, "!manager");
        _;
    }

    // fetch fees from config contract
    function getFees() internal view returns (IFeeConfig.FeeCategory memory) {
        return beefyFeeConfig.getFees(address(this));
    }

    // fetch fees from config contract and dynamic deposit/withdraw fees
    function getAllFees() external view returns (IFeeConfig.AllFees memory) {
        return IFeeConfig.AllFees(getFees(), depositFee(), withdrawFee());
    }

    function getStratFeeId() external view returns (uint256) {
        return beefyFeeConfig.stratFeeId(address(this));
    }

    function setStratFeeId(uint256 _feeId) external onlyManager {
        beefyFeeConfig.setStratFeeId(_feeId);
        emit SetStratFeeId(_feeId);
    }

    // adjust withdrawal fee
    function setWithdrawalFee(uint256 _fee) public onlyManager {
        require(_fee <= WITHDRAWAL_FEE_CAP, "!cap");
        withdrawalFee = _fee;
        emit SetWithdrawalFee(_fee);
    }

    // set new vault (only for strategy upgrades)
    function setVault(address _vault) external onlyOwner {
        vault = _vault;
        emit SetVault(_vault);
    }

    // set new unirouter
    function setUnirouter(address _unirouter) external onlyOwner {
        unirouter = _unirouter;
        emit SetUnirouter(_unirouter);
    }

    // set new keeper to manage strat
    function setKeeper(address _keeper) external onlyManager {
        keeper = _keeper;
        emit SetKeeper(_keeper);
    }

    // set new strategist address to receive strat fees
    function setStrategist(address _strategist) external {
        require(msg.sender == strategist, "!strategist");
        strategist = _strategist;
        emit SetStrategist(_strategist);
    }

    // set new beefy fee address to receive beefy fees
    function setBeefyFeeRecipient(address _beefyFeeRecipient) external onlyOwner {
        beefyFeeRecipient = _beefyFeeRecipient;
        emit SetBeefyFeeRecipient(_beefyFeeRecipient);
    }

    // set new fee config address to fetch fees
    function setBeefyFeeConfig(address _beefyFeeConfig) external onlyOwner {
        beefyFeeConfig = IFeeConfig(_beefyFeeConfig);
        emit SetBeefyFeeConfig(_beefyFeeConfig);
    }

    function depositFee() public virtual view returns (uint256) {
        return 0;
    }

    function withdrawFee() public virtual view returns (uint256) {
        return paused() ? 0 : withdrawalFee;
    }

    function beforeDeposit() external virtual {}
}

File 9 of 17 : GasFeeThrottler.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@openzeppelin-4/contracts/utils/Address.sol";
import "./IGasPrice.sol";

contract GasFeeThrottler {

    bool public shouldGasThrottle = true;

    address public gasprice = address(0xA43509661141F254F54D9A326E8Ec851A0b95307);

    modifier gasThrottle() {
        if (shouldGasThrottle && Address.isContract(gasprice)) {
            require(tx.gasprice <= IGasPrice(gasprice).maxGasPrice(), "gas is too high!");
        }
        _;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^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 `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, 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 `from` to `to` 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 from,
        address to,
        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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.0;

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

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

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^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() {
        _transferOwnership(_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 {
        _transferOwnership(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");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        require(!paused(), "Pausable: paused");
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        require(paused(), "Pausable: not paused");
        _;
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

interface IFeeConfig {
    struct FeeCategory {
        uint256 total;
        uint256 beefy;
        uint256 call;
        uint256 strategist;
        string label;
        bool active;
    }
    struct AllFees {
        FeeCategory performance;
        uint256 deposit;
        uint256 withdraw;
    }
    function getFees(address strategy) external view returns (FeeCategory memory);
    function stratFeeId(address strategy) external view returns (uint256);
    function setStratFeeId(uint256 feeId) external;
}

File 17 of 17 : IGasPrice.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface IGasPrice {
    function maxGasPrice() external returns (uint);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_want","type":"address"},{"internalType":"uint256","name":"_poolId","type":"uint256"},{"internalType":"address","name":"_chef","type":"address"},{"internalType":"address[]","name":"_metapoolAndRouter","type":"address[]"},{"internalType":"address[]","name":"_basepoolAndRouter","type":"address[]"},{"components":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"address","name":"unirouter","type":"address"},{"internalType":"address","name":"keeper","type":"address"},{"internalType":"address","name":"strategist","type":"address"},{"internalType":"address","name":"beefyFeeRecipient","type":"address"},{"internalType":"address","name":"beefyFeeConfig","type":"address"}],"internalType":"struct StratFeeManager.CommonAddresses","name":"_commonAddresses","type":"tuple"},{"internalType":"address[]","name":"_outputToNativeRoute","type":"address[]"},{"internalType":"address[]","name":"_outputToInputRoute","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"callFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"beefyFees","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"strategistFees","type":"uint256"}],"name":"ChargedFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Deposit","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beefyFeeConfig","type":"address"}],"name":"SetBeefyFeeConfig","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"beefyFeeRecipient","type":"address"}],"name":"SetBeefyFeeRecipient","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"keeper","type":"address"}],"name":"SetKeeper","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"feeId","type":"uint256"}],"name":"SetStratFeeId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"strategist","type":"address"}],"name":"SetStrategist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"unirouter","type":"address"}],"name":"SetUnirouter","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"}],"name":"SetVault","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"withdrawalFee","type":"uint256"}],"name":"SetWithdrawalFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"harvester","type":"address"},{"indexed":false,"internalType":"uint256","name":"wantHarvested","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"StratHarvest","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tvl","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"WITHDRAWAL_FEE_CAP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WITHDRAWAL_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_rewardToOutputRoute","type":"address[]"}],"name":"addRewardRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balanceOfWant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"basepool","outputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint8","name":"depositIndex","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeConfig","outputs":[{"internalType":"contract IFeeConfig","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beefyFeeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beforeDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"callReward","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chef","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasprice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllFees","outputs":[{"components":[{"components":[{"internalType":"uint256","name":"total","type":"uint256"},{"internalType":"uint256","name":"beefy","type":"uint256"},{"internalType":"uint256","name":"call","type":"uint256"},{"internalType":"uint256","name":"strategist","type":"uint256"},{"internalType":"string","name":"label","type":"string"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct IFeeConfig.FeeCategory","name":"performance","type":"tuple"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"uint256","name":"withdraw","type":"uint256"}],"internalType":"struct IFeeConfig.AllFees","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBasepool","outputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint8","name":"depositIndex","type":"uint8"}],"internalType":"struct StablePool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMetapool","outputs":[{"components":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint8","name":"depositIndex","type":"uint8"}],"internalType":"struct StablePool","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStratFeeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"callFeeRecipient","type":"address"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestOnDeposit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"input","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastHarvest","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"managerHarvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"metapool","outputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"address","name":"router","type":"address"},{"internalType":"uint8","name":"depositIndex","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"native","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"output","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"outputToInput","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"outputToInputRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"outputToNative","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"outputToNativeRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"removeLastRewardRoute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToOutput","outputs":[{"internalType":"address[][]","name":"","type":"address[][]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"rewardToOutputRoute","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardsAvailable","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeConfig","type":"address"}],"name":"setBeefyFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyFeeRecipient","type":"address"}],"name":"setBeefyFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_harvestOnDeposit","type":"bool"}],"name":"setHarvestOnDeposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_shouldGasThrottle","type":"bool"}],"name":"setShouldGasThrottle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeId","type":"uint256"}],"name":"setStratFeeId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_unirouter","type":"address"}],"name":"setUnirouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_vault","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setWithdrawalFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shouldGasThrottle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unirouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600a600755600880546001600160a81b03191674a43509661141f254f54d9a326e8ec851a0b95307011790553480156200003d57600080fd5b506040516200502e3803806200502e833981016040819052620000609162000d6d565b826200006c33620005d0565b6000805460ff60a01b191681558151600180546001600160a01b03199081166001600160a01b0393841617909155602080850151600280548416918516919091179055604080860151600380548516918616919091179055606080870151600480548616918716919091179055608087015160058054861691871691909117905560a090960151600680548516918616919091179055600b805484168f861617905560128d905560118054909316938c16939093179091558151938401825282845283018290528201526040805160608101825260008082526020820181905291810191909152826001845162000164919062000e82565b8151811062000177576200017762000e9c565b6020026020010151600c60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508551600214620001fc5760405162461bcd60e51b815260206004820152601e60248201527f5f62617365706f6f6c416e64526f757465722e6c656e67746820213d2032000060448201526064015b60405180910390fd5b8560008151811062000212576200021262000e9c565b60209081029190910101516001600160a01b0316815285518690600190811062000240576200024062000e9c565b6020908102919091018101516001600160a01b03908116918301829052600c546040516319b02f4960e21b8152911660048201526366c0bd2490602401602060405180830381865afa1580156200029b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002c1919062000eb2565b60ff16604082018190528151600f80546001600160a01b0319166001600160a01b03928316179055602083015160108054919092166001600160a81b031990911617600160a01b9092029190911790558651600214620003645760405162461bcd60e51b815260206004820152601e60248201527f5f6d657461706f6f6c416e64526f757465722e6c656e67746820213d203200006044820152606401620001f3565b866000815181106200037a576200037a62000e9c565b60209081029190910101516001600160a01b03168252865187906001908110620003a857620003a862000e9c565b6020908102919091018101516001600160a01b0390811691840182905282516040516319b02f4960e21b8152911660048201526366c0bd2490602401602060405180830381865afa15801562000402573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000428919062000eb2565b60ff16604083018190528251600d80546001600160a01b0319166001600160a01b039283161790556020840151600e8054919092166001600160a81b031990911617600160a01b909202919091179055835184906000906200048e576200048e62000e9c565b6020026020010151600a60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555082600081518110620004d257620004d262000e9c565b6020908102919091010151600a546001600160a01b039081169116146200053c5760405162461bcd60e51b815260206004820181905260248201527f6f7574707574206d757374206d61746368206265747765656e20726f757465736044820152606401620001f3565b83600185516200054d919062000e82565b8151811062000560576200056062000e9c565b602090810291909101810151600980546001600160a01b0319166001600160a01b0390921691909117905584516200059f916015919087019062000b66565b508251620005b590601690602086019062000b66565b50620005c062000620565b5050505050505050505062000fb7565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b601154600b546200064d916001600160a01b039182169116600019620007a4602090811b620023c117901c565b600254600a546200067a916001600160a01b039182169116600019620007a4602090811b620023c117901c565b601054600c54620006a7916001600160a01b039182169116600019620007a4602090811b620023c117901c565b600e54600f54620006d4916001600160a01b039182169116600019620007a4602090811b620023c117901c565b60175415620007a25760005b601754811015620007a057600254601780546200075e926001600160a01b0316916000918590811062000717576200071762000e9c565b9060005260206000200160008154811062000736576200073662000e9c565b600091825260209182902001546001600160a01b0316929190620023c1620007a4821b17901c565b600254601780546200078b926001600160a01b031691600019918590811062000717576200071762000e9c565b80620007978162000ed7565b915050620006e0565b505b565b801580620008225750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015620007fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000820919062000ef3565b155b620008965760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401620001f3565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620008ee918591620008f316565b505050565b60006200094f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620009d160201b6200250e179092919060201c565b805190915015620008ee578080602001905181019062000970919062000f0d565b620008ee5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620001f3565b6060620009e28484600085620009ec565b90505b9392505050565b60608247101562000a4f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620001f3565b6001600160a01b0385163b62000aa85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620001f3565b600080866001600160a01b0316858760405162000ac6919062000f64565b60006040518083038185875af1925050503d806000811462000b05576040519150601f19603f3d011682016040523d82523d6000602084013e62000b0a565b606091505b50909250905062000b1d82828662000b28565b979650505050505050565b6060831562000b39575081620009e5565b82511562000b4a5782518084602001fd5b8160405162461bcd60e51b8152600401620001f3919062000f82565b82805482825590600052602060002090810192821562000bbe579160200282015b8281111562000bbe57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000b87565b5062000bcc92915062000bd0565b5090565b5b8082111562000bcc576000815560010162000bd1565b80516001600160a01b038116811462000bff57600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011262000c2c57600080fd5b815160206001600160401b038083111562000c4b5762000c4b62000c04565b8260051b604051601f19603f8301168101818110848211171562000c735762000c7362000c04565b60405293845285810183019383810192508785111562000c9257600080fd5b83870191505b8482101562000b1d5762000cac8262000be7565b8352918301919083019062000c98565b600060c0828403121562000ccf57600080fd5b60405160c081016001600160401b038111828210171562000cf45762000cf462000c04565b60405290508062000d058362000be7565b815262000d156020840162000be7565b602082015262000d286040840162000be7565b604082015262000d3b6060840162000be7565b606082015262000d4e6080840162000be7565b608082015262000d6160a0840162000be7565b60a08201525092915050565b6000806000806000806000806101a0898b03121562000d8b57600080fd5b62000d968962000be7565b97506020890151965062000dad60408a0162000be7565b60608a01519096506001600160401b038082111562000dcb57600080fd5b62000dd98c838d0162000c1a565b965060808b015191508082111562000df057600080fd5b62000dfe8c838d0162000c1a565b955062000e0f8c60a08d0162000cbc565b94506101608b015191508082111562000e2757600080fd5b62000e358c838d0162000c1a565b93506101808b015191508082111562000e4d57600080fd5b5062000e5c8b828c0162000c1a565b9150509295985092959890939650565b634e487b7160e01b600052601160045260246000fd5b60008282101562000e975762000e9762000e6c565b500390565b634e487b7160e01b600052603260045260246000fd5b60006020828403121562000ec557600080fd5b815160ff81168114620009e557600080fd5b60006001820162000eec5762000eec62000e6c565b5060010190565b60006020828403121562000f0657600080fd5b5051919050565b60006020828403121562000f2057600080fd5b81518015158114620009e557600080fd5b60005b8381101562000f4e57818101518382015260200162000f34565b8381111562000f5e576000848401525b50505050565b6000825162000f7881846020870162000f31565b9190910192915050565b602081526000825180602084015262000fa381604085016020870162000f31565b601f01601f19169190910160400192915050565b6140678062000fc76000396000f3fe6080604052600436106103bc5760003560e01c80638cfc0250116101f2578063cc2894801161010d578063eb1319b1116100a0578063fa5c9edd1161006f578063fa5c9edd14610b8b578063fad4675e14610bad578063fb61778714610bcd578063fbfa77cf14610be257600080fd5b8063eb1319b114610b20578063f1a392da14610b35578063f20eaeb814610b4b578063f2fde38b14610b6b57600080fd5b8063dfbdc437116100dc578063dfbdc43714610ab3578063e7a7250a14610ac8578063e941fa7814610aeb578063eaed3f4f14610b0057600080fd5b8063cc28948014610a49578063d0e30db014610a69578063d801d94614610a7e578063d92f3d7314610a9357600080fd5b8063a68833e511610185578063b20feaaf11610154578063b20feaaf146109d2578063be12a978146109f4578063c1a3d44c14610a14578063c7b9d53014610a2957600080fd5b8063a68833e51461093e578063a7700b151461095e578063ac1e502514610992578063aced1661146109b257600080fd5b806397fd323d116101c157806397fd323d1461089d578063990d60d2146108b25780639f8b5da11461090f578063a39219f91461092957600080fd5b80638cfc02501461082a5780638da5cb5b1461083f5780638e1454591461085d57806396813fca1461087d57600080fd5b80633e55f932116102e257806367a5279311610275578063722713f711610244578063722713f7146107c6578063748747e6146107db5780638456cb59146107fb5780638912cb8b1461081057600080fd5b806367a52793146107585780636817031b1461076c5780636ec232d31461078c578063715018a6146107b157600080fd5b80634746fb55116102b15780634746fb55146106e257806354518b1a14610702578063573fef0a146107185780635c975abb1461072d57600080fd5b80633e55f932146106835780633f4ba83a146106a35780634641257d146106b85780634700d305146106cd57600080fd5b80631bf50af21161035a578063257ae0de11610329578063257ae0de146105c65780632e1a7d4d146105e657806336df83d6146106065780633e0dc34e1461066d57600080fd5b80631bf50af2146105465780631f1fcd51146105665780631fc8bc5d146105865780631fe4a686146105a657600080fd5b8063106fdbd011610396578063106fdbd0146104a957806311588086146104c957806311b0b42d146104ec57806313e120b11461052457600080fd5b806307d3f6c3146103c85780630e5c011e146104675780630e8fbb5a1461048957600080fd5b366103c357005b600080fd5b3480156103d457600080fd5b5061042f60408051606081018252600080825260208201819052918101919091525060408051606081018252600d546001600160a01b039081168252600e549081166020830152600160a01b900460ff169181019190915290565b6040805182516001600160a01b039081168252602080850151909116908201529181015160ff16908201526060015b60405180910390f35b34801561047357600080fd5b50610487610482366004613713565b610c02565b005b34801561049557600080fd5b506104876104a436600461373e565b610cf5565b3480156104b557600080fd5b506104876104c4366004613713565b610d61565b3480156104d557600080fd5b506104de610de0565b60405190815260200161045e565b3480156104f857600080fd5b5060095461050c906001600160a01b031681565b6040516001600160a01b03909116815260200161045e565b34801561053057600080fd5b50610539610e66565b60405161045e919061379f565b34801561055257600080fd5b5061050c6105613660046137b2565b610ec8565b34801561057257600080fd5b50600b5461050c906001600160a01b031681565b34801561059257600080fd5b5060115461050c906001600160a01b031681565b3480156105b257600080fd5b5060045461050c906001600160a01b031681565b3480156105d257600080fd5b5060025461050c906001600160a01b031681565b3480156105f257600080fd5b506104876106013660046137b2565b610ef2565b34801561061257600080fd5b5061042f60408051606081018252600080825260208201819052918101919091525060408051606081018252600f546001600160a01b0390811682526010549081166020830152600160a01b900460ff169181019190915290565b34801561067957600080fd5b506104de60125481565b34801561068f57600080fd5b5061048761069e3660046137b2565b611137565b3480156106af57600080fd5b50610487611205565b3480156106c457600080fd5b5061048761125e565b3480156106d957600080fd5b50610487611349565b3480156106ee57600080fd5b5060065461050c906001600160a01b031681565b34801561070e57600080fd5b506104de61271081565b34801561072457600080fd5b506104876113f9565b34801561073957600080fd5b50600054600160a01b900460ff165b604051901515815260200161045e565b34801561076457600080fd5b5060006104de565b34801561077857600080fd5b50610487610787366004613713565b61142e565b34801561079857600080fd5b5060085461050c9061010090046001600160a01b031681565b3480156107bd57600080fd5b506104876114a6565b3480156107d257600080fd5b506104de6114da565b3480156107e757600080fd5b506104876107f6366004613713565b6114fb565b34801561080757600080fd5b50610487611588565b34801561081c57600080fd5b506013546107489060ff1681565b34801561083657600080fd5b506104de6115d7565b34801561084b57600080fd5b506000546001600160a01b031661050c565b34801561086957600080fd5b5060055461050c906001600160a01b031681565b34801561088957600080fd5b5061050c6108983660046137cb565b611645565b3480156108a957600080fd5b506104de611689565b3480156108be57600080fd5b50600d54600e546108e6916001600160a01b039081169190811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015260ff169082015260600161045e565b34801561091b57600080fd5b506008546107489060ff1681565b34801561093557600080fd5b50610487611999565b34801561094a57600080fd5b50610487610959366004613713565b611a74565b34801561096a57600080fd5b50600f546010546108e6916001600160a01b039081169190811690600160a01b900460ff1683565b34801561099e57600080fd5b506104876109ad3660046137b2565b611aec565b3480156109be57600080fd5b5060035461050c906001600160a01b031681565b3480156109de57600080fd5b506109e7611b9a565b60405161045e9190613845565b348015610a0057600080fd5b5061050c610a0f3660046137b2565b611bd0565b348015610a2057600080fd5b506104de611be0565b348015610a3557600080fd5b50610487610a44366004613713565b611c11565b348015610a5557600080fd5b50610487610a64366004613956565b611ca7565b348015610a7557600080fd5b50610487611d86565b348015610a8a57600080fd5b50610487611eed565b348015610a9f57600080fd5b50610487610aae366004613713565b611f2c565b348015610abf57600080fd5b506104de603281565b348015610ad457600080fd5b50610add611fa4565b60405161045e929190613a1a565b348015610af757600080fd5b506104de61203a565b348015610b0c57600080fd5b50600c5461050c906001600160a01b031681565b348015610b2c57600080fd5b50610539612059565b348015610b4157600080fd5b506104de60145481565b348015610b5757600080fd5b50600a5461050c906001600160a01b031681565b348015610b7757600080fd5b50610487610b86366004613713565b6120b9565b348015610b9757600080fd5b50610ba0612151565b60405161045e9190613a48565b348015610bb957600080fd5b50610487610bc836600461373e565b6121f4565b348015610bd957600080fd5b50610487612246565b348015610bee57600080fd5b5060015461050c906001600160a01b031681565b60085460ff168015610c24575060085461010090046001600160a01b03163b15155b15610ce957600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190613adb565b3a1115610ce95760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b60448201526064015b60405180910390fd5b610cf281612527565b50565b6000546001600160a01b0316331480610d1857506003546001600160a01b031633145b610d345760405162461bcd60e51b8152600401610ce090613af4565b6013805460ff191682151590811790915560ff1615610d5757610cf26000611aec565b610cf2600a611aec565b6000546001600160a01b03163314610d8b5760405162461bcd60e51b8152600401610ce090613b16565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b6011546012546040516393f1a40b60e01b8152600481019190915230602482015260009182916001600160a01b03909116906393f1a40b90604401608060405180830381865afa158015610e38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5c9190613b4b565b5091949350505050565b60606015805480602002602001604051908101604052809291908181526020018280548015610ebe57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ea0575b5050505050905090565b60168181548110610ed857600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610ce090613b81565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f899190613adb565b90508181101561107a576011546012546001600160a01b039091169063441a3e7090610fb58486613bb7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015611053573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110779190613adb565b90505b818111156110855750805b6000546001600160a01b031632148015906110aa5750600054600160a01b900460ff16155b156110dc576000612710600754836110c29190613bce565b6110cc9190613bed565b90506110d88183613bb7565b9150505b600154600b546110f9916001600160a01b03918216911683612678565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d6111226114da565b60405190815260200160405180910390a15050565b6000546001600160a01b031633148061115a57506003546001600160a01b031633145b6111765760405162461bcd60e51b8152600401610ce090613af4565b600654604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b1580156111bc57600080fd5b505af11580156111d0573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f81604051610dd591815260200190565b6000546001600160a01b031633148061122857506003546001600160a01b031633145b6112445760405162461bcd60e51b8152600401610ce090613af4565b61124c6126a8565b611254612745565b61125c611d86565b565b60085460ff168015611280575060085461010090046001600160a01b03163b15155b1561134057600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af11580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe9190613adb565b3a11156113405760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b6044820152606401610ce0565b61125c32612527565b6000546001600160a01b031633148061136c57506003546001600160a01b031633145b6113885760405162461bcd60e51b8152600401610ce090613af4565b611390611588565b601154601254604051632989754760e11b81526001600160a01b0390921691635312ea8e916113c59160040190815260200190565b600060405180830381600087803b1580156113df57600080fd5b505af11580156113f3573d6000803e3d6000fd5b50505050565b60135460ff161561125c576001546001600160a01b031633146113405760405162461bcd60e51b8152600401610ce090613b81565b6000546001600160a01b031633146114585760405162461bcd60e51b8152600401610ce090613b16565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f3090602001610dd5565b6000546001600160a01b031633146114d05760405162461bcd60e51b8152600401610ce090613b16565b61125c6000612871565b60006114e4610de0565b6114ec611be0565b6114f69190613c0f565b905090565b6000546001600160a01b031633148061151e57506003546001600160a01b031633145b61153a5760405162461bcd60e51b8152600401610ce090613af4565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001610dd5565b6000546001600160a01b03163314806115ab57506003546001600160a01b031633145b6115c75760405162461bcd60e51b8152600401610ce090613af4565b6115cf6128c1565b61125c612949565b600654604051636788231160e11b81523060048201526000916001600160a01b03169063cf104622906024015b602060405180830381865afa158015611621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190613adb565b6017828154811061165557600080fd5b90600052602060002001818154811061166d57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600080611694612a10565b90506000806116a1611fa4565b600a546017549294509092506001600160a01b0316906000805b855181101561189957836001600160a01b03168682815181106116e0576116e0613c27565b60200260200101516001600160a01b0316036117225784818151811061170857611708613c27565b60200260200101518261171b9190613c0f565b9150611891565b60005b8381101561188f576017818154811061174057611740613c27565b9060005260206000200160008154811061175c5761175c613c27565b60009182526020909120015487516001600160a01b039091169088908490811061178857611788613c27565b60200260200101516001600160a01b0316036118875760025486516000916001600160a01b03169063d06ca61f908990869081106117c8576117c8613c27565b6020026020010151601785815481106117e3576117e3613c27565b906000526020600020016040518363ffffffff1660e01b815260040161180a929190613c7b565b600060405180830381865afa158015611827573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261184f9190810190613cfa565b905080600182516118609190613bb7565b8151811061187057611870613c27565b6020026020010151846118839190613c0f565b9350505b600101611725565b505b6001016116bb565b50600081156119485760025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f906118d6908690601590600401613c7b565b600060405180830381865afa1580156118f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261191b9190810190613cfa565b9050806001825161192c9190613bb7565b8151811061193c5761193c613c27565b60200260200101519150505b670de0b6b3a76400008760400151670de0b6b3a764000089600001518461196f9190613bce565b6119799190613bed565b6119839190613bce565b61198d9190613bed565b97505050505050505090565b6000546001600160a01b03163314806119bc57506003546001600160a01b031633145b6119d85760405162461bcd60e51b8152600401610ce090613af4565b60178054600091906119ec90600190613bb7565b815481106119fc576119fc613c27565b90600052602060002001600081548110611a1857611a18613c27565b60009182526020822001546002546001600160a01b039182169350611a42928492909116906123c1565b6017805480611a5357611a53613d37565b600190038181906000526020600020016000611a6f919061360c565b905550565b6000546001600160a01b03163314611a9e5760405162461bcd60e51b8152600401610ce090613b16565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001610dd5565b6000546001600160a01b0316331480611b0f57506003546001600160a01b031633145b611b2b5760405162461bcd60e51b8152600401610ce090613af4565b6032811115611b655760405162461bcd60e51b8152600401610ce0906020808252600490820152630216361760e41b604082015260600190565b60078190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af90602001610dd5565b611ba261362a565b6040518060600160405280611bb5612a10565b815260200160008152602001611bc961203a565b9052919050565b60158181548110610ed857600080fd5b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401611604565b6004546001600160a01b03163314611c595760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610ce0565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610dd5565b6000546001600160a01b03163314611cd15760405162461bcd60e51b8152600401610ce090613b16565b6002548151611d17916001600160a01b03169060009084908290611cf757611cf7613c27565b60200260200101516001600160a01b03166123c19092919063ffffffff16565b6002548151611d3f916001600160a01b031690600019908490600090611cf757611cf7613c27565b601780546001810182556000919091528151611d82917fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501906020840190613684565b5050565b600054600160a01b900460ff1615611dd35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ce0565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611e1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e409190613adb565b90508015610cf257601154601254604051631c57762b60e31b81526001600160a01b039092169163e2bbb15891611e84918590600401918252602082015260400190565b600060405180830381600087803b158015611e9e57600080fd5b505af1158015611eb2573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426611edf6114da565b604051908152602001610dd5565b6000546001600160a01b0316331480611f1057506003546001600160a01b031633145b6113405760405162461bcd60e51b8152600401610ce090613af4565b6000546001600160a01b03163314611f565760405162461bcd60e51b8152600401610ce090613b16565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa90602001610dd5565b60115460125460405160016232bd9d60e01b031981526004810191909152306024820152606091829160009182916001600160a01b039091169063ffcd426390604401600060405180830381865afa158015612004573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261202c9190810190613db1565b929792965091945050505050565b60008054600160a01b900460ff16612053575060075490565b50600090565b60606016805480602002602001604051908101604052809291908181526020018280548015610ebe576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610ea0575050505050905090565b6000546001600160a01b031633146120e35760405162461bcd60e51b8152600401610ce090613b16565b6001600160a01b0381166121485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce0565b610cf281612871565b60606017805480602002602001604051908101604052809291908181526020016000905b828210156121eb576000848152602090819020830180546040805182850281018501909152818152928301828280156121d757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121b9575b505050505081526020019060010190612175565b50505050905090565b6000546001600160a01b031633148061221757506003546001600160a01b031633145b6122335760405162461bcd60e51b8152600401610ce090613af4565b6008805460ff1916911515919091179055565b6001546001600160a01b031633146122705760405162461bcd60e51b8152600401610ce090613b81565b601154601254604051632989754760e11b81526001600160a01b0390921691635312ea8e916122a59160040190815260200190565b600060405180830381600087803b1580156122bf57600080fd5b505af11580156122d3573d6000803e3d6000fd5b5050600b546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015612322573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123469190613adb565b600b5460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af115801561239d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d829190613ebf565b80158061243b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612415573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124399190613adb565b155b6124a65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610ce0565b6040516001600160a01b03831660248201526044810182905261250990849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612abb565b505050565b606061251d8484600085612b8d565b90505b9392505050565b601154601254604051631c57762b60e31b81526004810191909152600060248201526001600160a01b039091169063e2bbb15890604401600060405180830381600087803b15801561257857600080fd5b505af115801561258c573d6000803e3d6000fd5b5050600a546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156125db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ff9190613adb565b90508015611d825761261082612cbe565b612618613162565b6000612622611be0565b905061262c611d86565b42601455337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f924108261265b6114da565b6040805192835260208301919091520160405180910390a2505050565b6040516001600160a01b03831660248201526044810182905261250990849063a9059cbb60e01b906064016124d2565b600054600160a01b900460ff166126f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ce0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b601154600b54612764916001600160a01b0391821691166000196123c1565b600254600a54612783916001600160a01b0391821691166000196123c1565b601054600c546127a2916001600160a01b0391821691166000196123c1565b600e54600f546127c1916001600160a01b0391821691166000196123c1565b6017541561125c5760005b601754811015610cf25760025460178054612836926001600160a01b031691600091859081106127fe576127fe613c27565b9060005260206000200160008154811061281a5761281a613c27565b6000918252602090912001546001600160a01b031691906123c1565b6002546017805461285f926001600160a01b03169160001991859081106127fe576127fe613c27565b8061286981613edc565b9150506127cc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561290e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ce0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127283390565b601154600b54612967916001600160a01b03918216911660006123c1565b600254600a54612985916001600160a01b03918216911660006123c1565b601054600c546129a3916001600160a01b03918216911660006123c1565b600e54600f546129c1916001600160a01b03918216911660006123c1565b6017541561125c5760005b601754811015610cf257600254601780546129fe926001600160a01b031691600091859081106127fe576127fe613c27565b80612a0881613edc565b9150506129cc565b612a4b6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b600654604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa158015612a93573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114f69190810190613ef5565b6000612b10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661250e9092919063ffffffff16565b8051909150156125095780806020019051810190612b2e9190613ebf565b6125095760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ce0565b606082471015612bee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ce0565b6001600160a01b0385163b612c455760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ce0565b600080866001600160a01b03168587604051612c619190613fa1565b60006040518083038185875af1925050503d8060008114612c9e576040519150601f19603f3d011682016040523d82523d6000602084013e612ca3565b606091505b5091509150612cb38282866135d3565b979650505050505050565b6000612cc8612a10565b60175490915015612ecc5760175460005b81811015612ec957600060178281548110612cf657612cf6613c27565b90600052602060002001600081548110612d1257612d12613c27565b6000918252602090912001546009546001600160a01b039182169250168103612da857478015612da657600960009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50505050505b505b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e139190613adb565b90508015612ebf57600254601780546001600160a01b03909216916338ed17399184916000919088908110612e4a57612e4a613c27565b9060005260206000200130426040518663ffffffff1660e01b8152600401612e76959493929190613fbd565b6000604051808303816000875af1158015612e95573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ebd9190810190613cfa565b505b5050600101612cd9565b50505b8051600a546040516370a0823160e01b8152306004820152600092670de0b6b3a76400009290916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612f25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f499190613adb565b612f539190613bce565b612f5d9190613bed565b6002546040516338ed173960e01b81529192506001600160a01b0316906338ed173990612f9890849060009060159030904290600401613fbd565b6000604051808303816000875af1158015612fb7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fdf9190810190613cfa565b506009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015613029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304d9190613adb565b90506000670de0b6b3a764000084604001518361306a9190613bce565b6130749190613bed565b60095490915061308e906001600160a01b03168683612678565b6000670de0b6b3a76400008560200151846130a99190613bce565b6130b39190613bed565b6005546009549192506130d3916001600160a01b03908116911683612678565b6000670de0b6b3a76400008660600151856130ee9190613bce565b6130f89190613bed565b600454600954919250613118916001600160a01b03908116911683612678565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a150505050505050565b601054600e54600a546040516370a0823160e01b81523060048201526001600160a01b03938416939283169260009216906370a0823190602401602060405180830381865afa1580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190613adb565b6002546040516338ed173960e01b81529192506001600160a01b0316906338ed17399061321890849060009060169030904290600401613fbd565b6000604051808303816000875af1158015613237573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261325f9190810190613cfa565b506000836001600160a01b031663efeecb516040518163ffffffff1660e01b8152600401602060405180830381865afa1580156132a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c49190613adb565b905060008167ffffffffffffffff8111156132e1576132e16138c2565b60405190808252806020026020018201604052801561330a578160200160208202803683370190505b50600c546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015613354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133789190613adb565b60105482518391600160a01b900460ff1690811061339857613398613c27565b6020908102919091010152604051634d49e87d60e01b81526001600160a01b03861690634d49e87d906133d49084906001904290600401613ff9565b6020604051808303816000875af11580156133f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134179190613adb565b50836001600160a01b031663efeecb516040518163ffffffff1660e01b8152600401602060405180830381865afa158015613456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061347a9190613adb565b91508167ffffffffffffffff811115613495576134956138c2565b6040519080825280602002602001820160405280156134be578160200160208202803683370190505b50600f546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015613508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061352c9190613adb565b600e5482518391600160a01b900460ff1690811061354c5761354c613c27565b6020908102919091010152604051634d49e87d60e01b81526001600160a01b03851690634d49e87d906135889084906001904290600401613ff9565b6020604051808303816000875af11580156135a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cb9190613adb565b505050505050565b606083156135e2575081612520565b8251156135f25782518084602001fd5b8160405162461bcd60e51b8152600401610ce0919061401e565b5080546000825590600052602060002090810190610cf291906136e9565b60405180606001604052806136706040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b8280548282559060005260206000209081019282156136d9579160200282015b828111156136d957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906136a4565b506136e59291506136e9565b5090565b5b808211156136e557600081556001016136ea565b6001600160a01b0381168114610cf257600080fd5b60006020828403121561372557600080fd5b8135612520816136fe565b8015158114610cf257600080fd5b60006020828403121561375057600080fd5b813561252081613730565b600081518084526020808501945080840160005b838110156137945781516001600160a01b03168752958201959082019060010161376f565b509495945050505050565b602081526000612520602083018461375b565b6000602082840312156137c457600080fd5b5035919050565b600080604083850312156137de57600080fd5b50508035926020909101359150565b60005b838110156138085781810151838201526020016137f0565b838111156113f35750506000910152565b600081518084526138318160208601602086016137ed565b601f01601f19169290920160200192915050565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c0610100850152613894610140850182613819565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156138fb576138fb6138c2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561392a5761392a6138c2565b604052919050565b600067ffffffffffffffff82111561394c5761394c6138c2565b5060051b60200190565b6000602080838503121561396957600080fd5b823567ffffffffffffffff81111561398057600080fd5b8301601f8101851361399157600080fd5b80356139a461399f82613932565b613901565b81815260059190911b820183019083810190878311156139c357600080fd5b928401925b82841015612cb35783356139db816136fe565b825292840192908401906139c8565b600081518084526020808501945080840160005b83811015613794578151875295820195908201906001016139fe565b604081526000613a2d604083018561375b565b8281036020840152613a3f81856139ea565b95945050505050565b6000602080830181845280855180835260408601915060408160051b87010192508387016000805b83811015613acd57888603603f19018552825180518088529088019088880190845b81811015613ab75783516001600160a01b03168352928a0192918a0191600101613a92565b5090975050509386019391860191600101613a70565b509398975050505050505050565b600060208284031215613aed57600080fd5b5051919050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060008060808587031215613b6157600080fd5b505082516020840151604085015160609095015191969095509092509050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015613bc957613bc9613ba1565b500390565b6000816000190483118215151615613be857613be8613ba1565b500290565b600082613c0a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115613c2257613c22613ba1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000815480845260208085019450836000528060002060005b838110156137945781546001600160a01b031687529582019560019182019101613c56565b82815260406020820152600061251d6040830184613c3d565b600082601f830112613ca557600080fd5b81516020613cb561399f83613932565b82815260059290921b84018101918181019086841115613cd457600080fd5b8286015b84811015613cef5780518352918301918301613cd8565b509695505050505050565b600060208284031215613d0c57600080fd5b815167ffffffffffffffff811115613d2357600080fd5b613d2f84828501613c94565b949350505050565b634e487b7160e01b600052603160045260246000fd5b600082601f830112613d5e57600080fd5b815167ffffffffffffffff811115613d7857613d786138c2565b613d8b601f8201601f1916602001613901565b818152846020838601011115613da057600080fd5b613d2f8260208301602087016137ed565b60008060008060808587031215613dc757600080fd5b845167ffffffffffffffff80821115613ddf57600080fd5b818701915087601f830112613df357600080fd5b81516020613e0361399f83613932565b82815260059290921b8401810191818101908b841115613e2257600080fd5b948201945b83861015613e49578551613e3a816136fe565b82529482019490820190613e27565b918a0151919850909350505080821115613e6257600080fd5b613e6e88838901613d4d565b94506040870151915080821115613e8457600080fd5b613e9088838901613c94565b93506060870151915080821115613ea657600080fd5b50613eb387828801613c94565b91505092959194509250565b600060208284031215613ed157600080fd5b815161252081613730565b600060018201613eee57613eee613ba1565b5060010190565b600060208284031215613f0757600080fd5b815167ffffffffffffffff80821115613f1f57600080fd5b9083019060c08286031215613f3357600080fd5b613f3b6138d8565b82518152602083015160208201526040830151604082015260608301516060820152608083015182811115613f6f57600080fd5b613f7b87828601613d4d565b60808301525060a08301519250613f9183613730565b60a0810192909252509392505050565b60008251613fb38184602087016137ed565b9190910192915050565b85815284602082015260a060408201526000613fdc60a0830186613c3d565b6001600160a01b0394909416606083015250608001529392505050565b60608152600061400c60608301866139ea565b60208301949094525060400152919050565b602081526000612520602083018461381956fea2646970667358221220484d8a9524e067f1030e3658c9f728acce3e3aadd45fe4249e7e94fae622a4f064736f6c634300080f0033000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a0000000000000000000000000000000000000000000000000000000000000021000000000000000000000000f3a5454496e26ac57da879bf3285fa85debf038800000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000ffbf83be790e184a57584d3faf40505ea1ecab3f000000000000000000000000d0a01ec574d1fc6652edf79cb2f880fd47d34ab10000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b6190000000000000000000000001a2aff8453b211f1fcfe97718a0f23232a6a540300000000000000000000000000aec34489a7ade91a0507b6b9dbb0a50938b7c0000000000000000000000000eeaff5116c09ecc20ab72b53860a7cead97f0ab4000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a000000000000000000000000f0a2ae65342f143fc09c83e5f19b706abb37414d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000b326b5189aa42acaa3c649b120f084ed8f4dcaa6000000000000000000000000b1bc9f56103175193519ae1540a0a4572b1566f600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2000000000000000000000000acc15dc74880c9944775448304b263d191c6077f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2000000000000000000000000acc15dc74880c9944775448304b263d191c6077f000000000000000000000000931715fee2d06333043d11f658c8ce934ac61d0c

Deployed Bytecode

0x6080604052600436106103bc5760003560e01c80638cfc0250116101f2578063cc2894801161010d578063eb1319b1116100a0578063fa5c9edd1161006f578063fa5c9edd14610b8b578063fad4675e14610bad578063fb61778714610bcd578063fbfa77cf14610be257600080fd5b8063eb1319b114610b20578063f1a392da14610b35578063f20eaeb814610b4b578063f2fde38b14610b6b57600080fd5b8063dfbdc437116100dc578063dfbdc43714610ab3578063e7a7250a14610ac8578063e941fa7814610aeb578063eaed3f4f14610b0057600080fd5b8063cc28948014610a49578063d0e30db014610a69578063d801d94614610a7e578063d92f3d7314610a9357600080fd5b8063a68833e511610185578063b20feaaf11610154578063b20feaaf146109d2578063be12a978146109f4578063c1a3d44c14610a14578063c7b9d53014610a2957600080fd5b8063a68833e51461093e578063a7700b151461095e578063ac1e502514610992578063aced1661146109b257600080fd5b806397fd323d116101c157806397fd323d1461089d578063990d60d2146108b25780639f8b5da11461090f578063a39219f91461092957600080fd5b80638cfc02501461082a5780638da5cb5b1461083f5780638e1454591461085d57806396813fca1461087d57600080fd5b80633e55f932116102e257806367a5279311610275578063722713f711610244578063722713f7146107c6578063748747e6146107db5780638456cb59146107fb5780638912cb8b1461081057600080fd5b806367a52793146107585780636817031b1461076c5780636ec232d31461078c578063715018a6146107b157600080fd5b80634746fb55116102b15780634746fb55146106e257806354518b1a14610702578063573fef0a146107185780635c975abb1461072d57600080fd5b80633e55f932146106835780633f4ba83a146106a35780634641257d146106b85780634700d305146106cd57600080fd5b80631bf50af21161035a578063257ae0de11610329578063257ae0de146105c65780632e1a7d4d146105e657806336df83d6146106065780633e0dc34e1461066d57600080fd5b80631bf50af2146105465780631f1fcd51146105665780631fc8bc5d146105865780631fe4a686146105a657600080fd5b8063106fdbd011610396578063106fdbd0146104a957806311588086146104c957806311b0b42d146104ec57806313e120b11461052457600080fd5b806307d3f6c3146103c85780630e5c011e146104675780630e8fbb5a1461048957600080fd5b366103c357005b600080fd5b3480156103d457600080fd5b5061042f60408051606081018252600080825260208201819052918101919091525060408051606081018252600d546001600160a01b039081168252600e549081166020830152600160a01b900460ff169181019190915290565b6040805182516001600160a01b039081168252602080850151909116908201529181015160ff16908201526060015b60405180910390f35b34801561047357600080fd5b50610487610482366004613713565b610c02565b005b34801561049557600080fd5b506104876104a436600461373e565b610cf5565b3480156104b557600080fd5b506104876104c4366004613713565b610d61565b3480156104d557600080fd5b506104de610de0565b60405190815260200161045e565b3480156104f857600080fd5b5060095461050c906001600160a01b031681565b6040516001600160a01b03909116815260200161045e565b34801561053057600080fd5b50610539610e66565b60405161045e919061379f565b34801561055257600080fd5b5061050c6105613660046137b2565b610ec8565b34801561057257600080fd5b50600b5461050c906001600160a01b031681565b34801561059257600080fd5b5060115461050c906001600160a01b031681565b3480156105b257600080fd5b5060045461050c906001600160a01b031681565b3480156105d257600080fd5b5060025461050c906001600160a01b031681565b3480156105f257600080fd5b506104876106013660046137b2565b610ef2565b34801561061257600080fd5b5061042f60408051606081018252600080825260208201819052918101919091525060408051606081018252600f546001600160a01b0390811682526010549081166020830152600160a01b900460ff169181019190915290565b34801561067957600080fd5b506104de60125481565b34801561068f57600080fd5b5061048761069e3660046137b2565b611137565b3480156106af57600080fd5b50610487611205565b3480156106c457600080fd5b5061048761125e565b3480156106d957600080fd5b50610487611349565b3480156106ee57600080fd5b5060065461050c906001600160a01b031681565b34801561070e57600080fd5b506104de61271081565b34801561072457600080fd5b506104876113f9565b34801561073957600080fd5b50600054600160a01b900460ff165b604051901515815260200161045e565b34801561076457600080fd5b5060006104de565b34801561077857600080fd5b50610487610787366004613713565b61142e565b34801561079857600080fd5b5060085461050c9061010090046001600160a01b031681565b3480156107bd57600080fd5b506104876114a6565b3480156107d257600080fd5b506104de6114da565b3480156107e757600080fd5b506104876107f6366004613713565b6114fb565b34801561080757600080fd5b50610487611588565b34801561081c57600080fd5b506013546107489060ff1681565b34801561083657600080fd5b506104de6115d7565b34801561084b57600080fd5b506000546001600160a01b031661050c565b34801561086957600080fd5b5060055461050c906001600160a01b031681565b34801561088957600080fd5b5061050c6108983660046137cb565b611645565b3480156108a957600080fd5b506104de611689565b3480156108be57600080fd5b50600d54600e546108e6916001600160a01b039081169190811690600160a01b900460ff1683565b604080516001600160a01b03948516815293909216602084015260ff169082015260600161045e565b34801561091b57600080fd5b506008546107489060ff1681565b34801561093557600080fd5b50610487611999565b34801561094a57600080fd5b50610487610959366004613713565b611a74565b34801561096a57600080fd5b50600f546010546108e6916001600160a01b039081169190811690600160a01b900460ff1683565b34801561099e57600080fd5b506104876109ad3660046137b2565b611aec565b3480156109be57600080fd5b5060035461050c906001600160a01b031681565b3480156109de57600080fd5b506109e7611b9a565b60405161045e9190613845565b348015610a0057600080fd5b5061050c610a0f3660046137b2565b611bd0565b348015610a2057600080fd5b506104de611be0565b348015610a3557600080fd5b50610487610a44366004613713565b611c11565b348015610a5557600080fd5b50610487610a64366004613956565b611ca7565b348015610a7557600080fd5b50610487611d86565b348015610a8a57600080fd5b50610487611eed565b348015610a9f57600080fd5b50610487610aae366004613713565b611f2c565b348015610abf57600080fd5b506104de603281565b348015610ad457600080fd5b50610add611fa4565b60405161045e929190613a1a565b348015610af757600080fd5b506104de61203a565b348015610b0c57600080fd5b50600c5461050c906001600160a01b031681565b348015610b2c57600080fd5b50610539612059565b348015610b4157600080fd5b506104de60145481565b348015610b5757600080fd5b50600a5461050c906001600160a01b031681565b348015610b7757600080fd5b50610487610b86366004613713565b6120b9565b348015610b9757600080fd5b50610ba0612151565b60405161045e9190613a48565b348015610bb957600080fd5b50610487610bc836600461373e565b6121f4565b348015610bd957600080fd5b50610487612246565b348015610bee57600080fd5b5060015461050c906001600160a01b031681565b60085460ff168015610c24575060085461010090046001600160a01b03163b15155b15610ce957600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca29190613adb565b3a1115610ce95760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b60448201526064015b60405180910390fd5b610cf281612527565b50565b6000546001600160a01b0316331480610d1857506003546001600160a01b031633145b610d345760405162461bcd60e51b8152600401610ce090613af4565b6013805460ff191682151590811790915560ff1615610d5757610cf26000611aec565b610cf2600a611aec565b6000546001600160a01b03163314610d8b5760405162461bcd60e51b8152600401610ce090613b16565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b6011546012546040516393f1a40b60e01b8152600481019190915230602482015260009182916001600160a01b03909116906393f1a40b90604401608060405180830381865afa158015610e38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5c9190613b4b565b5091949350505050565b60606015805480602002602001604051908101604052809291908181526020018280548015610ebe57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ea0575b5050505050905090565b60168181548110610ed857600080fd5b6000918252602090912001546001600160a01b0316905081565b6001546001600160a01b03163314610f1c5760405162461bcd60e51b8152600401610ce090613b81565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610f65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f899190613adb565b90508181101561107a576011546012546001600160a01b039091169063441a3e7090610fb58486613bb7565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015610ff357600080fd5b505af1158015611007573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015611053573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110779190613adb565b90505b818111156110855750805b6000546001600160a01b031632148015906110aa5750600054600160a01b900460ff16155b156110dc576000612710600754836110c29190613bce565b6110cc9190613bed565b90506110d88183613bb7565b9150505b600154600b546110f9916001600160a01b03918216911683612678565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d6111226114da565b60405190815260200160405180910390a15050565b6000546001600160a01b031633148061115a57506003546001600160a01b031633145b6111765760405162461bcd60e51b8152600401610ce090613af4565b600654604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b1580156111bc57600080fd5b505af11580156111d0573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f81604051610dd591815260200190565b6000546001600160a01b031633148061122857506003546001600160a01b031633145b6112445760405162461bcd60e51b8152600401610ce090613af4565b61124c6126a8565b611254612745565b61125c611d86565b565b60085460ff168015611280575060085461010090046001600160a01b03163b15155b1561134057600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af11580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe9190613adb565b3a11156113405760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b6044820152606401610ce0565b61125c32612527565b6000546001600160a01b031633148061136c57506003546001600160a01b031633145b6113885760405162461bcd60e51b8152600401610ce090613af4565b611390611588565b601154601254604051632989754760e11b81526001600160a01b0390921691635312ea8e916113c59160040190815260200190565b600060405180830381600087803b1580156113df57600080fd5b505af11580156113f3573d6000803e3d6000fd5b50505050565b60135460ff161561125c576001546001600160a01b031633146113405760405162461bcd60e51b8152600401610ce090613b81565b6000546001600160a01b031633146114585760405162461bcd60e51b8152600401610ce090613b16565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f3090602001610dd5565b6000546001600160a01b031633146114d05760405162461bcd60e51b8152600401610ce090613b16565b61125c6000612871565b60006114e4610de0565b6114ec611be0565b6114f69190613c0f565b905090565b6000546001600160a01b031633148061151e57506003546001600160a01b031633145b61153a5760405162461bcd60e51b8152600401610ce090613af4565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001610dd5565b6000546001600160a01b03163314806115ab57506003546001600160a01b031633145b6115c75760405162461bcd60e51b8152600401610ce090613af4565b6115cf6128c1565b61125c612949565b600654604051636788231160e11b81523060048201526000916001600160a01b03169063cf104622906024015b602060405180830381865afa158015611621573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f69190613adb565b6017828154811061165557600080fd5b90600052602060002001818154811061166d57600080fd5b6000918252602090912001546001600160a01b03169150829050565b600080611694612a10565b90506000806116a1611fa4565b600a546017549294509092506001600160a01b0316906000805b855181101561189957836001600160a01b03168682815181106116e0576116e0613c27565b60200260200101516001600160a01b0316036117225784818151811061170857611708613c27565b60200260200101518261171b9190613c0f565b9150611891565b60005b8381101561188f576017818154811061174057611740613c27565b9060005260206000200160008154811061175c5761175c613c27565b60009182526020909120015487516001600160a01b039091169088908490811061178857611788613c27565b60200260200101516001600160a01b0316036118875760025486516000916001600160a01b03169063d06ca61f908990869081106117c8576117c8613c27565b6020026020010151601785815481106117e3576117e3613c27565b906000526020600020016040518363ffffffff1660e01b815260040161180a929190613c7b565b600060405180830381865afa158015611827573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261184f9190810190613cfa565b905080600182516118609190613bb7565b8151811061187057611870613c27565b6020026020010151846118839190613c0f565b9350505b600101611725565b505b6001016116bb565b50600081156119485760025460405163d06ca61f60e01b81526000916001600160a01b03169063d06ca61f906118d6908690601590600401613c7b565b600060405180830381865afa1580156118f3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261191b9190810190613cfa565b9050806001825161192c9190613bb7565b8151811061193c5761193c613c27565b60200260200101519150505b670de0b6b3a76400008760400151670de0b6b3a764000089600001518461196f9190613bce565b6119799190613bed565b6119839190613bce565b61198d9190613bed565b97505050505050505090565b6000546001600160a01b03163314806119bc57506003546001600160a01b031633145b6119d85760405162461bcd60e51b8152600401610ce090613af4565b60178054600091906119ec90600190613bb7565b815481106119fc576119fc613c27565b90600052602060002001600081548110611a1857611a18613c27565b60009182526020822001546002546001600160a01b039182169350611a42928492909116906123c1565b6017805480611a5357611a53613d37565b600190038181906000526020600020016000611a6f919061360c565b905550565b6000546001600160a01b03163314611a9e5760405162461bcd60e51b8152600401610ce090613b16565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001610dd5565b6000546001600160a01b0316331480611b0f57506003546001600160a01b031633145b611b2b5760405162461bcd60e51b8152600401610ce090613af4565b6032811115611b655760405162461bcd60e51b8152600401610ce0906020808252600490820152630216361760e41b604082015260600190565b60078190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af90602001610dd5565b611ba261362a565b6040518060600160405280611bb5612a10565b815260200160008152602001611bc961203a565b9052919050565b60158181548110610ed857600080fd5b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401611604565b6004546001600160a01b03163314611c595760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610ce0565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610dd5565b6000546001600160a01b03163314611cd15760405162461bcd60e51b8152600401610ce090613b16565b6002548151611d17916001600160a01b03169060009084908290611cf757611cf7613c27565b60200260200101516001600160a01b03166123c19092919063ffffffff16565b6002548151611d3f916001600160a01b031690600019908490600090611cf757611cf7613c27565b601780546001810182556000919091528151611d82917fc624b66cc0138b8fabc209247f72d758e1cf3343756d543badbf24212bed8c1501906020840190613684565b5050565b600054600160a01b900460ff1615611dd35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ce0565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611e1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e409190613adb565b90508015610cf257601154601254604051631c57762b60e31b81526001600160a01b039092169163e2bbb15891611e84918590600401918252602082015260400190565b600060405180830381600087803b158015611e9e57600080fd5b505af1158015611eb2573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e38426611edf6114da565b604051908152602001610dd5565b6000546001600160a01b0316331480611f1057506003546001600160a01b031633145b6113405760405162461bcd60e51b8152600401610ce090613af4565b6000546001600160a01b03163314611f565760405162461bcd60e51b8152600401610ce090613b16565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa90602001610dd5565b60115460125460405160016232bd9d60e01b031981526004810191909152306024820152606091829160009182916001600160a01b039091169063ffcd426390604401600060405180830381865afa158015612004573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261202c9190810190613db1565b929792965091945050505050565b60008054600160a01b900460ff16612053575060075490565b50600090565b60606016805480602002602001604051908101604052809291908181526020018280548015610ebe576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610ea0575050505050905090565b6000546001600160a01b031633146120e35760405162461bcd60e51b8152600401610ce090613b16565b6001600160a01b0381166121485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ce0565b610cf281612871565b60606017805480602002602001604051908101604052809291908181526020016000905b828210156121eb576000848152602090819020830180546040805182850281018501909152818152928301828280156121d757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116121b9575b505050505081526020019060010190612175565b50505050905090565b6000546001600160a01b031633148061221757506003546001600160a01b031633145b6122335760405162461bcd60e51b8152600401610ce090613af4565b6008805460ff1916911515919091179055565b6001546001600160a01b031633146122705760405162461bcd60e51b8152600401610ce090613b81565b601154601254604051632989754760e11b81526001600160a01b0390921691635312ea8e916122a59160040190815260200190565b600060405180830381600087803b1580156122bf57600080fd5b505af11580156122d3573d6000803e3d6000fd5b5050600b546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015612322573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123469190613adb565b600b5460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af115801561239d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d829190613ebf565b80158061243b5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015612415573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124399190613adb565b155b6124a65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610ce0565b6040516001600160a01b03831660248201526044810182905261250990849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612abb565b505050565b606061251d8484600085612b8d565b90505b9392505050565b601154601254604051631c57762b60e31b81526004810191909152600060248201526001600160a01b039091169063e2bbb15890604401600060405180830381600087803b15801561257857600080fd5b505af115801561258c573d6000803e3d6000fd5b5050600a546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa1580156125db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125ff9190613adb565b90508015611d825761261082612cbe565b612618613162565b6000612622611be0565b905061262c611d86565b42601455337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f924108261265b6114da565b6040805192835260208301919091520160405180910390a2505050565b6040516001600160a01b03831660248201526044810182905261250990849063a9059cbb60e01b906064016124d2565b600054600160a01b900460ff166126f85760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ce0565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b601154600b54612764916001600160a01b0391821691166000196123c1565b600254600a54612783916001600160a01b0391821691166000196123c1565b601054600c546127a2916001600160a01b0391821691166000196123c1565b600e54600f546127c1916001600160a01b0391821691166000196123c1565b6017541561125c5760005b601754811015610cf25760025460178054612836926001600160a01b031691600091859081106127fe576127fe613c27565b9060005260206000200160008154811061281a5761281a613c27565b6000918252602090912001546001600160a01b031691906123c1565b6002546017805461285f926001600160a01b03169160001991859081106127fe576127fe613c27565b8061286981613edc565b9150506127cc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff161561290e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ce0565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586127283390565b601154600b54612967916001600160a01b03918216911660006123c1565b600254600a54612985916001600160a01b03918216911660006123c1565b601054600c546129a3916001600160a01b03918216911660006123c1565b600e54600f546129c1916001600160a01b03918216911660006123c1565b6017541561125c5760005b601754811015610cf257600254601780546129fe926001600160a01b031691600091859081106127fe576127fe613c27565b80612a0881613edc565b9150506129cc565b612a4b6040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b600654604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa158015612a93573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526114f69190810190613ef5565b6000612b10826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661250e9092919063ffffffff16565b8051909150156125095780806020019051810190612b2e9190613ebf565b6125095760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ce0565b606082471015612bee5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ce0565b6001600160a01b0385163b612c455760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ce0565b600080866001600160a01b03168587604051612c619190613fa1565b60006040518083038185875af1925050503d8060008114612c9e576040519150601f19603f3d011682016040523d82523d6000602084013e612ca3565b606091505b5091509150612cb38282866135d3565b979650505050505050565b6000612cc8612a10565b60175490915015612ecc5760175460005b81811015612ec957600060178281548110612cf657612cf6613c27565b90600052602060002001600081548110612d1257612d12613c27565b6000918252602090912001546009546001600160a01b039182169250168103612da857478015612da657600960009054906101000a90046001600160a01b03166001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b158015612d8c57600080fd5b505af1158015612da0573d6000803e3d6000fd5b50505050505b505b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015612def573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e139190613adb565b90508015612ebf57600254601780546001600160a01b03909216916338ed17399184916000919088908110612e4a57612e4a613c27565b9060005260206000200130426040518663ffffffff1660e01b8152600401612e76959493929190613fbd565b6000604051808303816000875af1158015612e95573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612ebd9190810190613cfa565b505b5050600101612cd9565b50505b8051600a546040516370a0823160e01b8152306004820152600092670de0b6b3a76400009290916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612f25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f499190613adb565b612f539190613bce565b612f5d9190613bed565b6002546040516338ed173960e01b81529192506001600160a01b0316906338ed173990612f9890849060009060159030904290600401613fbd565b6000604051808303816000875af1158015612fb7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612fdf9190810190613cfa565b506009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015613029573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061304d9190613adb565b90506000670de0b6b3a764000084604001518361306a9190613bce565b6130749190613bed565b60095490915061308e906001600160a01b03168683612678565b6000670de0b6b3a76400008560200151846130a99190613bce565b6130b39190613bed565b6005546009549192506130d3916001600160a01b03908116911683612678565b6000670de0b6b3a76400008660600151856130ee9190613bce565b6130f89190613bed565b600454600954919250613118916001600160a01b03908116911683612678565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a150505050505050565b601054600e54600a546040516370a0823160e01b81523060048201526001600160a01b03938416939283169260009216906370a0823190602401602060405180830381865afa1580156131b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131dd9190613adb565b6002546040516338ed173960e01b81529192506001600160a01b0316906338ed17399061321890849060009060169030904290600401613fbd565b6000604051808303816000875af1158015613237573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261325f9190810190613cfa565b506000836001600160a01b031663efeecb516040518163ffffffff1660e01b8152600401602060405180830381865afa1580156132a0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132c49190613adb565b905060008167ffffffffffffffff8111156132e1576132e16138c2565b60405190808252806020026020018201604052801561330a578160200160208202803683370190505b50600c546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015613354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906133789190613adb565b60105482518391600160a01b900460ff1690811061339857613398613c27565b6020908102919091010152604051634d49e87d60e01b81526001600160a01b03861690634d49e87d906133d49084906001904290600401613ff9565b6020604051808303816000875af11580156133f3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134179190613adb565b50836001600160a01b031663efeecb516040518163ffffffff1660e01b8152600401602060405180830381865afa158015613456573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061347a9190613adb565b91508167ffffffffffffffff811115613495576134956138c2565b6040519080825280602002602001820160405280156134be578160200160208202803683370190505b50600f546040516370a0823160e01b81523060048201529192506001600160a01b0316906370a0823190602401602060405180830381865afa158015613508573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061352c9190613adb565b600e5482518391600160a01b900460ff1690811061354c5761354c613c27565b6020908102919091010152604051634d49e87d60e01b81526001600160a01b03851690634d49e87d906135889084906001904290600401613ff9565b6020604051808303816000875af11580156135a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135cb9190613adb565b505050505050565b606083156135e2575081612520565b8251156135f25782518084602001fd5b8160405162461bcd60e51b8152600401610ce0919061401e565b5080546000825590600052602060002090810190610cf291906136e9565b60405180606001604052806136706040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b815260200160008152602001600081525090565b8280548282559060005260206000209081019282156136d9579160200282015b828111156136d957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906136a4565b506136e59291506136e9565b5090565b5b808211156136e557600081556001016136ea565b6001600160a01b0381168114610cf257600080fd5b60006020828403121561372557600080fd5b8135612520816136fe565b8015158114610cf257600080fd5b60006020828403121561375057600080fd5b813561252081613730565b600081518084526020808501945080840160005b838110156137945781516001600160a01b03168752958201959082019060010161376f565b509495945050505050565b602081526000612520602083018461375b565b6000602082840312156137c457600080fd5b5035919050565b600080604083850312156137de57600080fd5b50508035926020909101359150565b60005b838110156138085781810151838201526020016137f0565b838111156113f35750506000910152565b600081518084526138318160208601602086016137ed565b601f01601f19169290920160200192915050565b60208152600082516060602084015280516080840152602081015160a0840152604081015160c0840152606081015160e0840152608081015160c0610100850152613894610140850182613819565b905060a082015115156101208501526020850151604085015260408501516060850152809250505092915050565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff811182821017156138fb576138fb6138c2565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561392a5761392a6138c2565b604052919050565b600067ffffffffffffffff82111561394c5761394c6138c2565b5060051b60200190565b6000602080838503121561396957600080fd5b823567ffffffffffffffff81111561398057600080fd5b8301601f8101851361399157600080fd5b80356139a461399f82613932565b613901565b81815260059190911b820183019083810190878311156139c357600080fd5b928401925b82841015612cb35783356139db816136fe565b825292840192908401906139c8565b600081518084526020808501945080840160005b83811015613794578151875295820195908201906001016139fe565b604081526000613a2d604083018561375b565b8281036020840152613a3f81856139ea565b95945050505050565b6000602080830181845280855180835260408601915060408160051b87010192508387016000805b83811015613acd57888603603f19018552825180518088529088019088880190845b81811015613ab75783516001600160a01b03168352928a0192918a0191600101613a92565b5090975050509386019391860191600101613a70565b509398975050505050505050565b600060208284031215613aed57600080fd5b5051919050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060008060808587031215613b6157600080fd5b505082516020840151604085015160609095015191969095509092509050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015613bc957613bc9613ba1565b500390565b6000816000190483118215151615613be857613be8613ba1565b500290565b600082613c0a57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115613c2257613c22613ba1565b500190565b634e487b7160e01b600052603260045260246000fd5b6000815480845260208085019450836000528060002060005b838110156137945781546001600160a01b031687529582019560019182019101613c56565b82815260406020820152600061251d6040830184613c3d565b600082601f830112613ca557600080fd5b81516020613cb561399f83613932565b82815260059290921b84018101918181019086841115613cd457600080fd5b8286015b84811015613cef5780518352918301918301613cd8565b509695505050505050565b600060208284031215613d0c57600080fd5b815167ffffffffffffffff811115613d2357600080fd5b613d2f84828501613c94565b949350505050565b634e487b7160e01b600052603160045260246000fd5b600082601f830112613d5e57600080fd5b815167ffffffffffffffff811115613d7857613d786138c2565b613d8b601f8201601f1916602001613901565b818152846020838601011115613da057600080fd5b613d2f8260208301602087016137ed565b60008060008060808587031215613dc757600080fd5b845167ffffffffffffffff80821115613ddf57600080fd5b818701915087601f830112613df357600080fd5b81516020613e0361399f83613932565b82815260059290921b8401810191818101908b841115613e2257600080fd5b948201945b83861015613e49578551613e3a816136fe565b82529482019490820190613e27565b918a0151919850909350505080821115613e6257600080fd5b613e6e88838901613d4d565b94506040870151915080821115613e8457600080fd5b613e9088838901613c94565b93506060870151915080821115613ea657600080fd5b50613eb387828801613c94565b91505092959194509250565b600060208284031215613ed157600080fd5b815161252081613730565b600060018201613eee57613eee613ba1565b5060010190565b600060208284031215613f0757600080fd5b815167ffffffffffffffff80821115613f1f57600080fd5b9083019060c08286031215613f3357600080fd5b613f3b6138d8565b82518152602083015160208201526040830151604082015260608301516060820152608083015182811115613f6f57600080fd5b613f7b87828601613d4d565b60808301525060a08301519250613f9183613730565b60a0810192909252509392505050565b60008251613fb38184602087016137ed565b9190910192915050565b85815284602082015260a060408201526000613fdc60a0830186613c3d565b6001600160a01b0394909416606083015250608001529392505050565b60608152600061400c60608301866139ea565b60208301949094525060400152919050565b602081526000612520602083018461381956fea2646970667358221220484d8a9524e067f1030e3658c9f728acce3e3aadd45fe4249e7e94fae622a4f064736f6c634300080f0033

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

000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a0000000000000000000000000000000000000000000000000000000000000021000000000000000000000000f3a5454496e26ac57da879bf3285fa85debf038800000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000ffbf83be790e184a57584d3faf40505ea1ecab3f000000000000000000000000d0a01ec574d1fc6652edf79cb2f880fd47d34ab10000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b6190000000000000000000000001a2aff8453b211f1fcfe97718a0f23232a6a540300000000000000000000000000aec34489a7ade91a0507b6b9dbb0a50938b7c0000000000000000000000000eeaff5116c09ecc20ab72b53860a7cead97f0ab4000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a000000000000000000000000f0a2ae65342f143fc09c83e5f19b706abb37414d0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000b326b5189aa42acaa3c649b120f084ed8f4dcaa6000000000000000000000000b1bc9f56103175193519ae1540a0a4572b1566f600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2000000000000000000000000acc15dc74880c9944775448304b263d191c6077f00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2000000000000000000000000acc15dc74880c9944775448304b263d191c6077f000000000000000000000000931715fee2d06333043d11f658c8ce934ac61d0c

-----Decoded View---------------
Arg [0] : _want (address): 0xEceab9F0FcF15Fddbffbd7baE2cEB78CD57b879a
Arg [1] : _poolId (uint256): 33
Arg [2] : _chef (address): 0xF3a5454496E26ac57da879bf3285Fa85DEBF0388
Arg [3] : _metapoolAndRouter (address[]): 0xEceab9F0FcF15Fddbffbd7baE2cEB78CD57b879a,0xF0A2ae65342f143fc09c83E5f19b706aBB37414D
Arg [4] : _basepoolAndRouter (address[]): 0xB326b5189AA42Acaa3C649B120f084Ed8F4dCaA6,0xB1BC9f56103175193519Ae1540A0A4572b1566F6
Arg [5] : _commonAddresses (tuple):
Arg [1] : vault (address): 0xffbf83be790e184a57584d3faF40505eA1ECab3f
Arg [2] : unirouter (address): 0xd0A01ec574D1fC6652eDF79cb2F880fd47D34Ab1
Arg [3] : keeper (address): 0x4fED5491693007f0CD49f4614FFC38Ab6A04B619
Arg [4] : strategist (address): 0x1A2aff8453b211F1fcFE97718A0f23232A6A5403
Arg [5] : beefyFeeRecipient (address): 0x00AeC34489A7ADE91A0507B6b9dBb0a50938B7c0
Arg [6] : beefyFeeConfig (address): 0xeEaFF5116C09ECc20Ab72b53860A7ceAd97F0Ab4

Arg [6] : _outputToNativeRoute (address[]): 0x0E358838ce72d5e61E0018a2ffaC4bEC5F4c88d2,0xAcc15dC74880C9944775448304B263D191c6077F
Arg [7] : _outputToInputRoute (address[]): 0x0E358838ce72d5e61E0018a2ffaC4bEC5F4c88d2,0xAcc15dC74880C9944775448304B263D191c6077F,0x931715FEE2d06333043d11F658C8CE934aC61D0c

-----Encoded View---------------
26 Constructor Arguments found :
Arg [0] : 000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000021
Arg [2] : 000000000000000000000000f3a5454496e26ac57da879bf3285fa85debf0388
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000200
Arg [5] : 000000000000000000000000ffbf83be790e184a57584d3faf40505ea1ecab3f
Arg [6] : 000000000000000000000000d0a01ec574d1fc6652edf79cb2f880fd47d34ab1
Arg [7] : 0000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b619
Arg [8] : 0000000000000000000000001a2aff8453b211f1fcfe97718a0f23232a6a5403
Arg [9] : 00000000000000000000000000aec34489a7ade91a0507b6b9dbb0a50938b7c0
Arg [10] : 000000000000000000000000eeaff5116c09ecc20ab72b53860a7cead97f0ab4
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [12] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [14] : 000000000000000000000000eceab9f0fcf15fddbffbd7bae2ceb78cd57b879a
Arg [15] : 000000000000000000000000f0a2ae65342f143fc09c83e5f19b706abb37414d
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [17] : 000000000000000000000000b326b5189aa42acaa3c649b120f084ed8f4dcaa6
Arg [18] : 000000000000000000000000b1bc9f56103175193519ae1540a0a4572b1566f6
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [20] : 0000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2
Arg [21] : 000000000000000000000000acc15dc74880c9944775448304b263d191c6077f
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [23] : 0000000000000000000000000e358838ce72d5e61e0018a2ffac4bec5f4c88d2
Arg [24] : 000000000000000000000000acc15dc74880c9944775448304b263d191c6077f
Arg [25] : 000000000000000000000000931715fee2d06333043d11f658c8ce934ac61d0c


Block Transaction Gas Used Reward
view all blocks collator

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

OVERVIEW

Strategy for stellaswap-mai4pool

Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.