-
Notifications
You must be signed in to change notification settings - Fork 0
AST #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
AST #6
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
12a2ef3
feat: Unificar ecosistema A-Suite — Exchange, Token Specs, Gallery y …
devin-ai-integration[bot] 551b880
ci: add GitHub Actions workflows — contracts CI, frontend CI and depl…
jacxas a9a078b
fix: add netlify.toml for proper Vite/React build config
jacxas bd9545a
perf: optimize token images WebP 256x256 (21.8 MB → 156 KB, -99%)
jacxas 3f023d9
perf: update token img refs from .jpg to .webp
jacxas b6f2e01
Modify Vercel configuration for build process
jacxas 1bc09af
Merge branch 'devin/1777362210-unify-a-suite' into master
jacxas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # GitHub Actions — Secrets necesarios | ||
|
|
||
| Configurá estos secrets en **Settings → Secrets and variables → Actions** de tu repo. | ||
|
|
||
| ## Secrets requeridos | ||
|
|
||
| | Secret | Descripción | Usado en | | ||
| |--------|-------------|----------| | ||
| | `SEPOLIA_RPC_URL` | URL de Alchemy/Infura para Sepolia | `deploy-sepolia.yml` | | ||
| | `DEPLOYER_PRIVATE_KEY` | Clave privada del wallet deployer (sin `0x`) | `deploy-sepolia.yml` | | ||
| | `ETHERSCAN_API_KEY` | API key de Etherscan para verificar contratos | `deploy-sepolia.yml`, `contracts-ci.yml` | | ||
| | `VITE_WALLETCONNECT_PROJECT_ID` | Project ID de WalletConnect Cloud | `frontend-ci.yml` | | ||
|
|
||
| ## Secrets opcionales | ||
|
|
||
| | Secret | Descripción | Usado en | | ||
| |--------|-------------|----------| | ||
| | `VITE_SEPOLIA_RPC_URL` | RPC para el frontend (puede ser público) | `frontend-ci.yml` | | ||
| | `POLYGONSCAN_API_KEY` | API key de Polygonscan | futuro | | ||
|
|
||
| ## Cómo obtenerlos | ||
|
|
||
| - **SEPOLIA_RPC_URL**: [Alchemy](https://alchemy.com) → Create App → Ethereum Sepolia → `https://eth-sepolia.g.alchemy.com/v2/TU_KEY` | ||
| - **DEPLOYER_PRIVATE_KEY**: MetaMask → Account details → Export private key (usá una wallet dedicada solo a deploy, nunca tu wallet principal) | ||
| - **ETHERSCAN_API_KEY**: [etherscan.io/myapikey](https://etherscan.io/myapikey) | ||
| - **VITE_WALLETCONNECT_PROJECT_ID**: [cloud.walletconnect.com](https://cloud.walletconnect.com) | ||
|
|
||
| ## Environment "sepolia" | ||
|
|
||
| El workflow `deploy-sepolia.yml` usa el environment `sepolia`. Crealo en: | ||
| **Settings → Environments → New environment → `sepolia`** | ||
|
|
||
| Podés configurar "Required reviewers" para que el deploy requiera aprobación manual tuya antes de ejecutarse. | ||
|
|
||
| > ⚠️ NUNCA commitees tu `PRIVATE_KEY` directamente en ningún archivo del repo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| name: Contracts CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master, main, develop] | ||
| paths: | ||
| - 'contracts/**' | ||
| - 'test/**' | ||
| - 'scripts/**' | ||
| - 'hardhat.config.js' | ||
| - 'package.json' | ||
| pull_request: | ||
| branches: [master, main, develop] | ||
| paths: | ||
| - 'contracts/**' | ||
| - 'test/**' | ||
| - 'scripts/**' | ||
| - 'hardhat.config.js' | ||
| - 'package.json' | ||
|
|
||
| jobs: | ||
| # ───────────────────────────────────────────── | ||
| # 1. Compile + Test (Hardhat local network) | ||
| # ───────────────────────────────────────────── | ||
| test: | ||
| name: Compile & Test Contracts | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Compile contracts | ||
| run: npm run compile | ||
|
|
||
| - name: Run tests | ||
| run: npm test | ||
| env: | ||
| # No RPC key needed — runs on Hardhat local node | ||
| REPORT_GAS: true | ||
|
|
||
| - name: Upload artifacts (ABIs) | ||
| uses: actions/upload-artifact@v4 | ||
| if: success() | ||
| with: | ||
| name: contract-artifacts | ||
| path: artifacts/ | ||
| retention-days: 7 | ||
|
|
||
| # ───────────────────────────────────────────── | ||
| # 2. Coverage report | ||
| # ───────────────────────────────────────────── | ||
| coverage: | ||
| name: Solidity Coverage | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run coverage | ||
| run: npm run coverage | ||
|
|
||
| - name: Upload coverage report | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: coverage-report | ||
| path: coverage/ | ||
| retention-days: 14 | ||
|
|
||
| # ───────────────────────────────────────────── | ||
| # 3. Static analysis with Slither (security) | ||
| # ───────────────────────────────────────────── | ||
| slither: | ||
| name: Slither Static Analysis | ||
| runs-on: ubuntu-latest | ||
| needs: test | ||
| continue-on-error: true # No bloquea el merge mientras ajustamos findings | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Compile contracts (needed for Slither) | ||
| run: npm run compile | ||
|
|
||
| - name: Run Slither | ||
| uses: crytic/slither-action@v0.4.0 | ||
| with: | ||
| target: 'contracts/' | ||
| slither-args: '--exclude-dependencies' | ||
| sarif: results.sarif | ||
| fail-on: high | ||
|
|
||
| - name: Upload SARIF to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| if: always() | ||
| with: | ||
| sarif_file: results.sarif | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| name: Deploy to Sepolia | ||
|
|
||
| # Solo se dispara de forma MANUAL desde la pestaña Actions | ||
| # (workflow_dispatch) o cuando pusheás un tag con formato v*.*.* | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| contract: | ||
|
jacxas marked this conversation as resolved.
|
||
| description: 'Contrato a deployar' | ||
| required: true | ||
| default: 'all' | ||
| type: choice | ||
| options: | ||
| - all | ||
| - AdvancedToken | ||
| - NFTCollection | ||
| - NFTMarketplace | ||
| - MinerToken | ||
| - CSUITEFaucet | ||
| - GasAccumulator | ||
| dry_run: | ||
| description: 'Dry run (solo simula, no deploya)' | ||
| required: false | ||
| default: false | ||
| type: boolean | ||
|
|
||
| push: | ||
| tags: | ||
| - 'v*.*.*' # Ej: v1.0.0 → deploy automático a Sepolia | ||
|
|
||
| jobs: | ||
| deploy: | ||
| name: Deploy Contracts → Sepolia | ||
| runs-on: ubuntu-latest | ||
| environment: sepolia # Requiere aprobación manual si configurás "Required reviewers" | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Compile contracts | ||
| run: npm run compile | ||
|
|
||
| - name: Run tests before deploy | ||
| run: npm test | ||
|
|
||
| - name: Deploy to Sepolia | ||
| if: ${{ github.event.inputs.dry_run != 'true' }} | ||
| run: npm run deploy:sepolia | ||
| env: | ||
| SEPOLIA_RPC_URL: ${{ secrets.SEPOLIA_RPC_URL }} | ||
| PRIVATE_KEY: ${{ secrets.DEPLOYER_PRIVATE_KEY }} | ||
| ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
|
|
||
| - name: Dry run info | ||
| if: ${{ github.event.inputs.dry_run == 'true' }} | ||
| run: echo "DRY RUN — Deploy simulado correctamente. No se ejecutó ninguna tx." | ||
|
|
||
| - name: Verify contracts on Etherscan | ||
| if: ${{ github.event.inputs.dry_run != 'true' }} | ||
| run: | | ||
| echo "Verificando contratos en Etherscan..." | ||
| # Descomentar cuando tengas las addresses desplegadas: | ||
| # npx hardhat verify --network sepolia $CONTRACT_ADDRESS | ||
| env: | ||
| ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | ||
| continue-on-error: true | ||
|
|
||
| - name: Upload deployment artifacts | ||
| uses: actions/upload-artifact@v4 | ||
| if: always() | ||
| with: | ||
| name: deployment-${{ github.sha }} | ||
| path: | | ||
| artifacts/ | ||
| deployments/ | ||
| retention-days: 30 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| name: Frontend CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [master, main, develop] | ||
| paths: | ||
| - 'frontend/**' | ||
| pull_request: | ||
| branches: [master, main, develop] | ||
| paths: | ||
| - 'frontend/**' | ||
|
|
||
| jobs: | ||
| # ───────────────────────────────────────────── | ||
| # 1. Build check | ||
| # ───────────────────────────────────────────── | ||
| build: | ||
| name: Vite Build | ||
| runs-on: ubuntu-latest | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: frontend/package.json | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| - name: Build | ||
| run: npm run build | ||
| env: | ||
| # Variables de entorno mínimas para que Vite compile sin errores | ||
| VITE_WALLETCONNECT_PROJECT_ID: ${{ secrets.VITE_WALLETCONNECT_PROJECT_ID }} | ||
| VITE_SEPOLIA_RPC_URL: ${{ secrets.VITE_SEPOLIA_RPC_URL || 'https://rpc.sepolia.org' }} | ||
|
|
||
| - name: Upload build artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: frontend-dist | ||
| path: frontend/dist/ | ||
| retention-days: 7 | ||
|
|
||
| # ───────────────────────────────────────────── | ||
| # 2. Lint (ESLint) — corre en paralelo con build | ||
| # ───────────────────────────────────────────── | ||
| lint: | ||
| name: ESLint | ||
| runs-on: ubuntu-latest | ||
|
|
||
| defaults: | ||
| run: | ||
| working-directory: frontend | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Node.js 20 | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
| cache: 'npm' | ||
| cache-dependency-path: frontend/package.json | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install | ||
|
|
||
| # Si aún no tenés ESLint config, este step falla silenciosamente | ||
| - name: Run ESLint | ||
| run: npx eslint src/ --ext .js,.jsx --max-warnings 0 || echo "::warning::ESLint no configurado — agregá .eslintrc.json" | ||
| continue-on-error: true |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.