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

Inject web3 library: support ethers v5, ethers v6, and viem #1111

Open
Tracked by #1202
MantisClone opened this issue Jun 14, 2023 · 0 comments
Open
Tracked by #1202

Inject web3 library: support ethers v5, ethers v6, and viem #1111

MantisClone opened this issue Jun 14, 2023 · 0 comments

Comments

@MantisClone
Copy link
Member

MantisClone commented Jun 14, 2023

Towards #1202

Problem(s)

  1. Our packages require ethers v5. This is a problem because:
  2. Large dependency so it's slow to download and install
  3. Some users want to use other web3 libraries (ethers v6 or viem)
  4. We don't support viem, a smaller and more performant web3 library than ethers with a more stable API.

Solution

Develop a web3 library interface. Make the user inject their web3 provider. Support both ethers and viem. Maybe the interface matches viem, and then we just write a wrapper so that ethers can look like viem.

Viem vs Ethers

Bundle Size
Image

Performance
Image


Migrated from Asana: https://app.asana.com/0/1203912381456855/1205300970356583/f

@MantisClone MantisClone changed the title Replace ethers with viem Inject web3 library so that we support both ethers and viem Oct 16, 2023
@MantisClone MantisClone changed the title Inject web3 library so that we support both ethers and viem Inject web3 library: support ethers v5, ethers v6, and viem Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🐞🧹 Backlog: Bug, Tech Debt, or Chore
Development

No branches or pull requests

2 participants