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 init without RPC #34

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

feat: allow init without RPC #34

wants to merge 3 commits into from

Conversation

DanielSchiavini
Copy link

@DanielSchiavini DanielSchiavini commented Sep 18, 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.

  • CurveLendingJS currently requires a web3 provider to be initialized
  • However, we might not always have a RPC connection
  • This PR allows users to retrieve (part of) the 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-js#394 and curvefi/curve-stablecoin-js#26

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