From 8c5c21e9e5e1e4005e655c63fa1ec363a8746649 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 25 Oct 2022 12:00:31 +0200 Subject: [PATCH 1/2] Remove incompatible paths-ignore --- .github/workflows/ci-hardhat-common.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-hardhat-common.yml b/.github/workflows/ci-hardhat-common.yml index dcfcd529a..745205e3b 100644 --- a/.github/workflows/ci-hardhat-common.yml +++ b/.github/workflows/ci-hardhat-common.yml @@ -15,8 +15,6 @@ on: - foundry.toml - remappings.txt - .github/workflows/ci-hardhat-common.yml - paths-ignore: - - test/upgrades/** jobs: morpho-hardhat-tests: From b4fb00db1354781ee0686f462bb418d0b645f5c3 Mon Sep 17 00:00:00 2001 From: Rubilmax Date: Tue, 25 Oct 2022 16:18:39 +0200 Subject: [PATCH 2/2] Fix default env variables --- .env.example | 2 +- .github/workflows/ci-hardhat-common.yml | 3 ++- hardhat.config.ts | 8 ++------ package.json | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.env.example b/.env.example index b994bd7a7..276026670 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,4 @@ -NETWORK=eth-mainnet DEPLOYER_PRIVATE_KEY= TENDERLY_SECRET_KEY= +ETHERSCAN_API_KEY= ALCHEMY_KEY= diff --git a/.github/workflows/ci-hardhat-common.yml b/.github/workflows/ci-hardhat-common.yml index 745205e3b..9347ba45e 100644 --- a/.github/workflows/ci-hardhat-common.yml +++ b/.github/workflows/ci-hardhat-common.yml @@ -36,4 +36,5 @@ jobs: - name: Run tests run: yarn test env: - ALCHEMY_KEY: ${{ secrets.alchemyKey }} + NETWORK: eth-mainnet + ALCHEMY_KEY: ${{ secrets.ALCHEMY_KEY }} diff --git a/hardhat.config.ts b/hardhat.config.ts index 05393d5fd..8ee204dc0 100644 --- a/hardhat.config.ts +++ b/hardhat.config.ts @@ -22,9 +22,8 @@ const config: HardhatUserConfig = { networks: { hardhat: { forking: { - enabled: true, - url: `https://${process.env.NETWORK}.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`, - blockNumber: Number(process.env.BLOCK_NUMBER ?? 15_500_000), + url: `https://${process.env.NETWORK || "eth-mainnet"}.g.alchemy.com/v2/${process.env.ALCHEMY_KEY}`, + blockNumber: Number(process.env.BLOCK_NUMBER || 15_500_000), }, }, }, @@ -37,9 +36,6 @@ const config: HardhatUserConfig = { }, }), }, - paths: { - sources: "./contracts/", - }, solidity: { compilers: [ { diff --git a/package.json b/package.json index c2dac63aa..14da167f1 100644 --- a/package.json +++ b/package.json @@ -3,8 +3,8 @@ "version": "1.0.0", "description": "Core contracts of the Morpho Protocol V1.", "scripts": { - "test": "NETWORK=eth-mainnet hardhat test test/*.spec.ts", - "test:upgrade:stEth": "NETWORK=eth-mainnet BLOCK_NUMBER=15580517 hardhat test test/upgrades/stEth.spec.ts", + "test": "hardhat test test/*.spec.ts", + "test:upgrade:stEth": "BLOCK_NUMBER=15580517 hardhat test test/upgrades/stEth.spec.ts", "lint": "yarn lint:sol && yarn lint:ts", "lint:ts": "eslint . --ext .ts", "lint:sol": "solhint 'contracts/**/*.sol'",