I am sure this has already been answered but I could not find a clear answer. I get the following error:

Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails.

I use Remix for compiling. How can I find out how long the code is? How is it calculated? Thanks!

  • 1
    Please show the contract. Commented Sep 18, 2018 at 7:03
  • I would recommend restructure your code and use more library to contain logic code Commented Sep 18, 2018 at 10:20
  • One clarifying point - the code is not specially long but the compiled code hits the size limit. The question I am looking to answer is how I can check on compile how large the " data length" is? Commented Sep 19, 2018 at 3:14
  • Also, @Miao ZhiCheng - what do you mean by use libraries to contain logic code. How would that work? Thanks! Commented Sep 19, 2018 at 3:15
  • I think he wantedto say that you should split your contract into multiple ones.
    – Maxpeinas
    Commented Sep 19, 2018 at 10:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.