Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sui Gateway page #585

Merged
merged 1 commit into from
Mar 28, 2025
Merged

Sui Gateway page #585

merged 1 commit into from
Mar 28, 2025

Conversation

fadeev
Copy link
Member

@fadeev fadeev commented Mar 20, 2025

Summary by CodeRabbit

  • New Features

    • Introduced support for the Sui blockchain, enabling users to interact with universal apps and deposit tokens.
    • Updated Solana details to reflect token deposit capabilities.
  • Documentation

    • Added comprehensive guidance for the Sui Gateway, outlining deposit options, transaction features, and administrative controls.

Copy link

vercel bot commented Mar 20, 2025

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

Name Status Preview Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview Mar 20, 2025 7:03pm

Copy link
Contributor

coderabbitai bot commented Mar 20, 2025

📝 Walkthrough

Walkthrough

The changes remove a Next.js type reference from the type declarations in next-env.d.ts. The blockchain metadata in _meta.json has been updated by revising the Solana entry’s description and adding a new entry for Sui. Additionally, a new documentation file (sui.mdx) has been introduced to detail the Sui Gateway. This documentation outlines functions for deposit processes, combined deposit-and-call operations, administrative capabilities, events, and read-only view functions.

Changes

File(s) Change Summary
next-env.d.ts Removed the reference to next/navigation-types/compat/navigation from the type definitions.
src/.../_meta.json Updated the "solana" description (from depositing SOL to depositing tokens) and added a new "sui" entry with title "Sui" and corresponding description.
src/.../sui.mdx Added documentation for the Sui Gateway, including detailed descriptions of deposit, deposit_and_call, administrative functions, events, and views.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant SuiGateway
    participant Receiver
    User->>SuiGateway: Initiate deposit(coins, receiver)
    SuiGateway->>SuiGateway: Validate deposit and process conversion
    SuiGateway->>Receiver: Transfer ZRC-20 tokens
    SuiGateway-->>User: Emit DepositEvent
Loading
sequenceDiagram
    participant User
    participant SuiGateway
    participant UniversalApp
    User->>SuiGateway: Initiate deposit_and_call(coins, receiver, payload)
    SuiGateway->>SuiGateway: Validate deposit and payload (max 1024 bytes)
    SuiGateway->>UniversalApp: Invoke onCall(payload)
    SuiGateway-->>User: Emit DepositAndCallEvent
Loading

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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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 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.

@fadeev fadeev linked an issue Mar 20, 2025 that may be closed by this pull request
@fadeev fadeev marked this pull request as ready for review March 20, 2025 19:38
@fadeev fadeev requested review from a team as code owners March 20, 2025 19:38
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 (3)
src/pages/developers/chains/sui.mdx (3)

24-32: Deposit Function Description and Receiver Parameter
The description following the code snippet effectively explains the function’s behavior. One optional nitpick: In the phrase "0x-prefixed hex string," consider verifying if the hyphenation aligns with your style guidelines, as it might be simplified to "0x prefixed hex string" for consistency.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~32-~32: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ixed hex string) representing either an externally-owned account (EOA) or a universal app addres...

(HYPHENATED_LY_ADVERB_ADJECTIVE)


68-73: Events Documentation: Monitoring Gateway Activity
The events section clearly lists and describes the events emitted by the Gateway. For even greater clarity, consider adding brief notes on how to subscribe to or filter these events in a production environment.


75-81: View Functions Explanation: Read-Only Gateway Data
The view functions are clearly enumerated with their primary purposes. Including sample use-cases or example outputs could further aid developers in leveraging these functions effectively.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e792720 and 8867b39.

📒 Files selected for processing (3)
  • next-env.d.ts (0 hunks)
  • src/pages/developers/chains/_meta.json (1 hunks)
  • src/pages/developers/chains/sui.mdx (1 hunks)
💤 Files with no reviewable changes (1)
  • next-env.d.ts
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/chains/sui.mdx

[uncategorized] ~32-~32: Although a hyphen is possible, it is not necessary in a compound modifier in which the first word is an adverb that ends in ‘ly’.
Context: ...ixed hex string) representing either an externally-owned account (EOA) or a universal app addres...

(HYPHENATED_LY_ADVERB_ADJECTIVE)

🔇 Additional comments (10)
src/pages/developers/chains/_meta.json (2)

20-21: Updated "solana" Description: Broader Token Support
The description for the Solana entry has been modified to "Make calls to universal apps and deposit tokens from Solana", which better reflects support for multiple token types instead of being limited to SOL.


22-24: New "sui" Entry Added: Sui Gateway Integration
The entry for Sui is well defined with an appropriate title and description. This aligns with the new documentation in sui.mdx and clearly indicates support for depositing tokens from Sui.

src/pages/developers/chains/sui.mdx (8)

1-7: Sui Gateway Introduction and Overview
The introductory section clearly labels the document with a title and provides a concise explanation of the Sui Gateway’s purpose. The inclusion of a link to the Sui tutorial is a valuable addition for further guidance.


8-11: Features List Clarity
The bullet list succinctly summarizes the two primary functionalities: depositing coins and depositing with a call. This clarity will help users quickly grasp the gateway's capabilities.


12-15: Deposit Section Heading and Context
The "## Deposit Coins" heading and explanatory text correctly set the context for the deposit functionality. The instruction to use the deposit function is clear and directs users appropriately.


16-23: Deposit Function Declaration Review
The Move code snippet for the deposit function is well-formatted and clear. Ensure that the syntax complies with Move standards and that the parameter types and ordering meet the Sui Gateway design specifications.


34-37: Deposit-and-Call Section Introduction
The introduction for the deposit_and_call function is clear, specifying when to use it instead of the standard deposit. This guidance is essential for preventing confusion between the two functions.


38-46: Deposit_and_Call Function Declaration Review
The Move code snippet for deposit_and_call is well-structured and clearly presents the parameters. Confirm that the payload size limit (1024 bytes) is enforced in downstream validations.


47-51: Deposit_and_Call Function Behavior Explanation
The accompanying explanation clearly states the requirements (e.g., universal app contract address, payload usage) and constraints (payload size limit) for the deposit_and_call operation. This detail is crucial for developers integrating with the Sui Gateway.


53-67: Administrative Functions Overview: Capabilities and Security
The documentation for administrative functions is comprehensive and provides necessary details regarding the required capability objects. It might be beneficial to include links or references where these capabilities (e.g., WhitelistCap, WithdrawCap, AdminCap) are defined or further explained.

Copy link
Member

@hernan-clich hernan-clich left a comment

Choose a reason for hiding this comment

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

Tested ACK

@fadeev fadeev merged commit 030f35d into main Mar 28, 2025
6 checks passed
@fadeev fadeev deleted the sui-page branch March 28, 2025 07:38
@coderabbitai coderabbitai bot mentioned this pull request Mar 28, 2025
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.

Connected chains: Sui
2 participants