You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
The current default provider in the example code connects to the Goerli testnet, which gonna be deprecated. The zkSync Era is using the Sepolia network, and the example should reflect this change.
Steps to Reproduce:
Use the provided example code.
Observe that it connects to the Goerli testnet instead of Sepolia.
Expected Behavior:
The example code should connect to the Sepolia network, which is the zkSync Era testnet.
Actual Behavior:
The code connects to the Goerli testnet.
Code Snippet:
import{Provider,types}from"zksync-ethers";import{ethers}from"ethers";asyncfunctiongetLatestBlockNumber(){try{constprovider=Provider.getDefaultProvider(types.Network.Goerli);// Incorrect: connects to GoerliconstethProvider=ethers.getDefaultProvider("goerli");// Incorrect: connects to Goerli// Get the latest block numberconstblockNumber=awaitprovider.getBlockNumber();console.log("Latest block number:",blockNumber);}catch(error){console.error("Error:",error.message);}}// Call the functiongetLatestBlockNumber();
Proposed Solution:
Update the default providers in the example code to connect to the Sepolia network.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description:
The current default provider in the example code connects to the Goerli testnet, which gonna be deprecated. The zkSync Era is using the Sepolia network, and the example should reflect this change.
Steps to Reproduce:
Use the provided example code.
Observe that it connects to the Goerli testnet instead of Sepolia.
Expected Behavior:
The example code should connect to the Sepolia network, which is the zkSync Era testnet.
Actual Behavior:
The code connects to the Goerli testnet.
Code Snippet:
Proposed Solution:
Update the default providers in the example code to connect to the Sepolia network.
The text was updated successfully, but these errors were encountered: