ETH Price: $2,338.46 (-1.10%)
 

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Panic1289027692024-12-05 13:11:55503 days ago1733404315IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000013996470.00100037
Harvest1238136032024-08-09 17:53:03621 days ago1723225983IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000006551590.00117217
Harvest1219115472024-06-26 17:11:11665 days ago1719421871IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000401578510.07672713
Unpause1219106102024-06-26 16:39:57665 days ago1719419997IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000121082460.06129285
Panic1217421402024-06-22 19:04:17669 days ago1719083057IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000062314350.06110835
Harvest1212510042024-06-11 10:13:05680 days ago1718100785IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000404523640.07758626
Harvest1212059732024-06-10 9:12:03681 days ago1718010723IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000397827940.07635825
Harvest1211609992024-06-09 8:12:55682 days ago1717920775IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000401890430.07714322
Harvest1209611742024-06-04 17:12:05687 days ago1717521125IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000399652110.07663528
Harvest1206893252024-05-29 10:10:27693 days ago1716977427IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000401416290.07634774
Harvest1205993382024-05-27 8:10:53695 days ago1716797453IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000400824660.07691268
Harvest1204427482024-05-23 17:11:13699 days ago1716484273IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000392353630.07525902
Harvest1202069722024-05-18 6:12:01704 days ago1716012721IN
0xd9c451d0...46AcF5B3E
0 ETH0.000003917710.00689704
Harvest1200720262024-05-15 3:13:49708 days ago1715742829IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000050195320.00909077
Harvest1200071992024-05-13 15:12:55709 days ago1715613175IN
0xd9c451d0...46AcF5B3E
0 ETH0.000043689770.07747339
Harvest1199622302024-05-12 14:13:57710 days ago1715523237IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000421872810.07721198
Harvest1199172232024-05-11 13:13:43711 days ago1715433223IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000401176540.07632512
Harvest1197713742024-05-08 4:12:05714 days ago1715141525IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000422224650.07676389
Harvest1192169792024-04-25 8:12:15727 days ago1714032735IN
0xd9c451d0...46AcF5B3E
0 ETH0.000041160320.07719247
Harvest1191611402024-04-24 1:10:57729 days ago1713921057IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000433693060.07644998
Harvest1191161542024-04-23 0:11:25730 days ago1713831085IN
0xd9c451d0...46AcF5B3E
0 ETH0.00004505140.07635241
Harvest1190333522024-04-21 2:11:21732 days ago1713665481IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000052738530.00949941
Harvest1189883682024-04-20 1:11:53733 days ago1713575513IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000082942790.01524977
Harvest1189433782024-04-19 0:12:13734 days ago1713485533IN
0xd9c451d0...46AcF5B3E
0 ETH0.0000106998080.01817098
Harvest1188983872024-04-17 23:12:31735 days ago1713395551IN
0xd9c451d0...46AcF5B3E
0 ETH0.000049623140.07791024
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
1245541762024-08-26 21:18:49604 days ago1724707129
0xd9c451d0...46AcF5B3E
0.001411435138478 ETH
1245541762024-08-26 21:18:49604 days ago1724707129
0xd9c451d0...46AcF5B3E
0.001411435138478 ETH
1245370782024-08-26 11:48:53604 days ago1724672933
0xd9c451d0...46AcF5B3E
0.00092128090632 ETH
1245370782024-08-26 11:48:53604 days ago1724672933
0xd9c451d0...46AcF5B3E
0.00092128090632 ETH
1245293362024-08-26 7:30:49604 days ago1724657449
0xd9c451d0...46AcF5B3E
0.000862912617132 ETH
1245293362024-08-26 7:30:49604 days ago1724657449
0xd9c451d0...46AcF5B3E
0.000862912617132 ETH
1245221412024-08-26 3:30:59604 days ago1724643059
0xd9c451d0...46AcF5B3E
0.001140753319192 ETH
1245221412024-08-26 3:30:59604 days ago1724643059
0xd9c451d0...46AcF5B3E
0.001140753319192 ETH
1245126562024-08-25 22:14:49605 days ago1724624089
0xd9c451d0...46AcF5B3E
0.00043989089541 ETH
1245126562024-08-25 22:14:49605 days ago1724624089
0xd9c451d0...46AcF5B3E
0.00043989089541 ETH
1245089952024-08-25 20:12:47605 days ago1724616767
0xd9c451d0...46AcF5B3E
0.00008843397274 ETH
1245089952024-08-25 20:12:47605 days ago1724616767
0xd9c451d0...46AcF5B3E
0.00008843397274 ETH
1245082542024-08-25 19:48:05605 days ago1724615285
0xd9c451d0...46AcF5B3E
0.000497374693016 ETH
1245082542024-08-25 19:48:05605 days ago1724615285
0xd9c451d0...46AcF5B3E
0.000497374693016 ETH
1245040842024-08-25 17:29:05605 days ago1724606945
0xd9c451d0...46AcF5B3E
0.001526777824744 ETH
1245040842024-08-25 17:29:05605 days ago1724606945
0xd9c451d0...46AcF5B3E
0.001526777824744 ETH
1244912892024-08-25 10:22:35605 days ago1724581355
0xd9c451d0...46AcF5B3E
0.000857494927832 ETH
1244912892024-08-25 10:22:35605 days ago1724581355
0xd9c451d0...46AcF5B3E
0.000857494927832 ETH
1244841422024-08-25 6:24:21605 days ago1724567061
0xd9c451d0...46AcF5B3E
0.000994594481638 ETH
1244841422024-08-25 6:24:21605 days ago1724567061
0xd9c451d0...46AcF5B3E
0.000994594481638 ETH
1244758882024-08-25 1:49:13606 days ago1724550553
0xd9c451d0...46AcF5B3E
0.000329454869804 ETH
1244758882024-08-25 1:49:13606 days ago1724550553
0xd9c451d0...46AcF5B3E
0.000329454869804 ETH
1244731552024-08-25 0:18:07606 days ago1724545087
0xd9c451d0...46AcF5B3E
0.000210837408885 ETH
1244731552024-08-25 0:18:07606 days ago1724545087
0xd9c451d0...46AcF5B3E
0.000210837408885 ETH
1244714412024-08-24 23:20:59606 days ago1724541659
0xd9c451d0...46AcF5B3E
0.001222148796959 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
StrategyStargateOpNative

Compiler Version
v0.8.11+commit.d7f03943

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/IUniswapRouterSolidly.sol";
import "../../interfaces/common/IMasterChef.sol";
import "../../interfaces/stargate/IStargateRouterETH.sol";
import "../Common/StratFeeManager.sol";
import "../../utils/StringUtils.sol";
import "../../utils/GasFeeThrottler.sol";

