Skip to content

Commit 84f546a

Browse files
committed
refactor(host-contracts): narrow canonical recompile scope and drop narration comments
Narrow compile:specific to KMSGeneration.sol (the only contract that reads kmsGenerationAdd after the guard removal), avoiding a full contracts/ recompile in the canonical path. Drop two narration-only comments in deployCanonicalEmptyUUPSProxies. Part of zama-ai/fhevm-internal#1268
1 parent d1ae539 commit 84f546a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

host-contracts/tasks/taskDeploy.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,9 @@ task('task:deployCommonHostContracts').setAction(async function (_, hre) {
5858

5959
task('task:deployCanonicalHostContracts').setAction(async function (_, hre) {
6060
await hre.run('task:deployCanonicalEmptyUUPSProxies');
61-
// Recompile so that contracts importing kmsGenerationAdd pick up the new value.
62-
await hre.run('compile:specific', { contract: 'contracts' });
61+
// KMSGeneration reads its own address from the generated FHEVMHostAddresses.sol, so it must be
62+
// recompiled after deployCanonicalEmptyUUPSProxies wrote kmsGenerationAdd.
63+
await hre.run('compile:specific', { contract: 'contracts/KMSGeneration.sol' });
6364

6465
await hre.run('task:deployKMSGeneration');
6566

@@ -149,10 +150,7 @@ task('task:deployCanonicalEmptyUUPSProxies').setAction(async function (
149150
taskArguments: TaskArguments,
150151
{ ethers, upgrades, run },
151152
) {
152-
// Ensure the addresses directory exists (may already be created by the common task on same run).
153153
ensureAddressesDirectoryExists();
154-
155-
// Compile the EmptyUUPS proxy contract if it has not been compiled in the common flow.
156154
await run('compile:specific', { contract: 'contracts/emptyProxy' });
157155

158156
const privateKey = getRequiredEnvVar('DEPLOYER_PRIVATE_KEY');

0 commit comments

Comments
 (0)