starknet.js
starknet.js copied to clipboard
feat: add fallback nodes to provider
Motivation and Resolution
Resolves #872
RPC version (if applicable)
Usage related changes
Development related changes
Checklist:
- [x] Performed a self-review of the code
- [x] Rebased to the last commit of the target branch (or merged it into my branch)
- [x] Linked the issues which this PR resolves
- [x] Documented the changes in code (API docs will be generated automatically)
- [x] Updated the tests
- [x] All tests are passing
My initial idea for this was to dedicate to one and switch to the next when it fails
I thought of the same approach as you said here, I think Ethers works like this, but I have to double check. I think if we want to go with this approach it wouldn't be a big change in this PR
Another option is to create n channels for each provider
TODO: I would like to refactor this approach and will do on the same PR