One method is to use a System of Contracts as outlined below:
Contract "Register"
- will contain pairs "name - address" for all contracts of your system;
- Contract
Backend
; - Contract
Frontend
usingBackend
; - Deploy
Register
& get address of it; - Deploy
Backend
& register address ofBackend
into already deployedRegister
; - Hardcode the address of
Register
into source ofBackend
. Before any callBackend
fromFrontend
you should call yourRegister
and get the actual address ofBackend
.
Then you can update your Backend
contract any time - simply deploy the new one and re-register them in the Register
.
One implementation of a similar approach as stated above would be this repo:
Seems like a really good point of departure when looking to implement this, possible on the next sprint.