We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
5.7.2
No response
I have the following code :
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY_AVAX, provider); const contract = new ethers.Contract(process.env.ERC721_POTION_ADRESS, abi, wallet); const functionName = 'safeMint'; const type = Math.floor(Math.random() * 3) + 1; const functionArgs = [address,type]; const transaction = await contract[functionName](...functionArgs); const receipt = await transaction.wait(); console.log(`Confirmed transaction. Hash: ${receipt.transactionHash}`);
And I always get : "Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)"
const provider = new ethers.providers.JsonRpcProvider("https://avalanche-fuji.infura.io/v3/API_KEY"); const wallet = new ethers.Wallet(process.env.PRIVATE_KEY_AVAX, provider); const contract = new ethers.Contract(process.env.ERC721_POTION_ADRESS, abi, wallet); const functionName = 'safeMint'; const type = Math.floor(Math.random() * 3) + 1; const functionArgs = [address,type]; const transaction = await contract[functionName](...functionArgs); const receipt = await transaction.wait(); console.log(`Confirmed transaction. Hash: ${receipt.transactionHash}`);
Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
The text was updated successfully, but these errors were encountered:
It happens with nextjs 14 and Ethers 5. After upgrading to Ethers v6, the issue has been solved.
Sorry, something went wrong.
ricmoo
No branches or pull requests
Ethers Version
5.7.2
Search Terms
No response
Describe the Problem
I have the following code :
And I always get : "Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)"
Code Snippet
Contract ABI
No response
Errors
Error: could not detect network (event="noNetwork", code=NETWORK_ERROR, version=providers/5.7.2)
Environment
No response
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: