Skip to content

Commit

Permalink
use test deploy proxy helper to unblock
Browse files Browse the repository at this point in the history
  • Loading branch information
Ramarti committed Mar 21, 2024
1 parent e079f9c commit d2c6948
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
9 changes: 6 additions & 3 deletions script/foundry/deployment/Main.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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),
Expand Down
3 changes: 2 additions & 1 deletion test/foundry/utils/DeployHelper.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d2c6948

Please sign in to comment.