Skip to content

Foundry compatibility reference docs#215

Merged
alcuadrado merged 4 commits intomainfrom
foundry-compatibility
Feb 25, 2026
Merged

Foundry compatibility reference docs#215
alcuadrado merged 4 commits intomainfrom
foundry-compatibility

Conversation

@alcuadrado
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings February 19, 2026 15:20
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hardhat-website Ready Ready Preview, Comment Feb 25, 2026 1:28pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR creates a new Foundry compatibility reference page and refactors sidebar ordering for the reference documentation section. The PR title indicates this is a work-in-progress.

Changes:

  • Adds a new foundry-compatibility.mdx reference page (currently with WIP placeholder content)
  • Adds a redirect shortlink /foundry-compatibility/docs/reference/foundry-compatibility
  • Migrates sidebar ordering from frontmatter to centralized configuration in astro.config.ts

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/content/docs/docs/reference/foundry-compatibility.mdx New documentation page for Foundry compatibility (WIP content)
src/redirects/in-app-shortlinks.ts Adds shortlink redirect for the new page
astro.config.ts Adds the new page to the reference section navigation
src/content/docs/docs/reference/stability-guarantees.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/nodejs-support.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/network-manager.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/json-rpc-methods.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/edr-simulated-networks.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/console-log.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/configuration.mdx Removes sidebar.order property (ordering now in astro.config.ts)
src/content/docs/docs/reference/artifacts.mdx Removes sidebar.order property (ordering now in astro.config.ts)
Comments suppressed due to low confidence (1)

src/content/docs/docs/reference/foundry-compatibility.mdx:6

  • The page contains only "WIP" as content. While the PR title indicates this is work-in-progress, publishing a documentation page with only "WIP" could confuse users. Consider either adding a proper placeholder message (e.g., "This page is currently under construction. Check back soon for information about Hardhat's Foundry compatibility features.") or keeping this page unpublished until it has meaningful content.
WIP

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alcuadrado alcuadrado requested a review from Copilot February 23, 2026 10:42
@alcuadrado alcuadrado changed the title [WIP] Foundry compatibility reference Foundry compatibility reference Feb 23, 2026
@alcuadrado alcuadrado force-pushed the foundry-compatibility branch from 22ebb00 to 33d1773 Compare February 23, 2026 10:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/content/docs/docs/reference/foundry-compatibility.mdx:6

  • This new reference page is linked from the sidebar and has an in-app shortlink, but its body is just a "WIP" placeholder. Either add at least minimal usable content (what is/isn't supported, limitations, links) or avoid publishing it yet by removing it from the sidebar/shortlinks until it’s ready.
---
title: Foundry compatibility
description: Hardhat 3's Foundry compatibility
---

import Install from "@hh/Install.astro";

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/content/docs/docs/reference/foundry-compatibility.mdx:41

  • The TypeScript config snippet is not copy/pasteable as written: plugins: [..., hardhatFoundry], is invalid syntax (... can’t be used like that in an array literal). Please update the example to a valid pattern (e.g., show a concrete plugins: [hardhatFoundry] or a proper spread of an existing array variable) and keep it consistent with other docs that use defineConfig + export default.
```ts
// hardhat.config.ts
import { HardhatUserConfig } from "hardhat/config";
// ...
import hardhatFoundry from "@nomicfoundation/hardhat-foundry";

const config: HardhatUserConfig = {
  // ... rest of the config
  plugins: [..., hardhatFoundry],
};

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alcuadrado alcuadrado changed the title Foundry compatibility reference Foundry compatibility reference docs Feb 23, 2026

### Remappings

Hardhat 3 supports `remappings.txt` files by default. It automatically loads all the `remappings.txt` files in your project, and in the npm packages that your project depends on. Hardhat 3's remappings support is more advanced, and limits the scope of each remapping to the directory they are defined in, avoiding any remapping conflicts. Read more about them in the [Using Solidity remappings](/docs/guides/writing-contracts/remappings) guide.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: them in "Read more about them" is unclear

do we mean: "Read more about remappings in the "


## Solidity tests compatibility

Hardhat 3 can run Solidity tests built with Foundry, including using `forge-std`. Learn more about them by reading the [Writing Solidity tests](/docs/guides/testing) guide, and the [Cheatcodes](/docs/reference/cheatcodes/cheatcodes-overview) reference documentation.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this section is unclear :

what are we referring to when we say "including using 'forge-std'"

also:

"learn more about them by reading" -> them here is unclear given the previous sentence, maybe being explicit: "Learn more about writing and running Solidity tests in Hardhat 3 by reading the ..."

also, the start of the paragraph "Hardhat 3 can run Solidity tests built with Foundry" -> i'd clarify that
"Hardhat 3 can run Solidity tests by default, including those previously built for Foundry."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the forge-std mention, and implemented your susggestions


## Separate build process and test artifacts

Hardhat 3 builds smart contracts and tests as separate build processes. On top of that, it doesn't expose the build artifacts of tests to users, and considers them internal and part of the `cache/` directory. These are intentional design decisions that give Hardhat more flexibility for future improvements.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we explain here and a benefit users get directly / immediately now by us doing this design choice?

"future improvements" sounds very vague as a value proposition...

Copy link
Copy Markdown
Member Author

@alcuadrado alcuadrado Feb 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe let's remove it for now. Too vague.

Copy link
Copy Markdown

@marianfe marianfe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with some comments, please take a look! thanks

Merged via the queue into main with commit f6d26ab Feb 25, 2026
3 checks passed
@alcuadrado alcuadrado deleted the foundry-compatibility branch February 25, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants