Skip to content

Commit

Permalink
Merge branch 'main' into fix/add-output-parameter-to-flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
kanej authored Nov 22, 2024
2 parents 4decc04 + 74e8558 commit 31c0a94
Show file tree
Hide file tree
Showing 27 changed files with 113 additions and 61 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: 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
5 changes: 3 additions & 2 deletions .github/workflows/autoassign-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ jobs:
script: |
// each user has a chance of (p - (previousP ?? 0)) to be assigned
const potentialAssignees = [
["kanej", 1/3],
["schaable", 2/3],
["kanej", 1/4],
["schaable", 2/4],
["galargh", 3/4],
["ChristopherDedominici", 1.0],
];
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Execution of `getStaticPaths` and `getStaticProps` is handled by NextJS on a bui

## Styling

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.
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.

## Theming

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

## Creating new landings

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.
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.

## CI/CD

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ First, run `forge --version` to make sure that you have Foundry installed. If yo

After that, install the [`@nomicfoundation/hardhat-foundry`](/hardhat-runner/plugins/nomicfoundation-hardhat-foundry) plugin:

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

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

Expand All @@ -46,6 +46,12 @@ yarn add --dev @nomicfoundation/hardhat-foundry

:::

:::tab{value=pnpm}

```
pnpm add --save-dev @nomicfoundation/hardhat-foundry
```

::::

and import it in your Hardhat config:
Expand Down Expand Up @@ -80,20 +86,20 @@ First, if you don't have a `package.json` already in your project, create one wi

Then install Hardhat, the [Hardhat Toolbox](/hardhat-runner/plugins/nomicfoundation-hardhat-toolbox), and the [`@nomicfoundation/hardhat-foundry`](/hardhat-runner/plugins/nomicfoundation-hardhat-foundry) plugin:

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

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

```
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-foundry
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-foundry
```

:::

:::tab{value="npm 6"}

```
npm install --save-dev @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-foundry
npm install --save-dev hardhat @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-foundry
```

:::
Expand All @@ -106,6 +112,14 @@ yarn add --dev hardhat @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat

:::

:::tab{value=pnpm}

```
pnpm add --save-dev hardhat @nomicfoundation/hardhat-toolbox @nomicfoundation/hardhat-foundry
```

:::

::::

After that, initialize a Hardhat project with `npx hardhat init`. Choose the "Create an empty hardhat.config.js" option, and then import the plugin in `hardhat.config.js`:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/hardhat-runner/docs/config/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ The `solidity` config is an optional field that can be one of the following:
You can customize the different paths that Hardhat uses by providing an object to the `paths` field with the following keys:

- `root`: The root of the Hardhat project. This path is resolved from `hardhat.config.js`'s directory. Default value: the directory containing the config file.
- `sources`: The directory where your contract are stored. This path is resolved from the project's root. Default value: `'./contracts'`.
- `sources`: The directory where your contracts are stored. This path is resolved from the project's root. Default value: `'./contracts'`.
- `tests`: The directory where your tests are located. This path is resolved from the project's root. Default value: `'./test'`.

- `cache`: The directory used by Hardhat to cache its internal stuff. This path is resolved from the project's root. Default value: `'./cache'`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ If you are using bash, try this:
- Run `complete -p hh`. You should get `complete -o default -F _hh_completion hh` as the output.
- Check that your `.bashrc` has a line that loads a `__tabtab.bash` file. This is the file that in turn should load the `hh` completion.
- Check that this `__tabtab.bash` exists, and that there is a `hh.bash` file in that same directory.

### Windows user

`hardhat-shorthand` doesn't work well by default on Windows. Please read this to learn why and how to improve it.

On Windows, the default `hh` command is associated with the HTML Help executable program (hh.exe). To use `hardhat-shorthand`, you can simply run `npx hh` instead of `hh`, but that won't work well with its autocompletion.

If you want to use `hh` on Windows, you can follow these steps:

1. Run `npm config get prefix` to get the npm global packages installation location.

2. Add the npm location to the `Path` environment variable.

3. Make sure to add the npm location to `Path` before `%SystemRoot%` because default `hh.exe` is in `%SystemRoot%`, and it will take precedence over `hh-shorthand` otherwise.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ These are the versions of Solidity that you can expect to fully work with Hardha
- Any 0.5.x version starting from 0.5.1
- Any 0.6.x version
- Any 0.7.x version
- Any 0.8.x version up to and including 0.8.27
- Any 0.8.x version up to and including 0.8.28

We recommend against using Hardhat with newer, unsupported versions of Solidity. But if you need to do so; please read on.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ contract DemoV2 {

In addition to updating the version string, this contract also adds a `name` state variable and a `setName` function that allows us to set the value of `name`. We'll use this function later when we upgrade our proxy.

Finally, we'll create a file called `Proxies.sol` to import our proxy contracts. This file will look a little different than the others:
Finally, we'll create a file called `Proxies.sol` to import our proxy contracts. This file will look a little different from the others:

```solidity
// SPDX-License-Identifier: UNLICENSED
Expand Down
2 changes: 1 addition & 1 deletion docs/src/model/markdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const withoutComments = (content: string) => {
};

export const replacePlaceholders = (content: string) => {
const recommendedSolcVersion = "0.8.27";
const recommendedSolcVersion = "0.8.28";
const latestPragma = "^0.8.0";
const hardhatPackageJson = fs
.readFileSync(
Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ On [Hardhat's website](https://hardhat.org) you will find:

Contributions are always welcome! Feel free to open any issue or send a pull request.

Go to [CONTRIBUTING.md](./CONTRIBUTING.md) to learn about how to set up Hardhat's development environment.
Go to [CONTRIBUTING.md](https://github.com/NomicFoundation/hardhat/blob/main/CONTRIBUTING.md) to learn about how to set up Hardhat's development environment.

## Feedback, help and news

Expand Down
2 changes: 1 addition & 1 deletion packages/hardhat-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"dependencies": {
"@ethersproject/abi": "^5.1.2",
"@metamask/eth-sig-util": "^4.0.0",
"@nomicfoundation/edr": "^0.6.4",
"@nomicfoundation/edr": "^0.6.5",
"@nomicfoundation/ethereumjs-common": "4.0.4",
"@nomicfoundation/ethereumjs-tx": "5.0.4",
"@nomicfoundation/ethereumjs-util": "9.0.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ require("@nomicfoundation/hardhat-toolbox");

/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox-viem";

const config: HardhatUserConfig = {
solidity: "0.8.27",
solidity: "0.8.28",
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

// Uncomment this line to use console.log
// import "hardhat/console.sol";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { HardhatUserConfig } from "hardhat/config";
import "@nomicfoundation/hardhat-toolbox";

const config: HardhatUserConfig = {
solidity: "0.8.27",
solidity: "0.8.28",
};

export default config;
2 changes: 1 addition & 1 deletion packages/hardhat-core/src/internal/cli/project-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ async function printRecommendedDepsInstallationInstructions(
// exported so we can test that it uses the latest supported version of solidity
export const EMPTY_HARDHAT_CONFIG = `/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.27",
solidity: "0.8.28",
};
`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.27";
export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.28";
export const FIRST_SOLC_VERSION_SUPPORTED = "0.5.1";
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const defaultEvmTargets: { [key: string]: string } = {
"0.8.25": "cancun",
"0.8.26": "cancun",
"0.8.27": "cancun",
"0.8.28": "cancun",
};

export function getEvmVersionFromSolcVersion(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pragma solidity ^0.8.27;
pragma solidity ^0.8.28;

contract A {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
solidity: "0.8.27",
solidity: "0.8.28",
};
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ export const solidityCompilers: SolidityCompiler[] = [
{
solidityVersion: "0.8.25",
compilerPath: "soljson-v0.8.25+commit.b61c2a91.js",
latestSolcVersion: true,
},
{
solidityVersion: "0.8.25",
Expand All @@ -265,7 +264,6 @@ export const solidityCompilers: SolidityCompiler[] = [
runs: 200,
viaIR: true,
},
latestSolcVersion: true,
},
{
solidityVersion: "0.8.26",
Expand Down Expand Up @@ -295,6 +293,20 @@ export const solidityCompilers: SolidityCompiler[] = [
},
latestSolcVersion: true,
},
{
solidityVersion: "0.8.28",
compilerPath: "soljson-v0.8.28+commit.7893614a.js",
latestSolcVersion: true,
},
{
solidityVersion: "0.8.28",
compilerPath: "soljson-v0.8.28+commit.7893614a.js",
optimizer: {
runs: 200,
viaIR: true,
},
latestSolcVersion: true,
},
];

export const getLatestSupportedVersion = () =>
Expand Down
Loading

0 comments on commit 31c0a94

Please sign in to comment.