Skip to content

Commit

Permalink
Merge pull request #4457 from NomicFoundation/hardhat-viem
Browse files Browse the repository at this point in the history
hardhat-viem
  • Loading branch information
fvictorio authored Oct 11, 2023
2 parents 69fd01a + 968c903 commit 03b97fe
Show file tree
Hide file tree
Showing 83 changed files with 4,315 additions and 44 deletions.
5 changes: 5 additions & 0 deletions .changeset/six-pants-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added a viem option to the project initialization
5 changes: 5 additions & 0 deletions .github/workflows/compile-with-typescript-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@ jobs:
- name: Install typescript v4 in all packages
run: |
sed -i 's/"typescript": "~5.0.0"/"typescript": "^4.0.0"/' package.json packages/*/package.json && yarn
# hardhat-viem is the only package that requires TypeScript v5
- name: Remove hardhat-viem directory
run: rm -fr packages/hardhat-viem
- name: Remove hardhat-viem from the build script
run: sed -i 's/packages\/hardhat-viem packages\/hardhat-toolbox-viem//' package.json
- name: Build
run: yarn build
81 changes: 81 additions & 0 deletions .github/workflows/hardhat-viem-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: hardhat-viem CI

on:
push:
branches: main
paths:
- "packages/hardhat-viem/**"
- "packages/hardhat-core/**"
- "packages/hardhat-common/**"
- "config/**"
pull_request:
branches:
- "**"
paths:
- "packages/hardhat-viem/**"
- "packages/hardhat-core/**"
- "packages/hardhat-common/**"
- "config/**"
workflow_dispatch:

defaults:
run:
working-directory: packages/hardhat-viem

concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true

jobs:
test_on_windows:
name: Test hardhat-viem on Windows with Node 16
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
- name: Install
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test

test_on_macos:
name: Test hardhat-viem on MacOS with Node 16
runs-on: macos-latest
# disable until actions/virtual-environments#4896 is fixed
if: ${{ false }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
cache: yarn
- name: Install
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test

test_on_linux:
name: Test hardhat-viem on Ubuntu with Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, 20]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: yarn
- name: Install
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Run tests
run: yarn test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,4 @@ Cargo.lock

# VSCode settings
.vscode/
*.code-workspace
2 changes: 2 additions & 0 deletions config/eslint/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ module.exports.slowImportsCommonIgnoredModules = [
"hardhat/builtin-tasks/task-names",
"hardhat/internal/core/errors",
"hardhat/internal/core/providers/util",
"hardhat/internal/util/fs-utils",
"hardhat/utils/contract-names",
"hardhat/utils/source-names",
];
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ order:
- href: /vscode-tests
title: Running tests in VS Code
- /using-esm
- /using-viem
Loading

0 comments on commit 03b97fe

Please sign in to comment.