Skip to content

FiroshV/uups-proxies-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UUPS Proxies Tutorial

This tutorial will walk you through the process of creating a UUPS proxy contract.

What is a UUPS proxy?

A UUPS proxy is a proxy contract that uses the Universal Upgradeable Proxy Standard to upgrade the implementation of the proxy contract.

Steps to run this tutorial

Below are the steps to run this tutorial with local hardhat node.

  1. Clone this repository
  2. Inside the backend directory run yarn to install the dependencies.
  3. Run yarn hardhat node --tags mars to start a local hardhat node and deploy the contract.
  4. Open a new terminal and run yarn hardhat deploy --network localhost --tags frontend to update contract details to frontend.
  5. Open a new terminal from the frontend directory and run yarn to install the dependencies.
  6. Run yarn dev to start the frontend.
  7. Open https://localhost:3000 to view the app.
  8. Click on the Connect button to connect your Metamask account.
  9. Connect your Metamask account to the local hardhat node.
  10. Refer hardhat network details to add the local hardhat network to your Metamask account.
  11. Import first account from the local hardhat node using the private key to your Metamask account.
  12. Once you have connected your Metamask account, click on the Check Version button.
  13. You should see the version of the contract as 1.
  14. In a terminal from the backend directory, run yarn hardhat deploy --network localhost --tags marsV2.
  15. Wait for the contract to be deployed.
  16. Once the contract is deployed, click on the Check Version button again.
  17. You should see the version of the contract as 2.
  18. If you are trying to redeploy the contracts, make sure to reset your Metamask account from advanced settings Reset account.

TODO

  • Add tests for the contracts

References

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published