Skip to content

add Hardhat 3 plugin docs section#27

Draft
roeezolantz wants to merge 1 commit into
masterfrom
docs/hardhat-3-plugin
Draft

add Hardhat 3 plugin docs section#27
roeezolantz wants to merge 1 commit into
masterfrom
docs/hardhat-3-plugin

Conversation

@roeezolantz
Copy link
Copy Markdown
Contributor

Summary

@cofhe/hardhat-3-plugin was published in 0.5.0 but `docs.json` has no entries for it — the Client SDK tab only documents the Hardhat v2 plugin. Adds a parallel "Hardhat 3 Plugin" nav group with the same 5-page layout, adapted to the Hardhat 3 plugin/hook model.

This covers gap B-5 from the docs audit on XDL-11.

Where the underlying change was made

  • @cofhe/hardhat-3-plugin@0.5.0cofhesdk CHANGELOG 0.5.0 — `f78beb7`. Direct quote: "@cofhe/hardhat-3-plugin — Hardhat 3 plugin with the same mock contract deployment, network.cofhe API, logging, and faucet task as the v2 plugin, adapted to the Hardhat 3 plugin/hook model."
  • Plugin-specific behavior change in 0.5.0: "Calls hre.solidity.build() during the hre.created hook to compile mock contracts once at startup, enabling the EDR to decode their custom errors by name. deployFixed and deployVariable now source bytecode from hre.artifacts.readArtifact()."
  • Source: `packages/hardhat-3-plugin/` — README is in `packages/hardhat-3-plugin/README.md`.
  • mocksDeployVerbosity config option (same '' | 'v' | 'vv' values as the v2 plugin) — cofhesdk CHANGELOG 0.5.0.

Changes

File What changed
client-sdk/hardhat-3-plugin/getting-started.mdx New. Install, register the plugin, cofhe config block (with the same three options as v2), how auto-deployment hooks network.connect(), table of mock contracts and addresses, a "Differences from @cofhe/hardhat-plugin" table highlighting the v2 → v3 plumbing changes.
client-sdk/hardhat-3-plugin/client.mdx New. cofhe.createConfig, cofhe.createClient, cofhe.createClientWithBatteries — same three-tier shape as the v2 client page, adapted to conn.cofhe.* instead of hre.cofhe.*.
client-sdk/hardhat-3-plugin/mock-contracts.mdx New. Viem { address, abi } contract descriptors (cofhe.mocks.MockTaskManager etc.), getPlaintext / expectPlaintext (accept bigint or hex string), deployMocks for mid-test resets.
client-sdk/hardhat-3-plugin/logging.mdx New. withLogs(name, fn), enableLogs(), disableLogs(), plus the gate that cofhe.logMocks: false overrides the runtime toggles.
client-sdk/hardhat-3-plugin/testing.mdx New. Skeleton, five canonical rules (async describe, createClientWithBatteries, expectPlaintext, direct descriptor calls, scoped withLogs), and a "Common pitfalls" accordion mirroring the v2 testing page.
docs.json Inserted a new "Hardhat 3 Plugin" group under the Client SDK tab, between "Hardhat Plugin" and "Foundry Plugin", with the five page IDs above.

The new pages follow the same Mintlify structure as the v2 plugin pages (intro paragraph → <Note> cross-link → "What the plugin provides" → install <Steps> → config table → API reference → "Common pitfalls" <AccordionGroup> on the testing page).

Test plan

  • `mint dev` shows a new "Hardhat 3 Plugin" group in the Client SDK sidebar, with all five sub-pages reachable.
  • Cross-links to v2 pages (/client-sdk/hardhat-plugin/getting-started, /client-sdk/hardhat-plugin/testing) resolve.
  • Sanity-check one Hardhat 3 sample project against the install + config snippets.

@cofhe/hardhat-3-plugin was published in 0.5.0 but the docs only cover
the v2 plugin. Add a parallel 'Hardhat 3 Plugin' nav group with five
pages matching the v2 layout (getting-started, client, mock-contracts,
logging, testing), adapted to the Hardhat 3 plugin/hook model:
network.connect() lifecycle, conn.cofhe namespace alongside conn.viem,
node:test 'async describe' pattern, Viem contract descriptors instead
of typed ethers contracts.

Co-authored-by: multica-agent <github@multica.ai>
@mintlify
Copy link
Copy Markdown
Contributor

mintlify Bot commented May 13, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
fhenix 🟢 Ready View Preview May 13, 2026, 11:43 AM

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