livepeer / livepeer/protocol

Replace web3 methods with ethers.js

Open
#577 0 comments 0 reactions 1 assignee View on GitHub

@kautukkundan is already working on this.

Since May 24, 2022.

Dominant language
JavaScript
Stars
155
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Context
The code-base uses both web3 (i.e.: here, here and here) and ethers.js method, and as mentioned here we should converge towards consistently using ethers.js. In the process, I think it'd be valuable to make the code more flexible should we swap tools again in the future.

Proposal

  • create wrapper/adapter class that will encapsulate all the recurring web3.js/ethers.js methods so that the consumers (tests, scripts etc.) are not directly exposed to the dependencies
  • use ethers.js methods within the wrapper/adapter entity
  • replace the occurrences of web3/ethers.js methods with the corresponding methods in the wrapper entity
  • remove web3-related dependencies from the code (tests, scripts, package.json etc.)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.