@evolutionland/upgraeability-using-unstructured-storage

0.1.1 • Public • Published

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 |            
    --------------------------        

Readme

Keywords

none

Package Sidebar

Install

npm i @evolutionland/upgraeability-using-unstructured-storage

Weekly Downloads

0

Version

0.1.1

License

ISC

Unpacked Size

47.4 kB

Total Files

18

Last publish

Collaborators

  • jayjay1024
  • hackfisher
  • lowoee