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 _initialYtPrices,
address _usdcPriceFeed
) external returns (address[] memory vaults) {
) external onlyOwner returns (address[] memory vaults) {
require(
_names.length == _symbols.length &&
_names.length == _managers.length &&

View File

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