问题重现
- 前置条件
我写了一个智能合约大概25kb左右,一共500多行。
- 问题描述
-
remix调试提示【Contract code size over limit】
Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails.More info: eip-170
-
使用truffle migrate ***部署(编译已通过)时提示,ran out of gas等错误信息
- 解决办法
1.remix解决办法
打开优化。如下图所示,即可在remix部署成功。再此感谢Remix fails to deploy large contract, even when sufficient gas provided中@JUDOKICK
提供的方法。
- truffle 解