v2: Move contract functions to separate files
We need to move max contract size calculations and preparing an array of contracts on position opening to separate files. It will allow us to create unit tests for the functions mentioned.
Edited by Anton Panteleev