I am having issue deploying contract to fuji c chain with hardhat. Here is my hardhat.config.js file:
const config: HardhatUserConfig = {
networks: {
fuji: {
url: 'https://api.avax-test.network/ext/bc/C/rpc',
chainId: 43113,
gasPrice: 20000000000,
accounts: [`0x${PRIVATE_KEY}`],
},
avalanche: {
url: 'https://api.avax.network/ext/bc/C/rpc',
chainId: 43114,
gasPrice: 20000000000,
accounts: [`0x${PRIVATE_KEY}`],
},
},
};
Here is the command for deploying the contract:
npx hardhat run --network fuji scripts/deploy.ts
I am getting the following error:
ProviderError: HttpProviderError
at HttpProvider.request (E:\SolidityProject\Leveor\nft-platform-script\node_modules\hardhat\src\internal\core\providers\http.ts:78:19)
I also have used a different rpc url provided by infura with the API key but it gave the same error. How to resolve this?