Skip to content

Commit a6e64eb

Browse files
author
M0nkeyFl0wer
committed
fix: migrate 40 projects to new schema (project_status + ecosystem)
Fixes two schema validation issues affecting 40 legacy projects: 1. Missing required project_status fields: - Added live_status (boolean) - Added testnet (boolean) - Added mainnet (boolean) 2. Ecosystem capitalization mismatch: - Changed ecosystem values to lowercase (e.g., "Ethereum" → "ethereum") - Schema requires lowercase ecosystem names Migration logic: - Projects with version "Mainnet" → mainnet: true, live_status: true - Ecosystem values mapped to allowed lowercase values - Unknown ecosystems default to "other" Fixes failing tests in PRs #2000, #2004, #2006, #2007 Test results: 40/40 projects successfully migrated Projects affected: fileverse, mysterium-network, elusiv, zkvote, starkex, hopr, deeper-network, firo, oasis-network, zcash, privatepool, tornado-cash, iden3, circom, zksync, darkfi, sentinel, snarkjs, findora, cake-wallet, typhoon-network, iron-fish, concordium, zk-money, suterusu, oxen, orchid, rotki, mobilecoin, sienna-network, monero, zano, zeal, xx-network, mask-network, fluidkey, webb-protocol, wasabi-wallet, semaphore, incognito
1 parent c7cb78e commit a6e64eb

File tree

41 files changed

+403
-168
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+403
-168
lines changed

migrate-project-status.mjs

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
#!/usr/bin/env node
2+
/**
3+
* Migration script to add missing project_status fields and fix ecosystem capitalization
4+
* Fixes schema validation errors for legacy projects
5+
*/
6+
7+
import { readFile, writeFile } from 'fs/promises';
8+
import { parse, stringify } from 'yaml';
9+
import { join } from 'path';
10+
11+
// List of 40 failing projects from test output
12+
const failingProjects = [
13+
'fileverse', 'mysterium-network', 'elusiv', 'zkvote', 'starkex', 'hopr',
14+
'deeper-network', 'firo', 'oasis-network', 'zcash', 'privatepool',
15+
'tornado-cash', 'iden3', 'circom', 'zksync', 'darkfi', 'sentinel',
16+
'snarkjs', 'findora', 'cake-wallet', 'typhoon-network', 'iron-fish',
17+
'concordium', 'zk-money', 'suterusu', 'oxen', 'orchid', 'rotki',
18+
'mobilecoin', 'sienna-network', 'monero', 'zano', 'zeal', 'xx-network',
19+
'mask-network', 'fluidkey', 'webb-protocol', 'wasabi-wallet', 'semaphore',
20+
'incognito'
21+
];
22+
23+
async function migrateProject(projectName) {
24+
const filePath = join('src/projects', projectName, 'index.yaml');
25+
26+
try {
27+
// Read the YAML file
28+
const content = await readFile(filePath, 'utf8');
29+
const data = parse(content);
30+
31+
// Skip if already migrated
32+
if (data.project_status?.live_status !== undefined) {
33+
console.log(`✓ ${projectName}: Already migrated`);
34+
return { status: 'skipped', project: projectName };
35+
}
36+
37+
// Determine values based on current version field
38+
const version = data.project_status?.version || '';
39+
let mainnet = false;
40+
let testnet = false;
41+
let live_status = false;
42+
43+
if (version.toLowerCase().includes('mainnet')) {
44+
mainnet = true;
45+
live_status = true;
46+
} else if (version.toLowerCase().includes('testnet')) {
47+
testnet = true;
48+
live_status = true;
49+
}
50+
51+
// Update project_status with new required fields
52+
data.project_status = {
53+
live_status,
54+
version: data.project_status?.version || '',
55+
testnet,
56+
mainnet,
57+
...data.project_status
58+
};
59+
60+
// Fix ecosystem capitalization (must be lowercase)
61+
if (data.ecosystem && Array.isArray(data.ecosystem)) {
62+
data.ecosystem = data.ecosystem.map(eco => {
63+
const lower = eco.toLowerCase();
64+
// Map known ecosystem names
65+
const ecosystemMap = {
66+
'ethereum': 'ethereum',
67+
'bitcoin': 'bitcoin',
68+
'solana': 'solana',
69+
'cosmos': 'cosmos',
70+
'monero': 'monero',
71+
'litecoin': 'litecoin',
72+
'haven': 'haven',
73+
'multichain': 'multichain'
74+
};
75+
return ecosystemMap[lower] || 'other';
76+
});
77+
}
78+
79+
// Write back to file, preserving YAML formatting
80+
const newContent = stringify(data, {
81+
lineWidth: 0, // Don't wrap lines
82+
indent: 2
83+
});
84+
85+
await writeFile(filePath, newContent, 'utf8');
86+
console.log(`✓ ${projectName}: Migrated (mainnet: ${mainnet}, testnet: ${testnet}, live: ${live_status})`);
87+
88+
return { status: 'success', project: projectName, mainnet, testnet, live_status };
89+
} catch (error) {
90+
console.error(`✗ ${projectName}: Error - ${error.message}`);
91+
return { status: 'error', project: projectName, error: error.message };
92+
}
93+
}
94+
95+
async function main() {
96+
console.log('Starting migration of 40 projects...\n');
97+
98+
const results = await Promise.all(
99+
failingProjects.map(project => migrateProject(project))
100+
);
101+
102+
// Summary
103+
const success = results.filter(r => r.status === 'success').length;
104+
const skipped = results.filter(r => r.status === 'skipped').length;
105+
const errors = results.filter(r => r.status === 'error').length;
106+
107+
console.log('\n' + '='.repeat(50));
108+
console.log('Migration Summary:');
109+
console.log(` ✓ Success: ${success}`);
110+
console.log(` - Skipped: ${skipped}`);
111+
console.log(` ✗ Errors: ${errors}`);
112+
console.log('='.repeat(50));
113+
114+
if (errors > 0) {
115+
console.log('\nErrors occurred in:');
116+
results.filter(r => r.status === 'error').forEach(r => {
117+
console.log(` - ${r.project}: ${r.error}`);
118+
});
119+
process.exit(1);
120+
}
121+
122+
console.log('\nMigration completed successfully!');
123+
}
124+
125+
main().catch(error => {
126+
console.error('Fatal error:', error);
127+
process.exit(1);
128+
});

