Skip to content

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
@piotr-roslaniec piotr-roslaniec force-pushed the viem branch 3 times, most recently from 9294974 to ab8c8ca Compare August 24, 2023 10:11
@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

@nucypher nucypher deleted a comment from github-actions bot Aug 24, 2023
@nucypher nucypher deleted a comment from github-actions bot Aug 24, 2023
@nucypher nucypher deleted a comment from github-actions bot Sep 6, 2023
Base automatically changed from alpha to main October 18, 2023 08:26
@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