Skip to content

docs: fix the broken forge install reference on the Foundry page - #318

Open
Dusk1e wants to merge 2 commits into
FhenixProtocol:masterfrom
Dusk1e:docs/foundry-test-api-and-forge-install
Open

docs: fix the broken forge install reference on the Foundry page#318
Dusk1e wants to merge 2 commits into
FhenixProtocol:masterfrom
Dusk1e:docs/foundry-test-api-and-forge-install

Conversation

@Dusk1e

@Dusk1e Dusk1e commented Aug 12, 2026

Copy link
Copy Markdown

Rebased onto master and narrowed to the part that is still broken.

The Foundry page tells submodule users to run:

forge install fhenixprotocol/foundry-plugin

FhenixProtocol/foundry-plugin returns 404. Both packages live in this monorepo, at packages/foundry-plugin and packages/mock-contracts, so one install covers them, which is also what packages/mock-contracts/README.md already tells foundry users. The remapping note now points at the package directories under lib/cofhesdk/ rather than leaving readers to guess.

The other half of this PR is gone. It rewrote the Foundry test API in packages/mock-contracts/README.md, and 0.7.0 already did that, so I dropped it rather than fight the conflict. That file is now byte for byte identical to master.

The Foundry docs referenced a contract and a repository that do not exist.

mock-contracts README ("Using Foundry"):

- `CoFheTest` does not exist anywhere in the repo. The Foundry base contract
  is `CofheTest`, shipped by `@cofhe/foundry-plugin`, not by
  `@fhenixprotocol/cofhe-contracts/FHE.sol`.
- `assertHashValue(...)` and `setLog(...)` do not exist. The current API is
  `expectPlaintext(...)` and `enableLogs()` / `disableLogs()`.
- `createInEuint32(n, user)` is documented with two args, but the real
  signature is `createInEuint32(uint32)` and it lives on `CofheClient`
  (obtained via `createCofheClient()`), not on the test base contract.
- The example never called `deployMocks()`, so the mock stack was never
  deployed. `enableLogs()` also has to run after `deployMocks()`, since it
  dereferences `mockTaskManager`.
- `contract ... is Test, CofheTest` is redundant: `CofheTest is Test`.

The example is now modelled on packages/foundry-plugin/test/SimpleTest.t.sol,
which the plugin's own `forge test` suite compiles and runs.

site foundry.mdx ("Git submodule"):

- `forge install fhenixprotocol/foundry-plugin` points at a repository that
  does not exist; both packages live in the cofhesdk monorepo, so one
  `forge install FhenixProtocol/cofhesdk` covers them. This matches the
  instruction already given in the mock-contracts README.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5645636

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

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@Dusk1e is attempting to deploy a commit to the Fhenix Team on Vercel.

A member of the Team first needs to authorize it.

# Conflicts:
#	packages/mock-contracts/README.md
@Dusk1e Dusk1e changed the title docs: fix stale Foundry test API and broken forge install reference docs: fix the broken forge install reference on the Foundry page Aug 20, 2026
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.

1 participant