fix: align self-replicate cron with current slashing/task schema
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
Some checks failed
Deploy to 110 WOOO Server / deploy (push) Failing after 6s
This commit is contained in:
@@ -8,10 +8,10 @@ export async function GET(request: Request) {
|
||||
// 1. Check Treasury Balance (Simulated by checking total staked amount or a mock treasury)
|
||||
// In a real system, we would query the VibeToken smart contract or sum up slashing events.
|
||||
const allSlashingEvents = await prisma.slashingEvent.aggregate({
|
||||
_sum: { amount_cents: true }
|
||||
_sum: { slashed_amount: true }
|
||||
});
|
||||
|
||||
const slashedFunds = allSlashingEvents._sum.amount_cents || 0;
|
||||
const slashedFunds = allSlashingEvents._sum.slashed_amount || 0;
|
||||
|
||||
// Simulate other treasury income
|
||||
const treasuryBalanceCents = slashedFunds + 150000; // Let's pretend we have $1,500 USDC in Treasury
|
||||
@@ -25,8 +25,8 @@ export async function GET(request: Request) {
|
||||
// 2. We have enough money! Check if we already have an active platform upgrade task
|
||||
const activeUpgrade = await prisma.task.findFirst({
|
||||
where: {
|
||||
is_platform_upgrade: true,
|
||||
status: { in: ["OPEN", "IN_PROGRESS", "IN_REVIEW"] }
|
||||
status: { in: ["OPEN", "IN_PROGRESS", "IN_REVIEW"] },
|
||||
title: { contains: "Platform Upgrade" }
|
||||
}
|
||||
});
|
||||
|
||||
@@ -55,7 +55,8 @@ Requirements:
|
||||
difficulty: "EPIC",
|
||||
required_stack: ["PLATFORM_UPGRADE", "Solidity", "Hardhat", "TypeScript"],
|
||||
status: "OPEN",
|
||||
is_platform_upgrade: true
|
||||
scope_clarity_score: 0.95,
|
||||
acceptance_criteria: { rules: [] }
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user