Files
smom-dbis-138/.github/workflows/validate-token-list.yml
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

75 lines
2.5 KiB
YAML

name: Validate Token List
on:
push:
paths:
- 'metamask/token-list.json'
- '.github/workflows/validate-token-list.yml'
pull_request:
paths:
- 'metamask/token-list.json'
- '.github/workflows/validate-token-list.yml'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: |
npm install -g ajv-cli
- name: Validate JSON schema
run: |
ajv validate -s metamask/token-list.schema.json -d metamask/token-list.json
- name: Validate token addresses
run: |
node -e "
const fs = require('fs');
const list = JSON.parse(fs.readFileSync('metamask/token-list.json', 'utf8'));
const addressRegex = /^0x[a-fA-F0-9]{40}$/;
list.tokens.forEach((token, i) => {
if (!addressRegex.test(token.address)) {
throw new Error(\`Token \${i}: Invalid address format: \${token.address}\`);
}
if (token.chainId !== 138) {
throw new Error(\`Token \${i}: Invalid chainId: \${token.chainId}\`);
}
if (token.decimals < 0 || token.decimals > 18) {
throw new Error(\`Token \${i}: Invalid decimals: \${token.decimals}\`);
}
});
console.log('Token list validation passed');
"
- name: Check logo availability
run: |
node -e "
const fs = require('fs');
const https = require('https');
const list = JSON.parse(fs.readFileSync('metamask/token-list.json', 'utf8'));
const promises = [];
if (list.logoURI) promises.push(checkUrl(list.logoURI));
list.tokens.forEach(token => {
if (token.logoURI) promises.push(checkUrl(token.logoURI));
});
Promise.all(promises).then(() => console.log('Logo URLs validated'));
function checkUrl(url) {
return new Promise((resolve, reject) => {
https.get(url, (res) => {
if (res.statusCode === 200) resolve();
else reject(new Error(\`Failed to fetch \${url}: \${res.statusCode}\`));
}).on('error', reject);
});
}
" || echo "Warning: Logo URL validation failed (may be expected for local development)"