Skip to content

Commit

Permalink
♻️ Migrate to Configuration Variables and pnpm & Bump Deps (#65)
Browse files Browse the repository at this point in the history
Signed-off-by: Pascal Marco Caversaccio <[email protected]>
Co-authored-by: Pascal Marco Caversaccio <[email protected]>
  • Loading branch information
fvictorio and pcaversaccio authored Nov 5, 2023
1 parent f6fb88d commit e51c641
Show file tree
Hide file tree
Showing 32 changed files with 11,892 additions and 8,629 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ trim_trailing_whitespace = false

[*.sol]
indent_size = 4
max_line_length = 120
142 changes: 0 additions & 142 deletions .env.example

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 11,
ecmaVersion: 12,
},
plugins: ["@typescript-eslint"],
extends: [
Expand Down
9 changes: 3 additions & 6 deletions .example.networkconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
// Two different examples of network setups for the `xdeployer` plugin (https://github.com/pcaversaccio/xdeployer)
// An example of the network setup for the `xdeployer` plugin (https://github.com/pcaversaccio/xdeployer)

networks: ["mumbai", "fuji", "bscTestnet", "fantomTestnet", "goerli"],
rpcUrls: [process.env.POLYGON_TESTNET_URL, process.env.AVALANCHE_TESTNET_URL, process.env.BSC_TESTNET_URL, process.env.FANTOM_TESTNET_URL, process.env.ETH_GOERLI_TESTNET_URL],

networks: ["polygon", "avalanche", "bscMain", "fantomMain", "ethMain"],
rpcUrls: [process.env.POLYGON_MAINNET_URL, process.env.AVALANCHE_MAINNET_URL, process.env.BSC_MAINNET_URL, process.env.FANTOM_MAINNET_URL, process.env.ETH_MAINNET_URL],
networks: ["sepolia", "optimismTestnet", "arbitrumSepolia"],
rpcUrls: [vars.get("ETH_SEPOLIA_TESTNET_URL", "https://rpc.sepolia.org"), vars.get("OPTIMISM_TESTNET_URL", "https://goerli.optimism.io"), vars.get("ARBITRUM_SEPOLIA_URL", "https://sepolia-rollup.arbitrum.io/rpc")],
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ body:
Please check the [issues tab](https://github.com/pcaversaccio/hardhat-project-template-ts/issues) to avoid duplicates.
Thanks for taking the time to fill out this bug report!
type: markdown

- attributes:
label: "Describe the issue:"
id: what-happened
type: textarea
validations:
required: true

- attributes:
label: "Code example to reproduce the issue:"
description: "It can be a GitHub repository/gist or a simple code snippet."
Expand All @@ -25,6 +27,7 @@ body:
type: textarea
validations:
required: true

- attributes:
label: "Version:"
description: |
Expand All @@ -34,6 +37,7 @@ body:
type: textarea
validations:
required: true

- attributes:
label: "Relevant log output:"
description: |
Expand Down
6 changes: 4 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request
description: Suggest an idea for Hardhat project template.
name: "Feature Request"
description: "Suggest an idea for Hardhat project template."
title: "[Feature-Request]: "
labels:
- enhancement
Expand All @@ -11,13 +11,15 @@ body:
Please check the [issues tab](https://github.com/pcaversaccio/hardhat-project-template-ts/issues) to avoid duplicates.
Thanks for taking the time to provide feedback on my Hardhat project template!
type: markdown

- attributes:
label: "Describe the desired feature:"
description: Explain what the feature solves/improves.
id: feature-request
type: textarea
validations:
required: true

- attributes:
label: "Code example that solves the feature:"
description: "It can be a GitHub repository/gist or a simple code snippet."
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,35 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest
run_install: false

- name: Get pnpm cache directory path
id: pnpm-cache-dir-path
run: echo "dir=$(pnpm store path --silent)" >> $GITHUB_OUTPUT

- name: Restore Yarn cache
- name: Restore pnpm cache
uses: actions/cache@v3
id: yarn-cache
id: pnpm-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-pnpm-store-
- name: Use Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- name: Install Yarn project with a clean slate
run: yarn install --prefer-offline --frozen-lockfile
- name: Install pnpm project with a clean slate
run: pnpm install --prefer-offline --frozen-lockfile

- name: Prettier and lint
run: yarn lint:check
run: pnpm lint:check

codespell:
runs-on: ${{ matrix.os }}
Expand All @@ -59,7 +65,7 @@ jobs:
uses: codespell-project/[email protected]
with:
check_filenames: true
skip: ./.git,./contracts/lib,yarn.lock
skip: ./.git,pnpm-lock.yaml

validate-links:
runs-on: ${{ matrix.os }}
Expand All @@ -84,4 +90,4 @@ jobs:
run: gem install awesome_bot

- name: Validate URLs
run: awesome_bot ./*.md contracts/src/*.sol contracts/test/*.sol --request-delay 0.4 --white-list http://localhost:24012,https://trezor.io
run: awesome_bot ./*.md contracts/src/*.sol contracts/test/*.sol --request-delay 0.4 --white-list http://localhost:24012
Loading

0 comments on commit e51c641

Please sign in to comment.