Contract proxy and delegate
This is a proxy design pattern and a popular technique that decouples DApps from the actual smart contract implementation and has the proxy as the agent sitting in-between them.
As shown in the following diagram, DApps only need to know the address of the OrderProxy smart contract address, and always invoke methods on the proxy. OrderProxy maintains a list of addresses regarding the different versions of actual smart contract implementations and knows which one is the latest version. If the smart contract needs to be upgraded, the newer version of the contract implementation will be deployed to the blockchain. The address to the latest version can be dynamically reset with the setter method on the proxy contract. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access