MCPcopy Create free account
hub / github.com/Dstack-TEE/dstack / upgradeApp

Function upgradeApp

kms/auth-eth/test/DstackApp.upgrade.test.ts:41–49  ·  view source on GitHub ↗
(proxy: DstackApp)

Source from the content-addressed store, hash-verified

39 // In a real scenario the new bytecode would differ; hardhat-upgrades still validates
40 // storage layout compatibility and swaps the implementation slot.
41 async function upgradeApp(proxy: DstackApp): Promise<DstackApp> {
42 const factory = await ethers.getContractFactory("DstackApp");
43 const upgraded = await hre.upgrades.upgradeProxy(
44 await proxy.getAddress(),
45 factory,
46 { kind: "uups" }
47 ) as DstackApp;
48 return upgraded;
49 }
50
51 describe("Upgrade from old 5-param initialize", function () {
52 let app: DstackApp;

Callers 1

Calls 1

getContractFactoryMethod · 0.80

Tested by

no test coverage detected