Skip to content

chore: migrate @shardus/crypto-utils to lib-crypto-utils and ethers v5 to v6#58

Open
jairajdev wants to merge 1 commit into
devfrom
chore/library-updates
Open

chore: migrate @shardus/crypto-utils to lib-crypto-utils and ethers v5 to v6#58
jairajdev wants to merge 1 commit into
devfrom
chore/library-updates

Conversation

@jairajdev

Copy link
Copy Markdown
Contributor
  • Replace @shardus/crypto-utils@4.1.6 with @shardus/lib-crypto-utils@4.3.3 (old package required node 18, incompatible with node 20)
  • ethers v5 → v6 and pm2 upgrade were pulled in via npm audit fix --force to resolve 29 vulnerabilities (2 critical, 6 high) in the dependency tree
  • Migrated all ethers v5 APIs to v6 across the codebase:
    • ethers.providers.JsonRpcProvider → ethers.JsonRpcProvider
    • ethers.utils.Interface → ethers.Interface
    • ethers.BigNumber → native bigint
    • ethers.utils.parseEther/keccak256/getAddress/etc → top-level ethers.*
    • ethers.utils.serializeTransaction → ethers.Transaction.from(...)
    • ethers.utils.recoverAddress → ethers.recoverAddress
    • ethers.Event → ethers.EventLog
    • provider.getBlockWithTransactions → provider.getBlock(n, true)
    • provider.getGasPrice → provider.getFeeData().gasPrice
    • provider.sendTransaction → provider.broadcastTransaction

…5 to v6

- Replace @shardus/crypto-utils@4.1.6 with @shardus/lib-crypto-utils@4.3.3
  (old package required node 18, incompatible with node 20)
- ethers v5 → v6 and pm2 upgrade were pulled in via `npm audit fix --force`
  to resolve 29 vulnerabilities (2 critical, 6 high) in the dependency tree
- Migrated all ethers v5 APIs to v6 across the codebase:
  - ethers.providers.JsonRpcProvider → ethers.JsonRpcProvider
  - ethers.utils.Interface → ethers.Interface
  - ethers.BigNumber → native bigint
  - ethers.utils.parseEther/keccak256/getAddress/etc → top-level ethers.*
  - ethers.utils.serializeTransaction → ethers.Transaction.from(...)
  - ethers.utils.recoverAddress → ethers.recoverAddress
  - ethers.Event → ethers.EventLog
  - provider.getBlockWithTransactions → provider.getBlock(n, true)
  - provider.getGasPrice → provider.getFeeData().gasPrice
  - provider.sendTransaction → provider.broadcastTransaction
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.

1 participant