Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Improvements to make 4.x compatible with different projects #5125

@nazarhussain

Description

@nazarhussain

While migrating truffle came across a few changes which are required to make web3@4x compatible with a lot of projects our there.

Here is the the list of individual changes:

  • Need to change the TS target to ES2016 for broader compatibility
  • Need to export formatters as namespace from web3-common package.
  • web3.eth.net namespace is not exported
  • web3.eth.personal namespace is not exported
  • web3.utils namespace is not exported
  • web3.modules namespace is not exported
  • Web3.utils static namespace is not exported
  • Web3.version static namespace is not exported
  • Parameter for the web3 constructor is required, need to be optional for 1.x compatibility
  • Parameter for web3.setProvider is required, need to be optional for 1.x compatibility.
  • Truffle HDWalletProvider type is not assignable to SupportedProviders type.
  • Would be nice to rename PromiEvent class to Web3PromiEvent to make it more compatible with 1.x implementation.
  • Every provider should have have send method for backward compatibility.

Metadata

Metadata

Assignees

Labels

4.x4.0 related

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions