Deploying More Efficient Upgradeable Contracts

The workshop was recorded on the 17th June 2021 and led by Francisco Giordano, Software Engineer at OpenZeppelin.

The workshop covers the following:

  • The UUPS Proxy pattern conceptually
  • Tradeoffs versus the Transparent Proxy pattern
  • OpenZeppelin Contracts’s built-in UUPS security mechanism
  • Catching errors early with Upgrades Plugins for Hardhat and Truffle

You can watch the video, view the slides, and learn how to use OpenZeppelin’s tools to deploy more efficient upgradeable contracts using the UUPS Proxy pattern.

UUPS Proxies


UUPS Proxies are a different answer to the question of where to put upgradeability logic in a proxy architecture. While Transparent Proxies put this logic in the proxy itself, UUPS Proxies require the implementation contracts to hold it instead. This results in a different distribution of complexity, and a different cost profile for each alternative.

OpenZeppelin has recently released this pattern as part of OpenZeppelin Contracts, motivated by the great increase in runtime overhead of proxies, caused by two different opcode repricing upgrades to the Ethereum network.

In the workshop, we review the steps needed to adapt a contract for upgradeability, and the few extra steps necessary when opting for UUPS Proxies. In this way we learn about some of the capabilities of the Upgrades Plugins for Hardhat and Truffle, and how they can help catch subtle errors when upgrading your smart contracts.

 

Video

Slides

https://github.com/OpenZeppelin/workshops/blob/master/08-uups-proxies/slides.pdf

How to use OpenZeppelin’s tools to deploy more efficient upgradeable contracts using the UUPS Proxy pattern

The final code from the live demo is available on GitHub.

Learn more

Learn more about OpenZeppelin Contracts: openzeppelin.com/contracts

See the documentation: docs.openzeppelin.com/contracts

Sign up for a free OpenZeppelin Defender account: defender.openzeppelin.com


Be part of the community