-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allowUnlimitedContractSize flag not working #3208
Comments
This issue is also being tracked on Linear. We use Linear to manage our development process, but we keep the conversations on Github. LINEAR-ID: c2f0f356-c097-4552-b8ab-3be67859e3b7 |
This might be a wrong diagnostic, telling you that the problem is a "contract too large" when it's actually running out of gas. Can you try increasing the gas limit of the transaction? |
I'm pretty sure this is caused by #3420, so I'm going to close this one. |
Ciao @fvictorio, I just had the same issue and indeed increasing the gas limit of the transaction when deploying it seems to have fixed it. Adding Maybe also worth methioning: I checked the size of my contract's bytecode and it should be ~16kb, well under the 24kb limit of EIP170. |
This is a bit confusing. The EIP170 limit is about the size of the resulting bytecode. But if the deployment code spends a lot of gas (say, there's a loop in the constructor or whatever) then you might hit #3420. This is, of course, a bug in Hardhat. |
I've been trying to run a fork of Set Protocol on localhost using hardhat and I'm getting a ProviderError: Error: Transaction reverted: trying to deploy a contract whose code is too large even when the file in question (SetTokenCreator.sol) is only a 100 lines long and I've enabled allowUnlimitedContractSize: true.
My hardhat.config looks like this:
the ignoreUnknownTxType is because I'm attempting to fork Arbitrum using the patch in #2995. The patch is working correctly and the unknown transactions are indeed being ignored correctly. My hardhat reset in the test file looks like this:
The full error message is
why is allowUnlimitedContractSize not kicking in? I'm confused because in a couple of old projects I didn't have this problem. And a couple of bigger contracts in terms of code length are deploying correctly in this same file
The text was updated successfully, but these errors were encountered: