How Upgradable Smart Contracts Work Under the Hood

In this post, we will dig deep into proxy contract code and different approaches in which we can use proxy contract with the implementation (logic) contract.

How Upgradable Smart Contracts Work Under the Hood

[Intro]
[Redirect the readers to the 1st article in case they are looking for code]

[Index]

[A brief overview what we discussed previously]
[understand how the proxy contract works?]
[What are some different proxy patterns involved]
Ref: https://blog.openzeppelin.com/proxy-patterns/
Solidity assembly opcodes & delegate calls

Now that we understand how the Proxy contract works, let’s look at Zeppelin’s three proposed patterns: Upgradeability using Inherited Storage, Unstructured Storage, and Eternal Storage.

The three approaches have different ways to tackle the same technical difficulty: how to ensure that the logic contract does not overwrite state variables that are used in the proxy for upgradeability.

[Introduce the problem in detail: how to ensure that the logic contract does not overwrite state variables that are used in the proxy for upgradeability.]
https://docs.openzeppelin.com/upgrades/2.7/proxies#unstructured-storage-proxies
[See if we can do this with an example? also practical example that people can understand and also follow along]

[Go through each of the 3 proxy approaches]

Upgradeability using Inherited Storage

practical truffle example: https://github.com/zeppelinos/labs/tree/master/upgradeability_using_inherited_storage

Resources

Subscribe to SimpleAsWater

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe