Ethers.js v5/v6 compatibility layer providing a unified API for seamless migration between ethers v5 and v6. Current stable version is 1.0.0. Release cadence is ad-hoc. Key differentiator: write code once that works with both major versions of ethers.js without conditional logic, reducing migration friction. Unlike alternative adapters, it offers a drop-in solution with minimal overhead.
npm install ethers-compatNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a CompatibleProvider and CompatibleWallet, connect them, and fetch balance in ethers v5/v6 agnostic way.
Refer to ethers v5 vs v6 migration guide for specific method differences not abstracted by this library.
If using utilities like formatEther, import directly from 'ethers' instead.
Use getCompatVersion() instead when upgrading.
Install ethers-compat: npm install ethers-compat; for TypeScript, add 'declare module "ethers-compat";' or install @types/ethers-compat if available.
Change to ES module import: import { CompatibleProvider } from 'ethers-compat';Run: npm install ethers@^5.7.0 or ethers@^6.0.0