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

feat: allow CurveJS init without RPC #394

Closed
wants to merge 6 commits into from
Closed

Conversation

DanielSchiavini
Copy link
Contributor

@DanielSchiavini DanielSchiavini commented Sep 17, 2024

Let me be clear: I do not like throwing exceptions. Ideally we should make the invalid states unreachable. However, given the existing code base, throwing good errors seems like the only feasible way.

  • CurveJS currently requires a web3 provider to be initialized
  • However, we need a lot of data from CurveJS and we might not always have a RPC connection
  • This PR allows users to retrieve (part of) the CurveJS data without requiring a RPC connection
  • However, it will raise exceptions whenever a function that requires RPC is called

This PR is similar to curvefi/curve-stablecoin-js#26 and curvefi/curve-lending-js#34

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

Successfully merging this pull request may close these issues.

1 participant