Update the InfuraProvider and BrowserProvider tutorial for ethers v6#2809
Open
aproskill81 wants to merge 1 commit intoMetaMask:mainfrom
Open
Update the InfuraProvider and BrowserProvider tutorial for ethers v6#2809aproskill81 wants to merge 1 commit intoMetaMask:mainfrom
aproskill81 wants to merge 1 commit intoMetaMask:mainfrom
Conversation
|
@aproskill81 is attempting to deploy a commit to the Consensys Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR updates the
use-ethers.js-infuraprovider-or-web3providertutorial to use ethers v6 syntax.The tutorial currently tells users to install
etherswithout pinning an older version, which resolves to the latest release. However, the examples on the page still use legacy ethers v5 APIs. As a result, users following the tutorial as written can run into runtime errors when they copy the sample code.This change aligns the tutorial with the current ethers package by updating the examples and terminology to ethers v6 and by keeping the complete sample consistent with Sepolia.
Note
Low Risk
Low risk because changes are limited to documentation/code samples, but incorrect v6 API usage could mislead readers if not verified end-to-end.
Overview
Updates the
use-ethers.js-infuraprovider-or-web3providertutorial to ethers v6 syntax and terminology, including renamingWeb3Providerreferences toBrowserProviderthroughout.Refreshes the embedded React code snippets to v6 APIs (e.g.,
new ethers.BrowserProvider(...),ethers.parseEther,provider.send('eth_requestAccounts', []), andgetBlockNumber()without parameters) and keeps the complete sample aligned to the Sepolia network.Written by Cursor Bugbot for commit 510d6a3. This will update automatically on new commits. Configure here.