interface IWrappedNative {
    function withdraw(uint256) external;
}

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

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

    // Third party contracts
    address public chef;
    uint256 public poolId;
    address public stargateRouter;

    bool public harvestOnDeposit;
    uint256 public lastHarvest;
    string public pendingRewardsFunctionName;

    // Routes
    IUniswapRouterSolidly.Routes[] public outputToNativeRoute;

    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 _stargateRouter,
        CommonAddresses memory _commonAddresses,
        address[][] memory _outputToNativeRoute,
        bool[] memory _stables
    ) StratFeeManager(_commonAddresses) {
        want = _want;
        poolId = _poolId;
        chef = _chef;
        stargateRouter = _stargateRouter;

        for (uint i; i < _outputToNativeRoute.length; ++i) {
            outputToNativeRoute.push(IUniswapRouterSolidly.Routes({
                from: _outputToNativeRoute[i][0],
                to: _outputToNativeRoute[i][1],
                stable: _stables[i]
            }));
        }

        output = outputToNativeRoute[0].from;
        native = outputToNativeRoute[outputToNativeRoute.length -1].to;

        _giveAllowances();
    }

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

        if (wantBal > 0) {
            IMasterChef(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) {
            IMasterChef(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 virtual 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 whenNotPaused {
        IMasterChef(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();
        uint256 toNative = IERC20(output).balanceOf(address(this));
        IUniswapRouterSolidly(unirouter).swapExactTokensForTokens(
            toNative, 0, outputToNativeRoute, address(this), block.timestamp
        );

        uint256 nativeBal = IERC20(native).balanceOf(address(this)) * fees.total / DIVISOR;

        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 {
        uint256 nativeBal = IERC20(native).balanceOf(address(this));
        IWrappedNative(native).withdraw(nativeBal);

        uint256 toDeposit = address(this).balance;
        IStargateRouterETH(stargateRouter).addLiquidityETH{value: toDeposit}();
    }

    // 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,) = IMasterChef(chef).userInfo(poolId, address(this));
        return _amount;
    }

    function setPendingRewardsFunctionName(string calldata _pendingRewardsFunctionName) external onlyManager {
        pendingRewardsFunctionName = _pendingRewardsFunctionName;
    }

    // returns rewards unharvested
    function rewardsAvailable() public view returns (uint256) {
        string memory signature = StringUtils.concat(pendingRewardsFunctionName, "(uint256,address)");
        bytes memory result = Address.functionStaticCall(
            chef,
            abi.encodeWithSignature(
                signature,
                poolId,
                address(this)
            )
        );
        return abi.decode(result, (uint256));
    }

    // native reward amount for calling harvest
    function callReward() public view returns (uint256) {
        IFeeConfig.FeeCategory memory fees = getFees();
        uint256 outputBal = rewardsAvailable();
        uint256 nativeOut;
        if (outputBal > 0) {
            (nativeOut,) = IUniswapRouterSolidly(unirouter).getAmountOut(outputBal, output, native);
        }

        return nativeOut * 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");

        IMasterChef(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();
        IMasterChef(chef).emergencyWithdraw(poolId);
    }

    function pause() public onlyManager {
        _pause();

        _removeAllowances();
    }

    function unpause() external onlyManager {
        _unpause();

        _giveAllowances();

        deposit();
    }

    function _giveAllowances() internal {
        IERC20(want).safeApprove(chef, type(uint).max);
        IERC20(output).safeApprove(unirouter, type(uint).max);
    }

    function _removeAllowances() internal {
        IERC20(want).safeApprove(chef, 0);
        IERC20(output).safeApprove(unirouter, 0);
    }

    // this contract needs to accept ETH
    receive() external payable {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

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

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

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - 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) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][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) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), 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:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `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 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;
pragma experimental ABIEncoderV2;
interface IUniswapRouterSolidly {

    // Routes
    struct Routes {
        address from;
        address to;
        bool stable;
    }

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

    function addLiquidityETH(
        address token,
        bool stable, 
        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,
        bool stable, 
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline
    ) external returns (uint amountA, uint amountB);

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

    function swapExactTokensForTokensSimple(
        uint amountIn, 
        uint amountOutMin, 
        address tokenFrom, 
        address tokenTo,
        bool stable, 
        address to, 
        uint deadline
    ) external returns (uint[] memory amounts);

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

    function getAmountOut(uint amountIn, address tokenIn, address tokenOut) external view returns (uint amount, bool stable);
   
    function quoteAddLiquidity(
        address tokenA,
        address tokenB,
        bool stable,
        uint amountADesired,
        uint amountBDesired
    ) external view returns (uint amountA, uint amountB, uint liquidity);
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

interface IMasterChef {
    function deposit(uint256 _pid, uint256 _amount) external;
    function withdraw(uint256 _pid, uint256 _amount) external;
    function enterStaking(uint256 _amount) external;
    function leaveStaking(uint256 _amount) external;
    function userInfo(uint256 _pid, address _user) external view returns (uint256, uint256);
    function emergencyWithdraw(uint256 _pid) external;
}

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

pragma solidity >=0.6.0 <0.9.0;

interface IStargateRouterETH {
    function addLiquidityETH() external payable;
}

// 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 public 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() public view returns (IFeeConfig.FeeCategory memory) {
        return beefyFeeConfig.getFees(address(this));
    }

    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 beforeDeposit() external virtual {}
}

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.9.0;

library StringUtils {
    function concat(string memory a, string memory b) internal pure returns (string memory) {
        return string(abi.encodePacked(a, b));
    }
}

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 v4.4.1 (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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

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

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

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

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

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

// 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 v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        (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;
    }
    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":"_stargateRouter","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":"bool[]","name":"_stables","type":"bool[]"}],"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":[],"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":"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":"gasprice","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFees","outputs":[{"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":"","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":"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":"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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"outputToNativeRoute","outputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bool","name":"stable","type":"bool"}],"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":"pendingRewardsFunctionName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retireStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardsAvailable","outputs":[{"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":"string","name":"_pendingRewardsFunctionName","type":"string"}],"name":"setPendingRewardsFunctionName","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":"stargateRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"withdrawalFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600a600755600880546001600160a81b03191674a43509661141f254f54d9a326e8ec851a0b95307011790553480156200003d57600080fd5b5060405162003d5738038062003d578339810160408190526200006091620009c9565b826200006c3362000324565b6000805460ff60a01b191681558151600180546001600160a01b03199081166001600160a01b0393841617909155602084015160028054831691841691909117905560408401516003805483169184169190911790556060840151600480548316918416919091179055608084015160058054831691841691909117905560a090930151600680548516918316919091179055600b805484168b8316179055600d899055600c80548416898316179055600e8054909316908716179091555b82518110156200026d576011604051806060016040528085848151811062000157576200015762000b0d565b602002602001015160008151811062000174576200017462000b0d565b60200260200101516001600160a01b031681526020018584815181106200019f576200019f62000b0d565b6020026020010151600181518110620001bc57620001bc62000b0d565b60200260200101516001600160a01b03168152602001848481518110620001e757620001e762000b0d565b6020908102919091018101511515909152825460018181018555600094855293829020835160029092020180546001600160a01b039283166001600160a01b0319909116178155918301519190930180546040909301511515600160a01b026001600160a81b03199093169190931617179055620002658162000b39565b90506200012b565b50601160008154811062000285576200028562000b0d565b6000918252602090912060029091020154600a80546001600160a01b0319166001600160a01b0390921691909117905560118054620002c79060019062000b57565b81548110620002da57620002da62000b0d565b6000918252602090912060016002909202010154600980546001600160a01b0319166001600160a01b039092169190911790556200031762000374565b5050505050505062000c2f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600c54600b54620003a1916001600160a01b039182169116600019620003d0602090811b62001d8617901c565b600254600a54620003ce916001600160a01b039182169116600019620003d0602090811b62001d8617901c565b565b8015806200044e5750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa15801562000426573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200044c919062000b71565b155b620004c65760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e63650000000000000000000060648201526084015b60405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b179091526200051e9185916200052316565b505050565b60006200057f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200060160201b62001ece179092919060201c565b8051909150156200051e5780806020019051810190620005a0919062000b8b565b6200051e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401620004bd565b60606200061284846000856200061c565b90505b9392505050565b6060824710156200067f5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401620004bd565b843b620006cf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401620004bd565b600080866001600160a01b03168587604051620006ed919062000bdc565b60006040518083038185875af1925050503d80600081146200072c576040519150601f19603f3d011682016040523d82523d6000602084013e62000731565b606091505b509092509050620007448282866200074f565b979650505050505050565b606083156200076057508162000615565b825115620007715782518084602001fd5b8160405162461bcd60e51b8152600401620004bd919062000bfa565b80516001600160a01b0381168114620007a557600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60405160c081016001600160401b0381118282101715620007e557620007e5620007aa565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620008165762000816620007aa565b604052919050565b60006001600160401b038211156200083a576200083a620007aa565b5060051b60200190565b600082601f8301126200085657600080fd5b815160206200086f62000869836200081e565b620007eb565b828152600592831b85018201928282019190878511156200088f57600080fd5b8387015b85811015620009355780516001600160401b03811115620008b45760008081fd5b8801603f81018a13620008c75760008081fd5b858101516040620008dc62000869836200081e565b82815291851b8301810191888101908d841115620008fa5760008081fd5b938201935b83851015620009235762000913856200078d565b82529389019390890190620008ff565b88525050509385019350840162000893565b5090979650505050505050565b80518015158114620007a557600080fd5b600082601f8301126200096557600080fd5b815160206200097862000869836200081e565b82815260059290921b840181019181810190868411156200099857600080fd5b8286015b84811015620009be57620009b08162000942565b83529183019183016200099c565b509695505050505050565b6000806000806000806000878903610180811215620009e757600080fd5b620009f2896200078d565b97506020890151965062000a0960408a016200078d565b955062000a1960608a016200078d565b945060c0607f198201121562000a2e57600080fd5b5062000a39620007c0565b62000a4760808a016200078d565b815262000a5760a08a016200078d565b602082015262000a6a60c08a016200078d565b604082015262000a7d60e08a016200078d565b606082015262000a916101008a016200078d565b608082015262000aa56101208a016200078d565b60a08201526101408901519093506001600160401b038082111562000ac957600080fd5b62000ad78b838c0162000844565b93506101608a015191508082111562000aef57600080fd5b5062000afe8a828b0162000953565b91505092959891949750929550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060001982141562000b505762000b5062000b23565b5060010190565b60008282101562000b6c5762000b6c62000b23565b500390565b60006020828403121562000b8457600080fd5b5051919050565b60006020828403121562000b9e57600080fd5b620006158262000942565b60005b8381101562000bc657818101518382015260200162000bac565b8381111562000bd6576000848401525b50505050565b6000825162000bf081846020870162000ba9565b9190910192915050565b602081526000825180602084015262000c1b81604085016020870162000ba9565b601f01601f19169190910160400192915050565b6131188062000c3f6000396000f3fe60806040526004361061031e5760003560e01c80638456cb59116101ab578063c1a3d44c116100f7578063e7a7250a11610095578063f2fde38b1161006f578063f2fde38b146108df578063fad4675e146108ff578063fb6177871461091f578063fbfa77cf1461093457600080fd5b8063e7a7250a14610894578063f1a392da146108a9578063f20eaeb8146108bf57600080fd5b8063d801d946116100d1578063d801d94614610828578063d92f3d731461083d578063db8d55f11461085d578063dfbdc4371461087f57600080fd5b8063c1a3d44c146107de578063c7b9d530146107f3578063d0e30db01461081357600080fd5b806397fd323d11610164578063a9e56f3c1161013e578063a9e56f3c14610736578063ac1e502514610756578063aced166114610776578063be12a9781461079657600080fd5b806397fd323d146106e75780639f8b5da1146106fc578063a68833e51461071657600080fd5b80638456cb59146106485780638912cb8b1461065d5780638bc7e8c41461067e5780638cfc0250146106945780638da5cb5b146106a95780638e145459146106c757600080fd5b80633f4ba83a1161026a57806359e79138116102235780636ec232d3116101fd5780636ec232d3146105d9578063715018a6146105fe578063722713f714610613578063748747e61461062857600080fd5b806359e791381461056e5780635c975abb1461058e5780636817031b146105b957600080fd5b80633f4ba83a146104e45780634641257d146104f95780634700d3051461050e5780634746fb551461052357806354518b1a14610543578063573fef0a1461055957600080fd5b80631fc8bc5d116102d7578063277e5cfd116102b1578063277e5cfd1461046c5780632e1a7d4d1461048e5780633e0dc34e146104ae5780633e55f932146104c457600080fd5b80631fc8bc5d1461040c5780631fe4a6861461042c578063257ae0de1461044c57600080fd5b80630e5c011e1461032a5780630e8fbb5a1461034c578063106fdbd01461036c578063115880861461038c57806311b0b42d146103b45780631f1fcd51146103ec57600080fd5b3661032557005b600080fd5b34801561033657600080fd5b5061034a610345366004612a24565b610954565b005b34801561035857600080fd5b5061034a610367366004612a5b565b610a47565b34801561037857600080fd5b5061034a610387366004612a24565b610ac1565b34801561039857600080fd5b506103a1610b40565b6040519081526020015b60405180910390f35b3480156103c057600080fd5b506009546103d4906001600160a01b031681565b6040516001600160a01b0390911681526020016103ab565b3480156103f857600080fd5b50600b546103d4906001600160a01b031681565b34801561041857600080fd5b50600c546103d4906001600160a01b031681565b34801561043857600080fd5b506004546103d4906001600160a01b031681565b34801561045857600080fd5b506002546103d4906001600160a01b031681565b34801561047857600080fd5b50610481610bc2565b6040516103ab9190612ad0565b34801561049a57600080fd5b5061034a6104a9366004612ae3565b610c50565b3480156104ba57600080fd5b506103a1600d5481565b3480156104d057600080fd5b5061034a6104df366004612ae3565b610e95565b3480156104f057600080fd5b5061034a610f63565b34801561050557600080fd5b5061034a610fbc565b34801561051a57600080fd5b5061034a6110a7565b34801561052f57600080fd5b506006546103d4906001600160a01b031681565b34801561054f57600080fd5b506103a161271081565b34801561056557600080fd5b5061034a611157565b34801561057a57600080fd5b5061034a610589366004612afc565b611193565b34801561059a57600080fd5b50600054600160a01b900460ff165b60405190151581526020016103ab565b3480156105c557600080fd5b5061034a6105d4366004612a24565b6111e3565b3480156105e557600080fd5b506008546103d49061010090046001600160a01b031681565b34801561060a57600080fd5b5061034a61125b565b34801561061f57600080fd5b506103a161128f565b34801561063457600080fd5b5061034a610643366004612a24565b6112b0565b34801561065457600080fd5b5061034a61133d565b34801561066957600080fd5b50600e546105a990600160a01b900460ff1681565b34801561068a57600080fd5b506103a160075481565b3480156106a057600080fd5b506103a161138c565b3480156106b557600080fd5b506000546001600160a01b03166103d4565b3480156106d357600080fd5b506005546103d4906001600160a01b031681565b3480156106f357600080fd5b506103a16113fa565b34801561070857600080fd5b506008546105a99060ff1681565b34801561072257600080fd5b5061034a610731366004612a24565b6114ed565b34801561074257600080fd5b50600e546103d4906001600160a01b031681565b34801561076257600080fd5b5061034a610771366004612ae3565b611565565b34801561078257600080fd5b506003546103d4906001600160a01b031681565b3480156107a257600080fd5b506107b66107b1366004612ae3565b611613565b604080516001600160a01b0394851681529390921660208401521515908201526060016103ab565b3480156107ea57600080fd5b506103a1611659565b3480156107ff57600080fd5b5061034a61080e366004612a24565b61168a565b34801561081f57600080fd5b5061034a611720565b34801561083457600080fd5b5061034a611864565b34801561084957600080fd5b5061034a610858366004612a24565b6118a3565b34801561086957600080fd5b5061087261191b565b6040516103ab9190612b6e565b34801561088b57600080fd5b506103a1603281565b3480156108a057600080fd5b506103a16119c6565b3480156108b557600080fd5b506103a1600f5481565b3480156108cb57600080fd5b50600a546103d4906001600160a01b031681565b3480156108eb57600080fd5b5061034a6108fa366004612a24565b611b1d565b34801561090b57600080fd5b5061034a61091a366004612a5b565b611bb5565b34801561092b57600080fd5b5061034a611c07565b34801561094057600080fd5b506001546103d4906001600160a01b031681565b60085460ff168015610976575060085461010090046001600160a01b03163b15155b15610a3b57600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612bca565b3a1115610a3b5760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b60448201526064015b60405180910390fd5b610a4481611ee7565b50565b6000546001600160a01b0316331480610a6a57506003546001600160a01b031633145b610a865760405162461bcd60e51b8152600401610a3290612be3565b600e805460ff60a01b1916600160a01b8315158102919091179182905560ff91041615610ab757610a446000611565565b610a44600a611565565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b8152600401610a3290612c05565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b600c54600d546040516393f1a40b60e01b8152600481019190915230602482015260009182916001600160a01b03909116906393f1a40b906044016040805180830381865afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190612c3a565b5092915050565b60108054610bcf90612c5e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfb90612c5e565b8015610c485780601f10610c1d57610100808354040283529160200191610c48565b820191906000526020600020905b815481529060010190602001808311610c2b57829003601f168201915b505050505081565b6001546001600160a01b03163314610c7a5760405162461bcd60e51b8152600401610a3290612c99565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce79190612bca565b905081811015610dd857600c54600d546001600160a01b039091169063441a3e7090610d138486612ccf565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd59190612bca565b90505b81811115610de35750805b6000546001600160a01b03163214801590610e085750600054600160a01b900460ff16155b15610e3a57600061271060075483610e209190612ce6565b610e2a9190612d05565b9050610e368183612ccf565b9150505b600154600b54610e57916001600160a01b03918216911683612062565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610e8061128f565b60405190815260200160405180910390a15050565b6000546001600160a01b0316331480610eb857506003546001600160a01b031633145b610ed45760405162461bcd60e51b8152600401610a3290612be3565b600654604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f81604051610b3591815260200190565b6000546001600160a01b0316331480610f8657506003546001600160a01b031633145b610fa25760405162461bcd60e51b8152600401610a3290612be3565b610faa612092565b610fb261212f565b610fba611720565b565b60085460ff168015610fde575060085461010090046001600160a01b03163b15155b1561109e57600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105c9190612bca565b3a111561109e5760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b6044820152606401610a32565b610fba32611ee7565b6000546001600160a01b03163314806110ca57506003546001600160a01b031633145b6110e65760405162461bcd60e51b8152600401610a3290612be3565b6110ee61133d565b600c54600d54604051632989754760e11b81526001600160a01b0390921691635312ea8e916111239160040190815260200190565b600060405180830381600087803b15801561113d57600080fd5b505af1158015611151573d6000803e3d6000fd5b50505050565b600e54600160a01b900460ff1615610fba576001546001600160a01b0316331461109e5760405162461bcd60e51b8152600401610a3290612c99565b6000546001600160a01b03163314806111b657506003546001600160a01b031633145b6111d25760405162461bcd60e51b8152600401610a3290612be3565b6111de6010838361298b565b505050565b6000546001600160a01b0316331461120d5760405162461bcd60e51b8152600401610a3290612c05565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f3090602001610b35565b6000546001600160a01b031633146112855760405162461bcd60e51b8152600401610a3290612c05565b610fba600061216d565b6000611299610b40565b6112a1611659565b6112ab9190612d27565b905090565b6000546001600160a01b03163314806112d357506003546001600160a01b031633145b6112ef5760405162461bcd60e51b8152600401610a3290612be3565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001610b35565b6000546001600160a01b031633148061136057506003546001600160a01b031633145b61137c5760405162461bcd60e51b8152600401610a3290612be3565b6113846121bd565b610fba612222565b600654604051636788231160e11b81523060048201526000916001600160a01b03169063cf104622906024015b602060405180830381865afa1580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ab9190612bca565b60008061140561191b565b905060006114116119c6565b9050600081156114a057600254600a54600954604051635e1e632560e01b8152600481018690526001600160a01b0392831660248201529082166044820152911690635e1e6325906064016040805180830381865afa158015611478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149c9190612d4f565b5090505b670de0b6b3a76400008360400151670de0b6b3a76400008560000151846114c79190612ce6565b6114d19190612d05565b6114db9190612ce6565b6114e59190612d05565b935050505090565b6000546001600160a01b031633146115175760405162461bcd60e51b8152600401610a3290612c05565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001610b35565b6000546001600160a01b031633148061158857506003546001600160a01b031633145b6115a45760405162461bcd60e51b8152600401610a3290612be3565b60328111156115de5760405162461bcd60e51b8152600401610a32906020808252600490820152630216361760e41b604082015260600190565b60078190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af90602001610b35565b6011818154811061162357600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024016113b9565b6004546001600160a01b031633146116d25760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610a32565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610b35565b600054600160a01b900460ff161561174a5760405162461bcd60e51b8152600401610a3290612d7f565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b79190612bca565b90508015610a4457600c54600d54604051631c57762b60e31b81526001600160a01b039092169163e2bbb158916117fb918590600401918252602082015260400190565b600060405180830381600087803b15801561181557600080fd5b505af1158015611829573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842661185661128f565b604051908152602001610b35565b6000546001600160a01b031633148061188757506003546001600160a01b031633145b61109e5760405162461bcd60e51b8152600401610a3290612be3565b6000546001600160a01b031633146118cd5760405162461bcd60e51b8152600401610a3290612c05565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa90602001610b35565b6119566040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b600654604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa15801561199e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112ab9190810190612e19565b600080611a86601080546119d990612c5e565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0590612c5e565b8015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b5050505050604051806040016040528060118152602001702875696e743235362c616464726573732960781b81525061225e565b600c54600d546040516024810191909152306044820152919250600091611b00916001600160a01b031690849060640160408051601f198184030181529082905291611ad191612f0f565b6040519081900390206020820180516001600160e01b03166001600160e01b031990921691909117905261228a565b905080806020019051810190611b169190612bca565b9250505090565b6000546001600160a01b03163314611b475760405162461bcd60e51b8152600401610a3290612c05565b6001600160a01b038116611bac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a32565b610a448161216d565b6000546001600160a01b0316331480611bd857506003546001600160a01b031633145b611bf45760405162461bcd60e51b8152600401610a3290612be3565b6008805460ff1916911515919091179055565b6001546001600160a01b03163314611c315760405162461bcd60e51b8152600401610a3290612c99565b600c54600d54604051632989754760e11b81526001600160a01b0390921691635312ea8e91611c669160040190815260200190565b600060405180830381600087803b158015611c8057600080fd5b505af1158015611c94573d6000803e3d6000fd5b5050600b546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015611ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d079190612bca565b600b5460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015611d5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d829190612f2b565b5050565b801580611e005750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe9190612bca565b155b611e6b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610a32565b6040516001600160a01b0383166024820152604481018290526111de90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526122af565b6060611edd8484600085612381565b90505b9392505050565b600054600160a01b900460ff1615611f115760405162461bcd60e51b8152600401610a3290612d7f565b600c54600d54604051631c57762b60e31b81526004810191909152600060248201526001600160a01b039091169063e2bbb15890604401600060405180830381600087803b158015611f6257600080fd5b505af1158015611f76573d6000803e3d6000fd5b5050600a546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015611fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe99190612bca565b90508015611d8257611ffa826124a9565b61200261274e565b600061200c611659565b9050612016611720565b42600f55337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f924108261204561128f565b6040805192835260208301919091520160405180910390a2505050565b6040516001600160a01b0383166024820152604481018290526111de90849063a9059cbb60e01b90606401611e97565b600054600160a01b900460ff166120e25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a32565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c54600b5461214e916001600160a01b039182169116600019611d86565b600254600a54610fba916001600160a01b039182169116600019611d86565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156121e75760405162461bcd60e51b8152600401610a3290612d7f565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121123390565b600c54600b54612240916001600160a01b0391821691166000611d86565b600254600a54610fba916001600160a01b0391821691166000611d86565b60608282604051602001612273929190612f48565b604051602081830303815290604052905092915050565b6060611ee083836040518060600160405280602581526020016130be60259139612881565b6000612304826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ece9092919063ffffffff16565b8051909150156111de57808060200190518101906123229190612f2b565b6111de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a32565b6060824710156123e25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a32565b843b6124305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a32565b600080866001600160a01b0316858760405161244c9190612f0f565b60006040518083038185875af1925050503d8060008114612489576040519150601f19603f3d011682016040523d82523d6000602084013e61248e565b606091505b509150915061249e828286612952565b979650505050505050565b60006124b361191b565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125259190612bca565b600254604051631e82ecdb60e31b81529192506001600160a01b03169063f41766d89061256090849060009060119030904290600401612f77565b6000604051808303816000875af115801561257f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125a79190810190613017565b5081516009546040516370a0823160e01b8152306004820152600092670de0b6b3a76400009290916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126259190612bca565b61262f9190612ce6565b6126399190612d05565b90506000670de0b6b3a76400008460400151836126569190612ce6565b6126609190612d05565b60095490915061267a906001600160a01b03168683612062565b6000670de0b6b3a76400008560200151846126959190612ce6565b61269f9190612d05565b6005546009549192506126bf916001600160a01b03908116911683612062565b6000670de0b6b3a76400008660600151856126da9190612ce6565b6126e49190612d05565b600454600954919250612704916001600160a01b03908116911683612062565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a150505050505050565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bb9190612bca565b600954604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561280257600080fd5b505af1158015612816573d6000803e3d6000fd5b5050600e546040805163ed99530760e01b815290514794506001600160a01b03909216925063ed99530791849160048082019260009290919082900301818588803b15801561286457600080fd5b505af1158015612878573d6000803e3d6000fd5b50505050505050565b6060833b6128dd5760405162461bcd60e51b8152602060048201526024808201527f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e746044820152631c9858dd60e21b6064820152608401610a32565b600080856001600160a01b0316856040516128f89190612f0f565b600060405180830381855afa9150503d8060008114612933576040519150601f19603f3d011682016040523d82523d6000602084013e612938565b606091505b5091509150612948828286612952565b9695505050505050565b60608315612961575081611ee0565b8251156129715782518084602001fd5b8160405162461bcd60e51b8152600401610a329190612ad0565b82805461299790612c5e565b90600052602060002090601f0160209004810192826129b957600085556129ff565b82601f106129d25782800160ff198235161785556129ff565b828001600101855582156129ff579182015b828111156129ff5782358255916020019190600101906129e4565b50612a0b929150612a0f565b5090565b5b80821115612a0b5760008155600101612a10565b600060208284031215612a3657600080fd5b81356001600160a01b0381168114611ee057600080fd5b8015158114610a4457600080fd5b600060208284031215612a6d57600080fd5b8135611ee081612a4d565b60005b83811015612a93578181015183820152602001612a7b565b838111156111515750506000910152565b60008151808452612abc816020860160208601612a78565b601f01601f19169290920160200192915050565b602081526000611ee06020830184612aa4565b600060208284031215612af557600080fd5b5035919050565b60008060208385031215612b0f57600080fd5b823567ffffffffffffffff80821115612b2757600080fd5b818501915085601f830112612b3b57600080fd5b813581811115612b4a57600080fd5b866020828501011115612b5c57600080fd5b60209290920196919550909350505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160c060a0840152612bb260e0840182612aa4565b905060a0840151151560c08401528091505092915050565b600060208284031215612bdc57600080fd5b5051919050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060408385031215612c4d57600080fd5b505080516020909101519092909150565b600181811c90821680612c7257607f821691505b60208210811415612c9357634e487b7160e01b600052602260045260246000fd5b50919050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015612ce157612ce1612cb9565b500390565b6000816000190483118215151615612d0057612d00612cb9565b500290565b600082612d2257634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612d3a57612d3a612cb9565b500190565b8051612d4a81612a4d565b919050565b60008060408385031215612d6257600080fd5b825191506020830151612d7481612a4d565b809150509250929050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715612de257612de2612da9565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e1157612e11612da9565b604052919050565b60006020808385031215612e2c57600080fd5b825167ffffffffffffffff80821115612e4457600080fd5b9084019060c08287031215612e5857600080fd5b612e60612dbf565b8251815283830151848201526040830151604082015260608301516060820152608083015182811115612e9257600080fd5b8301601f81018813612ea357600080fd5b805183811115612eb557612eb5612da9565b612ec7601f8201601f19168701612de8565b93508084528886828401011115612edd57600080fd5b612eec81878601888501612a78565b5050816080820152612f0060a08401612d3f565b60a08201529695505050505050565b60008251612f21818460208701612a78565b9190910192915050565b600060208284031215612f3d57600080fd5b8151611ee081612a4d565b60008351612f5a818460208801612a78565b835190830190612f6e818360208801612a78565b01949350505050565b600060a0808301888452602088818601526040838187015282895480855260c0880191508a60005283600020945060005b81811015612fea5785546001600160a01b0390811684526001878101549182168786015290881c60ff1615158585015260029096019560609093019201612fa8565b50506001600160a01b038916606088015294506130079350505050565b8260808301529695505050505050565b6000602080838503121561302a57600080fd5b825167ffffffffffffffff8082111561304257600080fd5b818501915085601f83011261305657600080fd5b81518181111561306857613068612da9565b8060051b9150613079848301612de8565b818152918301840191848101908884111561309357600080fd5b938501935b838510156130b157845182529385019390850190613098565b9897505050505050505056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a264697066735822122095a07bf44ccfc3e6c8a572a47bfb152f07e7e9064c17c25c19b4b6053a09ad0164736f6c634300080b0033000000000000000000000000d22363e3762ca7339569f3d33eade20127d5f98c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000004dea9e918c6289a52cd469cac652727b7b412cd2000000000000000000000000b49c4e680174e331cb0a7ff3ab58afc9738d5f8b000000000000000000000000936aad8da1364b0940d0e882d3d468f4e0f65421000000000000000000000000a132dab612db5cb9fc9ac426a0cc215a3423f9c90000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b6190000000000000000000000004cc72219fc8aef162fc0c255d9b9c3ff93b108820000000000000000000000003cd5ae887ddf78c58c9c1a063eb343f942dbbce8000000000000000000000000216eee15d1e3faad34181f66dd0b665f556a638d000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000004200000000000000000000000000000000000042000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061031e5760003560e01c80638456cb59116101ab578063c1a3d44c116100f7578063e7a7250a11610095578063f2fde38b1161006f578063f2fde38b146108df578063fad4675e146108ff578063fb6177871461091f578063fbfa77cf1461093457600080fd5b8063e7a7250a14610894578063f1a392da146108a9578063f20eaeb8146108bf57600080fd5b8063d801d946116100d1578063d801d94614610828578063d92f3d731461083d578063db8d55f11461085d578063dfbdc4371461087f57600080fd5b8063c1a3d44c146107de578063c7b9d530146107f3578063d0e30db01461081357600080fd5b806397fd323d11610164578063a9e56f3c1161013e578063a9e56f3c14610736578063ac1e502514610756578063aced166114610776578063be12a9781461079657600080fd5b806397fd323d146106e75780639f8b5da1146106fc578063a68833e51461071657600080fd5b80638456cb59146106485780638912cb8b1461065d5780638bc7e8c41461067e5780638cfc0250146106945780638da5cb5b146106a95780638e145459146106c757600080fd5b80633f4ba83a1161026a57806359e79138116102235780636ec232d3116101fd5780636ec232d3146105d9578063715018a6146105fe578063722713f714610613578063748747e61461062857600080fd5b806359e791381461056e5780635c975abb1461058e5780636817031b146105b957600080fd5b80633f4ba83a146104e45780634641257d146104f95780634700d3051461050e5780634746fb551461052357806354518b1a14610543578063573fef0a1461055957600080fd5b80631fc8bc5d116102d7578063277e5cfd116102b1578063277e5cfd1461046c5780632e1a7d4d1461048e5780633e0dc34e146104ae5780633e55f932146104c457600080fd5b80631fc8bc5d1461040c5780631fe4a6861461042c578063257ae0de1461044c57600080fd5b80630e5c011e1461032a5780630e8fbb5a1461034c578063106fdbd01461036c578063115880861461038c57806311b0b42d146103b45780631f1fcd51146103ec57600080fd5b3661032557005b600080fd5b34801561033657600080fd5b5061034a610345366004612a24565b610954565b005b34801561035857600080fd5b5061034a610367366004612a5b565b610a47565b34801561037857600080fd5b5061034a610387366004612a24565b610ac1565b34801561039857600080fd5b506103a1610b40565b6040519081526020015b60405180910390f35b3480156103c057600080fd5b506009546103d4906001600160a01b031681565b6040516001600160a01b0390911681526020016103ab565b3480156103f857600080fd5b50600b546103d4906001600160a01b031681565b34801561041857600080fd5b50600c546103d4906001600160a01b031681565b34801561043857600080fd5b506004546103d4906001600160a01b031681565b34801561045857600080fd5b506002546103d4906001600160a01b031681565b34801561047857600080fd5b50610481610bc2565b6040516103ab9190612ad0565b34801561049a57600080fd5b5061034a6104a9366004612ae3565b610c50565b3480156104ba57600080fd5b506103a1600d5481565b3480156104d057600080fd5b5061034a6104df366004612ae3565b610e95565b3480156104f057600080fd5b5061034a610f63565b34801561050557600080fd5b5061034a610fbc565b34801561051a57600080fd5b5061034a6110a7565b34801561052f57600080fd5b506006546103d4906001600160a01b031681565b34801561054f57600080fd5b506103a161271081565b34801561056557600080fd5b5061034a611157565b34801561057a57600080fd5b5061034a610589366004612afc565b611193565b34801561059a57600080fd5b50600054600160a01b900460ff165b60405190151581526020016103ab565b3480156105c557600080fd5b5061034a6105d4366004612a24565b6111e3565b3480156105e557600080fd5b506008546103d49061010090046001600160a01b031681565b34801561060a57600080fd5b5061034a61125b565b34801561061f57600080fd5b506103a161128f565b34801561063457600080fd5b5061034a610643366004612a24565b6112b0565b34801561065457600080fd5b5061034a61133d565b34801561066957600080fd5b50600e546105a990600160a01b900460ff1681565b34801561068a57600080fd5b506103a160075481565b3480156106a057600080fd5b506103a161138c565b3480156106b557600080fd5b506000546001600160a01b03166103d4565b3480156106d357600080fd5b506005546103d4906001600160a01b031681565b3480156106f357600080fd5b506103a16113fa565b34801561070857600080fd5b506008546105a99060ff1681565b34801561072257600080fd5b5061034a610731366004612a24565b6114ed565b34801561074257600080fd5b50600e546103d4906001600160a01b031681565b34801561076257600080fd5b5061034a610771366004612ae3565b611565565b34801561078257600080fd5b506003546103d4906001600160a01b031681565b3480156107a257600080fd5b506107b66107b1366004612ae3565b611613565b604080516001600160a01b0394851681529390921660208401521515908201526060016103ab565b3480156107ea57600080fd5b506103a1611659565b3480156107ff57600080fd5b5061034a61080e366004612a24565b61168a565b34801561081f57600080fd5b5061034a611720565b34801561083457600080fd5b5061034a611864565b34801561084957600080fd5b5061034a610858366004612a24565b6118a3565b34801561086957600080fd5b5061087261191b565b6040516103ab9190612b6e565b34801561088b57600080fd5b506103a1603281565b3480156108a057600080fd5b506103a16119c6565b3480156108b557600080fd5b506103a1600f5481565b3480156108cb57600080fd5b50600a546103d4906001600160a01b031681565b3480156108eb57600080fd5b5061034a6108fa366004612a24565b611b1d565b34801561090b57600080fd5b5061034a61091a366004612a5b565b611bb5565b34801561092b57600080fd5b5061034a611c07565b34801561094057600080fd5b506001546103d4906001600160a01b031681565b60085460ff168015610976575060085461010090046001600160a01b03163b15155b15610a3b57600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af11580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612bca565b3a1115610a3b5760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b60448201526064015b60405180910390fd5b610a4481611ee7565b50565b6000546001600160a01b0316331480610a6a57506003546001600160a01b031633145b610a865760405162461bcd60e51b8152600401610a3290612be3565b600e805460ff60a01b1916600160a01b8315158102919091179182905560ff91041615610ab757610a446000611565565b610a44600a611565565b6000546001600160a01b03163314610aeb5760405162461bcd60e51b8152600401610a3290612c05565b600680546001600160a01b0319166001600160a01b0383169081179091556040519081527f91e28ce4210d103c13c5174847e463b836900f8dc63e9d9b42a4255169d19529906020015b60405180910390a150565b600c54600d546040516393f1a40b60e01b8152600481019190915230602482015260009182916001600160a01b03909116906393f1a40b906044016040805180830381865afa158015610b97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbb9190612c3a565b5092915050565b60108054610bcf90612c5e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bfb90612c5e565b8015610c485780601f10610c1d57610100808354040283529160200191610c48565b820191906000526020600020905b815481529060010190602001808311610c2b57829003601f168201915b505050505081565b6001546001600160a01b03163314610c7a5760405162461bcd60e51b8152600401610a3290612c99565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015610cc3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce79190612bca565b905081811015610dd857600c54600d546001600160a01b039091169063441a3e7090610d138486612ccf565b6040516001600160e01b031960e085901b16815260048101929092526024820152604401600060405180830381600087803b158015610d5157600080fd5b505af1158015610d65573d6000803e3d6000fd5b5050600b546040516370a0823160e01b81523060048201526001600160a01b0390911692506370a082319150602401602060405180830381865afa158015610db1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd59190612bca565b90505b81811115610de35750805b6000546001600160a01b03163214801590610e085750600054600160a01b900460ff16155b15610e3a57600061271060075483610e209190612ce6565b610e2a9190612d05565b9050610e368183612ccf565b9150505b600154600b54610e57916001600160a01b03918216911683612062565b7f5b6b431d4476a211bb7d41c20d1aab9ae2321deee0d20be3d9fc9b1093fa6e3d610e8061128f565b60405190815260200160405180910390a15050565b6000546001600160a01b0316331480610eb857506003546001600160a01b031633145b610ed45760405162461bcd60e51b8152600401610a3290612be3565b600654604051631f2afc9960e11b8152600481018390526001600160a01b0390911690633e55f93290602401600060405180830381600087803b158015610f1a57600080fd5b505af1158015610f2e573d6000803e3d6000fd5b505050507f9163810ee1e29168d4ce900e48a333fb8fbd3fd070d2bef67f6d4db0846a469f81604051610b3591815260200190565b6000546001600160a01b0316331480610f8657506003546001600160a01b031633145b610fa25760405162461bcd60e51b8152600401610a3290612be3565b610faa612092565b610fb261212f565b610fba611720565b565b60085460ff168015610fde575060085461010090046001600160a01b03163b15155b1561109e57600860019054906101000a90046001600160a01b03166001600160a01b0316633de39c116040518163ffffffff1660e01b81526004016020604051808303816000875af1158015611038573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105c9190612bca565b3a111561109e5760405162461bcd60e51b815260206004820152601060248201526f67617320697320746f6f20686967682160801b6044820152606401610a32565b610fba32611ee7565b6000546001600160a01b03163314806110ca57506003546001600160a01b031633145b6110e65760405162461bcd60e51b8152600401610a3290612be3565b6110ee61133d565b600c54600d54604051632989754760e11b81526001600160a01b0390921691635312ea8e916111239160040190815260200190565b600060405180830381600087803b15801561113d57600080fd5b505af1158015611151573d6000803e3d6000fd5b50505050565b600e54600160a01b900460ff1615610fba576001546001600160a01b0316331461109e5760405162461bcd60e51b8152600401610a3290612c99565b6000546001600160a01b03163314806111b657506003546001600160a01b031633145b6111d25760405162461bcd60e51b8152600401610a3290612be3565b6111de6010838361298b565b505050565b6000546001600160a01b0316331461120d5760405162461bcd60e51b8152600401610a3290612c05565b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fd459c7242e23d490831b5676a611c4342d899d28f342d89ae80793e56a930f3090602001610b35565b6000546001600160a01b031633146112855760405162461bcd60e51b8152600401610a3290612c05565b610fba600061216d565b6000611299610b40565b6112a1611659565b6112ab9190612d27565b905090565b6000546001600160a01b03163314806112d357506003546001600160a01b031633145b6112ef5760405162461bcd60e51b8152600401610a3290612be3565b600380546001600160a01b0319166001600160a01b0383169081179091556040519081527fefb5cfa1a8690c124332ab93324539c5c9c4be03f28aeb8be86f2d8a0c9fb99b90602001610b35565b6000546001600160a01b031633148061136057506003546001600160a01b031633145b61137c5760405162461bcd60e51b8152600401610a3290612be3565b6113846121bd565b610fba612222565b600654604051636788231160e11b81523060048201526000916001600160a01b03169063cf104622906024015b602060405180830381865afa1580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ab9190612bca565b60008061140561191b565b905060006114116119c6565b9050600081156114a057600254600a54600954604051635e1e632560e01b8152600481018690526001600160a01b0392831660248201529082166044820152911690635e1e6325906064016040805180830381865afa158015611478573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061149c9190612d4f565b5090505b670de0b6b3a76400008360400151670de0b6b3a76400008560000151846114c79190612ce6565b6114d19190612d05565b6114db9190612ce6565b6114e59190612d05565b935050505090565b6000546001600160a01b031633146115175760405162461bcd60e51b8152600401610a3290612c05565b600580546001600160a01b0319166001600160a01b0383169081179091556040519081527f8041329bf7057543a2c2ff4e4071d1d488a31f82ed44e169b5cd2f04f5e3ac8590602001610b35565b6000546001600160a01b031633148061158857506003546001600160a01b031633145b6115a45760405162461bcd60e51b8152600401610a3290612be3565b60328111156115de5760405162461bcd60e51b8152600401610a32906020808252600490820152630216361760e41b604082015260600190565b60078190556040518181527f3aa4413905e8f015896ec5880bdde24088ccb19b578f9fcf6800354d5320d4af90602001610b35565b6011818154811061162357600080fd5b6000918252602090912060029091020180546001909101546001600160a01b03918216925090811690600160a01b900460ff1683565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a08231906024016113b9565b6004546001600160a01b031633146116d25760405162461bcd60e51b815260206004820152600b60248201526a085cdd1c985d1959da5cdd60aa1b6044820152606401610a32565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f46d58e3fa07bf19b1d27240f0e286b27e9f7c1b0d88933333fe833b60eec541290602001610b35565b600054600160a01b900460ff161561174a5760405162461bcd60e51b8152600401610a3290612d7f565b600b546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117b79190612bca565b90508015610a4457600c54600d54604051631c57762b60e31b81526001600160a01b039092169163e2bbb158916117fb918590600401918252602082015260400190565b600060405180830381600087803b15801561181557600080fd5b505af1158015611829573d6000803e3d6000fd5b505050507f4d6ce1e535dbade1c23defba91e23b8f791ce5edc0cc320257a2b364e4e3842661185661128f565b604051908152602001610b35565b6000546001600160a01b031633148061188757506003546001600160a01b031633145b61109e5760405162461bcd60e51b8152600401610a3290612be3565b6000546001600160a01b031633146118cd5760405162461bcd60e51b8152600401610a3290612c05565b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527f5ca6e64c4522e68e154aa9372f2c5969cd37d9640e59f66953dc472f54ee86fa90602001610b35565b6119566040518060c0016040528060008152602001600081526020016000815260200160008152602001606081526020016000151581525090565b600654604051639af608c960e01b81523060048201526001600160a01b0390911690639af608c990602401600060405180830381865afa15801561199e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112ab9190810190612e19565b600080611a86601080546119d990612c5e565b80601f0160208091040260200160405190810160405280929190818152602001828054611a0590612c5e565b8015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b5050505050604051806040016040528060118152602001702875696e743235362c616464726573732960781b81525061225e565b600c54600d546040516024810191909152306044820152919250600091611b00916001600160a01b031690849060640160408051601f198184030181529082905291611ad191612f0f565b6040519081900390206020820180516001600160e01b03166001600160e01b031990921691909117905261228a565b905080806020019051810190611b169190612bca565b9250505090565b6000546001600160a01b03163314611b475760405162461bcd60e51b8152600401610a3290612c05565b6001600160a01b038116611bac5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a32565b610a448161216d565b6000546001600160a01b0316331480611bd857506003546001600160a01b031633145b611bf45760405162461bcd60e51b8152600401610a3290612be3565b6008805460ff1916911515919091179055565b6001546001600160a01b03163314611c315760405162461bcd60e51b8152600401610a3290612c99565b600c54600d54604051632989754760e11b81526001600160a01b0390921691635312ea8e91611c669160040190815260200190565b600060405180830381600087803b158015611c8057600080fd5b505af1158015611c94573d6000803e3d6000fd5b5050600b546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015611ce3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d079190612bca565b600b5460015460405163a9059cbb60e01b81526001600160a01b03918216600482015260248101849052929350169063a9059cbb906044016020604051808303816000875af1158015611d5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d829190612f2b565b5050565b801580611e005750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa158015611dda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dfe9190612bca565b155b611e6b5760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610a32565b6040516001600160a01b0383166024820152604481018290526111de90849063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526122af565b6060611edd8484600085612381565b90505b9392505050565b600054600160a01b900460ff1615611f115760405162461bcd60e51b8152600401610a3290612d7f565b600c54600d54604051631c57762b60e31b81526004810191909152600060248201526001600160a01b039091169063e2bbb15890604401600060405180830381600087803b158015611f6257600080fd5b505af1158015611f76573d6000803e3d6000fd5b5050600a546040516370a0823160e01b8152306004820152600093506001600160a01b0390911691506370a0823190602401602060405180830381865afa158015611fc5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe99190612bca565b90508015611d8257611ffa826124a9565b61200261274e565b600061200c611659565b9050612016611720565b42600f55337f9bc239f1724cacfb88cb1d66a2dc437467699b68a8c90d7b63110cf4b6f924108261204561128f565b6040805192835260208301919091520160405180910390a2505050565b6040516001600160a01b0383166024820152604481018290526111de90849063a9059cbb60e01b90606401611e97565b600054600160a01b900460ff166120e25760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a32565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600c54600b5461214e916001600160a01b039182169116600019611d86565b600254600a54610fba916001600160a01b039182169116600019611d86565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156121e75760405162461bcd60e51b8152600401610a3290612d7f565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121123390565b600c54600b54612240916001600160a01b0391821691166000611d86565b600254600a54610fba916001600160a01b0391821691166000611d86565b60608282604051602001612273929190612f48565b604051602081830303815290604052905092915050565b6060611ee083836040518060600160405280602581526020016130be60259139612881565b6000612304826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611ece9092919063ffffffff16565b8051909150156111de57808060200190518101906123229190612f2b565b6111de5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a32565b6060824710156123e25760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a32565b843b6124305760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a32565b600080866001600160a01b0316858760405161244c9190612f0f565b60006040518083038185875af1925050503d8060008114612489576040519150601f19603f3d011682016040523d82523d6000602084013e61248e565b606091505b509150915061249e828286612952565b979650505050505050565b60006124b361191b565b600a546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612501573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125259190612bca565b600254604051631e82ecdb60e31b81529192506001600160a01b03169063f41766d89061256090849060009060119030904290600401612f77565b6000604051808303816000875af115801561257f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526125a79190810190613017565b5081516009546040516370a0823160e01b8152306004820152600092670de0b6b3a76400009290916001600160a01b03909116906370a0823190602401602060405180830381865afa158015612601573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126259190612bca565b61262f9190612ce6565b6126399190612d05565b90506000670de0b6b3a76400008460400151836126569190612ce6565b6126609190612d05565b60095490915061267a906001600160a01b03168683612062565b6000670de0b6b3a76400008560200151846126959190612ce6565b61269f9190612d05565b6005546009549192506126bf916001600160a01b03908116911683612062565b6000670de0b6b3a76400008660600151856126da9190612ce6565b6126e49190612d05565b600454600954919250612704916001600160a01b03908116911683612062565b60408051848152602081018490529081018290527fd255b592c7f268a73e534da5219a60ff911b4cf6daae21c7d20527dd657bd99a9060600160405180910390a150505050505050565b6009546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612797573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127bb9190612bca565b600954604051632e1a7d4d60e01b8152600481018390529192506001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561280257600080fd5b505af1158015612816573d6000803e3d6000fd5b5050600e546040805163ed99530760e01b815290514794506001600160a01b03909216925063ed99530791849160048082019260009290919082900301818588803b15801561286457600080fd5b505af1158015612878573d6000803e3d6000fd5b50505050505050565b6060833b6128dd5760405162461bcd60e51b8152602060048201526024808201527f416464726573733a207374617469632063616c6c20746f206e6f6e2d636f6e746044820152631c9858dd60e21b6064820152608401610a32565b600080856001600160a01b0316856040516128f89190612f0f565b600060405180830381855afa9150503d8060008114612933576040519150601f19603f3d011682016040523d82523d6000602084013e612938565b606091505b5091509150612948828286612952565b9695505050505050565b60608315612961575081611ee0565b8251156129715782518084602001fd5b8160405162461bcd60e51b8152600401610a329190612ad0565b82805461299790612c5e565b90600052602060002090601f0160209004810192826129b957600085556129ff565b82601f106129d25782800160ff198235161785556129ff565b828001600101855582156129ff579182015b828111156129ff5782358255916020019190600101906129e4565b50612a0b929150612a0f565b5090565b5b80821115612a0b5760008155600101612a10565b600060208284031215612a3657600080fd5b81356001600160a01b0381168114611ee057600080fd5b8015158114610a4457600080fd5b600060208284031215612a6d57600080fd5b8135611ee081612a4d565b60005b83811015612a93578181015183820152602001612a7b565b838111156111515750506000910152565b60008151808452612abc816020860160208601612a78565b601f01601f19169290920160200192915050565b602081526000611ee06020830184612aa4565b600060208284031215612af557600080fd5b5035919050565b60008060208385031215612b0f57600080fd5b823567ffffffffffffffff80821115612b2757600080fd5b818501915085601f830112612b3b57600080fd5b813581811115612b4a57600080fd5b866020828501011115612b5c57600080fd5b60209290920196919550909350505050565b60208152815160208201526020820151604082015260408201516060820152606082015160808201526000608083015160c060a0840152612bb260e0840182612aa4565b905060a0840151151560c08401528091505092915050565b600060208284031215612bdc57600080fd5b5051919050565b60208082526008908201526710b6b0b730b3b2b960c11b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008060408385031215612c4d57600080fd5b505080516020909101519092909150565b600181811c90821680612c7257607f821691505b60208210811415612c9357634e487b7160e01b600052602260045260246000fd5b50919050565b602080825260069082015265085d985d5b1d60d21b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082821015612ce157612ce1612cb9565b500390565b6000816000190483118215151615612d0057612d00612cb9565b500290565b600082612d2257634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612d3a57612d3a612cb9565b500190565b8051612d4a81612a4d565b919050565b60008060408385031215612d6257600080fd5b825191506020830151612d7481612a4d565b809150509250929050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b634e487b7160e01b600052604160045260246000fd5b60405160c0810167ffffffffffffffff81118282101715612de257612de2612da9565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e1157612e11612da9565b604052919050565b60006020808385031215612e2c57600080fd5b825167ffffffffffffffff80821115612e4457600080fd5b9084019060c08287031215612e5857600080fd5b612e60612dbf565b8251815283830151848201526040830151604082015260608301516060820152608083015182811115612e9257600080fd5b8301601f81018813612ea357600080fd5b805183811115612eb557612eb5612da9565b612ec7601f8201601f19168701612de8565b93508084528886828401011115612edd57600080fd5b612eec81878601888501612a78565b5050816080820152612f0060a08401612d3f565b60a08201529695505050505050565b60008251612f21818460208701612a78565b9190910192915050565b600060208284031215612f3d57600080fd5b8151611ee081612a4d565b60008351612f5a818460208801612a78565b835190830190612f6e818360208801612a78565b01949350505050565b600060a0808301888452602088818601526040838187015282895480855260c0880191508a60005283600020945060005b81811015612fea5785546001600160a01b0390811684526001878101549182168786015290881c60ff1615158585015260029096019560609093019201612fa8565b50506001600160a01b038916606088015294506130079350505050565b8260808301529695505050505050565b6000602080838503121561302a57600080fd5b825167ffffffffffffffff8082111561304257600080fd5b818501915085601f83011261305657600080fd5b81518181111561306857613068612da9565b8060051b9150613079848301612de8565b818152918301840191848101908884111561309357600080fd5b938501935b838510156130b157845182529385019390850190613098565b9897505050505050505056fe416464726573733a206c6f772d6c6576656c207374617469632063616c6c206661696c6564a264697066735822122095a07bf44ccfc3e6c8a572a47bfb152f07e7e9064c17c25c19b4b6053a09ad0164736f6c634300080b0033

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

000000000000000000000000d22363e3762ca7339569f3d33eade20127d5f98c00000000000000000000000000000000000000000000000000000000000000010000000000000000000000004dea9e918c6289a52cd469cac652727b7b412cd2000000000000000000000000b49c4e680174e331cb0a7ff3ab58afc9738d5f8b000000000000000000000000936aad8da1364b0940d0e882d3d468f4e0f65421000000000000000000000000a132dab612db5cb9fc9ac426a0cc215a3423f9c90000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b6190000000000000000000000004cc72219fc8aef162fc0c255d9b9c3ff93b108820000000000000000000000003cd5ae887ddf78c58c9c1a063eb343f942dbbce8000000000000000000000000216eee15d1e3faad34181f66dd0b665f556a638d000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000004200000000000000000000000000000000000042000000000000000000000000420000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _want (address): 0xd22363e3762cA7339569F3d33EADe20127D5F98C
Arg [1] : _poolId (uint256): 1
Arg [2] : _chef (address): 0x4DeA9e918c6289a52cd469cAC652727B7b412Cd2
Arg [3] : _stargateRouter (address): 0xB49c4e680174E331CB0A7fF3Ab58afC9738d5F8b
Arg [4] : _commonAddresses (tuple):
Arg [1] : vault (address): 0x936AAd8dA1364b0940d0E882D3d468f4E0f65421
Arg [2] : unirouter (address): 0xa132DAB612dB5cB9fC9Ac426A0Cc215A3423F9c9
Arg [3] : keeper (address): 0x4fED5491693007f0CD49f4614FFC38Ab6A04B619
Arg [4] : strategist (address): 0x4cC72219fc8aEF162FC0c255D9B9C3Ff93B10882
Arg [5] : beefyFeeRecipient (address): 0x3Cd5Ae887Ddf78c58c9C1a063EB343F942DbbcE8
Arg [6] : beefyFeeConfig (address): 0x216EEE15D1e3fAAD34181f66dd0B665f556a638d

Arg [5] : _outputToNativeRoute (address[][]): System.Collections.Generic.List`1[System.String]
Arg [6] : _stables (bool[]): False

-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 000000000000000000000000d22363e3762ca7339569f3d33eade20127d5f98c
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 0000000000000000000000004dea9e918c6289a52cd469cac652727b7b412cd2
Arg [3] : 000000000000000000000000b49c4e680174e331cb0a7ff3ab58afc9738d5f8b
Arg [4] : 000000000000000000000000936aad8da1364b0940d0e882d3d468f4e0f65421
Arg [5] : 000000000000000000000000a132dab612db5cb9fc9ac426a0cc215a3423f9c9
Arg [6] : 0000000000000000000000004fed5491693007f0cd49f4614ffc38ab6a04b619
Arg [7] : 0000000000000000000000004cc72219fc8aef162fc0c255d9b9c3ff93b10882
Arg [8] : 0000000000000000000000003cd5ae887ddf78c58c9c1a063eb343f942dbbce8
Arg [9] : 000000000000000000000000216eee15d1e3faad34181f66dd0b665f556a638d
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [15] : 0000000000000000000000004200000000000000000000000000000000000042
Arg [16] : 0000000000000000000000004200000000000000000000000000000000000006
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.