Skip to content

YNU-776: Clearnet Sandbox Deployment V1#608

Merged
nksazonov merged 7 commits intomainfrom
feat/ch-hub-deploy-script
Mar 7, 2026
Merged

YNU-776: Clearnet Sandbox Deployment V1#608
nksazonov merged 7 commits intomainfrom
feat/ch-hub-deploy-script

Conversation

@nksazonov
Copy link
Contributor

@nksazonov nksazonov commented Mar 7, 2026

Summary by CodeRabbit

  • New Features

    • Added an automated deployment script to deploy ChannelHub and its associated components.
  • Chores

    • Added comprehensive deployment records and run traces across sandbox and test networks for ChannelHub, validators, engines, session/key validators, and premint tokens.
  • Documentation

    • Updated example and default WebSocket endpoints in docs and client examples to point to the sandbox connection URL.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 7, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds many Forge run/deployment JSON artifacts for ChannelHub and related contracts on chains 11155111 and 80002, a new Forge deployment script DeployChannelHub that can deploy or reuse an ECDSA validator and linked libraries, and updates example/default WebSocket URLs to the sandbox endpoint.

Changes

Cohort / File(s) Summary
Broadcast run artifacts
contracts/broadcast/DeployChannelHub.s.sol/11155111/run-1772892720931.json, contracts/broadcast/DeployChannelHub.s.sol/11155111/run-latest.json, contracts/broadcast/DeployChannelHub.s.sol/80002/run-1772893715802.json, contracts/broadcast/DeployChannelHub.s.sol/80002/run-latest.json
Adds full Forge run traces: transactions, receipts, logs, libraries mapping, and top-level metadata for ChannelHub-related deployments.
Deployment metadata (11155111)
contracts/deployments/11155111/.../ChannelHub.sol_ChannelHub/*, .../ChannelEngine.sol_ChannelEngine/*, .../EscrowDepositEngine.sol_EscrowDepositEngine/*, .../EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/*, .../ECDSAValidator.sol_ECDSAValidator/*, .../SessionKeyValidator.sol_SessionKeyValidator/*, .../PremintERC20.sol_PremintERC20/*
Adds timestamped JSON artifacts recording deployer, deployedTo, tx hash, commit, chainId, constructor args, and library links for multiple contracts on chain 11155111.
Deployment metadata (80002)
contracts/deployments/80002/.../ChannelHub.sol_ChannelHub/*, .../ChannelEngine.sol_ChannelEngine/*, .../EscrowDepositEngine.sol_EscrowDepositEngine/*, .../EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/*, .../ECDSAValidator.sol_ECDSAValidator/*, .../SessionKeyValidator.sol_SessionKeyValidator/*, .../PremintERC20.sol_PremintERC20/*
Adds equivalent deployment JSON artifacts for the same contracts on chain 80002.
Deployment script
contracts/script/DeployChannelHub.s.sol
New Forge script DeployChannelHub with run() and run(address) that predicts CREATE2 addresses, optionally deploys or reuses ECDSAValidator, broadcasts batch deployments for unlinked libraries, and deploys ChannelHub with linked libraries.
Premint artifacts
contracts/deployments/.../PremintERC20.sol_PremintERC20/*
Adds multiple PremintERC20 deployment records (constructor args and deployed addresses) across chains 80002 and 11155111.
Docs / client examples
cerebro/main.go, pkg/rpc/*, sdk/go/*, sdk/ts/src/client.ts
Updates example/default WebSocket URLs to sandbox (wss://clearnode-sandbox.yellow.org/v1/ws) in a runtime default and several docs/comments.

Sequence Diagram

sequenceDiagram
    participant Deployer
    participant Script as DeployChannelHub Script
    participant Validator as ECDSAValidator (opt)
    participant Libraries as Channel Libraries
    participant ChannelHub

    Deployer->>Script: run() or run(existingValidatorAddr)
    activate Script
    Script->>Script: read DEFAULT_VALIDATOR_ADDR / arg

    alt no validator address provided
        Script->>Validator: deploy ECDSAValidator (CREATE)
        activate Validator
        Validator-->>Script: validator address
        deactivate Validator
    else reuse provided validator
        Script-->>Script: use provided validator address
    end

    Script->>Libraries: compute predicted CREATE2 addresses
    Script->>Libraries: deploy ChannelEngine (CREATE2)
    Script->>Libraries: deploy EscrowDepositEngine (CREATE2)
    Script->>Libraries: deploy EscrowWithdrawalEngine (CREATE2)
    Libraries-->>Script: library addresses

    Script->>ChannelHub: deploy ChannelHub with validator & linked libraries (CREATE)
    activate ChannelHub
    ChannelHub-->>Script: ChannelHub address
    deactivate ChannelHub

    Script-->>Deployer: log deployment summary
    deactivate Script
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested labels

ready

Suggested reviewers

  • philanton
  • alessio

Poem

🐇 I hopped through scripts at break of day,
Libraries tucked in, addresses on display.
Validator sprang where needed, true and bright,
ChannelHub rose into the light.
A hopping cheer — deployments take flight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: deployment of ChannelHub to the Clearnet sandbox environment with a comprehensive set of supporting deployment scripts, artifacts, and configuration updates across multiple chains and contracts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ch-hub-deploy-script

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@contracts/deployments/11155111/ChannelEngine.sol_ChannelEngine/2026-03-07T14-12-00.json`:
- Around line 3-4: The manifest's deployedTo value is incorrect: the entry with
transactionHash
0x3df2187dc8a50ef62abfeb377318888493042770315492070c4708584dfbf572 should point
to the actual deployed contract address
0x78D150fdA6fa6739C18014B347c7c7C45C58e148 instead of
0x69F1195A264A436C19a0741CC078bE432538A639; update the deployedTo field in this
per-contract manifest to the correct checksum address
(0x78D150fdA6fa6739C18014B347c7c7C45C58e148) so the transactionHash ↔ deployedTo
mapping matches the run-latest.json record.

In
`@contracts/deployments/11155111/ChannelHub.sol_ChannelHub/2026-03-07T14-12-00.json`:
- Around line 12-16: The libraries map in the deployment manifest incorrectly
points ChannelEngine, EscrowDepositEngine, and EscrowWithdrawalEngine to wrong
addresses (ChannelEngine even points at the hub itself); update the "libraries"
object so the three keys ChannelEngine, EscrowDepositEngine, and
EscrowWithdrawalEngine use the exact addresses recorded in the broadcast
deployment JSON (run-latest.json) for this run, ensuring each library entry
matches the broadcast record and not the current incorrect values.

In
`@contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json`:
- Around line 9-12: The PremintERC20 deployment for YUSD has constructorArgs
showing "8" decimals which conflicts with the other YUSD deployment that uses 6
decimals; inspect the PremintERC20 constructor usage and either change the
constructorArgs decimals value from 8 to 6 to match the chain 11155111
deployment (update the JSON entry in PremintERC20 deployment for the YUSD token)
or explicitly document/annotate why this deployment intentionally uses 8
decimals for sandbox testing; reference the PremintERC20 constructorArgs entry
and the PremintERC20 contract name when making the change or adding the note.

In `@contracts/script/DeployChannelHub.s.sol`:
- Around line 44-65: The logged predicted addresses using
vm.computeCreateAddress for the three libraries (ChannelEngine,
EscrowDepositEng, EscrowWithdrawEng) are incorrect because those libs are
deployed via Foundry's CREATE2 deployer
(0x4e59b44847b379578588920ca78fbf26c0b4956c), not by the deployer's nonces;
remove or replace the three console.log lines that call
vm.computeCreateAddress(deployer, nonce + n) and either omit predictions or log
that these libraries are deployed via the CREATE2 deployer (0x4e59b4...) so the
manifest does not contain wrong addresses—update any references to
ChannelEngine/EscrowDepositEng/EscrowWithdrawEng in the DeployChannelHub.s.sol
snippet accordingly.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 07974e78-5fc5-4e0e-8375-aa732a97b661

📥 Commits

Reviewing files that changed from the base of the PR and between fd39408 and 4b4244f.

📒 Files selected for processing (14)
  • contracts/broadcast/DeployChannelHub.s.sol/11155111/run-1772892720931.json
  • contracts/broadcast/DeployChannelHub.s.sol/11155111/run-latest.json
  • contracts/deployments/11155111/ChannelEngine.sol_ChannelEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ChannelHub.sol_ChannelHub/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-05T12-51-13.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-37-37.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-52-25.json
  • contracts/deployments/11155111/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-18-38.json
  • contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json
  • contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-53-02.json
  • contracts/script/DeployChannelHub.s.sol

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@contracts/deployments/80002/ChannelEngine.sol_ChannelEngine/2026-03-07T14-28-35.json`:
- Around line 3-4: Regenerate the ChannelEngine deployment artifact so the
deployedTo field matches the on-chain receipt for the existing transactionHash;
currently "deployedTo" is 0xE749eC... while "transactionHash" points to the
broadcasted deployment, so rerun the deployment/broadcast that produced the
transaction (or rehydrate the artifact from
contracts/broadcast/DeployChannelHub.s.sol outputs) and update the artifact's
"deployedTo" value to the address returned by the transaction receipt; check the
"deployedTo" and "transactionHash" fields in the ChannelEngine.json to ensure
they reference the same deployment.

In
`@contracts/deployments/80002/ChannelHub.sol_ChannelHub/2026-03-07T14-28-35.json`:
- Line 3: The library mapping in the artifact is pointing ChannelEngine to the
ChannelHub deploy address; update the artifact's linked libraries so
src/ChannelEngine.sol:ChannelEngine references the actual ChannelEngine library
address recorded in the broadcast artifacts (the correct library addresses shown
in the DeployChannelHub broadcast), not the ChannelHub "deployedTo" value, and
apply the same correction for the other linked entries in that library map
(lines covering the library map block, e.g., the entries around
src/ChannelEngine.sol:ChannelEngine and adjacent entries) so the artifact
matches the broadcast run outputs for downstream verification/relinking.

In
`@contracts/deployments/80002/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-28-35.json`:
- Around line 3-4: The artifact for EscrowDepositEngine has an incorrect
deployedTo address; regenerate the JSON artifact so that the "deployedTo" value
matches the actual CREATE2 deployment pointed to by the existing
"transactionHash"
(0x51c15e27975ec5e84bc358c5df10f0c247451091d86e75cb8a81e80f1739bfe6) and the
real resolved address (the address recorded for that transaction), ensuring the
EscrowDepositEngine artifact's "deployedTo" field is corrected to the resolved
address and then re-emit/save the updated artifact.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1d32b98c-9adf-492f-8f9b-855d6689c77f

📥 Commits

Reviewing files that changed from the base of the PR and between 4b4244f and 683a4ca.

📒 Files selected for processing (8)
  • contracts/broadcast/DeployChannelHub.s.sol/80002/run-1772893715802.json
  • contracts/broadcast/DeployChannelHub.s.sol/80002/run-latest.json
  • contracts/deployments/80002/ChannelEngine.sol_ChannelEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/ChannelHub.sol_ChannelHub/2026-03-07T14-28-35.json
  • contracts/deployments/80002/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-28-35.json
  • contracts/deployments/80002/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-29-19.json
✅ Files skipped from review due to trivial changes (2)
  • contracts/deployments/80002/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-28-35.json

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Pending fixes for issues raised by CodeRabbitAI

@philanton philanton changed the title YNU-776: feat: deploy clearnet sandbox 1 YNU-776: deploy clearnet sandbox V1 Mar 7, 2026
@dimast-x dimast-x changed the title YNU-776: deploy clearnet sandbox V1 YNU-776: Clearnet Sandbox Deployment V1 Mar 7, 2026
@dimast-x dimast-x force-pushed the feat/ch-hub-deploy-script branch from b884a2a to 10a7c69 Compare March 7, 2026 17:35
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
contracts/script/DeployChannelHub.s.sol (1)

55-65: ⚠️ Potential issue | 🟠 Major

The CREATE-address predictions are still wrong for the auto-linked libraries.

The broadcast artifacts show the first three txs are CREATE2 calls through 0x4e59b44847b379578588920ca78fbf26c0b4956c, so these library addresses are not vm.computeCreateAddress(deployer, ...) results. When deployValidator is true, the validator log is also shifted behind those three txs.

🛠️ Proposed fix
-        if (deployValidator) {
-            console.log("ECDSAValidator:    ", vm.computeCreateAddress(deployer, nonce));
-            nonce++;
-        } else {
+        if (deployValidator) {
+            console.log("ECDSAValidator:    deployed after auto-linked libraries; inspect broadcast JSON");
+        } else {
             console.log("DefaultValidator:  ", defaultValidatorAddr);
         }
 
-        // Library deployment slots (auto-managed by Foundry)
-        console.log("ChannelEngine:     ", vm.computeCreateAddress(deployer, nonce));
-        console.log("EscrowDepositEng:  ", vm.computeCreateAddress(deployer, nonce + 1));
-        console.log("EscrowWithdrawEng: ", vm.computeCreateAddress(deployer, nonce + 2));
-        console.log("ChannelHub:        ", vm.computeCreateAddress(deployer, nonce + 3));
+        // Libraries are created through the CREATE2 deployer, so inspect the
+        // broadcast JSON for their final addresses.
+        console.log("ChannelEngine:     deployed via CREATE2 deployer");
+        console.log("EscrowDepositEng:  deployed via CREATE2 deployer");
+        console.log("EscrowWithdrawEng: deployed via CREATE2 deployer");
+        console.log("ChannelHub:        ", vm.computeCreateAddress(deployer, nonce + (deployValidator ? 4 : 3)));

Run this to compare the script snippet with the recorded tx order. Expected: both artifacts print three leading CREATE2 library txs to 0x4e59..., then the validator, then ChannelHub.

#!/bin/bash
set -euo pipefail

echo "=== Script snippet ==="
sed -n '51,65p' contracts/script/DeployChannelHub.s.sol

echo
python3 - <<'PY'
import json
from pathlib import Path

paths = [
    "contracts/broadcast/DeployChannelHub.s.sol/11155111/run-latest.json",
    "contracts/broadcast/DeployChannelHub.s.sol/80002/run-1772893715802.json",
]

for path in paths:
    data = json.loads(Path(path).read_text())
    print(f"\n=== {path} ===")
    for tx in data["transactions"][:5]:
        print(
            f"{tx['contractName']}: "
            f"type={tx['transactionType']} "
            f"nonce={tx['transaction']['nonce']} "
            f"to={tx['transaction'].get('to')} "
            f"address={tx['contractAddress']}"
        )
PY
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@contracts/script/DeployChannelHub.s.sol` around lines 55 - 65, The
CREATE-address predictions are wrong because the auto-linked libraries are
deployed via the CREATE2 deployer (0x4e59...) not by the deployer account, so
replace the vm.computeCreateAddress(deployer, ...) calls used for
ChannelEngine/EscrowDepositEng/EscrowWithdrawEng (and the associated nonce
arithmetic that shifts the validator output when deployValidator is true) with
proper CREATE2 address computation: use vm.computeCreate2Address with the
0x4e59... deployer address, the correct salt and init code hash derived from
each library's bytecode/artifact, and then compute the subsequent ChannelHub
address appropriately (or read the recorded tx order instead of assuming
sequential nonces); update the logging around deployValidator and the lines that
print "ChannelEngine:", "EscrowDepositEng:", "EscrowWithdrawEng:", and
"ChannelHub:" so they reflect CREATE2 addresses and the validator shift is
corrected.
🧹 Nitpick comments (2)
contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json (1)

8-16: Normalize the artifact metadata for easier indexing.

Line 8 uses ./src/PremintERC20.sol:PremintERC20, while the ChannelEngine artifact in this batch uses src/..., and Line 16 leaves comment blank even though the other sandbox artifact is tagged clearnet-sandbox-1. If these JSONs are used for lookup or audit, this one becomes an avoidable outlier.

🧹 Suggested normalization
-  "contractPath": "./src/PremintERC20.sol:PremintERC20",
+  "contractPath": "src/PremintERC20.sol:PremintERC20",
@@
-  "comment": ""
+  "comment": "clearnet-sandbox-1"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json`
around lines 8 - 16, The artifact metadata is inconsistent: update the
"contractPath" value from "./src/PremintERC20.sol:PremintERC20" to match the
other artifacts' pattern ("src/PremintERC20.sol:PremintERC20") and populate the
"comment" field to the same tag used by the other sandbox artifact (e.g.,
"clearnet-sandbox-1") so this JSON normalizes with the rest of the batch for
reliable lookup and indexing.
pkg/rpc/doc.go (1)

135-135: Clarify that /v1/ws is deployment-specific.

This package doc later shows a raw WebsocketNode mounted at /ws, so using /v1/ws here without a note makes the examples look contradictory. A short note that wss://clearnode-sandbox.yellow.org/v1/ws is the hosted sandbox route would make the distinction clear.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pkg/rpc/doc.go` at line 135, Clarify the comment/example showing
client.Start(ctx, "wss://clearnode-sandbox.yellow.org/v1/ws", ...) by noting
that the "/v1/ws" path is the hosted sandbox route and is deployment-specific
(the library also exposes a raw WebsocketNode mounted at "/ws"); update the doc
comment in pkg/rpc/doc.go to explicitly state the difference between the hosted
sandbox endpoint and the local/default "/ws" mount so readers understand they
may need to change the path for their deployment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contracts/script/DeployChannelHub.s.sol`:
- Around line 76-80: Before deploying ChannelHub in DeployChannelHub.s.sol,
validate that defaultValidatorAddr is a contract (has non-zero bytecode) and
reject it if not; specifically, add an extcodesize/code.length check on
defaultValidatorAddr (the variable passed into ISignatureValidator(...) when
constructing ChannelHub) and abort the script (revert or process.exit) with a
clear message if the address has zero code so you don't deploy a hub with a
non-contract or wrong-chain EOA default validator.

---

Duplicate comments:
In `@contracts/script/DeployChannelHub.s.sol`:
- Around line 55-65: The CREATE-address predictions are wrong because the
auto-linked libraries are deployed via the CREATE2 deployer (0x4e59...) not by
the deployer account, so replace the vm.computeCreateAddress(deployer, ...)
calls used for ChannelEngine/EscrowDepositEng/EscrowWithdrawEng (and the
associated nonce arithmetic that shifts the validator output when
deployValidator is true) with proper CREATE2 address computation: use
vm.computeCreate2Address with the 0x4e59... deployer address, the correct salt
and init code hash derived from each library's bytecode/artifact, and then
compute the subsequent ChannelHub address appropriately (or read the recorded tx
order instead of assuming sequential nonces); update the logging around
deployValidator and the lines that print "ChannelEngine:", "EscrowDepositEng:",
"EscrowWithdrawEng:", and "ChannelHub:" so they reflect CREATE2 addresses and
the validator shift is corrected.

---

Nitpick comments:
In
`@contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json`:
- Around line 8-16: The artifact metadata is inconsistent: update the
"contractPath" value from "./src/PremintERC20.sol:PremintERC20" to match the
other artifacts' pattern ("src/PremintERC20.sol:PremintERC20") and populate the
"comment" field to the same tag used by the other sandbox artifact (e.g.,
"clearnet-sandbox-1") so this JSON normalizes with the rest of the batch for
reliable lookup and indexing.

In `@pkg/rpc/doc.go`:
- Line 135: Clarify the comment/example showing client.Start(ctx,
"wss://clearnode-sandbox.yellow.org/v1/ws", ...) by noting that the "/v1/ws"
path is the hosted sandbox route and is deployment-specific (the library also
exposes a raw WebsocketNode mounted at "/ws"); update the doc comment in
pkg/rpc/doc.go to explicitly state the difference between the hosted sandbox
endpoint and the local/default "/ws" mount so readers understand they may need
to change the path for their deployment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 03f7e531-0728-4495-9ad1-47f7483b5bc6

📥 Commits

Reviewing files that changed from the base of the PR and between b884a2a and 10a7c69.

📒 Files selected for processing (30)
  • cerebro/main.go
  • contracts/broadcast/DeployChannelHub.s.sol/11155111/run-1772892720931.json
  • contracts/broadcast/DeployChannelHub.s.sol/11155111/run-latest.json
  • contracts/broadcast/DeployChannelHub.s.sol/80002/run-1772893715802.json
  • contracts/broadcast/DeployChannelHub.s.sol/80002/run-latest.json
  • contracts/deployments/11155111/ChannelEngine.sol_ChannelEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ChannelHub.sol_ChannelHub/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-05T12-51-13.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-37-37.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-52-25.json
  • contracts/deployments/11155111/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-18-38.json
  • contracts/deployments/80002/ChannelEngine.sol_ChannelEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/ChannelHub.sol_ChannelHub/2026-03-07T14-28-35.json
  • contracts/deployments/80002/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-28-35.json
  • contracts/deployments/80002/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-28-35.json
  • contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-49-56.json
  • contracts/deployments/80002/PremintERC20.sol_PremintERC20/2026-03-07T13-53-02.json
  • contracts/deployments/80002/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-29-19.json
  • contracts/script/DeployChannelHub.s.sol
  • pkg/rpc/README.md
  • pkg/rpc/client.go
  • pkg/rpc/doc.go
  • sdk/go/README.md
  • sdk/go/client.go
  • sdk/go/doc.go
  • sdk/ts/src/client.ts
✅ Files skipped from review due to trivial changes (6)
  • pkg/rpc/client.go
  • sdk/ts/src/client.ts
  • sdk/go/client.go
  • contracts/deployments/80002/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-28-35.json
  • pkg/rpc/README.md
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-52-25.json
🚧 Files skipped from review as they are similar to previous changes (11)
  • contracts/deployments/80002/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-29-19.json
  • contracts/deployments/80002/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-28-35.json
  • contracts/deployments/11155111/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ECDSAValidator.sol_ECDSAValidator/2026-03-07T14-12-00.json
  • contracts/deployments/80002/ChannelHub.sol_ChannelHub/2026-03-07T14-28-35.json
  • contracts/deployments/11155111/SessionKeyValidator.sol_SessionKeyValidator/2026-03-07T14-18-38.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-05T12-51-13.json
  • contracts/deployments/80002/EscrowDepositEngine.sol_EscrowDepositEngine/2026-03-07T14-28-35.json
  • contracts/deployments/11155111/PremintERC20.sol_PremintERC20/2026-03-07T13-37-37.json
  • contracts/deployments/11155111/EscrowWithdrawalEngine.sol_EscrowWithdrawalEngine/2026-03-07T14-12-00.json
  • contracts/deployments/11155111/ChannelEngine.sol_ChannelEngine/2026-03-07T14-12-00.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@contracts/script/DeployChannelHub.s.sol`:
- Line 64: Update the misleading console messages in DeployChannelHub.s.sol:
change the console.log call that currently prints
"ChannelEngine/EscrowDepositEng/EscrowWithdrawEng: deployed via CREATE2 deployer
(see broadcast JSON)" and the later message that says addresses were logged
above so they match; specifically, use the full artifact/contract names instead
of abbreviated names and make the destination consistent (e.g., "deployed via
CREATE2 deployer — addresses logged to console and broadcast JSON") by editing
the two console.log statements (the one printing the Engine/Escrow names and the
one asserting addresses were logged) so both point to the same place(s) and are
easier to cross-reference with artifacts.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e0ab1697-0e6f-4efa-83e3-33cdcb7f41fd

📥 Commits

Reviewing files that changed from the base of the PR and between 10a7c69 and a64a03b.

📒 Files selected for processing (1)
  • contracts/script/DeployChannelHub.s.sol

@nksazonov nksazonov merged commit 2d8d3de into main Mar 7, 2026
8 checks passed
@nksazonov nksazonov deleted the feat/ch-hub-deploy-script branch March 7, 2026 19:45
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.

3 participants