Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/beige-ladybugs-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added a notification when a new Hardhat version is available
7 changes: 7 additions & 0 deletions .changeset/curvy-cherries-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@nomicfoundation/hardhat-chai-matchers": patch
"hardhat": patch
"@nomicfoundation/hardhat-viem": patch
---

Improved loading performance
5 changes: 5 additions & 0 deletions .changeset/dry-pianos-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Fixed a bug during project initialization when using yarn or pnpm
5 changes: 5 additions & 0 deletions .changeset/modern-fishes-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added a fix to prevent submitting transactions with 0 priority fee (thanks @itsdevbear!)
5 changes: 5 additions & 0 deletions .changeset/twelve-mails-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/hardhat-verify": patch
---

Added support for programmatic verification in Sourcify
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Hardhat + EDR",
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "16" /* Keep in sync with the oldest version of Node.js that Hardhat supports */
},
"ghcr.io/devcontainers/features/rust:1": {
"version": "1.70" /* Keep in sync with rust-toolchain */,
"profile": "default"
}
},
/* libudev-dev is required by hardhat-ledger. pkg-config is required by EDR to use OpenSSL */
"postCreateCommand": "sudo apt update && sudo apt install -y libudev-dev pkg-config"
}
60 changes: 60 additions & 0 deletions .github/workflows/autoassign-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Issue autoassignment

on:
issues:
types: [opened]

jobs:
assign-new-issue:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/github-script@v6
with:
script: |
// each user has a chance of (p - (previousP ?? 0)) to be assigned
const potentialAssignees = [
["fvictorio", 0.5],
["schaable", 0.75],
["ChristopherDedominici", 1.0],
];

let assignee;
const r = Math.random();
console.log("r:", r);
for (const [username, p] of potentialAssignees) {
if (r < p) {
assignee = username;
break;
}
}

if (assignee === undefined) {
throw new Error("An assignee should've been set");
}

console.log("assignee:", assignee);

console.log("Fetch issue", context.issue.number);
const issue = await github.rest.issues.get({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
});

console.log("Author association:", issue.data.author_association);
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(
issue.data.author_association
);
console.log("Is collaborator?", isCollaborator);

// we only assign triage issues from external users
if (!isCollaborator) {
await github.rest.issues.addAssignees({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
assignees: [assignee],
});
}
32 changes: 32 additions & 0 deletions .github/workflows/compile-with-typescript-v4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Compile with typescript v4

on:
push:
branches: main
pull_request:
branches:
- "**"
workflow_dispatch:

jobs:
compile_with_typescript_v4:
name: Compile with typescript v4
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- name: Remove packages that can't be compiled with TypeScript v4
run: rm -fr packages/hardhat-viem packages/hardhat-toolbox-viem packages/hardhat-web3-v4
- name: Remove packages that can't be compiled with TypeScript v4 from the build script
run: sed -i 's/packages\/\(hardhat-viem\|hardhat-toolbox-viem\|hardhat-web3-v4\) *//g' package.json
- name: Install typescript v4 in all packages
run: |
sed -i 's/"typescript": "~5.0.0"/"typescript": "^4.0.0"/' package.json packages/*/package.json && pnpm install --no-frozen-lockfile
- name: Build
run: pnpm build
34 changes: 34 additions & 0 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: E2E tests

on:
push:
branches:
- "**"

jobs:
run-e2e:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Run E2E tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 18
- name: Run fixture-projects script
run: |
cd e2e
chmod +x run-fixture-projects.sh
./run-fixture-projects.sh
shell: bash
- name: Run test-project-initialization script
run: |
cd e2e
chmod +x test-project-initialization.sh
./test-project-initialization.sh
shell: bash
91 changes: 91 additions & 0 deletions .github/workflows/hardhat-ledger-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: hardhat-ledger CI

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

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

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

jobs:
test_on_windows:
name: Test hardhat-ledger on Windows with Node 16
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm test

test_on_macos:
name: Test hardhat-ledger 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: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm test

test_on_linux:
name: Test hardhat-ledger on Ubuntu with Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18, 20]
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm test
90 changes: 90 additions & 0 deletions .github/workflows/hardhat-viem-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
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: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm 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: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 16
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm 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: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: pnpm build
- name: Run tests
run: pnpm test
Loading
Loading