update vault contract
This commit is contained in:
@@ -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 &&
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
Reference in New Issue
Block a user