From 8353b297ff6f3f9b3f8718f836b0396808d3f98a Mon Sep 17 00:00:00 2001 From: Daniel Dimitrov Date: Wed, 14 Sep 2022 23:46:04 +0200 Subject: [PATCH] Allow contract compile without specifying a .env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the default _accounts require a seed, which is being provided as an environement variable. When cloning the repo and just compiling it’s not necessary to provide a private key. If no PRIVKEY_MNEMONIC is provided I’m setting it to the default value specified in the hardhat docs: https://hardhat.org/hardhat-network/docs/reference --- packages/contracts/hardhat.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contracts/hardhat.config.ts b/packages/contracts/hardhat.config.ts index 5e5696e..14860be 100644 --- a/packages/contracts/hardhat.config.ts +++ b/packages/contracts/hardhat.config.ts @@ -28,7 +28,7 @@ if (isCI) { const pos_url = (process.env.POS_URL as string) || "http://localhost:8545"; const etherscan_goerli_api_key = (process.env.ETHERSCAN_GOERLI_API_KEY as string) || ""; - const seed = process.env.PRIVKEY_MNEMONIC as string; + const seed = process.env.PRIVKEY_MNEMONIC as string || "test test test test test test test test test test test junk"; const default_accounts = { mnemonic: seed, path: "m/44'/60'/0'/0",