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.

Web3RequestManager is not compatible with the Ganache provider #5288

@nazarhussain

Description

@nazarhussain

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

There is method createInterfaceAdapter in truffle which proxies the web3 adapter to different adapter.

https://github.com/trufflesuite/truffle/blob/c5de9c238aa07f7a9bed701fa83bab3457011f3b/packages/interface-adapter/lib/adapter/index.ts#L14

Here is a sample code which is creating proxy object for the Ganache adapter.

https://github.com/trufflesuite/truffle/blob/c5de9c238aa07f7a9bed701fa83bab3457011f3b/packages/interface-adapter/test/quorum-getBlock.test.ts#L16-L28

Our request manager could not identify the right adapter type for the adapter and hang the request forever.

Expected Behavior

Ganache should work fine with the web3 request manager.

Steps to Reproduce

Mentioned above.

Web3.js Version

4.x

Environment

  • Operating System: N/A
  • Browser: N/A
  • Node.js Version: 16.x
  • NPM Version: N/A

Anything Else?

The below logic assumes that the provider which have request method should accept a callback. But it seems that ganache provider does not accept a callback rather return a promise.

https://github.com/ChainSafe/web3.js/blob/0b903378be4cee0f2a9dc2c0572ffcbce5e97afd/packages/web3-core/src/web3_request_manager.ts#L176-L178

Metadata

Metadata

Assignees

Labels

4.x4.0 relatedBugAddressing a bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions