update vault contract

This commit is contained in:
2025-12-29 11:09:53 +08:00
parent 7c28a4fb70
commit dba8fa1af0
2 changed files with 2 additions and 5 deletions

View File

@@ -113,7 +113,7 @@ contract YTAssetFactory is Initializable, UUPSUpgradeable, OwnableUpgradeable {
uint256[] memory _redemptionTimes, uint256[] memory _redemptionTimes,
uint256[] memory _initialYtPrices, uint256[] memory _initialYtPrices,
address _usdcPriceFeed address _usdcPriceFeed
) external returns (address[] memory vaults) { ) external onlyOwner returns (address[] memory vaults) {
require( require(
_names.length == _symbols.length && _names.length == _symbols.length &&
_names.length == _managers.length && _names.length == _managers.length &&

View File

@@ -250,13 +250,10 @@ contract YTAssetVault is
function processBatchWithdrawals(uint256 _batchSize) function processBatchWithdrawals(uint256 _batchSize)
external external
nonReentrant nonReentrant
onlyManager
whenNotPaused whenNotPaused
returns (uint256 processedCount, uint256 totalDistributed) returns (uint256 processedCount, uint256 totalDistributed)
{ {
if (msg.sender != manager && msg.sender != factory) {
revert Forbidden();
}
if (_batchSize == 0) revert InvalidBatchSize(); if (_batchSize == 0) revert InvalidBatchSize();
uint256 availableUSDC = IERC20(usdcAddress).balanceOf(address(this)); uint256 availableUSDC = IERC20(usdcAddress).balanceOf(address(this));