Code to reproduce
executed command = npx hardhat run --network mumbai .\scripts\prepare-upgrade-ENFT.script.js
I am getting ProviderError: HttpProviderError when upgrading my smart contract. I tried changing the RPCs too, but still i get this issue.
Below is my hardhat.config.js
require("@nomicfoundation/hardhat-toolbox");
require("@nomicfoundation/hardhat-chai-matchers");
require("@nomiclabs/hardhat-ethers");
require("@openzeppelin/hardhat-upgrades");
require("@nomiclabs/hardhat-etherscan");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
defaultNetwork: "localhost",
networks: {
hardhat: {},
mumbai: {
url: "RPC_URL",
//url: "https://matic-mumbai.chainstacklabs.com/",
//url: "https://rpc-mumbai.maticvigil.com",
accounts: [
"PRIVATE_KEY",
],
gas: 300000000000,
},
polygon: {
url: "RPC_URL",
accounts: [
"PRIVATE_KEY",
],
},
ropsten: {
url: "https://ropsten.infura.io/v3/",
accounts: [
"PRIVATE_KEY",
],
},
rinkeby: {
url: "https://eth-rinkeby.nodereal.io/v1/ID",
accounts: [
"PRIVATE_KEY",
],
chainId: 4,
from: "ACCOUNT",
gas: 300000000000,
},
localhost: {
url: "http://127.0.0.1:8545/",
accounts: [
PRIVATE_KEYS
],
},
},
etherscan: {
// Your API key for Etherscan
// Obtain one at https://etherscan.io/
apiKey: "API_KEY",
},
solidity: "0.8.9",
settings: {
optimizer: {
enabled: true,
runs: 100,
},
},
mocha: {
timeout: 40000,
},
};
Environment
Using Hardhat 2.11.0