Lesson 17: Error: cannot estimate gas; transaction may fail or may require manual gas limit #5595
-
OverviewI am trying to use yarn run v1.22.19
warning package.json: No license field
$ "C:\Users\Asus\Jatin's Secure Folder\No\New Skills\Coding Resources\VSCODE Workspaces\hardhat-dao\node_modules\.bin\hardhat" deploy
Nothing to compile
Deploying Governance Token...
deploying "GovernanceToken" (tx: 0xe5e8b4b5c34e344e6222a6840184b3def2858dfdc96ea1aca82823a762490a71)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 3976676 gas
Deployed Governance Token to address 0x5FbDB2315678afecb367f032d93F642f64180aa3
Checkpoints 1
Delegated!
Deploying Timelock....
deploying "TimeLock" (tx: 0xadbd82f837a275785f0945290185b90fc95393aa7936c26725052d1098685ce4)...: deployed at 0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0 with 3077419 gas
Deploying Governor Contract...
An unexpected error occurred:
Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="Transaction reverted: trying to deploy a contract whose code is too large", method="estimateGas", transaction={"from":"0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266","data": 0x...." My Repo: https://github.com/Jatinkkalra/hardhat-dao Anyone help would mean a lot. Thank you in advance! 🙏 |
Beta Was this translation helpful? Give feedback.
Answered by
aaankeet
Jun 2, 2023
Replies: 1 comment 1 reply
-
Add
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Jatinkkalra
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@Jatinkkalra
Add
allowUnlimitedContractSize = true
to your hardhat.config.js under hardhat and localhost network & then deploy.