Skip to content

Commit

Permalink
Rename FACTORY environment variable to USE_FACTORY for clarity and up…
Browse files Browse the repository at this point in the history
…date related references
  • Loading branch information
Le-Caignec committed Jan 6, 2025
1 parent b485bf1 commit 8d7e136
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ IS_LOCAL_FORK=...
IEXEC_POCO_ADDRESS=...

# Indicates whether the deployment involves a factory contract
FACTORY=...
USE_FACTORY=...
2 changes: 1 addition & 1 deletion config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const envSchema = z.object({
.string()
.regex(addressRegex, 'Invalid Ethereum address if provided')
.optional(),
FACTORY: z.preprocess(
USE_FACTORY: z.preprocess(
(val) => typeof val === 'string' && val.toLowerCase() === 'true',
z.boolean().default(false),
),
Expand Down
4 changes: 2 additions & 2 deletions deploy/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ export async function getDeploymentConfig(chainId: number) {
if (!ethers.isAddress(config.pocoAddress)) {
throw new Error('Valid PoCo address must be provided');
}
if (env.FACTORY) {
config.factory = env.FACTORY;
if (env.USE_FACTORY) {
config.factory = env.USE_FACTORY;
}
return config;
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"prepare": "husky",
"build": "npx hardhat compile",
"test": "npx hardhat test",
"test-ci": "npm run test && FACTORY=false npm run test",
"test-ci": "npm run test && USE_FACTORY=false npm run test",
"coverage": "npx hardhat coverage",
"format": "npx prettier --write",
"doc": "npx hardhat docgen",
Expand Down

0 comments on commit 8d7e136

Please sign in to comment.