From d2c694872c32874b9dd639e29542aaf72c2a4df3 Mon Sep 17 00:00:00 2001 From: Raul Date: Thu, 21 Mar 2024 18:33:41 -0300 Subject: [PATCH] use test deploy proxy helper to unblock --- script/foundry/deployment/Main.s.sol | 9 ++++++--- test/foundry/utils/DeployHelper.t.sol | 3 ++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/script/foundry/deployment/Main.s.sol b/script/foundry/deployment/Main.s.sol index 06a2e120..8eb180cd 100644 --- a/script/foundry/deployment/Main.s.sol +++ b/script/foundry/deployment/Main.s.sol @@ -7,7 +7,9 @@ import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import { console2 } from "forge-std/console2.sol"; import { Script } from "forge-std/Script.sol"; import { stdJson } from "forge-std/StdJson.sol"; -import { Upgrades } from "openzeppelin-foundry-upgrades/Upgrades.sol"; +// TODO: fix the install of this plugin for safer deployments +// import { Upgrades } from "openzeppelin-foundry-upgrades/Upgrades.sol"; +import { TestProxyHelper } from "test/foundry/utils/TestProxyHelper.sol"; // contracts import { AccessController } from "contracts/AccessController.sol"; @@ -205,9 +207,10 @@ contract Main is Script, BroadcastManager, JsonDeploymentHandler { contractKey = "LicenseRegistry"; _predeploy(contractKey); + address impl = address(new LicenseRegistry()); licenseRegistry = LicenseRegistry( - Upgrades.deployUUPSProxy( - "LicenseRegistry.sol", + TestProxyHelper.deployUUPSProxy( + impl, abi.encodeCall( LicenseRegistry.initialize, ( address(governance), diff --git a/test/foundry/utils/DeployHelper.t.sol b/test/foundry/utils/DeployHelper.t.sol index aa8aa584..e7e7219c 100644 --- a/test/foundry/utils/DeployHelper.t.sol +++ b/test/foundry/utils/DeployHelper.t.sol @@ -5,7 +5,6 @@ pragma solidity 0.8.23; // external import { console2 } from "forge-std/console2.sol"; // console to indicate mock deployment calls. import { ERC6551Registry } from "erc6551/ERC6551Registry.sol"; -import { TestProxyHelper } from "./TestProxyHelper.sol"; // contracts import { AccessController } from "../../../contracts/AccessController.sol"; @@ -43,6 +42,8 @@ import { MockLicenseRegistry } from "../mocks/registry/MockLicenseRegistry.sol"; import { MockModuleRegistry } from "../mocks/registry/MockModuleRegistry.sol"; import { MockERC20 } from "../mocks/token/MockERC20.sol"; import { MockERC721 } from "../mocks/token/MockERC721.sol"; +import { TestProxyHelper } from "./TestProxyHelper.sol"; + contract DeployHelper { // TODO: three options, auto/mock/real in deploy condition, so that we don't need to manually