src/projects/cake-wallet/index.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
name: Cake Wallet
22
categories:
3-
- wallets
3+
- wallets
44
ecosystem:
5-
- Ethereum
6-
- Monero
7-
- Litecoin
8-
- Haven
5+
- ethereum
6+
- monero
7+
- litecoin
8+
- haven
99
usecases:
10-
- Wallet
11-
description: Open-source, non-custodial, privacy-focused multi-currency cryptocurrency
12-
wallet supporting Monero, Bitcoin, Ethereum, Litecoin, and other cryptocurrencies.
13-
Features built-in exchange, native Tor i...
14-
product_launch_day: '2018-01-01'
10+
- Wallet
11+
description: Open-source, non-custodial, privacy-focused multi-currency cryptocurrency wallet supporting Monero, Bitcoin, Ethereum, Litecoin, and other cryptocurrencies. Features built-in exchange, native Tor i...
12+
product_launch_day: 2018-01-01
1513
team:
1614
anonymous: false
1715
teammembers:
18-
- name: Vikrant Sharma
19-
link: https://www.linkedin.com/company/cakewallet
20-
role: Founder & CEO
16+
- name: Vikrant Sharma
17+
link: https://www.linkedin.com/company/cakewallet
18+
role: Founder & CEO
2119
links:
2220
web: https://cakewallet.com
2321
github: https://github.com/cake-tech/cake_wallet
@@ -28,7 +26,10 @@ links:
2826
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/cake-wallet/reports/SECURITY.md
2927
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/cake-wallet/reports/TECHNICAL.md
3028
project_status:
29+
live_status: true
3130
version: Mainnet
31+
testnet: false
32+
mainnet: true
3233
sunset: false
3334
blockchain_features:
3435
opensource: true

