curve-stablecoin-js
curve-stablecoin-js copied to clipboard
feat: allow init without RPC
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.
- CurveStableCoinJS 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 https://github.com/curvefi/curve-js/pull/394 and https://github.com/curvefi/curve-lending-js/pull/34