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

Explore ways to support multiple client libraries #291

Open
spsjvc opened this issue Jun 5, 2023 · 0 comments
Open

Explore ways to support multiple client libraries #291

spsjvc opened this issue Jun 5, 2023 · 0 comments
Assignees

Comments

@spsjvc
Copy link
Member

spsjvc commented Jun 5, 2023

Currently, in order to use the Arbitrum SDK in your project, you have to use ethers@v5, as a lot (if not all) SDK methods accept and receive ethers@v5 objects, like Signer, Provider, TransactionReceipt etc.

Ideally, we should be able to support using any of them, e.g. ethers@v5, ethers@v6, viem, web3.js etc, while continuing to use ethers for our implementation. Maybe we could reduce the dependencies to the minimum interfaces needed, and then write small adapters that map objects from different libraries to the shared interfaces? It would be cool if the user could just "pick" an adapter once when configuring the library without having to do it at every call site.

As a PoC, we could try doing so for a couple of read and write methods:

This is a huge breaking change so probably targets v4, but worth exploring.

@spsjvc spsjvc mentioned this issue Aug 16, 2023
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

No branches or pull requests

2 participants