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

Migrate from ethers-v5 to viem #271

Closed
wants to merge 1 commit into from
Closed

Migrate from ethers-v5 to viem #271

wants to merge 1 commit into from

Conversation

piotr-roslaniec
Copy link
Contributor

@piotr-roslaniec piotr-roslaniec commented Aug 23, 2023

Type of PR:

  • Refactor

Required reviews:

  • 3

What this does:

  • Replaces dependency on ethers-v5 with viem
  • Introduces signer-provider separation with WalletClient and PublicClient

Issues fixed/closed:

Why it's needed:

Explain how this PR fits in the greater context of the NuCypher Network.
E.g., if this PR address a nucypher/productdev issue, let reviewers know!

Notes for reviewers:

  • This is just an initial draft
  • Remove remainder of ethers usage
  • Remove typechain usage (based on ethers)
  • Use abitype/zod to validate functionAbi instead of relying on ethers

@piotr-roslaniec piotr-roslaniec changed the title Migrate from ethers-v5 to viem Migrate from ethers-v5 to viem Aug 23, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Merging #271 (3796355) into alpha (a98cee4) will decrease coverage by 1.69%.
The diff coverage is 54.83%.

@@            Coverage Diff             @@
##            alpha     #271      +/-   ##
==========================================
- Coverage   80.56%   78.88%   -1.69%     
==========================================
  Files          36       37       +1     
  Lines         983     1042      +59     
  Branches      108      127      +19     
==========================================
+ Hits          792      822      +30     
- Misses        183      206      +23     
- Partials        8       14       +6     
Files Changed Coverage Δ
src/sdk/strategy/pre-strategy.ts 98.55% <ø> (ø)
src/web3.ts 85.71% <ø> (ø)
src/agents/coordinator.ts 28.88% <20.00%> (+1.61%) ⬆️
src/dkg.ts 29.26% <25.00%> (+1.06%) ⬆️
src/agents/subscription-manager.ts 21.73% <30.76%> (+4.34%) ⬆️
src/viem.ts 31.25% <31.25%> (ø)
src/agents/contracts.ts 42.10% <33.33%> (-4.96%) ⬇️
src/policies/policy.ts 80.00% <44.44%> (-4.32%) ⬇️
src/sdk/strategy/cbd-strategy.ts 93.33% <50.00%> (ø)
src/conditions/context/providers.ts 82.00% <91.66%> (+0.91%) ⬆️
... and 5 more

@piotr-roslaniec
Copy link
Contributor Author

Closing this stale draft in favor of #421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Introduce provider/signer separation into API
2 participants