fix contract
This commit is contained in:
@@ -108,6 +108,15 @@ async function main() {
|
||||
|
||||
console.log(" ✅ Vault地址:", vaultAddress);
|
||||
console.log(" ✅ Vault索引:", index.toString());
|
||||
|
||||
// 配置价格过期阈值
|
||||
const vault = await ethers.getContractAt("YTAssetVault", vaultAddress);
|
||||
const network = await ethers.provider.getNetwork();
|
||||
const isTestnet = network.chainId === 97n || network.chainId === 11155111n; // BSC测试网或Sepolia
|
||||
const priceStalenesThreshold = isTestnet ? 86400 : 3600; // 测试网24小时,主网1小时
|
||||
|
||||
await factory.setPriceStalenessThreshold(vaultAddress, priceStalenesThreshold);
|
||||
console.log(" ✅ 价格过期阈值:", priceStalenesThreshold, "秒", `(${priceStalenesThreshold / 3600}小时)`);
|
||||
|
||||
createdVaults.push({
|
||||
name: params.name,
|
||||
|
||||
Reference in New Issue
Block a user