Skip to content

Commit 9c9cc39

Browse files
committed
Merge branch 'main' into chore/merge-in-main
2 parents e482233 + 2151bce commit 9c9cc39

File tree

2,917 files changed

+106759
-53412
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,917 files changed

+106759
-53412
lines changed

.changeset/flat-hornets-yell.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@nomicfoundation/hardhat-verify": patch
3+
---
4+
5+
Ink networks added

.changeset/fluffy-sloths-walk.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
Fix heuristic to detect that an ESM project doesn't have a Hardhat config with an explicit `.cjs` extension.

.github/PULL_REQUEST_TEMPLATE.md

+9
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ Please:
77
- consider the checklist items below
88
- keep the ones that make sense for your PR, and
99
- DELETE the items that DON'T make sense for your PR.
10+
11+
## Note about small PRs and airdrop farming
12+
13+
We generally really appreciate external contributions, and strongly encourage meaningful additions and fixes! However, due to a recent increase in small PRs potentially created to farm airdrops, we might need to close a PR without explanation if any of the following apply:
14+
15+
- It is a change of very minor value that still requires additional review time/fixes (e.g. PRs fixing trivial spelling errors that can’t be merged in less than a couple of minutes due to incorrect suggestions)
16+
- It introduces inconsequential changes (e.g. rewording phrases)
17+
- The author of the PR does not respond in a timely manner
18+
- We suspect the Github account of the author was created for airdrop farming
1019
-->
1120

1221
- [ ] Because this PR includes a **bug fix**, relevant tests have been included.

.github/workflows/autoassign-issues.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ jobs:
1515
script: |
1616
// each user has a chance of (p - (previousP ?? 0)) to be assigned
1717
const potentialAssignees = [
18-
["kanej", 1/3],
19-
["schaable", 2/3],
18+
["kanej", 1/4],
19+
["schaable", 2/4],
20+
["galargh", 3/4],
2021
["ChristopherDedominici", 1.0],
2122
];
2223

.github/workflows/hardhat-core-ci.yml

+6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ on:
1818
- "packages/hardhat-core/**"
1919
- "packages/hardhat-common/**"
2020
workflow_dispatch:
21+
inputs:
22+
test-all-solc-versions:
23+
description: Test all solc versions
24+
required: false
25+
default: "false"
2126

2227
defaults:
2328
run:
@@ -63,6 +68,7 @@ jobs:
6368
DO_NOT_SET_THIS_ENV_VAR____IS_HARDHAT_CI: true
6469
FORCE_COLOR: 3
6570
NODE_OPTIONS: --max-old-space-size=4096
71+
HARDHAT_TESTS_ALL_SOLC_VERSIONS: ${{ github.event.inputs.test-all-solc-versions}}
6672
run: pnpm test:except-provider
6773

6874
test-provider:

CONTRIBUTING.md

+9
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,12 @@ When tests are run, Hardhat gets initialized multiple times, and that means unlo
139139
This problem is normally not present if you are monkey-patching an object that you initialized, but it is when monkey-patching a class, its prototype, or a singleton object initialized by the library itself.
140140

141141
For an example on how to do it properly, please take a look at the `hardhat-truffle5` plugin.
142+
143+
## Note about small PRs and airdrop farming
144+
145+
We generally really appreciate external contributions, and strongly encourage meaningful additions and fixes! However, due to a recent increase in small PRs potentially created to farm airdrops, we might need to close a PR without explanation if any of the following apply:
146+
147+
- It is a change of very minor value that still requires additional review time/fixes (e.g. PRs fixing trivial spelling errors that can’t be merged in less than a couple of minutes due to incorrect suggestions)
148+
- It introduces inconsequential changes (e.g. rewording phrases)
149+
- The author of the PR does not respond in a timely manner
150+
- We suspect the Github account of the author was created for airdrop farming

