When I run the command "npx hardhat run scripts/deploy.js --network goerli" it gives me the error Error: insufficient funds for intrinsic transaction cost. More specifically looks like this:

  • reason: 'insufficient funds for intrinsic transaction cost',
  • error: ProviderError: insufficient funds for gas * price + value

When I deploy it without "--network goerli"" it deploys it to an static address apparently which allows to make tests but I am not sure if it is the correct way to do it .

On my metamask account I have 0.0193 GoerliETH .

Deploy.js file looks like this.

const main = async () => {
  const transactionsFactory = await hre.ethers.getContractFactory("Transactions");
  const transactionsContract = await transactionsFactory.deploy();

  await transactionsContract.deployed();

  console.log("Transactions address: ", transactionsContract.address);

const runMain = async () => {
  try {
    await main();
  } catch (error) {


Hardhat.config.js looks like this where I specified the alchemy https and also the private key of my metamask account.


  • Your wallet doesn't have enough ether may be Check it Commented Mar 15, 2023 at 13:17
  • @SolidityLearner you have any idea how many goeth are required to deploy a contract in goerli network ? Commented Mar 15, 2023 at 14:08
  • It depends on the gas price. 0.1 eth is more than enough Commented Mar 16, 2023 at 4:23

2 Answers 2


Going off what Lauri was saying, Goerli testnet is not worth testing on anymore. ETH Foundation has already started deprecating and is setting end of life date for Georli in Dec 2023: https://github.com/eth-clients/goerli

You should use Sepolia, no supply constraints:

Sepolia details:

Chain ID: 11155111

Currency: ETH

Block Explorer: https://sepolia.etherscan.io

RPC URL: https://eth-sepolia.g.alchemy.com/v2/your-alchemy-api-key

Public RPC Endpoint: https://eth-sepolia.g.alchemy.com/v2/demo

Sepolia Overview: https://www.alchemy.com/overviews/sepolia-testnet

Sepolia Faucet: https://sepoliafaucet.com

  • Some users have pointed out that if you keep posting Alchemy links, you should continue to add the disclaimer that you work for Alchemy (because people may not have read your other answer where you posted the disclaimer). Thank you
    – eth
    Commented Mar 24, 2023 at 21:01

As mentioned in the comments already, your account simply doesn't have enough Ether to pay for the deployment.

Goerli should not be used for testing dapps anymore. And in any case, it's very badly suited for that nowadays, since getting Goerli ethers is a big pain in the ass. Also fees in Goerli are sometimes super high nowadays. Goerli is nowadays aimed only for testing protocol staking functionality.

Instead of Goerli you should use the Sepolia testnet. Much easier to get testnet ethers and it's aimed for dapp testing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.