From 383558ac32a420a140ae7e763a99b64383aebdb5 Mon Sep 17 00:00:00 2001 From: William Mccoy <119138354+MastaTrill@users.noreply.github.com> Date: Sun, 21 Dec 2025 06:48:56 -0800 Subject: [PATCH 01/16] Fix react version for deployment --- .circleci/config.yml | 14 + .env | 5 + .env.example | 7 + .vscode/settings.json | 7 + ADD_TOKEN_TO_METAMASK.md | 29 + Aetheron_platform_fixes.ipynb | 136 + CONTRACT_ADDRESSES.md | 6 +- LICENSE | 22 +- Scripts/deploy.js | 2 +- add-liquidity.css | 125 + add-liquidity.html | 350 +- add-liquidity.js | 156 + admin-dashboard.css | 31 + admin-dashboard.html | 177 +- archive/deploy-polygon.sh | 30 + backend/.env.example | 6 + backend/push-notify-wallets.js | 59 + cleanup-polygon.ps1 | 18 + deploy-polygon.ps1 | 19 + finish-polygon.ps1 | 43 + hardhat.config.js | 42 +- index.html | 762 +- index.js | 146 + index.md | 4 +- logo-generator.css | 55 + logo-generator.html | 262 +- logo-generator.js | 186 + mobile-app/.eslintrc.js | 8 + mobile-app/.gitignore | 99 + mobile-app/.prettierrc.js | 10 + mobile-app/App.tsx | 84 + mobile-app/README.md | 266 + mobile-app/STORE_RELEASE_CHECKLIST.md | 45 + mobile-app/app.json | 33 + mobile-app/babel.config.js | 22 + mobile-app/build-release.ps1 | 28 + mobile-app/generate-assets.ps1 | 44 + mobile-app/generate-metadata.ps1 | 17 + mobile-app/global.d.ts | 6 + mobile-app/index.js | 10 + mobile-app/metro.config.js | 11 + mobile-app/package-lock.json | 17261 ++++++++++++++++ mobile-app/package.json | 59 + mobile-app/src/analytics/events.ts | 28 + mobile-app/src/components/Button.tsx | 129 + mobile-app/src/components/Card.tsx | 34 + .../src/components/ConfirmSwapModal.tsx | 55 + mobile-app/src/components/Input.tsx | 58 + mobile-app/src/components/LoadingSpinner.tsx | 20 + .../src/components/TokenSelectModal.tsx | 53 + mobile-app/src/components/index.ts | 6 + mobile-app/src/config/abis.ts | 35 + mobile-app/src/config/contracts.ts | 34 + mobile-app/src/config/theme.ts | 71 + mobile-app/src/config/tokenlist.ts | 25 + mobile-app/src/context/Web3Context.tsx | 151 + mobile-app/src/hooks/useAetheron.ts | 121 + mobile-app/src/hooks/useStaking.ts | 139 + mobile-app/src/hooks/useSwapHistory.ts | 36 + mobile-app/src/hooks/useSwapQuote.ts | 120 + mobile-app/src/notifications/onesignal.ts | 15 + mobile-app/src/screens/ActivityScreen.tsx | 130 + mobile-app/src/screens/HomeScreen.tsx | 274 + mobile-app/src/screens/StakingScreen.tsx | 140 + mobile-app/src/screens/SwapScreen.tsx | 356 + mobile-app/src/screens/WalletScreen.tsx | 153 + mobile-app/src/screens/index.ts | 4 + mobile-app/store-metadata.json | 9 + mobile-app/tsconfig.json | 29 + mobile-app/upload-appstore.ps1 | 22 + mobile-app/upload-playstore.ps1 | 18 + package.json | 4 +- smart-contract/add-liquidity.js | 45 + smart-contract/fund-wallets.js | 43 + smart-contract/interact-mainnet.js | 56 + smart-contract/package-lock.json | 491 +- smart-contract/package.json | 3 +- verify-polygon.ps1 | 26 + 78 files changed, 22105 insertions(+), 1530 deletions(-) create mode 100644 .circleci/config.yml create mode 100644 .env create mode 100644 .env.example create mode 100644 .vscode/settings.json create mode 100644 Aetheron_platform_fixes.ipynb create mode 100644 add-liquidity.css create mode 100644 add-liquidity.js create mode 100644 admin-dashboard.css create mode 100644 archive/deploy-polygon.sh create mode 100644 backend/.env.example create mode 100644 backend/push-notify-wallets.js create mode 100644 cleanup-polygon.ps1 create mode 100644 deploy-polygon.ps1 create mode 100644 finish-polygon.ps1 create mode 100644 index.js create mode 100644 logo-generator.css create mode 100644 logo-generator.js create mode 100644 mobile-app/.eslintrc.js create mode 100644 mobile-app/.gitignore create mode 100644 mobile-app/.prettierrc.js create mode 100644 mobile-app/App.tsx create mode 100644 mobile-app/README.md create mode 100644 mobile-app/STORE_RELEASE_CHECKLIST.md create mode 100644 mobile-app/app.json create mode 100644 mobile-app/babel.config.js create mode 100644 mobile-app/build-release.ps1 create mode 100644 mobile-app/generate-assets.ps1 create mode 100644 mobile-app/generate-metadata.ps1 create mode 100644 mobile-app/global.d.ts create mode 100644 mobile-app/index.js create mode 100644 mobile-app/metro.config.js create mode 100644 mobile-app/package-lock.json create mode 100644 mobile-app/package.json create mode 100644 mobile-app/src/analytics/events.ts create mode 100644 mobile-app/src/components/Button.tsx create mode 100644 mobile-app/src/components/Card.tsx create mode 100644 mobile-app/src/components/ConfirmSwapModal.tsx create mode 100644 mobile-app/src/components/Input.tsx create mode 100644 mobile-app/src/components/LoadingSpinner.tsx create mode 100644 mobile-app/src/components/TokenSelectModal.tsx create mode 100644 mobile-app/src/components/index.ts create mode 100644 mobile-app/src/config/abis.ts create mode 100644 mobile-app/src/config/contracts.ts create mode 100644 mobile-app/src/config/theme.ts create mode 100644 mobile-app/src/config/tokenlist.ts create mode 100644 mobile-app/src/context/Web3Context.tsx create mode 100644 mobile-app/src/hooks/useAetheron.ts create mode 100644 mobile-app/src/hooks/useStaking.ts create mode 100644 mobile-app/src/hooks/useSwapHistory.ts create mode 100644 mobile-app/src/hooks/useSwapQuote.ts create mode 100644 mobile-app/src/notifications/onesignal.ts create mode 100644 mobile-app/src/screens/ActivityScreen.tsx create mode 100644 mobile-app/src/screens/HomeScreen.tsx create mode 100644 mobile-app/src/screens/StakingScreen.tsx create mode 100644 mobile-app/src/screens/SwapScreen.tsx create mode 100644 mobile-app/src/screens/WalletScreen.tsx create mode 100644 mobile-app/src/screens/index.ts create mode 100644 mobile-app/store-metadata.json create mode 100644 mobile-app/tsconfig.json create mode 100644 mobile-app/upload-appstore.ps1 create mode 100644 mobile-app/upload-playstore.ps1 create mode 100644 smart-contract/add-liquidity.js create mode 100644 smart-contract/fund-wallets.js create mode 100644 smart-contract/interact-mainnet.js create mode 100644 verify-polygon.ps1 diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5890d23 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,14 @@ +version: 2.1 +jobs: + build: + docker: + - image: circleci/python:3.8 + steps: + - checkout + - run: pip install dbt + - run: dbt --version +workflows: + version: 2 + build_and_test: + jobs: + - build diff --git a/.env b/.env new file mode 100644 index 0000000..4581850 --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +# Fill in your actual secrets below +PRIVATE_KEY= +POLYGON_RPC_URL= +MUMBAI_RPC_URL= +POLYGONSCAN_API_KEY= diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..a8e979b --- /dev/null +++ b/.env.example @@ -0,0 +1,7 @@ +# Example .env for Hardhat Polygon deployment +# Replace with your actual keys and rename to .env + +PRIVATE_KEY=your_private_key_here +POLYGON_RPC_URL=https://polygon-mainnet.infura.io/v3/YOUR_INFURA_KEY +MUMBAI_RPC_URL=https://rpc-mumbai.maticvigil.com +POLYGONSCAN_API_KEY=your_polygonscan_api_key_here diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ec34223 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,7 @@ +{ + "python.pythonPath": "python3", + "dbt.projectDir": "./dbt", + "dbt.profilesDir": "./dbt/profiles", + "editor.formatOnSave": true, + "editor.tabSize": 2 +} diff --git a/ADD_TOKEN_TO_METAMASK.md b/ADD_TOKEN_TO_METAMASK.md index 0d0dbd3..a6eb249 100644 --- a/ADD_TOKEN_TO_METAMASK.md +++ b/ADD_TOKEN_TO_METAMASK.md @@ -35,6 +35,35 @@ Then click the **"Add token to MetaMask"** button on PolygonScan. AETH ``` +#### Decimals +``` +18 +``` + +--- + +# Submit to Public Token Lists + +- [Coingecko Token List](https://github.com/coinpaprika/coinpaprika-api-docs/blob/master/public/cryptocurrency/list.md) +- [Uniswap Token List](https://tokenlists.org/) +- [1inch Token List](https://github.com/1inch/1inch-token-list) +- [Quickswap Token List](https://github.com/QuickSwap/quick-tokenlists) + +Submit the following info: +- Token Name: Aetheron +- Symbol: AETH +- Decimals: 18 +- Address: 0xAb5ae0D8f569d7c2B27574319b864a5bA6F9671e +- Network: Polygon (chainId 137) +- Logo: (add your logo file or URL) + +This will make your token discoverable in wallets and DEXs. + +#### Token Symbol +``` +AETH +``` + #### Token Decimals ``` 18 diff --git a/Aetheron_platform_fixes.ipynb b/Aetheron_platform_fixes.ipynb new file mode 100644 index 0000000..545d37c --- /dev/null +++ b/Aetheron_platform_fixes.ipynb @@ -0,0 +1,136 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "d41e4f9e", + "metadata": {}, + "source": [ + "# Aetheron_platform Comprehensive Fixes & Improvements\n", + "\n", + "This notebook guides the process of addressing open issues and improving the Aetheron_platform repository. Follow each section for actionable steps and documentation." + ] + }, + { + "cell_type": "markdown", + "id": "802a816f", + "metadata": {}, + "source": [ + "## 1. Initialize Notebook with Empty Cells\n", + "\n", + "Use the cells below for iterative development, notes, and code as you work through repository fixes." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "91de9336", + "metadata": { + "vscode": { + "languageId": "code" + } + }, + "outputs": [], + "source": [ + "# Empty code cell for development" + ] + }, + { + "cell_type": "markdown", + "id": "7faf5945", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "markdown", + "id": "1495e37e", + "metadata": {}, + "source": [ + "## 2. Add VSCode Settings for dbt and CircleCI\n", + "\n", + "- `.vscode/settings.json` is configured for dbt and CircleCI integration.\n", + "- `.circleci/config.yml` is added for CI/CD workflows.\n", + "- Review and adjust settings as needed for your team and environment." + ] + }, + { + "cell_type": "markdown", + "id": "5df2ed40", + "metadata": {}, + "source": [ + "## 3. Refactor ADMIN DASHBOARD INDEX Batch Script to HTML\n", + "\n", + "- Convert the ADMIN DASHBOARD INDEX batch script into a valid `index.html` file.\n", + "- Ensure proper HTML5 structure, semantic tags, and separation of concerns (HTML, CSS, JS).\n", + "- Remove any batch-specific syntax and replace with standard HTML/CSS/JS." + ] + }, + { + "cell_type": "markdown", + "id": "5895245a", + "metadata": {}, + "source": [ + "## 4. Update DASHBOARD CSS and JavaScript Files\n", + "\n", + "- Refactor dashboard CSS and JavaScript files to use normalized (Unix-style) file paths and standard formatting.\n", + "- Ensure clear separation of concerns: keep CSS, JS, and HTML in their respective files.\n", + "- Apply consistent code style and naming conventions for maintainability." + ] + }, + { + "cell_type": "markdown", + "id": "ef778514", + "metadata": {}, + "source": [ + "## 5. Normalize File Paths to Unix Format\n", + "\n", + "- Update all file paths in scripts and configuration files from Windows (backslash) to Unix (forward slash) format.\n", + "- This ensures better cross-platform compatibility and aligns with Unix conventions." + ] + }, + { + "cell_type": "markdown", + "id": "d81f6f1a", + "metadata": {}, + "source": [ + "## 6. Enhance FINAL VERIFICATION Script with Error Handling\n", + "\n", + "- Add robust error handling and input validation to the FINAL VERIFICATION script.\n", + "- Ensure the script provides clear error messages and handles edge cases gracefully.\n", + "- Test the script with various scenarios to confirm reliability." + ] + }, + { + "cell_type": "markdown", + "id": "02bba3f3", + "metadata": {}, + "source": [ + "## 7. Audit Repository Formatting and Structure\n", + "\n", + "- Review the repository for formatting issues, code conventions, and project structure.\n", + "- Address issues such as filename casing, duplicate entries in configuration files, and adherence to best practices.\n", + "- Document any changes or recommendations in this section." + ] + }, + { + "cell_type": "markdown", + "id": "dc4fc564", + "metadata": {}, + "source": [ + "## 8. Consolidate LICENSE and .gitignore Files\n", + "\n", + "- Merge content from LICENSE FILE into LICENSE, ensuring all relevant information is preserved.\n", + "- Consolidate duplicate entries in `.gitignore` to avoid redundancy and maintain clarity.\n", + "- Document the changes and rationale in this section." + ] + } + ], + "metadata": { + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/CONTRACT_ADDRESSES.md b/CONTRACT_ADDRESSES.md index 2323ef7..a4a1d3c 100644 --- a/CONTRACT_ADDRESSES.md +++ b/CONTRACT_ADDRESSES.md @@ -5,7 +5,7 @@ ### Primary Contracts #### AETH Token -- **Address:** `0x76A83f91dC64FC4F29CEf6635f9a36477ECA6784` +- **Address:** `0xAb5ae0D8f569d7c2B27574319b864a5bA6F9671e` - **Type:** ERC-20 Token - **Symbol:** AETH - **Name:** Aetheron @@ -13,11 +13,11 @@ - **View on PolygonScan:** [Link](https://polygonscan.com/token/0xAb5ae0D8f569d7c2B27574319b864a5bA6F9671e) #### Staking Contract -- **Address:** `0x8a3ad49656bd07981c9cfc7ad826a808847c3452` +- **Address:** `0x896D9d37A67B0bBf81dde0005975DA7850FFa638` - **Type:** Staking Contract - **Manages:** AETH token staking rewards - **Pools:** 3 (30/90/180 days) -- **View on PolygonScan:** [Link](https://polygonscan.com/address/0x8a3ad49656bd07981c9cfc7ad826a808847c3452) +- **View on PolygonScan:** [Link](https://polygonscan.com/address/0x896D9d37A67B0bBf81dde0005975DA7850FFa638) --- diff --git a/LICENSE b/LICENSE index 0ee354f..e9872ce 100644 --- a/LICENSE +++ b/LICENSE @@ -1,27 +1,7 @@ MIT License -Copyright (c) 2025 William Mccoy - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -@" -MIT License +Copyright (c) 2025 William Mccoy Copyright (c) 2024 Aetheron Technologies Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/Scripts/deploy.js b/Scripts/deploy.js index d24c159..ab32bc7 100644 --- a/Scripts/deploy.js +++ b/Scripts/deploy.js @@ -1,5 +1,5 @@ // scripts/deploy.js -const { ethers } = require("hardhat"); +import { ethers } from "hardhat"; async function main() { console.log("š Deploying AetherX token to Polygon..."); diff --git a/add-liquidity.css b/add-liquidity.css new file mode 100644 index 0000000..6c058ba --- /dev/null +++ b/add-liquidity.css @@ -0,0 +1,125 @@ +/* Extracted from add-liquidity.html */ +.hidden { display: none; } +.warning-list { margin-left: 1.5rem; margin-top: 0.5rem; } +.success-list { margin-left: 1.5rem; } +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} +body { + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; + background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); + min-height: 100vh; + display: flex; + justify-content: center; + align-items: center; + padding: 2rem; +} +.container { + background: white; + border-radius: 20px; + padding: 3rem; + max-width: 600px; + width: 100%; + box-shadow: 0 20px 60px rgba(0,0,0,0.3); +} +h1 { + color: #667eea; + margin-bottom: 1rem; + font-size: 2rem; +} +.status { + background: #f0f0f0; + padding: 1rem; + border-radius: 10px; + margin: 1rem 0; + font-family: monospace; + font-size: 0.9rem; +} +.input-group { + margin: 1.5rem 0; +} +label { + display: block; + margin-bottom: 0.5rem; + font-weight: 600; + color: #333; +} +input { + width: 100%; + padding: 1rem; + border: 2px solid #e0e0e0; + border-radius: 10px; + font-size: 1rem; +} +input:focus { + outline: none; + border-color: #667eea; +} +.btn { + width: 100%; + padding: 1.25rem; + border: none; + border-radius: 10px; + font-size: 1.1rem; + font-weight: 600; + cursor: pointer; + transition: all 0.3s; + margin-top: 1rem; +} +.btn-primary { + background: linear-gradient(135deg, #667eea, #764ba2); + color: white; +} +.btn-primary:hover { + transform: translateY(-2px); + box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4); +} +.btn:disabled { + opacity: 0.5; + cursor: not-allowed; + transform: none !important; +} +.info { + background: #e3f2fd; + padding: 1rem; + border-radius: 10px; + margin: 1rem 0; + border-left: 4px solid #2196f3; +} +.warning { + background: #fff3e0; + padding: 1rem; + border-radius: 10px; + margin: 1rem 0; + border-left: 4px solid #ff9800; +} +.success { + background: #e8f5e9; + padding: 1rem; + border-radius: 10px; + margin: 1rem 0; + border-left: 4px solid #4caf50; +} +.error { + background: #ffebee; + padding: 1rem; + border-radius: 10px; + margin: 1rem 0; + border-left: 4px solid #f44336; +} +.balance { + display: flex; + justify-content: space-between; + padding: 0.5rem; + background: #f5f5f5; + border-radius: 5px; + margin: 0.5rem 0; +} +code { + background: #f0f0f0; + padding: 0.2rem 0.5rem; + border-radius: 3px; + font-family: monospace; +} diff --git a/add-liquidity.html b/add-liquidity.html index c210b8d..ba277b3 100644 --- a/add-liquidity.html +++ b/add-liquidity.html @@ -5,147 +5,7 @@