The mock contracts emit structured logs for every FHE operation. This makes it easy to see what your contracts are doing under the hood during tests.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.
withLogs(name, fn) — recommended
Wraps a block of code with logging enabled and prints a labeled box around the output. The name appears as the header so you can identify which call produced which operations.
withLogs enables logging before the closure runs and disables it after, so only operations from within that block appear in the output. The previous on/off state is restored when it returns.
enableLogs() / disableLogs() — manual
For finer-grained control, you can enable and disable logging manually:
Default behavior
Logging is controlled by thecofhe.logMocks config option (see Getting Started → Configuration). When the option is true (the default), mock-contract log events are emitted; when false, they’re suppressed even if you call enableLogs().
withLogs, enableLogs, and disableLogs only flip the runtime gate at the mock-contract level — they do not override the config.