Foundry compatibility reference docs#215
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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.
22ebb00 to
33d1773
Compare
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 concreteplugins: [hardhatFoundry]or a proper spread of an existing array variable) and keep it consistent with other docs that usedefineConfig+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.
|
|
||
| ### 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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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."
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
Maybe let's remove it for now. Too vague.
marianfe
left a comment
There was a problem hiding this comment.
LGTM with some comments, please take a look! thanks
No description provided.