Skip to content
ff479995ed
openzeppelin-labs/upgradeability_using_unstructured_storage/
openzeppelin-labs/upgradeability_using_unstructured_storage/

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

readme.md

Upgradeability using unstructured storage

This idea builds on upgradeability using inherited storage but redefining the storage structure of the contracts required for upgradeability purpose. The idea here is to use fixed storage slots to store the required data for upgradeability purpose, this is the upgradeability owner and the implementation address.

We are using inline assembly to store and access mentioned variables in fixed storage positions indexing them with custom keys using keccak256. Please take a look at the implementation provided in UpgradeabilityProxy and OwnedUpgradeabilityProxy.

This is the proposed model:

    -------                      ----------     ----------
   | Proxy |                    | Token_V0 | ← | Token_V1 |
    -------                      ----------     ----------
      ↑              
    --------------------- 
   | UpgradeabilityProxy |
    ---------------------    
      ↑                      
    -------------------------- 
   | OwnedUpgradeabilityProxy |            
    --------------------------        
You can’t perform that action at this time.