config/eslint/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports.slowImportsCommonIgnoredModules = [
2-
"chalk",
2+
"picocolors",
33
"debug",
44
"find-up",
55
"fs-extra",

docs/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ To preview content locally, launch the app with `pnpm dev` and open http://127.0
3737
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:
3838

3939
- title (optional)
40-
- folders - the list of folders should be included in this layout
40+
- folders - the list of folders that should be included in this layout
4141

4242
### Folders
4343

@@ -70,7 +70,7 @@ All documentation content is represented by `*.md` files with Markdown syntax. B
7070

7171
### Redirects
7272

73-
Redirects allow you to redirect an incoming request path to a different destination path. Redirects settings are located in `redirects.config.js` file. It exports an array of objects. Each object represents a single redirect option. We utilize [NextJS Redirects](https://nextjs.org/docs/api-reference/next.config.js/redirects) API for that.
73+
Redirects allow you to redirect an incoming request path to a different destination path. Redirects settings are located in `redirects.config.js` file. It exports an array of objects. Each object represents a single redirect option. We utilize [NextJS Redirects](https://nextjs.org/docs/app/api-reference/config/next-config-js/redirects) API for that.
7474

7575
### Tabs
7676

@@ -177,7 +177,7 @@ We also deploy updated storybook on each build. You can find it on https://hardh
177177

178178
There are two relatively independent processes in the build step:
179179

180-
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.
180+
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 page existence.
181181
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
182182

183183
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.
@@ -186,11 +186,11 @@ Execution of `getStaticPaths` and `getStaticProps` is handled by NextJS on a bui
186186

187187
## Styling
188188

189-
We utilize [Linaria](https://github.com/callstack/linaria) for styling components. It has the "Styled Components" syntax but generates css without runtime with works fine with SSG sites.
189+
We utilize [Linaria](https://github.com/callstack/linaria) for styling components. It has the "Styled Components" syntax but generates css without runtime which works fine with SSG sites.
190190

191191
## Theming
192192

193-
The documentation section is Themable. A user can switch between light, dark and high contrast themes for their convenience. There is also an "Auto" setting when theme is selected based on a user system settings.
193+
The documentation section is Themeable. A user can switch between light, dark and high contrast themes for their convenience. There is also an "Auto" setting when theme is selected based on a user system settings.
194194

195195
Theming solution provides abilities to switch themes, keep the selected value in user's local storage, seamlessly keep selected page on navigating and page refreshing.
196196

@@ -200,7 +200,7 @@ Landing pages don't support themes.
200200

201201
## Creating new landings
202202

203-
Landing pages contains special "blocks" see src/components/landingBlocks. To create a new landing page start from copying `/pages/index.tsx` and `src/content/home.ts`. You can create another page by reordering existing blocks and passing another content to them. If necessary create new landing blocks.
203+
Landing pages contain special "blocks" see src/components/landingBlocks. To create a new landing page start from copying `/pages/index.tsx` and `src/content/home.ts`. You can create another page by reordering existing blocks and passing another content to them. If necessary create new landing blocks.
204204

205205
## CI/CD
206206

docs/redirects.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ const customRedirects = [
105105
"https://cryptpad.fr/form/#/2/form/view/pV-DdryeJoYUWvW+gXsFaMNynEY7t5mUsgeD1urgwSE",
106106
permanent: false,
107107
},
108+
{
109+
source: "/solidity-survey-2024",
110+
destination:
111+
"https://cryptpad.fr/form/#/2/form/view/9xjPVmdv8z0Cyyh1ejseMQ0igmx-TedH5CPST3PhRUk",
112+
permanent: false,
113+
},
108114
{
109115
source: "/solc-viair",
110116
destination:

docs/src/components/CookiePopUp.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const Container = styled.section`
2121
flex-direction: column;
2222
max-width: 332px;
2323
${media.md} {
24-
width: 332spx;
24+
width: 332px;
2525
margin: 0px 24px;
2626
left: unset;
2727
}

docs/src/config.ts

+9-5
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ export const SOCIALS_LINKS = {
2222
[SocialsEnum.DISCORD]: "/discord",
2323
};
2424

25-
export const BANNER_LINK = "https://nomic.foundation/hiring";
26-
2725
export const PRIVACY_POLICY_PATH = "/privacy-policy.html";
2826

27+
// export const bannerContent = {
28+
// text: "Join the Hardhat team! Nomic Foundation is hiring",
29+
// shortText: "Join the Hardhat team! We are hiring",
30+
// href: "https://nomic.foundation/hiring",
31+
// };
32+
2933
export const bannerContent = {
30-
text: "Join the Hardhat team! Nomic Foundation is hiring",
31-
shortText: "Join the Hardhat team! We are hiring",
32-
href: BANNER_LINK,
34+
text: "Please take a few minutes to complete the 2024 Solidity Survey",
35+
shortText: "Complete the 2024 Solidity Survey here",
36+
href: "https://hardhat.org/solidity-survey-2024",
3337
};
3438

3539
export const DOCS_PATH = path.join(process.cwd(), "src/content/");

docs/src/content/hardhat-chai-matchers/docs/migrate-from-waffle.md

+18-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep
88

99
1. Uninstall the `@nomiclabs/hardhat-waffle` and `ethereum-waffle` packages:
1010

11-
::::tabsgroup{options="npm 7+,npm 6,yarn"}
11+
::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"}
1212

1313
:::tab{value="npm 7+"}
1414

@@ -34,11 +34,19 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep
3434

3535
:::
3636

37+
:::tab{value="pnpm"}
38+
39+
```
40+
pnpm remove @nomiclabs/hardhat-waffle ethereum-waffle
41+
```
42+
43+
:::
44+
3745
::::
3846

3947
2. Then install the Hardhat Chai Matchers plugin:
4048

41-
::::tabsgroup{options="npm 7+,npm 6,yarn"}
49+
::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"}
4250

4351
:::tab{value="npm 7+"}
4452

@@ -64,6 +72,14 @@ The `@nomicfoundation/hardhat-chai-matchers` plugin is meant to be a drop-in rep
6472

6573
:::
6674

75+
:::tab{value="pnpm"}
76+
77+
```
78+
pnpm add -D @nomicfoundation/hardhat-chai-matchers
79+
```
80+
81+
:::
82+
6783
::::
6884

6985
3. In your Hardhat config, import the Hardhat Chai Matchers plugin and remove the `hardhat-waffle` one:

docs/src/content/hardhat-chai-matchers/docs/overview.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The `hardhat-chai-matchers` plugin is designed to work with `hardhat-ethers`. At
1717

1818
## Installation
1919

20-
::::tabsgroup{options="npm 7+,npm 6,yarn"}
20+
::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"}
2121

2222
:::tab{value="npm 7+"}
2323

@@ -43,6 +43,14 @@ yarn add --dev @nomicfoundation/hardhat-chai-matchers
4343

4444
:::
4545

46+
:::tab{value="pnpm"}
47+
48+
```
49+
pnpm add -D @nomicfoundation/hardhat-chai-matchers
50+
```
51+
52+
:::
53+
4654
::::
4755

4856
## How can I use it?
@@ -146,7 +154,7 @@ await expect(contract.divideBy(1)).not.to.be.revertedWithPanic(
146154

147155
You can omit the panic code in order to assert that the transaction reverted with _any_ panic code.
148156

149-
The `revertedWithCustomError` matcher allows you to assert that a transaction reverted with a specific [custom error](https://docs.soliditylang.org/en/v0.8.14/contracts.html#errors-and-the-revert-statement):
157+
The `revertedWithCustomError` matcher allows you to assert that a transaction reverted with a specific [custom error](https://docs.soliditylang.org/en/v0.8.14/contracts.html#errors-and-the-revert-statement). Please note that this matcher does not check whether the error was emitted by the contract. It merely uses the contract interface to determine the full signature of the expected error. You can use it as follows:
150158

151159
```js
152160
await expect(contract.call()).to.be.revertedWithCustomError(

docs/src/content/hardhat-chai-matchers/docs/reference.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ await expect(token.transfer(address, 0)).to.be.revertedWithCustomError(
6666
);
6767
```
6868

69-
The first argument must be the contract that defines the error.
69+
The first argument must be the contract that defines the error. The contract is used to determine the full signature of the expected error. The matcher does not check whether the error was emitted by the contract.
7070

7171
If the error has arguments, the `.withArgs` matcher can be added:
7272

@@ -259,7 +259,7 @@ expect("0x1234").to.be.properHex(4);
259259

260260
### `.hexEqual`
261261

262-
Assert that the given strings hexadecimal strings correspond to the same numerical value:
262+
Assert that the given hexadecimal strings correspond to the same numerical value:
263263

264264
```ts
265265
expect("0x00012AB").to.hexEqual("0x12ab");

docs/src/content/hardhat-network-helpers/docs/overview.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This package provides convenience functions for quick and easy interaction with
1313

1414
## Installation
1515

16-
::::tabsgroup{options="npm 7+,npm 6,yarn"}
16+
::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"}
1717

1818
:::tab{value="npm 7+"}
1919

@@ -39,6 +39,14 @@ yarn add --dev @nomicfoundation/hardhat-network-helpers
3939

4040
:::
4141

42+
:::tab{value="pnpm"}
43+
44+
```
45+
pnpm add -D @nomicfoundation/hardhat-network-helpers
46+
```
47+
48+
:::
49+
4250
::::
4351

4452
## Usage

docs/src/content/hardhat-runner/docs/advanced/artifacts.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ artifacts
5555
   │   ├── Bar.json
5656
   │   └── Bar.dbg.json
5757
   └── Qux.sol
58-
   ├── Foo.json
59-
   └── Foo.dbg.json
58+
   ├── Qux.json
59+
   └── Qux.dbg.json
6060
```
6161

6262
Each Solidity file in your source will get a directory in the artifacts structure. Each of these directories contains one artifact (`.json`) file and one debug (`.dbg.json`) file for each _contract_ in that file. `Foo.sol`, for example, contains two contracts inside.

docs/src/content/hardhat-runner/docs/advanced/building-plugins.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Plugins are bits of reusable configuration. Anything that you can do in a plugin
88

99
When developing a plugin the main tools available to integrate new functionality are extending the [Hardhat Runtime Environment](/advanced/hardhat-runtime-environment.md), extending the Hardhat config, defining new tasks and overriding existing ones, which are all configuration actions achieved through code.
1010

11-
Some examples of things you could achieve by creating a plugin are: running a linter when the `check` task runs, using different compiler versions for different files or generating an UML diagram for your contracts.
11+
Some examples of things you could achieve by creating a plugin are: running a linter when the `check` task runs, using different compiler versions for different files or generating a UML diagram for your contracts.
1212

1313
## Extending the Hardhat Runtime Environment
1414

docs/src/content/hardhat-runner/docs/advanced/create-task.md

+9-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Tasks in Hardhat are asynchronous JavaScript functions that get access to the [
5050

5151
For our example, we will use the [`@nomicfoundation/hardhat-toolbox`](/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox), which includes the [ethers.js](https://docs.ethers.org/v6/) library to interact with our contracts.
5252

53-
::::tabsgroup{options="npm 7+,npm 6,yarn"}
53+
::::tabsgroup{options="npm 7+,npm 6,yarn,pnpm"}
5454

5555
:::tab{value="npm 7+"}
5656

@@ -76,6 +76,14 @@ yarn add --dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network
7676

7777
:::
7878

79+
:::tab{value="pnpm"}
80+
81+
```
82+
pnpm add -D @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-network-helpers chai@4 ethers
83+
```
84+
85+
:::
86+
7987
::::
8088

8189
Task creation code can go in `hardhat.config.js`, or whatever your configuration file is called. It’s a good place to create simple tasks. If your task is more complex, it's also perfectly valid to split the code into several files and `require` them from the configuration file.

0 commit comments

Comments
 (0)