Skip to content

Commit

Permalink
Update environment configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
evercoinx committed Aug 29, 2024
1 parent f425179 commit 486c3b3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .env.test.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ TREASURY=
FX_ROOT=
FX_CHILD=
CHECKPOINT_MANAGER=
DEFENDER_TEAM_API_KEY=
DEFENDER_TEAM_API_SECRET_KEY=
DEFENDER_TEAM_API_KEY=1234567890ABCDEF1234567890abcdef
DEFENDER_TEAM_API_SECRET_KEY=1234567890ABCDEF1234567890abcde1234567890ABCDEF1234567890abcdeff
6 changes: 4 additions & 2 deletions environment.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import * as dotenv from "dotenv";
import * as path from "path";
import { ethers } from "ethers";

const envSuffix = process.env.NODE_ENV === "main" ? "" : ".test";
const exampleSuffix = process.env.CI ? ".example" : "";

dotenv.config({ path: path.join(__dirname, ".env" + envSuffix) });
dotenv.config({
path: `.env${envSuffix}${exampleSuffix}`,
});

const DEPLOYER_PRIVATE_KEY =
process.env.DEPLOYER_PRIVATE_KEY || ethers.Wallet.createRandom().privateKey;
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ const config: HardhatUserConfig = {
target: "ethers-v5",
},
mocha: {
reporter: "spec",
reporter: process.env.CI ? "dot" : "spec",
timeout: "1h",
},
etherscan: {
Expand Down

0 comments on commit 486c3b3

Please sign in to comment.