Skip to content

Commit df2ac6b

Browse files
committed
Add killed chain to summary, simplify high liquidity table
1. Moved Killed Chain Assets Section - Now appears as a subsection at the bottom of the "Failed Checks" analysis section (after Logo Failures) - Always displays with fallback text when there are no killed chain assets: "No assets from killed chains detected. All assets belong to active chains." - Follows the same pattern as other report subsections 2. Merged High Liquidity Table Columns - Combined "Bid Depth" and "Other Failures" into a single "Failure Reasons" column - Bid depth failures now show as "Bid depth: [details]" within the merged column - All failures are now listed together, comma-separated, for easier reading
1 parent 7a12159 commit df2ac6b

File tree

1 file changed

+46
-73
lines changed

1 file changed

+46
-73
lines changed

.github/workflows/utility/checkVerificationCriteria.mjs

Lines changed: 46 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ async function checkBidDepth(chainName, baseDenom, numiaPairs) {
11411141
* Check 8: Killed Chain Status
11421142
* Verifies that the asset's chain is not marked as "killed" in the chain registry
11431143
*
1144-
* Assets on killed chains should not be verified, and already-verified assets
1144+
* Assets on killed chains should not be verified, and already-verified assets apart from memes
11451145
* should be de-verified.
11461146
*
11471147
* Exemption: Meme tokens (category includes "meme") are allowed to remain verified
@@ -1253,15 +1253,13 @@ function generateMarkdownReport(verificationResults) {
12531253
const alreadyVerified = verificationResults.filter(r => r.currently_verified);
12541254
const failedChecks = verificationResults.filter(r => !r.allChecksPassed && !r.currently_verified);
12551255

1256-
// Filter killed chain assets (excluding meme tokens)
1256+
// Filter killed chain assets (excluding meme tokens) - only verified assets that need de-verification
12571257
const killedChainAssetsVerified = verificationResults.filter(r => r.chainIsKilled && r.currently_verified && !r.is_meme);
1258-
const killedChainAssetsUnverified = verificationResults.filter(r => r.chainIsKilled && !r.currently_verified && !r.is_meme);
12591258

12601259
markdown += `## Summary\n\n`;
12611260
markdown += `- **Ready for Verification**: ${readyForVerification.length}\n`;
12621261
markdown += `- **Failed Checks**: ${failedChecks.length}\n`;
1263-
markdown += `- **Killed Chain Assets (Verified)**: ${killedChainAssetsVerified.length} (require de-verification)\n`;
1264-
markdown += `- **Killed Chain Assets (Unverified)**: ${killedChainAssetsUnverified.length} (cannot be verified)\n`;
1262+
markdown += `- **Killed Chain Assets**: ${killedChainAssetsVerified.length} (potential de-verification)\n`;
12651263
markdown += `- **Total Checked**: ${verificationResults.length}\n\n`;
12661264

12671265
// Ready for Verification section with asset links
@@ -1363,35 +1361,39 @@ function generateMarkdownReport(verificationResults) {
13631361

13641362
if (highLiquidityFailing.length > 0) {
13651363
markdown += `These assets have sufficient pool liquidity ($1000+) but fail other checks:\n\n`;
1366-
markdown += `| Asset | Comment | Pool Liquidity | Bid Depth | Other Failures |\n`;
1367-
markdown += `|-------|---------|----------------|-----------|----------------|\n`;
1364+
markdown += `| Asset | Comment | Pool Liquidity | Failure Reasons |\n`;
1365+
markdown += `|-------|---------|----------------|----------------|\n`;
13681366

13691367
highLiquidityFailing.forEach(r => {
13701368
const symbol = r.comment || r.base_denom.substring(0, 30);
13711369
// Extract just the liquidity amount from the details string
13721370
const liqMatch = r.checks.poolLiquidity?.details?.match(/\$[\d,]+/);
13731371
const poolLiq = liqMatch ? liqMatch[0] : 'N/A';
13741372

1375-
// Format bid depth
1376-
let bidDepth = '';
1377-
if (r.checks.bidDepth?.passed) {
1378-
bidDepth = '✅ ' + r.checks.bidDepth.details;
1379-
} else {
1380-
const details = r.checks.bidDepth?.details || 'Failed';
1373+
// Collect all failure reasons
1374+
const failureReasons = [];
1375+
1376+
// Add bid depth if it failed
1377+
if (!r.checks.bidDepth?.passed) {
1378+
const details = r.checks.bidDepth?.details || 'Bid depth failed';
13811379
const cleanDetails = details
13821380
.replace(//g, '')
13831381
.replace(//g, '')
13841382
.replace(/\(need \$\d+\)/g, '')
13851383
.trim();
1386-
bidDepth = '❌ ' + cleanDetails;
1384+
failureReasons.push(`Bid depth: ${cleanDetails}`);
13871385
}
13881386

1387+
// Add other failures
13891388
const otherFails = Object.entries(r.checks)
13901389
.filter(([name, check]) => !check.passed && !check.skipped && name !== 'poolLiquidity' && name !== 'bidDepth')
1391-
.map(([name]) => name.replace(/([A-Z])/g, ' $1').trim())
1392-
.join(', ') || 'None';
1390+
.map(([name]) => name.replace(/([A-Z])/g, ' $1').trim());
1391+
1392+
failureReasons.push(...otherFails);
1393+
1394+
const failureReasonsText = failureReasons.length > 0 ? failureReasons.join(', ') : 'None';
13931395

1394-
markdown += `| ${symbol} | ${r.chain_name} | ${poolLiq} | ${bidDepth} | ${otherFails} |\n`;
1396+
markdown += `| ${symbol} | ${r.chain_name} | ${poolLiq} | ${failureReasonsText} |\n`;
13951397
});
13961398
markdown += '\n';
13971399
} else {
@@ -1478,6 +1480,24 @@ function generateMarkdownReport(verificationResults) {
14781480
} else {
14791481
markdown += `No logo failures detected. All assets have valid logos that meet the requirements.\n\n`;
14801482
}
1483+
1484+
// Killed Chain Assets subsection
1485+
markdown += `### Killed Chain Assets\n\n`;
1486+
1487+
if (killedChainAssetsVerified.length > 0) {
1488+
markdown += `These verified assets belong to killed chains and can be de-verified (excluding meme tokens):\n\n`;
1489+
markdown += `| Asset | Chain | Base Denom | Comment |\n`;
1490+
markdown += `|-------|-------|------------|----------|\n`;
1491+
1492+
killedChainAssetsVerified.forEach(r => {
1493+
const symbol = r.comment || r.base_denom.substring(0, 40);
1494+
markdown += `| ${symbol} | ${r.chain_name} | \`${r.base_denom}\` | ${r.comment || 'N/A'} |\n`;
1495+
});
1496+
markdown += '\n';
1497+
markdown += `**Note:** Meme tokens are exempt from this requirement and may remain verified on killed chains due to their historical/cultural value.\n\n`;
1498+
} else {
1499+
markdown += `No verified assets from killed chains detected. All verified assets belong to active chains.\n\n`;
1500+
}
14811501
} else {
14821502
markdown += `All assets pass verification checks!\n\n`;
14831503
}
@@ -1503,51 +1523,14 @@ function generateMarkdownReport(verificationResults) {
15031523
});
15041524
}
15051525

1506-
// Killed Chain Assets Section
1507-
if (killedChainAssetsVerified.length > 0 || killedChainAssetsUnverified.length > 0) {
1508-
markdown += `## ⚠️ Killed Chain Assets Requiring De-verification\n\n`;
1509-
markdown += `Assets from chains marked as "killed" in the chain registry (excluding meme tokens):\n\n`;
1510-
1511-
// Currently Verified subsection
1512-
if (killedChainAssetsVerified.length > 0) {
1513-
markdown += `### Currently Verified (${killedChainAssetsVerified.length})\n\n`;
1514-
markdown += `These verified assets belong to killed chains and should be de-verified:\n\n`;
1515-
markdown += `| Asset | Chain | Base Denom | Comment |\n`;
1516-
markdown += `|-------|-------|------------|----------|\n`;
1517-
1518-
killedChainAssetsVerified.forEach(r => {
1519-
const symbol = r.comment || r.base_denom.substring(0, 40);
1520-
markdown += `| ${symbol} | ${r.chain_name} | \`${r.base_denom}\` | ${r.comment || 'N/A'} |\n`;
1521-
});
1522-
markdown += '\n';
1523-
}
1524-
1525-
// Unverified subsection
1526-
if (killedChainAssetsUnverified.length > 0) {
1527-
markdown += `### Unverified (${killedChainAssetsUnverified.length})\n\n`;
1528-
markdown += `These unverified assets belong to killed chains and cannot be verified:\n\n`;
1529-
markdown += `| Asset | Chain | Base Denom | Comment |\n`;
1530-
markdown += `|-------|-------|------------|----------|\n`;
1531-
1532-
killedChainAssetsUnverified.forEach(r => {
1533-
const symbol = r.comment || r.base_denom.substring(0, 40);
1534-
markdown += `| ${symbol} | ${r.chain_name} | \`${r.base_denom}\` | ${r.comment || 'N/A'} |\n`;
1535-
});
1536-
markdown += '\n';
1537-
}
1538-
1539-
markdown += `**Note:** Meme tokens are exempt from this requirement and may remain verified on killed chains due to their historical/cultural value.\n\n`;
1540-
}
1541-
15421526
return markdown;
15431527
}
15441528

15451529
function generateJSONReport(verificationResults) {
15461530
const failedChecks = verificationResults.filter(r => !r.allChecksPassed && !r.currently_verified);
15471531

1548-
// Filter killed chain assets (excluding meme tokens)
1532+
// Filter killed chain assets (excluding meme tokens) - only verified assets that may need de-verification
15491533
const killedChainAssetsVerified = verificationResults.filter(r => r.chainIsKilled && r.currently_verified && !r.is_meme);
1550-
const killedChainAssetsUnverified = verificationResults.filter(r => r.chainIsKilled && !r.currently_verified && !r.is_meme);
15511534

15521535
// Calculate failure breakdown
15531536
const failureCounts = {
@@ -1609,30 +1592,20 @@ function generateJSONReport(verificationResults) {
16091592
readyForVerification: verificationResults.filter(r => r.readyForVerification).length,
16101593
alreadyVerified: verificationResults.filter(r => r.currently_verified).length,
16111594
failedChecks: failedChecks.length,
1612-
killedChainAssetsVerified: killedChainAssetsVerified.length,
1613-
killedChainAssetsUnverified: killedChainAssetsUnverified.length,
1595+
killedChainAssets: killedChainAssetsVerified.length,
16141596
totalChecked: verificationResults.length
16151597
},
16161598
analysis: {
16171599
failureBreakdown,
16181600
socialsFailureReasons,
16191601
highLiquidityFailing,
1620-
killedChainAssets: {
1621-
verified: killedChainAssetsVerified.map(r => ({
1622-
chain_name: r.chain_name,
1623-
base_denom: r.base_denom,
1624-
comment: r.comment,
1625-
is_meme: r.is_meme,
1626-
chainIsKilled: r.chainIsKilled
1627-
})),
1628-
unverified: killedChainAssetsUnverified.map(r => ({
1629-
chain_name: r.chain_name,
1630-
base_denom: r.base_denom,
1631-
comment: r.comment,
1632-
is_meme: r.is_meme,
1633-
chainIsKilled: r.chainIsKilled
1634-
}))
1635-
}
1602+
killedChainAssets: killedChainAssetsVerified.map(r => ({
1603+
chain_name: r.chain_name,
1604+
base_denom: r.base_denom,
1605+
comment: r.comment,
1606+
is_meme: r.is_meme,
1607+
chainIsKilled: r.chainIsKilled
1608+
}))
16361609
},
16371610
results: verificationResults
16381611
}, null, 2);

0 commit comments

Comments
 (0)