ETH Price: $2,406.56 (-0.74%)

Contract

0x46c7308567B527647853d3F94d40Ce82ed27f325
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Beef In ETH168881572023-03-23 5:25:35562 days ago1679549135IN
0x46c73085...2ed27f325
0.07 ETH0.005774710
Beef In ETH167628842023-03-05 14:47:11580 days ago1678027631IN
0x46c73085...2ed27f325
45 ETH0.013449525.13034189
Beef In167628762023-03-05 14:45:35580 days ago1678027535IN
0x46c73085...2ed27f325
0 ETH0.0137280925.1033986
Beef Out And Swa...167627682023-03-05 14:23:47580 days ago1678026227IN
0x46c73085...2ed27f325
0 ETH0.0133686624.72088899
Beef Out And Swa...167624242023-03-05 13:14:23580 days ago1678022063IN
0x46c73085...2ed27f325
0 ETH0.0145968227.69570392
Beef Out And Swa...167615412023-03-05 10:15:23580 days ago1678011323IN
0x46c73085...2ed27f325
0 ETH0.0112046418.82978651
Beef Out And Swa...167609842023-03-05 8:22:23580 days ago1678004543IN
0x46c73085...2ed27f325
0 ETH0.0118862119.56475504
Beef Out And Swa...167578812023-03-04 21:55:47580 days ago1677966947IN
0x46c73085...2ed27f325
0 ETH0.0212404422.35807767
Beef In167565792023-03-04 17:32:23581 days ago1677951143IN
0x46c73085...2ed27f325
0 ETH0.0184411823.29338582
Beef Out And Swa...167565222023-03-04 17:20:59581 days ago1677950459IN
0x46c73085...2ed27f325
0 ETH0.0157454224.36256748
Beef In167534852023-03-04 7:05:11581 days ago1677913511IN
0x46c73085...2ed27f325
0 ETH0.0105888716.41601839
Beef In167483712023-03-03 13:47:35582 days ago1677851255IN
0x46c73085...2ed27f325
0 ETH0.0185057326.13914974
Beef Out And Swa...167479922023-03-03 12:30:35582 days ago1677846635IN
0x46c73085...2ed27f325
0 ETH0.0142430621.79785487
Beef In167473442023-03-03 10:18:23582 days ago1677838703IN
0x46c73085...2ed27f325
0 ETH0.0126954919.82769324
Beef In167469462023-03-03 8:58:35582 days ago1677833915IN
0x46c73085...2ed27f325
0 ETH0.0124315921.17732272
Beef In167462942023-03-03 6:46:47582 days ago1677826007IN
0x46c73085...2ed27f325
0 ETH0.013214320.2137072
Beef Out And Swa...167449592023-03-03 2:17:35582 days ago1677809855IN
0x46c73085...2ed27f325
0 ETH0.0221435845.51619976
Beef In167443862023-03-03 0:19:47582 days ago1677802787IN
0x46c73085...2ed27f325
0 ETH0.0155565927.2751905
Beef In ETH167405722023-03-02 11:25:35583 days ago1677756335IN
0x46c73085...2ed27f325
1.22084459 ETH0.0133674218.72227293
Beef Out And Swa...167403742023-03-02 10:45:47583 days ago1677753947IN
0x46c73085...2ed27f325
0 ETH0.0163871219.25957318
Beef In167399472023-03-02 9:19:11583 days ago1677748751IN
0x46c73085...2ed27f325
0 ETH0.0131848320.11641053
Beef In ETH167393412023-03-02 7:16:23583 days ago1677741383IN
0x46c73085...2ed27f325
2.35 ETH0.0154946720.487178
Beef In167385232023-03-02 4:30:47583 days ago1677731447IN
0x46c73085...2ed27f325
0 ETH0.0138288120.01180265
Beef Out And Swa...167383942023-03-02 4:04:23583 days ago1677729863IN
0x46c73085...2ed27f325
0 ETH0.0126420319
Beef In167378422023-03-02 2:12:59583 days ago1677723179IN
0x46c73085...2ed27f325
0 ETH0.0219256236.67368619
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
168881572023-03-23 5:25:35562 days ago1679549135
0x46c73085...2ed27f325
0.00235939 ETH
168881572023-03-23 5:25:35562 days ago1679549135
0x46c73085...2ed27f325
0.00235939 ETH
168881572023-03-23 5:25:35562 days ago1679549135
0x46c73085...2ed27f325
0.07 ETH
167628842023-03-05 14:47:11580 days ago1678027631
0x46c73085...2ed27f325
0.08968683 ETH
167628842023-03-05 14:47:11580 days ago1678027631
0x46c73085...2ed27f325
0.08968683 ETH
167628842023-03-05 14:47:11580 days ago1678027631
0x46c73085...2ed27f325
45 ETH
167628762023-03-05 14:45:35580 days ago1678027535
0x46c73085...2ed27f325
45.32799665 ETH
167628762023-03-05 14:45:35580 days ago1678027535
0x46c73085...2ed27f325
45.32799665 ETH
167624242023-03-05 13:14:23580 days ago1678022063
0x46c73085...2ed27f325
1.14761683 ETH
167624242023-03-05 13:14:23580 days ago1678022063
0x46c73085...2ed27f325
1.14761683 ETH
167615412023-03-05 10:15:23580 days ago1678011323
0x46c73085...2ed27f325
0.74531662 ETH
167615412023-03-05 10:15:23580 days ago1678011323
0x46c73085...2ed27f325
0.74531662 ETH
167609842023-03-05 8:22:23580 days ago1678004543
0x46c73085...2ed27f325
0.86625321 ETH
167609842023-03-05 8:22:23580 days ago1678004543
0x46c73085...2ed27f325
0.86625321 ETH
167565792023-03-04 17:32:23581 days ago1677951143
0x46c73085...2ed27f325
0.00398587 ETH
167565792023-03-04 17:32:23581 days ago1677951143
0x46c73085...2ed27f325
0.00398587 ETH
167469462023-03-03 8:58:35582 days ago1677833915
0x46c73085...2ed27f325
0.00067413 ETH
167469462023-03-03 8:58:35582 days ago1677833915
0x46c73085...2ed27f325
0.00067413 ETH
167449592023-03-03 2:17:35582 days ago1677809855
0x46c73085...2ed27f325
1.74130804 ETH
167449592023-03-03 2:17:35582 days ago1677809855
0x46c73085...2ed27f325
1.74130804 ETH
167405722023-03-02 11:25:35583 days ago1677756335
0x46c73085...2ed27f325
1.22084459 ETH
167393412023-03-02 7:16:23583 days ago1677741383
0x46c73085...2ed27f325
2.35 ETH
167383942023-03-02 4:04:23583 days ago1677729863
0x46c73085...2ed27f325
0.63444577 ETH
167383942023-03-02 4:04:23583 days ago1677729863
0x46c73085...2ed27f325
0.63444577 ETH
167351812023-03-01 17:13:47584 days ago1677690827
0x46c73085...2ed27f325
0.003189 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BeefyZapOneInch

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 17 : BeefyZapOneInch.sol
// 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 "@openzeppelin-4/contracts/utils/math/Math.sol";

import "../interfaces/common/IUniswapRouterETH.sol";
import "../interfaces/common/IUniswapV2Pair.sol";
import "../interfaces/common/ISolidlyPair.sol";
import "../interfaces/common/ISolidlyRouter.sol";
import "./zapInterfaces/IWETH.sol";
import "./zapInterfaces/IBeefyVault.sol";
import "./zapInterfaces/IStrategy.sol";
import "./zapInterfaces/IERC20Extended.sol";


