Skip to content

Lesson 17: Error: cannot estimate gas; transaction may fail or may require manual gas limit #5595

Closed Answered by aaankeet
Jatinkkalra asked this question in Q&A
Discussion options

You must be logged in to vote

@Jatinkkalra

Add allowUnlimitedContractSize = true to your hardhat.config.js under hardhat and localhost network & then deploy.

defaultNetwork: 'hardhat',
  networks: {
    hardhat: {
      chainId: 31337, // Used when we run tests
      allowUnlimitedContractSize: true, <----- this
    },
    localhost: {
      chainId: 31337, // Used when you run `yarn hardhat node` or `yarn hardhat deploy`. A fake blockchain in the terminal.
      allowUnlimitedContractSize: true,    <---- this
    },
  },

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jatinkkalra
Comment options

Answer selected by Jatinkkalra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants