-
Notifications
You must be signed in to change notification settings - Fork 5k
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
7203 - Alchemy rpc provider #7296
base: 4.x
Are you sure you want to change the base?
Conversation
5103d29
to
b17f49d
Compare
Co-authored-by: Junaid <[email protected]>
7aefd55
to
2982118
Compare
97135dc
to
2982118
Compare
# Conflicts: # packages/web3-rpc-providers/src/types.ts # packages/web3/test/integration/web3RPCProviders.test.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many thanks @MRLab12 for your contribution,
It seems great now. I think, once other team members approve, we can merge this MR.
I'm trying to run integration tests locally but having issues. Looking at the test errors here, most likely a missing Alchemy key is the issue. Can someone point me to how this should be set up? |
For your local testing I'll suggest to use your personal key, and for web3.js one of our team member will add web3.js specific alchemy key. |
Hey! Yup, I used my personal key to manually test the functionality using a script. For the tests I added, I thought these tests were going to be ignored for now. Since it looks like they are being used, we will most likely need to set up the key for the tests to work. I'm going to try to get the tests I added to run locally, but when I last tried using |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 4.x #7296 +/- ##
=======================================
Coverage 94.54% 94.54%
=======================================
Files 218 218
Lines 8637 8637
Branches 2364 2364
=======================================
Hits 8166 8166
Misses 471 471
Flags with carried forward coverage won't be shown. Click here to find out more. |
Description
I have opened this Draft PR to make sure I did the correct changes and get some feedback since this is my first contribution here.This PR adds an Alchemy provider in
web3-rpc-providers
. I matched the design of the Quicknode provider.For testing, I wasn't sure if a test for this provider should actually try to make a request. Should we consider mocking? I want to learn more about how testing is done in web3.js.
Fixes #7203
Type of change
Checklist:
npm run lint
with success and extended the tests and types if necessary.npm run test:unit
with success.npm run test:coverage
and my test cases cover all the lines and branches of the added code.npm run build
and testeddist/web3.min.js
in a browser.CHANGELOG.md
file in the root folder.