The steps to update the orchestrator are:
retire(newOrchestrator)
of the old orchestrator, now the materia operators (liquidity adder, liquidity remover and swapper) can only be used by the new orchestator.function callOneTime(address) public {address oldMateriaOrchestrator = <oldMateriaOrchestrator>; //possibly with correct references to the old Materia operatorsaddress newMateriaOrchestrator = <newMateriaOrchestrator>; //must be already deployed with a correct reference to the DFO double proxyIMateriaOrchestrator(oldMateriaOrchestrator).retire(newMateriaOrchestrator);}
The steps to update an operator (like the liquidity adder, the liquidity remover or the swapper) are:
setSwapper(newSwapper)
.function callOneTime(address) public {IMVDProxy dfoProxy = IMVDProxy(msg.sender);address materiaOrchestrator = <materiaOrchestrator>;address newSwapper = <newSwapper>; //e.g. a new swapperIMateriaOrchestrator(materiaOrchestrator).setSwapper(newSwapper);}interface IMateriaOrchestrator {function setSwapper(address newSwapper) external;}
The steps to update the DFO double proxy are:
byDFO
modifier, this step is very important, an oversight here can lead to fatal consequences where the DFO loses control over a contract.function callOneTime(address) public {IMVDProxy dfoProxy = IMVDProxy(msg.sender);address newDoubleProxy = <newDoubleProxy>;materiaOrchestrator.setDobuleProxy(newDoubleProxy);dfoProxy.setDoubleProxy(newDoubleProxy);// May be convenient to check if the contracts now know the new double proxyrequire(materiaOrchestrator.doubleProxy() == dfoProxy.doubleProxy(), "Wrong doubleProxy");}