ERC-20
Overview
Max Total Supply
2,000,000 ERC20 ***
Holders
2
Market
Price
$0.00 @ 0.000000 ETH
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 6 Decimals)
Balance
2,000,000 ERC20 ***Value
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x9cd74e38...Fe038410d The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Strategy
Compiler Version
v0.8.23+commit.f704f362
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.18; import {BaseHealthCheck, ERC20} from "@periphery/Bases/HealthCheck/BaseHealthCheck.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ISushiMultiPositionLiquidityManager} from "./interfaces/steer/ISushiMultiPositionLiquidityManager.sol"; import {IUniswapV3SwapCallback} from "@uniswap-v3-core/interfaces/callback/IUniswapV3SwapCallback.sol"; import {IUniswapV3Pool} from "@uniswap-v3-core/interfaces/IUniswapV3Pool.sol"; import {FullMath} from "@uniswap-v3-core/libraries/FullMath.sol"; import {TickMath} from "@uniswap-v3-core/libraries/TickMath.sol"; import {IAuction} from "./interfaces/IAuction.sol"; import {IMerklDistributor} from "./interfaces/IMerklDistributor.sol"; contract Strategy is BaseHealthCheck, IUniswapV3SwapCallback { using SafeERC20 for ERC20; /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ // Q96 constant (2**96) uint256 private constant Q96 = 0x1000000000000000000000000; /// @notice The Merkl Distributor contract for claiming rewards IMerklDistributor public constant MERKL_DISTRIBUTOR = IMerklDistributor(0x3Ef3D8bA38EBe18DB133cEc108f4D14CE00Dd9Ae); /*////////////////////////////////////////////////////////////// IMMUTABLE VARIABLES //////////////////////////////////////////////////////////////*/ ISushiMultiPositionLiquidityManager public immutable STEER_LP; address private immutable _POOL; address private immutable _PAIRED_TOKEN; bool private immutable _ASSET_IS_TOKEN_0; /*////////////////////////////////////////////////////////////// STATE VARIABLES //////////////////////////////////////////////////////////////*/ /// @notice Flag to enable using auctions for token swaps bool public useAuctions; /// @notice Address of the auction contract used for token swaps address public auction; /// @notice Target idle asset in basis points uint16 public targetIdleAssetBps; /// @notice Buffer for target idle asset in basis points (e.g., 1000 = 10% buffer) uint16 public targetIdleBufferBps = 1000; // 10% default /// @notice Additional discount applied to paired token valuations in basis points uint16 public pairedTokenDiscountBps = 50; // 0.5% default /// @notice Maximum acceptable base fee for tends in gwei uint8 public maxTendBaseFeeGwei = 100; /// @notice Minimum wait time between tends in seconds uint24 public minTendWait = 5 minutes; /// @notice Timestamp of the last tend uint64 public lastTend; /// @notice Minimum asset amount for any operation (dust threshold) uint128 public minAsset; /// @notice The strategy deposit limit uint256 public depositLimit = type(uint256).max; /// @notice Maximum value that can be swapped in a single transaction (in asset terms) uint256 public maxSwapValue; /*////////////////////////////////////////////////////////////// STRUCTS //////////////////////////////////////////////////////////////*/ struct SwapCallbackData { address tokenToPay; uint256 amountToPay; } constructor( address _asset, string memory _name, address _steerLP, uint128 _minAsset, uint256 _maxSwapValue ) BaseHealthCheck(_asset, _name) { require(_steerLP != address(0), "!0"); STEER_LP = ISushiMultiPositionLiquidityManager(_steerLP); _POOL = ISushiMultiPositionLiquidityManager(_steerLP).pool(); address _token0 = ISushiMultiPositionLiquidityManager(_steerLP) .token0(); address _token1 = ISushiMultiPositionLiquidityManager(_steerLP) .token1(); if (address(asset) == _token0) { _ASSET_IS_TOKEN_0 = true; _PAIRED_TOKEN = _token1; } else { require(address(asset) == _token1, "!asset"); _PAIRED_TOKEN = _token0; } minAsset = _minAsset; maxSwapValue = _maxSwapValue; } /*////////////////////////////////////////////////////////////// BASE STRATEGY OVERRIDES //////////////////////////////////////////////////////////////*/ // @inheritdoc BaseStrategy function _deployFunds(uint256 _amount) internal override { // do nothing since a swap is required } // @inheritdoc BaseStrategy function _freeFunds(uint256 _amount) internal override { // do nothing since a swap is required } // @inheritdoc BaseStrategy function _harvestAndReport() internal override returns (uint256 _totalAssets) { // Update fees before calculating total assets STEER_LP.poke(); _totalAssets = estimatedTotalAsset(); } // @inheritdoc BaseStrategy function _tend(uint256 _totalIdle) internal override { // Update fees before any LP operations STEER_LP.poke(); uint256 _targetIdleAssetBps = uint256(targetIdleAssetBps); uint256 _minAsset = uint256(minAsset); if (_targetIdleAssetBps > 0) { // We have a target idle, check if we need to rebalance uint256 targetIdleAmount = _getTargetIdleAmount( _targetIdleAssetBps ); if (_totalIdle > targetIdleAmount) { // Check if excess is above minAsset threshold uint256 excess = _totalIdle - targetIdleAmount; if (excess >= _minAsset) { _depositInLp(); } } else if (_totalIdle < targetIdleAmount) { // Check if deficit is above minAsset threshold uint256 deficit = targetIdleAmount - _totalIdle; if (deficit >= _minAsset) { _withdrawFromLp(deficit); } } } else if (_totalIdle >= _minAsset) { // No target set, deposit idle assets if above threshold _depositInLp(); } lastTend = uint64(block.timestamp); } // @inheritdoc BaseStrategy function _tendTrigger() internal view override returns (bool) { // Check if minimum wait time has passed if (block.timestamp < uint256(lastTend) + uint256(minTendWait)) { return false; } // Check if base fee is acceptable if (block.basefee > uint256(maxTendBaseFeeGwei) * 1 gwei) { return false; } // Get current idle assets uint256 idleAsset = asset.balanceOf(address(this)); // If target idle is set, check if we need to rebalance uint256 _targetIdleAssetBps = uint256(targetIdleAssetBps); if (_targetIdleAssetBps > 0) { uint256 targetIdleAmount = _getTargetIdleAmount( _targetIdleAssetBps ); // Calculate bounds using configurable buffer uint256 bufferAmount = (targetIdleAmount * uint256(targetIdleBufferBps)) / MAX_BPS; uint256 upperBound = targetIdleAmount + bufferAmount; uint256 lowerBound = targetIdleAmount - bufferAmount; // Trigger if we're outside the acceptable range // Let _tend handle minAsset checks return idleAsset > upperBound || idleAsset < lowerBound; } // If no target is set, only trigger if we have idle assets above minAsset uint256 _minAsset = uint256(minAsset); return _minAsset == 0 ? idleAsset > 0 : idleAsset >= _minAsset; } // @inheritdoc BaseStrategy function _emergencyWithdraw(uint256 _amount) internal override { _withdrawFromLp(_amount); } // @inheritdoc BaseStrategy // Only return the loose asset balance function availableWithdrawLimit( address /*_owner*/ ) public view override returns (uint256) { return asset.balanceOf(address(this)); } // @inheritdoc BaseStrategy function availableDepositLimit( address /* _owner */ ) public view override returns (uint256) { uint256 currentAssets = TokenizedStrategy.totalAssets(); uint256 _depositLimit = depositLimit; if (_depositLimit <= currentAssets) { return 0; } return _depositLimit - currentAssets; } /*////////////////////////////////////////////////////////////// VIEW FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Estimates the total value of all strategy holdings in asset terms * @return Total estimated value including loose tokens and LP positions * @dev Sums loose asset balance, paired token value, and LP position value * all denominated in the strategy's primary asset */ function estimatedTotalAsset() public view returns (uint256) { uint256 _assetBalance = asset.balanceOf(address(this)); uint256 _pairedTokenBalance = ERC20(_PAIRED_TOKEN).balanceOf( address(this) ); uint256 _pairedTokenBalanceInAsset = _valueOfPairedTokenInAsset( _pairedTokenBalance ); uint256 _lpBalanceInAsset = lpValueInAsset(); return _assetBalance + _pairedTokenBalanceInAsset + _lpBalanceInAsset; } /** * @notice Calculates the total value of the strategy's holdings in the Steer LP, * denominated in the strategy's underlying asset. * @dev This function considers the strategy's share of both token0 and token1 * in the LP and converts their value to the asset's denomination using the * current pool price. * @return valueLpInAssetTerms The total value of LP holdings in terms of the asset. */ function lpValueInAsset() public view returns (uint256 valueLpInAssetTerms) { uint256 balanceOfLpShares = STEER_LP.balanceOf(address(this)); if (balanceOfLpShares == 0) return 0; uint256 totalLpShares = STEER_LP.totalSupply(); if (totalLpShares == 0) return 0; (uint256 total0InLp, uint256 total1InLp) = STEER_LP.getTotalAmounts(); uint256 balanceOfToken0InLp = FullMath.mulDiv( balanceOfLpShares, total0InLp, totalLpShares ); uint256 balanceOfToken1InLp = FullMath.mulDiv( balanceOfLpShares, total1InLp, totalLpShares ); uint256 valuePairedTokenInAsset; if (_ASSET_IS_TOKEN_0) { valuePairedTokenInAsset = _valueOfPairedTokenInAsset( balanceOfToken1InLp ); valueLpInAssetTerms = balanceOfToken0InLp + valuePairedTokenInAsset; } else { valuePairedTokenInAsset = _valueOfPairedTokenInAsset( balanceOfToken0InLp ); valueLpInAssetTerms = balanceOfToken1InLp + valuePairedTokenInAsset; } } /** * @notice Calculates the value of the paired token in terms of the strategy's asset using current pool price. * @param amountOfPairedToken The amount of the paired token * @return value The calculated value in terms of the strategy's asset */ function _valueOfPairedTokenInAsset( uint256 amountOfPairedToken ) internal view returns (uint256 value) { if (amountOfPairedToken == 0) return 0; return _valueOfPairedTokenInAsset(amountOfPairedToken, _getSqrtPriceX96()); } /** * @notice Calculates the value of the paired token in terms of the strategy's asset. * @param amountOfPairedToken The amount of the paired token * @param sqrtPriceX96 The current sqrt price (Q64.96) of the Uniswap V3 pool * @return value The calculated value in terms of the strategy's asset */ function _valueOfPairedTokenInAsset( uint256 amountOfPairedToken, uint160 sqrtPriceX96 ) internal view returns (uint256 value) { if (amountOfPairedToken == 0) return 0; // Get raw value without discount value = _valueOfPairedTokenInAssetRaw( amountOfPairedToken, sqrtPriceX96 ); // Apply discount for pool fee + additional discount uint24 poolFee = IUniswapV3Pool(_POOL).fee(); // e.g., 3000 = 0.3% uint256 totalDiscountBps = poolFee / 100 + uint256(pairedTokenDiscountBps); // Convert fee to bps // Apply discount: value * (10000 - totalDiscountBps) / 10000 value = (value * (MAX_BPS - totalDiscountBps)) / MAX_BPS; } /** * @notice Calculates the raw value of the paired token without any discounts. * @param amountOfPairedToken The amount of the paired token * @param sqrtPriceX96 The current sqrt price (Q64.96) of the Uniswap V3 pool * @return value The raw calculated value in terms of the strategy's asset */ function _valueOfPairedTokenInAssetRaw( uint256 amountOfPairedToken, uint160 sqrtPriceX96 ) internal view returns (uint256 value) { if (_ASSET_IS_TOKEN_0) { // Convert token1 to token0: amount1 / price // Calculate price ratio first to avoid underflow: (Q96^2 / sqrtPrice) / sqrtPrice value = FullMath.mulDiv( FullMath.mulDiv(Q96, Q96, sqrtPriceX96), amountOfPairedToken, sqrtPriceX96 ); } else { // Convert token0 to token1: amount0 * price // Check if we should calculate price first to avoid precision loss // Safe check: amount < Q96 / sqrtPrice (avoiding overflow) if (amountOfPairedToken < Q96 / sqrtPriceX96) { // Calculate price first when amount is small or price is very high value = FullMath.mulDiv( FullMath.mulDiv(sqrtPriceX96, sqrtPriceX96, Q96), amountOfPairedToken, Q96 ); } else { // Standard calculation when amount is large enough value = FullMath.mulDiv( FullMath.mulDiv(amountOfPairedToken, sqrtPriceX96, Q96), sqrtPriceX96, Q96 ); } } } /** * @notice Converts asset value to paired token quantity (inverse of _valueOfPairedTokenInAsset). * @param _valueInAssetTerms The value denominated in the strategy's primary asset * @param _sqrtPriceX96 The current sqrt price (Q64.96) of the Uniswap V3 pool * @return _amountOfPairedToken The corresponding quantity of paired token */ function _assetValueToPairedAmount( uint256 _valueInAssetTerms, uint160 _sqrtPriceX96 ) internal view returns (uint256 _amountOfPairedToken) { if (_valueInAssetTerms == 0) return 0; if (_ASSET_IS_TOKEN_0) { // Convert asset value to token1: value * price // Check if we should calculate price first to avoid precision loss // Safe check: value < Q96 / sqrtPrice (avoiding overflow) if (_valueInAssetTerms < Q96 / _sqrtPriceX96) { // Calculate price first when value is small _amountOfPairedToken = FullMath.mulDiv( FullMath.mulDiv(_sqrtPriceX96, _sqrtPriceX96, Q96), _valueInAssetTerms, Q96 ); } else { // Standard calculation when value is large enough _amountOfPairedToken = FullMath.mulDiv( FullMath.mulDiv(_valueInAssetTerms, _sqrtPriceX96, Q96), _sqrtPriceX96, Q96 ); } } else { // Convert asset value to token0: value / price // Calculate price ratio first to avoid underflow _amountOfPairedToken = FullMath.mulDiv( FullMath.mulDiv(Q96, Q96, _sqrtPriceX96), _valueInAssetTerms, _sqrtPriceX96 ); } } /*////////////////////////////////////////////////////////////// INTERNAL LOGIC //////////////////////////////////////////////////////////////*/ /** * @notice Calculates the amount of the strategy's asset to swap to achieve a balanced * deposit into the Uniswap V3 LP, based on the current LP composition. * @dev If the LP is empty, returns 0. Otherwise, it calculates the swap amount * to match the LP's current token value ratio. * @param totalDepositValue The total value available for deposit (asset + paired token value in asset terms). * @param total0InLp The total amount of token0 in the Uniswap V3 LP. * @param total1InLp The total amount of token1 in the Uniswap V3 LP. * @param sqrtPriceX96 The current sqrt price (Q64.96) of the Uniswap V3 pool. * @return amountToSwap The calculated amount of asset to swap. */ function _calculateAmountToSwapForDeposit( uint256 totalDepositValue, uint256 total0InLp, uint256 total1InLp, uint160 sqrtPriceX96 ) internal view returns (uint256 amountToSwap) { if (total0InLp == 0 && total1InLp == 0) return 0; uint256 pairedTokenValueInAsset; uint256 totalLpValueInAsset; if (_ASSET_IS_TOKEN_0) { // Convert token1 LP balance to token0 value // Calculate price ratio first to avoid underflow pairedTokenValueInAsset = FullMath.mulDiv( FullMath.mulDiv(Q96, Q96, sqrtPriceX96), total1InLp, sqrtPriceX96 ); totalLpValueInAsset = total0InLp + pairedTokenValueInAsset; } else { // Convert token0 LP balance to token1 value // Check if we should calculate price first to avoid precision loss if (total0InLp < Q96 / sqrtPriceX96) { // Calculate price first when amount is small pairedTokenValueInAsset = FullMath.mulDiv( FullMath.mulDiv(sqrtPriceX96, sqrtPriceX96, Q96), total0InLp, Q96 ); } else { // Standard calculation when amount is large enough pairedTokenValueInAsset = FullMath.mulDiv( FullMath.mulDiv(total0InLp, sqrtPriceX96, Q96), sqrtPriceX96, Q96 ); } totalLpValueInAsset = total1InLp + pairedTokenValueInAsset; } if (totalLpValueInAsset == 0) return 0; // Calculate swap amount to match LP's token value ratio amountToSwap = FullMath.mulDiv( totalDepositValue, pairedTokenValueInAsset, totalLpValueInAsset ); } /** * @notice Swaps asset for paired token via Uniswap V3 pool. * @param amountToSwap The amount of asset to swap */ function _swapAssetForPairedToken(uint256 amountToSwap) internal { _performSwap(address(asset), amountToSwap, _ASSET_IS_TOKEN_0); } /** * @notice Swaps paired token for asset via Uniswap V3 pool. * @param amountToSwap The amount of paired token to swap */ function _swapPairedTokenForAsset(uint256 amountToSwap) internal { _performSwap(_PAIRED_TOKEN, amountToSwap, !_ASSET_IS_TOKEN_0); } /** * @notice Internal helper to perform token swaps via Uniswap V3 pool. * @param tokenIn The address of the token being swapped * @param amountToSwap The amount of token to swap * @param zeroForOne The direction of the swap (true = token0 -> token1, false = token1 -> token0) */ function _performSwap( address tokenIn, uint256 amountToSwap, bool zeroForOne ) internal { // Apply maxSwapValue limit if not set to max uint256 _maxSwapValue = maxSwapValue; if (_maxSwapValue != type(uint256).max) { uint256 swapValueInAsset; if (tokenIn == address(asset)) { // Swapping asset, amount is already in asset terms swapValueInAsset = amountToSwap; } else { // Swapping paired token, convert to asset value swapValueInAsset = _valueOfPairedTokenInAsset(amountToSwap); } if (swapValueInAsset > _maxSwapValue) { // Reduce swap amount to respect limit if (tokenIn == address(asset)) { amountToSwap = _maxSwapValue; } else { // Convert maxSwapValue back to paired token amount amountToSwap = _assetValueToPairedAmount( _maxSwapValue, _getSqrtPriceX96() ); } } } if (amountToSwap == 0) return; SwapCallbackData memory callbackData = SwapCallbackData( tokenIn, amountToSwap ); bytes memory data = abi.encode(callbackData); IUniswapV3Pool(_POOL).swap( address(this), zeroForOne, int256(amountToSwap), zeroForOne ? TickMath.MIN_SQRT_RATIO + 1 : TickMath.MAX_SQRT_RATIO - 1, data ); } /** * @notice Performs rebalancing swaps to achieve target token allocation for LP deposit. * @param currentPairedTokenValueInAsset Current value of paired token holdings in asset terms * @param targetPairedTokenValueInAsset Target value of paired token holdings in asset terms * @param assetBalance Current asset balance * @param pairedTokenBalance Current paired token balance * @param sqrtPriceX96 Current pool price */ function _performRebalancingSwap( uint256 currentPairedTokenValueInAsset, uint256 targetPairedTokenValueInAsset, uint256 assetBalance, uint256 pairedTokenBalance, uint160 sqrtPriceX96 ) internal { uint256 _minAsset = uint256(minAsset); if (targetPairedTokenValueInAsset > currentPairedTokenValueInAsset) { // Need more paired token uint256 assetValueToSwap = targetPairedTokenValueInAsset - currentPairedTokenValueInAsset; if (assetValueToSwap > assetBalance) { assetValueToSwap = assetBalance; } // Only swap if above minAsset threshold if ( assetValueToSwap > 0 && (_minAsset == 0 || assetValueToSwap >= _minAsset) ) { _swapAssetForPairedToken(assetValueToSwap); } } else if ( currentPairedTokenValueInAsset > targetPairedTokenValueInAsset ) { // Have excess paired token uint256 excessPairedTokenValueInAsset = currentPairedTokenValueInAsset - targetPairedTokenValueInAsset; // Only swap if above minAsset threshold if (_minAsset == 0 || excessPairedTokenValueInAsset >= _minAsset) { uint256 pairedTokenQuantityToSwap = _assetValueToPairedAmount( excessPairedTokenValueInAsset, sqrtPriceX96 ); if (pairedTokenQuantityToSwap > pairedTokenBalance) { pairedTokenQuantityToSwap = pairedTokenBalance; } if (pairedTokenQuantityToSwap > 0) { _swapPairedTokenForAsset(pairedTokenQuantityToSwap); } } } } /** * @notice Deposits balanced tokens into the Steer LP. * @param assetForDeposit Amount of asset to deposit */ function _performLpDeposit(uint256 assetForDeposit) internal { uint256 pairedTokenBalanceForDeposit = ERC20(_PAIRED_TOKEN).balanceOf( address(this) ); asset.forceApprove(address(STEER_LP), assetForDeposit); ERC20(_PAIRED_TOKEN).forceApprove( address(STEER_LP), pairedTokenBalanceForDeposit ); uint256 token0DepositAmount; uint256 token1DepositAmount; if (_ASSET_IS_TOKEN_0) { token0DepositAmount = assetForDeposit; token1DepositAmount = pairedTokenBalanceForDeposit; } else { token0DepositAmount = pairedTokenBalanceForDeposit; token1DepositAmount = assetForDeposit; } STEER_LP.deposit( token0DepositAmount, token1DepositAmount, 0, 0, address(this) ); } /** * @notice Deposits assets into the Steer LP. * @dev This function first calculates the optimal amount of the strategy's asset to swap * to achieve a balanced deposit. It then performs the swap (if necessary) and * deposits both the remaining asset and the acquired other token into the Steer LP. * Respects the targetIdleAssetBps to maintain a percentage of assets idle. */ function _depositInLp() internal { uint256 assetBalance = asset.balanceOf(address(this)); uint256 pairedTokenBalance = ERC20(_PAIRED_TOKEN).balanceOf( address(this) ); uint256 availableForDeposit = assetBalance; uint256 targetIdleAmount; // Apply idle asset target uint256 _targetIdleAssetBps = uint256(targetIdleAssetBps); if (_targetIdleAssetBps > 0) { targetIdleAmount = _getTargetIdleAmount(_targetIdleAssetBps); // Only deposit if above target idle amount if (assetBalance <= targetIdleAmount) return; // Calculate amount available for deposit availableForDeposit = assetBalance - targetIdleAmount; } uint160 sqrtPriceX96 = _getSqrtPriceX96(); uint256 pairedTokenValueInAsset = _valueOfPairedTokenInAsset( pairedTokenBalance, sqrtPriceX96 ); uint256 totalDepositValueInAsset = availableForDeposit + pairedTokenValueInAsset; if (totalDepositValueInAsset == 0) return; (uint256 lpToken0Balance, uint256 lpToken1Balance) = STEER_LP .getTotalAmounts(); if (lpToken0Balance == 0 && lpToken1Balance == 0) return; // do not be first lp // Early exit if maxSwapValue = 0 and LP needs both tokens but we can't swap if (maxSwapValue == 0) { bool lpIsOutOfRange = (lpToken0Balance == 0) || (lpToken1Balance == 0); bool weHaveOnlyOneToken = (pairedTokenBalance == 0) || (availableForDeposit == 0); if (!lpIsOutOfRange && weHaveOnlyOneToken) { return; // LP needs both tokens but we can't swap to get them } } // Calculate target allocation and perform rebalancing swap uint256 targetPairedTokenValueInAsset = _calculateAmountToSwapForDeposit( totalDepositValueInAsset, lpToken0Balance, lpToken1Balance, sqrtPriceX96 ); _performRebalancingSwap( pairedTokenValueInAsset, targetPairedTokenValueInAsset, availableForDeposit, pairedTokenBalance, sqrtPriceX96 ); availableForDeposit = asset.balanceOf(address(this)); if (availableForDeposit < targetIdleAmount) return; _performLpDeposit(availableForDeposit - targetIdleAmount); } /** * @notice Withdraws a specified amount of the strategy's asset from the Steer LP. * @dev Calculates the number of LP shares to withdraw based on the desired asset amount. * After withdrawing from the Steer LP, if any "other token" is received, * it is swapped back to the strategy's asset. * @param assetToWithdraw The amount of the strategy's asset to withdraw from the LP. */ function _withdrawFromLp(uint256 assetToWithdraw) internal { if (assetToWithdraw == 0) return; uint256 lpSharesBalance = STEER_LP.balanceOf(address(this)); uint256 _lpValueInAsset = lpValueInAsset(); if (_lpValueInAsset == 0) return; uint256 sharesToWithdraw; if (assetToWithdraw >= _lpValueInAsset) { sharesToWithdraw = lpSharesBalance; } else { sharesToWithdraw = FullMath.mulDiv( assetToWithdraw, lpSharesBalance, _lpValueInAsset ); } if (sharesToWithdraw == 0) return; STEER_LP.withdraw(sharesToWithdraw, 0, 0, address(this)); uint256 pairedTokenBalance = ERC20(_PAIRED_TOKEN).balanceOf( address(this) ); if (pairedTokenBalance > 0) { // Always swap paired tokens after withdrawal to avoid leaving dust // We've already committed to the withdrawal operation _swapPairedTokenForAsset(pairedTokenBalance); } } /*////////////////////////////////////////////////////////////// UNISWAP V3 CALLBACK //////////////////////////////////////////////////////////////*/ // @inheritdoc IUniswapV3SwapCallback function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata _data ) external override { require(msg.sender == _POOL, "!caller"); // dev: Only pool can call swap callback SwapCallbackData memory callbackData = abi.decode( _data, (SwapCallbackData) ); uint256 amountPaid = _validateAndGetAmountPaid( amount0Delta, amount1Delta, callbackData.tokenToPay ); require(amountPaid == callbackData.amountToPay, "!amount"); // dev: amount mismatch ERC20(callbackData.tokenToPay).safeTransfer(_POOL, amountPaid); } /** * @notice Validates swap callback deltas and returns the amount to be paid * @param amount0Delta Amount delta for token0 * @param amount1Delta Amount delta for token1 * @param tokenToPay Address of the token being paid * @return amountPaid The validated amount to pay */ function _validateAndGetAmountPaid( int256 amount0Delta, int256 amount1Delta, address tokenToPay ) internal view returns (uint256 amountPaid) { bool isPayingAsset = tokenToPay == address(asset); bool isPayingPairedToken = tokenToPay == _PAIRED_TOKEN; require(isPayingAsset || isPayingPairedToken, "!token"); // dev: invalid token to pay if (_ASSET_IS_TOKEN_0) { if (isPayingAsset) { require(amount0Delta > 0, "!amount0+"); // dev: paying asset as token0 require(amount1Delta < 0, "!amount1-"); // dev: paying asset as token0 amountPaid = uint256(amount0Delta); } else { require(amount1Delta > 0, "!amount1+"); // dev: paying paired token as token1 require(amount0Delta < 0, "!amount0-"); // dev: paying paired token as token1 amountPaid = uint256(amount1Delta); } } else { if (isPayingAsset) { require(amount1Delta > 0, "!amount1+"); // dev: paying asset as token1 require(amount0Delta < 0, "!amount0-"); // dev: paying asset as token1 amountPaid = uint256(amount1Delta); } else { require(amount0Delta > 0, "!amount0+"); // dev: paying paired token as token0 require(amount1Delta < 0, "!amount1-"); // dev: paying paired token as token0 amountPaid = uint256(amount0Delta); } } } function _getTargetIdleAmount( uint256 _targetIdleAssetBps ) internal view returns (uint256) { uint256 totalAssets = TokenizedStrategy.totalAssets(); return (totalAssets * _targetIdleAssetBps) / MAX_BPS; } function _getSqrtPriceX96() internal view returns (uint160 sqrtPriceX96) { (sqrtPriceX96, , , , , , ) = IUniswapV3Pool(_POOL).slot0(); } /*////////////////////////////////////////////////////////////// MANAGEMENT FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Sets the deposit limit for the strategy * @param _depositLimit New deposit limit */ function setDepositLimit(uint256 _depositLimit) external onlyManagement { depositLimit = _depositLimit; } /** * @notice Sets the target idle asset percentage in basis points * @param _targetIdleAssetBps Target idle asset percentage in basis points (e.g., 500 = 5%) */ function setTargetIdleAssetBps( uint16 _targetIdleAssetBps ) external onlyManagement { require(_targetIdleAssetBps <= MAX_BPS, "!bps"); // dev: Target idle asset cannot exceed 100% (10000 bps) targetIdleAssetBps = _targetIdleAssetBps; } /** * @notice Sets the maximum swap value per transaction * @param _maxSwapValue Maximum value that can be swapped in a single transaction (in asset terms) * @dev Set to type(uint256).max to disable the limit */ function setMaxSwapValue(uint256 _maxSwapValue) external onlyManagement { maxSwapValue = _maxSwapValue; } /** * @notice Sets the minimum wait time between tends * @param _minTendWait Minimum wait time in seconds * @dev Can only be called by management */ function setMinTendWait(uint24 _minTendWait) external onlyManagement { minTendWait = _minTendWait; } /** * @notice Sets the maximum acceptable base fee for tends * @param _maxTendBaseFeeGwei Maximum base fee in gwei * @dev Can only be called by management */ function setMaxTendBaseFee( uint8 _maxTendBaseFeeGwei ) external onlyManagement { maxTendBaseFeeGwei = _maxTendBaseFeeGwei; } /** * @notice Sets the target idle buffer in basis points * @param _targetIdleBufferBps Buffer in basis points (e.g., 1000 = 10%) * @dev Can only be called by management */ function setTargetIdleBufferBps( uint16 _targetIdleBufferBps ) external onlyManagement { require(_targetIdleBufferBps <= MAX_BPS, "!bps"); // dev: Buffer cannot exceed 100% targetIdleBufferBps = _targetIdleBufferBps; } /** * @notice Sets the additional discount for paired token valuations * @param _pairedTokenDiscountBps Discount in basis points (e.g., 50 = 0.5%) * @dev Can only be called by management */ function setPairedTokenDiscountBps( uint16 _pairedTokenDiscountBps ) external onlyManagement { require(_pairedTokenDiscountBps <= 1000, "!discount"); // dev: Discount cannot exceed 10% pairedTokenDiscountBps = _pairedTokenDiscountBps; } /** * @notice Sets the minimum asset amount for any operation (dust threshold) * @param _minAsset Minimum amount of assets for any operation * @dev Can only be called by management */ function setMinAsset(uint128 _minAsset) external onlyManagement { minAsset = _minAsset; } /** * @notice Sets whether to use auctions for token swaps * @param _useAuctions New value for useAuctions flag * @dev Can only be called by management * @dev When enabled, the strategy will attempt to kick auctions during harvest * @dev When disabled, the strategy will not use auctions and rewards will accumulate */ function setUseAuctions(bool _useAuctions) external onlyManagement { useAuctions = _useAuctions; } /** * @notice Sets the auction contract address * @param _auction Address of the auction contract * @dev Can only be called by management * @dev Verifies the auction contract is compatible with this strategy by: * 1. Checking that auction's want matches the strategy's asset * 2. Ensuring the auction contract's receiver is this strategy */ function setAuction(address _auction) external onlyManagement { if (_auction != address(0)) { require(IAuction(_auction).want() == address(asset), "!want"); // dev: Auction want token must match strategy asset require( IAuction(_auction).receiver() == address(this), "!receiver" ); // dev: Auction receiver must be this strategy } auction = _auction; } /** * @notice Manually swaps paired token for asset * @param _amount Amount of paired token to swap * @dev This function is limited by maxSwapValueset. Set maxSwapValue to an appropriate value before swapping */ function manualSwapPairedTokenToAsset( uint256 _amount ) external onlyManagement { require(_amount > 0, "!amount"); // dev: Amount must be greater than 0 uint256 pairedTokenBalance = ERC20(_PAIRED_TOKEN).balanceOf( address(this) ); require(_amount <= pairedTokenBalance, "!balance"); // dev: Insufficient paired token balance _swapPairedTokenForAsset(_amount); } /** * @notice Manually withdraws from LP position * @param _amount Amount of asset value to withdraw from LP * @dev This function will swap excessed paired token limited by maxSwapValue * Set maxSwapValue = 0 if you want to prevent swapping. */ function manualWithdrawFromLp(uint256 _amount) external onlyManagement { require(_amount > 0, "!amount"); // dev: Amount must be greater than 0 _withdrawFromLp(_amount); } /*////////////////////////////////////////////////////////////// AUCTION FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Initiates an auction for a given token * @dev Transfers tokens to auction contract and starts auction * @param _from The token to be sold in the auction * @return The available amount for bidding on in the auction */ function kickAuction( address _from ) external virtual onlyManagement returns (uint256) { (bool _success, uint256 _amount) = _tryKickAuction(auction, _from); require(_success, "!kick"); return _amount; } /** * @notice Attempts to kick an auction for a given token * @param _auction The auction contract address * @param _from The token to be sold in the auction * @return success Whether the auction was successfully started * @return amount The amount available for bidding */ function _tryKickAuction( address _auction, address _from ) internal virtual returns (bool, uint256) { if (!useAuctions || _auction == address(0)) return (false, 0); if (_from == address(asset) || _from == address(STEER_LP)) return (false, 0); if ( IAuction(_auction).isActive(address(asset)) || IAuction(_auction).available(address(asset)) != 0 ) return (false, 0); uint256 _strategyBalance = ERC20(_from).balanceOf(address(this)); uint256 _totalBalance = _strategyBalance + ERC20(_from).balanceOf(_auction); if (_totalBalance == 0) return (false, 0); if (_strategyBalance != 0) { ERC20(_from).safeTransfer(_auction, _strategyBalance); } uint256 _amountKicked = IAuction(_auction).kick(_from); return (true, _amountKicked); } /*////////////////////////////////////////////////////////////// REWARDS FUNCTIONS //////////////////////////////////////////////////////////////*/ /** * @notice Claims rewards from Merkl distributor * @param users Recipients of tokens * @param tokens ERC20 tokens being claimed * @param amounts Amounts of tokens that will be sent to the corresponding users * @param proofs Array of Merkle proofs verifying the claims */ function claim( address[] calldata users, address[] calldata tokens, uint256[] calldata amounts, bytes32[][] calldata proofs ) external { MERKL_DISTRIBUTOR.claim(users, tokens, amounts, proofs); } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.8.18; import {BaseStrategy, ERC20} from "@tokenized-strategy/BaseStrategy.sol"; /** * @title Base Health Check * @author Yearn.finance * @notice This contract can be inherited by any Yearn * V3 strategy wishing to implement a health check during * the `report` function in order to prevent any unexpected * behavior from being permanently recorded as well as the * `checkHealth` modifier. * * A strategist simply needs to inherit this contract. Set * the limit ratios to the desired amounts and then * override `_harvestAndReport()` just as they otherwise * would. If the profit or loss that would be recorded is * outside the acceptable bounds the tx will revert. * * The healthcheck does not prevent a strategy from reporting * losses, but rather can make sure manual intervention is * needed before reporting an unexpected loss or profit. */ abstract contract BaseHealthCheck is BaseStrategy { // Can be used to determine if a healthcheck should be called. // Defaults to true; bool public doHealthCheck = true; uint256 internal constant MAX_BPS = 10_000; // Default profit limit to 100%. uint16 private _profitLimitRatio = uint16(MAX_BPS); // Defaults loss limit to 0. uint16 private _lossLimitRatio; constructor( address _asset, string memory _name ) BaseStrategy(_asset, _name) {} /** * @notice Returns the current profit limit ratio. * @dev Use a getter function to keep the variable private. * @return . The current profit limit ratio. */ function profitLimitRatio() public view returns (uint256) { return _profitLimitRatio; } /** * @notice Returns the current loss limit ratio. * @dev Use a getter function to keep the variable private. * @return . The current loss limit ratio. */ function lossLimitRatio() public view returns (uint256) { return _lossLimitRatio; } /** * @notice Set the `profitLimitRatio`. * @dev Denominated in basis points. I.E. 1_000 == 10%. * @param _newProfitLimitRatio The mew profit limit ratio. */ function setProfitLimitRatio( uint256 _newProfitLimitRatio ) external onlyManagement { _setProfitLimitRatio(_newProfitLimitRatio); } /** * @dev Internally set the profit limit ratio. Denominated * in basis points. I.E. 1_000 == 10%. * @param _newProfitLimitRatio The mew profit limit ratio. */ function _setProfitLimitRatio(uint256 _newProfitLimitRatio) internal { require(_newProfitLimitRatio > 0, "!zero profit"); require(_newProfitLimitRatio <= type(uint16).max, "!too high"); _profitLimitRatio = uint16(_newProfitLimitRatio); } /** * @notice Set the `lossLimitRatio`. * @dev Denominated in basis points. I.E. 1_000 == 10%. * @param _newLossLimitRatio The new loss limit ratio. */ function setLossLimitRatio( uint256 _newLossLimitRatio ) external onlyManagement { _setLossLimitRatio(_newLossLimitRatio); } /** * @dev Internally set the loss limit ratio. Denominated * in basis points. I.E. 1_000 == 10%. * @param _newLossLimitRatio The new loss limit ratio. */ function _setLossLimitRatio(uint256 _newLossLimitRatio) internal { require(_newLossLimitRatio < MAX_BPS, "!loss limit"); _lossLimitRatio = uint16(_newLossLimitRatio); } /** * @notice Turns the healthcheck on and off. * @dev If turned off the next report will auto turn it back on. * @param _doHealthCheck Bool if healthCheck should be done. */ function setDoHealthCheck(bool _doHealthCheck) public onlyManagement { doHealthCheck = _doHealthCheck; } /** * @notice OVerrides the default {harvestAndReport} to include a healthcheck. * @return _totalAssets New totalAssets post report. */ function harvestAndReport() external override onlySelf returns (uint256 _totalAssets) { // Let the strategy report. _totalAssets = _harvestAndReport(); // Run the healthcheck on the amount returned. _executeHealthCheck(_totalAssets); } /** * @dev To be called during a report to make sure the profit * or loss being recorded is within the acceptable bound. * * @param _newTotalAssets The amount that will be reported. */ function _executeHealthCheck(uint256 _newTotalAssets) internal virtual { if (!doHealthCheck) { doHealthCheck = true; return; } // Get the current total assets from the implementation. uint256 currentTotalAssets = TokenizedStrategy.totalAssets(); if (_newTotalAssets > currentTotalAssets) { require( ((_newTotalAssets - currentTotalAssets) <= (currentTotalAssets * uint256(_profitLimitRatio)) / MAX_BPS), "healthCheck" ); } else if (currentTotalAssets > _newTotalAssets) { require( (currentTotalAssets - _newTotalAssets <= ((currentTotalAssets * uint256(_lossLimitRatio)) / MAX_BPS)), "healthCheck" ); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful. */ function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) { return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful. */ function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) { return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @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). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.18; interface ISushiMultiPositionLiquidityManager { event Approval( address indexed owner, address indexed spender, uint256 value ); event Deposit( address indexed sender, address indexed to, uint256 shares, uint256 amount0, uint256 amount1 ); event FeesEarned(uint256 amount0Earned, uint256 amount1Earned); event Paused(address account); event RoleAdminChanged( bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole ); event RoleGranted( bytes32 indexed role, address indexed account, address indexed sender ); event RoleRevoked( bytes32 indexed role, address indexed account, address indexed sender ); event Snapshot( uint160 sqrtPriceX96, uint256 totalAmount0, uint256 totalAmount1, uint256 totalSupply ); event Transfer(address indexed from, address indexed to, uint256 value); event Unpaused(address account); event Withdraw( address indexed sender, address indexed to, uint256 shares, uint256 amount0, uint256 amount1 ); struct LiquidityPositions { int24[] lowerTick; int24[] upperTick; uint16[] relativeWeight; } function DEFAULT_ADMIN_ROLE() external view returns (bytes32); function STEER_FRACTION_OF_FEE() external view returns (uint256); function TOTAL_FEE() external view returns (uint256); function accruedSteerFees0() external view returns (uint256); function accruedSteerFees1() external view returns (uint256); function accruedStrategistFees0() external view returns (uint256); function accruedStrategistFees1() external view returns (uint256); function allowance( address owner, address spender ) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function decimals() external view returns (uint8); function decreaseAllowance( address spender, uint256 subtractedValue ) external returns (bool); function deposit( uint256 amount0Desired, uint256 amount1Desired, uint256 amount0Min, uint256 amount1Min, address to ) external returns (uint256 shares, uint256 amount0Used, uint256 amount1Used); function emergencyBurn( int24 tickLower, int24 tickUpper, uint128 liquidity ) external returns (uint256 amount0, uint256 amount1); function getPositions() external view returns (int24[] memory, int24[] memory, uint16[] memory); function getRoleAdmin(bytes32 role) external view returns (bytes32); function getRoleMember( bytes32 role, uint256 index ) external view returns (address); function getRoleMemberCount(bytes32 role) external view returns (uint256); function getTotalAmounts() external view returns (uint256 total0, uint256 total1); function grantRole(bytes32 role, address account) external; function hasRole( bytes32 role, address account ) external view returns (bool); function increaseAllowance( address spender, uint256 addedValue ) external returns (bool); function initialize( address _vaultManager, address, address _steer, bytes calldata _params ) external; function maxTickChange() external view returns (int24); function name() external view returns (string memory); function pause() external; function paused() external view returns (bool); function poke() external; function pool() external view returns (address); function renounceRole(bytes32 role, address account) external; function revokeRole(bytes32 role, address account) external; function steerCollectFees( uint256 amount0, uint256 amount1, address to ) external; function strategistCollectFees( uint256 amount0, uint256 amount1, address to ) external; function supportsInterface(bytes4 interfaceId) external view returns (bool); function symbol() external view returns (string memory); function tend( uint256 totalWeight, LiquidityPositions memory newPositions, bytes memory timeSensitiveData ) external; function token0() external view returns (address); function token1() external view returns (address); function totalSupply() external view returns (uint256); function transfer( address recipient, uint256 amount ) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function twapInterval() external view returns (uint32); function uniswapV3MintCallback( uint256 amount0, uint256 amount1, bytes calldata ) external; function uniswapV3SwapCallback( int256 amount0Wanted, int256 amount1Wanted, bytes calldata ) external; function unpause() external; function withdraw( uint256 shares, uint256 amount0Min, uint256 amount1Min, address to ) external returns (uint256 amount0, uint256 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; import {IUniswapV3PoolImmutables} from './pool/IUniswapV3PoolImmutables.sol'; import {IUniswapV3PoolState} from './pool/IUniswapV3PoolState.sol'; import {IUniswapV3PoolDerivedState} from './pool/IUniswapV3PoolDerivedState.sol'; import {IUniswapV3PoolActions} from './pool/IUniswapV3PoolActions.sol'; import {IUniswapV3PoolOwnerActions} from './pool/IUniswapV3PoolOwnerActions.sol'; import {IUniswapV3PoolErrors} from './pool/IUniswapV3PoolErrors.sol'; import {IUniswapV3PoolEvents} from './pool/IUniswapV3PoolEvents.sol'; /// @title The interface for a Uniswap V3 Pool /// @notice A Uniswap pool facilitates swapping and automated market making between any two assets that strictly conform /// to the ERC20 specification /// @dev The pool interface is broken up into many smaller pieces interface IUniswapV3Pool is IUniswapV3PoolImmutables, IUniswapV3PoolState, IUniswapV3PoolDerivedState, IUniswapV3PoolActions, IUniswapV3PoolOwnerActions, IUniswapV3PoolErrors, IUniswapV3PoolEvents { }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @title Contains 512-bit math functions /// @notice Facilitates multiplication and division that can have overflow of an intermediate value without any loss of precision /// @dev Handles "phantom overflow" i.e., allows multiplication and division where an intermediate value overflows 256 bits library FullMath { /// @notice Calculates floor(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 /// @param a The multiplicand /// @param b The multiplier /// @param denominator The divisor /// @return result The 256-bit result /// @dev Credit to Remco Bloemen under MIT license https://xn--2-umb.com/21/muldiv function mulDiv( uint256 a, uint256 b, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = a * b // Compute the product mod 2**256 and mod 2**256 - 1 // then use the Chinese Remainder Theorem to reconstruct // the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2**256 + prod0 uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(a, b, not(0)) prod0 := mul(a, b) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division if (prod1 == 0) { require(denominator > 0); assembly { result := div(prod0, denominator) } return result; } // Make sure the result is less than 2**256. // Also prevents denominator == 0 require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0] // Compute remainder using mulmod uint256 remainder; assembly { remainder := mulmod(a, b, denominator) } // Subtract 256 bit number from 512 bit number assembly { prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator // Compute largest power of two divisor of denominator. // Always >= 1. uint256 twos = (0 - denominator) & denominator; // Divide denominator by power of two assembly { denominator := div(denominator, twos) } // Divide [prod1 prod0] by the factors of two assembly { prod0 := div(prod0, twos) } // Shift in bits from prod1 into prod0. For this we need // to flip `twos` such that it is 2**256 / twos. // If twos is zero, then it becomes one assembly { twos := add(div(sub(0, twos), twos), 1) } prod0 |= prod1 * twos; // Invert denominator mod 2**256 // Now that denominator is an odd number, it has an inverse // modulo 2**256 such that denominator * inv = 1 mod 2**256. // Compute the inverse by starting with a seed that is correct // correct for four bits. That is, denominator * inv = 1 mod 2**4 uint256 inv = (3 * denominator) ^ 2; // Now use Newton-Raphson iteration to improve the precision. // Thanks to Hensel's lifting lemma, this also works in modular // arithmetic, doubling the correct bits in each step. inv *= 2 - denominator * inv; // inverse mod 2**8 inv *= 2 - denominator * inv; // inverse mod 2**16 inv *= 2 - denominator * inv; // inverse mod 2**32 inv *= 2 - denominator * inv; // inverse mod 2**64 inv *= 2 - denominator * inv; // inverse mod 2**128 inv *= 2 - denominator * inv; // inverse mod 2**256 // Because the division is now exact we can divide by multiplying // with the modular inverse of denominator. This will give us the // correct result modulo 2**256. Since the precoditions guarantee // that the outcome is less than 2**256, this is the final result. // We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inv; return result; } } /// @notice Calculates ceil(a×b÷denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 /// @param a The multiplicand /// @param b The multiplier /// @param denominator The divisor /// @return result The 256-bit result function mulDivRoundingUp( uint256 a, uint256 b, uint256 denominator ) internal pure returns (uint256 result) { unchecked { result = mulDiv(a, b, denominator); if (mulmod(a, b, denominator) > 0) { require(result < type(uint256).max); result++; } } } }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity ^0.8.0; /// @title Math library for computing sqrt prices from ticks and vice versa /// @notice Computes sqrt price for ticks of size 1.0001, i.e. sqrt(1.0001^tick) as fixed point Q64.96 numbers. Supports /// prices between 2**-128 and 2**128 library TickMath { error T(); error R(); /// @dev The minimum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**-128 int24 internal constant MIN_TICK = -887272; /// @dev The maximum tick that may be passed to #getSqrtRatioAtTick computed from log base 1.0001 of 2**128 int24 internal constant MAX_TICK = -MIN_TICK; /// @dev The minimum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MIN_TICK) uint160 internal constant MIN_SQRT_RATIO = 4295128739; /// @dev The maximum value that can be returned from #getSqrtRatioAtTick. Equivalent to getSqrtRatioAtTick(MAX_TICK) uint160 internal constant MAX_SQRT_RATIO = 1461446703485210103287273052203988822378723970342; /// @notice Calculates sqrt(1.0001^tick) * 2^96 /// @dev Throws if |tick| > max tick /// @param tick The input tick for the above formula /// @return sqrtPriceX96 A Fixed point Q64.96 number representing the sqrt of the ratio of the two assets (token1/token0) /// at the given tick function getSqrtRatioAtTick(int24 tick) internal pure returns (uint160 sqrtPriceX96) { unchecked { uint256 absTick = tick < 0 ? uint256(-int256(tick)) : uint256(int256(tick)); if (absTick > uint256(int256(MAX_TICK))) revert T(); uint256 ratio = absTick & 0x1 != 0 ? 0xfffcb933bd6fad37aa2d162d1a594001 : 0x100000000000000000000000000000000; if (absTick & 0x2 != 0) ratio = (ratio * 0xfff97272373d413259a46990580e213a) >> 128; if (absTick & 0x4 != 0) ratio = (ratio * 0xfff2e50f5f656932ef12357cf3c7fdcc) >> 128; if (absTick & 0x8 != 0) ratio = (ratio * 0xffe5caca7e10e4e61c3624eaa0941cd0) >> 128; if (absTick & 0x10 != 0) ratio = (ratio * 0xffcb9843d60f6159c9db58835c926644) >> 128; if (absTick & 0x20 != 0) ratio = (ratio * 0xff973b41fa98c081472e6896dfb254c0) >> 128; if (absTick & 0x40 != 0) ratio = (ratio * 0xff2ea16466c96a3843ec78b326b52861) >> 128; if (absTick & 0x80 != 0) ratio = (ratio * 0xfe5dee046a99a2a811c461f1969c3053) >> 128; if (absTick & 0x100 != 0) ratio = (ratio * 0xfcbe86c7900a88aedcffc83b479aa3a4) >> 128; if (absTick & 0x200 != 0) ratio = (ratio * 0xf987a7253ac413176f2b074cf7815e54) >> 128; if (absTick & 0x400 != 0) ratio = (ratio * 0xf3392b0822b70005940c7a398e4b70f3) >> 128; if (absTick & 0x800 != 0) ratio = (ratio * 0xe7159475a2c29b7443b29c7fa6e889d9) >> 128; if (absTick & 0x1000 != 0) ratio = (ratio * 0xd097f3bdfd2022b8845ad8f792aa5825) >> 128; if (absTick & 0x2000 != 0) ratio = (ratio * 0xa9f746462d870fdf8a65dc1f90e061e5) >> 128; if (absTick & 0x4000 != 0) ratio = (ratio * 0x70d869a156d2a1b890bb3df62baf32f7) >> 128; if (absTick & 0x8000 != 0) ratio = (ratio * 0x31be135f97d08fd981231505542fcfa6) >> 128; if (absTick & 0x10000 != 0) ratio = (ratio * 0x9aa508b5b7a84e1c677de54f3e99bc9) >> 128; if (absTick & 0x20000 != 0) ratio = (ratio * 0x5d6af8dedb81196699c329225ee604) >> 128; if (absTick & 0x40000 != 0) ratio = (ratio * 0x2216e584f5fa1ea926041bedfe98) >> 128; if (absTick & 0x80000 != 0) ratio = (ratio * 0x48a170391f7dc42444e8fa2) >> 128; if (tick > 0) ratio = type(uint256).max / ratio; // this divides by 1<<32 rounding up to go from a Q128.128 to a Q128.96. // we then downcast because we know the result always fits within 160 bits due to our tick input constraint // we round up in the division so getTickAtSqrtRatio of the output price is always consistent sqrtPriceX96 = uint160((ratio >> 32) + (ratio % (1 << 32) == 0 ? 0 : 1)); } } /// @notice Calculates the greatest tick value such that getRatioAtTick(tick) <= ratio /// @dev Throws in case sqrtPriceX96 < MIN_SQRT_RATIO, as MIN_SQRT_RATIO is the lowest value getRatioAtTick may /// ever return. /// @param sqrtPriceX96 The sqrt ratio for which to compute the tick as a Q64.96 /// @return tick The greatest tick for which the ratio is less than or equal to the input ratio function getTickAtSqrtRatio(uint160 sqrtPriceX96) internal pure returns (int24 tick) { unchecked { // second inequality must be < because the price can never reach the price at the max tick if (!(sqrtPriceX96 >= MIN_SQRT_RATIO && sqrtPriceX96 < MAX_SQRT_RATIO)) revert R(); uint256 ratio = uint256(sqrtPriceX96) << 32; uint256 r = ratio; uint256 msb = 0; assembly { let f := shl(7, gt(r, 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(6, gt(r, 0xFFFFFFFFFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(5, gt(r, 0xFFFFFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(4, gt(r, 0xFFFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(3, gt(r, 0xFF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(2, gt(r, 0xF)) msb := or(msb, f) r := shr(f, r) } assembly { let f := shl(1, gt(r, 0x3)) msb := or(msb, f) r := shr(f, r) } assembly { let f := gt(r, 0x1) msb := or(msb, f) } if (msb >= 128) r = ratio >> (msb - 127); else r = ratio << (127 - msb); int256 log_2 = (int256(msb) - 128) << 64; assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(63, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(62, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(61, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(60, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(59, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(58, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(57, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(56, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(55, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(54, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(53, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(52, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(51, f)) r := shr(f, r) } assembly { r := shr(127, mul(r, r)) let f := shr(128, r) log_2 := or(log_2, shl(50, f)) } int256 log_sqrt10001 = log_2 * 255738958999603826347141; // 128.128 number int24 tickLow = int24((log_sqrt10001 - 3402992956809132418596140100660247210) >> 128); int24 tickHi = int24((log_sqrt10001 + 291339464771989622907027621153398088495) >> 128); tick = tickLow == tickHi ? tickLow : getSqrtRatioAtTick(tickHi) <= sqrtPriceX96 ? tickHi : tickLow; } } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.18; interface IAuction { event AuctionDisabled(address indexed from, address indexed to); event AuctionEnabled(address indexed from, address indexed to); event AuctionKicked(address from, uint256 available); event GovernanceTransferred( address indexed previousGovernance, address indexed newGovernance ); event UpdatePendingGovernance(address indexed newPendingGovernance); event UpdatedStartingPrice(uint256 startingPrice); struct AuctionInfo { uint64 kicked; uint64 scaler; uint128 initialAvailable; } function acceptGovernance() external; function auctionLength() external view returns (uint256); function auctions(address) external view returns (AuctionInfo memory); function available(address _from) external view returns (uint256); function disable(address _from) external; function disable(address _from, uint256 _index) external; function enable(address _from) external; function enabledAuctions(uint256) external view returns (address); function getAllEnabledAuctions() external view returns (address[] memory); function getAmountNeeded(address _from) external view returns (uint256); function getAmountNeeded( address _from, uint256 _amountToTake, uint256 _timestamp ) external view returns (uint256); function getAmountNeeded( address _from, uint256 _amountToTake ) external view returns (uint256); function governance() external view returns (address); function initialize( address _want, address _receiver, address _governance, uint256 _auctionLength, uint256 _startingPrice ) external; function isActive(address _from) external view returns (bool); function isValidSignature( bytes32 _hash, bytes calldata signature ) external view returns (bytes4); function kick(address _from) external returns (uint256 _available); function kickable(address _from) external view returns (uint256); function kicked(address _from) external view returns (uint256); function pendingGovernance() external view returns (address); function price( address _from, uint256 _timestamp ) external view returns (uint256); function price(address _from) external view returns (uint256); function receiver() external view returns (address); function setStartingPrice(uint256 _startingPrice) external; function settle(address _from) external; function startingPrice() external view returns (uint256); function sweep(address _token) external; function take(address _from) external returns (uint256); function take(address _from, uint256 _maxAmount) external returns (uint256); function take( address _from, uint256 _maxAmount, address _receiver, bytes calldata _data ) external returns (uint256); function take( address _from, uint256 _maxAmount, address _receiver ) external returns (uint256); function transferGovernance(address _newGovernance) external; function want() external view returns (address); }
pragma solidity ^0.8.18; interface IMerklDistributor { /// @notice Claims rewards for a given set of users /// @dev Anyone may call this function for anyone else, funds go to destination regardless, it's just a question of /// who provides the proof and pays the gas: `msg.sender` is used only for addresses that require a trusted operator /// @param users Recipient of tokens /// @param tokens ERC20 claimed /// @param amounts Amount of tokens that will be sent to the corresponding users /// @param proofs Array of hashes bridging from a leaf `(hash of user | token | amount)` to the Merkle root function claim( address[] calldata users, address[] calldata tokens, uint256[] calldata amounts, bytes32[][] calldata proofs ) external; }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.8.18; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; // TokenizedStrategy interface used for internal view delegateCalls. import {ITokenizedStrategy} from "./interfaces/ITokenizedStrategy.sol"; /** * @title YearnV3 Base Strategy * @author yearn.finance * @notice * BaseStrategy implements all of the required functionality to * seamlessly integrate with the `TokenizedStrategy` implementation contract * allowing anyone to easily build a fully permissionless ERC-4626 compliant * Vault by inheriting this contract and overriding three simple functions. * It utilizes an immutable proxy pattern that allows the BaseStrategy * to remain simple and small. All standard logic is held within the * `TokenizedStrategy` and is reused over any n strategies all using the * `fallback` function to delegatecall the implementation so that strategists * can only be concerned with writing their strategy specific code. * * This contract should be inherited and the three main abstract methods * `_deployFunds`, `_freeFunds` and `_harvestAndReport` implemented to adapt * the Strategy to the particular needs it has to generate yield. There are * other optional methods that can be implemented to further customize * the strategy if desired. * * All default storage for the strategy is controlled and updated by the * `TokenizedStrategy`. The implementation holds a storage struct that * contains all needed global variables in a manual storage slot. This * means strategists can feel free to implement their own custom storage * variables as they need with no concern of collisions. All global variables * can be viewed within the Strategy by a simple call using the * `TokenizedStrategy` variable. IE: TokenizedStrategy.globalVariable();. */ abstract contract BaseStrategy { /*////////////////////////////////////////////////////////////// MODIFIERS //////////////////////////////////////////////////////////////*/ /** * @dev Used on TokenizedStrategy callback functions to make sure it is post * a delegateCall from this address to the TokenizedStrategy. */ modifier onlySelf() { _onlySelf(); _; } /** * @dev Use to assure that the call is coming from the strategies management. */ modifier onlyManagement() { TokenizedStrategy.requireManagement(msg.sender); _; } /** * @dev Use to assure that the call is coming from either the strategies * management or the keeper. */ modifier onlyKeepers() { TokenizedStrategy.requireKeeperOrManagement(msg.sender); _; } /** * @dev Use to assure that the call is coming from either the strategies * management or the emergency admin. */ modifier onlyEmergencyAuthorized() { TokenizedStrategy.requireEmergencyAuthorized(msg.sender); _; } /** * @dev Require that the msg.sender is this address. */ function _onlySelf() internal view { require(msg.sender == address(this), "!self"); } /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ /** * @dev This is the address of the TokenizedStrategy implementation * contract that will be used by all strategies to handle the * accounting, logic, storage etc. * * Any external calls to the that don't hit one of the functions * defined in this base or the strategy will end up being forwarded * through the fallback function, which will delegateCall this address. * * This address should be the same for every strategy, never be adjusted * and always be checked before any integration with the Strategy. */ address public constant tokenizedStrategyAddress = 0xD377919FA87120584B21279a491F82D5265A139c; /*////////////////////////////////////////////////////////////// IMMUTABLES //////////////////////////////////////////////////////////////*/ /** * @dev Underlying asset the Strategy is earning yield on. * Stored here for cheap retrievals within the strategy. */ ERC20 internal immutable asset; /** * @dev This variable is set to address(this) during initialization of each strategy. * * This can be used to retrieve storage data within the strategy * contract as if it were a linked library. * * i.e. uint256 totalAssets = TokenizedStrategy.totalAssets() * * Using address(this) will mean any calls using this variable will lead * to a call to itself. Which will hit the fallback function and * delegateCall that to the actual TokenizedStrategy. */ ITokenizedStrategy internal immutable TokenizedStrategy; /** * @notice Used to initialize the strategy on deployment. * * This will set the `TokenizedStrategy` variable for easy * internal view calls to the implementation. As well as * initializing the default storage variables based on the * parameters and using the deployer for the permissioned roles. * * @param _asset Address of the underlying asset. * @param _name Name the strategy will use. */ constructor(address _asset, string memory _name) { asset = ERC20(_asset); // Set instance of the implementation for internal use. TokenizedStrategy = ITokenizedStrategy(address(this)); // Initialize the strategy's storage variables. _delegateCall( abi.encodeCall( ITokenizedStrategy.initialize, (_asset, _name, msg.sender, msg.sender, msg.sender) ) ); // Store the tokenizedStrategyAddress at the standard implementation // address storage slot so etherscan picks up the interface. This gets // stored on initialization and never updated. assembly { sstore( // keccak256('eip1967.proxy.implementation' - 1) 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc, tokenizedStrategyAddress ) } } /*////////////////////////////////////////////////////////////// NEEDED TO BE OVERRIDDEN BY STRATEGIST //////////////////////////////////////////////////////////////*/ /** * @dev Can deploy up to '_amount' of 'asset' in the yield source. * * This function is called at the end of a {deposit} or {mint} * call. Meaning that unless a whitelist is implemented it will * be entirely permissionless and thus can be sandwiched or otherwise * manipulated. * * @param _amount The amount of 'asset' that the strategy can attempt * to deposit in the yield source. */ function _deployFunds(uint256 _amount) internal virtual; /** * @dev Should attempt to free the '_amount' of 'asset'. * * NOTE: The amount of 'asset' that is already loose has already * been accounted for. * * This function is called during {withdraw} and {redeem} calls. * Meaning that unless a whitelist is implemented it will be * entirely permissionless and thus can be sandwiched or otherwise * manipulated. * * Should not rely on asset.balanceOf(address(this)) calls other than * for diff accounting purposes. * * Any difference between `_amount` and what is actually freed will be * counted as a loss and passed on to the withdrawer. This means * care should be taken in times of illiquidity. It may be better to revert * if withdraws are simply illiquid so not to realize incorrect losses. * * @param _amount, The amount of 'asset' to be freed. */ function _freeFunds(uint256 _amount) internal virtual; /** * @dev Internal function to harvest all rewards, redeploy any idle * funds and return an accurate accounting of all funds currently * held by the Strategy. * * This should do any needed harvesting, rewards selling, accrual, * redepositing etc. to get the most accurate view of current assets. * * NOTE: All applicable assets including loose assets should be * accounted for in this function. * * Care should be taken when relying on oracles or swap values rather * than actual amounts as all Strategy profit/loss accounting will * be done based on this returned value. * * This can still be called post a shutdown, a strategist can check * `TokenizedStrategy.isShutdown()` to decide if funds should be * redeployed or simply realize any profits/losses. * * @return _totalAssets A trusted and accurate account for the total * amount of 'asset' the strategy currently holds including idle funds. */ function _harvestAndReport() internal virtual returns (uint256 _totalAssets); /*////////////////////////////////////////////////////////////// OPTIONAL TO OVERRIDE BY STRATEGIST //////////////////////////////////////////////////////////////*/ /** * @dev Optional function for strategist to override that can * be called in between reports. * * If '_tend' is used tendTrigger() will also need to be overridden. * * This call can only be called by a permissioned role so may be * through protected relays. * * This can be used to harvest and compound rewards, deposit idle funds, * perform needed position maintenance or anything else that doesn't need * a full report for. * * EX: A strategy that can not deposit funds without getting * sandwiched can use the tend when a certain threshold * of idle to totalAssets has been reached. * * This will have no effect on PPS of the strategy till report() is called. * * @param _totalIdle The current amount of idle funds that are available to deploy. */ function _tend(uint256 _totalIdle) internal virtual {} /** * @dev Optional trigger to override if tend() will be used by the strategy. * This must be implemented if the strategy hopes to invoke _tend(). * * @return . Should return true if tend() should be called by keeper or false if not. */ function _tendTrigger() internal view virtual returns (bool) { return false; } /** * @notice Returns if tend() should be called by a keeper. * * @return . Should return true if tend() should be called by keeper or false if not. * @return . Calldata for the tend call. */ function tendTrigger() external view virtual returns (bool, bytes memory) { return ( // Return the status of the tend trigger. _tendTrigger(), // And the needed calldata either way. abi.encodeWithSelector(ITokenizedStrategy.tend.selector) ); } /** * @notice Gets the max amount of `asset` that an address can deposit. * @dev Defaults to an unlimited amount for any address. But can * be overridden by strategists. * * This function will be called before any deposit or mints to enforce * any limits desired by the strategist. This can be used for either a * traditional deposit limit or for implementing a whitelist etc. * * EX: * if(isAllowed[_owner]) return super.availableDepositLimit(_owner); * * This does not need to take into account any conversion rates * from shares to assets. But should know that any non max uint256 * amounts may be converted to shares. So it is recommended to keep * custom amounts low enough as not to cause overflow when multiplied * by `totalSupply`. * * @param . The address that is depositing into the strategy. * @return . The available amount the `_owner` can deposit in terms of `asset` */ function availableDepositLimit( address /*_owner*/ ) public view virtual returns (uint256) { return type(uint256).max; } /** * @notice Gets the max amount of `asset` that can be withdrawn. * @dev Defaults to an unlimited amount for any address. But can * be overridden by strategists. * * This function will be called before any withdraw or redeem to enforce * any limits desired by the strategist. This can be used for illiquid * or sandwichable strategies. It should never be lower than `totalIdle`. * * EX: * return TokenIzedStrategy.totalIdle(); * * This does not need to take into account the `_owner`'s share balance * or conversion rates from shares to assets. * * @param . The address that is withdrawing from the strategy. * @return . The available amount that can be withdrawn in terms of `asset` */ function availableWithdrawLimit( address /*_owner*/ ) public view virtual returns (uint256) { return type(uint256).max; } /** * @dev Optional function for a strategist to override that will * allow management to manually withdraw deployed funds from the * yield source if a strategy is shutdown. * * This should attempt to free `_amount`, noting that `_amount` may * be more than is currently deployed. * * NOTE: This will not realize any profits or losses. A separate * {report} will be needed in order to record any profit/loss. If * a report may need to be called after a shutdown it is important * to check if the strategy is shutdown during {_harvestAndReport} * so that it does not simply re-deploy all funds that had been freed. * * EX: * if(freeAsset > 0 && !TokenizedStrategy.isShutdown()) { * depositFunds... * } * * @param _amount The amount of asset to attempt to free. */ function _emergencyWithdraw(uint256 _amount) internal virtual {} /*////////////////////////////////////////////////////////////// TokenizedStrategy HOOKS //////////////////////////////////////////////////////////////*/ /** * @notice Can deploy up to '_amount' of 'asset' in yield source. * @dev Callback for the TokenizedStrategy to call during a {deposit} * or {mint} to tell the strategy it can deploy funds. * * Since this can only be called after a {deposit} or {mint} * delegateCall to the TokenizedStrategy msg.sender == address(this). * * Unless a whitelist is implemented this will be entirely permissionless * and thus can be sandwiched or otherwise manipulated. * * @param _amount The amount of 'asset' that the strategy can * attempt to deposit in the yield source. */ function deployFunds(uint256 _amount) external virtual onlySelf { _deployFunds(_amount); } /** * @notice Should attempt to free the '_amount' of 'asset'. * @dev Callback for the TokenizedStrategy to call during a withdraw * or redeem to free the needed funds to service the withdraw. * * This can only be called after a 'withdraw' or 'redeem' delegateCall * to the TokenizedStrategy so msg.sender == address(this). * * @param _amount The amount of 'asset' that the strategy should attempt to free up. */ function freeFunds(uint256 _amount) external virtual onlySelf { _freeFunds(_amount); } /** * @notice Returns the accurate amount of all funds currently * held by the Strategy. * @dev Callback for the TokenizedStrategy to call during a report to * get an accurate accounting of assets the strategy controls. * * This can only be called after a report() delegateCall to the * TokenizedStrategy so msg.sender == address(this). * * @return . A trusted and accurate account for the total amount * of 'asset' the strategy currently holds including idle funds. */ function harvestAndReport() external virtual onlySelf returns (uint256) { return _harvestAndReport(); } /** * @notice Will call the internal '_tend' when a keeper tends the strategy. * @dev Callback for the TokenizedStrategy to initiate a _tend call in the strategy. * * This can only be called after a tend() delegateCall to the TokenizedStrategy * so msg.sender == address(this). * * We name the function `tendThis` so that `tend` calls are forwarded to * the TokenizedStrategy. * @param _totalIdle The amount of current idle funds that can be * deployed during the tend */ function tendThis(uint256 _totalIdle) external virtual onlySelf { _tend(_totalIdle); } /** * @notice Will call the internal '_emergencyWithdraw' function. * @dev Callback for the TokenizedStrategy during an emergency withdraw. * * This can only be called after a emergencyWithdraw() delegateCall to * the TokenizedStrategy so msg.sender == address(this). * * We name the function `shutdownWithdraw` so that `emergencyWithdraw` * calls are forwarded to the TokenizedStrategy. * * @param _amount The amount of asset to attempt to free. */ function shutdownWithdraw(uint256 _amount) external virtual onlySelf { _emergencyWithdraw(_amount); } /** * @dev Function used to delegate call the TokenizedStrategy with * certain `_calldata` and return any return values. * * This is used to setup the initial storage of the strategy, and * can be used by strategist to forward any other call to the * TokenizedStrategy implementation. * * @param _calldata The abi encoded calldata to use in delegatecall. * @return . The return value if the call was successful in bytes. */ function _delegateCall( bytes memory _calldata ) internal returns (bytes memory) { // Delegate call the tokenized strategy with provided calldata. (bool success, bytes memory result) = tokenizedStrategyAddress .delegatecall(_calldata); // If the call reverted. Return the error. if (!success) { assembly { let ptr := mload(0x40) let size := returndatasize() returndatacopy(ptr, 0, size) revert(ptr, size) } } // Return the result. return result; } /** * @dev Execute a function on the TokenizedStrategy and return any value. * * This fallback function will be executed when any of the standard functions * defined in the TokenizedStrategy are called since they wont be defined in * this contract. * * It will delegatecall the TokenizedStrategy implementation with the exact * calldata and return any relevant values. * */ fallback() external { // load our target address address _tokenizedStrategyAddress = tokenizedStrategyAddress; // Execute external function using delegatecall and return any value. assembly { // Copy function selector and any arguments. calldatacopy(0, 0, calldatasize()) // Execute function delegatecall. let result := delegatecall( gas(), _tokenizedStrategyAddress, 0, calldatasize(), 0, 0 ) // Get any return value returndatacopy(0, 0, returndatasize()) // Return any return value or error back to the caller switch result case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that never changes /// @notice These parameters are fixed for a pool forever, i.e., the methods will always return the same values interface IUniswapV3PoolImmutables { /// @notice The contract that deployed the pool, which must adhere to the IUniswapV3Factory interface /// @return The contract address function factory() external view returns (address); /// @notice The first of the two tokens of the pool, sorted by address /// @return The token contract address function token0() external view returns (address); /// @notice The second of the two tokens of the pool, sorted by address /// @return The token contract address function token1() external view returns (address); /// @notice The pool's fee in hundredths of a bip, i.e. 1e-6 /// @return The fee function fee() external view returns (uint24); /// @notice The pool tick spacing /// @dev Ticks can only be used at multiples of this value, minimum of 1 and always positive /// e.g.: a tickSpacing of 3 means ticks can be initialized every 3rd tick, i.e., ..., -6, -3, 0, 3, 6, ... /// This value is an int24 to avoid casting even though it is always positive. /// @return The tick spacing function tickSpacing() external view returns (int24); /// @notice The maximum amount of position liquidity that can use any tick in the range /// @dev This parameter is enforced per tick to prevent liquidity from overflowing a uint128 at any point, and /// also prevents out-of-range liquidity from being used to prevent adding in-range liquidity to a pool /// @return The max amount of liquidity per tick function maxLiquidityPerTick() external view returns (uint128); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that can change /// @notice These methods compose the pool's state, and can change with any frequency including multiple times /// per transaction interface IUniswapV3PoolState { /// @notice The 0th storage slot in the pool stores many values, and is exposed as a single method to save gas /// when accessed externally. /// @return sqrtPriceX96 The current price of the pool as a sqrt(token1/token0) Q64.96 value /// @return tick The current tick of the pool, i.e. according to the last tick transition that was run. /// This value may not always be equal to SqrtTickMath.getTickAtSqrtRatio(sqrtPriceX96) if the price is on a tick /// boundary. /// @return observationIndex The index of the last oracle observation that was written, /// @return observationCardinality The current maximum number of observations stored in the pool, /// @return observationCardinalityNext The next maximum number of observations, to be updated when the observation. /// @return feeProtocol The protocol fee for both tokens of the pool. /// Encoded as two 4 bit values, where the protocol fee of token1 is shifted 4 bits and the protocol fee of token0 /// is the lower 4 bits. Used as the denominator of a fraction of the swap fee, e.g. 4 means 1/4th of the swap fee. /// unlocked Whether the pool is currently locked to reentrancy function slot0() external view returns ( uint160 sqrtPriceX96, int24 tick, uint16 observationIndex, uint16 observationCardinality, uint16 observationCardinalityNext, uint8 feeProtocol, bool unlocked ); /// @notice The fee growth as a Q128.128 fees of token0 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal0X128() external view returns (uint256); /// @notice The fee growth as a Q128.128 fees of token1 collected per unit of liquidity for the entire life of the pool /// @dev This value can overflow the uint256 function feeGrowthGlobal1X128() external view returns (uint256); /// @notice The amounts of token0 and token1 that are owed to the protocol /// @dev Protocol fees will never exceed uint128 max in either token function protocolFees() external view returns (uint128 token0, uint128 token1); /// @notice The currently in range liquidity available to the pool /// @dev This value has no relationship to the total liquidity across all ticks /// @return The liquidity at the current price of the pool function liquidity() external view returns (uint128); /// @notice Look up information about a specific tick in the pool /// @param tick The tick to look up /// @return liquidityGross the total amount of position liquidity that uses the pool either as tick lower or /// tick upper /// @return liquidityNet how much liquidity changes when the pool price crosses the tick, /// @return feeGrowthOutside0X128 the fee growth on the other side of the tick from the current tick in token0, /// @return feeGrowthOutside1X128 the fee growth on the other side of the tick from the current tick in token1, /// @return tickCumulativeOutside the cumulative tick value on the other side of the tick from the current tick /// @return secondsPerLiquidityOutsideX128 the seconds spent per liquidity on the other side of the tick from the current tick, /// @return secondsOutside the seconds spent on the other side of the tick from the current tick, /// @return initialized Set to true if the tick is initialized, i.e. liquidityGross is greater than 0, otherwise equal to false. /// Outside values can only be used if the tick is initialized, i.e. if liquidityGross is greater than 0. /// In addition, these values are only relative and must be used only in comparison to previous snapshots for /// a specific position. function ticks(int24 tick) external view returns ( uint128 liquidityGross, int128 liquidityNet, uint256 feeGrowthOutside0X128, uint256 feeGrowthOutside1X128, int56 tickCumulativeOutside, uint160 secondsPerLiquidityOutsideX128, uint32 secondsOutside, bool initialized ); /// @notice Returns 256 packed tick initialized boolean values. See TickBitmap for more information function tickBitmap(int16 wordPosition) external view returns (uint256); /// @notice Returns the information about a position by the position's key /// @param key The position's key is a hash of a preimage composed by the owner, tickLower and tickUpper /// @return liquidity The amount of liquidity in the position, /// @return feeGrowthInside0LastX128 fee growth of token0 inside the tick range as of the last mint/burn/poke, /// @return feeGrowthInside1LastX128 fee growth of token1 inside the tick range as of the last mint/burn/poke, /// @return tokensOwed0 the computed amount of token0 owed to the position as of the last mint/burn/poke, /// @return tokensOwed1 the computed amount of token1 owed to the position as of the last mint/burn/poke function positions(bytes32 key) external view returns ( uint128 liquidity, uint256 feeGrowthInside0LastX128, uint256 feeGrowthInside1LastX128, uint128 tokensOwed0, uint128 tokensOwed1 ); /// @notice Returns data about a specific observation index /// @param index The element of the observations array to fetch /// @dev You most likely want to use #observe() instead of this method to get an observation as of some amount of time /// ago, rather than at a specific index in the array. /// @return blockTimestamp The timestamp of the observation, /// @return tickCumulative the tick multiplied by seconds elapsed for the life of the pool as of the observation timestamp, /// @return secondsPerLiquidityCumulativeX128 the seconds per in range liquidity for the life of the pool as of the observation timestamp, /// @return initialized whether the observation has been initialized and the values are safe to use function observations(uint256 index) external view returns ( uint32 blockTimestamp, int56 tickCumulative, uint160 secondsPerLiquidityCumulativeX128, bool initialized ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Pool state that is not stored /// @notice Contains view functions to provide information about the pool that is computed rather than stored on the /// blockchain. The functions here may have variable gas costs. interface IUniswapV3PoolDerivedState { /// @notice Returns the cumulative tick and liquidity as of each timestamp `secondsAgo` from the current block timestamp /// @dev To get a time weighted average tick or liquidity-in-range, you must call this with two values, one representing /// the beginning of the period and another for the end of the period. E.g., to get the last hour time-weighted average tick, /// you must call it with secondsAgos = [3600, 0]. /// @dev The time weighted average tick represents the geometric time weighted average price of the pool, in /// log base sqrt(1.0001) of token1 / token0. The TickMath library can be used to go from a tick value to a ratio. /// @param secondsAgos From how long ago each cumulative tick and liquidity value should be returned /// @return tickCumulatives Cumulative tick values as of each `secondsAgos` from the current block timestamp /// @return secondsPerLiquidityCumulativeX128s Cumulative seconds per liquidity-in-range value as of each `secondsAgos` from the current block /// timestamp function observe(uint32[] calldata secondsAgos) external view returns (int56[] memory tickCumulatives, uint160[] memory secondsPerLiquidityCumulativeX128s); /// @notice Returns a snapshot of the tick cumulative, seconds per liquidity and seconds inside a tick range /// @dev Snapshots must only be compared to other snapshots, taken over a period for which a position existed. /// I.e., snapshots cannot be compared if a position is not held for the entire period between when the first /// snapshot is taken and the second snapshot is taken. /// @param tickLower The lower tick of the range /// @param tickUpper The upper tick of the range /// @return tickCumulativeInside The snapshot of the tick accumulator for the range /// @return secondsPerLiquidityInsideX128 The snapshot of seconds per liquidity for the range /// @return secondsInside The snapshot of seconds per liquidity for the range function snapshotCumulativesInside(int24 tickLower, int24 tickUpper) external view returns ( int56 tickCumulativeInside, uint160 secondsPerLiquidityInsideX128, uint32 secondsInside ); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissionless pool actions /// @notice Contains pool methods that can be called by anyone interface IUniswapV3PoolActions { /// @notice Sets the initial price for the pool /// @dev Price is represented as a sqrt(amountToken1/amountToken0) Q64.96 value /// @param sqrtPriceX96 the initial sqrt price of the pool as a Q64.96 function initialize(uint160 sqrtPriceX96) external; /// @notice Adds liquidity for the given recipient/tickLower/tickUpper position /// @dev The caller of this method receives a callback in the form of IUniswapV3MintCallback#uniswapV3MintCallback /// in which they must pay any token0 or token1 owed for the liquidity. The amount of token0/token1 due depends /// on tickLower, tickUpper, the amount of liquidity, and the current price. /// @param recipient The address for which the liquidity will be created /// @param tickLower The lower tick of the position in which to add liquidity /// @param tickUpper The upper tick of the position in which to add liquidity /// @param amount The amount of liquidity to mint /// @param data Any data that should be passed through to the callback /// @return amount0 The amount of token0 that was paid to mint the given amount of liquidity. Matches the value in the callback /// @return amount1 The amount of token1 that was paid to mint the given amount of liquidity. Matches the value in the callback function mint( address recipient, int24 tickLower, int24 tickUpper, uint128 amount, bytes calldata data ) external returns (uint256 amount0, uint256 amount1); /// @notice Collects tokens owed to a position /// @dev Does not recompute fees earned, which must be done either via mint or burn of any amount of liquidity. /// Collect must be called by the position owner. To withdraw only token0 or only token1, amount0Requested or /// amount1Requested may be set to zero. To withdraw all tokens owed, caller may pass any value greater than the /// actual tokens owed, e.g. type(uint128).max. Tokens owed may be from accumulated swap fees or burned liquidity. /// @param recipient The address which should receive the fees collected /// @param tickLower The lower tick of the position for which to collect fees /// @param tickUpper The upper tick of the position for which to collect fees /// @param amount0Requested How much token0 should be withdrawn from the fees owed /// @param amount1Requested How much token1 should be withdrawn from the fees owed /// @return amount0 The amount of fees collected in token0 /// @return amount1 The amount of fees collected in token1 function collect( address recipient, int24 tickLower, int24 tickUpper, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); /// @notice Burn liquidity from the sender and account tokens owed for the liquidity to the position /// @dev Can be used to trigger a recalculation of fees owed to a position by calling with an amount of 0 /// @dev Fees must be collected separately via a call to #collect /// @param tickLower The lower tick of the position for which to burn liquidity /// @param tickUpper The upper tick of the position for which to burn liquidity /// @param amount How much liquidity to burn /// @return amount0 The amount of token0 sent to the recipient /// @return amount1 The amount of token1 sent to the recipient function burn( int24 tickLower, int24 tickUpper, uint128 amount ) external returns (uint256 amount0, uint256 amount1); /// @notice Swap token0 for token1, or token1 for token0 /// @dev The caller of this method receives a callback in the form of IUniswapV3SwapCallback#uniswapV3SwapCallback /// @param recipient The address to receive the output of the swap /// @param zeroForOne The direction of the swap, true for token0 to token1, false for token1 to token0 /// @param amountSpecified The amount of the swap, which implicitly configures the swap as exact input (positive), or exact output (negative) /// @param sqrtPriceLimitX96 The Q64.96 sqrt price limit. If zero for one, the price cannot be less than this /// value after the swap. If one for zero, the price cannot be greater than this value after the swap /// @param data Any data to be passed through to the callback /// @return amount0 The delta of the balance of token0 of the pool, exact when negative, minimum when positive /// @return amount1 The delta of the balance of token1 of the pool, exact when negative, minimum when positive function swap( address recipient, bool zeroForOne, int256 amountSpecified, uint160 sqrtPriceLimitX96, bytes calldata data ) external returns (int256 amount0, int256 amount1); /// @notice Receive token0 and/or token1 and pay it back, plus a fee, in the callback /// @dev The caller of this method receives a callback in the form of IUniswapV3FlashCallback#uniswapV3FlashCallback /// @dev Can be used to donate underlying tokens pro-rata to currently in-range liquidity providers by calling /// with 0 amount{0,1} and sending the donation amount(s) from the callback /// @param recipient The address which will receive the token0 and token1 amounts /// @param amount0 The amount of token0 to send /// @param amount1 The amount of token1 to send /// @param data Any data to be passed through to the callback function flash( address recipient, uint256 amount0, uint256 amount1, bytes calldata data ) external; /// @notice Increase the maximum number of price and liquidity observations that this pool will store /// @dev This method is no-op if the pool already has an observationCardinalityNext greater than or equal to /// the input observationCardinalityNext. /// @param observationCardinalityNext The desired minimum number of observations for the pool to store function increaseObservationCardinalityNext(uint16 observationCardinalityNext) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Permissioned pool actions /// @notice Contains pool methods that may only be called by the factory owner interface IUniswapV3PoolOwnerActions { /// @notice Set the denominator of the protocol's % share of the fees /// @param feeProtocol0 new protocol fee for token0 of the pool /// @param feeProtocol1 new protocol fee for token1 of the pool function setFeeProtocol(uint8 feeProtocol0, uint8 feeProtocol1) external; /// @notice Collect the protocol fee accrued to the pool /// @param recipient The address to which collected protocol fees should be sent /// @param amount0Requested The maximum amount of token0 to send, can be 0 to collect fees in only token1 /// @param amount1Requested The maximum amount of token1 to send, can be 0 to collect fees in only token0 /// @return amount0 The protocol fee collected in token0 /// @return amount1 The protocol fee collected in token1 function collectProtocol( address recipient, uint128 amount0Requested, uint128 amount1Requested ) external returns (uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Errors emitted by a pool /// @notice Contains all events emitted by the pool interface IUniswapV3PoolErrors { error LOK(); error TLU(); error TLM(); error TUM(); error AI(); error M0(); error M1(); error AS(); error IIA(); error L(); error F0(); error F1(); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Events emitted by a pool /// @notice Contains all events emitted by the pool interface IUniswapV3PoolEvents { /// @notice Emitted exactly once by a pool when #initialize is first called on the pool /// @dev Mint/Burn/Swap cannot be emitted by the pool before Initialize /// @param sqrtPriceX96 The initial sqrt price of the pool, as a Q64.96 /// @param tick The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool event Initialize(uint160 sqrtPriceX96, int24 tick); /// @notice Emitted when liquidity is minted for a given position /// @param sender The address that minted the liquidity /// @param owner The owner of the position and recipient of any minted liquidity /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount The amount of liquidity minted to the position range /// @param amount0 How much token0 was required for the minted liquidity /// @param amount1 How much token1 was required for the minted liquidity event Mint( address sender, address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted when fees are collected by the owner of a position /// @dev Collect events may be emitted with zero amount0 and amount1 when the caller chooses not to collect fees /// @param owner The owner of the position for which fees are collected /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount0 The amount of token0 fees collected /// @param amount1 The amount of token1 fees collected event Collect( address indexed owner, address recipient, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount0, uint128 amount1 ); /// @notice Emitted when a position's liquidity is removed /// @dev Does not withdraw any fees earned by the liquidity position, which must be withdrawn via #collect /// @param owner The owner of the position for which liquidity is removed /// @param tickLower The lower tick of the position /// @param tickUpper The upper tick of the position /// @param amount The amount of liquidity to remove /// @param amount0 The amount of token0 withdrawn /// @param amount1 The amount of token1 withdrawn event Burn( address indexed owner, int24 indexed tickLower, int24 indexed tickUpper, uint128 amount, uint256 amount0, uint256 amount1 ); /// @notice Emitted by the pool for any swaps between token0 and token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the output of the swap /// @param amount0 The delta of the token0 balance of the pool /// @param amount1 The delta of the token1 balance of the pool /// @param sqrtPriceX96 The sqrt(price) of the pool after the swap, as a Q64.96 /// @param liquidity The liquidity of the pool after the swap /// @param tick The log base 1.0001 of price of the pool after the swap event Swap( address indexed sender, address indexed recipient, int256 amount0, int256 amount1, uint160 sqrtPriceX96, uint128 liquidity, int24 tick ); /// @notice Emitted by the pool for any flashes of token0/token1 /// @param sender The address that initiated the swap call, and that received the callback /// @param recipient The address that received the tokens from flash /// @param amount0 The amount of token0 that was flashed /// @param amount1 The amount of token1 that was flashed /// @param paid0 The amount of token0 paid for the flash, which can exceed the amount0 plus the fee /// @param paid1 The amount of token1 paid for the flash, which can exceed the amount1 plus the fee event Flash( address indexed sender, address indexed recipient, uint256 amount0, uint256 amount1, uint256 paid0, uint256 paid1 ); /// @notice Emitted by the pool for increases to the number of observations that can be stored /// @dev observationCardinalityNext is not the observation cardinality until an observation is written at the index /// just before a mint/swap/burn. /// @param observationCardinalityNextOld The previous value of the next observation cardinality /// @param observationCardinalityNextNew The updated value of the next observation cardinality event IncreaseObservationCardinalityNext( uint16 observationCardinalityNextOld, uint16 observationCardinalityNextNew ); /// @notice Emitted when the protocol fee is changed by the pool /// @param feeProtocol0Old The previous value of the token0 protocol fee /// @param feeProtocol1Old The previous value of the token1 protocol fee /// @param feeProtocol0New The updated value of the token0 protocol fee /// @param feeProtocol1New The updated value of the token1 protocol fee event SetFeeProtocol(uint8 feeProtocol0Old, uint8 feeProtocol1Old, uint8 feeProtocol0New, uint8 feeProtocol1New); /// @notice Emitted when the collected protocol fees are withdrawn by the factory owner /// @param sender The address that collects the protocol fees /// @param recipient The address that receives the collected protocol fees /// @param amount0 The amount of token0 protocol fees that is withdrawn /// @param amount0 The amount of token1 protocol fees that is withdrawn event CollectProtocol(address indexed sender, address indexed recipient, uint128 amount0, uint128 amount1); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC20Metadata} from "./extensions/IERC20Metadata.sol"; import {Context} from "../../utils/Context.sol"; import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * 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 ERC-20 * applications. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * Both values are immutable: they can only be set once during construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's 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 returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual 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 `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` 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 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Skips emitting an {Approval} event indicating an allowance update. This is not * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve]. * * 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` 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. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * * ```solidity * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner`'s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance < type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } }
// SPDX-License-Identifier: AGPL-3.0 pragma solidity >=0.8.18; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol"; import {IERC20Permit} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol"; // Interface that implements the 4626 standard and the implementation functions interface ITokenizedStrategy is IERC4626, IERC20Permit { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event StrategyShutdown(); event NewTokenizedStrategy( address indexed strategy, address indexed asset, string apiVersion ); event Reported( uint256 profit, uint256 loss, uint256 protocolFees, uint256 performanceFees ); event UpdatePerformanceFeeRecipient( address indexed newPerformanceFeeRecipient ); event UpdateKeeper(address indexed newKeeper); event UpdatePerformanceFee(uint16 newPerformanceFee); event UpdateManagement(address indexed newManagement); event UpdateEmergencyAdmin(address indexed newEmergencyAdmin); event UpdateProfitMaxUnlockTime(uint256 newProfitMaxUnlockTime); event UpdatePendingManagement(address indexed newPendingManagement); /*////////////////////////////////////////////////////////////// INITIALIZATION //////////////////////////////////////////////////////////////*/ function initialize( address _asset, string memory _name, address _management, address _performanceFeeRecipient, address _keeper ) external; /*////////////////////////////////////////////////////////////// NON-STANDARD 4626 OPTIONS //////////////////////////////////////////////////////////////*/ function withdraw( uint256 assets, address receiver, address owner, uint256 maxLoss ) external returns (uint256); function redeem( uint256 shares, address receiver, address owner, uint256 maxLoss ) external returns (uint256); function maxWithdraw( address owner, uint256 /*maxLoss*/ ) external view returns (uint256); function maxRedeem( address owner, uint256 /*maxLoss*/ ) external view returns (uint256); /*////////////////////////////////////////////////////////////// MODIFIER HELPERS //////////////////////////////////////////////////////////////*/ function requireManagement(address _sender) external view; function requireKeeperOrManagement(address _sender) external view; function requireEmergencyAuthorized(address _sender) external view; /*////////////////////////////////////////////////////////////// KEEPERS FUNCTIONS //////////////////////////////////////////////////////////////*/ function tend() external; function report() external returns (uint256 _profit, uint256 _loss); /*////////////////////////////////////////////////////////////// CONSTANTS //////////////////////////////////////////////////////////////*/ function MAX_FEE() external view returns (uint16); function FACTORY() external view returns (address); /*////////////////////////////////////////////////////////////// GETTERS //////////////////////////////////////////////////////////////*/ function apiVersion() external view returns (string memory); function pricePerShare() external view returns (uint256); function management() external view returns (address); function pendingManagement() external view returns (address); function keeper() external view returns (address); function emergencyAdmin() external view returns (address); function performanceFee() external view returns (uint16); function performanceFeeRecipient() external view returns (address); function fullProfitUnlockDate() external view returns (uint256); function profitUnlockingRate() external view returns (uint256); function profitMaxUnlockTime() external view returns (uint256); function lastReport() external view returns (uint256); function isShutdown() external view returns (bool); function unlockedShares() external view returns (uint256); /*////////////////////////////////////////////////////////////// SETTERS //////////////////////////////////////////////////////////////*/ function setPendingManagement(address) external; function acceptManagement() external; function setKeeper(address _keeper) external; function setEmergencyAdmin(address _emergencyAdmin) external; function setPerformanceFee(uint16 _performanceFee) external; function setPerformanceFeeRecipient( address _performanceFeeRecipient ) external; function setProfitMaxUnlockTime(uint256 _profitMaxUnlockTime) external; function setName(string calldata _newName) external; function shutdownStrategy() external; function emergencyWithdraw(uint256 _amount) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC-20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC-20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC-721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC-1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.3.0) (interfaces/IERC4626.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol"; import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol"; /** * @dev Interface of the ERC-4626 "Tokenized Vault Standard", as defined in * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626]. */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed sender, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /** * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing. * * - MUST be an ERC-20 token contract. * - MUST NOT revert. */ function asset() external view returns (address assetTokenAddress); /** * @dev Returns the total amount of the underlying asset that is “managed” by Vault. * * - SHOULD include any compounding that occurs from yield. * - MUST be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT revert. */ function totalAssets() external view returns (uint256 totalManagedAssets); /** * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToShares(uint256 assets) external view returns (uint256 shares); /** * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal * scenario where all the conditions are met. * * - MUST NOT be inclusive of any fees that are charged against assets in the Vault. * - MUST NOT show any variations depending on the caller. * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange. * - MUST NOT revert. * * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and * from. */ function convertToAssets(uint256 shares) external view returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver, * through a deposit call. * * - MUST return a limited value if receiver is subject to some deposit limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited. * - MUST NOT revert. */ function maxDeposit(address receiver) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given * current on-chain conditions. * * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called * in the same transaction. * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the * deposit would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewDeposit(uint256 assets) external view returns (uint256 shares); /** * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * deposit execution, and are accounted for during deposit. * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function deposit(uint256 assets, address receiver) external returns (uint256 shares); /** * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call. * - MUST return a limited value if receiver is subject to some mint limit. * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted. * - MUST NOT revert. */ function maxMint(address receiver) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given * current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the * same transaction. * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint * would be accepted, regardless if the user has enough tokens approved, etc. * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by minting. */ function previewMint(uint256 shares) external view returns (uint256 assets); /** * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens. * * - MUST emit the Deposit event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint * execution, and are accounted for during mint. * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not * approving enough underlying tokens to the Vault contract, etc). * * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token. */ function mint(uint256 shares, address receiver) external returns (uint256 assets); /** * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the * Vault, through a withdraw call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST NOT revert. */ function maxWithdraw(address owner) external view returns (uint256 maxAssets); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block, * given current on-chain conditions. * * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if * called * in the same transaction. * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though * the withdrawal would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by depositing. */ function previewWithdraw(uint256 assets) external view returns (uint256 shares); /** * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * withdraw execution, and are accounted for during withdraw. * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares); /** * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault, * through a redeem call. * * - MUST return a limited value if owner is subject to some withdrawal limit or timelock. * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock. * - MUST NOT revert. */ function maxRedeem(address owner) external view returns (uint256 maxShares); /** * @dev Allows an on-chain or off-chain user to simulate the effects of their redemption at the current block, * given current on-chain conditions. * * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the * same transaction. * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the * redemption would be accepted, regardless if the user has enough shares, etc. * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees. * - MUST NOT revert. * * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in * share price or some other type of condition, meaning the depositor will lose assets by redeeming. */ function previewRedeem(uint256 shares) external view returns (uint256 assets); /** * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver. * * - MUST emit the Withdraw event. * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the * redeem execution, and are accounted for during redeem. * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner * not having enough shares, etc). * * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed. * Those methods should be performed separately. */ function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/extensions/IERC20Permit.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[ERC-2612]. * * Adds the {permit} method, which can be used to change an account's ERC-20 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. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "remappings": [ "@openzeppelin/=lib/openzeppelin-contracts/", "forge-std/=lib/forge-std/src/", "@tokenized-strategy/=lib/tokenized-strategy/src/", "@periphery/=lib/tokenized-strategy-periphery/src/", "@uniswap-v3-core/=lib/uniswap-v3-core/contracts/", "@yearn-vaults/=lib/tokenized-strategy-periphery/lib/yearn-vaults-v3/contracts/", "createx-forge/=lib/createx-forge/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/tokenized-strategy/lib/erc4626-tests/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/tokenized-strategy/lib/openzeppelin-contracts/contracts/", "tokenized-strategy-periphery/=lib/tokenized-strategy-periphery/", "tokenized-strategy/=lib/tokenized-strategy/", "uniswap-v3-core/=lib/uniswap-v3-core/contracts/", "yearn-vaults-v3/=lib/tokenized-strategy-periphery/lib/yearn-vaults-v3/" ], "optimizer": { "enabled": true, "runs": 1000000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "evmVersion": "shanghai", "viaIR": true }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"address","name":"_steerLP","type":"address"},{"internalType":"uint128","name":"_minAsset","type":"uint128"},{"internalType":"uint256","name":"_maxSwapValue","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"MERKL_DISTRIBUTOR","outputs":[{"internalType":"contract IMerklDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STEER_LP","outputs":[{"internalType":"contract ISushiMultiPositionLiquidityManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"auction","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableDepositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"availableWithdrawLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"},{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes32[][]","name":"proofs","type":"bytes32[][]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deployFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"doHealthCheck","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"estimatedTotalAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"freeFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"harvestAndReport","outputs":[{"internalType":"uint256","name":"_totalAssets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"}],"name":"kickAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastTend","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lossLimitRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lpValueInAsset","outputs":[{"internalType":"uint256","name":"valueLpInAssetTerms","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"manualSwapPairedTokenToAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"manualWithdrawFromLp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSwapValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTendBaseFeeGwei","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAsset","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minTendWait","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pairedTokenDiscountBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profitLimitRatio","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_auction","type":"address"}],"name":"setAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_depositLimit","type":"uint256"}],"name":"setDepositLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_doHealthCheck","type":"bool"}],"name":"setDoHealthCheck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newLossLimitRatio","type":"uint256"}],"name":"setLossLimitRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSwapValue","type":"uint256"}],"name":"setMaxSwapValue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_maxTendBaseFeeGwei","type":"uint8"}],"name":"setMaxTendBaseFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_minAsset","type":"uint128"}],"name":"setMinAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_minTendWait","type":"uint24"}],"name":"setMinTendWait","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_pairedTokenDiscountBps","type":"uint16"}],"name":"setPairedTokenDiscountBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newProfitLimitRatio","type":"uint256"}],"name":"setProfitLimitRatio","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_targetIdleAssetBps","type":"uint16"}],"name":"setTargetIdleAssetBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_targetIdleBufferBps","type":"uint16"}],"name":"setTargetIdleBufferBps","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useAuctions","type":"bool"}],"name":"setUseAuctions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"shutdownWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"targetIdleAssetBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"targetIdleBufferBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_totalIdle","type":"uint256"}],"name":"tendThis","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"tendTrigger","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenizedStrategyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"uniswapV3SwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useAuctions","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
0x610140806040523462000265576200520f803803809162000020826200027d565b833960a08183019112620002655762000038620002cd565b6101608051939192916001600160401b03851162000265578261015f8601121562000265578401516200006b81620002fd565b926200007b6040519485620002a9565b8184528282870101116200026557620000bf946200009f9260208501910162000319565b620000a9620002e5565b620000b36200033c565b916101c05193620003e8565b604051614ad990816200073682396080518181816103d301528181611cd4015281816125280152818161336f015281816136bb0152818161384e015281816140ad0152818161416701528181614802015261494f015260a0518181816104ae015281816106410152818161073c015281816108ac01528181610a4001528181610d3001528181610f97015281816112010152818161138b0152818161155e0152818161168401528181611a8401528181611bc801528181611df401528181611f0d015281816122d6015281816128c00152818161320a0152613e63015260c051818181610bda015281816117fe015281816119cc0152818161266401528181612f0001528181613b390152818161425a01526147dc015260e05181818161211901528181613bc901528181613d31015261402b0152610100518181816117310152818161257201528181612fcc0152818161347e01528181613771015281816141b5015261478e01526101205181818161273e0152818161345b015281816136f001528181613ca0015281816144b2015281816145590152818161482e01526149180152f35b5f80fd5b634e487b7160e01b5f52604160045260245ffd5b601f01601f1916610140908101906001600160401b03821190821017620002a357604052565b62000269565b601f909101601f19168101906001600160401b03821190821017620002a357604052565b61014051906001600160a01b03821682036200026557565b61018051906001600160a01b03821682036200026557565b6001600160401b038111620002a357601f01601f191660200190565b5f5b8381106200032b5750505f910152565b81810151838201526020016200031b565b6101a051906001600160801b03821682036200026557565b156200035c57565b60405162461bcd60e51b8152602060048201526002602482015261021360f41b6044820152606490fd5b908160209103126200026557516001600160a01b0381168103620002655790565b6040513d5f823e3d90fd5b15620003ba57565b60405162461bcd60e51b815260206004820152600660248201526508585cdcd95d60d21b6044820152606490fd5b90620003f791949394620005e6565b5f80546001600160e01b03166206407d60e31b1790556001805462012c6463ffffffff199091161790555f196002556001600160a01b03908116926200043f84151562000354565b60c08490526040516316f0115b60e01b8152602092908381600481895afa9081156200059a575f91620005c4575b5060e052604051630dfe168160e01b81528381600481895afa9081156200059a5760049685915f93620005a0575b5060405163d21220a760e01b815297889182905afa9182156200059a57620005259662000520955f9462000564575b505060805181166001600160a01b031690828116820362000527575050600161012081905261010092909252508054600160601b600160e01b03191660609290921b600160601b600160e01b0316919091179055565b600355565b565b6200053592931614620003b2565b6101005260018054600160601b600160e01b03191660609290921b600160601b600160e01b0316919091179055565b62000589929450803d1062000592575b620005808183620002a9565b81019062000386565b915f80620004ca565b503d62000574565b620003a7565b620005bc919350823d84116200059257620005808183620002a9565b915f6200049b565b620005df9150843d86116200059257620005808183620002a9565b5f6200046d565b906200066660e46200066c9360018060a01b0316806080523060a052604051938491634b839d7360e11b6020840152602483015260a060448301526200063c815180928160c48601526020868601910162000319565b3360648301523360848301523360a4830152601f801991011681010360c4810184520182620002a9565b620006ca565b5073d377919fa87120584b21279a491f82d5265a139c7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55620006b5600160ff195f5416175f55565b620005256227100062ffff00195f5416175f55565b5f809160208151910173d377919fa87120584b21279a491f82d5265a139c5af43d156200072c573d90620006fe82620002fd565b916200070e6040519384620002a9565b82523d5f602084013e5b15620007215790565b6040513d90815f823efd5b6060906200071856fe60806040526004361015610019575b3415612d24575b5f80fd5b5f3560e01c806302f12120146102e357806304bd4629146102de5780630a0f9941146102d9578063139dd2bf146102d45780631d881fc4146102cf5780631f1f5869146102ca578063219461ed146102c55780632828b202146102c05780632c377490146102bb5780632cd68034146102b65780633204fb5b146102b15780633d6cb5751461029857806341db6dbf146102ac57806346aa2f12146102a757806349317f1d146102a25780634a5d09431461029d578063503160d914610298578063525e99da146102935780635bd246481461028e5780635d265d3f146102895780635db2b728146102845780635df31d611461027f5780636718835f1461027a5780636d6987c11461027557806371ee95c01461027057806375c45dce1461026b5780637d969932146102665780637d9f6db514610261578063950b3d731461025c5780639c455fb2146102575780639cfc3c5c146102525780639d7fb70c1461024d578063a1bac55014610248578063a73801f014610243578063ac00ff261461023e578063ae8c2a7014610239578063b8c6f57914610234578063bdc8144b1461022f578063d19a3bb81461022a578063d696860114610225578063e46cd10214610220578063ecf708581461021b578063fa461e3314610216578063fc7f71b6146102115763fde813a80361000e576123cf565b612282565b6120b2565b612077565b612027565b611ec3565b611e77565b611dad565b611b72565b611b30565b611a31565b6119f0565b611982565b6117ad565b611639565b61150b565b611341565b6112ee565b6112ad565b6111ae565b6110fb565b611089565b61104a565b610f44565b610ef4565b610e69565b610cdd565b610ca0565b610ad5565b610c5f565b610b8d565b610b49565b610b0e565b6109f6565b6109af565b610977565b610849565b6107fd565b6107bf565b6106f5565b6105ee565b61045b565b610350565b6102f2565b5f91031261001557565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061032a6124db565b604051908152f35b73ffffffffffffffffffffffffffffffffffffffff81160361001557565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155761038a600435610332565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa801561044a57610417915f9161041b575b506040519081529081906020820190565b0390f35b61043d915060203d602011610443575b6104358183612441565b810190612482565b5f610406565b503d61042b565b612491565b61ffff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356104978161044f565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576105d1575b506103e861ffff821611610573577dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b16911617815580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21646973636f756e7400000000000000000000000000000000000000000000006044820152fd5b6105dc919250612411565b5f905f610516565b8015150361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043561062a816105e4565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576106e2575b5081547fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff1690151560281b65ff00000000001617815580f35b6106ed919250612411565b5f905f6106a9565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576107ae575b5060043560035580f35b6107b89150612411565b5f806107a4565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff60015416604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020604051733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae8152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356fffffffffffffffffffffffffffffffff811681036100155773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610964575b507fffffffff00000000000000000000000000000000ffffffffffffffffffffffff7bffffffffffffffffffffffffffffffff0000000000000000000000006001549260601b1691161760015580f35b61096f919250612411565b5f905f610914565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061032a61261d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060015467ffffffffffffffff60405191831c168152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610ac0575b5080610ab8610abd9215156127fb565b612eb1565b80f35b610acb919250612411565b5f90610abd610aa8565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610b0c61308c565b005b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020600354604051908152f35b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610b83600435610332565b602061032a61287d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610bc361308c565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f80916004604051809481937f181783580000000000000000000000000000000000000000000000000000000083525af1801561044a57610c50575b6020610c476124db565b61032a816131b1565b610c5990612411565b5f610c3d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460081c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760205f5460f01c604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435610d198161044f565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610dfa575b50610dab61271061ffff8316111561292e565b7fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b16911617815580f35b610e05919250612411565b5f905f610d98565b91908251928382525f5b848110610e555750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201610e17565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610e9f613300565b604051907f440368a300000000000000000000000000000000000000000000000000000000602083015260048252610ed682612425565b61041760405192839215158352604060208401526040830190610e0d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602062ffffff60015460081c16604051908152f35b62ffffff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435610f8081610f37565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611037575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff63ffffff006001549260081b1691161760015580f35b611042919250612411565b5f905f610fff565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff5f54166040519015158152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460e01c16604051908152f35b9181601f840112156100155782359167ffffffffffffffff8311610015576020808501948460051b01011161001557565b346100155760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155767ffffffffffffffff6004358181116100155761114b9036906004016110ca565b90602435838111610015576111649036906004016110ca565b906044358581116100155761117d9036906004016110ca565b9290916064359687116100155761119b610b0c9736906004016110ca565b969095612a24565b60ff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356111ea816111a3565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611299575b5060ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600154161760015580f35b6112a4919250612411565b5f9060ff611269565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460181c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602073ffffffffffffffffffffffffffffffffffffffff5f5460301c16604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576114f8575b50801561149a5761ffff80821161143c57610abd91167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff62ffff005f549260081b169116175f55565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21746f6f206869676800000000000000000000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f217a65726f2070726f66697400000000000000000000000000000000000000006044820152fd5b611503919250612411565b5f905f6113f3565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356115478161044f565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611626575b506115d961271061ffff8316111561292e565b7fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff7bffff000000000000000000000000000000000000000000000000000083549260d01b16911617815580f35b611631919250612411565b5f905f6115c6565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff906004357f00000000000000000000000000000000000000000000000000000000000000008316803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611796575b506020602492936116ff8315156127fb565b604051938480927f70a082310000000000000000000000000000000000000000000000000000000082523060048301527f0000000000000000000000000000000000000000000000000000000000000000165afa91821561044a57610abd92611772918591611777575b50821115612bd3565b613455565b611790915060203d602011610443576104358183612441565b5f611769565b602492506117a390612411565b60205f92506116ed565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356117e761308c565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f80916004604051809481937f181783580000000000000000000000000000000000000000000000000000000083525af1801561044a57611969575b505f546118779060d01c61ffff165b61ffff1690565b906118af61189a6001546fffffffffffffffffffffffffffffffff9060601c1690565b6fffffffffffffffffffffffffffffffff1690565b91801561195b576118bf90613e20565b908181111561192357906118d291612870565b1015611916575b600180547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff164260201b6bffffffffffffffff0000000016179055005b61191e61411d565b6118d9565b818110611933575b5050506118d9565b61193c91612870565b9081101561194c575b808061192b565b61195590612eb1565b5f611945565b50106118d95761191e61411d565b8061197661197c92612411565b806102e8565b5f611861565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460d01c16604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435611a6d816105e4565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611b1d575b5060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff005f541691151516175f5580f35b611b28919250612411565b5f905f611aec565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff5f5460281c166040519015158152f35b34610015575f6020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435611baf81610332565b73ffffffffffffffffffffffffffffffffffffffff91827f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611d9a575b508282169283611c8a575b84610abd847fffffffffffff0000000000000000000000000000000000000000ffffffffffff79ffffffffffffffffffffffffffffffffffffffff0000000000005f549260301b169116175f55565b604051937f1f1fcd510000000000000000000000000000000000000000000000000000000085528285600481845afa90811561044a57611cfb84926004978991611d7d575b5084167f0000000000000000000000000000000000000000000000000000000000000000851614612c4d565b604051958680927ff7260d3e0000000000000000000000000000000000000000000000000000000082525afa90811561044a57610abd94611d47938793611d4e575b5050163014612cb2565b5f80611c3b565b611d6e929350803d10611d76575b611d668183612441565b810190612c38565b905f80611d3d565b503d611d5c565b611d949150843d8611611d7657611d668183612441565b5f611ccf565b611da5919450612411565b5f925f611c30565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611e66575b5060043560025580f35b611e709150612411565b5f80611e5c565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060405173d377919fa87120584b21279a491f82d5265a139c8152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57612014575b50612710811015611fb6577fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffff64ffff00000083549260181b16911617815580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f216c6f7373206c696d69740000000000000000000000000000000000000000006044820152fd5b61201f919250612411565b5f905f611f75565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760206fffffffffffffffffffffffffffffffff60015460601c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020600254604051908152f35b346100155760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155767ffffffffffffffff6044358181116100155736602382011215610015578060040135828111610015578101366024820111610015577f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff9081831633036122245783604091031261001557604051906040820194828610908611176121f7576121d96121f2926121bf6121b66121d994610b0c99604052602489013561219c81610332565b8085526044602086019a01358a521660243560043561369b565b965187146127fb565b5173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b61379b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f2163616c6c6572000000000000000000000000000000000000000000000000006044820152fd5b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356122be81610332565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001692833b15610015575f602494604051958680927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa93841561044a5761234f946123be575b505460301c16613817565b901561236057604051908152602090f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f216b69636b0000000000000000000000000000000000000000000000000000006044820152fd5b6123c89150612411565b5f80612344565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155761240661308c565b610b0c600435612eb1565b67ffffffffffffffff81116121f757604052565b6040810190811067ffffffffffffffff8211176121f757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176121f757604052565b90816020910312610015575190565b6040513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b919082018092116124d657565b61249c565b6040517f70a082310000000000000000000000000000000000000000000000000000000080825230600483015260209173ffffffffffffffffffffffffffffffffffffffff9083816024817f000000000000000000000000000000000000000000000000000000000000000086165afa92831561044a5784915f946125e8575b5060405190815230600482015291829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa92831561044a576125c8936125c3926125b5925f926125cb575b5050612d54565b6125bd61261d565b926124c9565b6124c9565b90565b6125e19250803d10610443576104358183612441565b5f806125ae565b612600919450823d8411610443576104358183612441565b925f61255b565b9190826040910312610015576020825192015190565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290602073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168184602481845afa93841561044a575f946127dc575b5083156127b55782517f18160ddd0000000000000000000000000000000000000000000000000000000081528281600481855afa92831561044a575f936127bd575b505081156127b557826004918151928380927fc4a7761e0000000000000000000000000000000000000000000000000000000082525afa90811561044a5761273c9383915f915f94612781575b5050906127369186612e08565b93612e08565b7f000000000000000000000000000000000000000000000000000000000000000015612775579061276f6125c892612d54565b906124c9565b61276f6125c892612d54565b6127369394506127a69250803d106127ae575b61279e8183612441565b810190612607565b92915f612729565b503d612794565b505050505f90565b6127d4929350803d10610443576104358183612441565b905f806126dc565b6127f4919450823d8411610443576104358183612441565b925f61269a565b1561280257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21616d6f756e74000000000000000000000000000000000000000000000000006044820152fd5b906127109182039182116124d657565b919082039182116124d657565b6040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561044a575f9161290f575b5060025490808211156129095781039081116124d65790565b50505f90565b612928915060203d602011610443576104358183612441565b5f6128f0565b1561293557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600460248201527f21627073000000000000000000000000000000000000000000000000000000006044820152fd5b9190808252602080920192915f5b8281106129af575050505090565b90919293828060019273ffffffffffffffffffffffffffffffffffffffff88356129d881610332565b168152019501939291016129a1565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116100155760209260051b809284830137010190565b9594969390919296733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae96873b15610015579790612ac7612ad79392612a9560409997989699519b8c9a7f71ee95c0000000000000000000000000000000000000000000000000000000008c52608060048d015260848c0191612993565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc98898b84030160248c0152612993565b91868884030160448901526129e7565b92848403016064850152808352602080840193600560208460051b83010195855f935b868510612b2f57505050505050505091815f81819503925af1801561044a57612b205750565b80611976612b2d92612411565b565b919395979092949698507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301845288357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181121561001557830187810191903567ffffffffffffffff81116100155780871b3603831361001557612bbf899283926001956129e7565b9a0194019501929593918a98979591612afa565b15612bda57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2162616c616e63650000000000000000000000000000000000000000000000006044820152fd5b9081602091031261001557516125c881610332565b15612c5457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f2177616e740000000000000000000000000000000000000000000000000000006044820152fd5b15612cb957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21726563656976657200000000000000000000000000000000000000000000006044820152fd5b60405190612b2d82612425565b365f80375f80368173d377919fa87120584b21279a491f82d5265a139c5af43d5f803e15612d50573d5ff35b3d5ffd5b8015612d6c576125c890612d66613b86565b90613c97565b505f90565b1561001557565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8282099082810292838084109303928084039314612ddb576c010000000000000000000000009183831115610015570990828211900360a01b910360601c1790565b50505060601c90565b80156100155778010000000000000000000000000000000000000000000000000490565b90917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8383099280830292838086109503948086039514612e9e57908291612e51868411612d71565b0981805f0316809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b50509150612ead821515612d71565b0490565b801561308957604080517f70a082310000000000000000000000000000000000000000000000000000000080825230600483015260209373ffffffffffffffffffffffffffffffffffffffff937f000000000000000000000000000000000000000000000000000000000000000085169390918682602481885afa91821561044a575f9261306a575b50612f4361261d565b90811561306057818110613050575050925b83156130485781517fd331bef700000000000000000000000000000000000000000000000000000000815260048101949094525f6024850181905260448501819052306064860152829185916084918391905af192831561044a57859361302c575b505190815230600482015291829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa91821561044a575f9261300f575b5050806130065750565b612b2d90613455565b6130259250803d10610443576104358183612441565b5f80612ffc565b61304290823d84116127ae5761279e8183612441565b50612fb7565b505050505050565b9161305a92612e08565b92612f55565b5050505050505050565b613082919250873d8911610443576104358183612441565b905f612f3a565b50565b30330361309557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f2173656c660000000000000000000000000000000000000000000000000000006044820152fd5b90633b9aca00918281029281840414901517156124d657565b818102929181159184041417156124d657565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b1561315357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6865616c7468436865636b0000000000000000000000000000000000000000006044820152fd5b6131c36131bf5f5460ff1690565b1590565b6132d1576040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561044a575f916132b2575b508082111561327f5761327861327061325683612b2d95612870565b9261326a6118705f5461ffff9060081c1690565b9061310c565b612710900490565b101561314c565b81811161328b575b5050565b61327861327061329e612b2d9484612870565b9261326a6118705f5461ffff9060181c1690565b6132cb915060203d602011610443576104358183612441565b5f61323a565b50612b2d60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff005f5416175f55565b60015461332262ffffff8260081c1667ffffffffffffffff8360201c166124c9565b4210612d6c5761333460ff82166130f3565b4811612d6c576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152906020826024817f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff165afa91821561044a575f92613434575b505f549061ffff808360d01c16806133ef57505060601c6fffffffffffffffffffffffffffffffff169050806133ea5750151590565b111590565b61341f925061340f9161340461327092613e20565b9460e01c168461310c565b61341981846124c9565b92612870565b90821191821561342e57505090565b10919050565b61344e91925060203d602011610443576104358183612441565b905f6133b4565b612b2d907f000000000000000000000000000000000000000000000000000000000000000015907f0000000000000000000000000000000000000000000000000000000000000000613f03565b156134a957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21746f6b656e00000000000000000000000000000000000000000000000000006044820152fd5b1561350e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74302b00000000000000000000000000000000000000000000006044820152fd5b1561357357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74312d00000000000000000000000000000000000000000000006044820152fd5b156135d857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74312b00000000000000000000000000000000000000000000006044820152fd5b1561363d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74302d00000000000000000000000000000000000000000000006044820152fd5b916136ee73ffffffffffffffffffffffffffffffffffffffff80921691807f0000000000000000000000000000000000000000000000000000000000000000168314928391841561376f575b50506134a2565b7f000000000000000000000000000000000000000000000000000000000000000015613746571561372f575f6125c891613729828513613507565b1261356c565b905f6125c8916137408285136135d1565b12613636565b9091901561375e575f6125c8916137408285136135d1565b905f6125c891613729828513613507565b7f0000000000000000000000000000000000000000000000000000000000000000161490505f806136e7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff929092166024830152604480830193909352918152612b2d916137fd606483612441565b61441d565b9081602091031261001557516125c8816105e4565b5f5491929161382a9060281c60ff161590565b8015613b68575b613b605773ffffffffffffffffffffffffffffffffffffffff92837f00000000000000000000000000000000000000000000000000000000000000001693808216908582148015613b35575b613a78576040517f9f8a13d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871660048201526020969185169491908781602481895afa91821561044a5788915f93613b06575b508215613a84575b5050613a78576040517f70a08231000000000000000000000000000000000000000000000000000000008082523060048301529091908783602481875afa92831561044a575f93613a59575b5060405190815273ffffffffffffffffffffffffffffffffffffffff821660048201528781602481875afa801561044a5761397b915f91613a3c575b50836124c9565b15613a2f57926139e5928288955f9794613a1e575b5050506040519485809481937f96c551750000000000000000000000000000000000000000000000000000000083526004830191909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b03925af192831561044a575f936139ff575b505060019190565b613a16929350803d10610443576104358183612441565b905f806139f7565b613a279261379b565b5f8080613990565b505050505090505f905f90565b613a539150893d8b11610443576104358183612441565b5f613974565b613a71919350883d8a11610443576104358183612441565b915f613938565b5050505090505f905f90565b6040517f10098ad500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152915081602481885afa90811561044a575f91613ae9575b501515865f6138ec565b613b009150873d8911610443576104358183612441565b5f613adf565b613b27919350823d8411613b2e575b613b1f8183612441565b810190613802565b915f6138e4565b503d613b15565b50807f000000000000000000000000000000000000000000000000000000000000000016821461387d565b505f91508190565b5073ffffffffffffffffffffffffffffffffffffffff811615613831565b6040517f3850c7bd00000000000000000000000000000000000000000000000000000000815260e08160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa90811561044a575f91613bfc575090565b905060e0813d60e011613c7a575b81613c1760e09383612441565b8101031261001557805190613c2b82610332565b60208101518060020b036100155760c081613c4c60406125c894015161044f565b613c59606082015161044f565b613c66608082015161044f565b613c7360a08201516111a3565b01516105e4565b3d9150613c0a565b9081602091031261001557516125c881610f37565b908115612909577f000000000000000000000000000000000000000000000000000000000000000015613dc2579073ffffffffffffffffffffffffffffffffffffffff613cee921690613ce982612de4565b612e08565b6040517fddca3f4300000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa91821561044a5761326a613d8e6125c894613270945f91613d93575b5062ffffff606481613d856118705f5460f01c90565b931604166124c9565b612860565b613db5915060203d602011613dbb575b613dad8183612441565b810190613c82565b5f613d6f565b503d613da3565b73ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f14613e0e5790613e0482613e0993612d78565b612d78565b613cee565b613e0481613e0993612d78565b61311f565b6040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa91821561044a5761271092612ead925f91613ea1575b5061310c565b613eba915060203d602011610443576104358183612441565b5f613e9b565b919360a0936125c8969573ffffffffffffffffffffffffffffffffffffffff80941685521515602085015260408401521660608201528160808201520190610e0d565b906003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8103614095575b50801561409057613fa092613fcc604093613f67613f4b612d17565b73ffffffffffffffffffffffffffffffffffffffff9092168252565b60208181018581528651925173ffffffffffffffffffffffffffffffffffffffff16918301919091525160408201529485906060820190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101865285612441565b8015614072576140116401000276a4945b845195869485947f128acb080000000000000000000000000000000000000000000000000000000086523060048701613ec0565b03815f73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165af1801561044a5761405a5750565b6132879060403d6040116127ae5761279e8183612441565b61401173fffd8963efd1fc6a506488495d951d5263988d2594613fdd565b505050565b73ffffffffffffffffffffffffffffffffffffffff807f00000000000000000000000000000000000000000000000000000000000000001690841614805f1461410e5781835b116140e7575b50613f2f565b909150156140f7575b5f806140e1565b61410990614103613b86565b906144a9565b6140f0565b8161411884612d54565b6140db565b604080517f70a0823100000000000000000000000000000000000000000000000000000000808252306004830152909160209173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081169290918486602481875afa95861561044a575f966143fe575b5081518181523060048201529185836024817f000000000000000000000000000000000000000000000000000000000000000088165afa92831561044a575f936143df575b5086925f976141fe6118705f5461ffff9060d01c1690565b806143b6575b505061420e613b86565b906142198282613c97565b9461422486826124c9565b9586156143a957846004988151998a80927fc4a7761e0000000000000000000000000000000000000000000000000000000082527f0000000000000000000000000000000000000000000000000000000000000000165afa97881561044a575f905f99614387575b50801597888061437f575b614370578b9860035415614319575b506142bf969798996142b992879261454a565b90614634565b5190815230600482015291829060249082905afa91821561044a575f926142fc575b505081811061328757612b2d916142f791612870565b61474b565b6143129250803d10610443576104358183612441565b5f806142e1565b80919a979899509015614368575b841590811561435f575b159081614357575b50614349578a979695985f6142a6565b505050505050505050505050565b90505f614339565b84159150614331565b508515614327565b50505050505050505050505050565b508915614297565b90506143a1919850853d87116127ae5761279e8183612441565b97905f61428c565b5050505050505050505050565b9098506143c4919450613e20565b968781111561306057876143d791612870565b925f80614204565b6143f7919350863d8811610443576104358183612441565b915f6141e6565b614416919650853d8711610443576104358183612441565b945f6141a1565b905f602091828151910182855af115612491575f513d6144a0575073ffffffffffffffffffffffffffffffffffffffff81163b155b6144595750565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f5274afe7000000000000000000000000000000000000000000000000000000008352166004820152fd5b60011415614452565b908115612909577f0000000000000000000000000000000000000000000000000000000000000000156145255773ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f146145185790613e04826125c893612d78565b613e04816125c893612d78565b9073ffffffffffffffffffffffffffffffffffffffff6125c8921690613ce982612de4565b9281158061462c575b6127b5577f0000000000000000000000000000000000000000000000000000000000000000156145c5576145ad919273ffffffffffffffffffffffffffffffffffffffff6145a6921690613ce982612de4565b80926124c9565b905b81156145be576125c892612e08565b5050505f90565b73ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f146146195790613e048261460793612d78565b905b8181018091116124d657906145af565b613e048161462693612d78565b90614609565b508215614553565b909391929361465b61189a6001546fffffffffffffffffffffffffffffffff9060601c1690565b92828211156146bb575061467192939450612870565b918083116146b3575b508115159081614696575b5061468d5750565b612b2d90614912565b8015915081156146a8575b505f614685565b90508110155f6146a1565b91505f61467a565b9293508082116146cd575b5050505050565b6146d691612870565b918015908115614725575b506146ee575b80806146c6565b6146f7916144a9565b9080821161471d575b508061470e575b80806146e7565b61471790613455565b5f614707565b90505f614700565b90508210155f6146e1565b90816060910312610015578051916040602083015192015190565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811692602083602481875afa91821561044a576148ab946060945f946148e9575b50838261482c9261482786957f000000000000000000000000000000000000000000000000000000000000000016968780947f000000000000000000000000000000000000000000000000000000000000000016614974565b614974565b7f0000000000000000000000000000000000000000000000000000000000000000156148e457915b6040517f365d0ed7000000000000000000000000000000000000000000000000000000008152600481019390935260248301525f6044830181905260648301819052306084840152919384928391829060a4820190565b03925af1801561044a576148bc5750565b6140909060603d6060116148dd575b6148d58183612441565b810190614730565b503d6148cb565b614854565b839294509061490961482c9260203d602011610443576104358183612441565b949250906147ce565b612b2d907f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016613f03565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602080830182815273ffffffffffffffffffffffffffffffffffffffff86166024850152604480850197909752958352909491937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0929091905f906149fe606488612441565b86519082875af15f513d82614a71575b505015614a1c575050505050565b604051602081019590955273ffffffffffffffffffffffffffffffffffffffff1660248501525f604485015260649081018452614a67936137fd91614a619082612441565b8261441d565b5f808080806146c6565b909150614a9b575073ffffffffffffffffffffffffffffffffffffffff83163b15155b5f80614a0e565b600114614a9456fea26469706673582212203e6ef66f56bcae705f9be8b4c39b0a54875e9c739ed8e71e1b10d6f4a363fda564736f6c63430008170033000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3600000000000000000000000000000000000000000000000000000000000000a00000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce00000000000000000000000000000000000000000000000000000000000003e8000000000000000000000000000000000000000000000000000000003b9aca00000000000000000000000000000000000000000000000000000000000000002553696e676c6520536964656420537465657220415553442d76625553444320766255534443000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040526004361015610019575b3415612d24575b5f80fd5b5f3560e01c806302f12120146102e357806304bd4629146102de5780630a0f9941146102d9578063139dd2bf146102d45780631d881fc4146102cf5780631f1f5869146102ca578063219461ed146102c55780632828b202146102c05780632c377490146102bb5780632cd68034146102b65780633204fb5b146102b15780633d6cb5751461029857806341db6dbf146102ac57806346aa2f12146102a757806349317f1d146102a25780634a5d09431461029d578063503160d914610298578063525e99da146102935780635bd246481461028e5780635d265d3f146102895780635db2b728146102845780635df31d611461027f5780636718835f1461027a5780636d6987c11461027557806371ee95c01461027057806375c45dce1461026b5780637d969932146102665780637d9f6db514610261578063950b3d731461025c5780639c455fb2146102575780639cfc3c5c146102525780639d7fb70c1461024d578063a1bac55014610248578063a73801f014610243578063ac00ff261461023e578063ae8c2a7014610239578063b8c6f57914610234578063bdc8144b1461022f578063d19a3bb81461022a578063d696860114610225578063e46cd10214610220578063ecf708581461021b578063fa461e3314610216578063fc7f71b6146102115763fde813a80361000e576123cf565b612282565b6120b2565b612077565b612027565b611ec3565b611e77565b611dad565b611b72565b611b30565b611a31565b6119f0565b611982565b6117ad565b611639565b61150b565b611341565b6112ee565b6112ad565b6111ae565b6110fb565b611089565b61104a565b610f44565b610ef4565b610e69565b610cdd565b610ca0565b610ad5565b610c5f565b610b8d565b610b49565b610b0e565b6109f6565b6109af565b610977565b610849565b6107fd565b6107bf565b6106f5565b6105ee565b61045b565b610350565b6102f2565b5f91031261001557565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061032a6124db565b604051908152f35b73ffffffffffffffffffffffffffffffffffffffff81160361001557565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155761038a600435610332565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260208160248173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd36165afa801561044a57610417915f9161041b575b506040519081529081906020820190565b0390f35b61043d915060203d602011610443575b6104358183612441565b810190612482565b5f610406565b503d61042b565b612491565b61ffff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356104978161044f565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576105d1575b506103e861ffff821611610573577dffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff7fffff00000000000000000000000000000000000000000000000000000000000083549260f01b16911617815580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21646973636f756e7400000000000000000000000000000000000000000000006044820152fd5b6105dc919250612411565b5f905f610516565b8015150361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043561062a816105e4565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576106e2575b5081547fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff1690151560281b65ff00000000001617815580f35b6106ed919250612411565b5f905f6106a9565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576107ae575b5060043560035580f35b6107b89150612411565b5f806107a4565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff60015416604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020604051733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae8152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356fffffffffffffffffffffffffffffffff811681036100155773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610964575b507fffffffff00000000000000000000000000000000ffffffffffffffffffffffff7bffffffffffffffffffffffffffffffff0000000000000000000000006001549260601b1691161760015580f35b61096f919250612411565b5f905f610914565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061032a61261d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060015467ffffffffffffffff60405191831c168152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610ac0575b5080610ab8610abd9215156127fb565b612eb1565b80f35b610acb919250612411565b5f90610abd610aa8565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610b0c61308c565b005b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020600354604051908152f35b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610b83600435610332565b602061032a61287d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610bc361308c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce16803b15610015575f80916004604051809481937f181783580000000000000000000000000000000000000000000000000000000083525af1801561044a57610c50575b6020610c476124db565b61032a816131b1565b610c5990612411565b5f610c3d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460081c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760205f5460f01c604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435610d198161044f565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57610dfa575b50610dab61271061ffff8316111561292e565b7fffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff7dffff0000000000000000000000000000000000000000000000000000000083549260e01b16911617815580f35b610e05919250612411565b5f905f610d98565b91908251928382525f5b848110610e555750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b602081830181015184830182015201610e17565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557610e9f613300565b604051907f440368a300000000000000000000000000000000000000000000000000000000602083015260048252610ed682612425565b61041760405192839215158352604060208401526040830190610e0d565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602062ffffff60015460081c16604051908152f35b62ffffff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435610f8081610f37565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611037575b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000ff63ffffff006001549260081b1691161760015580f35b611042919250612411565b5f905f610fff565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff5f54166040519015158152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460e01c16604051908152f35b9181601f840112156100155782359167ffffffffffffffff8311610015576020808501948460051b01011161001557565b346100155760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155767ffffffffffffffff6004358181116100155761114b9036906004016110ca565b90602435838111610015576111649036906004016110ca565b906044358581116100155761117d9036906004016110ca565b9290916064359687116100155761119b610b0c9736906004016110ca565b969095612a24565b60ff81160361001557565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356111ea816111a3565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611299575b5060ff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00600154161760015580f35b6112a4919250612411565b5f9060ff611269565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460181c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602073ffffffffffffffffffffffffffffffffffffffff5f5460301c16604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a576114f8575b50801561149a5761ffff80821161143c57610abd91167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff62ffff005f549260081b169116175f55565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21746f6f206869676800000000000000000000000000000000000000000000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f217a65726f2070726f66697400000000000000000000000000000000000000006044820152fd5b611503919250612411565b5f905f6113f3565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356115478161044f565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611626575b506115d961271061ffff8316111561292e565b7fffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffffffff7bffff000000000000000000000000000000000000000000000000000083549260d01b16911617815580f35b611631919250612411565b5f905f6115c6565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff906004357f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de8316803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611796575b506020602492936116ff8315156127fb565b604051938480927f70a082310000000000000000000000000000000000000000000000000000000082523060048301527f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a165afa91821561044a57610abd92611772918591611777575b50821115612bd3565b613455565b611790915060203d602011610443576104358183612441565b5f611769565b602492506117a390612411565b60205f92506116ed565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356117e761308c565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce16803b15610015575f80916004604051809481937f181783580000000000000000000000000000000000000000000000000000000083525af1801561044a57611969575b505f546118779060d01c61ffff165b61ffff1690565b906118af61189a6001546fffffffffffffffffffffffffffffffff9060601c1690565b6fffffffffffffffffffffffffffffffff1690565b91801561195b576118bf90613e20565b908181111561192357906118d291612870565b1015611916575b600180547fffffffffffffffffffffffffffffffffffffffff0000000000000000ffffffff164260201b6bffffffffffffffff0000000016179055005b61191e61411d565b6118d9565b818110611933575b5050506118d9565b61193c91612870565b9081101561194c575b808061192b565b61195590612eb1565b5f611945565b50106118d95761191e61411d565b8061197661197c92612411565b806102e8565b5f611861565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce168152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602061ffff5f5460d01c16604051908152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435611a6d816105e4565b73ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611b1d575b5060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff005f541691151516175f5580f35b611b28919250612411565b5f905f611aec565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060ff5f5460281c166040519015158152f35b34610015575f6020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557600435611baf81610332565b73ffffffffffffffffffffffffffffffffffffffff91827f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611d9a575b508282169283611c8a575b84610abd847fffffffffffff0000000000000000000000000000000000000000ffffffffffff79ffffffffffffffffffffffffffffffffffffffff0000000000005f549260301b169116175f55565b604051937f1f1fcd510000000000000000000000000000000000000000000000000000000085528285600481845afa90811561044a57611cfb84926004978991611d7d575b5084167f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd36851614612c4d565b604051958680927ff7260d3e0000000000000000000000000000000000000000000000000000000082525afa90811561044a57610abd94611d47938793611d4e575b5050163014612cb2565b5f80611c3b565b611d6e929350803d10611d76575b611d668183612441565b810190612c38565b905f80611d3d565b503d611d5c565b611d949150843d8611611d7657611d668183612441565b5f611ccf565b611da5919450612411565b5f925f611c30565b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155773ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57611e66575b5060043560025580f35b611e709150612411565b5f80611e5c565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261001557602060405173d377919fa87120584b21279a491f82d5265a139c8152f35b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760043573ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de16803b15610015575f602491604051928380927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa801561044a57612014575b50612710811015611fb6577fffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ffffff64ffff00000083549260181b16911617815580f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f216c6f7373206c696d69740000000000000000000000000000000000000000006044820152fd5b61201f919250612411565b5f905f611f75565b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155760206fffffffffffffffffffffffffffffffff60015460601c16604051908152f35b34610015575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576020600254604051908152f35b346100155760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155767ffffffffffffffff6044358181116100155736602382011215610015578060040135828111610015578101366024820111610015577f00000000000000000000000002cdd2dd00e1e0900ec03267cf16e6170ff7b05b9073ffffffffffffffffffffffffffffffffffffffff9081831633036122245783604091031261001557604051906040820194828610908611176121f7576121d96121f2926121bf6121b66121d994610b0c99604052602489013561219c81610332565b8085526044602086019a01358a521660243560043561369b565b965187146127fb565b5173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b61379b565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f2163616c6c6572000000000000000000000000000000000000000000000000006044820152fd5b34610015575f60207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610015576004356122be81610332565b73ffffffffffffffffffffffffffffffffffffffff807f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de1692833b15610015575f602494604051958680927f48e4a6490000000000000000000000000000000000000000000000000000000082523360048301525afa93841561044a5761234f946123be575b505460301c16613817565b901561236057604051908152602090f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f216b69636b0000000000000000000000000000000000000000000000000000006044820152fd5b6123c89150612411565b5f80612344565b346100155760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100155761240661308c565b610b0c600435612eb1565b67ffffffffffffffff81116121f757604052565b6040810190811067ffffffffffffffff8211176121f757604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176121f757604052565b90816020910312610015575190565b6040513d5f823e3d90fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b919082018092116124d657565b61249c565b6040517f70a082310000000000000000000000000000000000000000000000000000000080825230600483015260209173ffffffffffffffffffffffffffffffffffffffff9083816024817f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3686165afa92831561044a5784915f946125e8575b5060405190815230600482015291829060249082907f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a165afa92831561044a576125c8936125c3926125b5925f926125cb575b5050612d54565b6125bd61261d565b926124c9565b6124c9565b90565b6125e19250803d10610443576104358183612441565b5f806125ae565b612600919450823d8411610443576104358183612441565b925f61255b565b9190826040910312610015576020825192015190565b604080517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290602073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce168184602481845afa93841561044a575f946127dc575b5083156127b55782517f18160ddd0000000000000000000000000000000000000000000000000000000081528281600481855afa92831561044a575f936127bd575b505081156127b557826004918151928380927fc4a7761e0000000000000000000000000000000000000000000000000000000082525afa90811561044a5761273c9383915f915f94612781575b5050906127369186612e08565b93612e08565b7f000000000000000000000000000000000000000000000000000000000000000015612775579061276f6125c892612d54565b906124c9565b61276f6125c892612d54565b6127369394506127a69250803d106127ae575b61279e8183612441565b810190612607565b92915f612729565b503d612794565b505050505f90565b6127d4929350803d10610443576104358183612441565b905f806126dc565b6127f4919450823d8411610443576104358183612441565b925f61269a565b1561280257565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600760248201527f21616d6f756e74000000000000000000000000000000000000000000000000006044820152fd5b906127109182039182116124d657565b919082039182116124d657565b6040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de165afa90811561044a575f9161290f575b5060025490808211156129095781039081116124d65790565b50505f90565b612928915060203d602011610443576104358183612441565b5f6128f0565b1561293557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600460248201527f21627073000000000000000000000000000000000000000000000000000000006044820152fd5b9190808252602080920192915f5b8281106129af575050505090565b90919293828060019273ffffffffffffffffffffffffffffffffffffffff88356129d881610332565b168152019501939291016129a1565b90918281527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff83116100155760209260051b809284830137010190565b9594969390919296733ef3d8ba38ebe18db133cec108f4d14ce00dd9ae96873b15610015579790612ac7612ad79392612a9560409997989699519b8c9a7f71ee95c0000000000000000000000000000000000000000000000000000000008c52608060048d015260848c0191612993565b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc98898b84030160248c0152612993565b91868884030160448901526129e7565b92848403016064850152808352602080840193600560208460051b83010195855f935b868510612b2f57505050505050505091815f81819503925af1801561044a57612b205750565b80611976612b2d92612411565b565b919395979092949698507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe082820301845288357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181121561001557830187810191903567ffffffffffffffff81116100155780871b3603831361001557612bbf899283926001956129e7565b9a0194019501929593918a98979591612afa565b15612bda57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600860248201527f2162616c616e63650000000000000000000000000000000000000000000000006044820152fd5b9081602091031261001557516125c881610332565b15612c5457565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f2177616e740000000000000000000000000000000000000000000000000000006044820152fd5b15612cb957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21726563656976657200000000000000000000000000000000000000000000006044820152fd5b60405190612b2d82612425565b365f80375f80368173d377919fa87120584b21279a491f82d5265a139c5af43d5f803e15612d50573d5ff35b3d5ffd5b8015612d6c576125c890612d66613b86565b90613c97565b505f90565b1561001557565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8282099082810292838084109303928084039314612ddb576c010000000000000000000000009183831115610015570990828211900360a01b910360601c1790565b50505060601c90565b80156100155778010000000000000000000000000000000000000000000000000490565b90917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8383099280830292838086109503948086039514612e9e57908291612e51868411612d71565b0981805f0316809204600280826003021880830282030280830282030280830282030280830282030280830282030280920290030293600183805f03040190848311900302920304170290565b50509150612ead821515612d71565b0490565b801561308957604080517f70a082310000000000000000000000000000000000000000000000000000000080825230600483015260209373ffffffffffffffffffffffffffffffffffffffff937f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce85169390918682602481885afa91821561044a575f9261306a575b50612f4361261d565b90811561306057818110613050575050925b83156130485781517fd331bef700000000000000000000000000000000000000000000000000000000815260048101949094525f6024850181905260448501819052306064860152829185916084918391905af192831561044a57859361302c575b505190815230600482015291829060249082907f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a165afa91821561044a575f9261300f575b5050806130065750565b612b2d90613455565b6130259250803d10610443576104358183612441565b5f80612ffc565b61304290823d84116127ae5761279e8183612441565b50612fb7565b505050505050565b9161305a92612e08565b92612f55565b5050505050505050565b613082919250873d8911610443576104358183612441565b905f612f3a565b50565b30330361309557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600560248201527f2173656c660000000000000000000000000000000000000000000000000000006044820152fd5b90633b9aca00918281029281840414901517156124d657565b818102929181159184041417156124d657565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b1561315357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6865616c7468436865636b0000000000000000000000000000000000000000006044820152fd5b6131c36131bf5f5460ff1690565b1590565b6132d1576040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de165afa90811561044a575f916132b2575b508082111561327f5761327861327061325683612b2d95612870565b9261326a6118705f5461ffff9060081c1690565b9061310c565b612710900490565b101561314c565b81811161328b575b5050565b61327861327061329e612b2d9484612870565b9261326a6118705f5461ffff9060181c1690565b6132cb915060203d602011610443576104358183612441565b5f61323a565b50612b2d60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff005f5416175f55565b60015461332262ffffff8260081c1667ffffffffffffffff8360201c166124c9565b4210612d6c5761333460ff82166130f3565b4811612d6c576040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152906020826024817f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3673ffffffffffffffffffffffffffffffffffffffff165afa91821561044a575f92613434575b505f549061ffff808360d01c16806133ef57505060601c6fffffffffffffffffffffffffffffffff169050806133ea5750151590565b111590565b61341f925061340f9161340461327092613e20565b9460e01c168461310c565b61341981846124c9565b92612870565b90821191821561342e57505090565b10919050565b61344e91925060203d602011610443576104358183612441565b905f6133b4565b612b2d907f000000000000000000000000000000000000000000000000000000000000000015907f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a613f03565b156134a957565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600660248201527f21746f6b656e00000000000000000000000000000000000000000000000000006044820152fd5b1561350e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74302b00000000000000000000000000000000000000000000006044820152fd5b1561357357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74312d00000000000000000000000000000000000000000000006044820152fd5b156135d857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74312b00000000000000000000000000000000000000000000006044820152fd5b1561363d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600960248201527f21616d6f756e74302d00000000000000000000000000000000000000000000006044820152fd5b916136ee73ffffffffffffffffffffffffffffffffffffffff80921691807f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd36168314928391841561376f575b50506134a2565b7f000000000000000000000000000000000000000000000000000000000000000015613746571561372f575f6125c891613729828513613507565b1261356c565b905f6125c8916137408285136135d1565b12613636565b9091901561375e575f6125c8916137408285136135d1565b905f6125c891613729828513613507565b7f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a161490505f806136e7565b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000602082015273ffffffffffffffffffffffffffffffffffffffff929092166024830152604480830193909352918152612b2d916137fd606483612441565b61441d565b9081602091031261001557516125c8816105e4565b5f5491929161382a9060281c60ff161590565b8015613b68575b613b605773ffffffffffffffffffffffffffffffffffffffff92837f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd361693808216908582148015613b35575b613a78576040517f9f8a13d700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871660048201526020969185169491908781602481895afa91821561044a5788915f93613b06575b508215613a84575b5050613a78576040517f70a08231000000000000000000000000000000000000000000000000000000008082523060048301529091908783602481875afa92831561044a575f93613a59575b5060405190815273ffffffffffffffffffffffffffffffffffffffff821660048201528781602481875afa801561044a5761397b915f91613a3c575b50836124c9565b15613a2f57926139e5928288955f9794613a1e575b5050506040519485809481937f96c551750000000000000000000000000000000000000000000000000000000083526004830191909173ffffffffffffffffffffffffffffffffffffffff6020820193169052565b03925af192831561044a575f936139ff575b505060019190565b613a16929350803d10610443576104358183612441565b905f806139f7565b613a279261379b565b5f8080613990565b505050505090505f905f90565b613a539150893d8b11610443576104358183612441565b5f613974565b613a71919350883d8a11610443576104358183612441565b915f613938565b5050505090505f905f90565b6040517f10098ad500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff919091166004820152915081602481885afa90811561044a575f91613ae9575b501515865f6138ec565b613b009150873d8911610443576104358183612441565b5f613adf565b613b27919350823d8411613b2e575b613b1f8183612441565b810190613802565b915f6138e4565b503d613b15565b50807f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce16821461387d565b505f91508190565b5073ffffffffffffffffffffffffffffffffffffffff811615613831565b6040517f3850c7bd00000000000000000000000000000000000000000000000000000000815260e08160048173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000002cdd2dd00e1e0900ec03267cf16e6170ff7b05b165afa90811561044a575f91613bfc575090565b905060e0813d60e011613c7a575b81613c1760e09383612441565b8101031261001557805190613c2b82610332565b60208101518060020b036100155760c081613c4c60406125c894015161044f565b613c59606082015161044f565b613c66608082015161044f565b613c7360a08201516111a3565b01516105e4565b3d9150613c0a565b9081602091031261001557516125c881610f37565b908115612909577f000000000000000000000000000000000000000000000000000000000000000015613dc2579073ffffffffffffffffffffffffffffffffffffffff613cee921690613ce982612de4565b612e08565b6040517fddca3f4300000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000002cdd2dd00e1e0900ec03267cf16e6170ff7b05b165afa91821561044a5761326a613d8e6125c894613270945f91613d93575b5062ffffff606481613d856118705f5460f01c90565b931604166124c9565b612860565b613db5915060203d602011613dbb575b613dad8183612441565b810190613c82565b5f613d6f565b503d613da3565b73ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f14613e0e5790613e0482613e0993612d78565b612d78565b613cee565b613e0481613e0993612d78565b61311f565b6040517f01e1d11400000000000000000000000000000000000000000000000000000000815260208160048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000001ea30764ff9ceace69e55e9bf49eb37cdba8e1de165afa91821561044a5761271092612ead925f91613ea1575b5061310c565b613eba915060203d602011610443576104358183612441565b5f613e9b565b919360a0936125c8969573ffffffffffffffffffffffffffffffffffffffff80941685521515602085015260408401521660608201528160808201520190610e0d565b906003547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8103614095575b50801561409057613fa092613fcc604093613f67613f4b612d17565b73ffffffffffffffffffffffffffffffffffffffff9092168252565b60208181018581528651925173ffffffffffffffffffffffffffffffffffffffff16918301919091525160408201529485906060820190565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08101865285612441565b8015614072576140116401000276a4945b845195869485947f128acb080000000000000000000000000000000000000000000000000000000086523060048701613ec0565b03815f73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000002cdd2dd00e1e0900ec03267cf16e6170ff7b05b165af1801561044a5761405a5750565b6132879060403d6040116127ae5761279e8183612441565b61401173fffd8963efd1fc6a506488495d951d5263988d2594613fdd565b505050565b73ffffffffffffffffffffffffffffffffffffffff807f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd361690841614805f1461410e5781835b116140e7575b50613f2f565b909150156140f7575b5f806140e1565b61410990614103613b86565b906144a9565b6140f0565b8161411884612d54565b6140db565b604080517f70a0823100000000000000000000000000000000000000000000000000000000808252306004830152909160209173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3681169290918486602481875afa95861561044a575f966143fe575b5081518181523060048201529185836024817f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a88165afa92831561044a575f936143df575b5086925f976141fe6118705f5461ffff9060d01c1690565b806143b6575b505061420e613b86565b906142198282613c97565b9461422486826124c9565b9586156143a957846004988151998a80927fc4a7761e0000000000000000000000000000000000000000000000000000000082527f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce165afa97881561044a575f905f99614387575b50801597888061437f575b614370578b9860035415614319575b506142bf969798996142b992879261454a565b90614634565b5190815230600482015291829060249082905afa91821561044a575f926142fc575b505081811061328757612b2d916142f791612870565b61474b565b6143129250803d10610443576104358183612441565b5f806142e1565b80919a979899509015614368575b841590811561435f575b159081614357575b50614349578a979695985f6142a6565b505050505050505050505050565b90505f614339565b84159150614331565b508515614327565b50505050505050505050505050565b508915614297565b90506143a1919850853d87116127ae5761279e8183612441565b97905f61428c565b5050505050505050505050565b9098506143c4919450613e20565b968781111561306057876143d791612870565b925f80614204565b6143f7919350863d8811610443576104358183612441565b915f6141e6565b614416919650853d8711610443576104358183612441565b945f6141a1565b905f602091828151910182855af115612491575f513d6144a0575073ffffffffffffffffffffffffffffffffffffffff81163b155b6144595750565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f5274afe7000000000000000000000000000000000000000000000000000000008352166004820152fd5b60011415614452565b908115612909577f0000000000000000000000000000000000000000000000000000000000000000156145255773ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f146145185790613e04826125c893612d78565b613e04816125c893612d78565b9073ffffffffffffffffffffffffffffffffffffffff6125c8921690613ce982612de4565b9281158061462c575b6127b5577f0000000000000000000000000000000000000000000000000000000000000000156145c5576145ad919273ffffffffffffffffffffffffffffffffffffffff6145a6921690613ce982612de4565b80926124c9565b905b81156145be576125c892612e08565b5050505f90565b73ffffffffffffffffffffffffffffffffffffffff168015613e1b57806c010000000000000000000000000482105f146146195790613e048261460793612d78565b905b8181018091116124d657906145af565b613e048161462693612d78565b90614609565b508215614553565b909391929361465b61189a6001546fffffffffffffffffffffffffffffffff9060601c1690565b92828211156146bb575061467192939450612870565b918083116146b3575b508115159081614696575b5061468d5750565b612b2d90614912565b8015915081156146a8575b505f614685565b90508110155f6146a1565b91505f61467a565b9293508082116146cd575b5050505050565b6146d691612870565b918015908115614725575b506146ee575b80806146c6565b6146f7916144a9565b9080821161471d575b508061470e575b80806146e7565b61471790613455565b5f614707565b90505f614700565b90508210155f6146e1565b90816060910312610015578051916040602083015192015190565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000efe302beaa2b3e6e1b18d08d69a9012a811692602083602481875afa91821561044a576148ab946060945f946148e9575b50838261482c9261482786957f0000000000000000000000008dc76b0dcf92a1f5c163896f1d04557ef3db21ce16968780947f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3616614974565b614974565b7f0000000000000000000000000000000000000000000000000000000000000000156148e457915b6040517f365d0ed7000000000000000000000000000000000000000000000000000000008152600481019390935260248301525f6044830181905260648301819052306084840152919384928391829060a4820190565b03925af1801561044a576148bc5750565b6140909060603d6060116148dd575b6148d58183612441565b810190614730565b503d6148cb565b614854565b839294509061490961482c9260203d602011610443576104358183612441565b949250906147ce565b612b2d907f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000203a662b0bd271a6ed5a60edfbd04bfce608fd3616613f03565b6040517f095ea7b300000000000000000000000000000000000000000000000000000000602080830182815273ffffffffffffffffffffffffffffffffffffffff86166024850152604480850197909752958352909491937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0929091905f906149fe606488612441565b86519082875af15f513d82614a71575b505015614a1c575050505050565b604051602081019590955273ffffffffffffffffffffffffffffffffffffffff1660248501525f604485015260649081018452614a67936137fd91614a619082612441565b8261441d565b5f808080806146c6565b909150614a9b575073ffffffffffffffffffffffffffffffffffffffff83163b15155b5f80614a0e565b600114614a9456fea26469706673582212203e6ef66f56bcae705f9be8b4c39b0a54875e9c739ed8e71e1b10d6f4a363fda564736f6c63430008170033
Deployed Bytecode Sourcemap
785:40092:26:-:0;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;:::i;:::-;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;8121:30;;8145:4;785:40092;8121:30;;785:40092;;8121:5;785:40092;8121:5;785:40092;8121:5;785:40092;8121:30;;;;;;785:40092;8121:30;-1:-1:-1;8121:30:26;;;785:40092;-1:-1:-1;785:40092:26;;;;;;;;;;;;;;;;;8121:30;;;;785:40092;8121:30;785:40092;8121:30;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;:::i;785:40092::-;;;;;;;:::o;:::-;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;35343:4;785:40092;;;35316:31;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;:::o;:::-;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;-1:-1:-1;785:40092:26;;;;;;;;;;;;;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;-1:-1:-1;785:40092:26;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;33857:28;785:40092;;;2437:47:13;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;785:40092:26;;;;;;;;;;;;;2555:37;785:40092;;;;;;;;;;;;;;;;;;;;;;1302:42;785:40092;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;35749:20;785:40092;;;;;;;;35749:20;785:40092;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;2745:22;785:40092;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;38148:11;;38140:31;38235:7;38148:11;;;38140:31;:::i;:::-;38235:7;:::i;:::-;785:40092;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;;38235:7:26;2437:47:13;;785:40092:26;;;;;;;;;;;2238:59:13;;:::i;:::-;785:40092:26;;;;;;;;;;;;;3064:27;785:40092;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;8196:350;;:::i;785:40092::-;;;;;;;;;;;2238:59:13;;:::i;:::-;785:40092:26;4935:8;785:40092;4935:15;;;;;785:40092;;;;;;4935:15;;;;785:40092;4935:15;;;;;;;;;;785:40092;;4975:21;;:::i;:::-;4295:12:12;;;:::i;4935:15:26:-;;;;:::i;:::-;;;;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;34832:48;1174:6:12;785:40092:26;;;34840:31;;34832:48;:::i;:::-;1174:6:12;785:40092:26;1174:6:12;;785:40092:26;;;;1174:6:12;;;;;785:40092:26;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;11007:14:13;;:::i;:::-;785:40092:26;;11086:56:13;11109:32;11086:56;;;;;;;;;;:::i;:::-;785:40092:26;;;;;;;;;;;11086:56:13;785:40092:26;;;;;;;;:::i;:::-;;;;;;;;;;;;;2658:37;785:40092;;;;;;;;;;;;;;;;;:::o;:::-;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;34150:26;785:40092;;;;;;;;34150:26;785:40092;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;:::o;:::-;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;;34473:40;785:40092;;;34473:40;785:40092;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;;785:40092:26;2437:47:13;;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;2644:24:12;;;785:40092:26;;;2703:40:12;;;785:40092:26;;2767:48:12;785:40092:26;;;;2437:47:13;785:40092:26;;;;;;;;2437:47:13;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;33372:47;1174:6:12;785:40092:26;;;33380:30;;33372:47;:::i;:::-;785:40092;;;;;;;;;;;;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;2437:17:13;785:40092:26;;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;37454:11;785:40092;;37454:11;;37446:31;37454:11;;;37446:31;:::i;:::-;785:40092;;37554:67;;;;785:40092;37554:67;;37606:4;785:40092;37554:67;;785:40092;37560:13;785:40092;37554:67;;;;;;;37759:7;37554:67;37631:50;37554:67;;;;;785:40092;37639:29;;;;37631:50;:::i;:::-;37759:7;:::i;37554:67::-;;;;785:40092;37554:67;785:40092;37554:67;;;;;;;:::i;:::-;;;;2437:47:13;785:40092:26;2437:47:13;;;;;:::i;:::-;785:40092:26;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;;;;;2238:59:13;;:::i;:::-;785:40092:26;5152:8;785:40092;5152:15;;;;;-1:-1:-1;785:40092:26;;;;;5152:15;;;;785:40092;5152:15;;;;;;;;;;785:40092;-1:-1:-1;;785:40092:26;5208:27;;785:40092;;;;;;;;;5208:27;785:40092;5265:17;785:40092;5273:8;785:40092;;;;;;;;;;;;;5265:17;5297:23;;;;;5431:71;;;:::i;:::-;5521:29;;;;;;;5650;;;;:::i;:::-;5701:19;;5697:80;;5517:567;5273:8;785:40092;;;;6265:15;785:40092;;;;;;;;5697:80;;;:::i;:::-;;;5517:567;5801:29;;;5797:287;;5517:567;;;;;;5797:287;5932:29;;;:::i;:::-;5983:20;;;;5979:91;;5797:287;;;;;5979:91;6043:7;;;:::i;:::-;5979:91;;;5293:944;6104:23;;5293:944;6100:137;;;:::i;5152:15::-;;;;;;:::i;:::-;;;:::i;:::-;;;;785:40092;;;;;;;;;;;;;;;1537:61;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;-1:-1:-1;785:40092:26;;;;;;;-1:-1:-1;785:40092:26;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;;:::i;:::-;;2437:17:13;;;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;;36717:22;;36713:342;;785:40092;37064:18;;;785:40092;;2437:47:13;785:40092:26;;;;;;;;2437:47:13;785:40092:26;;36713:342;785:40092;;36763:25;785:40092;36763:25;;;;785:40092;36763:25;;;;;;;;;36755:61;36763:25;;785:40092;36763:25;;;;;36713:342;-1:-1:-1;785:40092:26;;36800:5;785:40092;;36763:43;36755:61;:::i;:::-;785:40092;;36908:29;;;;785:40092;36908:29;;;;;;;;;37064:18;36908:29;36883:114;36908:29;;;;;36713:342;-1:-1:-1;;785:40092:26;36949:4;36908:46;36883:114;:::i;:::-;36713:342;;;;36908:29;;;;;;;-1:-1:-1;36908:29:26;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;36763:25;;;;;;;;;;;;;;:::i;:::-;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;-1:-1:-1;785:40092:26;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;;;;33043:28;785:40092;;;2437:47:13;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;785:40092:26;;;;;;;;;;;;;;3990:42:13;785:40092:26;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;2437:17:13;785:40092:26;2437:47:13;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;;785:40092:26;3420:28:12;1174:6;3420:28;;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2437:47:13;;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;;785:40092:26;;;;;;;;;;;;;2846:23;785:40092;;;;;;;;;;;;;;;;;;;;;;2919:47;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29911:5;785:40092;;;;;;29897:10;:19;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;30349:43;785:40092;30257:58;30122:124;30349:30;785:40092;30400:10;785:40092;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;30122:124;:::i;:::-;785:40092;;30265:38;;30257:58;:::i;:::-;785:40092;;;;;;;;;;30349:43;30400:10;:::i;785:40092::-;;-1:-1:-1;785:40092:26;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;:::i;:::-;;2437:17:13;;785:40092:26;2437:47:13;;;;;;-1:-1:-1;785:40092:26;;;;2437:47:13;;;;785:40092:26;2437:47:13;;2473:10;785:40092:26;2437:47:13;;785:40092:26;2437:47:13;;;;;;;38826:31:26;2437:47:13;;;785:40092:26;;;;;;38826:31;:::i;:::-;785:40092;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2437:47:13;;;;;:::i;:::-;-1:-1:-1;2437:47:13;;;785:40092:26;;;;;;;;;;;2238:59:13;;:::i;:::-;7903:7:26;785:40092;;7903:7;:::i;785:40092::-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;:::i;9045:488::-;785:40092;;;9140:30;;;9164:4;9140:30;;;785:40092;9140:30;;785:40092;;9140:30;785:40092;;;9140:5;785:40092;;9140:30;;;;;;;;;-1:-1:-1;9140:30:26;;;9045:488;-1:-1:-1;785:40092:26;;9210:67;;;9164:4;9140:30;9210:67;;785:40092;;;;;;;;9216:13;785:40092;9210:67;;;;;;;9464:62;9210:67;9464:42;9210:67;9324:69;9210:67;-1:-1:-1;9210:67:26;;;9045:488;9324:69;;;:::i;:::-;9431:16;;:::i;:::-;9464:42;;:::i;:::-;:62;:::i;:::-;9045:488;:::o;9210:67::-;;;;;;-1:-1:-1;9210:67:26;;;;;;:::i;:::-;;;;;9140:30;;;;;;;;;;;;;;;:::i;:::-;;;;;785:40092;;;;;;;;;;;;;;;;;:::o;9993:1200::-;785:40092;;;;10135:33;;10162:4;10135:33;;;785:40092;;10135:33;785:40092;10135:8;785:40092;10135:33;785:40092;;;;10135:33;;;;;;;-1:-1:-1;10135:33:26;;;9993:1200;10182:22;;;10178:36;;785:40092;;;10249:22;;;;10135:33;10249:22;;;;;;;;;-1:-1:-1;10249:22:26;;;9993:1200;10285:18;;;;10281:32;;785:40092;10135:33;785:40092;;;10367:26;;;;785:40092;10367:26;;;;;;;;;10581:107;10367:26;;;-1:-1:-1;;;10367:26:26;;;9993:1200;10434:107;;;;;;;:::i;:::-;10581;;:::i;:::-;10744:17;;;;10803:77;;10916:45;10803:77;;:::i;:::-;10916:45;;:::i;10740:447::-;11018:77;11131:45;11018:77;;:::i;10367:26::-;10434:107;10367:26;;;;;;;;-1:-1:-1;10367:26:26;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;;10281:32;10305:8;;;;-1:-1:-1;10305:8:26;:::o;10249:22::-;;;;;;;-1:-1:-1;10249:22:26;;;;;;:::i;:::-;;;;;;10135:33;;;;;;;;;;;;;;;:::i;:::-;;;;;785:40092;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;1174:6:12;785:40092:26;;;;;;;;:::o;:::-;;;;;;;;;;:::o;8196:350::-;785:40092;;;8336:31;;;:17;:31;:17;785:40092;8336:17;785:40092;8336:31;;;;;;;;;;;8196:350;785:40092;8401:12;785:40092;8428:30;;;;;8424:69;;785:40092;;;;;;;8196:350;:::o;8424:69::-;8474:8;;8336:31;8474:8;:::o;8336:31::-;;;;;;;;;;;;;;:::i;:::-;;;;1174:6:12;;;;:::o;:::-;;785:40092:26;;1174:6:12;;;;;;;;;;;;785:40092:26;1174:6:12;785:40092:26;;;1174:6:12;;785:40092:26;;;;;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;40631:244::-;;;;;;;;;1302:42;40813:55;;;;;;785:40092;;;;;;;;;;;;;;40813:55;;;785:40092;40813:55;;785:40092;40813:55;;;785:40092;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;40813:55;785:40092;;;;;;;40813:55;;;;;;;;;;;;;;;;;;;;;;;;40631:244;:::o;40813:55::-;;;;;;:::i;:::-;40631:244::o;785:40092::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;19133:936:13:-;19346:717;;;;;;;;3990:42;19346:717;;;;;;;;;;;;;;;;11470:268:26;11601:24;;11597:38;;11664:67;11712:18;;;:::i;:::-;11664:67;;:::i;11597:38::-;11627:8;11624:1;11627:8;:::o;785:40092::-;;;;:::o;741:4127:24:-;1369:166;;;;;;;;;;;;;;;;;;;1615:10;;1611:203;;1120:27:26;1939:19:24;;;;785:40092:26;;;2291:79:24;2442:129;;;;;;785:40092:26;;2442:129:24;;2996:66;;3350:21;741:4127;:::o;1611:203::-;1687:82;;;;;1786:13;:::o;741:4127::-;1653:15;;785:40092:26;;1369:166:24;1687:82;741:4127;:::o;:::-;;;1369:166;;;;;;;;;;;;;;;;;;;1615:10;;1611:203;;1939:19;;;1931:28;1939:19;;;1931:28;:::i;:::-;2291:79;785:40092:26;;-1:-1:-1;785:40092:26;2751:31:24;2846:78;;;3763:1;785:40092:26;;3744:1:24;785:40092:26;3743:21:24;785:40092:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3257:80:24;;;;-1:-1:-1;3257:80:24;;;2442:129;;;;;;785:40092:26;2442:129:24;;2996:66;3350:21;785:40092:26;741:4127:24;:::o;1611:203::-;1653:15;;;;1645:24;1653:15;;;1645:24;:::i;:::-;1687:82;1786:13;:::o;28438:1066:26:-;28511:20;;28507:33;;785:40092;;;;28576:33;;;28603:4;28576:33;;;785:40092;28576:33;;785:40092;;28576:8;785:40092;;;;;28576:33;785:40092;;;;28576:33;;;;;;;28530:1;28576:33;;;28438:1066;28646:16;;;:::i;:::-;28676:20;;;28672:33;;28753:34;;;;;28803;;28749:277;;29040:21;;29036:34;;785:40092;;;29080:56;;28576:33;29080:56;;785:40092;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;28603:4;785:40092;;;;;;;;;;;;-1:-1:-1;29080:56:26;;;;;;;;;;;28749:277;-1:-1:-1;785:40092:26;29176:67;;;28603:4;28576:33;29176:67;;785:40092;;;;;;;;29182:13;785:40092;29176:67;;;;;;;28530:1;29176:67;;;28749:277;29258:22;;;29254:244;;28438:1066;:::o;29254:244::-;29468:18;;;:::i;29176:67::-;;;;;;-1:-1:-1;29176:67:26;;;;;;:::i;:::-;;;;;29080:56;;;;;;;;;;;;;:::i;:::-;;;;29036:34;29063:7;;;;;;:::o;28749:277::-;28887:128;;;;:::i;:::-;28749:277;;;28672:33;28698:7;;;;;;;;:::o;28576:33::-;;;;;;;;;;;;;;;:::i;:::-;;;;;28507;28533:7;:::o;3079:97:13:-;3154:4;3132:10;:27;785:40092:26;;3079:97:13:o;785:40092:26:-;;;;;;;;;;;;;;;;;;;;;;;;;6651:6;785:40092;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;4535:890:12;4620:14;785:40092:26;4621:13:12;785:40092:26;;;;;;4620:14:12;;785:40092:26;4620:14:12;4616:85;;785:40092:26;;;4805:31:12;;;:17;:31;:17;785:40092:26;4805:17:12;785:40092:26;4805:31:12;;;;;;;4621:13;4805:31;;;4535:890;-1:-1:-1;4851:36:12;;;;;;4991:83;4992:47;4930:36;;4903:217;4930:36;;:::i;:::-;785:40092:26;5013:26:12;785:40092:26;4621:13:12;785:40092:26;;;;;;;;5013:26:12;4992:47;;:::i;:::-;1174:6;785:40092:26;;;;4991:83:12;-1:-1:-1;4929:145:12;4903:217;:::i;4847:572::-;5141:36;;;5137:282;;4847:572;;;4535:890::o;5137:282::-;5280:81;5281:45;5219:36;5193:215;5219:36;;;:::i;:::-;785:40092:26;5302:24:12;785:40092:26;4621:13:12;785:40092:26;;;;;;;;4805:31:12;;;;;;;;;;;;;;:::i;:::-;;;;4616:85;4650:20;;4666:4;785:40092:26;4621:13:12;785:40092:26;;;4621:13:12;785:40092:26;;6326:1450;6477:8;785:40092;6469:40;785:40092;;;;;;;;;;6469:40;:::i;:::-;6451:15;:58;6447:101;;6621:36;785:40092;;;6621:36;:::i;:::-;6605:13;:52;6601:95;;785:40092;;;6761:30;;6785:4;6761:30;;;785:40092;;;;;;6761:5;785:40092;;6761:30;;;;;;;-1:-1:-1;6761:30:26;;;6326:1450;785:40092;-1:-1:-1;785:40092:26;;;;;;;;6937:23;6933:634;;-1:-1:-1;;785:40092:26;;;;;-1:-1:-1;7714:14:26;;;7731:13;;;6326:1450;:::o;7714:55::-;-1:-1:-1;7747:22:26;6326:1450;:::o;6933:634::-;7346:31;7003:71;;7170:75;7003:71;;7171:63;7003:71;;:::i;:::-;785:40092;;;;7171:63;;:::i;7170:75::-;7280:31;;;;:::i;:::-;7346;;:::i;:::-;7508:22;;;:48;;;;;7501:55;;;:::o;7508:48::-;7534:22;;7501:55;-1:-1:-1;7501:55:26:o;6761:30::-;;;;;785:40092;6761:30;785:40092;6761:30;;;;;;;:::i;:::-;;;;;19632:143;19749:18;19632:143;19750:17;19749:18;19720:13;;19749:18;:::i;785:40092::-;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;30733:1524;;31037:55;785:40092;;;;30956:5;;;785:40092;30934:28;;31045:36;;;;;;;30733:1524;31037:55;;;:::i;:::-;31136:17;;;;31169:521;;;31229:1;31293:38;31214:16;31206:38;31214:16;;;31206:38;:::i;:::-;31301:16;31293:38;:::i;31169:521::-;31461:16;31476:1;31547:38;31461:16;31453:38;31461:16;;;31453:38;:::i;:::-;31555:16;31547:38;:::i;31132:1119::-;31720:521;;;;;;31780:1;31844:38;31765:16;31757:38;31765:16;;;31757:38;:::i;31720:521::-;32012:16;32027:1;32098:38;32012:16;32004:38;32012:16;;;32004:38;:::i;31045:36::-;31013:13;785:40092;30999:27;;-1:-1:-1;31045:36:26;;;;1219:160:9;785:40092:26;;;1328:43:9;;;;785:40092:26;;;;;1328:43:9;;;785:40092:26;;;;;;;;;1328:43:9;;;;;;785:40092:26;;1328:43:9;:::i;:::-;;:::i;785:40092:26:-;;;;;;;;;;;;;:::i;39238:898::-;39374:11;785:40092;39238:898;;;39373:12;;785:40092;;;;4620:14:12;;785:40092:26;39373:12;:38;;;;39238:898;39369:61;;785:40092;39461:5;;;785:40092;;;;;39444:23;;;;:53;;;;39238:898;39440:88;;785:40092;;;39555:43;;785:40092;;;39555:43;;;785:40092;39555:43;;785:40092;;;;;;39555:43;785:40092;;;;39555:43;;;;;;;;;39374:11;39555:43;;;39238:898;39555:108;;;;;39238:898;39538:153;;;;785:40092;;;39728:37;;;39759:4;39555:43;39728:37;;785:40092;;;;39759:4;785:40092;;;39728:37;;;;;;;;39374:11;39728:37;;;39238:898;-1:-1:-1;785:40092:26;;39830:32;;;785:40092;;;39555:43;39830:32;;785:40092;39830:32;785:40092;;;39830:32;;;;;;;39799:63;39830:32;39374:11;39830:32;;;39238:898;39799:63;;;:::i;:::-;39876:18;39872:41;;39927:21;40061:30;39927:21;;;;39374:11;39927:21;;39923:105;;39238:898;785:40092;;;;;40061:30;;;;;;785:40092;40061:30;;39555:43;40061:30;;785:40092;;;;;;;;;;;;40061:30;;;;;;;;;;39374:11;40061:30;;;39238:898;40101:28;;40109:4;40101:28;39238:898;:::o;40061:30::-;;;;;;;-1:-1:-1;40061:30:26;;;;;;:::i;:::-;;;;;;39923:105;40000:16;;;:::i;:::-;39923:105;;;;;39872:41;39896:17;;;;;;;39374:11;39896:17;39374:11;39896:17;:::o;39830:32::-;;;;;;;;;;;;;;:::i;:::-;;;;39728:37;;;;;;;;;;;;;;;:::i;:::-;;;;;39538:153;39674:17;;;;;;39374:11;39674:17;39374:11;39674:17;:::o;39555:108::-;785:40092;;;39614:44;;785:40092;;;;;39555:43;39614:44;;785:40092;;-1:-1:-1;785:40092:26;;;39614:44;;;;;;;;39374:11;39614:44;;;39555:108;39614:49;;;39555:108;;;;39614:44;;;;;;;;;;;;;;:::i;:::-;;;;39555:43;;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;;39444:53;39488:8;;;785:40092;39471:26;;39444:53;;39369:61;-1:-1:-1;39374:11:26;;-1:-1:-1;39374:11:26;;39413:17::o;39373:38::-;785:40092;;;;39389:22;39373:38;;32506:148;785:40092;;;32618:29;;785:40092;32633:5;32618:29;32633:5;785:40092;32633:5;785:40092;32618:29;;;;;;;;;;;32589:58;32506:148;:::o;32618:29::-;;;785:40092;32618:29;;785:40092;32618:29;;;;;;785:40092;32618:29;;;:::i;:::-;;;785:40092;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;:::i;:::-;;;;:::i;32618:29::-;;;-1:-1:-1;32618:29:26;;785:40092;;;;;;;;;;;;;:::i;12072:765::-;;12233:24;;12229:38;;13332:17;;;;785:40092;;13525:153;785:40092;;13558:39;;;;:::i;:::-;13525:153;:::i;:::-;785:40092;;;12515:27;;;12530:5;12515:27;12530:5;785:40092;12530:5;785:40092;12515:27;;;;;;;12792:26;12600:71;12782:48;12515:27;12783:36;12515:27;-1:-1:-1;12515:27:26;;;13328:1224;785:40092;;;;12640:31;785:40092;-1:-1:-1;785:40092:26;;;;;12640:31;785:40092;;;;12600:71;:::i;:::-;12792:26;:::i;12515:27::-;;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;;;;;13328:1224;785:40092;;;;;;;1120:27;785:40092;13922:40;;13918:624;785:40092;;;14111:48;;;14074:169;14111:48;;:::i;:::-;14074:169;:::i;:::-;13328:1224;;13918:624;14395:55;;14358:169;14395:55;;:::i;785:40092::-;;:::i;32263:237::-;785:40092;;;32400:31;;;:17;:31;:17;785:40092;32400:17;785:40092;32400:31;;;;;;;1174:6:12;32400:31:26;32449:33;32400:31;;;;;32263:237;32449:33;;:::i;32400:31::-;;;;;;;;;;;;;;:::i;:::-;;;;847:10:25;;;;;;;;785:40092:26;;;;;;;;847:10:25;;;785:40092:26;847:10:25;;;785:40092:26;;847:10:25;;;785:40092:26;847:10:25;;;;;;;;:::i;20091:1647:26:-;;20296:12;785:40092;20339:17;20322:34;;20318:931;;20091:1647;21263:17;;;21259:30;;21441:24;785:40092;21441:24;785:40092;;21338:73;785:40092;;:::i;:::-;;;;;;;;21338:73;;;;;785:40092;;;;;;;;;21441:24;;;785:40092;;;;;;;;;;;;;;;;;21441:24;;;;;;;;;:::i;:::-;21601:102;;;;21476:255;847:10:25;21601:102:26;;785:40092;;21476:255;;;;;785:40092;21476:255;;21524:4;21476:255;;;;:::i;:::-;;21491:5;-1:-1:-1;785:40092:26;21491:5;785:40092;21476:255;;;;;;;;20091:1647;:::o;21476:255::-;;;785:40092;21476:255;785:40092;21476:255;;;;;;;:::i;21601:102::-;21476:255;1027:49:25;21601:102:26;;;21259:30;21282:7;;;:::o;20318:931::-;785:40092;20433:5;;785:40092;;;;20414:25;20410:326;;;;;20527:31;;20410:326;20754:32;20750:489;;20410:326;20318:931;;;20750:489;20861:364;;-1:-1:-1;20861:364:26;;;;20750:489;;;;20861:364;21076:130;21166:18;;;:::i;:::-;21076:130;;:::i;:::-;20861:364;;20410:326;20681:40;;;;:::i;:::-;20410:326;;25511:2495;785:40092;;;;25577:30;;;25601:4;25577:30;;;785:40092;;;25577:30;;785:40092;25577:5;785:40092;;;;;25577:30;785:40092;;;;25577:30;;;;;;;-1:-1:-1;25577:30:26;;;25511:2495;-1:-1:-1;785:40092:26;;25646:67;;;25601:4;25577:30;25646:67;;785:40092;;25601:4;785:40092;;;25652:13;785:40092;;25646:67;;;;;;;-1:-1:-1;25646:67:26;;;25511:2495;25724:42;;25776:24;-1:-1:-1;785:40092:26;25876:27;785:40092;-1:-1:-1;785:40092:26;;;;;;;;25876:27;25917:23;25913:351;;25511:2495;26297:18;;;;:::i;:::-;26360:94;;;;;:::i;:::-;26499:57;;;;;:::i;:::-;26571:29;;;26567:42;;785:40092;25577:30;785:40092;;;26672:39;;;;785:40092;26672:39;;:8;785:40092;26672:39;;;;;;;-1:-1:-1;;;26672:39:26;;;25511:2495;-1:-1:-1;26726:20:26;;;;;:44;;25511:2495;26722:57;;785:40092;;26900:12;785:40092;26900:17;26896:395;;25511:2495;27409:184;27786:12;27409:184;;;;;;;;;:::i;:::-;27786:12;;:::i;:::-;785:40092;27841:30;;;25601:4;25577:30;27841;;785:40092;;;;;;;;27841:30;;;;;;;-1:-1:-1;27841:30:26;;;25511:2495;27885:38;;;;;27881:51;;27960:38;;;;;:::i;:::-;;:::i;27841:30::-;;;;;;-1:-1:-1;27841:30:26;;;;;;:::i;:::-;;;;;26896:395;26955:64;;;;;;;;;;;26896:395;27060:23;;27059:71;;;;;26896:395;27149:15;:37;;;;26896:395;27145:136;;;26896:395;;;;;;;;27145:136;27206:7;;;;;;;;;;;;:::o;27149:37::-;;;;;;27059:71;27105:24;;;-1:-1:-1;27059:71:26;;26955:64;26998:20;;;26955:64;;26722:57;26772:7;;;;;;;;;;;;;:::o;26726:44::-;26750:20;;;26726:44;;26672:39;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;26567:42;26602:7;;;;;;;;;;;:::o;25913:351::-;25975:41;;;;;;;;:::i;:::-;26091:32;;;;;26087:45;;26222:31;;;;:::i;:::-;25913:351;;;;;25646:67;;;;;;;;;;;;;;;:::i;:::-;;;;;25577:30;;;;;;;;;;;;;;;:::i;:::-;;;;;8370:720:9;;-1:-1:-1;8507:421:9;8370:720;8507:421;;;;;;;;;;;;-1:-1:-1;8507:421:9;;8942:15;;785:40092:26;;;;8960:26:9;:31;8942:68;8938:146;;8370:720;:::o;8938:146::-;785:40092:26;;;;;9033:40:9;;;;785:40092:26;9033:40:9;;;785:40092:26;9033:40:9;8942:68;9009:1;8994:16;;8942:68;;14931:1444:26;;15106:23;;15102:37;;15153:17;;;;785:40092;;;;;;;1120:27;785:40092;15401:40;;15397:632;785:40092;;;15582:50;;;15545:170;15582:50;;:::i;15397:632::-;15881:55;;15844:170;15881:55;;:::i;15149:1220::-;785:40092;;16204:154;785:40092;;16237:40;;;;:::i;17306:1892::-;;17534:15;;:34;;;17306:1892;17530:48;;17672:17;;;;18030:36;785:40092;;;17850:144;785:40092;;17883:39;;;;:::i;17850:144::-;18030:36;;;:::i;:::-;17668:1259;;18941:24;;18937:38;;19065:126;;;:::i;18937:38::-;18967:8;;;17548:1;18967:8;:::o;17668:1259::-;785:40092;;;;;;;1120:27;785:40092;18238:31;;18234:611;785:40092;;;18414:48;;;18377:160;18414:48;;:::i;18377:160::-;18234:611;;785:40092;;;;;;;;17668:1259;;;18234:611;18707:46;;18670:160;18707:46;;:::i;18670:160::-;18234:611;;;17534:34;17553:15;;;17534:34;;22206:1833;;;;;;22475:17;785:40092;22483:8;785:40092;;;;;;;;22475:17;22507:62;;;;;;;22650:78;;;;;;;:::i;:::-;22746:31;;;;22742:101;;22503:1530;22931:20;;;;:89;;;;22503:1530;22910:200;;;22503:1530;22206:1833::o;22910:200::-;23078:16;;;:::i;22931:89::-;22972:14;;;-1:-1:-1;22972:47:26;;;;22931:89;;;;;22972:47;22990:29;;;;;22972:47;;;22742:101;22797:31;-1:-1:-1;22742:101:26;;;22503:1530;23143:62;;;;;;23126:907;;22503:1530;;;;;;22206:1833::o;23126:907::-;23310:82;;;:::i;:::-;23464:14;;;:60;;;;;23126:907;23460:563;;;23126:907;;;;;23460:563;23580:128;;;:::i;:::-;23730:46;;;;23726:139;;23460:563;23886:29;;23882:127;;23460:563;;;;;23882:127;23964:25;;;:::i;:::-;23882:127;;;23726:139;23800:46;;23726:139;;;23464:60;23482:42;;;;;23464:60;;;785:40092;;;;;;;;;;;;;;;;;;;;;:::o;24177:901::-;785:40092;;;24287:67;;24339:4;24287:67;;;785:40092;;24293:13;785:40092;;;24287:67;785:40092;;;;24287:67;;;;;;;24922:149;24287:67;24922:149;24287:67;-1:-1:-1;24287:67:26;;;24177:901;24392:8;;;24507:28;24392:8;24403:15;24392:8;;;785:40092;24365:5;;;;;785:40092;24403:15;:::i;:::-;24507:28;:::i;:::-;24635:17;;;;24719:50;24631:281;785:40092;;;24922:149;;24287:67;24922:149;;785:40092;;;;;;;;-1:-1:-1;785:40092:26;;;;;;;;;;;;24339:4;785:40092;;;;;;;;;;;;;;;;;24922:149;;;;;;;;;;;24177:901;:::o;24922:149::-;;;;;;;;;;;;;;:::i;:::-;;;;;:::i;:::-;;;;;24631:281;;;24287:67;;;;;;;24507:28;24287:67;;;;;;;;;;;:::i;:::-;;;;;;;19340:143;19458:17;19340:143;19458:17;19436:5;785:40092;19436:5;785:40092;19458:17;:::i;5084:380:9:-;785:40092:26;;;5199:47:9;;;;;;;785:40092:26;;;5199:47:9;;;785:40092:26;;;;;;;;;5199:47:9;;;785:40092:26;;;;-1:-1:-1;;785:40092:26;;5199:47:9;-1:-1:-1;;5199:47:9;785:40092:26;;5199:47:9;:::i;:::-;9770:199;;;;;;;-1:-1:-1;9770:199:9;;9985:80;;;5084:380;5261:45;;;5257:201;;5084:380;;;;;:::o;5257:201::-;785:40092:26;;5199:47:9;5349:43;;;;;;785:40092:26;;5199:47:9;5349:43;;785:40092:26;-1:-1:-1;785:40092:26;;;;;5349:43:9;;;;;5434:12;;5349:43;;;;785:40092:26;5349:43:9;:::i;:::-;;;:::i;5434:12::-;5257:201;;;;;;;9985:80;9997:67;;-1:-1:-1;9997:15:9;;785:40092:26;;;;10015:26:9;:30;;9997:67;9985:80;;;;9997:67;10063:1;10048:16;9997:67;
Swarm Source
ipfs://3e6ef66f56bcae705f9be8b4c39b0a54875e9c739ed8e71e1b10d6f4a363fda5
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.