Documentation Index
Fetch the complete documentation index at: https://fhenix-docs-hardhat-3-plugin.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
conn.cofhe.mocks exposes Viem contract descriptors for every deployed mock contract and helpers for reading the on-chain plaintext that the mock task manager stores. None of this requires the SDK client — the mocks are reachable from any Viem publicClient / walletClient.
Contract descriptors
Each mock is exposed as a synchronous{ address, abi } object — spread it directly into Viem’s readContract / writeContract:
Calling a mock directly
Reading plaintext values
BecauseMockTaskManager stores plaintext values on-chain, you can read the underlying plaintext of any encrypted handle directly in tests — no permit needed.
getPlaintext(ctHash)
Returns the plaintext bigint for a given ciphertext hash. Accepts either a bigint or a hex string.
expectPlaintext(ctHash, expected)
Assertion shorthand — throws if the on-chain plaintext doesn’t match expected:
Re-deploying mocks mid-test
Normally you don’t need this — mocks are deployed automatically on everynetwork.connect(). For advanced scenarios where you want to reset mock state inside a single test:
| Option | Type | Default | Description |
|---|---|---|---|
deployTestBed | boolean | true | Whether to deploy the TestBed utility contract. |
gasWarning | boolean | inherits from config | Print the gas-warning line after deployment. |
silent | boolean | false | Suppress all deployment output (overrides mocksDeployVerbosity). |