From 8e77df8f9084be4aa75dfe6d51ac7cefb233d5e1 Mon Sep 17 00:00:00 2001 From: Ruben Dinis Date: Wed, 1 May 2024 11:36:10 +0100 Subject: [PATCH] Educate for pk management --- .github/workflows/test.yml | 5 +++-- hardhat.config.ts | 11 ++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9dd92d1..f689e9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,7 +5,7 @@ on: branches: - master tags: - - '*' + - "*" pull_request: types: [opened, synchronize] @@ -16,12 +16,13 @@ jobs: env: FORCE_COLOR: true + PRIVATE_KEY: ${{secrets.PRIVATE_KEY}} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2 with: - node-version: '16' + node-version: "16" - name: Get yarn cache directory path id: yarn-cache-dir-path diff --git a/hardhat.config.ts b/hardhat.config.ts index c9bd97e..277b5a4 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -14,11 +14,8 @@ dotenv.config(); import type { HardhatUserConfig } from "hardhat/config"; -const deployer = { - mnemonic: process.env.MNEMONIC || "test test test test test test test test test test test junk", -}; - -// const deployer = [""]; +// Never hardcode a pk here. Use the .env file +const deployer = [process.env.PRIVATE_KEY]; task("accounts", "Prints the list of accounts", async (args, hre) => { const accounts = await hre.ethers.getSigners(); @@ -83,8 +80,8 @@ const config: HardhatUserConfig = { alfajores: process.env.CELO_API_KEY || "", polygon: process.env.POLYGON_API_KEY || "", polygonMumbai: process.env.POLYGON_API_KEY || "", - base: "", - baseSepolia: "", + base: process.env.POLYGON_API_KEY || "", + baseSepolia: process.env.POLYGON_API_KEY || "", }, // Custom chains that are not supported by default customChains: [