-
Notifications
You must be signed in to change notification settings - Fork 59
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
Gateway: Interacting with Universal Apps #433
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
WalkthroughWalkthroughThe recent updates significantly enhance the documentation and functionality of the ZetaChain ecosystem. Notable changes include the introduction of a "chains" section detailing interoperability features among various blockchains, refinements in Solidity contracts, and a comprehensive gateway interface. These improvements provide developers with clearer guidance and tools for building universal applications that effectively interact across multiple blockchain networks. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant Gateway
participant EVM
participant Solana
participant Bitcoin
participant ZetaChain
Developer->>Gateway: Initiate deposit of tokens
Gateway->>EVM: Process deposit to universal app
EVM->>ZetaChain: Confirm deposit transaction
Developer->>Gateway: Invoke universal app
Gateway->>Solana: Process SOL deposit
Solana->>ZetaChain: Confirm SOL transaction
Developer->>Gateway: Withdraw tokens
Gateway->>Bitcoin: Execute BTC withdrawal
Bitcoin->>ZetaChain: Confirm BTC transaction
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 as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Solana section is a placeholder for now, but I'd like to ship this as soon as possible and add more info in follow-up PRs. |
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: 1
Outside diff range, codebase verification and nitpick comments (15)
src/pages/developers/chains/solana.mdx (1)
1-1
: Add a comma after "On Solana".For improved readability, insert a comma after introductory phrases with proper nouns.
-On Solana the gateway is implemented as a Solana program. +On Solana, the gateway is implemented as a Solana program.Tools
LanguageTool
[typographical] ~1-~1: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: On Solana the gateway is implemented as a Solana ...(IN_NNP_COMMA)
src/pages/developers/evm/gateway.mdx (6)
1-2
: Clarify the Introduction.The introduction should clearly define what a Gateway is and its significance in the context of ZetaChain. Consider adding a brief explanation of why a unified entry point is beneficial.
6-8
: Clarify the Role of Gateways on Connected Chains.The description of the gateway's role on connected chains should be more explicit about how it facilitates transactions. Consider providing examples or scenarios to illustrate its functionality.
20-30
: Expand on Feature Descriptions.The list of supported features could benefit from additional context or examples to help developers understand how to implement these features in their applications.
35-36
: Clarify Future Updates.The mention of future updates for multi-asset deposits should include a brief explanation of the expected benefits or changes. This will help set expectations for developers.
40-41
: Clarify the Role of the Gateway on ZetaChain.The description of the gateway's role on ZetaChain should be more detailed, possibly with examples of outgoing transactions.
50-52
: Clarify Future Updates for Withdrawals.Similar to deposits, the mention of future updates for multi-asset withdrawals should include expected benefits or changes.
src/pages/developers/chains/bitcoin.mdx (4)
7-9
: Add Comma After Introductory Phrase.Consider adding a comma after "On Bitcoin" for better readability and adherence to style guidelines.
On Bitcoin the gateway is implemented as an TSS MPC account. +,
Tools
LanguageTool
[typographical] ~7-
7: It is considered good style to insert a comma after introductory phrases with dates or proper nouns./components/shared"; On Bitcoin the gateway is implemented as an TSS MP...
Context: ...Alert } from "(IN_NNP_COMMA)
7-9
: Clarify Security Mechanism.The explanation of the TSS MPC account and its security mechanism should be expanded to provide more details on how the fragmentation and distribution of the private key enhance security.
Tools
LanguageTool
[typographical] ~7-
7: It is considered good style to insert a comma after introductory phrases with dates or proper nouns./components/shared"; On Bitcoin the gateway is implemented as an TSS MP...
Context: ...Alert } from "(IN_NNP_COMMA)
11-15
: Expand on Bitcoin Gateway Features.The list of supported features for the Bitcoin gateway could benefit from additional context or examples to help developers understand how to implement these features.
Line range hint
50-52
: Clarify the Role of TSS Address.The explanation of the TSS address and its role in holding BTC should be more detailed, possibly with examples of how ownership is tracked.
Tools
LanguageTool
[typographical] ~7-
7: It is considered good style to insert a comma after introductory phrases with dates or proper nouns./components/shared"; On Bitcoin the gateway is implemented as an TSS MP...
Context: ...Alert } from "(IN_NNP_COMMA)
src/pages/developers/chains/evm.mdx (2)
14-15
: Consider adding a comma for clarity.A comma after "contract" would improve readability.
To deposit tokens to an EOA or a universal contract, call the `deposit` function of the Gateway contract.Tools
LanguageTool
[uncategorized] ~14-~14: Possible missing comma found.
Context: ...deposit tokens to an EOA or a universal contract call thedeposit
function of the Gate...(AI_HYDRA_LEO_MISSING_COMMA)
43-45
: Consider rephrasing for clarity.Rephrase to improve clarity and readability.
receiver gets the ZRC-20 version of the deposited token (for example, ZRC-20 USDC.ETH).src/pages/developers/chains/zetachain.mdx (2)
13-14
: Consider adding a comma for clarity.A comma after "chain" would improve readability.
To withdraw a ZRC-20 tokens to an EOA or a contract on a connected chain, call the `withdraw` function of the gateway contract.Tools
LanguageTool
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... to an EOA or a contract on a connected chain call thewithdraw
function of the gat...(AI_HYDRA_LEO_MISSING_COMMA)
51-52
: Consider adding a comma for clarity.A comma after "chain" would improve readability.
To withdraw ZRC-20 tokens and make a call from a universal app to a contract on a connected chain, use the `withdrawAndCall` function of the gateway contract.Tools
LanguageTool
[uncategorized] ~52-~52: Possible missing comma found.
Context: ...versal app to a contract on a connected chain use thewithdrawAndCall
function of t...(AI_HYDRA_LEO_MISSING_COMMA)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (10)
- src/pages/developers/_meta.json (1 hunks)
- src/pages/developers/apps/_meta.json (1 hunks)
- src/pages/developers/apps/intro.mdx (2 hunks)
- src/pages/developers/chains/_meta.json (1 hunks)
- src/pages/developers/chains/bitcoin.mdx (1 hunks)
- src/pages/developers/chains/evm.mdx (1 hunks)
- src/pages/developers/chains/solana.mdx (1 hunks)
- src/pages/developers/chains/zetachain.mdx (1 hunks)
- src/pages/developers/evm/_meta.json (1 hunks)
- src/pages/developers/evm/gateway.mdx (1 hunks)
Files skipped from review due to trivial changes (1)
- src/pages/developers/apps/_meta.json
Additional context used
LanguageTool
src/pages/developers/chains/solana.mdx
[typographical] ~1-~1: It is considered good style to insert a comma after introductory phrases with dates or proper nouns.
Context: On Solana the gateway is implemented as a Solana ...(IN_NNP_COMMA)
src/pages/developers/chains/bitcoin.mdx
[typographical] ~7-
7: It is considered good style to insert a comma after introductory phrases with dates or proper nouns./components/shared"; On Bitcoin the gateway is implemented as an TSS MP...
Context: ...Alert } from "(IN_NNP_COMMA)
src/pages/developers/chains/evm.mdx
[uncategorized] ~14-~14: Possible missing comma found.
Context: ...deposit tokens to an EOA or a universal contract call thedeposit
function of the Gate...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~24-~24: 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: ...ZetaChain. Thereceiver
is either an externally-owned account (EOA) or a universal app addres...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[uncategorized] ~83-~83: Loose punctuation mark.
Context: ...onCrossChainCallreceives: -
message: value of the
payload-
amount`: amou...(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~85-~85: Two determiners in a row. Choose either “a” or “the”.
Context: ...ted tokens -zrc20
: ZRC-20 address of a the deposited tokens (for example, contract...(DT_DT)
[uncategorized] ~95-~95: Possible missing comma found.
Context: ...need to pass a function selector in the payload as the only function that can be called...(AI_HYDRA_LEO_MISSING_COMMA)
[style] ~100-~100: To form a complete sentence, be sure to include a subject.
Context: ... Call a Universal AppdepositAndCall
can also be used to call a universal app co...(MISSING_IT_THERE)
[uncategorized] ~110-~110: Possible missing comma found.
Context: ...posited. In the current version of the protocol only one ERC-20 asset can be deposited ...(AI_HYDRA_LEO_MISSING_COMMA)
src/pages/developers/chains/zetachain.mdx
[grammar] ~1-~1: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...l from a universal app to a contract on a connected chains or to withdraw tokens, use the ZetaChai...(A_NNS)
[grammar] ~8-~8: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...tokens to and making a contract call on a connected chains - calling contracts on connected chains...(A_NNS)
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... to an EOA or a contract on a connected chain call thewithdraw
function of the gat...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~52-~52: Possible missing comma found.
Context: ...versal app to a contract on a connected chain use thewithdrawAndCall
function of t...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Additional comments not posted (16)
src/pages/developers/chains/_meta.json (1)
1-17
: Metadata structure is clear and well-organized.The metadata entries for various blockchain gateways are well-structured and provide clear descriptions.
src/pages/developers/evm/_meta.json (1)
Line range hint
2-16
: Metadata restructuring effectively emphasizes the gateway concept.The changes streamline the metadata, focusing on the gateway as a single point of entry for interacting with universal apps.
src/pages/developers/_meta.json (1)
14-17
: Ensure Consistency in Terminology.The description in the "chains" section should align with the terminology used throughout the documentation. Ensure that terms like "Gateway" and "universal apps" are consistently used and defined across all related documentation.
src/pages/developers/evm/gateway.mdx (1)
12-15
: Ensure Technical Accuracy.Verify that the technical details regarding the implementation of gateways on different chains (EVM, Solana, Bitcoin) are accurate and up-to-date. This will ensure developers have the correct information.
src/pages/developers/chains/evm.mdx (4)
1-2
: Introduction is clear and informative.The overview provides a concise introduction to the EVM gateway and its capabilities.
52-63
: Explanation is clear and informative.The section provides a concise explanation of the
depositAndCall
function and its usage.
100-101
: Explanation is clear and informative.The section provides a concise explanation of the
depositAndCall
function and its usage.Tools
LanguageTool
[style] ~100-~100: To form a complete sentence, be sure to include a subject.
Context: ... Call a Universal AppdepositAndCall
can also be used to call a universal app co...(MISSING_IT_THERE)
123-124
: Reference is clear and useful.The section provides a helpful reference to the documentation for
RevertOptions
.src/pages/developers/apps/intro.mdx (5)
Line range hint
5-29
: Overview is clear and informative.The section provides a comprehensive introduction to Universal Apps and their capabilities.
30-34
: Solidity code example is clear and effective.The code example effectively demonstrates a Universal App contract and the updates are appropriate.
Line range hint
36-64
: Explanation is clear and informative.The section provides a concise explanation of how to interact with Universal Apps through the Gateway contract.
Line range hint
66-76
: Explanation is clear and informative.The section provides a concise explanation of Bitcoin support for Universal Apps.
Line range hint
78-98
: Explanation is clear and informative.The section provides a concise explanation of gas abstraction for Universal Apps.
src/pages/developers/chains/zetachain.mdx (3)
42-43
: Explanation is clear and informative.The section provides a concise explanation of the
withdraw
function for ZETA tokens.
85-97
: Explanation is clear and informative.The section provides a concise explanation of the
message
format when calling contracts.
114-163
: Explanation is clear and informative.The section provides a concise explanation of the
RevertOptions
struct and its usage.Tools
LanguageTool
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 2
Outside diff range, codebase verification and nitpick comments (13)
src/pages/developers/chains/zetachain.mdx (13)
13-13
: Add a comma for clarity.A comma is needed after "connected chain" to improve readability.
- To withdraw a ZRC-20 tokens to an EOA or a contract on a connected chain call + To withdraw a ZRC-20 tokens to an EOA or a contract on a connected chain, callTools
LanguageTool
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... to an EOA or a contract on a connected chain call thewithdraw
function of the gat...(AI_HYDRA_LEO_MISSING_COMMA)
20-20
: Remove unnecessary hyphen.The hyphen in "externally-owned" is not necessary.
- The `receiver` is either an externally-owned account (EOA) or a contract on a + The `receiver` is either an externally owned account (EOA) or a contract on aTools
LanguageTool
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
26-26
: Remove comma before 'because'.The comma before "because" is unnecessary.
- The `receiver` is of type `bytes`, because the receiver may be on a chain that + The `receiver` is of type `bytes` because the receiver may be on a chain thatTools
LanguageTool
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
28-28
: Add a hyphen for clarity.The phrase "chain agnostic" should be hyphenated.
- `bytes` allow the receiver address to be chain agnostic. + `bytes` allow the receiver address to be chain-agnostic.Tools
LanguageTool
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[uncategorized] ~28-~28: Possible missing comma found.
Context: ...hen withdrawing to a receiver on an EVM chain make sure that you convertaddress
to...(AI_HYDRA_LEO_MISSING_COMMA)
28-28
: Add a comma for clarity.A comma is needed after "EVM chain" to improve readability.
- When withdrawing to a receiver on an EVM chain make sure that you convert `address` to `bytes`. + When withdrawing to a receiver on an EVM chain, make sure that you convert `address` to `bytes`.Tools
LanguageTool
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[uncategorized] ~28-~28: Possible missing comma found.
Context: ...hen withdrawing to a receiver on an EVM chain make sure that you convertaddress
to...(AI_HYDRA_LEO_MISSING_COMMA)
52-52
: Add a comma for clarity.A comma is needed after "connected chain" to improve readability.
- a connected chain use the `withdrawAndCall` function of the gateway contract. + a connected chain, use the `withdrawAndCall` function of the gateway contract.Tools
LanguageTool
[uncategorized] ~52-~52: A comma might be missing here.
Context: ...versal app to a contract on a connected chain use thewithdrawAndCall
function of t...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
81-81
: Add a comma for clarity.A comma is needed after "this function" to improve readability.
- In the context of this function `zrc20` address acts as an identifier for + In the context of this function, `zrc20` address acts as an identifier forTools
LanguageTool
[uncategorized] ~81-~81: Possible missing comma found.
Context: ...stination chain. In the context of this functionzrc20
address acts as an identifier f...(AI_HYDRA_LEO_MISSING_COMMA)
83-83
: Add missing article for clarity.The article "the" is missing before "ZRC-20 ETH token address".
- use ZRC-20 ETH token address. + use the ZRC-20 ETH token address.Tools
LanguageTool
[uncategorized] ~83-~83: You might be missing the article “the” here.
Context: ...xample, to make a call to Ethereum, use ZRC-20 ETH token address. ## Format of the `m...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
127-127
: Remove loose punctuation.The colon should be replaced with a period for consistency.
- `revertAddress`: the address that should get assets back if the CCTX reverts. + `revertAddress` is the address that should get assets back if the CCTX reverts.Tools
LanguageTool
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
131-131
: Remove loose punctuation.The colon should be replaced with a period for consistency.
- `callOnRevert`: a boolean flag indicating whether the `onRevert` function should + `callOnRevert` is a boolean flag indicating whether the `onRevert` function shouldTools
LanguageTool
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
137-137
: Remove loose punctuation.The colon should be replaced with a period for consistency.
- `abortAddress`: the address that will receive the funds on ZetaChain if the CCTX + `abortAddress` is the address that will receive the funds on ZetaChain if the CCTXTools
LanguageTool
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
140-140
: Remove loose punctuation.The colon should be replaced with a period for consistency.
- `revertMessage`: message sent back to the `onRevert` function. + `revertMessage` is the message sent back to the `onRevert` function.Tools
LanguageTool
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
143-143
: Remove loose punctuation.The colon should be replaced with a period for consistency.
- `onRevertGasLimit`: the gas limit to be used when executing the `onRevert` + `onRevertGasLimit` is the gas limit to be used when executing the `onRevert`Tools
LanguageTool
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- src/pages/developers/chains/zetachain.mdx (1 hunks)
Additional context used
LanguageTool
src/pages/developers/chains/zetachain.mdx
[grammar] ~8-~8: The plural noun “chains” cannot be used with the article “a”. Did you mean “a connected chain” or “connected chains”?
Context: ...tokens to and making a contract call on a connected chains - calling contracts on connected chains...(A_NNS)
[uncategorized] ~13-~13: Possible missing comma found.
Context: ... to an EOA or a contract on a connected chain call thewithdraw
function of the gat...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[uncategorized] ~28-~28: Possible missing comma found.
Context: ...hen withdrawing to a receiver on an EVM chain make sure that you convertaddress
to...(AI_HYDRA_LEO_MISSING_COMMA)
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~52-~52: A comma might be missing here.
Context: ...versal app to a contract on a connected chain use thewithdrawAndCall
function of t...(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
[uncategorized] ~81-~81: Possible missing comma found.
Context: ...stination chain. In the context of this functionzrc20
address acts as an identifier f...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~83-~83: You might be missing the article “the” here.
Context: ...xample, to make a call to Ethereum, use ZRC-20 ETH token address. ## Format of the `m...(AI_EN_LECTOR_MISSING_DETERMINER_THE)
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Additional comments not posted (2)
src/pages/developers/chains/zetachain.mdx (2)
40-43
: Section is clear and concise.The explanation for withdrawing ZETA tokens is well-written.
85-111
: Section is clear and well-structured.The explanation of the
message
format is comprehensive and easy to understand.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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: 1
Outside diff range, codebase verification and nitpick comments (10)
src/pages/developers/chains/zetachain.mdx (10)
1-2
: Ensure grammatical consistency.The phrase "a connected chain" should be consistent with the plural form used later in the document.
Consider revising to "connected chains" for consistency.
26-29
: Remove unnecessary comma for clarity.The comma before "because" is unnecessary and should be removed.
Use this diff to fix the sentence:
- The `receiver` is of type `bytes`, because the receiver may be on a chain that + The `receiver` is of type `bytes` because the receiver may be on a chain thatTools
LanguageTool
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
28-28
: Consider using a hyphen for clarity.The expression "chain agnostic" is usually spelled with a hyphen.
Use this diff to fix the expression:
- `bytes` allow the receiver address to be chain agnostic. + `bytes` allow the receiver address to be chain-agnostic.Tools
LanguageTool
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
34-36
: Remove unnecessary comma for clarity.The comma before "because" is unnecessary and should be removed.
Use this diff to fix the sentence:
- You don't need to specify which chain to withdraw to, because each ZRC-20 has an + You don't need to specify which chain to withdraw to because each ZRC-20 has anTools
LanguageTool
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
58-60
: Use a comma before "and" for clarity.A comma should be used before "and" as it connects two independent clauses.
Use this diff to fix the sentence:
- The tokens are withdrawn and a call is made to a contract on the connected chain + The tokens are withdrawn, and a call is made to a contract on the connected chainTools
LanguageTool
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
127-127
: Correct loose punctuation for clarity.The colon should be replaced with a period for consistency with other sections.
Use this diff to fix the punctuation:
- `revertAddress`: the address that should get assets back if the CCTX reverts. + `revertAddress` is the address that should get assets back if the CCTX reverts.Tools
LanguageTool
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
131-131
: Correct loose punctuation for clarity.The colon should be replaced with a period for consistency with other sections.
Use this diff to fix the punctuation:
- `callOnRevert`: a boolean flag indicating whether the `onRevert` function should + `callOnRevert` is a boolean flag indicating whether the `onRevert` function shouldTools
LanguageTool
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
137-137
: Correct loose punctuation for clarity.The colon should be replaced with a period for consistency with other sections.
Use this diff to fix the punctuation:
- `abortAddress`: the address that will receive the funds on ZetaChain if the CCTX + `abortAddress` is the address that will receive the funds on ZetaChain if the CCTXTools
LanguageTool
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
140-140
: Correct loose punctuation for clarity.The colon should be replaced with a period for consistency with other sections.
Use this diff to fix the punctuation:
- `revertMessage`: message sent back to the `onRevert` function. This allows + `revertMessage` is the message sent back to the `onRevert` function. This allowsTools
LanguageTool
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
143-143
: Correct loose punctuation for clarity.The colon should be replaced with a period for consistency with other sections.
Use this diff to fix the punctuation:
- `onRevertGasLimit`: the gas limit to be used when executing the `onRevert` + `onRevertGasLimit` is the gas limit to be used when executing the `onRevert`Tools
LanguageTool
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/pages/developers/chains/zetachain.mdx (1 hunks)
- src/pages/developers/tutorials/bitcoin.mdx (2 hunks)
- src/pages/reference/apps/wallets.mdx (1 hunks)
Files skipped from review due to trivial changes (2)
- src/pages/developers/tutorials/bitcoin.mdx
- src/pages/reference/apps/wallets.mdx
Additional context used
LanguageTool
src/pages/developers/chains/zetachain.mdx
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
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, codebase verification and nitpick comments (12)
src/pages/developers/chains/zetachain.mdx (12)
1-2
: Correct grammatical error for clarity.The phrase "a connected chain" should be corrected for grammatical accuracy.
To make a call from a universal app to a contract on a connected chain or to withdraw tokens, use the ZetaChain gateway.
8-8
: Add missing bullet point for consistency.The list of functionalities should be consistently formatted with bullet points.
- withdrawing tokens to and making a contract call on connected chains + - withdrawing tokens to and making a contract call on connected chains
20-20
: Remove unnecessary hyphen for clarity.The phrase "externally-owned account" does not require a hyphen.
The `receiver` is either an externally-owned account (EOA) or a contract on aTools
LanguageTool
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
26-26
: Remove unnecessary comma for clarity.The comma before "because" is not needed.
The `receiver` is of type `bytes`, because the receiver may be on a chain thatTools
LanguageTool
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
28-28
: Add hyphen for clarity.The phrase "chain agnostic" is usually spelled with a hyphen.
`bytes` allow the receiver address to be chain agnostic.Tools
LanguageTool
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
34-34
: Remove unnecessary comma for clarity.The comma before "because" is not needed.
You don't need to specify which chain to withdraw to, because each ZRC-20 has anTools
LanguageTool
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
58-58
: Add comma for clarity.Use a comma before "and" to separate independent clauses.
The tokens are withdrawn and a call is made to a contract on the connected chainTools
LanguageTool
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
127-127
: Correct punctuation for clarity.Remove the colon at the beginning of the line.
`revertAddress`: the address that should get assets back if the CCTX reverts.Tools
LanguageTool
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
131-131
: Correct punctuation for clarity.Remove the colon at the beginning of the line.
`callOnRevert`: a boolean flag indicating whether the `onRevert` function shouldTools
LanguageTool
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
137-137
: Correct punctuation for clarity.Remove the colon at the beginning of the line.
`abortAddress`: the address that will receive the funds on ZetaChain if the CCTXTools
LanguageTool
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
140-140
: Correct punctuation for clarity.Remove the colon at the beginning of the line.
`revertMessage`: message sent back to the `onRevert` function. This allowsTools
LanguageTool
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
143-143
: Correct punctuation for clarity.Remove the colon at the beginning of the line.
`onRevertGasLimit`: the gas limit to be used when executing the `onRevert`Tools
LanguageTool
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- src/pages/developers/chains/zetachain.mdx (1 hunks)
- src/pages/developers/tutorials/hello.mdx (1 hunks)
Files skipped from review due to trivial changes (1)
- src/pages/developers/tutorials/hello.mdx
Additional context used
LanguageTool
src/pages/developers/chains/zetachain.mdx
[uncategorized] ~20-~20: 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: ...ernal; ``` Thereceiver
is either an externally-owned account (EOA) or a contract on a connec...(HYPHENATED_LY_ADVERB_ADJECTIVE)
[formatting] ~26-~26: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...tead. Thereceiver
is of typebytes
, because the receiver may be on a chain that use...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~28-~28: This expression is ususally spelled with a hyphen
Context: ...bytes` allow the receiver address to be chain agnostic. When withdrawing to a receiver on an E...(SPECIFIC_HYPHEN)
[formatting] ~34-~34: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ...ed to specify which chain to withdraw to, because each ZRC-20 has an associated chain fro...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~58-~58: Use a comma before “and” if it connects two independent clauses (unless they are closely connected and short).
Context: ... external; ``` The tokens are withdrawn and a call is made to a contract on the con...(COMMA_COMPOUND_SENTENCE_2)
[uncategorized] ~127-~127: Loose punctuation mark.
Context: ...onRevertGasLimit; } ```revertAddress
: the address that should get assets back...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~131-~131: Loose punctuation mark.
Context: ... be set tomsg.sender
.callOnRevert
: a boolean flag indicating whether the `...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~137-~137: Loose punctuation mark.
Context: ...essto
address(this).
abortAddress`: the address that will receive the funds...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~140-~140: Loose punctuation mark.
Context: ... is not currently used.revertMessage
: message sent back to theonRevert
fun...(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~143-~143: Loose punctuation mark.
Context: ...handling the revert.onRevertGasLimit
: the gas limit to be used when executing...(UNLIKELY_OPENING_PUNCTUATION)
Additional comments not posted (5)
src/pages/developers/chains/zetachain.mdx (5)
42-43
: LGTM!The section is clear and technically accurate.
64-65
: LGTM!The section is clear and technically accurate.
73-74
: LGTM!The section is clear and technically accurate.
87-89
: LGTM!The section is clear and technically accurate.
162-163
: LGTM!The section is clear and technically accurate.
Summary by CodeRabbit
New Features
Documentation
Bug Fixes