(
allowAnyDevice: boolean,
initialDeviceId: string,
initialComposeHash: string
)
| 18 | |
| 19 | // Deploy a proxy using the old 5-param initialize to simulate a pre-upgrade deployment. |
| 20 | async function deployOldApp( |
| 21 | allowAnyDevice: boolean, |
| 22 | initialDeviceId: string, |
| 23 | initialComposeHash: string |
| 24 | ): Promise<DstackApp> { |
| 25 | const factory = await ethers.getContractFactory("DstackApp"); |
| 26 | const proxy = await hre.upgrades.deployProxy( |
| 27 | factory, |
| 28 | [owner.address, false, allowAnyDevice, initialDeviceId, initialComposeHash], |
| 29 | { |
| 30 | kind: "uups", |
| 31 | initializer: "initialize(address,bool,bool,bytes32,bytes32)", |
| 32 | } |
| 33 | ) as DstackApp; |
| 34 | await proxy.waitForDeployment(); |
| 35 | return proxy; |
| 36 | } |
| 37 | |
| 38 | // Upgrade an existing proxy to the (same, current) DstackApp implementation. |
| 39 | // In a real scenario the new bytecode would differ; hardhat-upgrades still validates |
no test coverage detected