This commit is contained in:
2026-04-05 00:43:23 +05:30
commit 8be37d3e92
425 changed files with 101853 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
import 'dotenv/config';
import { prisma } from './src/database/connections';
async function checkTasksWithoutContract() {
console.log('🔍 Checking tasks without blockchain contract...\n');
const tasksWithoutContract = await prisma.task.findMany({
where: {
contractTaskId: null,
},
include: {
requester: {
select: {
walletAddress: true,
},
},
},
orderBy: {
createdAt: 'desc',
},
take: 10,
});
console.log(`Found ${tasksWithoutContract.length} tasks without blockchain contract:\n`);
for (const task of tasksWithoutContract) {
console.log(`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`);
console.log(`📋 Task: ${task.title}`);
console.log(` ID: ${task.id}`);
console.log(` Requester: ${task.requester.walletAddress}`);
console.log(` Amount: ${task.paymentAmount} cUSD`);
console.log(` Status: ${task.status}`);
console.log(` Created: ${task.createdAt}`);
console.log(` Contract Task ID: ${task.contractTaskId}`);
}
process.exit(0);
}
checkTasksWithoutContract().catch(error => {
console.error('Error:', error);
process.exit(1);
});