My current approach is:
-
contract interface
for ACIs -
contract
for child contracts -
main contract
for main contract
If there is only one contract
then it will be turned into main contract
. I also stablesort toplevel declarations in the following order:
- ACIs
- Namespaces
- Child contracts
- Main contract
Implementing truly mutually recursive contracts is a work for a separate task with the current implementation. But keep in mind that these things aren’t consensus affecting so if you don’t like it we can easily make them different