Deployment

Hardhat Deployment

(For more details, please refer to the Openzeppelin Upgrades library)

deployProxy does the following:

  1. Validate that the implementation is upgrade safe

  2. Deploy a proxy admin for your project (if needed)

  3. Check if there is an implementation contract deployed with the same bytecode, and deploy one if not

  4. Create and initialize the proxy contract

And when you call upgradeProxy:

  1. Validate that the new implementation is upgrade safe and is compatible with the previous one

  2. Check if there is an implementation contract deployed with the same bytecode, and deploy one if not

  3. Upgrade the proxy to use the new implementation contract

Foundry Deployment

Last updated