update vault contract
This commit is contained in:
@@ -170,7 +170,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 &&
|
||||
|
||||
@@ -130,7 +130,7 @@ contract YTAssetVault is
|
||||
* @param _symbol YT代币符号
|
||||
* @param _manager 管理员地址
|
||||
* @param _hardCap 硬顶限制
|
||||
* @param _usdc USDC代币地址(可选,传0则使用默认地址)
|
||||
* @param _usdc USDC代币地址
|
||||
* @param _redemptionTime 赎回时间(Unix时间戳)
|
||||
* @param _initialYtPrice 初始YT价格(精度1e30,传0则使用默认值1.0)
|
||||
*/
|
||||
@@ -364,13 +364,9 @@ contract YTAssetVault is
|
||||
external
|
||||
nonReentrant
|
||||
whenNotPaused
|
||||
onlyManager
|
||||
returns (uint256 processedCount, uint256 totalDistributed)
|
||||
{
|
||||
// 权限检查:只有manager或factory可以调用
|
||||
if (msg.sender != manager && msg.sender != factory) {
|
||||
revert Forbidden();
|
||||
}
|
||||
|
||||
if (_batchSize == 0) revert InvalidBatchSize();
|
||||
|
||||
uint256 availableUSDC = IERC20(usdcAddress).balanceOf(address(this));
|
||||
|
||||
Reference in New Issue
Block a user