I am working on a large contract and the architecture that we have considered is to have multiple contracts to be called from a parent contract. To do this we are considering to use proxy pattern (upgradable contract for new versions of sub contract).
contract SubA {
uint256 vara;
}
contract SubB {
uint256 varb;
}
contract SubA_V1 is SubA {
function getVar(){ return vara; }
}
contract SubB_V1 is SubB {
function calculateVar(){ return varb * 10; }
}
contract ParentContract {
function getVars(){
SubA.getvar();
SubB.calculateVar();
}
}
Lots of other large ethereum projects (using proxy) seems to use single contract as proxy. is it possible to have multiple proxy contracts to use from single parent contract. And another important question is it preferable for large projects ?