docs: fix the broken forge install reference on the Foundry page - #318
Open
Dusk1e wants to merge 2 commits into
Open
docs: fix the broken forge install reference on the Foundry page#318Dusk1e wants to merge 2 commits into
Dusk1e wants to merge 2 commits into
Conversation
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.
|
|
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rebased onto master and narrowed to the part that is still broken.
The Foundry page tells submodule users to run:
FhenixProtocol/foundry-pluginreturns 404. Both packages live in this monorepo, atpackages/foundry-pluginandpackages/mock-contracts, so one install covers them, which is also whatpackages/mock-contracts/README.mdalready tells foundry users. The remapping note now points at the package directories underlib/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.