Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into chore/3925-ci-improve…
Browse files Browse the repository at this point in the history
…ments
  • Loading branch information
galargh committed Jun 25, 2024
2 parents 1911acf + 91f6e21 commit 6e86198
Show file tree
Hide file tree
Showing 32 changed files with 629 additions and 63 deletions.
5 changes: 0 additions & 5 deletions .changeset/seven-tips-float.md

This file was deleted.

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

Add support for Node v22
5 changes: 0 additions & 5 deletions .changeset/strange-ladybugs-end.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tall-coins-sin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tall-jokes-judge.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/thick-beers-tie.md

This file was deleted.

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

Added hardfork histories for Optimim and Arbitrum chains
5 changes: 0 additions & 5 deletions .changeset/wise-cheetahs-confess.md

This file was deleted.

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@v8
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"
6 changes: 5 additions & 1 deletion .github/workflows/hardhat-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ jobs:
matrix:
package: ${{ fromJSON(needs.packages.outputs.packages) }}
runner: [windows-latest, macos-latest, ubuntu-latest]
node_version: [18, 20]
node_version: [18, 20, 22]
exclude:
- package: hardhat-vyper
runner: windows-latest
Expand All @@ -142,6 +142,10 @@ jobs:
node_version: 20
- runner: macos-latest
node_version: 20
- runner: windows-latest
node_version: 22
- runner: macos-latest
node_version: 22
defaults:
run:
working-directory: packages/${{ matrix.package }}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/hardhat-core-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# TODO: Currently there is no @types/node for Node 22,
# include it when it is available.
node: [18, 20]
steps:
- uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]
node: [18, 20, 22]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-env
Expand Down
7 changes: 7 additions & 0 deletions FUNDING.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"drips": {
"ethereum": {
"ownedBy": "0xbF38a8Dac2AB41e72532c71fcF7Bd703432f3713"
}
}
}
24 changes: 12 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
# Hardhat documentation website

This is a NextJS-based application for the Hardhat documentation website. This app is utilizing SSG for creating pages on the build step. It's developed keeping the best practices in mind including accessibility, SEO and Performance optimizations, and scalability
This is a NextJS-based application for the Hardhat documentation website. This app utilizes SSG for creating pages during the build step. It is developed with best practices in mind, including accessibility, SEO, performance optimizations, and scalability.

The app mainly provides two types of pages:

- landing pages (see home page)
- documentation pages (see documentation section)
- Landing pages (see home page)
- Documentation pages (see documentation section)

Landing pages are composed of reusable blocks and separate content files. Blocks are full-width React Components that can be stacked to compose a page. Blocks output content passed to them via props.

Documentation pages are generated from markdown files located in the `src/content` folder. This folder has a nesting structure that is mapped to the page URLs on the website.

It's assumed that the app will be hosted on the Vercel platform which is highly optimized for SSG apps.
It is assumed that the app will be hosted on the Vercel platform, which is highly optimized for SSG apps.

We consider two directions of the follow-up application growing:
We consider two directions for the follow-up application growth:

- by creating and editing new content.
- by adding new features to the app.
- Creating and editing new content
- Adding new features to the app

The first one can be provided by working with human-friendly file formats located in the content folder (MD and YAML). Only minimal tech knowledge is needed for that. The second way requires developers' efforts.

Expand All @@ -28,13 +28,13 @@ https://hardhat-lime.vercel.app/

Website content is located in `*.md` files within `src/content` folder. It's written in Markdown syntax. Folders structure in `content` is reflected on the website.

To tune pages, behavior and appearance also use optional `*.yaml` files with additional configurations.
To adjust page behavior and appearance, also use optional `*.yaml` files with additional configurations.

To preview content locally, launch the app with `pnpm dev` and open http://127.0.0.1:3000 in your browser. See details in [Development](#development) section.

### Layouts

