Skip to content

Conversation

@fadeev
Copy link
Member

@fadeev fadeev commented Jul 31, 2025

Summary by CodeRabbit

  • New Features
    • Added a new "Messaging" tutorial guiding users on cross-chain messaging between contracts on EVM-compatible testnets using ZetaChain.
    • Includes setup, contract development, deployment instructions, and examples for sending and tracking cross-chain messages.

@fadeev fadeev requested review from a team as code owners July 31, 2025 15:18
@vercel
Copy link

vercel bot commented Jul 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview Jul 31, 2025 3:51pm

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 31, 2025

📝 Walkthrough

Walkthrough

A new tutorial titled "Messaging" has been introduced to the developer documentation. The tutorial metadata was updated to include this entry, and a comprehensive guide was added, detailing the implementation of cross-chain messaging between contracts on EVM-compatible testnets using ZetaChain’s infrastructure.

Changes

Cohort / File(s) Change Summary
Tutorial Metadata Update
src/pages/developers/tutorials/_meta.json
Added a new tutorial entry "Messaging" with title, estimated read time, and description to the tutorials metadata JSON.
New Messaging Tutorial
src/pages/developers/tutorials/messaging.mdx
Introduced a detailed step-by-step tutorial on cross-chain contract messaging using ZetaChain, including prerequisites, contract development, deployment, message sending, transaction tracking, and related CLI commands.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SourceContract
    participant Gateway
    participant ZetaChain UniversalRouter
    participant DestinationContract

    User->>SourceContract: Initiate depositAndCall()
    SourceContract->>Gateway: depositAndCall(payload)
    Gateway->>ZetaChain UniversalRouter: Forward message
    ZetaChain UniversalRouter->>DestinationContract: onMessageReceive()
    DestinationContract->>User: (Optional) Emit event/confirmation
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch messaging-tutorial

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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: 0

🧹 Nitpick comments (2)
src/pages/developers/tutorials/messaging.mdx (2)

40-46: Fix typos in tooling instructions

TypeSCciptTypeScript, and forge soldeer update looks like a typo (soldeer) that will break the command.

-Install TypeSCcipt and Foundry dependencies:
+Install TypeScript and Foundry dependencies:

- forge soldeer update
+ forge update

These corrections prevent reader confusion and copy-paste errors during setup.


88-90: Remove stray back-tick in “Messaging”

Messa\ging` renders incorrectly.

-The Messa`ging base contract provides
+The Messaging base contract provides
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 94258dd and 3180869.

📒 Files selected for processing (2)
  • src/pages/developers/tutorials/_meta.json (1 hunks)
  • src/pages/developers/tutorials/messaging.mdx (1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/messaging.mdx

[grammar] ~40-~40: Ensure spelling is correct
Context: ...in new --project messaging Install TypeSCcipt and Foundry dependencies: cd messa...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 Gitleaks (8.27.2)
src/pages/developers/tutorials/messaging.mdx

361-361: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

⏰ 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). (2)
  • GitHub Check: build
  • GitHub Check: Analyze (javascript)
🔇 Additional comments (2)
src/pages/developers/tutorials/_meta.json (1)

22-26: Entry added correctly; verify front-end ordering requirements

The new "messaging" key follows the existing style (lower-case key, title-cased title, numeric readTime, concise description).
If the tutorials UI relies on a fixed sort order (e.g., array order to drive the sidebar), double-check that inserting this block between swap and solana doesn’t break any expected sequencing or numbering logic.
Otherwise, nothing blocking here.

src/pages/developers/tutorials/messaging.mdx (1)

358-365: False-positive secret detection – keep, but annotate

Static analysis flagged these hexadecimal strings as a “Generic API Key.” They are plainly contract addresses / tx hashes included for illustration, not secrets.
Consider adding a short comment above the JSON snippet to clarify that all values are public test-net data to silence future false positives.

No code change required.

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: 0

🧹 Nitpick comments (5)
src/pages/developers/tutorials/messaging.mdx (5)

40-46: Fix typos and verify the Foundry command

  • TypeSCciptTypeScript
  • forge soldeer update looks unrecognised; Foundry’s standard commands are forge install, forge update, or forge build. Please double-check.
-Install TypeSCcipt and Foundry dependencies:
+Install TypeScript and Foundry dependencies:-cd messaging
-yarn
-forge soldeer update
+cd messaging
+yarn
+forge update        # or forge install <repo> …

88-90: Remove stray back-tick in “Messaging”

-The Messa`ging base contract provides built-in access to Gateway and Router, and
+The Messaging base contract provides built-in access to Gateway and Router, and

54-58: Guard readers from leaking their private key

Storing a raw private key in a shell variable is convenient but risky—shell history, process listings, or logs can expose it. Recommend guiding users to load it from a .env file (git-ignored) or a secrets manager instead.


95-116: Normalise heading levels for handler sections

onMessageReceive is an H4 (####) while onMessageRevert and onRevert are H3 (###). Align them for consistent navigation and generated ToC ordering.


34-52: Add language specifiers to fenced blocks

Prefix the code fences with bash or shell (and solidity where applicable) to enable syntax highlighting in MDX/Markdown renderers.

```bash
npx zetachain new --project messaging
import "@zetachain/standard-contracts/…

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 318086983debd46210e345382cd2e93c817bce22 and 44816819db1dfdce014c495332111799124c3120.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/pages/developers/tutorials/messaging.mdx` (1 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>src/pages/developers/tutorials/messaging.mdx</summary>

[grammar] ~40-~40: Ensure spelling is correct
Context: ...in new --project messaging ```  Install TypeSCcipt and Foundry dependencies:  ``` cd messa...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

</details>

</details>
<details>
<summary>🪛 Gitleaks (8.27.2)</summary>

<details>
<summary>src/pages/developers/tutorials/messaging.mdx</summary>

361-361: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.

(generic-api-key)

</details>

</details>

</details>

<details>
<summary>⏰ 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). (1)</summary>

* GitHub Check: build

</details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@fadeev fadeev merged commit 162790a into main Aug 1, 2025
7 checks passed
@fadeev fadeev deleted the messaging-tutorial branch August 1, 2025 07:06
@coderabbitai coderabbitai bot mentioned this pull request Nov 21, 2025
6 tasks
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.

4 participants