Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Web3BaseProvider interface for web3-common #4361

Closed
nazarhussain opened this issue Sep 23, 2021 · 0 comments · Fixed by #4395
Closed

Create Web3BaseProvider interface for web3-common #4361

nazarhussain opened this issue Sep 23, 2021 · 0 comments · Fixed by #4395
Assignees
Labels
4.x 4.0 related

Comments

@nazarhussain
Copy link
Contributor

nazarhussain commented Sep 23, 2021

Description

Define an abstract class named Web3BaseProvider which should be used to implement other HTTP, WS and other providers.

That base provider should extract generic but consistent interfaces, some shared behaviour can also be implemented in that class. Some inspiration is given at:

https://github.com/ChainSafe/web3.js/blob/40974e9fe9a8f9075fcbb4c002430c6480d83031/packages/web3-core-helpers/types/index.d.ts#L93

In addition to the class we need to provide a utility function to test any implementation of the providers.

Acceptance Criteria

  • The class Web3BaseProvider must be abstract
  • The class Web3BaseProvider should be exported from the package
  • There must exists a utility function to test the providers
  • Same utility function should cover the unit tests for that abstract class

Additional Information

For the test utility function the inspiration can be taken from.

https://github.com/libp2p/js-libp2p-interfaces/blob/2eff94a1bc67a741ada1c98bd57dc37c23acce3b/packages/compliance-tests/src/peer-discovery/index.js#L12-L90

@nazarhussain nazarhussain added the 4.x 4.0 related label Sep 23, 2021
@nazarhussain nazarhussain self-assigned this Sep 24, 2021
@nazarhussain nazarhussain linked a pull request Sep 27, 2021 that will close this issue
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant