Skip to content

Harsh-Gill/brownie-proxy-factory-mix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

upgrade-proxy-factory-mix

A simple implementation of various proxy and factory patterns. To provide a quick overview of current methods and some deployment scripts to get anyone started quickly. This repo is not optimized and meant for direct production, rather as a demonstration and documentation of possible proxy patterns and how to implement them in code.

image

I've written an article for a quick overview of this repo and concepts at : https://medium.com/@harshgill2954/upgradeable-and-clonable-blockchain-smart-contracts-f3df36bbba6c

Installation

  1. Install Brownie, if you haven't already.

  2. Download the needed OpenZeppelin modules

    brownie pm install OpenZeppelin/[email protected]
  3. Compile the contracts

    brownie compile

Basic Use

This mix provides 3 proxy patterns with Objects defined as deployers.

The 3 Patterns are :

  • Transparent Proxy Pattern The contracts are located in contracts/transparent_upgradeable_proxy/ The scripts are located in scripts/transparent_upgradeable_proxy/ image

    To run :

    brownie run scripts/transparent_upgradeable_proxy/deploy.py
  • UUPS Proxy Pattern The contracts are located in contracts/uups_proxy/ The scripts are located in scripts/uups_proxy/ image

    To run :

    brownie run scripts/uups_proxy/deploy.py
  • Factory Beacon Proxy Pattern The contracts are located in contracts/beacon_proxy/ The scripts are located in scripts/beacon_proxy/ image

    To run :

    brownie run scripts/beacon_proxy/deploy.py

License

This project is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published