I get the following error when deploying my contract in Remix:
Contract creation initialization returns data with length of more than 24576 bytes. The deployment will likely fails. More info: eip-170
The contract is divided to 2 contracts. A with 250 lines and B (B is A) with 500 lines. I also created a library and exported some of my functions to this library. I am currently uploading to Javascript VM environment. Worth noting that when I make the Enable Optimization checkbox on the Compile tab valid, it still doesn't work. I have a couple of questions:
1) How can I check the size of the data in Remix? I get an error that it is over 24kb, how can I check how much is it exactly?
2) What is causing this? Is this related to the length of the code or the amount of gas that is executed? If it's the gas, how come when I add a lot more gas to the gas limit in the Run tab in remix it still gives me the same error.
3) Any common ways to decrease the size of the data so I could actually deploy it?
Thanks