Open guanzhenxing opened 3 years ago
I found out that if the contract size is larger than 22,500Byte, the deployment will fail and if it is smaller than 22,500Byte, the deployment will be successful? Is it possible that the contract size limit is not 24KB?
Try pasting your bytecode into isByteCodeSafe
to see if its passing the safetychecker - https://etherscan.io/address/0x3F4914B14cb75D83935E4b42Cc27B0BEE21b862c#readContract
The transaction may be running out of gas, also try upping the gas limit
It's true for safetychecker. And I try upping the gas limit to 8999999, also field.
@guanzhenxing - the deployment is probably running out of gas... There's currently not a great way around this other than taking logic out of the constructor or lowering your contract code size further.
@K-Ho Yes. I agree with you. But my question is, if the limit is 24KB in size, why does the contract fail even if it is less than 24KB in size? Is this a bug?
Hi, I want to deploy my contract to L2 network, but it failed. The message like this:
And my deploy code is
I don't understand why the deployment failed. The size of the contract is within the limits.I've tried making the contract a little smaller and it can be deployed successfully.