update
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -77,6 +77,12 @@ contract YTPriceFeed is Initializable, UUPSUpgradeable {
|
|||||||
priceStalenesThreshold = 3600; // 默认1小时
|
priceStalenesThreshold = 3600; // 默认1小时
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 授权升级(仅gov可调用)
|
||||||
|
* @param newImplementation 新实现合约地址
|
||||||
|
*/
|
||||||
|
function _authorizeUpgrade(address newImplementation) internal override onlyGov {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 设置USDC地址
|
* @notice 设置USDC地址
|
||||||
* @param _usdcAddress USDC地址
|
* @param _usdcAddress USDC地址
|
||||||
@@ -94,12 +100,6 @@ contract YTPriceFeed is Initializable, UUPSUpgradeable {
|
|||||||
usdcPriceFeed = AggregatorV3Interface(_usdcPriceFeed);
|
usdcPriceFeed = AggregatorV3Interface(_usdcPriceFeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 授权升级(仅gov可调用)
|
|
||||||
* @param newImplementation 新实现合约地址
|
|
||||||
*/
|
|
||||||
function _authorizeUpgrade(address newImplementation) internal override onlyGov {}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 设置keeper权限
|
* @notice 设置keeper权限
|
||||||
* @param _keeper keeper地址
|
* @param _keeper keeper地址
|
||||||
|
|||||||
@@ -203,17 +203,7 @@ contract YTVault is Initializable, UUPSUpgradeable, ReentrancyGuardUpgradeable {
|
|||||||
maxUsdyAmounts[_token] = _maxUsdyAmount;
|
maxUsdyAmounts[_token] = _maxUsdyAmount;
|
||||||
stableTokens[_token] = _isStable;
|
stableTokens[_token] = _isStable;
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearWhitelistedToken(address _token) external onlyGov {
|
|
||||||
if (!whitelistedTokens[_token]) revert TokenNotWhitelisted();
|
|
||||||
totalTokenWeights = totalTokenWeights - tokenWeights[_token];
|
|
||||||
delete whitelistedTokens[_token];
|
|
||||||
delete stableTokens[_token];
|
|
||||||
delete tokenDecimals[_token];
|
|
||||||
delete tokenWeights[_token];
|
|
||||||
delete maxUsdyAmounts[_token];
|
|
||||||
}
|
|
||||||
|
|
||||||
function setSwapFees(
|
function setSwapFees(
|
||||||
uint256 _swapFee,
|
uint256 _swapFee,
|
||||||
uint256 _stableSwapFee,
|
uint256 _stableSwapFee,
|
||||||
@@ -241,12 +231,6 @@ contract YTVault is Initializable, UUPSUpgradeable, ReentrancyGuardUpgradeable {
|
|||||||
emit SwapEnabledSet(_isSwapEnabled);
|
emit SwapEnabledSet(_isSwapEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
function withdrawToken(address _token, address _receiver, uint256 _amount) external onlyGov {
|
|
||||||
if (!emergencyMode) revert NotInEmergency();
|
|
||||||
IERC20(_token).safeTransfer(_receiver, _amount);
|
|
||||||
_updateTokenBalance(_token);
|
|
||||||
}
|
|
||||||
|
|
||||||
function setMaxSwapSlippageBps(uint256 _slippageBps) external onlyGov {
|
function setMaxSwapSlippageBps(uint256 _slippageBps) external onlyGov {
|
||||||
if (_slippageBps > 2000) revert SlippageTooHigh(); // 最大20%
|
if (_slippageBps > 2000) revert SlippageTooHigh(); // 最大20%
|
||||||
maxSwapSlippageBps = _slippageBps;
|
maxSwapSlippageBps = _slippageBps;
|
||||||
@@ -406,6 +390,22 @@ contract YTVault is Initializable, UUPSUpgradeable, ReentrancyGuardUpgradeable {
|
|||||||
|
|
||||||
return amountOutAfterFees;
|
return amountOutAfterFees;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clearWhitelistedToken(address _token) external onlyGov {
|
||||||
|
if (!whitelistedTokens[_token]) revert TokenNotWhitelisted();
|
||||||
|
totalTokenWeights = totalTokenWeights - tokenWeights[_token];
|
||||||
|
delete whitelistedTokens[_token];
|
||||||
|
delete stableTokens[_token];
|
||||||
|
delete tokenDecimals[_token];
|
||||||
|
delete tokenWeights[_token];
|
||||||
|
delete maxUsdyAmounts[_token];
|
||||||
|
}
|
||||||
|
|
||||||
|
function withdrawToken(address _token, address _receiver, uint256 _amount) external onlyGov {
|
||||||
|
if (!emergencyMode) revert NotInEmergency();
|
||||||
|
IERC20(_token).safeTransfer(_receiver, _amount);
|
||||||
|
_updateTokenBalance(_token);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 获取代币价格(带价差)
|
* @notice 获取代币价格(带价差)
|
||||||
|
|||||||
@@ -100,6 +100,7 @@ contract YTLPToken is Initializable, ERC20Upgradeable, OwnableUpgradeable, UUPSU
|
|||||||
(bool success, ) = poolManager.call(
|
(bool success, ) = poolManager.call(
|
||||||
abi.encodeWithSignature("onLPTransfer(address,address)", from, to)
|
abi.encodeWithSignature("onLPTransfer(address,address)", from, to)
|
||||||
);
|
);
|
||||||
|
require(success, "Failed to call onLPTransfer");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,87 @@ contract YTAssetFactory is Initializable, UUPSUpgradeable, OwnableUpgradeable {
|
|||||||
defaultHardCap = _defaultHardCap;
|
defaultHardCap = _defaultHardCap;
|
||||||
emit DefaultHardCapSet(_defaultHardCap);
|
emit DefaultHardCapSet(_defaultHardCap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 设置指定vault的硬顶
|
||||||
|
* @param _vault vault地址
|
||||||
|
* @param _hardCap 新的硬顶值
|
||||||
|
*/
|
||||||
|
function setHardCap(address _vault, uint256 _hardCap) external onlyOwner {
|
||||||
|
if (!isVault[_vault]) revert VaultNotExists();
|
||||||
|
|
||||||
|
YTAssetVault(_vault).setHardCap(_hardCap);
|
||||||
|
emit HardCapSet(_vault, _hardCap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 批量设置硬顶
|
||||||
|
* @param _vaults vault地址数组
|
||||||
|
* @param _hardCaps 硬顶值数组
|
||||||
|
*/
|
||||||
|
function setHardCapBatch(
|
||||||
|
address[] memory _vaults,
|
||||||
|
uint256[] memory _hardCaps
|
||||||
|
) external onlyOwner {
|
||||||
|
require(_vaults.length == _hardCaps.length, "Length mismatch");
|
||||||
|
|
||||||
|
for (uint256 i = 0; i < _vaults.length; i++) {
|
||||||
|
if (!isVault[_vaults[i]]) revert VaultNotExists();
|
||||||
|
YTAssetVault(_vaults[i]).setHardCap(_hardCaps[i]);
|
||||||
|
emit HardCapSet(_vaults[i], _hardCaps[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 设置vault的管理员
|
||||||
|
* @param _vault vault地址
|
||||||
|
* @param _manager 新管理员地址
|
||||||
|
*/
|
||||||
|
function setVaultManager(address _vault, address _manager) external onlyOwner {
|
||||||
|
if (!isVault[_vault]) revert VaultNotExists();
|
||||||
|
if (_manager == address(0)) revert InvalidAddress();
|
||||||
|
|
||||||
|
YTAssetVault(_vault).setManager(_manager);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 设置vault的价格过期阈值
|
||||||
|
* @param _vault vault地址
|
||||||
|
* @param _threshold 阈值(秒)
|
||||||
|
*/
|
||||||
|
function setPriceStalenessThreshold(address _vault, uint256 _threshold) external onlyOwner {
|
||||||
|
if (!isVault[_vault]) revert VaultNotExists();
|
||||||
|
|
||||||
|
YTAssetVault(_vault).setPriceStalenessThreshold(_threshold);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 设置vault的下一个赎回时间
|
||||||
|
* @param _vault vault地址
|
||||||
|
* @param _nextRedemptionTime 赎回时间(Unix时间戳)
|
||||||
|
*/
|
||||||
|
function setVaultNextRedemptionTime(address _vault, uint256 _nextRedemptionTime) external onlyOwner {
|
||||||
|
if (!isVault[_vault]) revert VaultNotExists();
|
||||||
|
|
||||||
|
YTAssetVault(_vault).setNextRedemptionTime(_nextRedemptionTime);
|
||||||
|
emit NextRedemptionTimeSet(_vault, _nextRedemptionTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 批量设置赎回时间
|
||||||
|
* @param _vaults vault地址数组
|
||||||
|
* @param _nextRedemptionTime 统一的赎回时间
|
||||||
|
*/
|
||||||
|
function setVaultNextRedemptionTimeBatch(
|
||||||
|
address[] memory _vaults,
|
||||||
|
uint256 _nextRedemptionTime
|
||||||
|
) external onlyOwner {
|
||||||
|
for (uint256 i = 0; i < _vaults.length; i++) {
|
||||||
|
if (!isVault[_vaults[i]]) revert VaultNotExists();
|
||||||
|
YTAssetVault(_vaults[i]).setNextRedemptionTime(_nextRedemptionTime);
|
||||||
|
emit NextRedemptionTimeSet(_vaults[i], _nextRedemptionTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 创建新的YTAssetVault
|
* @notice 创建新的YTAssetVault
|
||||||
@@ -196,87 +277,6 @@ contract YTAssetFactory is Initializable, UUPSUpgradeable, OwnableUpgradeable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 设置指定vault的硬顶
|
|
||||||
* @param _vault vault地址
|
|
||||||
* @param _hardCap 新的硬顶值
|
|
||||||
*/
|
|
||||||
function setHardCap(address _vault, uint256 _hardCap) external onlyOwner {
|
|
||||||
if (!isVault[_vault]) revert VaultNotExists();
|
|
||||||
|
|
||||||
YTAssetVault(_vault).setHardCap(_hardCap);
|
|
||||||
emit HardCapSet(_vault, _hardCap);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 批量设置硬顶
|
|
||||||
* @param _vaults vault地址数组
|
|
||||||
* @param _hardCaps 硬顶值数组
|
|
||||||
*/
|
|
||||||
function setHardCapBatch(
|
|
||||||
address[] memory _vaults,
|
|
||||||
uint256[] memory _hardCaps
|
|
||||||
) external onlyOwner {
|
|
||||||
require(_vaults.length == _hardCaps.length, "Length mismatch");
|
|
||||||
|
|
||||||
for (uint256 i = 0; i < _vaults.length; i++) {
|
|
||||||
if (!isVault[_vaults[i]]) revert VaultNotExists();
|
|
||||||
YTAssetVault(_vaults[i]).setHardCap(_hardCaps[i]);
|
|
||||||
emit HardCapSet(_vaults[i], _hardCaps[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 设置vault的管理员
|
|
||||||
* @param _vault vault地址
|
|
||||||
* @param _manager 新管理员地址
|
|
||||||
*/
|
|
||||||
function setVaultManager(address _vault, address _manager) external onlyOwner {
|
|
||||||
if (!isVault[_vault]) revert VaultNotExists();
|
|
||||||
if (_manager == address(0)) revert InvalidAddress();
|
|
||||||
|
|
||||||
YTAssetVault(_vault).setManager(_manager);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 设置vault的价格过期阈值
|
|
||||||
* @param _vault vault地址
|
|
||||||
* @param _threshold 阈值(秒)
|
|
||||||
*/
|
|
||||||
function setPriceStalenessThreshold(address _vault, uint256 _threshold) external onlyOwner {
|
|
||||||
if (!isVault[_vault]) revert VaultNotExists();
|
|
||||||
|
|
||||||
YTAssetVault(_vault).setPriceStalenessThreshold(_threshold);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 设置vault的下一个赎回时间
|
|
||||||
* @param _vault vault地址
|
|
||||||
* @param _nextRedemptionTime 赎回时间(Unix时间戳)
|
|
||||||
*/
|
|
||||||
function setVaultNextRedemptionTime(address _vault, uint256 _nextRedemptionTime) external onlyOwner {
|
|
||||||
if (!isVault[_vault]) revert VaultNotExists();
|
|
||||||
|
|
||||||
YTAssetVault(_vault).setNextRedemptionTime(_nextRedemptionTime);
|
|
||||||
emit NextRedemptionTimeSet(_vault, _nextRedemptionTime);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 批量设置赎回时间
|
|
||||||
* @param _vaults vault地址数组
|
|
||||||
* @param _nextRedemptionTime 统一的赎回时间
|
|
||||||
*/
|
|
||||||
function setVaultNextRedemptionTimeBatch(
|
|
||||||
address[] memory _vaults,
|
|
||||||
uint256 _nextRedemptionTime
|
|
||||||
) external onlyOwner {
|
|
||||||
for (uint256 i = 0; i < _vaults.length; i++) {
|
|
||||||
if (!isVault[_vaults[i]]) revert VaultNotExists();
|
|
||||||
YTAssetVault(_vaults[i]).setNextRedemptionTime(_nextRedemptionTime);
|
|
||||||
emit NextRedemptionTimeSet(_vaults[i], _nextRedemptionTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 暂停vault(紧急情况)
|
* @notice 暂停vault(紧急情况)
|
||||||
* @param _vault vault地址
|
* @param _vault vault地址
|
||||||
|
|||||||
@@ -180,48 +180,6 @@ contract YTAssetVault is
|
|||||||
*/
|
*/
|
||||||
function _authorizeUpgrade(address newImplementation) internal override onlyFactory {}
|
function _authorizeUpgrade(address newImplementation) internal override onlyFactory {}
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 获取并验证USDC价格(从Chainlink)
|
|
||||||
* @return 返回uint256格式的USDC价格,精度为1e8
|
|
||||||
*/
|
|
||||||
function _getUSDCPrice() internal view returns (uint256) {
|
|
||||||
(
|
|
||||||
uint80 roundId,
|
|
||||||
int256 price,
|
|
||||||
/* uint256 startedAt */,
|
|
||||||
uint256 updatedAt,
|
|
||||||
uint80 answeredInRound
|
|
||||||
) = usdcPriceFeed.latestRoundData();
|
|
||||||
|
|
||||||
// 价格有效性检查
|
|
||||||
if (price <= 0) revert InvalidChainlinkPrice();
|
|
||||||
|
|
||||||
// 新鲜度检查:确保价格数据不过期
|
|
||||||
if (updatedAt == 0) revert StalePrice();
|
|
||||||
if (answeredInRound < roundId) revert StalePrice();
|
|
||||||
if (block.timestamp - updatedAt > priceStalenesThreshold) revert StalePrice();
|
|
||||||
|
|
||||||
return uint256(price);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 计算价格转换因子
|
|
||||||
* @dev 转换因子 = 10^(ytDecimals) * PRICE_PRECISION / (10^(usdcDecimals) * CHAINLINK_PRICE_PRECISION)
|
|
||||||
* @return 价格转换因子
|
|
||||||
*/
|
|
||||||
function _getPriceConversionFactor() internal view returns (uint256) {
|
|
||||||
uint8 ytDecimals = decimals();
|
|
||||||
|
|
||||||
// 分子: 10^ytDecimals * PRICE_PRECISION (1e30)
|
|
||||||
uint256 numerator = (10 ** ytDecimals) * PRICE_PRECISION;
|
|
||||||
|
|
||||||
// 分母: 10^usdcDecimals * CHAINLINK_PRICE_PRECISION (1e8)
|
|
||||||
uint256 denominator = (10 ** usdcDecimals) * CHAINLINK_PRICE_PRECISION;
|
|
||||||
|
|
||||||
// 返回转换因子
|
|
||||||
return numerator / denominator;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 设置硬顶
|
* @notice 设置硬顶
|
||||||
* @param _hardCap 新的硬顶值
|
* @param _hardCap 新的硬顶值
|
||||||
@@ -250,21 +208,6 @@ contract YTAssetVault is
|
|||||||
priceStalenesThreshold = _threshold;
|
priceStalenesThreshold = _threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 暂停合约(仅factory可调用)
|
|
||||||
* @dev 暂停后,所有资金流动操作将被禁止
|
|
||||||
*/
|
|
||||||
function pause() external onlyFactory {
|
|
||||||
_pause();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 恢复合约(仅factory可调用)
|
|
||||||
*/
|
|
||||||
function unpause() external onlyFactory {
|
|
||||||
_unpause();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 设置下一个赎回开放时间(仅factory可调用)
|
* @notice 设置下一个赎回开放时间(仅factory可调用)
|
||||||
* @param _nextRedemptionTime 下一个赎回时间(Unix时间戳)
|
* @param _nextRedemptionTime 下一个赎回时间(Unix时间戳)
|
||||||
@@ -442,6 +385,102 @@ contract YTAssetVault is
|
|||||||
|
|
||||||
emit BatchProcessed(startIndex, processedUpToIndex, processedCount, totalDistributed);
|
emit BatchProcessed(startIndex, processedUpToIndex, processedCount, totalDistributed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 提取USDC用于外部投资
|
||||||
|
* @param _to 接收地址
|
||||||
|
* @param _amount 提取数量
|
||||||
|
*/
|
||||||
|
function withdrawForManagement(address _to, uint256 _amount) external onlyManager nonReentrant whenNotPaused {
|
||||||
|
if (_amount == 0) revert InvalidAmount();
|
||||||
|
|
||||||
|
uint256 availableAssets = IERC20(usdcAddress).balanceOf(address(this));
|
||||||
|
if (_amount > availableAssets) revert InvalidAmount();
|
||||||
|
|
||||||
|
managedAssets += _amount;
|
||||||
|
IERC20(usdcAddress).safeTransfer(_to, _amount);
|
||||||
|
|
||||||
|
emit AssetsWithdrawn(_to, _amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 将管理的资产归还到金库(可以归还更多,产生收益)
|
||||||
|
* @param _amount 归还数量
|
||||||
|
*/
|
||||||
|
function depositManagedAssets(uint256 _amount) external onlyManager nonReentrant whenNotPaused {
|
||||||
|
if (_amount == 0) revert InvalidAmount();
|
||||||
|
|
||||||
|
// 先更新状态(遵循CEI模式)
|
||||||
|
if (_amount >= managedAssets) {
|
||||||
|
// 归还金额 >= 已管理资产,managedAssets归零,多余部分是收益
|
||||||
|
managedAssets = 0;
|
||||||
|
} else {
|
||||||
|
// 归还金额 < 已管理资产,部分归还
|
||||||
|
managedAssets -= _amount;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从manager转入USDC到合约
|
||||||
|
IERC20(usdcAddress).transferFrom(msg.sender, address(this), _amount);
|
||||||
|
|
||||||
|
emit AssetsDeposited(_amount);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 暂停合约(仅factory可调用)
|
||||||
|
* @dev 暂停后,所有资金流动操作将被禁止
|
||||||
|
*/
|
||||||
|
function pause() external onlyFactory {
|
||||||
|
_pause();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 恢复合约(仅factory可调用)
|
||||||
|
*/
|
||||||
|
function unpause() external onlyFactory {
|
||||||
|
_unpause();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 获取并验证USDC价格(从Chainlink)
|
||||||
|
* @return 返回uint256格式的USDC价格,精度为1e8
|
||||||
|
*/
|
||||||
|
function _getUSDCPrice() internal view returns (uint256) {
|
||||||
|
(
|
||||||
|
uint80 roundId,
|
||||||
|
int256 price,
|
||||||
|
/* uint256 startedAt */,
|
||||||
|
uint256 updatedAt,
|
||||||
|
uint80 answeredInRound
|
||||||
|
) = usdcPriceFeed.latestRoundData();
|
||||||
|
|
||||||
|
// 价格有效性检查
|
||||||
|
if (price <= 0) revert InvalidChainlinkPrice();
|
||||||
|
|
||||||
|
// 新鲜度检查:确保价格数据不过期
|
||||||
|
if (updatedAt == 0) revert StalePrice();
|
||||||
|
if (answeredInRound < roundId) revert StalePrice();
|
||||||
|
if (block.timestamp - updatedAt > priceStalenesThreshold) revert StalePrice();
|
||||||
|
|
||||||
|
return uint256(price);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @notice 计算价格转换因子
|
||||||
|
* @dev 转换因子 = 10^(ytDecimals) * PRICE_PRECISION / (10^(usdcDecimals) * CHAINLINK_PRICE_PRECISION)
|
||||||
|
* @return 价格转换因子
|
||||||
|
*/
|
||||||
|
function _getPriceConversionFactor() internal view returns (uint256) {
|
||||||
|
uint8 ytDecimals = decimals();
|
||||||
|
|
||||||
|
// 分子: 10^ytDecimals * PRICE_PRECISION (1e30)
|
||||||
|
uint256 numerator = (10 ** ytDecimals) * PRICE_PRECISION;
|
||||||
|
|
||||||
|
// 分母: 10^usdcDecimals * CHAINLINK_PRICE_PRECISION (1e8)
|
||||||
|
uint256 denominator = (10 ** usdcDecimals) * CHAINLINK_PRICE_PRECISION;
|
||||||
|
|
||||||
|
// 返回转换因子
|
||||||
|
return numerator / denominator;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 查询用户的所有提现请求ID
|
* @notice 查询用户的所有提现请求ID
|
||||||
@@ -535,45 +574,6 @@ contract YTAssetVault is
|
|||||||
return block.timestamp >= nextRedemptionTime;
|
return block.timestamp >= nextRedemptionTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 提取USDC用于外部投资
|
|
||||||
* @param _to 接收地址
|
|
||||||
* @param _amount 提取数量
|
|
||||||
*/
|
|
||||||
function withdrawForManagement(address _to, uint256 _amount) external onlyManager nonReentrant whenNotPaused {
|
|
||||||
if (_amount == 0) revert InvalidAmount();
|
|
||||||
|
|
||||||
uint256 availableAssets = IERC20(usdcAddress).balanceOf(address(this));
|
|
||||||
if (_amount > availableAssets) revert InvalidAmount();
|
|
||||||
|
|
||||||
managedAssets += _amount;
|
|
||||||
IERC20(usdcAddress).safeTransfer(_to, _amount);
|
|
||||||
|
|
||||||
emit AssetsWithdrawn(_to, _amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @notice 将管理的资产归还到金库(可以归还更多,产生收益)
|
|
||||||
* @param _amount 归还数量
|
|
||||||
*/
|
|
||||||
function depositManagedAssets(uint256 _amount) external onlyManager nonReentrant whenNotPaused {
|
|
||||||
if (_amount == 0) revert InvalidAmount();
|
|
||||||
|
|
||||||
// 先更新状态(遵循CEI模式)
|
|
||||||
if (_amount >= managedAssets) {
|
|
||||||
// 归还金额 >= 已管理资产,managedAssets归零,多余部分是收益
|
|
||||||
managedAssets = 0;
|
|
||||||
} else {
|
|
||||||
// 归还金额 < 已管理资产,部分归还
|
|
||||||
managedAssets -= _amount;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 从manager转入USDC到合约
|
|
||||||
IERC20(usdcAddress).transferFrom(msg.sender, address(this), _amount);
|
|
||||||
|
|
||||||
emit AssetsDeposited(_amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @notice 获取总资产(包含被管理的资产)
|
* @notice 获取总资产(包含被管理的资产)
|
||||||
* @return 总资产 = 合约余额 + 被管理的资产
|
* @return 总资产 = 合约余额 + 被管理的资产
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
|
|||||||
{"id":"f66dad6325b2f1a6","source_id_to_path":{"0":"contracts/interfaces/IUSDY.sol","1":"contracts/interfaces/IYTAssetVault.sol","2":"contracts/interfaces/IYTLPToken.sol","3":"contracts/interfaces/IYTPoolManager.sol","4":"contracts/interfaces/IYTPriceFeed.sol","5":"contracts/interfaces/IYTVault.sol","6":"contracts/ytLp/core/YTPoolManager.sol","7":"contracts/ytLp/core/YTPriceFeed.sol","8":"contracts/ytLp/core/YTRewardRouter.sol","9":"contracts/ytLp/core/YTVault.sol","10":"contracts/ytLp/tokens/USDY.sol","11":"contracts/ytLp/tokens/YTLPToken.sol","12":"contracts/ytVault/YTAssetFactory.sol","13":"contracts/ytVault/YTAssetVault.sol","14":"lib/forge-std/src/Base.sol","15":"lib/forge-std/src/StdAssertions.sol","16":"lib/forge-std/src/StdChains.sol","17":"lib/forge-std/src/StdCheats.sol","18":"lib/forge-std/src/StdConstants.sol","19":"lib/forge-std/src/StdError.sol","20":"lib/forge-std/src/StdInvariant.sol","21":"lib/forge-std/src/StdJson.sol","22":"lib/forge-std/src/StdMath.sol","23":"lib/forge-std/src/StdStorage.sol","24":"lib/forge-std/src/StdStyle.sol","25":"lib/forge-std/src/StdToml.sol","26":"lib/forge-std/src/StdUtils.sol","27":"lib/forge-std/src/Test.sol","28":"lib/forge-std/src/Vm.sol","29":"lib/forge-std/src/console.sol","30":"lib/forge-std/src/console2.sol","31":"lib/forge-std/src/interfaces/IMulticall3.sol","32":"lib/forge-std/src/safeconsole.sol","33":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","34":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","35":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","36":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","37":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","38":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","39":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","40":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","41":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","42":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","43":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","44":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","45":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","46":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","47":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","48":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","49":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","50":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","51":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","52":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","53":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","54":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","55":"node_modules/@openzeppelin/contracts/utils/Address.sol","56":"node_modules/@openzeppelin/contracts/utils/Context.sol","57":"node_modules/@openzeppelin/contracts/utils/Errors.sol","58":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","59":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","60":"test/YtLp.t.sol"},"language":"Solidity"}
|
{"id":"0ee4530324ac9712","source_id_to_path":{"0":"contracts/interfaces/IUSDY.sol","1":"contracts/interfaces/IYTAssetVault.sol","2":"contracts/interfaces/IYTLPToken.sol","3":"contracts/interfaces/IYTPoolManager.sol","4":"contracts/interfaces/IYTPriceFeed.sol","5":"contracts/interfaces/IYTVault.sol","6":"contracts/ytLp/core/YTPoolManager.sol","7":"contracts/ytLp/core/YTPriceFeed.sol","8":"contracts/ytLp/core/YTRewardRouter.sol","9":"contracts/ytLp/core/YTVault.sol","10":"contracts/ytLp/tokens/USDY.sol","11":"contracts/ytLp/tokens/YTLPToken.sol","12":"contracts/ytVault/YTAssetFactory.sol","13":"contracts/ytVault/YTAssetVault.sol","14":"lib/forge-std/src/Base.sol","15":"lib/forge-std/src/StdAssertions.sol","16":"lib/forge-std/src/StdChains.sol","17":"lib/forge-std/src/StdCheats.sol","18":"lib/forge-std/src/StdConstants.sol","19":"lib/forge-std/src/StdError.sol","20":"lib/forge-std/src/StdInvariant.sol","21":"lib/forge-std/src/StdJson.sol","22":"lib/forge-std/src/StdMath.sol","23":"lib/forge-std/src/StdStorage.sol","24":"lib/forge-std/src/StdStyle.sol","25":"lib/forge-std/src/StdToml.sol","26":"lib/forge-std/src/StdUtils.sol","27":"lib/forge-std/src/Test.sol","28":"lib/forge-std/src/Vm.sol","29":"lib/forge-std/src/console.sol","30":"lib/forge-std/src/console2.sol","31":"lib/forge-std/src/interfaces/IMulticall3.sol","32":"lib/forge-std/src/safeconsole.sol","33":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","34":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","35":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","36":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","37":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","38":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","39":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","40":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","41":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","42":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","43":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","44":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","45":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","46":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","47":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","48":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","49":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","50":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","51":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","52":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","53":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","54":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","55":"node_modules/@openzeppelin/contracts/utils/Address.sol","56":"node_modules/@openzeppelin/contracts/utils/Context.sol","57":"node_modules/@openzeppelin/contracts/utils/Errors.sol","58":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","59":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","60":"test/YtLp.t.sol"},"language":"Solidity"}
|
||||||
1
out/build-info/54dc7690fc637aae.json
Normal file
1
out/build-info/54dc7690fc637aae.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"id":"54dc7690fc637aae","source_id_to_path":{"0":"contracts/interfaces/IUSDY.sol","1":"contracts/interfaces/IYTAssetVault.sol","2":"contracts/interfaces/IYTLPToken.sol","3":"contracts/interfaces/IYTPoolManager.sol","4":"contracts/interfaces/IYTPriceFeed.sol","5":"contracts/interfaces/IYTVault.sol","6":"contracts/ytLp/core/YTPoolManager.sol","7":"contracts/ytLp/core/YTPriceFeed.sol","8":"contracts/ytLp/core/YTRewardRouter.sol","9":"contracts/ytLp/core/YTVault.sol","10":"contracts/ytLp/tokens/USDY.sol","11":"contracts/ytLp/tokens/YTLPToken.sol","12":"contracts/ytVault/YTAssetFactory.sol","13":"contracts/ytVault/YTAssetVault.sol","14":"lib/forge-std/src/Base.sol","15":"lib/forge-std/src/StdAssertions.sol","16":"lib/forge-std/src/StdChains.sol","17":"lib/forge-std/src/StdCheats.sol","18":"lib/forge-std/src/StdConstants.sol","19":"lib/forge-std/src/StdError.sol","20":"lib/forge-std/src/StdInvariant.sol","21":"lib/forge-std/src/StdJson.sol","22":"lib/forge-std/src/StdMath.sol","23":"lib/forge-std/src/StdStorage.sol","24":"lib/forge-std/src/StdStyle.sol","25":"lib/forge-std/src/StdToml.sol","26":"lib/forge-std/src/StdUtils.sol","27":"lib/forge-std/src/Test.sol","28":"lib/forge-std/src/Vm.sol","29":"lib/forge-std/src/console.sol","30":"lib/forge-std/src/console2.sol","31":"lib/forge-std/src/interfaces/IMulticall3.sol","32":"lib/forge-std/src/safeconsole.sol","33":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","34":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","35":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","36":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","37":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","38":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","39":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","40":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","41":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","42":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","43":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","44":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","45":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","46":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","47":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","48":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","49":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","50":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","51":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","52":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","53":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","54":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","55":"node_modules/@openzeppelin/contracts/utils/Address.sol","56":"node_modules/@openzeppelin/contracts/utils/Context.sol","57":"node_modules/@openzeppelin/contracts/utils/Errors.sol","58":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","59":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","60":"test/YtLp.t.sol"},"language":"Solidity"}
|
||||||
1
out/build-info/80549191a8197f3c.json
Normal file
1
out/build-info/80549191a8197f3c.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"id":"80549191a8197f3c","source_id_to_path":{"0":"contracts/interfaces/ILending.sol","1":"contracts/interfaces/IUSDY.sol","2":"contracts/interfaces/IYTAssetVault.sol","3":"contracts/interfaces/IYTLPToken.sol","4":"contracts/interfaces/IYTLendingPriceFeed.sol","5":"contracts/interfaces/IYTPoolManager.sol","6":"contracts/interfaces/IYTPriceFeed.sol","7":"contracts/interfaces/IYTVault.sol","8":"contracts/ytLending/Configurator.sol","9":"contracts/ytLending/ConfiguratorStorage.sol","10":"contracts/ytLending/Lending.sol","11":"contracts/ytLending/LendingConfiguration.sol","12":"contracts/ytLending/LendingFactory.sol","13":"contracts/ytLending/LendingMath.sol","14":"contracts/ytLending/LendingPriceFeed.sol","15":"contracts/ytLending/LendingStorage.sol","16":"contracts/ytLp/core/YTPoolManager.sol","17":"contracts/ytLp/core/YTPriceFeed.sol","18":"contracts/ytLp/core/YTRewardRouter.sol","19":"contracts/ytLp/core/YTVault.sol","20":"contracts/ytLp/tokens/USDY.sol","21":"contracts/ytLp/tokens/YTLPToken.sol","22":"contracts/ytVault/YTAssetFactory.sol","23":"contracts/ytVault/YTAssetVault.sol","24":"lib/forge-std/src/Base.sol","25":"lib/forge-std/src/StdAssertions.sol","26":"lib/forge-std/src/StdChains.sol","27":"lib/forge-std/src/StdCheats.sol","28":"lib/forge-std/src/StdConstants.sol","29":"lib/forge-std/src/StdError.sol","30":"lib/forge-std/src/StdInvariant.sol","31":"lib/forge-std/src/StdJson.sol","32":"lib/forge-std/src/StdMath.sol","33":"lib/forge-std/src/StdStorage.sol","34":"lib/forge-std/src/StdStyle.sol","35":"lib/forge-std/src/StdToml.sol","36":"lib/forge-std/src/StdUtils.sol","37":"lib/forge-std/src/Test.sol","38":"lib/forge-std/src/Vm.sol","39":"lib/forge-std/src/console.sol","40":"lib/forge-std/src/console2.sol","41":"lib/forge-std/src/interfaces/IMulticall3.sol","42":"lib/forge-std/src/safeconsole.sol","43":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","44":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","45":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","46":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","47":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","48":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","49":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","50":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","51":"node_modules/@openzeppelin/contracts/access/Ownable.sol","52":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","53":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","54":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","55":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","56":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","57":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","58":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","59":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","60":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","61":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","62":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","63":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","64":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","65":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","66":"node_modules/@openzeppelin/contracts/utils/Address.sol","67":"node_modules/@openzeppelin/contracts/utils/Context.sol","68":"node_modules/@openzeppelin/contracts/utils/Errors.sol","69":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","70":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","71":"test/YtLending.t.sol","72":"test/YtLp.t.sol","73":"test/YtVault.t.sol"},"language":"Solidity"}
|
||||||
1
out/build-info/b2340d25e843370e.json
Normal file
1
out/build-info/b2340d25e843370e.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"id":"b2340d25e843370e","source_id_to_path":{"0":"contracts/interfaces/IUSDY.sol","1":"contracts/interfaces/IYTAssetVault.sol","2":"contracts/interfaces/IYTLPToken.sol","3":"contracts/interfaces/IYTPoolManager.sol","4":"contracts/interfaces/IYTPriceFeed.sol","5":"contracts/interfaces/IYTVault.sol","6":"contracts/ytLp/core/YTPoolManager.sol","7":"contracts/ytLp/core/YTPriceFeed.sol","8":"contracts/ytLp/core/YTRewardRouter.sol","9":"contracts/ytLp/core/YTVault.sol","10":"contracts/ytLp/tokens/USDY.sol","11":"contracts/ytLp/tokens/YTLPToken.sol","12":"contracts/ytVault/YTAssetFactory.sol","13":"contracts/ytVault/YTAssetVault.sol","14":"lib/forge-std/src/Base.sol","15":"lib/forge-std/src/StdAssertions.sol","16":"lib/forge-std/src/StdChains.sol","17":"lib/forge-std/src/StdCheats.sol","18":"lib/forge-std/src/StdConstants.sol","19":"lib/forge-std/src/StdError.sol","20":"lib/forge-std/src/StdInvariant.sol","21":"lib/forge-std/src/StdJson.sol","22":"lib/forge-std/src/StdMath.sol","23":"lib/forge-std/src/StdStorage.sol","24":"lib/forge-std/src/StdStyle.sol","25":"lib/forge-std/src/StdToml.sol","26":"lib/forge-std/src/StdUtils.sol","27":"lib/forge-std/src/Test.sol","28":"lib/forge-std/src/Vm.sol","29":"lib/forge-std/src/console.sol","30":"lib/forge-std/src/console2.sol","31":"lib/forge-std/src/interfaces/IMulticall3.sol","32":"lib/forge-std/src/safeconsole.sol","33":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","34":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","35":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","36":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","37":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","38":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","39":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","40":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","41":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","42":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","43":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","44":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","45":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","46":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","47":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","48":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","49":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","50":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","51":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","52":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","53":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","54":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","55":"node_modules/@openzeppelin/contracts/utils/Address.sol","56":"node_modules/@openzeppelin/contracts/utils/Context.sol","57":"node_modules/@openzeppelin/contracts/utils/Errors.sol","58":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","59":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","60":"test/YtLp.t.sol"},"language":"Solidity"}
|
||||||
1
out/build-info/d5a7e9e3c83edc8e.json
Normal file
1
out/build-info/d5a7e9e3c83edc8e.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"id":"d5a7e9e3c83edc8e","source_id_to_path":{"0":"contracts/interfaces/IUSDY.sol","1":"contracts/interfaces/IYTAssetVault.sol","2":"contracts/interfaces/IYTLPToken.sol","3":"contracts/interfaces/IYTPoolManager.sol","4":"contracts/interfaces/IYTPriceFeed.sol","5":"contracts/interfaces/IYTVault.sol","6":"contracts/ytLp/core/YTPoolManager.sol","7":"contracts/ytLp/core/YTPriceFeed.sol","8":"contracts/ytLp/core/YTRewardRouter.sol","9":"contracts/ytLp/core/YTVault.sol","10":"contracts/ytLp/tokens/USDY.sol","11":"contracts/ytLp/tokens/YTLPToken.sol","12":"contracts/ytVault/YTAssetFactory.sol","13":"contracts/ytVault/YTAssetVault.sol","14":"lib/forge-std/src/Base.sol","15":"lib/forge-std/src/StdAssertions.sol","16":"lib/forge-std/src/StdChains.sol","17":"lib/forge-std/src/StdCheats.sol","18":"lib/forge-std/src/StdConstants.sol","19":"lib/forge-std/src/StdError.sol","20":"lib/forge-std/src/StdInvariant.sol","21":"lib/forge-std/src/StdJson.sol","22":"lib/forge-std/src/StdMath.sol","23":"lib/forge-std/src/StdStorage.sol","24":"lib/forge-std/src/StdStyle.sol","25":"lib/forge-std/src/StdToml.sol","26":"lib/forge-std/src/StdUtils.sol","27":"lib/forge-std/src/Test.sol","28":"lib/forge-std/src/Vm.sol","29":"lib/forge-std/src/console.sol","30":"lib/forge-std/src/console2.sol","31":"lib/forge-std/src/interfaces/IMulticall3.sol","32":"lib/forge-std/src/safeconsole.sol","33":"node_modules/@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol","34":"node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol","35":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol","36":"node_modules/@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol","37":"node_modules/@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","38":"node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","39":"node_modules/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.sol","40":"node_modules/@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol","41":"node_modules/@openzeppelin/contracts/interfaces/IERC1363.sol","42":"node_modules/@openzeppelin/contracts/interfaces/IERC165.sol","43":"node_modules/@openzeppelin/contracts/interfaces/IERC1967.sol","44":"node_modules/@openzeppelin/contracts/interfaces/IERC20.sol","45":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC1822.sol","46":"node_modules/@openzeppelin/contracts/interfaces/draft-IERC6093.sol","47":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol","48":"node_modules/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.sol","49":"node_modules/@openzeppelin/contracts/proxy/Proxy.sol","50":"node_modules/@openzeppelin/contracts/proxy/beacon/IBeacon.sol","51":"node_modules/@openzeppelin/contracts/token/ERC20/ERC20.sol","52":"node_modules/@openzeppelin/contracts/token/ERC20/IERC20.sol","53":"node_modules/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol","54":"node_modules/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol","55":"node_modules/@openzeppelin/contracts/utils/Address.sol","56":"node_modules/@openzeppelin/contracts/utils/Context.sol","57":"node_modules/@openzeppelin/contracts/utils/Errors.sol","58":"node_modules/@openzeppelin/contracts/utils/StorageSlot.sol","59":"node_modules/@openzeppelin/contracts/utils/introspection/IERC165.sol","60":"test/YtLp.t.sol"},"language":"Solidity"}
|
||||||
Reference in New Issue
Block a user