Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 12, 2026

Recent feature commit introduced ethers.js v6 packages but used deprecated v5 API syntax across 8 files, plus misplaced dependencies in package.json files.

Changes

Ethers.js v6 API Migration

  • Provider initialization: ethers.providers.JsonRpcProviderethers.JsonRpcProvider, Web3ProviderBrowserProvider
  • Utility functions: ethers.utils.*ethers.* (parseEther, formatEther, parseUnits, formatUnits)
  • Constants: ethers.constants.MaxUint256ethers.MaxUint256
  • BigNumber methods: .lt(), .mul(), .div() → native BigInt comparisons
  • Contract deployment: deployed()waitForDeployment(), .addressawait getAddress()
  • Transaction history: Replaced deprecated getHistory() with block-based queries

Dependency Fixes

  • Created backend/package.json with ethers ^6.10.0, axios, dotenv
  • Moved react-native-onesignal from smart-contract to mobile-app where it's used
  • Removed conflicting dependencies from root package.json (next, react-native, web3 v1, hardhat)

Example Migration

// Before (v5)
const provider = new ethers.providers.JsonRpcProvider(url);
const amount = ethers.utils.parseEther("1.0");
if (allowance.lt(amount)) { ... }

// After (v6)
const provider = new ethers.JsonRpcProvider(url);
const amount = ethers.parseEther("1.0");
if (allowance < amount) { ... }

Performance Improvements

  • Added cache size limit (1000) to prevent memory leaks in transaction monitoring
  • Optimized block fetching to request transaction hashes only, not full details upfront

Files Modified: 8 JS/TS files for API migration, 4 package.json files for dependencies

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • binaries.soliditylang.org
    • Triggering command: /usr/local/bin/node node /home/REDACTED/work/Aetheron_platform/Aetheron_platform/smart-contract/node_modules/.bin/hardhat compile (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Review and fix all errors introduced, revealed, or left unresolved in commit 64fd8ad. Ensure code correctness, proper dependency usage, and resolve any exceptions or warnings appearing due to this commit. Validate consistency with prior logic and intended feature changes.

This pull request was created from Copilot chat.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link

vercel bot commented Jan 12, 2026

Deployment failed with the following error:

If `rewrites`, `redirects`, `headers`, `cleanUrls` or `trailingSlash` are used, then `routes` cannot be present.

Learn More: https://vercel.link/mix-routing-props

Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 12, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
aetheron a23541e Jan 12 2026, 03:25 AM

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 12, 2026

Deploying aetheron-platform with  Cloudflare Pages  Cloudflare Pages

Latest commit: a23541e
Status:🚫  Build failed.

View logs

Copilot AI and others added 5 commits January 12, 2026 03:18
Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
Co-authored-by: MastaTrill <119138354+MastaTrill@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix errors introduced in commit 64fd8add Fix ethers.js v6 API compatibility and dependency management Jan 12, 2026
Copilot AI requested a review from MastaTrill January 12, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants