-
Notifications
You must be signed in to change notification settings - Fork 61
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
Solana deposit and call #520
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe changes in this pull request focus on updating the documentation for the Solana Gateway, specifically for the Changes
Possibly related issues
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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
🧹 Outside diff range and nitpick comments (3)
src/pages/developers/chains/solana.mdx (3)
13-17
: Consider adding address format detailsThe documentation should specify that the
receiver
parameter expects an Ethereum-style address (20 bytes). Consider adding a note about address format compatibility.pub fn deposit(ctx: Context<Deposit>, amount: u64, receiver: [u8; 20]) -> Result<()> - `amount`: The amount of SOL (in lamports) to deposit. - `receiver`: An array of bytes containing the receiver's address + `receiver`: A 20-byte array containing the receiver's Ethereum-style address on ZetaChain🧰 Tools
🪛 LanguageTool
[uncategorized] ~16-~16: Loose punctuation mark.
Context: ... [u8; 20]) -> Result<()> ``` -amount
: The amount of SOL (in lamports) to depo...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~17-~17: Loose punctuation mark.
Context: ...L (in lamports) to deposit. -receiver
: An array of bytes containing the receiv...(UNLIKELY_OPENING_PUNCTUATION)
62-65
: Enhance migration notice visibilityThe note about
onCrossChainCall
vsonCall
contains critical information about upcoming changes. Consider making this more prominent.-Note: `deposit_and_call` currently calls universal contract's `onCrossChainCall` -function and not the new `onCall` function that the EVM Gateway calls. This will -be changed in the upcoming versions of the protocol after the full migration to -Gateway. +> ⚠️ **Important Migration Notice** +> +> `deposit_and_call` currently uses the `onCrossChainCall` function instead of the +> new `onCall` function (used by EVM Gateway). This will be updated in future +> versions during the Gateway migration.
44-46
: Enhance CLI examples with expected outputConsider adding example output or success messages to help users verify their commands executed correctly.
npx hardhat solana-deposit --amount 0.01 --recipient 0x2DCB13e7Eb5253fD5255Ce3CbCB199B48A0C7dD9 + +# Expected output: +# ✓ Successfully deposited 0.01 SOL +# Transaction: https://solscan.io/tx/...Also applies to: 69-71
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
src/pages/developers/chains/solana.mdx
(2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/chains/solana.mdx
[uncategorized] ~16-~16: Loose punctuation mark.
Context: ... [u8; 20]) -> Result<()> ``` - amount
: The amount of SOL (in lamports) to depo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~17-~17: Loose punctuation mark.
Context: ...L (in lamports) to deposit. - receiver
: An array of bytes containing the receiv...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~57-~57: Loose punctuation mark.
Context: ...: Vec) -> Result<()> ``` - amount
: The amount of SOL (in lamports) to depo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~58-~58: Loose punctuation mark.
Context: ...L (in lamports) to deposit. - receiver
: An array of bytes containing a universa...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~60-~60: Loose punctuation mark.
Context: ...ract address on ZetaChain. - message
: A message passed to the universal contr...
(UNLIKELY_OPENING_PUNCTUATION)
🔇 Additional comments (2)
src/pages/developers/chains/solana.mdx (2)
Line range hint 1-6
: Well-structured introduction
The introduction clearly establishes the distinction between simple deposits and deposits with contract calls, setting appropriate context for the rest of the documentation.
🧰 Tools
🪛 LanguageTool
[uncategorized] ~2-~2: 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: ... (the native gas token of Solana) to an externally-owned account (EOA) or a universal applicatio...
(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~16-~16: Loose punctuation mark.
Context: ... [u8; 20]) -> Result<()> ``` - amount
: The amount of SOL (in lamports) to depo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~17-~17: Loose punctuation mark.
Context: ...L (in lamports) to deposit. - receiver
: An array of bytes containing the receiv...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~57-~57: Loose punctuation mark.
Context: ...: Vec) -> Result<()> ``` - amount
: The amount of SOL (in lamports) to depo...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~58-~58: Loose punctuation mark.
Context: ...L (in lamports) to deposit. - receiver
: An array of bytes containing a universa...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~60-~60: Loose punctuation mark.
Context: ...ract address on ZetaChain. - message
: A message passed to the universal contr...
(UNLIKELY_OPENING_PUNCTUATION)
129-131
: Documentation is complete and accurate
The conclusion effectively summarizes the Gateway's capabilities and aligns with the updated function signatures and examples throughout the document.
Separated deposit and deposit and call functions.
Depends on zeta-chain/toolkit#203
Summary by CodeRabbit
New Features
deposit
anddeposit_and_call
functionalities.deposit_and_call
function that allows for simultaneous deposits and contract calls.Documentation
deposit
function signature and clarified thereceiver
parameter requirements.deposit
anddeposit_and_call
functions.