All content is organized by hierarchy levels and the top-level entries are layouts. The layout represents a set of folders and provides navigation within them. Currently, a folder should belong to one of the layouts. In terms of UI, the layout is equal to a sidebar navigation menu with two-level items. Layouts settings can be found in the `src/content/layouts.yaml` file. It contains all layouts (currently "documentation" and "tutorial"). Each layout can have the following settings:
All content is organized by hierarchy levels and the top-level entries are layouts. The layout represents a set of folders and provides navigation within them. Currently, a folder should belong to one of the layouts. In terms of UI, the layout is equivalent to a sidebar navigation menu with two-level items. Layout settings can be found in the `src/content/layouts.yaml` file. It contains all layouts (currently "documentation" and "tutorial"). Each layout can have the following settings:

- title (optional)
- folders - the list of folders should be included in this layout
Expand Down Expand Up @@ -147,7 +147,7 @@ Open [http://127.0.0.1:3000](http://127.0.0.1:3000) with your browser to see the

You can start editing the page by modifying `src/pages/...`. The page auto-updates as you edit the file.

### Folders structure
### Folder structure

When developing the application you might need these main folders

Expand All @@ -173,14 +173,14 @@ Each component can be exposed with different states (stories) independently by p

We also deploy updated storybook on each build. You can find it on https://hardhat-storybook.netlify.app/

## Content generating tech details
## Content generating technical details

There are two relatively independent processes in the build step:

1. Generating pages themselves. We get page paths directly from the files located in the content folder. Their paths are mapped to the page routes. Layout settings don't affect to page's existence.
2. Generating layouts and mapping layouts to pages. For that, we're checking which folders belong to what layout and assigning that layout to a page

Page paths are generated in the `getStaticPaths` functions in files of the `page` folder. The result of these functions is an array of page paths. Page pros are generated with the `getStaticProps` function which is executed once per page with a page path passed as an argument and returns all required page props.
Page paths are generated in the `getStaticPaths` functions in files of the `page` folder. The result of these functions is an array of page paths. Page props are generated with the `getStaticProps` function, which is executed once per page with a page path passed as an argument and returns all required page props.

Execution of `getStaticPaths` and `getStaticProps` is handled by NextJS on a build step and it runs them in isolation (which means we can't share common calculated parameters within them). To optimize building time, we store an intermediate config in a temporary file on the `getStaticPaths` execution and read it from `getStaticProps` functions. It contains layout settings and a map of pages with specific props.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/hardhat-network/docs/overview/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It runs as either an in-process or stand-alone daemon, servicing JSON-RPC and We

By default, it mines a block with each transaction that it receives, in order and with no delay.

It's backed by the `@ethereumjs/vm` EVM implementation, the same one used by ganache and Remix.
It's backed by [EDR](https://github.com/NomicFoundation/edr), Nomic Foundation's Ethereum development runtime implementation for building developer tools.

## How can I use it?

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ We will only introduce these changes when a hardfork activates on Mainnet. This

## Node.js versions support

Hardhat supports every currently maintained LTS Node.js version, up to two months after its end-of-life. After that period of time, we will stop testing against it, and print a warning when trying to use it. At that point, we will release a new minor version.
Hardhat works with every released and supported **even** Node.js version. This includes all **even** Node.js versions with a release status of: `Current`, `Active LTS` or `Maintenance`. Hardhat will cease support two months after the Node.js version's end-of-life. After that period of time, we will stop testing against it, and print a warning when trying to use it. At that point, we will release a new minor version.

We recommend running Hardhat using the current LTS Node.js version. You can learn about it [here](https://nodejs.org/en/about/previous-releases).
We recommend running Hardhat using the latest _Active LTS_ Node.js version. You can learn about more Node.js releases [here](https://github.com/nodejs/Release).

## How to avoid the breaking changes introduced by Hardhat

Expand Down
1 change: 1 addition & 0 deletions docs/src/content/ignition/docs/guides/_dirinfo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ order:
- /verify
- /viem
- /create2
- /upgradeable-proxies
- /ledger
- /scripts
Loading

0 comments on commit 6e86198

Please sign in to comment.