Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"hardhat": patch #2

Closed
wants to merge 2 commits into from
Closed
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
5 changes: 5 additions & 0 deletions .changeset/bright-onions-switch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nomicfoundation/hardhat-chai-matchers": patch
---

Added support for Typed objects (thanks @RenanSouza2!)
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"
}
22 changes: 13 additions & 9 deletions .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,32 @@ on:
workflow_dispatch:

jobs:
test-without-yarn-lock:
name: Test without yarn.lock
test-without-pnpm-lock-yaml:
name: Test without pnpm-lock.yaml
strategy:
matrix:
system: ["ubuntu-latest", "windows-latest"]
runs-on: ${{ matrix.system }}
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/checkout@v2
- name: Delete yarn.lock
run: "rm yarn.lock"
node-version: 16
cache: "pnpm"
- name: Delete pnpm-lock.yaml
run: "rm pnpm-lock.yaml"
- name: Install
run: yarn
run: pnpm install --no-frozen-lockfile
- name: List dependencies
run: yarn list
run: pnpm list -r --depth 2
- name: Run tests
env:
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
FORCE_COLOR: 3
run: yarn test || (echo "===== Retry =====" && yarn test)
run: pnpm test || (echo "===== Retry =====" && pnpm test)
- name: Notify failures
if: failure()
uses: slackapi/[email protected]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
with:
project-url: https://github.com/orgs/NomicFoundation/projects/4
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: area:edr
label-operator: NOT
6 changes: 5 additions & 1 deletion .github/workflows/add-label-to-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,15 @@ jobs:
);

if (statusLabel === undefined) {
console.log("Author association:", issue.data.author_association);
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(issue.data.author_association)
const label = isCollaborator ? "status:ready" : "status:triaging"

await github.rest.issues.addLabels({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
labels: ["status:triaging"]
labels: [label]
});
} else {
console.log(`Issue already has a status: ${statusLabel.name}`);
Expand Down
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],
});
}
2 changes: 2 additions & 0 deletions .github/workflows/check-changeset-added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
check-if-changeset:
name: Check that PR has a changeset
runs-on: ubuntu-latest
# don't run this check in the changesets PR
if: github.head_ref != 'changeset-release/main'
steps:
- uses: actions/github-script@v6
with:
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/check-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Check Docs Site
on:
push:
branches:
- "fr/**"
- "**"
workflow_dispatch:

concurrency:
group: ${{github.workflow}}-${{github.ref}}
Expand All @@ -15,17 +16,18 @@ jobs:
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: yarn
cache: "pnpm"
- name: Install
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile --prefer-offline
- name: Install Docs
run: cd docs && yarn
run: cd docs && pnpm install --frozen-lockfile --prefer-offline
- name: lint
run: cd docs && yarn lint
run: cd docs && pnpm lint
- name: Build
run: cd docs && yarn build
- name: Storybook
run: cd docs && yarn build-storybook
run: cd docs && pnpm build
19 changes: 11 additions & 8 deletions .github/workflows/comment-on-linter-error.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,27 @@ jobs:
uses: actions/checkout@v2
with:
ref: "refs/pull/${{ github.event.number }}/merge"
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/setup-node@v2
with:
node-version: 14
cache: yarn
node-version: 16
cache: "pnpm"
- name: Install
run: yarn --frozen-lockfile
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build
run: yarn build
run: pnpm build
- name: lint
run: yarn lint
run: pnpm lint
- name: Check dependency versions
run: node scripts/check-dependencies.js
- name: Install website
working-directory: docs/
run: yarn
run: pnpm install --frozen-lockfile --prefer-offline
- name: Lint website
working-directory: docs/
run: yarn lint
run: pnpm lint
- uses: actions/github-script@v6
name: Comment on failure
if: ${{ failure() }}
Expand All @@ -47,5 +50,5 @@ jobs:
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Thanks for submitting this PR!\n\nUnfortunately, it has some linter errors, so we can't merge it yet. Can you please fix them?\n\nRunning yarn `lint:fix` in the root of the repository may fix them automatically."
body: "Thanks for submitting this PR!\n\nUnfortunately, it has some linter errors, so we can't merge it yet. Can you please fix them?\n\nRunning pnpm lint:fix in the root of the repository may fix them automatically."
})
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
Loading