I have a contract that is exceeding block gas limits (using something like 8000000 gas) when I deploy it. I think it is because it is importing a bunch of other contracts and has functions that create other contracts. Is it possible to reduce gas usage in this scenario? I'm thinking it is compiling all the bytecode from all the imported contracts into the main contract and deploying it all in the transaction.
I suppose one solution is to not create all the contracts from the main contract, but rather initialize with references to the deployed contract addresses. Is there another solution that wouldn't require this type of refactor?
Edit: Just realized my idea of the solution might not work because I still need at least the abstract interfaces for the contract to be deployed with my contract. Not sure how much gas savings that would give me.