Too large contract error #1420
-
Hello everyone, the whole error is to long but i mentioned here the reason that the error is giving me. I have also checked for the solution online and someone suggested to enable optimizer, so i did it but still having the same issue. Can anybody tell how to deploy contracts that are very large. gas optimization setting i used in hardhat config: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hii @Aamirusmani1552, even I faced the same in your const config = {
networks : {
+ hardhat: {
+ chainId: 31337,
+ allowUnlimitedContractSize: true,
+ },
+ localhost: {
+ chainId: 31337,
+ allowUnlimitedContractSize: true,
+ },
}
} You can also refer it here for configuration : https://github.com/technophile-04/onchain-DAO/blob/db3d6e664883aa58e7dde0189ac909a40b76f883/hardhat.config.ts#L27 Alternate (Patricks Code ) : We just need to tell it to allow unlimitedContractSize on local chain |
Beta Was this translation helpful? Give feedback.
Hii @Aamirusmani1552, even I faced the same in your
hardhat.config.js
inconfig
variable insidenetworks
add thishardhat.config.js
You can also refer it here for configuration : https://github.com/technophile-04/onchain-DAO/blob/db3d6e664883aa58e7dde0189ac909a40b76f883/hardhat.config.ts#L27
Alternate (Patricks Code ) :
https://github.com/PatrickAlphaC/dao-template/blob/ba40040287fb17c75c9f58148f37fb80460c6af5/hardhat.config.ts#L20
We just need to tell it to allow unlimitedContractSize on …