Contract 0xd4231D561b0CC13a782530928B3d5761A0502829 2

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xab3993ed2d81e31c847ae2791bceb95c74264bbdf9a3bac96c72f34710f4e4220x60806040201847282022-09-23 17:36:325 days 17 hrs ago0xe878d69526e611d0e547bcfd64f5a28d15ae20fd IN  Create: SettV30 AVAX0.07476692525
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SettV3

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Standard Json-Input format)

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

pragma solidity ^0.8.17;

import "IERC20Upgradeable.sol";
import "SafeMathUpgradeable.sol";
import "AddressUpgradeable.sol";
import "SafeERC20Upgradeable.sol";
import "ERC20Upgradeable.sol";
import "OwnableUpgradeable.sol";
import "PausableUpgradeable.sol";

import "IController.sol";
import "IERC20Detailed.sol";
import "SettAccessControlDefended.sol";
import "BadgerGuestlistApi.sol";

/* 
    Source: https://github.com/iearn-finance/yearn-protocol/blob/develop/contracts/vaults/yVault.sol
    
    Changelog:

    V1.1
    * Strategist no longer has special function calling permissions
    * Version function added to contract
    * All write functions, with the exception of transfer, are pausable
    * Keeper or governance can pause
    * Only governance can unpause

    V1.2
    * Transfer functions are now pausable along with all other non-permissioned write functions
    * All permissioned write functions, with the exception of pause() & unpause(), are pausable as well

    V1.3
    * Add guest list functionality
    * All deposits can be optionally gated by external guestList approval logic on set guestList contract
*/

