taco-web icon indicating copy to clipboard operation
taco-web copied to clipboard

Migrate from `ethers-v5` to `viem`

Open piotr-roslaniec opened this issue 1 year ago • 4 comments
trafficstars

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

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
  • Rebased over https://github.com/nucypher/taco-web/pull/445 to keep this PR tested (can drop these commits if needed)
  • [ ] Remove remainder of ethers usage
  • [ ] Remove typechain usage (based on ethers)
  • [ ] Use abitype/zod to validate functionAbi instead of relying on ethers
  • Originally drafted in https://github.com/nucypher/taco-web/pull/271

piotr-roslaniec avatar Nov 27 '23 13:11 piotr-roslaniec

Deploy Preview for taco-nft-demo ready!

Name Link
Latest commit 1fb32bdbb230c5ead930a558ef7127e0faba0d11
Latest deploy log https://app.netlify.com/sites/taco-nft-demo/deploys/658447f8127d35000829180d
Deploy Preview https://deploy-preview-421--taco-nft-demo.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 27 '23 13:11 netlify[bot]

Deploy Preview for taco-demo ready!

Name Link
Latest commit 1fb32bdbb230c5ead930a558ef7127e0faba0d11
Latest deploy log https://app.netlify.com/sites/taco-demo/deploys/658447f858e6f10008518b45
Deploy Preview https://deploy-preview-421--taco-demo.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 27 '23 13:11 netlify[bot]

Codecov Report

Attention: 36 lines in your changes are missing coverage. Please review.

Comparison is base (1a8c590) 88.00% compared to head (1fb32bd) 87.89%.

Files Patch % Lines
packages/taco/src/dkg.ts 33.33% 12 Missing :warning:
packages/pre/src/policy.ts 42.85% 8 Missing :warning:
packages/taco/src/taco.ts 82.05% 6 Missing and 1 partial :warning:
packages/taco/src/conditions/context/providers.ts 92.20% 4 Missing and 2 partials :warning:
packages/taco/src/tdec.ts 86.36% 2 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #421      +/-   ##
==========================================
- Coverage   88.00%   87.89%   -0.12%     
==========================================
  Files          33       33              
  Lines        2702     2767      +65     
  Branches      233      239       +6     
==========================================
+ Hits         2378     2432      +54     
- Misses        293      300       +7     
- Partials       31       35       +4     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Nov 30 '23 09:11 codecov-commenter

Currently fails due to some incompatibility between viem EIP712 signer and verifier on Ursula's side

Error: Threshold of responses not met; TACo decryption failed with errors: {"0x210eeAC07542F815ebB6FD6689637D8cA2689392":"(<class 'nucypher.network.middleware.RestMiddleware.BadRequest'>, BadRequest('Invalid data provided for context variable: Invalid data provided for \":userAddress\"; KeyError - \\'name\\''), 
// abbreviated

piotr-roslaniec avatar Dec 21 '23 15:12 piotr-roslaniec

Closing as stale.

derekpierre avatar Oct 14 '25 15:10 derekpierre