I am developing a storage contract using mapping to save data. At first the contract exceeds the contract size limit so I seperate my contract to fit it. After seperation, the main storage contract is named Engine.sol which contains the original mapping used to save data.
Though Engine now is below the contract size limit, I'm wondering whether Engine will exceed the limit as users store more and more data into it. That's my first question.
So my idea is if Engine has reached the limit I can create a new Engine and attach it to the old one like a linkded list so users interacting with the old Engine can be redirected to the new Engine to store data.
Here is my second question, like we can use .length to check an array's length, do we have a way to check a contract size like Engine.size? I have tested extcodesize but it returns the same value no matter how much data I have stored.
I'm using remix to code and solidity 0.8.19 to compile.
Thanks a lot for replying!