// Aggregator Zap compatible with all single asset, uniswapv2, and solidly router Beefy Vaults. 
contract BeefyZapOneInch {
    using SafeERC20 for IERC20;
    using SafeERC20 for IBeefyVault;

    // needed addresses for zap 
    address public immutable oneInchRouter;
    address public immutable WETH;
    uint256 public constant minimumAmount = 1000;

    enum WantType {
        WANT_TYPE_SINGLE,
        WANT_TYPE_UNISWAP_V2,
        WANT_TYPE_SOLIDLY_STABLE,
        WANT_TYPE_SOLIDLY_VOLATILE
    }

    event TokenReturned(address token, uint256 amount);
    event ZapIn(address vault, address tokenIn, uint256 amountIn);
    event ZapOut(address vault, address desiredToken, uint256 mooTokenIn);

    constructor(address _oneInchRouter, address _WETH) {
        // Safety checks to ensure WETH token address
        IWETH(_WETH).deposit{value: 0}();
        IWETH(_WETH).withdraw(0);
        WETH = _WETH;

        oneInchRouter = _oneInchRouter;
    }

    // Zap's main functions external and public functions
    function beefInETH (address _beefyVault, bytes calldata _token0, bytes calldata _token1, WantType _type) external payable {
        require(msg.value >= minimumAmount, 'Beefy: Insignificant input amount');

        IWETH(WETH).deposit{value: msg.value}();
        _swapAndStake(_beefyVault, WETH, WETH, _token0, _token1, _type);
        emit ZapIn(_beefyVault, WETH, msg.value);
    }

    function beefIn (address _beefyVault, address _inputToken, uint256 _tokenInAmount, bytes calldata _token0, bytes calldata _token1, WantType _type) public {
        require(_tokenInAmount >= minimumAmount, 'Beefy: Insignificant input amount');

        IERC20(_inputToken).safeTransferFrom(msg.sender, address(this), _tokenInAmount);
        _swapAndStake(_beefyVault, _inputToken, _inputToken, _token0, _token1, _type);
        emit ZapIn(_beefyVault,  _inputToken, _tokenInAmount);
    }

    function beefOut (address _beefyVault, uint256 _withdrawAmount) external {
        address[] memory tokens = _beefOut(_beefyVault, _withdrawAmount);
         _returnAssets(tokens);
    }

    function beefOutAndSwap(address _beefyVault, uint256 _withdrawAmount, address _desiredToken, bytes calldata _dataToken0, bytes calldata _dataToken1, WantType _type) external {
        (IBeefyVault vault, IUniswapV2Pair pair) =  _getVaultPair(_beefyVault);
        vault.safeTransferFrom(msg.sender, address(this), _withdrawAmount);
        vault.withdraw(_withdrawAmount);
         emit ZapOut(_beefyVault, _desiredToken, _withdrawAmount);

       if (_type != WantType.WANT_TYPE_SINGLE) {
            _removeLiquidity(address(pair), address(this));

            address[] memory path = new address[](3);
            path[0] = pair.token0();
            path[1] = pair.token1();
            path[2] = _desiredToken;

            _approveTokenIfNeeded(path[0], address(oneInchRouter));
            _approveTokenIfNeeded(path[1], address(oneInchRouter));

            if (_desiredToken != path[0]) {
                _swapViaOneInch(path[0], _dataToken0);
            }

            if (_desiredToken != path[1]) {
                _swapViaOneInch(path[1], _dataToken1);
            }

            _returnAssets(path);
        } else {
            address[] memory path = new address[](2);
            path[0] = vault.want();
            path[1] = _desiredToken;

            _approveTokenIfNeeded(path[0], address(oneInchRouter));

            _swapViaOneInch(path[0], _dataToken0);

            _returnAssets(path);
        }
    }

    // Zap out funds from the 'fromMooVault', swap whats needed to swap and reinvest into the 'toMooVault'.
    function beefOutAndReInvest(
        address _fromMooVault, 
        address _toMooVault, 
        uint256 _mooTokenAmount, 
        bytes calldata _token0ToFrom, 
        bytes calldata _token1ToFrom, 
        WantType _fromType, 
        WantType _toType
    ) external {
        (IBeefyVault vault, IUniswapV2Pair pair) = _getVaultPair(_fromMooVault);

        address token0; 
        address token1;
        if (_fromType != WantType.WANT_TYPE_SINGLE) {
            _beefOut(_fromMooVault, _mooTokenAmount);
            token0 = pair.token0();
            token1 = pair.token1();
            if (_toType != WantType.WANT_TYPE_SINGLE) {
                _swapAndStake(_toMooVault, token0, token1, _token0ToFrom, _token1ToFrom, _toType);   
            } else {
                _swapAndStake(_toMooVault, token0, _token0ToFrom);
                _swapAndStake(_toMooVault, token1, _token1ToFrom);
            }
        } else {
            vault.safeTransferFrom(msg.sender, address(this), _mooTokenAmount);
            vault.withdraw(_mooTokenAmount);
            token0 = vault.want();
            token1 = token0;
            _toType == WantType.WANT_TYPE_SINGLE ? _swapAndStake(_toMooVault, token0, _token0ToFrom) : _swapAndStake(_toMooVault, token0, token1, _token0ToFrom, _token1ToFrom, _toType);
        }
    }

    // View function helpers for the app
    // Since solidly stable pairs can be inbalanced we need the proper ratio for our swap, we need to accound both for price of the assets and the ratio of the pair. 
    function quoteStableAddLiquidityRatio(address _beefyVault) external view returns (uint256 ratio1to0) {
            (IBeefyVault vault, IUniswapV2Pair pairAddress) = _getVaultPair(_beefyVault);
            ISolidlyPair pair = ISolidlyPair(address(pairAddress));
            address tokenA = pair.token0();
            address tokenB = pair.token1();

            uint256 investment = IERC20(tokenA).balanceOf(address(pair)) * 10 / 10000;
            uint out = pair.getAmountOut(investment, tokenA);
            ISolidlyRouter router = ISolidlyRouter(IStrategy(vault.strategy()).unirouter());
            (uint amountA, uint amountB,) = router.quoteAddLiquidity(tokenA, tokenB, pair.stable(), investment, out);
                
            amountA = amountA * 1e18 / 10**IERC20Extended(tokenA).decimals();
            amountB = amountB * 1e18 / 10**IERC20Extended(tokenB).decimals();
            out = out * 1e18 / 10**IERC20Extended(tokenB).decimals();
            investment = investment * 1e18 / 10**IERC20Extended(tokenA).decimals();
                
            uint ratio = out * 1e18 / investment * amountA / amountB; 
                
            return 1e18 * 1e18 / (ratio + 1e18);
    }

    // Internal functions
    function _beefOut (address _beefyVault, uint256 _withdrawAmount) private returns (address[] memory tokens) {
        (IBeefyVault vault, IUniswapV2Pair pair) = _getVaultPair(_beefyVault);

        IERC20(_beefyVault).safeTransferFrom(msg.sender, address(this), _withdrawAmount);
        vault.withdraw(_withdrawAmount);

        _removeLiquidity(address(pair), address(this));

        tokens = new address[](2);
        tokens[0] = pair.token0();
        tokens[1] = pair.token1();
        
        emit ZapOut(_beefyVault, address(pair), _withdrawAmount);
    }

    function _removeLiquidity(address _pair, address _to) private {
        IERC20(_pair).safeTransfer(_pair, IERC20(_pair).balanceOf(address(this)));
        (uint256 amount0, uint256 amount1) = IUniswapV2Pair(_pair).burn(_to);

        require(amount0 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_A_AMOUNT');
        require(amount1 >= minimumAmount, 'UniswapV2Router: INSUFFICIENT_B_AMOUNT');
    }

    function _getVaultPair (address _beefyVault) private pure returns (IBeefyVault vault, IUniswapV2Pair pair) {
        vault = IBeefyVault(_beefyVault);

        try vault.want() returns (address pairAddress) {
            pair = IUniswapV2Pair(pairAddress); // Vault V6
        } catch {
            pair = IUniswapV2Pair(vault.token()); // Vault V5
        }
    }

    function _swapAndStake(address _vault, address _inputToken, bytes calldata _token0) private {
        IBeefyVault vault = IBeefyVault(_vault);
        address[] memory path;
        path = new address[](2);
        path[0] = vault.want();
        path[1] = _inputToken;

        _swapViaOneInch(_inputToken, _token0);

        uint256 bal = IERC20(path[0]).balanceOf(address(this));

        _approveTokenIfNeeded(path[0], address(vault));
        vault.deposit(bal);

        vault.safeTransfer(msg.sender, vault.balanceOf(address(this)));
        _returnAssets(path);
    }
  

    function _swapAndStake(address _beefyVault, address _inputToken0, address _inputToken1, bytes calldata _token0, bytes calldata _token1, WantType _type) private {
        (IBeefyVault vault, IUniswapV2Pair pair) =  _getVaultPair(_beefyVault);

        if (_type != WantType.WANT_TYPE_SINGLE) {
            address[] memory path;
            if (_inputToken0 == _inputToken1) {
                path = new address[](3);
                path[0] = pair.token0();
                path[1] = pair.token1();
                path[2] = _inputToken0;
            } else {
                path = new address[](4);
                path[0] = pair.token0();
                path[1] = pair.token1();
                path[2] = _inputToken0;
                path[3] = _inputToken1;
            }

            if (_inputToken0 != path[0]) {
                _swapViaOneInch(_inputToken0, _token0);
            }

            if (_inputToken1 != path[1]) {
                _swapViaOneInch(_inputToken1, _token1);
            }

            address router = IStrategy(vault.strategy()).unirouter();

            _approveTokenIfNeeded(path[0], address(router));
            _approveTokenIfNeeded(path[1], address(router));
            uint256 lp0Amt = IERC20(path[0]).balanceOf(address(this));
            uint256 lp1Amt = IERC20(path[1]).balanceOf(address(this));

            uint256 amountLiquidity;
            if (_type == WantType.WANT_TYPE_SOLIDLY_STABLE || _type == WantType.WANT_TYPE_SOLIDLY_VOLATILE) {
                 bool stable = _type == WantType.WANT_TYPE_SOLIDLY_STABLE ? true : false;
                (,, amountLiquidity) = ISolidlyRouter(router)
                .addLiquidity(path[0], path[1], stable,  lp0Amt, lp1Amt, 1, 1, address(this), block.timestamp);
            } else {
                (,, amountLiquidity) = IUniswapRouterETH(router)
                .addLiquidity(path[0], path[1], lp0Amt, lp1Amt, 1, 1, address(this), block.timestamp);
            }

             _approveTokenIfNeeded(address(pair), address(vault));
            vault.deposit(amountLiquidity);

            vault.safeTransfer(msg.sender, vault.balanceOf(address(this)));
            _returnAssets(path);
        } else {
            _swapAndStake(_beefyVault, _inputToken0, _token0);
        }
    }

    // our main swap function call. we call the aggregator contract with our fed data. if we get an error we revert and return the error result. 
    function _swapViaOneInch(address _inputToken, bytes memory _callData) private {
        
        _approveTokenIfNeeded(_inputToken, address(oneInchRouter));

        (bool success, bytes memory retData) = oneInchRouter.call(_callData);

        propagateError(success, retData, "1inch");

        require(success == true, "calling 1inch got an error");
    }

    function _returnAssets(address[] memory _tokens) private {
        uint256 balance;
        for (uint256 i; i < _tokens.length; i++) {
            balance = IERC20(_tokens[i]).balanceOf(address(this));
            if (balance > 0) {
                if (_tokens[i] == WETH) {
                    IWETH(WETH).withdraw(balance);
                    (bool success,) = msg.sender.call{value: balance}(new bytes(0));
                    require(success, 'Beefy: ETH transfer failed');
                    emit TokenReturned(_tokens[i], balance);
                } else {
                    IERC20(_tokens[i]).safeTransfer(msg.sender, balance);
                    emit TokenReturned(_tokens[i], balance);
                }
            }
        }
    }

    function _approveTokenIfNeeded(address _token, address _spender) private {
        if (IERC20(_token).allowance(address(this), _spender) == 0) {
            IERC20(_token).safeApprove(_spender, type(uint).max);
        }
    }

    // Error reporting from our call to the aggrator contract when we try to swap. 
      function propagateError(
        bool success,
        bytes memory data,
        string memory errorMessage
    ) public pure {
        // Forward error message from call/delegatecall
        if (!success) {
            if (data.length == 0) revert(errorMessage);
            assembly {
                revert(add(32, data), mload(data))
            }
        }
    }

    receive() external payable {
        assert(msg.sender == WETH);
    }
}

File 2 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

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

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

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

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

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

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

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

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

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

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

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

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

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

        return true;
    }

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

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

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

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

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

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

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

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

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

        _afterTokenTransfer(account, address(0), amount);
    }

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

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

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 3 of 17 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 4 of 17 : IERC20Metadata.sol
// 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);
}

