Skip to content

Commit 9fdec79

Browse files
authored
fix(foundry): don't use same broadcast file as docker root (#19029)
1 parent bd6c015 commit 9fdec79

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

yarn-project/ethereum/src/deploy_aztec_l1_contracts.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,8 @@ export async function deployAztecL1Contracts(
263263
...(chainId === foundry.id ? ['--batch-size', MAGIC_ANVIL_BATCH_SIZE.toString()] : ['--verify']),
264264
];
265265
const forgeEnv = {
266+
// Protect against root leaving deployment files in docker that cannot be used later.
267+
FOUNDRY_BROADCAST: process.getuid?.() === 0 ? 'broadcast-root' : undefined,
266268
// Env vars required by l1-contracts/script/deploy/DeploymentConfiguration.sol.
267269
NETWORK: getActiveNetworkName(),
268270
FOUNDRY_PROFILE: chainId === mainnet.id ? 'production' : undefined,
@@ -521,6 +523,8 @@ export const deployRollupForUpgrade = async (
521523
'--broadcast',
522524
];
523525
const forgeEnv = {
526+
// Protect against root leaving deployment files in docker that cannot be used later.
527+
FOUNDRY_BROADCAST: process.getuid?.() === 0 ? 'broadcast-root' : undefined,
524528
FOUNDRY_PROFILE: chainId === mainnet.id ? 'production' : undefined,
525529
// Env vars required by l1-contracts/script/deploy/RollupConfiguration.sol.
526530
REGISTRY_ADDRESS: registryAddress.toString(),

0 commit comments

Comments
 (0)