Deploying Upgradeable Proxies and Proxy Admin from Factory contract

Hi @scoots,

For v1Contract, you want an implementation contract (because you are passing the implementation contract to your beacon proxy factory). upgrades.deployProxy returns a transparent or UUPS proxy, which is not what you need in this case. You can deploy the implementation directly instead.

So the first part should be like:

  // deploy original implementation contract
  const v1ContractFactory = await hre.ethers.getContractFactory('GolfEvent');
  const v1Contract = await v1ContractFactory.deploy();
  console.log("Initial Golf Event Contract deployed to: ", v1Contract.address);

Another way is to change your beacon proxy factory to take an actual beacon instead. That way you can use the upgrades plugins to deploy the beacon and implementation (which gives the additional benefit of validating that your implementation is upgrade safe). See the discussion in How to deploy new instances using beacon proxy from a factory when using @openzeppelin/hardhat-upgrades - #5 by gate3