UUPS Upgrade script hardhat tools 3.0.0

After recent changes to hardhat tools 3.0.0. deploy is now deployContract, and deployed is now waitForDeployment. I am talking about the deploy script in hardhat. How does this relate to upgrades because there it is: upgrades.deployProxy() ? How to perform the upgrade now ?

Please ignore.. I found where the problem was. Thank you.

Snippet available on openzeppelin website:

// scripts/create-box.js
const { ethers, upgrades } = require("hardhat");

async function main() {
  const Box = await ethers.getContractFactory("Box");
  const box = await upgrades.deployProxy(Box, [42]);
  await box.waitForDeployment();
  console.log("Box deployed to:", await box.getAddress());

1 Like