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
.