diff --git a/deploy/trade-mining/paradeen-feed-pyth.ts b/deploy/trade-mining/paradeen-feed-pyth.ts index 4821cd2..682cd18 100644 --- a/deploy/trade-mining/paradeen-feed-pyth.ts +++ b/deploy/trade-mining/paradeen-feed-pyth.ts @@ -33,6 +33,7 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { // configs const tradingFeeBps = 9; const weeklyFeeThreshold = BigNumber.from(20000).mul(E18); + const endTimestamp = 1716422400; // May 23, 2024 console.log(`> Prepare data...`); @@ -93,6 +94,11 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { } } + if (weekCursor.gt(endTimestamp)) { + console.log("> The campaign has ended, no need to feed"); + return; + } + // Ask for confirmation console.table(PARAMS_INPUT); const confirm = readlineSync.question("Confirm? (y/n): ");