Skip to content

fix: use simulated network for hardhat#1024

Merged
ryardley merged 2 commits into
mainfrom
fix/hardhat-chain
Nov 16, 2025
Merged

fix: use simulated network for hardhat#1024
ryardley merged 2 commits into
mainfrom
fix/hardhat-chain

Conversation

@ctrlc03

@ctrlc03 ctrlc03 commented Nov 16, 2025

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Chores
    • Updated local development network: removed the dedicated hardhat entry and repurposed localhost as a simulated network environment.
    • Updated enclave configuration: renamed network reference to localhost, standardized node and contract address formatting, and adjusted deploy-block numbers for several contracts.

@vercel

vercel Bot commented Nov 16, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
crisp Skipped Skipped Nov 16, 2025 4:03pm
enclave-docs Skipped Skipped Nov 16, 2025 4:03pm

@coderabbitai

coderabbitai Bot commented Nov 16, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

Updated local-chain configuration and enclave metadata for the CRISP example: top-level hardhat network entry removed; localhost network repurposed to edr-simulated with chainType "l1" in Hardhat config; enclave.config.yaml renamed chain from "hardhat" to "localhost", adjusted contract deploy_block values and normalized quoting for addresses and node entries.

Changes

Cohort / File(s) Summary
Hardhat network config
examples/CRISP/packages/crisp-contracts/hardhat.config.ts
Removed hardhat network entry; changed localhost network from HTTP (type: "http") to edr-simulated with chainType: "l1"; removed explicit url and timeout settings.
Enclave configuration updates
examples/CRISP/enclave.config.yaml
Renamed chain from hardhat to localhost (keeps rpc_url ws://localhost:8545); changed contract addresses and node addresses to single-quoted strings; updated several deploy_block values (enclave: 1→13, ciphernode_registry: 1→11, bonding_registry: 1→8, fee_token: 1→4); removed commented risc0 section.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify edr-simulated network syntax and compatibility with local tooling and any scripts/CI that expect the previous hardhat entry.
  • Confirm updated deploy_block values align with deployed artifacts and that enclave config consumer reads the renamed localhost chain key.
  • Check any tooling or docs that reference hardhat network or the previous address quoting for regressions.

Possibly related PRs

Suggested reviewers

  • hmzakhalid

Poem

🐰 I nibbled bytes and hopped through lines,
Switched localnets and tweaked the signs,
Quotes made tidy, blocks set new,
Local chains hum — a dev-hare’s coup! 🥕

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: switching from hardhat network to edr-simulated network for localhost configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/hardhat-chain

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3b1476f and d78ac7e.

📒 Files selected for processing (1)
  • examples/CRISP/enclave.config.yaml (1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 677
File: packages/enclave-contracts/scripts/deployAndSave/naiveRegistryFilter.ts:30-31
Timestamp: 2025-09-11T13:09:03.800Z
Learning: In Hardhat v3 deployment scripts, use `(await signer.provider?.getNetwork())?.name ?? "localhost"` instead of `hre.globalOptions.network` to reliably get the network name, as `hre.globalOptions.network` can be undefined in some contexts.
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 832
File: templates/default/client/src/pages/components/Navbar.tsx:12-26
Timestamp: 2025-10-10T17:29:41.338Z
Learning: In the Enclave project, the user prefers using ConnectKit's `initialChainId` configuration combined with a manual NetworkSwitchButton for network switching, rather than implementing automatic network detection and switching on wallet connection.
📚 Learning: 2025-09-19T11:16:53.825Z
Learnt from: cedoor
Repo: gnosisguild/enclave PR: 752
File: packages/enclave-contracts/contracts/Enclave.sol:15-17
Timestamp: 2025-09-19T11:16:53.825Z
Learning: The Enclave contract in the gnosisguild/enclave repository has not been deployed yet as of September 2025, so storage layout considerations for upgradeable contracts don't apply to current changes.

Applied to files:

  • examples/CRISP/enclave.config.yaml
📚 Learning: 2025-11-12T10:08:30.720Z
Learnt from: ctrlc03
Repo: gnosisguild/enclave PR: 996
File: examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol:144-169
Timestamp: 2025-11-12T10:08:30.720Z
Learning: In the CRISP program (examples/CRISP/packages/crisp-contracts/contracts/CRISPProgram.sol), there are plans to move the merkle tree from the Enclave contract to the program contract itself in the future, which would allow direct calls to validateInput to be stored in the merkle tree.

Applied to files:

  • examples/CRISP/enclave.config.yaml
📚 Learning: 2025-10-10T12:56:40.538Z
Learnt from: 0xjei
Repo: gnosisguild/enclave PR: 830
File: templates/default/README.md:123-128
Timestamp: 2025-10-10T12:56:40.538Z
Learning: In the Enclave repository, the hard-coded Hardhat development private key `0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80` is acceptable in template README files and documentation for local testing/interaction purposes.

Applied to files:

  • examples/CRISP/enclave.config.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: build_enclave_cli
  • GitHub Check: build_sdk
  • GitHub Check: test_contracts
  • GitHub Check: test_net
  • GitHub Check: integration_prebuild
  • GitHub Check: rust_integration
  • GitHub Check: rust_unit
🔇 Additional comments (3)
examples/CRISP/enclave.config.yaml (3)

7-7: Verify deploy_block values match actual contract deployments on the edr-simulated network.

The deploy_block values have been updated significantly (enclave: 1→13, ciphernode_registry: 1→11, bonding_registry: 1→8, fee_token: 1→4). These values must correspond to the actual blocks where each contract is deployed when using the edr-simulated network. Additionally, verify whether e3_program at line 7 should also be updated.

Cross-reference these block numbers with the deployment scripts to confirm they match the actual deployment sequence. Verify the block heights using the deployment transaction records or hardhat runtime output.

Also applies to: 10-10, 13-13, 16-16, 19-19


6-6: Quoting consistency: single-quoted strings.

All contract and node addresses have been consistently changed to single-quoted strings. While this is a cosmetic change (both single and double quotes are functionally equivalent in YAML for these use cases), the consistency is appreciated and aligns with YAML best practices for string literals.

Also applies to: 9-9, 12-12, 15-15, 18-18, 25-25, 30-30, 35-35, 40-40, 45-45, 50-50


1-3: Chain name "localhost" is used consistently; no further updates needed.

Verification confirms the chain name has been properly updated from "hardhat" to "localhost" throughout the CRISP example configuration. The enclave.config.yaml correctly specifies localhost with RPC endpoint ws://localhost:8545, and no stray "hardhat" network name references exist in the CRISP configuration files. Node addresses are the standard Hardhat test account addresses.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@vercel vercel Bot temporarily deployed to Preview – crisp November 16, 2025 16:03 Inactive
@vercel vercel Bot temporarily deployed to Preview – enclave-docs November 16, 2025 16:03 Inactive
@ctrlc03 ctrlc03 requested a review from ryardley November 16, 2025 16:25

@ryardley ryardley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

👨🏾‍🎤

@ryardley ryardley merged commit a6b5fd5 into main Nov 16, 2025
23 checks passed
@ctrlc03 ctrlc03 deleted the fix/hardhat-chain branch November 17, 2025 19:16
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.

2 participants