File 5 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 6 of 17 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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");
        }
    }
}

File 7 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly
                /// @solidity memory-safe-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 17 : Context.sol
// 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;
    }
}

File 9 of 17 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`.
        // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`.
        // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`.
        // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a
        // good first aproximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1;
        uint256 x = a;
        if (x >> 128 > 0) {
            x >>= 128;
            result <<= 64;
        }
        if (x >> 64 > 0) {
            x >>= 64;
            result <<= 32;
        }
        if (x >> 32 > 0) {
            x >>= 32;
            result <<= 16;
        }
        if (x >> 16 > 0) {
            x >>= 16;
            result <<= 8;
        }
        if (x >> 8 > 0) {
            x >>= 8;
            result <<= 4;
        }
        if (x >> 4 > 0) {
            x >>= 4;
            result <<= 2;
        }
        if (x >> 2 > 0) {
            result <<= 1;
        }

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        uint256 result = sqrt(a);
        if (rounding == Rounding.Up && result * result < a) {
            result += 1;
        }
        return result;
    }
}

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

pragma solidity >=0.6.0 <0.9.0;

interface ISolidlyPair {
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function burn(address to) external returns (uint amount0, uint amount1);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function stable() external view returns (bool);
    function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256);
}

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

pragma solidity >=0.6.0 <0.9.0;
pragma experimental ABIEncoderV2;
interface ISolidlyRouter {

    // 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 getAmountsOut(uint amountIn, Routes[] memory routes) external view returns (uint[] memory amounts);
   
    function quoteAddLiquidity(
        address tokenA,
        address tokenB,
        bool stable,
        uint amountADesired,
        uint amountBDesired
    ) external view returns (uint amountA, uint amountB, uint liquidity);
}

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

pragma solidity >=0.6.0 <0.9.0;

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

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

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

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

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

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

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

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

pragma solidity >=0.6.0 <0.9.0;

interface IUniswapV2Pair {
    function factory() external view returns (address);
    function token0() external view returns (address);
    function token1() external view returns (address);
    function burn(address to) external returns (uint amount0, uint amount1);
    function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
    function totalSupply() external view returns (uint256);
    function kLast() external view returns (uint256);
}

File 14 of 17 : IBeefyVault.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

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

interface IBeefyVault is IERC20 {
    function deposit(uint256 amount) external;
    function withdraw(uint256 shares) external;
    function want() external pure returns (address); // Beefy Vault V6
    function token() external pure returns (address); // Beefy Vault V5
    function balance() external pure returns (uint256);
    function totalSupply() external pure returns (uint256);
    function strategy() external pure returns (address);
}

File 15 of 17 : IERC20Extended.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;


interface IERC20Extended {
    function decimals() external view returns (uint256);
}

File 16 of 17 : IStrategy.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IStrategy {
    function withdrawalFee() external view returns (uint256);
    function unirouter() external view returns (address);
    function routerPoolId() external view returns (uint256);
    function stargateRouter() external view returns (address);
    function depositToken() external view returns (address);
    function stableRouter() external view returns (address);
    function depositIndex() external view returns (uint256);
}

