0

I generated a contract for governance based on the wizard provided by openzeppelin here: https://wizard.openzeppelin.com/#governor

I didn't change any values in the fields and tried compiling the contract in hardhat. But it throws the below warning:

Warning: Contract code size is 25663 bytes and exceeds 24576 bytes 
(a limit introduced in Spurious Dragon). This contract may not be deployable on Mainnet.

Kindly someone help me resolve this. I need to use the timelock feature along with other default base contracts for governance.

toddash
  • 167
  • 2
  • 17
  • Does this answer your question? [How do I resolve this Hardhat CompilerError? (Stack too deep when compiling inline assembly)](https://stackoverflow.com/questions/70310087/how-do-i-resolve-this-hardhat-compilererror-stack-too-deep-when-compiling-inli) – Yilmaz Dec 27 '22 at 15:40
  • @Yilmaz Unfortunately no, I tried with optimizer, it didn't work. – toddash Dec 28 '22 at 06:02
  • try to work on logic to reduce the size. other wise you either need to separete the logic and deploy two contracts or create a library and deploy the library for the pure functions – Yilmaz Dec 28 '22 at 06:51

0 Answers0