Skip to content

docs(foundry): add the remappings the mocks need to compile - #443

Merged
architect-dev merged 1 commit into
FhenixProtocol:masterfrom
devorun:docs/foundry-remappings
Oct 19, 2026
Merged

architect-dev merged 1 commit into
FhenixProtocol:masterfrom
devorun:docs/foundry-remappings

Conversation

@devorun

@devorun devorun commented Oct 17, 2026

Copy link
Copy Markdown
Contributor

The foundry.toml on the Foundry docs page doesn't compile a test that inherits CofheTest. Two remappings are missing:

  • @openzeppelin/contracts-upgradeable/: the 1.0 mocks import it (Permissioned.sol, ACPShareRegistry.sol). feat: share metadata labels and the pointer-based share registry #389 added it to the plugin README but not to the docs page. Without it forge stops with Source "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol" not found.
  • hardhat/: MockCoFHE.sol imports hardhat/console.sol, which a Foundry project doesn't have. The plugin's own foundry.toml and cofhe-foundry-starter map it to forge-std's console.sol (hardhat/=node_modules/forge-std/src/). Without it the build fails with Source "hardhat/console.sol" not found. The plugin README is missing this one too.

I added both to the docs page and hardhat/ to the README. To check, I set up a project with the packages under node_modules and the docs quick-start test (deployMocks(), createCofheClient(), connect()). With the current remappings it fails on each missing source in turn. With these changes it builds and the test passes, using either the docs page's remappings or the README's.

@changeset-bot

changeset-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b453b7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@architect-dev architect-dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the fix!

@architect-dev
architect-dev merged commit d3dfb4d into FhenixProtocol:master Oct 19, 2026
12 checks passed
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.

2 participants