File 17 of 17 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin-4/contracts/token/ERC20/ERC20.sol";

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_oneInchRouter","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenReturned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"}],"name":"ZapIn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"address","name":"desiredToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"mooTokenIn","type":"uint256"}],"name":"ZapOut","type":"event"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyVault","type":"address"},{"internalType":"address","name":"_inputToken","type":"address"},{"internalType":"uint256","name":"_tokenInAmount","type":"uint256"},{"internalType":"bytes","name":"_token0","type":"bytes"},{"internalType":"bytes","name":"_token1","type":"bytes"},{"internalType":"enum BeefyZapOneInch.WantType","name":"_type","type":"uint8"}],"name":"beefIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyVault","type":"address"},{"internalType":"bytes","name":"_token0","type":"bytes"},{"internalType":"bytes","name":"_token1","type":"bytes"},{"internalType":"enum BeefyZapOneInch.WantType","name":"_type","type":"uint8"}],"name":"beefInETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyVault","type":"address"},{"internalType":"uint256","name":"_withdrawAmount","type":"uint256"}],"name":"beefOut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_fromMooVault","type":"address"},{"internalType":"address","name":"_toMooVault","type":"address"},{"internalType":"uint256","name":"_mooTokenAmount","type":"uint256"},{"internalType":"bytes","name":"_token0ToFrom","type":"bytes"},{"internalType":"bytes","name":"_token1ToFrom","type":"bytes"},{"internalType":"enum BeefyZapOneInch.WantType","name":"_fromType","type":"uint8"},{"internalType":"enum BeefyZapOneInch.WantType","name":"_toType","type":"uint8"}],"name":"beefOutAndReInvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyVault","type":"address"},{"internalType":"uint256","name":"_withdrawAmount","type":"uint256"},{"internalType":"address","name":"_desiredToken","type":"address"},{"internalType":"bytes","name":"_dataToken0","type":"bytes"},{"internalType":"bytes","name":"_dataToken1","type":"bytes"},{"internalType":"enum BeefyZapOneInch.WantType","name":"_type","type":"uint8"}],"name":"beefOutAndSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minimumAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oneInchRouter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"success","type":"bool"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"string","name":"errorMessage","type":"string"}],"name":"propagateError","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"_beefyVault","type":"address"}],"name":"quoteStableAddLiquidityRatio","outputs":[{"internalType":"uint256","name":"ratio1to0","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c06040523480156200001157600080fd5b50604051620035bf380380620035bf83398101604081905262000034916200011d565b806001600160a01b031663d0e30db060006040518263ffffffff1660e01b81526004016000604051808303818588803b1580156200007157600080fd5b505af115801562000086573d6000803e3d6000fd5b5050604051632e1a7d4d60e01b8152600060048201526001600160a01b0385169350632e1a7d4d92506024019050600060405180830381600087803b158015620000cf57600080fd5b505af1158015620000e4573d6000803e3d6000fd5b5050506001600160a01b0391821660a052501660805262000155565b80516001600160a01b03811681146200011857600080fd5b919050565b600080604083850312156200013157600080fd5b6200013c8362000100565b91506200014c6020840162000100565b90509250929050565b60805160a0516133ff620001c06000396000818160a5015281816101dd01528181610b2c01528181610ba401528181610bc501528181610c120152818161229501526122fb01526000818161019101528181610f1c0152818161277a01526127a301526133ff6000f3fe6080604052600436106100955760003560e01c8063ac3af20811610059578063ac3af2081461017f578063ad5c4648146101cb578063bb0c8298146101ff578063d2e7795b14610215578063e4fd396e1461023557600080fd5b806337d9c96a146100d957806366a8a8d31461010c57806389a2af821461012c57806393cf97f81461013f578063a28c361b1461015f57600080fd5b366100d457336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146100d2576100d2612c34565b005b600080fd5b3480156100e557600080fd5b506100f96100f4366004612c62565b610255565b6040519081526020015b60405180910390f35b34801561011857600080fd5b506100d2610127366004612cdc565b6108a0565b6100d261013a366004612d9b565b610aff565b34801561014b57600080fd5b506100d261015a366004612ec7565b610c51565b34801561016b57600080fd5b506100d261017a366004612f68565b610c86565b34801561018b57600080fd5b506101b37f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610103565b3480156101d757600080fd5b506101b37f000000000000000000000000000000000000000000000000000000000000000081565b34801561020b57600080fd5b506100f96103e881565b34801561022157600080fd5b506100d2610230366004612f94565b610c9d565b34801561024157600080fd5b506100d2610250366004613043565b6111ac565b600080600061026384611238565b9150915060008190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d0919061309e565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610312573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610336919061309e565b6040516370a0823160e01b81526001600160a01b03858116600483015291925060009161271091908516906370a0823190602401602060405180830381865afa158015610387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ab91906130bb565b6103b690600a6130ea565b6103c09190613109565b6040516378a051ad60e11b8152600481018290526001600160a01b03858116602483015291925060009186169063f140a35a90604401602060405180830381865afa158015610413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043791906130bb565b90506000876001600160a01b031663a8c62e766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d919061309e565b6001600160a01b031663257ae0de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fe919061309e565b9050600080826001600160a01b03166398a0fb3c88888b6001600160a01b03166322be3de16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610552573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610576919061312b565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015215156044820152606481018890526084810187905260a401606060405180830381865afa1580156105d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fc9190613148565b5091509150866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066391906130bb565b61066e90600a61325c565b61068083670de0b6b3a76400006130ea565b61068a9190613109565b9150856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ee91906130bb565b6106f990600a61325c565b61070b82670de0b6b3a76400006130ea565b6107159190613109565b9050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077991906130bb565b61078490600a61325c565b61079685670de0b6b3a76400006130ea565b6107a09190613109565b9350866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080491906130bb565b61080f90600a61325c565b61082186670de0b6b3a76400006130ea565b61082b9190613109565b9450600081838761084488670de0b6b3a76400006130ea565b61084e9190613109565b61085891906130ea565b6108629190613109565b905061087681670de0b6b3a7640000613268565b61088f906ec097ce7bc90715b34b9f1000000000613109565b9d9c50505050505050505050505050565b6000806108ac8b611238565b9092509050600080808660038111156108c7576108c7613280565b146109e5576108d68d8c611305565b50826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610915573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610939919061309e565b9150826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d919061309e565b905060008560038111156109b3576109b3613280565b146109cd576109c88c83838d8d8d8d8c61151e565b610af0565b6109d98c838c8c611ed2565b6109c88c828a8a611ed2565b6109fa6001600160a01b03851633308e61219a565b604051632e1a7d4d60e01b8152600481018c90526001600160a01b03851690632e1a7d4d90602401600060405180830381600087803b158015610a3c57600080fd5b505af1158015610a50573d6000803e3d6000fd5b50505050836001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061309e565b91508190506000856003811115610acf57610acf613280565b14610ae4576109c88c83838d8d8d8d8c61151e565b610af08c838c8c611ed2565b50505050505050505050505050565b6103e8341015610b2a5760405162461bcd60e51b8152600401610b2190613296565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b8557600080fd5b505af1158015610b99573d6000803e3d6000fd5b5050505050610bee867f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000888888888861151e565b7f4fd86e42fdf9189d86bda34d3e693c24264ea2b54ff7796d9e1d40f5e29f4f59867f000000000000000000000000000000000000000000000000000000000000000034604051610c41939291906132d7565b60405180910390a1505050505050565b82610c81578151600003610c79578060405162461bcd60e51b8152600401610b219190613327565b815182602001fd5b505050565b6000610c928383611305565b9050610c81816121f8565b600080610ca98a611238565b9092509050610cc36001600160a01b03831633308c61219a565b604051632e1a7d4d60e01b8152600481018a90526001600160a01b03831690632e1a7d4d90602401600060405180830381600087803b158015610d0557600080fd5b505af1158015610d19573d6000803e3d6000fd5b505050507fde160ef457e2842f9b597ec662dc8b390d699ba99300cfe5429f960b4bffd2f08a898b604051610d50939291906132d7565b60405180910390a16000836003811115610d6c57610d6c613280565b1461107f57610d7b813061252e565b6040805160038082526080820190925260009160208201606080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e00919061309e565b81600081518110610e1357610e1361335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e95919061309e565b81600181518110610ea857610ea861335a565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600281518110610edc57610edc61335a565b60200260200101906001600160a01b031690816001600160a01b031681525050610f4081600081518110610f1257610f1261335a565b60200260200101517f00000000000000000000000000000000000000000000000000000000000000006126e3565b610f5681600181518110610f1257610f1261335a565b80600081518110610f6957610f6961335a565b60200260200101516001600160a01b0316896001600160a01b031614610fe357610fe381600081518110610f9f57610f9f61335a565b602002602001015189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b80600181518110610ff657610ff661335a565b60200260200101516001600160a01b0316896001600160a01b031614611070576110708160018151811061102c5761102c61335a565b602002602001015187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b611079816121f8565b506111a0565b604080516002808252606082018352600092602083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611102919061309e565b816000815181106111155761111561335a565b60200260200101906001600160a01b031690816001600160a01b03168152505088816001815181106111495761114961335a565b60200260200101906001600160a01b031690816001600160a01b03168152505061117f81600081518110610f1257610f1261335a565b61119581600081518110610f9f57610f9f61335a565b61119e816121f8565b505b50505050505050505050565b6103e88610156111ce5760405162461bcd60e51b8152600401610b2190613296565b6111e36001600160a01b03881633308961219a565b6111f3888889888888888861151e565b7f4fd86e42fdf9189d86bda34d3e693c24264ea2b54ff7796d9e1d40f5e29f4f59888888604051611226939291906132d7565b60405180910390a15050505050505050565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611298575060408051601f3d908101601f191682019092526112959181019061309e565b60015b6112fe57816001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe919061309e565b9050915091565b606060008061131385611238565b909250905061132d6001600160a01b03861633308761219a565b604051632e1a7d4d60e01b8152600481018590526001600160a01b03831690632e1a7d4d90602401600060405180830381600087803b15801561136f57600080fd5b505af1158015611383573d6000803e3d6000fd5b50505050611391813061252e565b6040805160028082526060820183529091602083019080368337019050509250806001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611413919061309e565b836000815181106114265761142661335a565b60200260200101906001600160a01b031690816001600160a01b031681525050806001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061309e565b836001815181106114bb576114bb61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250507fde160ef457e2842f9b597ec662dc8b390d699ba99300cfe5429f960b4bffd2f085828660405161150e939291906132d7565b60405180910390a1505092915050565b60008061152a8a611238565b9092509050600083600381111561154357611543613280565b14611eca576060886001600160a01b03168a6001600160a01b0316036116e757604080516003808252608082019092529060208201606080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e6919061309e565b816000815181106115f9576115f961335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611657573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167b919061309e565b8160018151811061168e5761168e61335a565b60200260200101906001600160a01b031690816001600160a01b03168152505089816002815181106116c2576116c261335a565b60200260200101906001600160a01b031690816001600160a01b03168152505061189b565b60408051600480825260a082019092529060208201608080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176a919061309e565b8160008151811061177d5761177d61335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ff919061309e565b816001815181106118125761181261335a565b60200260200101906001600160a01b031690816001600160a01b03168152505089816002815181106118465761184661335a565b60200260200101906001600160a01b031690816001600160a01b031681525050888160038151811061187a5761187a61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250505b806000815181106118ae576118ae61335a565b60200260200101516001600160a01b03168a6001600160a01b03161461190e5761190e8a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b806001815181106119215761192161335a565b60200260200101516001600160a01b0316896001600160a01b031614611981576119818987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6000836001600160a01b031663a8c62e766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e5919061309e565b6001600160a01b031663257ae0de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a46919061309e565b9050611a6c82600081518110611a5e57611a5e61335a565b6020026020010151826126e3565b611a8282600181518110611a5e57611a5e61335a565b600082600081518110611a9757611a9761335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0b91906130bb565b9050600083600181518110611b2257611b2261335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9691906130bb565b905060006002886003811115611bae57611bae613280565b1480611bcb57506003886003811115611bc957611bc9613280565b145b15611ced5760006002896003811115611be657611be6613280565b14611bf2576000611bf5565b60015b9050846001600160a01b0316635a47ddc387600081518110611c1957611c1961335a565b602002602001015188600181518110611c3457611c3461335a565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015283151560448201526064810187905260848101869052600160a4820181905260c48201523060e482015242610104820152610124016060604051808303816000875af1158015611cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce29190613148565b9350611dd492505050565b836001600160a01b031663e8e3370086600081518110611d0f57611d0f61335a565b602002602001015187600181518110611d2a57611d2a61335a565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018690526064810185905260016084820181905260a48201523060c48201524260e4820152610104016060604051808303816000875af1158015611dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcf9190613148565b925050505b611dde86886126e3565b60405163b6b55f2560e01b8152600481018290526001600160a01b0388169063b6b55f2590602401600060405180830381600087803b158015611e2057600080fd5b505af1158015611e34573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152611eb792503391506001600160a01b038a16906370a0823190602401602060405180830381865afa158015611e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea691906130bb565b6001600160a01b038a16919061289a565b611ec0856121f8565b50505050506111a0565b6111a08a8a89895b60408051600280825260608083018452879390929190602083019080368337019050509050816001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f59919061309e565b81600081518110611f6c57611f6c61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250508481600181518110611fa057611fa061335a565b60200260200101906001600160a01b031690816001600160a01b0316815250506120008585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6000816000815181106120155761201561335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612065573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208991906130bb565b90506120af826000815181106120a1576120a161335a565b6020026020010151846126e3565b60405163b6b55f2560e01b8152600481018290526001600160a01b0384169063b6b55f2590602401600060405180830381600087803b1580156120f157600080fd5b505af1158015612105573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015261218892503391506001600160a01b038616906370a0823190602401602060405180830381865afa158015612153573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217791906130bb565b6001600160a01b038616919061289a565b612191826121f8565b50505050505050565b6121f2846323b872dd60e01b8585856040516024016121bb939291906132d7565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526128ca565b50505050565b6000805b8251811015610c81578281815181106122175761221761335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228b91906130bb565b9150811561251c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03168382815181106122cf576122cf61335a565b60200260200101516001600160a01b03160361247e57604051632e1a7d4d60e01b8152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561234757600080fd5b505af115801561235b573d6000803e3d6000fd5b505060408051600080825260208201928390529350339250859161237f9190613370565b60006040518083038185875af1925050503d80600081146123bc576040519150601f19603f3d011682016040523d82523d6000602084013e6123c1565b606091505b50509050806124125760405162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c65640000000000006044820152606401610b21565b7feaf449319c042c9ba3474fa0c5329eb58cd1f23be110cdbf9d697b8d303dac158483815181106124455761244561335a565b6020026020010151846040516124709291906001600160a01b03929092168252602082015260400190565b60405180910390a15061251c565b6124b533838584815181106124955761249561335a565b60200260200101516001600160a01b031661289a9092919063ffffffff16565b7feaf449319c042c9ba3474fa0c5329eb58cd1f23be110cdbf9d697b8d303dac158382815181106124e8576124e861335a565b6020026020010151836040516125139291906001600160a01b03929092168252602082015260400190565b60405180910390a15b806125268161338c565b9150506121fc565b6040516370a0823160e01b81523060048201526125ad9083906001600160a01b038216906370a0823190602401602060405180830381865afa158015612578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259c91906130bb565b6001600160a01b038516919061289a565b60405163226bf2d160e21b81526001600160a01b03828116600483015260009182918516906389afcb449060240160408051808303816000875af11580156125f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061261d91906133a5565b915091506103e88210156126825760405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f415f604482015265105353d5539560d21b6064820152608401610b21565b6103e88110156121f25760405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f425f604482015265105353d5539560d21b6064820152608401610b21565b604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e90604401602060405180830381865afa15801561272f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275391906130bb565b600003612770576127706001600160a01b0383168260001961299c565b5050565b61279e827f00000000000000000000000000000000000000000000000000000000000000006126e3565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836040516127d99190613370565b6000604051808303816000865af19150503d8060008114612816576040519150601f19603f3d011682016040523d82523d6000602084013e61281b565b606091505b5091509150612848828260405180604001604052806005815260200164062d2dcc6d60db1b815250610c51565b6001821515146121f25760405162461bcd60e51b815260206004820152601a60248201527f63616c6c696e672031696e636820676f7420616e206572726f720000000000006044820152606401610b21565b6040516001600160a01b038316602482015260448101829052610c8190849063a9059cbb60e01b906064016121bb565b600061291f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ab19092919063ffffffff16565b805190915015610c81578080602001905181019061293d919061312b565b610c815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b21565b801580612a165750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156129f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1491906130bb565b155b612a815760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610b21565b6040516001600160a01b038316602482015260448101829052610c8190849063095ea7b360e01b906064016121bb565b6060612ac08484600085612aca565b90505b9392505050565b606082471015612b2b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b21565b6001600160a01b0385163b612b825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b21565b600080866001600160a01b03168587604051612b9e9190613370565b60006040518083038185875af1925050503d8060008114612bdb576040519150601f19603f3d011682016040523d82523d6000602084013e612be0565b606091505b5091509150612bf0828286612bfb565b979650505050505050565b60608315612c0a575081612ac3565b825115612c1a5782518084602001fd5b8160405162461bcd60e51b8152600401610b219190613327565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b0381168114612c5f57600080fd5b50565b600060208284031215612c7457600080fd5b8135612ac381612c4a565b60008083601f840112612c9157600080fd5b50813567ffffffffffffffff811115612ca957600080fd5b602083019150836020828501011115612cc157600080fd5b9250929050565b803560048110612cd757600080fd5b919050565b600080600080600080600080600060e08a8c031215612cfa57600080fd5b8935612d0581612c4a565b985060208a0135612d1581612c4a565b975060408a0135965060608a013567ffffffffffffffff80821115612d3957600080fd5b612d458d838e01612c7f565b909850965060808c0135915080821115612d5e57600080fd5b50612d6b8c828d01612c7f565b9095509350612d7e905060a08b01612cc8565b9150612d8c60c08b01612cc8565b90509295985092959850929598565b60008060008060008060808789031215612db457600080fd5b8635612dbf81612c4a565b9550602087013567ffffffffffffffff80821115612ddc57600080fd5b612de88a838b01612c7f565b90975095506040890135915080821115612e0157600080fd5b50612e0e89828a01612c7f565b9094509250612e21905060608801612cc8565b90509295509295509295565b8015158114612c5f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612e6c57612e6c612e3b565b604051601f8501601f19908116603f01168101908282118183101715612e9457612e94612e3b565b81604052809350858152868686011115612ead57600080fd5b858560208301376000602087830101525050509392505050565b600080600060608486031215612edc57600080fd5b8335612ee781612e2d565b9250602084013567ffffffffffffffff80821115612f0457600080fd5b818601915086601f830112612f1857600080fd5b612f2787833560208501612e51565b93506040860135915080821115612f3d57600080fd5b508401601f81018613612f4f57600080fd5b612f5e86823560208401612e51565b9150509250925092565b60008060408385031215612f7b57600080fd5b8235612f8681612c4a565b946020939093013593505050565b60008060008060008060008060c0898b031215612fb057600080fd5b8835612fbb81612c4a565b9750602089013596506040890135612fd281612c4a565b9550606089013567ffffffffffffffff80821115612fef57600080fd5b612ffb8c838d01612c7f565b909750955060808b013591508082111561301457600080fd5b506130218b828c01612c7f565b9094509250613034905060a08a01612cc8565b90509295985092959890939650565b60008060008060008060008060c0898b03121561305f57600080fd5b883561306a81612c4a565b9750602089013561307a81612c4a565b965060408901359550606089013567ffffffffffffffff80821115612fef57600080fd5b6000602082840312156130b057600080fd5b8151612ac381612c4a565b6000602082840312156130cd57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613104576131046130d4565b500290565b60008261312657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561313d57600080fd5b8151612ac381612e2d565b60008060006060848603121561315d57600080fd5b8351925060208401519150604084015190509250925092565b600181815b808511156131b1578160001904821115613197576131976130d4565b808516156131a457918102915b93841c939080029061317b565b509250929050565b6000826131c857506001613256565b816131d557506000613256565b81600181146131eb57600281146131f557613211565b6001915050613256565b60ff841115613206576132066130d4565b50506001821b613256565b5060208310610133831016604e8410600b8410161715613234575081810a613256565b61323e8383613176565b8060001904821115613252576132526130d4565b0290505b92915050565b6000612ac383836131b9565b6000821982111561327b5761327b6130d4565b500190565b634e487b7160e01b600052602160045260246000fd5b60208082526021908201527f42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e6040820152601d60fa1b606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133165781810151838201526020016132fe565b838111156121f25750506000910152565b60208152600082518060208401526133468160408501602087016132fb565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600082516133828184602087016132fb565b9190910192915050565b60006001820161339e5761339e6130d4565b5060010190565b600080604083850312156133b857600080fd5b50508051602090910151909290915056fea26469706673582212201adc43bb3a51d8560028ea3b919fb7a7a97d9cc829be5cbf91aa66664291641564736f6c634300080f00330000000000000000000000001111111254eeb25477b68fb85ed929f73a960582000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106100955760003560e01c8063ac3af20811610059578063ac3af2081461017f578063ad5c4648146101cb578063bb0c8298146101ff578063d2e7795b14610215578063e4fd396e1461023557600080fd5b806337d9c96a146100d957806366a8a8d31461010c57806389a2af821461012c57806393cf97f81461013f578063a28c361b1461015f57600080fd5b366100d457336001600160a01b037f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc216146100d2576100d2612c34565b005b600080fd5b3480156100e557600080fd5b506100f96100f4366004612c62565b610255565b6040519081526020015b60405180910390f35b34801561011857600080fd5b506100d2610127366004612cdc565b6108a0565b6100d261013a366004612d9b565b610aff565b34801561014b57600080fd5b506100d261015a366004612ec7565b610c51565b34801561016b57600080fd5b506100d261017a366004612f68565b610c86565b34801561018b57600080fd5b506101b37f0000000000000000000000001111111254eeb25477b68fb85ed929f73a96058281565b6040516001600160a01b039091168152602001610103565b3480156101d757600080fd5b506101b37f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561020b57600080fd5b506100f96103e881565b34801561022157600080fd5b506100d2610230366004612f94565b610c9d565b34801561024157600080fd5b506100d2610250366004613043565b6111ac565b600080600061026384611238565b9150915060008190506000816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102d0919061309e565b90506000826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610312573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610336919061309e565b6040516370a0823160e01b81526001600160a01b03858116600483015291925060009161271091908516906370a0823190602401602060405180830381865afa158015610387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ab91906130bb565b6103b690600a6130ea565b6103c09190613109565b6040516378a051ad60e11b8152600481018290526001600160a01b03858116602483015291925060009186169063f140a35a90604401602060405180830381865afa158015610413573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043791906130bb565b90506000876001600160a01b031663a8c62e766040518163ffffffff1660e01b8152600401602060405180830381865afa158015610479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061049d919061309e565b6001600160a01b031663257ae0de6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104fe919061309e565b9050600080826001600160a01b03166398a0fb3c88888b6001600160a01b03166322be3de16040518163ffffffff1660e01b8152600401602060405180830381865afa158015610552573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610576919061312b565b6040516001600160e01b031960e086901b1681526001600160a01b03938416600482015292909116602483015215156044820152606481018890526084810187905260a401606060405180830381865afa1580156105d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105fc9190613148565b5091509150866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801561063f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066391906130bb565b61066e90600a61325c565b61068083670de0b6b3a76400006130ea565b61068a9190613109565b9150856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ee91906130bb565b6106f990600a61325c565b61070b82670de0b6b3a76400006130ea565b6107159190613109565b9050856001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077991906130bb565b61078490600a61325c565b61079685670de0b6b3a76400006130ea565b6107a09190613109565b9350866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107e0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080491906130bb565b61080f90600a61325c565b61082186670de0b6b3a76400006130ea565b61082b9190613109565b9450600081838761084488670de0b6b3a76400006130ea565b61084e9190613109565b61085891906130ea565b6108629190613109565b905061087681670de0b6b3a7640000613268565b61088f906ec097ce7bc90715b34b9f1000000000613109565b9d9c50505050505050505050505050565b6000806108ac8b611238565b9092509050600080808660038111156108c7576108c7613280565b146109e5576108d68d8c611305565b50826001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610915573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610939919061309e565b9150826001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099d919061309e565b905060008560038111156109b3576109b3613280565b146109cd576109c88c83838d8d8d8d8c61151e565b610af0565b6109d98c838c8c611ed2565b6109c88c828a8a611ed2565b6109fa6001600160a01b03851633308e61219a565b604051632e1a7d4d60e01b8152600481018c90526001600160a01b03851690632e1a7d4d90602401600060405180830381600087803b158015610a3c57600080fd5b505af1158015610a50573d6000803e3d6000fd5b50505050836001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab6919061309e565b91508190506000856003811115610acf57610acf613280565b14610ae4576109c88c83838d8d8d8d8c61151e565b610af08c838c8c611ed2565b50505050505050505050505050565b6103e8341015610b2a5760405162461bcd60e51b8152600401610b2190613296565b60405180910390fd5b7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015610b8557600080fd5b505af1158015610b99573d6000803e3d6000fd5b5050505050610bee867f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc27f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2888888888861151e565b7f4fd86e42fdf9189d86bda34d3e693c24264ea2b54ff7796d9e1d40f5e29f4f59867f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc234604051610c41939291906132d7565b60405180910390a1505050505050565b82610c81578151600003610c79578060405162461bcd60e51b8152600401610b219190613327565b815182602001fd5b505050565b6000610c928383611305565b9050610c81816121f8565b600080610ca98a611238565b9092509050610cc36001600160a01b03831633308c61219a565b604051632e1a7d4d60e01b8152600481018a90526001600160a01b03831690632e1a7d4d90602401600060405180830381600087803b158015610d0557600080fd5b505af1158015610d19573d6000803e3d6000fd5b505050507fde160ef457e2842f9b597ec662dc8b390d699ba99300cfe5429f960b4bffd2f08a898b604051610d50939291906132d7565b60405180910390a16000836003811115610d6c57610d6c613280565b1461107f57610d7b813061252e565b6040805160038082526080820190925260009160208201606080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e00919061309e565b81600081518110610e1357610e1361335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e95919061309e565b81600181518110610ea857610ea861335a565b60200260200101906001600160a01b031690816001600160a01b0316815250508881600281518110610edc57610edc61335a565b60200260200101906001600160a01b031690816001600160a01b031681525050610f4081600081518110610f1257610f1261335a565b60200260200101517f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826126e3565b610f5681600181518110610f1257610f1261335a565b80600081518110610f6957610f6961335a565b60200260200101516001600160a01b0316896001600160a01b031614610fe357610fe381600081518110610f9f57610f9f61335a565b602002602001015189898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b80600181518110610ff657610ff661335a565b60200260200101516001600160a01b0316896001600160a01b031614611070576110708160018151811061102c5761102c61335a565b602002602001015187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b611079816121f8565b506111a0565b604080516002808252606082018352600092602083019080368337019050509050826001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611102919061309e565b816000815181106111155761111561335a565b60200260200101906001600160a01b031690816001600160a01b03168152505088816001815181106111495761114961335a565b60200260200101906001600160a01b031690816001600160a01b03168152505061117f81600081518110610f1257610f1261335a565b61119581600081518110610f9f57610f9f61335a565b61119e816121f8565b505b50505050505050505050565b6103e88610156111ce5760405162461bcd60e51b8152600401610b2190613296565b6111e36001600160a01b03881633308961219a565b6111f3888889888888888861151e565b7f4fd86e42fdf9189d86bda34d3e693c24264ea2b54ff7796d9e1d40f5e29f4f59888888604051611226939291906132d7565b60405180910390a15050505050505050565b600080829150816001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015611298575060408051601f3d908101601f191682019092526112959181019061309e565b60015b6112fe57816001600160a01b031663fc0c546a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156112da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112fe919061309e565b9050915091565b606060008061131385611238565b909250905061132d6001600160a01b03861633308761219a565b604051632e1a7d4d60e01b8152600481018590526001600160a01b03831690632e1a7d4d90602401600060405180830381600087803b15801561136f57600080fd5b505af1158015611383573d6000803e3d6000fd5b50505050611391813061252e565b6040805160028082526060820183529091602083019080368337019050509250806001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611413919061309e565b836000815181106114265761142661335a565b60200260200101906001600160a01b031690816001600160a01b031681525050806001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061309e565b836001815181106114bb576114bb61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250507fde160ef457e2842f9b597ec662dc8b390d699ba99300cfe5429f960b4bffd2f085828660405161150e939291906132d7565b60405180910390a1505092915050565b60008061152a8a611238565b9092509050600083600381111561154357611543613280565b14611eca576060886001600160a01b03168a6001600160a01b0316036116e757604080516003808252608082019092529060208201606080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa1580156115c2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e6919061309e565b816000815181106115f9576115f961335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa158015611657573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167b919061309e565b8160018151811061168e5761168e61335a565b60200260200101906001600160a01b031690816001600160a01b03168152505089816002815181106116c2576116c261335a565b60200260200101906001600160a01b031690816001600160a01b03168152505061189b565b60408051600480825260a082019092529060208201608080368337019050509050816001600160a01b0316630dfe16816040518163ffffffff1660e01b8152600401602060405180830381865afa158015611746573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176a919061309e565b8160008151811061177d5761177d61335a565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663d21220a76040518163ffffffff1660e01b8152600401602060405180830381865afa1580156117db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ff919061309e565b816001815181106118125761181261335a565b60200260200101906001600160a01b031690816001600160a01b03168152505089816002815181106118465761184661335a565b60200260200101906001600160a01b031690816001600160a01b031681525050888160038151811061187a5761187a61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250505b806000815181106118ae576118ae61335a565b60200260200101516001600160a01b03168a6001600160a01b03161461190e5761190e8a89898080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b806001815181106119215761192161335a565b60200260200101516001600160a01b0316896001600160a01b031614611981576119818987878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6000836001600160a01b031663a8c62e766040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119c1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e5919061309e565b6001600160a01b031663257ae0de6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a46919061309e565b9050611a6c82600081518110611a5e57611a5e61335a565b6020026020010151826126e3565b611a8282600181518110611a5e57611a5e61335a565b600082600081518110611a9757611a9761335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611ae7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0b91906130bb565b9050600083600181518110611b2257611b2261335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611b72573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b9691906130bb565b905060006002886003811115611bae57611bae613280565b1480611bcb57506003886003811115611bc957611bc9613280565b145b15611ced5760006002896003811115611be657611be6613280565b14611bf2576000611bf5565b60015b9050846001600160a01b0316635a47ddc387600081518110611c1957611c1961335a565b602002602001015188600181518110611c3457611c3461335a565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b0392831660048201529116602482015283151560448201526064810187905260848101869052600160a4820181905260c48201523060e482015242610104820152610124016060604051808303816000875af1158015611cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ce29190613148565b9350611dd492505050565b836001600160a01b031663e8e3370086600081518110611d0f57611d0f61335a565b602002602001015187600181518110611d2a57611d2a61335a565b60209081029190910101516040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604481018690526064810185905260016084820181905260a48201523060c48201524260e4820152610104016060604051808303816000875af1158015611dab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dcf9190613148565b925050505b611dde86886126e3565b60405163b6b55f2560e01b8152600481018290526001600160a01b0388169063b6b55f2590602401600060405180830381600087803b158015611e2057600080fd5b505af1158015611e34573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152611eb792503391506001600160a01b038a16906370a0823190602401602060405180830381865afa158015611e82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea691906130bb565b6001600160a01b038a16919061289a565b611ec0856121f8565b50505050506111a0565b6111a08a8a89895b60408051600280825260608083018452879390929190602083019080368337019050509050816001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f59919061309e565b81600081518110611f6c57611f6c61335a565b60200260200101906001600160a01b031690816001600160a01b0316815250508481600181518110611fa057611fa061335a565b60200260200101906001600160a01b031690816001600160a01b0316815250506120008585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061277492505050565b6000816000815181106120155761201561335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612065573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208991906130bb565b90506120af826000815181106120a1576120a161335a565b6020026020010151846126e3565b60405163b6b55f2560e01b8152600481018290526001600160a01b0384169063b6b55f2590602401600060405180830381600087803b1580156120f157600080fd5b505af1158015612105573d6000803e3d6000fd5b50506040516370a0823160e01b815230600482015261218892503391506001600160a01b038616906370a0823190602401602060405180830381865afa158015612153573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217791906130bb565b6001600160a01b038616919061289a565b612191826121f8565b50505050505050565b6121f2846323b872dd60e01b8585856040516024016121bb939291906132d7565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526128ca565b50505050565b6000805b8251811015610c81578281815181106122175761221761335a565b60209081029190910101516040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015612267573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061228b91906130bb565b9150811561251c577f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b03168382815181106122cf576122cf61335a565b60200260200101516001600160a01b03160361247e57604051632e1a7d4d60e01b8152600481018390527f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26001600160a01b031690632e1a7d4d90602401600060405180830381600087803b15801561234757600080fd5b505af115801561235b573d6000803e3d6000fd5b505060408051600080825260208201928390529350339250859161237f9190613370565b60006040518083038185875af1925050503d80600081146123bc576040519150601f19603f3d011682016040523d82523d6000602084013e6123c1565b606091505b50509050806124125760405162461bcd60e51b815260206004820152601a60248201527f42656566793a20455448207472616e73666572206661696c65640000000000006044820152606401610b21565b7feaf449319c042c9ba3474fa0c5329eb58cd1f23be110cdbf9d697b8d303dac158483815181106124455761244561335a565b6020026020010151846040516124709291906001600160a01b03929092168252602082015260400190565b60405180910390a15061251c565b6124b533838584815181106124955761249561335a565b60200260200101516001600160a01b031661289a9092919063ffffffff16565b7feaf449319c042c9ba3474fa0c5329eb58cd1f23be110cdbf9d697b8d303dac158382815181106124e8576124e861335a565b6020026020010151836040516125139291906001600160a01b03929092168252602082015260400190565b60405180910390a15b806125268161338c565b9150506121fc565b6040516370a0823160e01b81523060048201526125ad9083906001600160a01b038216906370a0823190602401602060405180830381865afa158015612578573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061259c91906130bb565b6001600160a01b038516919061289a565b60405163226bf2d160e21b81526001600160a01b03828116600483015260009182918516906389afcb449060240160408051808303816000875af11580156125f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061261d91906133a5565b915091506103e88210156126825760405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f415f604482015265105353d5539560d21b6064820152608401610b21565b6103e88110156121f25760405162461bcd60e51b815260206004820152602660248201527f556e69737761705632526f757465723a20494e53554646494349454e545f425f604482015265105353d5539560d21b6064820152608401610b21565b604051636eb1769f60e11b81523060048201526001600160a01b03828116602483015283169063dd62ed3e90604401602060405180830381865afa15801561272f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061275391906130bb565b600003612770576127706001600160a01b0383168260001961299c565b5050565b61279e827f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826126e3565b6000807f0000000000000000000000001111111254eeb25477b68fb85ed929f73a9605826001600160a01b0316836040516127d99190613370565b6000604051808303816000865af19150503d8060008114612816576040519150601f19603f3d011682016040523d82523d6000602084013e61281b565b606091505b5091509150612848828260405180604001604052806005815260200164062d2dcc6d60db1b815250610c51565b6001821515146121f25760405162461bcd60e51b815260206004820152601a60248201527f63616c6c696e672031696e636820676f7420616e206572726f720000000000006044820152606401610b21565b6040516001600160a01b038316602482015260448101829052610c8190849063a9059cbb60e01b906064016121bb565b600061291f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612ab19092919063ffffffff16565b805190915015610c81578080602001905181019061293d919061312b565b610c815760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610b21565b801580612a165750604051636eb1769f60e11b81523060048201526001600160a01b03838116602483015284169063dd62ed3e90604401602060405180830381865afa1580156129f0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1491906130bb565b155b612a815760405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608401610b21565b6040516001600160a01b038316602482015260448101829052610c8190849063095ea7b360e01b906064016121bb565b6060612ac08484600085612aca565b90505b9392505050565b606082471015612b2b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610b21565b6001600160a01b0385163b612b825760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610b21565b600080866001600160a01b03168587604051612b9e9190613370565b60006040518083038185875af1925050503d8060008114612bdb576040519150601f19603f3d011682016040523d82523d6000602084013e612be0565b606091505b5091509150612bf0828286612bfb565b979650505050505050565b60608315612c0a575081612ac3565b825115612c1a5782518084602001fd5b8160405162461bcd60e51b8152600401610b219190613327565b634e487b7160e01b600052600160045260246000fd5b6001600160a01b0381168114612c5f57600080fd5b50565b600060208284031215612c7457600080fd5b8135612ac381612c4a565b60008083601f840112612c9157600080fd5b50813567ffffffffffffffff811115612ca957600080fd5b602083019150836020828501011115612cc157600080fd5b9250929050565b803560048110612cd757600080fd5b919050565b600080600080600080600080600060e08a8c031215612cfa57600080fd5b8935612d0581612c4a565b985060208a0135612d1581612c4a565b975060408a0135965060608a013567ffffffffffffffff80821115612d3957600080fd5b612d458d838e01612c7f565b909850965060808c0135915080821115612d5e57600080fd5b50612d6b8c828d01612c7f565b9095509350612d7e905060a08b01612cc8565b9150612d8c60c08b01612cc8565b90509295985092959850929598565b60008060008060008060808789031215612db457600080fd5b8635612dbf81612c4a565b9550602087013567ffffffffffffffff80821115612ddc57600080fd5b612de88a838b01612c7f565b90975095506040890135915080821115612e0157600080fd5b50612e0e89828a01612c7f565b9094509250612e21905060608801612cc8565b90509295509295509295565b8015158114612c5f57600080fd5b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612e6c57612e6c612e3b565b604051601f8501601f19908116603f01168101908282118183101715612e9457612e94612e3b565b81604052809350858152868686011115612ead57600080fd5b858560208301376000602087830101525050509392505050565b600080600060608486031215612edc57600080fd5b8335612ee781612e2d565b9250602084013567ffffffffffffffff80821115612f0457600080fd5b818601915086601f830112612f1857600080fd5b612f2787833560208501612e51565b93506040860135915080821115612f3d57600080fd5b508401601f81018613612f4f57600080fd5b612f5e86823560208401612e51565b9150509250925092565b60008060408385031215612f7b57600080fd5b8235612f8681612c4a565b946020939093013593505050565b60008060008060008060008060c0898b031215612fb057600080fd5b8835612fbb81612c4a565b9750602089013596506040890135612fd281612c4a565b9550606089013567ffffffffffffffff80821115612fef57600080fd5b612ffb8c838d01612c7f565b909750955060808b013591508082111561301457600080fd5b506130218b828c01612c7f565b9094509250613034905060a08a01612cc8565b90509295985092959890939650565b60008060008060008060008060c0898b03121561305f57600080fd5b883561306a81612c4a565b9750602089013561307a81612c4a565b965060408901359550606089013567ffffffffffffffff80821115612fef57600080fd5b6000602082840312156130b057600080fd5b8151612ac381612c4a565b6000602082840312156130cd57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615613104576131046130d4565b500290565b60008261312657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561313d57600080fd5b8151612ac381612e2d565b60008060006060848603121561315d57600080fd5b8351925060208401519150604084015190509250925092565b600181815b808511156131b1578160001904821115613197576131976130d4565b808516156131a457918102915b93841c939080029061317b565b509250929050565b6000826131c857506001613256565b816131d557506000613256565b81600181146131eb57600281146131f557613211565b6001915050613256565b60ff841115613206576132066130d4565b50506001821b613256565b5060208310610133831016604e8410600b8410161715613234575081810a613256565b61323e8383613176565b8060001904821115613252576132526130d4565b0290505b92915050565b6000612ac383836131b9565b6000821982111561327b5761327b6130d4565b500190565b634e487b7160e01b600052602160045260246000fd5b60208082526021908201527f42656566793a20496e7369676e69666963616e7420696e70757420616d6f756e6040820152601d60fa1b606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60005b838110156133165781810151838201526020016132fe565b838111156121f25750506000910152565b60208152600082518060208401526133468160408501602087016132fb565b601f01601f19169190910160400192915050565b634e487b7160e01b600052603260045260246000fd5b600082516133828184602087016132fb565b9190910192915050565b60006001820161339e5761339e6130d4565b5060010190565b600080604083850312156133b857600080fd5b50508051602090910151909290915056fea26469706673582212201adc43bb3a51d8560028ea3b919fb7a7a97d9cc829be5cbf91aa66664291641564736f6c634300080f0033

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

0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _oneInchRouter (address): 0x1111111254EEB25477B68fb85Ed929f73A960582
Arg [1] : _WETH (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001111111254eeb25477b68fb85ed929f73a960582
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
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.