src/projects/circom/index.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: Circom
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
8-
description: Circom is a specialized compiler and circuit description language for
9-
building zero-knowledge proof applications. Written in Rust, it enables developers
10-
to design arithmetic circuits that are compi...
7+
- Privacy
8+
description: Circom is a specialized compiler and circuit description language for building zero-knowledge proof applications. Written in Rust, it enables developers to design arithmetic circuits that are compi...
119
team:
1210
anonymous: true
1311
links:
@@ -18,7 +16,10 @@ links:
1816
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/circom/reports/technical_analysis.md
1917
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/circom/README.md
2018
project_status:
19+
live_status: true
2120
version: Mainnet
21+
testnet: false
22+
mainnet: true
2223
sunset: false
2324
blockchain_features:
2425
opensource: true

src/projects/concordium/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Concordium
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: The main concordium node implementation.
99
team:
1010
anonymous: true
@@ -15,7 +15,10 @@ links:
1515
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/concordium/reports/SECURITY.md
1616
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/concordium/README.md
1717
project_status:
18+
live_status: true
1819
version: Mainnet
20+
testnet: false
21+
mainnet: true
1922
sunset: false
2023
blockchain_features:
2124
opensource: true

src/projects/darkfi/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Darkfi
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: Anonymous. Uncensored. Sovereign.
99
team:
1010
anonymous: true
@@ -15,7 +15,10 @@ links:
1515
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/darkfi/reports/SECURITY.md
1616
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/darkfi/README.md
1717
project_status:
18+
live_status: true
1819
version: Mainnet
20+
testnet: false
21+
mainnet: true
1922
sunset: false
2023
blockchain_features:
2124
opensource: true

src/projects/deeper-network/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Deeper Network
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: deeper chain is the blockchain layer for deeper network.
99
team:
1010
anonymous: true
@@ -14,7 +14,10 @@ links:
1414
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/deeper-network/reports/SECURITY.md
1515
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/deeper-network/README.md
1616
project_status:
17+
live_status: true
1718
version: Mainnet
19+
testnet: false
20+
mainnet: true
1821
sunset: false
1922
blockchain_features:
2023
opensource: true

src/projects/elusiv/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Elusiv
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: Elusiv Solana program library
99
team:
1010
anonymous: true
@@ -15,7 +15,10 @@ links:
1515
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/elusiv/reports/SECURITY.md
1616
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/elusiv/README.md
1717
project_status:
18+
live_status: true
1819
version: Mainnet
20+
testnet: false
21+
mainnet: true
1922
sunset: false
2023
blockchain_features:
2124
opensource: true

src/projects/fileverse/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Fileverse
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: Privacy technology project focused on Web3 security and anonymity.
99
team:
1010
anonymous: true
@@ -16,7 +16,10 @@ links:
1616
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/fileverse/reports/technical_analysis.md
1717
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/fileverse/README.md
1818
project_status:
19+
live_status: true
1920
version: Mainnet
21+
testnet: false
22+
mainnet: true
2023
sunset: false
2124
blockchain_features:
2225
opensource: true

src/projects/findora/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Findora
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: Official Implementation of Findora Network.
99
team:
1010
anonymous: true
@@ -15,7 +15,10 @@ links:
1515
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/findora/reports/SECURITY.md
1616
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/findora/README.md
1717
project_status:
18+
live_status: true
1819
version: Mainnet
20+
testnet: false
21+
mainnet: true
1922
sunset: false
2023
blockchain_features:
2124
opensource: true

src/projects/firo/index.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Firo
22
categories:
3-
- infrastructure
3+
- infrastructure
44
ecosystem:
5-
- Ethereum
5+
- ethereum
66
usecases:
7-
- Privacy
7+
- Privacy
88
description: The privacy-focused cryptocurrency
99
team:
1010
anonymous: true
@@ -15,7 +15,10 @@ links:
1515
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/firo/reports/SECURITY.md
1616
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/firo/README.md
1717
project_status:
18+
live_status: true
1819
version: Mainnet
20+
testnet: false
21+
mainnet: true
1922
sunset: false
2023
blockchain_features:
2124
opensource: true

0 commit comments

Comments
 (0)