lib
lib copied to clipboard
feat(investor-foxy): switch from web3 to ethers and JsonRpcBatchProvider
Description
This switches the current investor-foxy API implementation from web3.js to ethers.js, to be able to use JsonRpcBatchProvider.
web3.js also provides a BatchRequest
API, unfortunately after spending more than a day on it, it seems like that API is rugged currently and isn't compatible with our programmatic calls with blockNumber specified.
- [x] Base migration from web3.js to ethers - compiles
- [x] Regression test that values are correct
- [ ] ~~Batch promises together so the underlying JSON RPC calls are automagically batched by
JsonRpcBatchProvider
~~ This will better live in a follow-up PR. Let's get the switch to ethers.js merged first, and then we can improve the business logic
Issue
N/A
Risks
Everything FOXy could be borked - test locally against latest @shapeshiftoss/investor-foxy
.
Opening for early review, added self-review comments