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

chore: refactor hub, hub-nodejs to use viem instead of ethers #932

Closed
varunsrin opened this issue May 1, 2023 · 4 comments
Closed

chore: refactor hub, hub-nodejs to use viem instead of ethers #932

varunsrin opened this issue May 1, 2023 · 4 comments
Assignees
Labels
t-devex Simplify the developer experience
Milestone

Comments

@varunsrin
Copy link
Member

What is the feature you would like to implement?

Use viem instead of ethers.js for all blockchain and wallet interactions in hubble, hub-nodejs and hub-web. Using EthersEip712Signer should still be supported in hub-nodejs for consumers that use ethers.

Why is this feature important?

We've run into many issues with ethers v6 especially in React Native environments and viem seems like a promising alternative. We should at least prototype and go/no-go on this.

Will the protocol spec need to be updated??
No

@varunsrin varunsrin added this to the vNext milestone May 1, 2023
@varunsrin varunsrin added help wanted Well specified and ready to be worked on s-ready Ready to be picked up labels May 1, 2023
@github-actions github-actions bot added the s-triage Needs to be reviewed, designed and prioritized label May 1, 2023
@varunsrin varunsrin added t-devex Simplify the developer experience and removed s-triage Needs to be reviewed, designed and prioritized labels May 1, 2023
@deodad deodad removed the help wanted Well specified and ready to be worked on label May 10, 2023
@deodad deodad self-assigned this May 10, 2023
@deodad
Copy link
Member

deodad commented May 12, 2023

This is a short-term no-go, at least for unlocking RN support.

Viem uses package exports which aren’t yet supported by Metro + React Native.

Experimental support should come with the upcoming RN 0.72 release and stable support with RN 0.73. See Road to 0.72.

I'd like to do a little more digging into:

  • aside from package exports, which should soon be supported, what else is needed to get viem compatible with RN
  • what else is preventing our libraries from being RN compatible and whats the shortest path to unblock

@varunsrin
Copy link
Member Author

Could we at least move the apps/hubble codebase over to viem and keep hub-nodejs on ethers until this is resolved? or does that introduce a lot of complexity?

@jxom
Copy link

jxom commented May 13, 2023

We were thinking of exporting everything from the viem entrypoint. package.json#exports is proving to be a pain with no significant benefit.

@deodad
Copy link
Member

deodad commented May 14, 2023

Could we at least move the apps/hubble codebase over to viem and keep hub-nodejs on ethers until this is resolved? or does that introduce a lot of complexity?

We could move apps/hubble over without introducing a lot of complexity. I did a small proof-of-concept and it seems like the move to viem would remove some complexity we've had to add to account for edge cases around RPC failures.

@deodad deodad closed this as completed Jun 26, 2023
@varunsrin varunsrin removed the s-ready Ready to be picked up label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-devex Simplify the developer experience
Projects
Archived in project
Development

No branches or pull requests

3 participants