Skip to content

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

Open
@MantisClone

Description

@MantisClone

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    🎫 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions