Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
kanej authored Nov 22, 2024
2 parents a110a35 + 1caba02 commit c54eeca
Show file tree
Hide file tree
Showing 659 changed files with 20,664 additions and 411,343 deletions.
5 changes: 5 additions & 0 deletions .changeset/five-eagles-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

fix: don't panic when a precompile errors
5 changes: 0 additions & 5 deletions .changeset/modern-fishes-look.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/silly-flowers-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hardhat": patch
---

Added support for solc versions 0.8.28
23 changes: 15 additions & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
{
"name": "Hardhat + EDR",
"name": "Hardhat",
"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"
"version": "18"
}
},
/* 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"
"postCreateCommand": "scripts/setup.sh",
"containerEnv": {
"ALCHEMY_URL": "${localEnv:ALCHEMY_URL}",
"INFURA_URL": "${localEnv:INFURA_URL}"
},
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode",
"NomicFoundation.hardhat-solidity"
]
}
}
}
5 changes: 4 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*.sol linguist-language=Solidity
# prevent github actions to checkout files with crlf line endings
* -text
* text=auto

*.sol text eol=lf
*.d.ts text eol=lf
43 changes: 43 additions & 0 deletions .github/actions/setup-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Setup env
description: Sets up node and pnpm

inputs:
pnpm-version:
description: Version of pnpm to install
required: false
default: "9"
node-version:
description: Version of node to install
required: false
default: "18"
cache-save:
description: Whether to save the pnpm cache
required: false
default: "false"
outputs:
cache-hit:
description: Whether the cache was restored
value: ${{ steps.setup-node.outputs.cache-hit || steps.cache-restore.outputs.cache-hit }}

runs:
using: composite
steps:
- uses: pnpm/action-setup@v4
with:
version: ${{ inputs.pnpm-version }}
- uses: actions/setup-node@v4
id: setup-node
with:
node-version: ${{ inputs.node-version }}
cache: ${{ inputs.cache-save == 'true' && 'pnpm' || '' }}
cache-dependency-path: "**/pnpm-lock.yaml"
- id: pnpm
if: inputs.cache-save == 'false'
run: pnpm store path --silent | xargs -I {} -0 echo "path={}" | tee -a $GITHUB_OUTPUT
shell: bash
- uses: actions/cache/restore@v4
id: cache-restore
if: inputs.cache-save == 'false'
with:
path: ${{ steps.pnpm.outputs.path }}
key: node-cache-${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
12 changes: 0 additions & 12 deletions .github/dependabot.yml

This file was deleted.

12 changes: 3 additions & 9 deletions .github/workflows/LATEST_DEPENDENCY_VERSIONS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,8 @@ jobs:
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: 16
cache: "pnpm"
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
- name: Delete pnpm-lock.yaml
run: "rm pnpm-lock.yaml"
- name: Install
Expand All @@ -34,7 +28,7 @@ jobs:
run: pnpm test || (echo "===== Retry =====" && pnpm test)
- name: Notify failures
if: failure()
uses: slackapi/slack-github-action@v1.18.0
uses: slackapi/slack-github-action@70cd7be8e40a46e8b0eced40b0de447bdb42f68e # v1.26.0
with:
payload: |
{
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/add-issue-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ jobs:
add-to-project:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@v0.4.0
- uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v1.0.2
with:
project-url: https://github.com/orgs/NomicFoundation/projects/4
github-token: ${{ secrets.ADD_TO_PROJECT_PAT }}
labeled: area:edr
label-operator: NOT
2 changes: 1 addition & 1 deletion .github/workflows/add-label-to-new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const issue = await github.rest.issues.get({
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/autoassign-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ jobs:
permissions:
issues: write
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
// each user has a chance of (p - (previousP ?? 0)) to be assigned
const potentialAssignees = [
["fvictorio", 0.5],
["schaable", 0.75],
["kanej", 1/4],
["schaable", 2/4],
["galargh", 3/4],
["ChristopherDedominici", 1.0],
];
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/autoassign-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PR autoassignment

on:
pull_request_target:
types: [opened]

jobs:
assign-new-issue:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/github-script@v7
with:
script: |
const externalPrTriager = "kanej";
// Within the Github API PRs are issue objects
const pr = await github.rest.issues.get({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number
});
const isCollaborator = ["OWNER", "MEMBER", "COLLABORATOR"].includes(pr.data.author_association)
if (isCollaborator) {
return
}
await github.rest.issues.addAssignees({
owner: context.issue.owner,
repo: context.issue.repo,
issue_number: context.issue.number,
assignees: [externalPrTriager],
});
48 changes: 48 additions & 0 deletions .github/workflows/cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Cache

on:
push:
branches:
- main
- pre-release-testing-branch
- changeset-release/main
- v-next
paths:
- ".github/workflows/cache.yml"
- "**/pnpm-lock.yaml"
pull_request:
paths:
- ".github/workflows/cache.yml"
- "**/pnpm-lock.yaml"
workflow_dispatch:

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

defaults:
run:
shell: bash

jobs:
cache:
name: Cache
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v4
- id: env
uses: ./.github/actions/setup-env
with:
cache-save: true
- name: Install
if: steps.env.outputs.cache-hit != 'true'
run: |
for lockfile in $(find "$(pwd)" -name pnpm-lock.yaml); do
pushd "$(dirname "$lockfile")"
pnpm install --frozen-lockfile --prefer-offline
popd
done
2 changes: 1 addition & 1 deletion .github/workflows/check-changeset-added.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# don't run this check in the changesets PR
if: github.head_ref != 'changeset-release/main'
steps:
- uses: actions/github-script@v6
- uses: actions/github-script@v7
with:
script: |
const pullNumber = context.issue.number;
Expand Down
35 changes: 19 additions & 16 deletions .github/workflows/check-docs-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,34 @@ name: Check Docs Site
on:
push:
branches:
- "**"
- main
paths:
- ".github/workflows/check-docs-site.yml"
- "docs/**"
- "packages/**"
pull_request:
paths:
- ".github/workflows/check-docs-site.yml"
- "docs/**"
- "packages/**"
workflow_dispatch:

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

jobs:
lint:
name: Lint
build:
name: Build Docs
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"
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
- name: Install Docs
run: cd docs && pnpm install --frozen-lockfile --prefer-offline
- name: lint
run: cd docs && pnpm lint
- name: Build
run: cd docs && pnpm build
working-directory: docs/
run: pnpm install --frozen-lockfile --prefer-offline
- name: Build Docs
working-directory: docs/
run: pnpm build
20 changes: 20 additions & 0 deletions .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Close Stale Issues

on:
schedule:
- cron: "0 0 * * *" # Runs daily at midnight UTC
workflow_dispatch:

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Close stale issues
uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: "This issue has been automatically closed due to inactivity. If you still need help, please reopen the issue and provide the requested information."
days-before-stale: 7
days-before-close: 7
only-labels: "status:needs-more-info"
exempt-issue-labels: "status:do-not-close"
54 changes: 0 additions & 54 deletions .github/workflows/comment-on-linter-error.yml

This file was deleted.

Loading

0 comments on commit c54eeca

Please sign in to comment.