contract SettV3 is
    ERC20Upgradeable,
    SettAccessControlDefended,
    PausableUpgradeable
{
    using SafeERC20Upgradeable for IERC20Upgradeable;
    using AddressUpgradeable for address;
    using SafeMathUpgradeable for uint256;

    IERC20Upgradeable public token;
    IERC20Upgradeable public depositTokenUp;

    uint256 public min;
    uint256 public constant max = 10000;

    address public controller;

    mapping(address => uint256) public blockLock;

    string internal constant _defaultNamePrefix = "BS-STABLE-USDC-AVALANCHE";
    string internal constant _symbolSymbolPrefix = "BS";

    address public guardian;    
    address public constant USDC = 0xB97EF9Ef8734C71904D8002F8b6Bc66Dd9c48a6E; //MAINNET AVALANCHE
    address public depositToken;

    BadgerGuestListAPI public guestList;

    address[] public wantsArray;
    uint256[] public strategyAllocation;

    event FullPricePerShareUpdated(
        uint256 value,
        uint256 indexed timestamp,
        uint256 indexed blockNumber
    );

    function initialize(
        address _token,
        address _controller,
        address _governance,
        address _keeper,
        address _guardian,
        bool _overrideTokenName,
        string memory _namePrefix,
        string memory _symbolPrefix,
        address[] memory _wantsArray,
        uint256[] memory _strategyAllocation
    ) public initializer whenNotPaused {
        IERC20Detailed namedToken = IERC20Detailed(_token);
        string memory tokenName = namedToken.name();
        string memory tokenSymbol = namedToken.symbol();

        depositToken = USDC;

        string memory name;
        string memory symbol;

        if (_overrideTokenName) {
            name = string(abi.encodePacked(_namePrefix, tokenName));
            symbol = string(abi.encodePacked(_symbolPrefix, tokenSymbol));
        } else {
            name = string(abi.encodePacked(_defaultNamePrefix, tokenName));
            symbol = string(abi.encodePacked(_symbolSymbolPrefix, tokenSymbol));
        }

        __ERC20_init(name, symbol);

        token = IERC20Upgradeable(_token);
        governance = _governance;
        // strategist = address(0);
        strategist = governance;
        keeper = _keeper;
        controller = _controller;
        guardian = _guardian;

        min = 9800;

        depositTokenUp = IERC20Upgradeable(depositToken);

        emit FullPricePerShareUpdated(
            getPricePerFullShare(),
            block.timestamp,
            block.number
        );

        wantsArray = _wantsArray;
        strategyAllocation = _strategyAllocation;

        // Paused on launch
        _pause();
    }

    /// ===== Modifiers =====

    function _onlyController() internal view {
        require(msg.sender == controller, "onlyController");
    }

    function _onlyAuthorizedPausers() internal view {
        require(
            msg.sender == guardian || msg.sender == governance,
            "onlyPausers"
        );
    }

    function _blockLocked() internal view {
        require(blockLock[msg.sender] < block.number, "blockLocked");
    }

    /// ===== View Functions =====

    function version() public pure returns (string memory) {
        return "1.0";
    }

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

    /// @notice Return the total balance of the underlying token within the system
    /// @notice Sums the balance in the Sett, the Controller, and the Strategy
    function balance() public view virtual returns (uint256) {
        //THIS SHOULD RETURN ALL THE STRATEGIES BALANCE IN USD
        uint256 _totalBalance = 0;
        uint256 _vaultUsdcBalance =
            IERC20Upgradeable(USDC).balanceOf(address(this));
        for (uint256 i = 0; i < wantsArray.length; i++) {
            address _wantToken = wantsArray[i];
            //gets balance
            _totalBalance += IController(controller).balanceOf(_wantToken);
        }
        // return token.balanceOf(address(this)).add(IController(controller).balanceOf(address(token)));
        return _totalBalance + _vaultUsdcBalance;
    }

    /// @notice Defines how much of the Setts' underlying can be borrowed by the Strategy for use
    /// @notice Custom logic in here for how much the vault allows to be borrowed
    /// @notice Sets minimum required on-hand to keep small withdrawals cheap
    function available() public view virtual returns (uint256) {
        IERC20Upgradeable strategyToken = IERC20Upgradeable(USDC);
        return strategyToken.balanceOf(address(this)).mul(min).div(max);
    }

    // ====== different want from strategies ====
    function getWantByIndex(uint256 i) public view returns (address) {
        return wantsArray[i];
    }

    function setWantToIndex(uint256 i, address _wantAddress) public {
        _onlyAuthorizedActors();
        wantsArray[i] = _wantAddress;
    }

    function pushStrategy(address _wantAddress) public {
        _onlyAuthorizedActors();
        wantsArray.push(_wantAddress);
    }

    function removeLastStrategy() public {
        _onlyAuthorizedActors();
        wantsArray.pop();
    }

    function getNumberOfStrategies() public view returns (uint256) {
        return wantsArray.length;
    }

    // function removeStrategy(uint index) public {
    //     _onlyAuthorizedActors();
    //     delete wantArray[index];
    // }

    function setStrategiesAllocation(uint256[] memory _strategiesAllocation)
        public
    {
        _defend();
        _onlyGovernance();
        //SET NEW STRATEGIES ARRAY
        require(
            _strategiesAllocation.length == wantsArray.length,
            "Allocation should be equal to number of wants"
        );
        strategyAllocation = _strategiesAllocation;
        uint256 totalAllocation = 0;

        for (uint256 x = 0; x < _strategiesAllocation.length; x++) {
            totalAllocation += _strategiesAllocation[x];
        }

        require(
            totalAllocation == 10_000,
            "Total Allocation should be equal to 10_000"
        );

        //VALIDATE TRIGGER WITHDRAW AND THEN NEW EARN
        for (uint256 i = 0; i < wantsArray.length; i++) {
            address _wantToken = wantsArray[i];
            IController(controller).withdrawAllFromRebalance(_wantToken);
        }
        //VALIDATE REBALANCE ALLOCATIONS
        earn();
    }

    /// ===== Public Actions =====

    /// @notice Deposit assets into the Sett, and return corresponding shares to the user
    /// @notice Only callable by EOA accounts that pass the _defend() check
    function deposit(uint256 _amount) public whenNotPaused {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _depositWithAuthorization(_amount, new bytes32[](0));
    }

    /// @notice Deposit variant with proof for merkle guest list
    function deposit(uint256 _amount, bytes32[] memory proof)
        public
        whenNotPaused
    {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _depositWithAuthorization(_amount, proof);
    }

    /// @notice Convenience function: Deposit entire balance of asset into the Sett, and return corresponding shares to the user
    /// @notice Only callable by EOA accounts that pass the _defend() check
    function depositAll() external whenNotPaused {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _depositWithAuthorization(
            depositTokenUp.balanceOf(msg.sender),
            new bytes32[](0)
        );
    }

    /// @notice DepositAll variant with proof for merkle guest list
    function depositAll(bytes32[] memory proof) external whenNotPaused {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _depositWithAuthorization(depositTokenUp.balanceOf(msg.sender), proof);
    }

    /// @notice No rebalance implementation for lower fees and faster swaps
    function withdraw(uint256 _shares) public whenNotPaused {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _withdraw(_shares);
    }

    /// @notice Convenience function: Withdraw all shares of the sender
    function withdrawAll() external whenNotPaused {
        _defend();
        _blockLocked();

        _lockForBlock(msg.sender);
        _withdraw(balanceOf(msg.sender));
    }

    /// ===== Permissioned Actions: Governance =====

    function setGuestList(address _guestList) external whenNotPaused {
        _onlyGovernance();
        guestList = BadgerGuestListAPI(_guestList);
    }

    /// @notice Set minimum threshold of underlying that must be deposited in strategy
    /// @notice Can only be changed by governance
    function setMin(uint256 _min) external whenNotPaused {
        _onlyGovernance();
        min = _min;
    }

    /// @notice Change controller address
    /// @notice Can only be changed by governance
    function setController(address _controller) public whenNotPaused {
        _onlyGovernance();
        controller = _controller;
    }

    /// @notice Change guardian address
    /// @notice Can only be changed by governance
    function setGuardian(address _guardian) external whenNotPaused {
        _onlyGovernance();
        guardian = _guardian;
    }

    /// ===== Permissioned Actions: Controller =====

    /// @notice Used to swap any borrowed reserve over the debt limit to liquidate to 'token'
    /// @notice Only controller can trigger harvests
    function harvest(address reserve, uint256 amount) external whenNotPaused {
        _onlyController();
        require(reserve != address(token), "token");
        IERC20Upgradeable(reserve).safeTransfer(controller, amount);
    }

    /// ===== Permissioned Functions: Trusted Actors =====

    /// @notice Transfer the underlying available to be claimed to the controller
    /// @notice The controller will deposit into the Strategy for yield-generating activities
    /// @notice Permissionless operation
    function earn() public whenNotPaused {
        //THE CONTROLLER SHOULD TRANSFER TO DIFFERENT STRATEGY WANT TOKENS....
        //VALIDTE THE AVAILABLE _BAL FROM DIFFERENT WANT TOKENS
        //TRANSFER FROM SELECTED WANT TO CONTROLLER-STRATEGIES
        _onlyAuthorizedActors();

        uint256 _bal = IERC20Upgradeable(USDC).balanceOf(address(this));
        for (uint256 i = 0; i < wantsArray.length; i++) {
            address _wantToken = wantsArray[i];
            uint256 _allocation = (strategyAllocation[i] * _bal).div(10000);
            IERC20Upgradeable(USDC).safeTransfer(controller, _allocation);
            IController(controller).earn(_wantToken, _allocation, USDC);
        }
    }

    /// @dev Emit event tracking current full price per share
    /// @dev Provides a pure on-chain way of approximating APY
    function trackFullPricePerShare() external whenNotPaused {
        _onlyAuthorizedActors();
        emit FullPricePerShareUpdated(
            getPricePerFullShare(),
            block.timestamp,
            block.number
        );
    }

    function pause() external {
        _onlyAuthorizedPausers();
        _pause();
    }

    function unpause() external {
        _onlyGovernance();
        _unpause();
    }

    function _transferUsdc(uint256 _amount) internal {
        depositTokenUp.safeTransferFrom(msg.sender, address(this), _amount);
    }

    /// ===== Internal Implementations =====

    /// @dev Calculate the number of shares to issue for a given deposit
    /// @dev This is based on the realized value of underlying assets between Sett & associated Strategy
    function _deposit(uint256 _depositAmount) internal virtual {
        //FOR SIMPLICITY THE DEPOSIT TOKEN SHOULD BE CONVERTED TO THE WANT HERE
        // 1. TRANSFER USDC TO VAULT (previously the user approved the vault)
        //2. GET USDC
        uint256 _pool = balance();
        uint256 _before = IERC20Upgradeable(USDC).balanceOf(address(this));
        _transferUsdc(_depositAmount);
        uint256 _after = IERC20Upgradeable(USDC).balanceOf(address(this));
        uint256 _amount = _after.sub(_before); // Additional check for deflationary tokens
        uint256 shares = 0;
        if (totalSupply() == 0) {
            shares = _amount;
        } else {
            shares = (_amount.mul(totalSupply())).div(_pool);
        }
        _mint(msg.sender, shares);
    }

    function _depositWithAuthorization(uint256 _amount, bytes32[] memory proof)
        internal
        virtual
    {
        if (address(guestList) != address(0)) {
            require(guestList.authorized(msg.sender, _amount, proof), "guest-list-authorization");
        }
        _deposit(_amount);
    }

    // No rebalance implementation for lower fees and faster swaps
    function _withdraw(uint256 _shares) internal virtual {
        //REMOVE LIQUIDITY PROPORTIONALLY FROM REBALANCING PARAMETERS
        //MINT SHARES IN USDC - VALUES

        uint256 r = (balance().mul(_shares)).div(totalSupply());
        uint256 _accum = 0;
        _burn(msg.sender, _shares);

        // Check balance
        uint256 b = IERC20Upgradeable(USDC).balanceOf(address(this));
        if (b < r) {
            for (uint256 i = 0; i < wantsArray.length; i++) {
                address _wantToken = wantsArray[i];
                uint256 _toWithdraw =
                    strategyAllocation[i] > 0
                        ? r.sub(b).mul(strategyAllocation[i]).div(10000)
                        : 0;
                IController(controller).withdraw(_wantToken, _toWithdraw);
                _accum += _toWithdraw;
            }
            uint256 _after = IERC20Upgradeable(USDC).balanceOf(address(this));
            uint256 _diff = _after.sub(b);
            if (_diff < _accum) {
                r = b.add(_diff);
            }
        }

        IERC20Upgradeable(USDC).safeTransfer(msg.sender, r);
    }

    function _lockForBlock(address account) internal {
        blockLock[account] = block.number;
    }

    /// @dev Transfer an amount of the specified token from the vault to the sender.
    /// @dev This is purely a safeguard.
    function inCaseTokensGetStuck(address _token, uint256 _amount) public {
        _onlyAuthorizedActors();
        IERC20Upgradeable(_token).safeTransfer(msg.sender, _amount);
    }

    /// ===== ERC20 Overrides =====

    /// @dev Add blockLock to transfers, users cannot transfer tokens in the same block as a deposit or withdrawal.
    function transfer(address recipient, uint256 amount)
        public
        virtual
        override
        whenNotPaused
        returns (bool)
    {
        _blockLocked();
        return super.transfer(recipient, amount);
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override whenNotPaused returns (bool) {
        _blockLocked();
        return super.transferFrom(sender, recipient, amount);
    }
}

File 2 of 17 : IERC20Upgradeable.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 IERC20Upgradeable {
    /**
     * @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 3 of 17 : SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMathUpgradeable {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

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

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

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

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

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

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

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

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

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

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

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

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

File 4 of 17 : AddressUpgradeable.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 AddressUpgradeable {
    /**
     * @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 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 5 of 17 : SafeERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "IERC20Upgradeable.sol";
import "draft-IERC20PermitUpgradeable.sol";
import "AddressUpgradeable.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 SafeERC20Upgradeable {
    using AddressUpgradeable for address;

    function safeTransfer(
        IERC20Upgradeable token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20Upgradeable 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(
        IERC20PermitUpgradeable 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(IERC20Upgradeable 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 6 of 17 : draft-IERC20PermitUpgradeable.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 IERC20PermitUpgradeable {
    /**
     * @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 7 of 17 : ERC20Upgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "IERC20Upgradeable.sol";
import "IERC20MetadataUpgradeable.sol";
import "ContextUpgradeable.sol";
import "Initializable.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 ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable, IERC20MetadataUpgradeable {
    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.
     */
    function __ERC20_init(string memory name_, string memory symbol_) internal onlyInitializing {
        __ERC20_init_unchained(name_, symbol_);
    }

    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing {
        _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 {}

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[45] private __gap;
}

File 8 of 17 : IERC20MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "IERC20Upgradeable.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20MetadataUpgradeable is IERC20Upgradeable {
    /**
     * @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 9 of 17 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "Initializable.sol";

/**
 * @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 ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[50] private __gap;
}

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

pragma solidity ^0.8.2;

import "AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
 * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
 * case an upgrade adds a module that needs to be initialized.
 *
 * For example:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * contract MyToken is ERC20Upgradeable {
 *     function initialize() initializer public {
 *         __ERC20_init("MyToken", "MTK");
 *     }
 * }
 * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
 *     function initializeV2() reinitializer(2) public {
 *         __ERC20Permit_init("MyToken");
 *     }
 * }
 * ```
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
 * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() {
 *     _disableInitializers();
 * }
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     * @custom:oz-retyped-from bool
     */
    uint8 private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Triggered when the contract has been initialized or reinitialized.
     */
    event Initialized(uint8 version);

    /**
     * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
     * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
     */
    modifier initializer() {
        bool isTopLevelCall = !_initializing;
        require(
            (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
            "Initializable: contract is already initialized"
        );
        _initialized = 1;
        if (isTopLevelCall) {
            _initializing = true;
        }
        _;
        if (isTopLevelCall) {
            _initializing = false;
            emit Initialized(1);
        }
    }

    /**
     * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
     * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
     * used to initialize parent contracts.
     *
     * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
     * initialization step. This is essential to configure modules that are added through upgrades and that require
     * initialization.
     *
     * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
     * a contract, executing them in the right order is up to the developer or operator.
     */
    modifier reinitializer(uint8 version) {
        require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
        _initialized = version;
        _initializing = true;
        _;
        _initializing = false;
        emit Initialized(version);
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} and {reinitializer} modifiers, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    /**
     * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
     * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
     * to any version. It is recommended to use this to lock implementation contracts that are designed to be called
     * through proxies.
     */
    function _disableInitializers() internal virtual {
        require(!_initializing, "Initializable: contract is initializing");
        if (_initialized < type(uint8).max) {
            _initialized = type(uint8).max;
            emit Initialized(type(uint8).max);
        }
    }
}

File 11 of 17 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "ContextUpgradeable.sol";
import "Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 12 of 17 : PausableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "ContextUpgradeable.sol";
import "Initializable.sol";

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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal onlyInitializing {
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal onlyInitializing {
        _paused = false;
    }

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

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

    /**
     * @dev This empty reserved space is put in place to allow future versions to add new
     * variables without shifting down storage in the inheritance chain.
     * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
     */
    uint256[49] private __gap;
}

File 13 of 17 : IController.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

interface IController {
    function withdraw(address, uint256) external;

    function withdrawAll(address) external;
    
    function withdrawAllFromRebalance(address) external;

    function strategies(address) external view returns (address);

    function balanceOf(address) external view returns (uint256);

    function earn(address, uint256, address) external;

    function want(address) external view returns (address);

    function rewards() external view returns (address);

    function vaults(address) external view returns (address);
}

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

pragma solidity ^0.8.17;

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

    function name() external view returns (string memory);
    function symbol() external view returns (string memory);

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

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

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

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

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

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

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

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

import "SettAccessControl.sol";

/*
    Add ability to prevent unwanted contract access to Sett permissions
*/
contract SettAccessControlDefended is SettAccessControl {
    mapping(address => bool) public approved;

    function approveContractAccess(address account) external {
        _onlyGovernance();
        approved[account] = true;
    }

    function revokeContractAccess(address account) external {
        _onlyGovernance();
        approved[account] = false;
    }

    function _defend() internal view returns (bool) {
        require(approved[msg.sender] || msg.sender == tx.origin, "Access denied for caller");
    }

    uint256[50] private __gap;
}

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

import "Initializable.sol";

/*
    Common base for permissioned roles throughout Sett ecosystem
*/
contract SettAccessControl is Initializable {
    address public governance;
    address public strategist;
    address public keeper;

    // ===== MODIFIERS =====
    function _onlyGovernance() internal view {
        require(msg.sender == governance, "onlyGovernance");
    }

    function _onlyGovernanceOrStrategist() internal view {
        require(msg.sender == strategist || msg.sender == governance, "onlyGovernanceOrStrategist");
    }

    function _onlyAuthorizedActors() internal view {
        require(msg.sender == governance, "onlyAuthorizedActors");
    }

    // ===== PERMISSIONED ACTIONS =====

    /// @notice Change strategist address
    /// @notice Can only be changed by governance itself
    function setStrategist(address _strategist) external {
        _onlyGovernance();
        strategist = _strategist;
    }

    /// @notice Change keeper address
    /// @notice Can only be changed by governance itself
    function setKeeper(address _keeper) external {
        _onlyGovernance();
        keeper = _keeper;
    }

    /// @notice Change governance address
    /// @notice Can only be changed by governance itself
    function setGovernance(address _governance) public {
        _onlyGovernance();
        governance = _governance;
    }

    uint256[50] private __gap;
}

File 17 of 17 : BadgerGuestlistApi.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

interface BadgerGuestListAPI {
    function authorized(address guest, uint256 amount, bytes32[] calldata merkleProof) external view returns (bool);
    function setGuests(address[] calldata _guests, bool[] calldata _invited) external;
}

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

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"FullPricePerShareUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"approveContractAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blockLock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"depositTokenUp","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getNumberOfStrategies","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"}],"name":"getWantByIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governance","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guardian","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"guestList","outputs":[{"internalType":"contract BadgerGuestListAPI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"reserve","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"harvest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_controller","type":"address"},{"internalType":"address","name":"_governance","type":"address"},{"internalType":"address","name":"_keeper","type":"address"},{"internalType":"address","name":"_guardian","type":"address"},{"internalType":"bool","name":"_overrideTokenName","type":"bool"},{"internalType":"string","name":"_namePrefix","type":"string"},{"internalType":"string","name":"_symbolPrefix","type":"string"},{"internalType":"address[]","name":"_wantsArray","type":"address[]"},{"internalType":"uint256[]","name":"_strategyAllocation","type":"uint256[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"keeper","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"max","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"min","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wantAddress","type":"address"}],"name":"pushStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeLastStrategy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeContractAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_controller","type":"address"}],"name":"setController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_governance","type":"address"}],"name":"setGovernance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_guardian","type":"address"}],"name":"setGuardian","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_guestList","type":"address"}],"name":"setGuestList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_keeper","type":"address"}],"name":"setKeeper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_min","type":"uint256"}],"name":"setMin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_strategiesAllocation","type":"uint256[]"}],"name":"setStrategiesAllocation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strategist","type":"address"}],"name":"setStrategist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"i","type":"uint256"},{"internalType":"address","name":"_wantAddress","type":"address"}],"name":"setWantToIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"strategist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"strategyAllocation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20Upgradeable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"trackFullPricePerShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wantsArray","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50613523806100206000396000f3fe608060405234801561001057600080fd5b50600436106103a45760003560e01c8063853828b6116101e9578063b6b55f251161010f578063d8b964e6116100ad578063f77c47911161007c578063f77c4791146107b8578063f8897945146107cc578063fba43f01146107d6578063fc0c546a146107e957600080fd5b8063d8b964e614610766578063dd62ed3e14610789578063de5f62681461079c578063dfa1034f146107a457600080fd5b8063c7b9d530116100e9578063c7b9d53014610724578063c89039c514610737578063cac7db611461074b578063d389800f1461075e57600080fd5b8063b6b55f25146106eb578063bad91bdb146106fe578063c6d758cb1461071157600080fd5b80639991721111610187578063aa90394c11610156578063aa90394c146106aa578063ab033ea9146106bd578063aced1661146106d0578063b69ef8a8146106e357600080fd5b8063999172111461065e5780639e8ca39a14610671578063a457c2d714610684578063a9059cbb1461069757600080fd5b80638f0c62b0116101c35780638f0c62b01461061d57806392eefe9b1461063057806395a13e271461064357806395d89b411461065657600080fd5b8063853828b6146105e757806389a30271146105ef5780638a0dac4a1461060a57600080fd5b806345dc3dd8116102ce5780635c975abb1161026c578063748747e61161023b578063748747e6146105b157806377c7b8fc146105c45780637c61e865146105cc5780638456cb59146105df57600080fd5b80635c975abb146105615780636ac5db191461056c5780636c3618651461057557806370a082311461058857600080fd5b80634a157c7b116102a85780634a157c7b1461051e57806354fd4d50146105265780635aa6e675146105455780635bdd78051461055857600080fd5b806345dc3dd8146104ef57806346d558751461050257806348a0d7541461051657600080fd5b8063269ac05111610346578063365f665f11610315578063365f665f146104b857806339509351146104c05780633f4ba83a146104d3578063452a9320146104db57600080fd5b8063269ac051146104625780632e1a7d4d14610483578063313ce5671461049657806335ac79c3146104a557600080fd5b80630b5b78eb116103825780630b5b78eb146103ff57806318160ddd146104125780631fe4a6861461042457806323b872dd1461044f57600080fd5b8063018ee9b7146103a957806306fdde03146103be578063095ea7b3146103dc575b600080fd5b6103bc6103b7366004612cab565b6107fc565b005b6103c6610876565b6040516103d39190612cf9565b60405180910390f35b6103ef6103ea366004612cab565b610908565b60405190151581526020016103d3565b6103bc61040d366004612d2c565b610922565b6035545b6040519081526020016103d3565b606654610437906001600160a01b031681565b6040516001600160a01b0390911681526020016103d3565b6103ef61045d366004612d47565b610955565b610416610470366004612d2c565b6101036020526000908152604090205481565b6103bc610491366004612d83565b61097c565b604051601281526020016103d3565b6103bc6104b3366004612e72565b6109aa565b6103bc6109d6565b6103ef6104ce366004612cab565b610a14565b6103bc610a36565b61010454610437906001600160a01b031681565b6103bc6104fd366004612d83565b610a48565b61010654610437906001600160a01b031681565b610416610a5e565b6103bc610af9565b6040805180820190915260038152620312e360ec1b60208201526103c6565b606554610437906001600160a01b031681565b61010754610416565b60cd5460ff166103ef565b61041661271081565b6103bc610583366004612d2c565b610b47565b610416610596366004612d2c565b6001600160a01b031660009081526033602052604090205490565b6103bc6105bf366004612d2c565b610b73565b610416610b9d565b6103bc6105da366004612d2c565b610be1565b6103bc610c0a565b6103bc610c1a565b61043773b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e81565b6103bc610618366004612d2c565b610c55565b61041661062b366004612d83565b610c88565b6103bc61063e366004612d2c565b610caa565b6103bc610651366004612d2c565b610cdd565b6103c6610d38565b61043761066c366004612d83565b610d47565b6103bc61067f366004612eb9565b610d78565b6103ef610692366004612cab565b610dc7565b6103ef6106a5366004612cab565b610e4d565b6103bc6106b8366004612fd9565b610e69565b6103bc6106cb366004612d2c565b611331565b606754610437906001600160a01b031681565b61041661135b565b6103bc6106f9366004612d83565b6114ab565b6103bc61070c3660046130ec565b611503565b6103bc61071f366004612cab565b61159a565b6103bc610732366004612d2c565b6115b6565b61010554610437906001600160a01b031681565b610437610759366004612d83565b6115e0565b6103bc61160b565b6103ef610774366004612d2c565b609a6020526000908152604090205460ff1681565b610416610797366004613129565b6117c9565b6103bc6117f4565b61010054610437906001600160a01b031681565b61010254610437906001600160a01b031681565b6104166101015481565b6103bc6107e43660046130ec565b61188c565b60ff54610437906001600160a01b031681565b610804611a76565b61080c611abc565b60ff546001600160a01b03908116908316036108575760405162461bcd60e51b81526020600482015260056024820152643a37b5b2b760d91b60448201526064015b60405180910390fd5b61010254610872906001600160a01b03848116911683611b08565b5050565b60606036805461088590613153565b80601f01602080910402602001604051908101604052809291908181526020018280546108b190613153565b80156108fe5780601f106108d3576101008083540402835291602001916108fe565b820191906000526020600020905b8154815290600101906020018083116108e157829003601f168201915b5050505050905090565b600033610916818585611b70565b60019150505b92915050565b61092a611a76565b610932611c94565b61010680546001600160a01b0319166001600160a01b0392909216919091179055565b600061095f611a76565b610967611cdf565b610972848484611d2c565b90505b9392505050565b610984611a76565b61098c611d45565b50610995611cdf565b61099e33611db1565b6109a781611dce565b50565b6109b2611a76565b6109ba611d45565b506109c3611cdf565b6109cc33611db1565b6108728282612063565b6109de612140565b6101078054806109f0576109f061318d565b600082815260209020810160001990810180546001600160a01b0319169055019055565b600033610916818585610a2783836117c9565b610a3191906131b9565b611b70565b610a3e611c94565b610a46612191565b565b610a50611a76565b610a58611c94565b61010155565b610101546040516370a0823160e01b815230600482015260009173b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e91610af39161271091610aed919085906370a0823190602401602060405180830381865afa158015610ac3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae791906131cc565b906121e3565b906121ef565b91505090565b610b01611a76565b610b09612140565b43427ffd60e70298d1c5272d3164dec70c527f1c64556cf7ca2dc10bdc753143ffc45b610b34610b9d565b60405190815260200160405180910390a3565b610b4f611c94565b6001600160a01b03166000908152609a60205260409020805460ff19166001179055565b610b7b611c94565b606780546001600160a01b0319166001600160a01b0392909216919091179055565b6000610ba860355490565b600003610bbc5750670de0b6b3a764000090565b610bdc610bc860355490565b610aed670de0b6b3a7640000610ae761135b565b905090565b610be9611c94565b6001600160a01b03166000908152609a60205260409020805460ff19169055565b610c126121fb565b610a46612259565b610c22611a76565b610c2a611d45565b50610c33611cdf565b610c3c33611db1565b33600090815260336020526040902054610a4690611dce565b610c5d611a76565b610c65611c94565b61010480546001600160a01b0319166001600160a01b0392909216919091179055565b6101088181548110610c9957600080fd5b600091825260209091200154905081565b610cb2611a76565b610cba611c94565b61010280546001600160a01b0319166001600160a01b0392909216919091179055565b610ce5612140565b61010780546001810182556000919091527f47c4908e245f386bfc1825973249847f4053a761ddb4880ad63c323a7b5a2a250180546001600160a01b0319166001600160a01b0392909216919091179055565b60606037805461088590613153565b60006101078281548110610d5d57610d5d6131e5565b6000918252602090912001546001600160a01b031692915050565b610d80612140565b806101078381548110610d9557610d956131e5565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505050565b60003381610dd582866117c9565b905083811015610e355760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161084e565b610e428286868403611b70565b506001949350505050565b6000610e57611a76565b610e5f611cdf565b6109758383612296565b600054610100900460ff1615808015610e895750600054600160ff909116105b80610ea35750303b158015610ea3575060005460ff166001145b610f065760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840161084e565b6000805460ff191660011790558015610f29576000805461ff0019166101001790555b610f31611a76565b60008b90506000816001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa158015610f76573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610f9e91908101906131fb565b90506000826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa158015610fe0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261100891908101906131fb565b61010580546001600160a01b03191673b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e17905590506060808a1561108757898460405160200161104d929190613272565b60405160208183030381529060405291508883604051602001611071929190613272565b6040516020818303038152906040529050611118565b6040518060400160405280601881526020017f42532d535441424c452d555344432d4156414c414e4348450000000000000000815250846040516020016110cf929190613272565b60408051601f1981840301815282820182526002835261425360f01b60208481019190915291519094506111069291869101613272565b60405160208183030381529060405290505b61112282826122a4565b8f60ff60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508d606560006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606560009054906101000a90046001600160a01b0316606660006101000a8154816001600160a01b0302191690836001600160a01b031602179055508c606760006101000a8154816001600160a01b0302191690836001600160a01b031602179055508e61010260006101000a8154816001600160a01b0302191690836001600160a01b031602179055508b61010460006101000a8154816001600160a01b0302191690836001600160a01b031602179055506126486101018190555061010560009054906101000a90046001600160a01b031661010060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555043427ffd60e70298d1c5272d3164dec70c527f1c64556cf7ca2dc10bdc753143ffc45b611296610b9d565b60405190815260200160405180910390a387516112bb906101079060208b0190612bda565b5086516112d0906101089060208a0190612c3f565b506112d9612259565b50505050508015611324576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b5050505050505050505050565b611339611c94565b606580546001600160a01b0319166001600160a01b0392909216919091179055565b6040516370a0823160e01b81523060048201526000908190819073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa1580156113b1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d591906131cc565b905060005b6101075481101561149957600061010782815481106113fb576113fb6131e5565b600091825260209091200154610102546040516370a0823160e01b81526001600160a01b039283166004820181905293509116906370a0823190602401602060405180830381865afa158015611455573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147991906131cc565b61148390856131b9565b9350508080611491906132a1565b9150506113da565b506114a481836131b9565b9250505090565b6114b3611a76565b6114bb611d45565b506114c4611cdf565b6114cd33611db1565b6109a78160005b6040519080825280602002602001820160405280156114fd578160200160208202803683370190505b50612063565b61150b611a76565b611513611d45565b5061151c611cdf565b61152533611db1565b610100546040516370a0823160e01b81523360048201526109a7916001600160a01b0316906370a0823190602401602060405180830381865afa158015611570573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061159491906131cc565b82612063565b6115a2612140565b6108726001600160a01b0383163383611b08565b6115be611c94565b606680546001600160a01b0319166001600160a01b0392909216919091179055565b61010781815481106115f157600080fd5b6000918252602090912001546001600160a01b0316905081565b611613611a76565b61161b612140565b6040516370a0823160e01b815230600482015260009073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa15801561166d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169191906131cc565b905060005b6101075481101561087257600061010782815481106116b7576116b76131e5565b600091825260208220015461010880546001600160a01b03909216935061170391612710918791879081106116ee576116ee6131e5565b9060005260206000200154610aed91906132ba565b610102549091506117339073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906001600160a01b031683611b08565b6101025460405163468a0efd60e01b81526001600160a01b0384811660048301526024820184905273b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e60448301529091169063468a0efd90606401600060405180830381600087803b15801561179c57600080fd5b505af11580156117b0573d6000803e3d6000fd5b50505050505080806117c1906132a1565b915050611696565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b6117fc611a76565b611804611d45565b5061180d611cdf565b61181633611db1565b610100546040516370a0823160e01b8152336004820152610a46916001600160a01b0316906370a0823190602401602060405180830381865afa158015611861573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061188591906131cc565b60006114d4565b611894611d45565b5061189d611c94565b610107548151146119065760405162461bcd60e51b815260206004820152602d60248201527f416c6c6f636174696f6e2073686f756c6420626520657175616c20746f206e7560448201526c6d626572206f662077616e747360981b606482015260840161084e565b805161191a90610108906020840190612c3f565b506000805b82518110156119615782818151811061193a5761193a6131e5565b60200260200101518261194d91906131b9565b915080611959816132a1565b91505061191f565b5080612710146119c65760405162461bcd60e51b815260206004820152602a60248201527f546f74616c20416c6c6f636174696f6e2073686f756c6420626520657175616c604482015269020746f2031305f3030360b41b606482015260840161084e565b60005b61010754811015611a6d57600061010782815481106119ea576119ea6131e5565b60009182526020909120015461010254604051630cb4ab8d60e01b81526001600160a01b03928316600482018190529350911690630cb4ab8d90602401600060405180830381600087803b158015611a4157600080fd5b505af1158015611a55573d6000803e3d6000fd5b50505050508080611a65906132a1565b9150506119c9565b5061087261160b565b60cd5460ff1615610a465760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161084e565b610102546001600160a01b03163314610a465760405162461bcd60e51b815260206004820152600e60248201526d37b7363ca1b7b73a3937b63632b960911b604482015260640161084e565b6040516001600160a01b038316602482015260448101829052611b6b90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526122d5565b505050565b6001600160a01b038316611bd25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161084e565b6001600160a01b038216611c335760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161084e565b6001600160a01b0383811660008181526034602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6065546001600160a01b03163314610a465760405162461bcd60e51b815260206004820152600e60248201526d6f6e6c79476f7665726e616e636560901b604482015260640161084e565b33600090815261010360205260409020544311610a465760405162461bcd60e51b815260206004820152600b60248201526a189b1bd8dad31bd8dad95960aa1b604482015260640161084e565b600033611d3a8582856123a7565b610e4285858561241b565b336000908152609a602052604081205460ff1680611d6257503332145b611dae5760405162461bcd60e51b815260206004820152601860248201527f4163636573732064656e69656420666f722063616c6c65720000000000000000604482015260640161084e565b90565b6001600160a01b0316600090815261010360205260409020439055565b6000611de8611ddc60355490565b610aed84610ae761135b565b90506000611df633846125e9565b6040516370a0823160e01b815230600482015260009073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa158015611e48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6c91906131cc565b90508281101561203e5760005b61010754811015611f9f5760006101078281548110611e9a57611e9a6131e5565b600091825260208220015461010880546001600160a01b039092169350829185908110611ec957611ec96131e5565b906000526020600020015411611ee0576000611f13565b611f13612710610aed6101088681548110611efd57611efd6131e5565b600091825260209091200154610ae78a89612737565b6101025460405163f3fef3a360e01b81526001600160a01b0385811660048301526024820184905292935091169063f3fef3a390604401600060405180830381600087803b158015611f6457600080fd5b505af1158015611f78573d6000803e3d6000fd5b505050508085611f8891906131b9565b945050508080611f97906132a1565b915050611e79565b506040516370a0823160e01b815230600482015260009073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa158015611ff2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061201691906131cc565b905060006120248284612737565b90508381101561203b576120388382612743565b94505b50505b61205d73b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e3385611b08565b50505050565b610106546001600160a01b0316156121375761010654604051631a9ee26f60e01b81526001600160a01b0390911690631a9ee26f906120aa903390869086906004016132d1565b602060405180830381865afa1580156120c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120eb919061332e565b6121375760405162461bcd60e51b815260206004820152601860248201527f67756573742d6c6973742d617574686f72697a6174696f6e0000000000000000604482015260640161084e565b6108728261274f565b6065546001600160a01b03163314610a465760405162461bcd60e51b81526020600482015260146024820152736f6e6c79417574686f72697a65644163746f727360601b604482015260640161084e565b6121996128a8565b60cd805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061097582846132ba565b6000610975828461334b565b610104546001600160a01b031633148061221f57506065546001600160a01b031633145b610a465760405162461bcd60e51b815260206004820152600b60248201526a6f6e6c795061757365727360a81b604482015260640161084e565b612261611a76565b60cd805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586121c63390565b60003361091681858561241b565b600054610100900460ff166122cb5760405162461bcd60e51b815260040161084e9061336d565b61087282826128f1565b600061232a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129319092919063ffffffff16565b805190915015611b6b5780806020019051810190612348919061332e565b611b6b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161084e565b60006123b384846117c9565b9050600019811461205d578181101561240e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161084e565b61205d8484848403611b70565b6001600160a01b03831661247f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161084e565b6001600160a01b0382166124e15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161084e565b6001600160a01b038316600090815260336020526040902054818110156125595760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161084e565b6001600160a01b038085166000908152603360205260408082208585039055918516815290812080548492906125909084906131b9565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516125dc91815260200190565b60405180910390a361205d565b6001600160a01b0382166126495760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161084e565b6001600160a01b038216600090815260336020526040902054818110156126bd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161084e565b6001600160a01b03831660009081526033602052604081208383039055603580548492906126ec9084906133b8565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600061097582846133b8565b600061097582846131b9565b600061275961135b565b6040516370a0823160e01b815230600482015290915060009073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa1580156127ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d291906131cc565b90506127dd83612940565b6040516370a0823160e01b815230600482015260009073b97ef9ef8734c71904d8002f8b6bc66dd9c48a6e906370a0823190602401602060405180830381865afa15801561282f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061285391906131cc565b905060006128618284612737565b9050600061286e60355490565b60000361287c575080612896565b61289385610aed61288c60355490565b85906121e3565b90505b6128a03382612959565b505050505050565b60cd5460ff16610a465760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161084e565b600054610100900460ff166129185760405162461bcd60e51b815260040161084e9061336d565b60366129248382613411565b506037611b6b8282613411565b60606109728484600085612a38565b610100546109a7906001600160a01b0316333084612b69565b6001600160a01b0382166129af5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161084e565b80603560008282546129c191906131b9565b90915550506001600160a01b038216600090815260336020526040812080548392906129ee9084906131b9565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b606082471015612a995760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161084e565b6001600160a01b0385163b612af05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161084e565b600080866001600160a01b03168587604051612b0c91906134d1565b60006040518083038185875af1925050503d8060008114612b49576040519150601f19603f3d011682016040523d82523d6000602084013e612b4e565b606091505b5091509150612b5e828286612ba1565b979650505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261205d9085906323b872dd60e01b90608401611b34565b60608315612bb0575081610975565b825115612bc05782518084602001fd5b8160405162461bcd60e51b815260040161084e9190612cf9565b828054828255906000526020600020908101928215612c2f579160200282015b82811115612c2f57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612bfa565b50612c3b929150612c7a565b5090565b828054828255906000526020600020908101928215612c2f579160200282015b82811115612c2f578251825591602001919060010190612c5f565b5b80821115612c3b5760008155600101612c7b565b80356001600160a01b0381168114612ca657600080fd5b919050565b60008060408385031215612cbe57600080fd5b612cc783612c8f565b946020939093013593505050565b60005b83811015612cf0578181015183820152602001612cd8565b50506000910152565b6020815260008251806020840152612d18816040850160208701612cd5565b601f01601f19169190910160400192915050565b600060208284031215612d3e57600080fd5b61097582612c8f565b600080600060608486031215612d5c57600080fd5b612d6584612c8f565b9250612d7360208501612c8f565b9150604084013590509250925092565b600060208284031215612d9557600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715612ddb57612ddb612d9c565b604052919050565b600067ffffffffffffffff821115612dfd57612dfd612d9c565b5060051b60200190565b600082601f830112612e1857600080fd5b81356020612e2d612e2883612de3565b612db2565b82815260059290921b84018101918181019086841115612e4c57600080fd5b8286015b84811015612e675780358352918301918301612e50565b509695505050505050565b60008060408385031215612e8557600080fd5b82359150602083013567ffffffffffffffff811115612ea357600080fd5b612eaf85828601612e07565b9150509250929050565b60008060408385031215612ecc57600080fd5b82359150612edc60208401612c8f565b90509250929050565b80151581146109a757600080fd5b8035612ca681612ee5565b600067ffffffffffffffff821115612f1857612f18612d9c565b50601f01601f191660200190565b600082601f830112612f3757600080fd5b8135612f45612e2882612efe565b818152846020838601011115612f5a57600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112612f8857600080fd5b81356020612f98612e2883612de3565b82815260059290921b84018101918181019086841115612fb757600080fd5b8286015b84811015612e6757612fcc81612c8f565b8352918301918301612fbb565b6000806000806000806000806000806101408b8d031215612ff957600080fd5b6130028b612c8f565b995061301060208c01612c8f565b985061301e60408c01612c8f565b975061302c60608c01612c8f565b965061303a60808c01612c8f565b955061304860a08c01612ef3565b945060c08b013567ffffffffffffffff8082111561306557600080fd5b6130718e838f01612f26565b955060e08d013591508082111561308757600080fd5b6130938e838f01612f26565b94506101008d01359150808211156130aa57600080fd5b6130b68e838f01612f77565b93506101208d01359150808211156130cd57600080fd5b506130da8d828e01612e07565b9150509295989b9194979a5092959850565b6000602082840312156130fe57600080fd5b813567ffffffffffffffff81111561311557600080fd5b61312184828501612e07565b949350505050565b6000806040838503121561313c57600080fd5b61314583612c8f565b9150612edc60208401612c8f565b600181811c9082168061316757607f821691505b60208210810361318757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082018082111561091c5761091c6131a3565b6000602082840312156131de57600080fd5b5051919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561320d57600080fd5b815167ffffffffffffffff81111561322457600080fd5b8201601f8101841361323557600080fd5b8051613243612e2882612efe565b81815285602083850101111561325857600080fd5b613269826020830160208601612cd5565b95945050505050565b60008351613284818460208801612cd5565b835190830190613298818360208801612cd5565b01949350505050565b6000600182016132b3576132b36131a3565b5060010190565b808202811582820484141761091c5761091c6131a3565b6001600160a01b038416815260208082018490526060604083018190528351908301819052600091848101916080850190845b8181101561332057845183529383019391830191600101613304565b509098975050505050505050565b60006020828403121561334057600080fd5b815161097581612ee5565b60008261336857634e487b7160e01b600052601260045260246000fd5b500490565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b8181038181111561091c5761091c6131a3565b601f821115611b6b57600081815260208120601f850160051c810160208610156133f25750805b601f850160051c820191505b818110156128a0578281556001016133fe565b815167ffffffffffffffff81111561342b5761342b612d9c565b61343f816134398454613153565b846133cb565b602080601f831160018114613474576000841561345c5750858301515b600019600386901b1c1916600185901b1785556128a0565b600085815260208120601f198616915b828110156134a357888601518255948401946001909101908401613484565b50858210156134c15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082516134e3818460208701612cd5565b919091019291505056fea2646970667358221220462b42d9d2771dc1534dec1da6482e130d5148350b25ed88e593bda02fa1bf1764736f6c63430008110033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.