Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
137 changes: 137 additions & 0 deletions migrate-project-status.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
#!/usr/bin/env node
/**
* Migration script to add missing project_status fields and fix capitalization
* Fixes schema validation errors for legacy projects
*/

import { readFile, writeFile } from 'fs/promises';
import { parse, stringify } from 'yaml';
import { join } from 'path';

// List of 40 failing projects from test output
const failingProjects = [
'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'
];

async function migrateProject(projectName) {
const filePath = join('src/projects', projectName, 'index.yaml');

try {
// Read the YAML file
const content = await readFile(filePath, 'utf8');
const data = parse(content);

// Skip if already migrated
if (data.project_status?.live_status !== undefined) {
console.log(`✓ ${projectName}: Already migrated`);
return { status: 'skipped', project: projectName };
}

// Determine values based on current version field
const version = data.project_status?.version || '';
let mainnet = false;
let testnet = false;
let live_status = false;

if (version.toLowerCase().includes('mainnet')) {
mainnet = true;
live_status = true;
} else if (version.toLowerCase().includes('testnet')) {
testnet = true;
live_status = true;
}

// Update project_status with new required fields
data.project_status = {
live_status,
version: data.project_status?.version || '',
testnet,
mainnet,
...data.project_status
};

// Fix ecosystem capitalization (must be lowercase)
if (data.ecosystem && Array.isArray(data.ecosystem)) {
data.ecosystem = data.ecosystem.map(eco => {
const lower = eco.toLowerCase();
// Map known ecosystem names
const ecosystemMap = {
'ethereum': 'ethereum',
'bitcoin': 'bitcoin',
'solana': 'solana',
'cosmos': 'cosmos',
'monero': 'monero',
'litecoin': 'litecoin',
'haven': 'haven',
'multichain': 'multichain'
};
return ecosystemMap[lower] || 'other';
});
}

// Fix usecases capitalization (must be lowercase)
if (data.usecases && Array.isArray(data.usecases)) {
data.usecases = data.usecases.map(usecase => {
const lower = usecase.toLowerCase();
// Map known usecase values - just lowercase them all
return lower;
});
}

// Write back to file, preserving YAML formatting
const newContent = stringify(data, {
lineWidth: 0, // Don't wrap lines
indent: 2
});

await writeFile(filePath, newContent, 'utf8');
console.log(`✓ ${projectName}: Migrated (mainnet: ${mainnet}, testnet: ${testnet}, live: ${live_status})`);

return { status: 'success', project: projectName, mainnet, testnet, live_status };
} catch (error) {
console.error(`✗ ${projectName}: Error - ${error.message}`);
return { status: 'error', project: projectName, error: error.message };
}
}

async function main() {
console.log('Starting migration of 40 projects...\n');

const results = await Promise.all(
failingProjects.map(project => migrateProject(project))
);

// Summary
const success = results.filter(r => r.status === 'success').length;
const skipped = results.filter(r => r.status === 'skipped').length;
const errors = results.filter(r => r.status === 'error').length;

console.log('\n' + '='.repeat(50));
console.log('Migration Summary:');
console.log(` ✓ Success: ${success}`);
console.log(` - Skipped: ${skipped}`);
console.log(` ✗ Errors: ${errors}`);
console.log('='.repeat(50));

if (errors > 0) {
console.log('\nErrors occurred in:');
results.filter(r => r.status === 'error').forEach(r => {
console.log(` - ${r.project}: ${r.error}`);
});
process.exit(1);
}

console.log('\nMigration completed successfully!');
}

main().catch(error => {
console.error('Fatal error:', error);
process.exit(1);
});
27 changes: 14 additions & 13 deletions src/projects/cake-wallet/index.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,21 @@
name: Cake Wallet
categories:
- wallets
- wallets
ecosystem:
- Ethereum
- Monero
- Litecoin
- Haven
- ethereum
- monero
- litecoin
- haven
usecases:
- Wallet
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...
product_launch_day: '2018-01-01'
- wallet
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...
product_launch_day: 2018-01-01
team:
anonymous: false
teammembers:
- name: Vikrant Sharma
link: https://www.linkedin.com/company/cakewallet
role: Founder & CEO
- name: Vikrant Sharma
link: https://www.linkedin.com/company/cakewallet
role: Founder & CEO
links:
web: https://cakewallet.com
github: https://github.com/cake-tech/cake_wallet
Expand All @@ -28,7 +26,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/cake-wallet/reports/SECURITY.md
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/cake-wallet/reports/TECHNICAL.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
13 changes: 7 additions & 6 deletions src/projects/circom/index.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Circom
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
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...
- privacy
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...
team:
anonymous: true
links:
Expand All @@ -18,7 +16,10 @@ links:
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/circom/reports/technical_analysis.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/circom/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/concordium/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Concordium
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: The main concordium node implementation.
team:
anonymous: true
Expand All @@ -15,7 +15,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/concordium/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/concordium/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/darkfi/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Darkfi
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: Anonymous. Uncensored. Sovereign.
team:
anonymous: true
Expand All @@ -15,7 +15,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/darkfi/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/darkfi/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/deeper-network/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Deeper Network
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: deeper chain is the blockchain layer for deeper network.
team:
anonymous: true
Expand All @@ -14,7 +14,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/deeper-network/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/deeper-network/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/elusiv/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Elusiv
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: Elusiv Solana program library
team:
anonymous: true
Expand All @@ -15,7 +15,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/elusiv/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/elusiv/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/fileverse/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Fileverse
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: Privacy technology project focused on Web3 security and anonymity.
team:
anonymous: true
Expand All @@ -16,7 +16,10 @@ links:
technical_docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/fileverse/reports/technical_analysis.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/fileverse/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/findora/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Findora
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: Official Implementation of Findora Network.
team:
anonymous: true
Expand All @@ -15,7 +15,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/findora/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/findora/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
9 changes: 6 additions & 3 deletions src/projects/firo/index.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Firo
categories:
- infrastructure
- infrastructure
ecosystem:
- Ethereum
- ethereum
usecases:
- Privacy
- privacy
description: The privacy-focused cryptocurrency
team:
anonymous: true
Expand All @@ -15,7 +15,10 @@ links:
security_report: https://github.com/web3privacy/explorer-data/blob/main/src/projects/firo/reports/SECURITY.md
docs: https://github.com/web3privacy/explorer-data/blob/main/src/projects/firo/README.md
project_status:
live_status: true
version: Mainnet
testnet: false
mainnet: true
sunset: false
blockchain_features:
opensource: true
Expand Down
Loading
Loading