-
Notifications
You must be signed in to change notification settings - Fork 62
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
CCTX tracking doc #530
base: main
Are you sure you want to change the base?
CCTX tracking doc #530
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe pull request introduces documentation for Cross-Chain Transactions (CCTXs) in the ZetaChain developer documentation. A new metadata entry has been added to the JSON configuration, and a comprehensive Markdown file has been created to explain the intricacies of cross-chain transaction mechanics, including their types, tracking methods, and potential scenarios such as transaction flows between different blockchain networks. Changes
Sequence DiagramsequenceDiagram
participant User
participant SourceChain
participant ZetaChain
participant DestinationChain
User->>SourceChain: Initiate Cross-Chain Transaction
SourceChain->>ZetaChain: Inbound Transaction
ZetaChain->>DestinationChain: Outbound Transaction
DestinationChain-->>ZetaChain: Transaction Confirmation
ZetaChain-->>User: CCTX Tracking Information
This sequence diagram illustrates the high-level flow of a cross-chain transaction, demonstrating how a transaction moves from the source chain through ZetaChain to the destination chain, with tracking capabilities throughout the process. 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
🧹 Nitpick comments (5)
src/pages/developers/evm/_meta.json (1)
18-21
: Enhance the description for better clarity.The description currently repeats the title. Consider expanding it to better describe the purpose, such as "Learn how to track and monitor cross-chain transactions".
"cctx": { "title": "Cross-Chain Transactions", - "description": "Cross-Chain Transactions" + "description": "Learn how to track and monitor cross-chain transactions" },src/pages/developers/evm/cctx.mdx (4)
1-24
: Address grammatical issues in the introduction.The content is technically accurate, but there are a few grammatical issues to address:
- the first CCTX hash can be used as a inbound hash + the first CCTX hash can be used as an inbound hash🧰 Tools
🪛 LanguageTool
[misspelling] ~23-~23: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ng), the first CCTX hash can be used as a inbound hash to get the second CCTX has...(EN_A_VS_AN)
59-92
: Improve technical accuracy and readability in the examples.Several improvements needed in the examples section:
- Add missing articles before "call":
- Consider an example of making call from + Consider an example of making a call from
- Use correct technical terms:
- to cover the withdraw gas fee + to cover the withdrawal gas fee
- Add missing commas after introductory phrases:
- In this example a user + In this example, a user🧰 Tools
🪛 LanguageTool
[uncategorized] ~59-~59: Possible missing article found.
Context: ...Incoming Consider an example of making call from Ethereum Sepolia to a universal ap...(AI_HYDRA_LEO_MISSING_A)
[typographical] ~62-~62: It appears that a comma is missing.
Context: ...sal app contract on ZetaChain. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[uncategorized] ~78-~78: Possible missing article found.
Context: ... an inbound hash, the API responds with HTTP 404 response, because this CCTX does no...(AI_HYDRA_LEO_MISSING_AN)
[formatting] ~78-~78: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ... the API responds with HTTP 404 response, because this CCTX does not trigger another CCTX...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~83-~83: Possible missing article found.
Context: ... & Abort Consider an example of making call from Ethereum Sepolia to a universal ap...(AI_HYDRA_LEO_MISSING_A)
[typographical] ~86-~86: It appears that a comma is missing.
Context: ...ct on ZetaChain, which aborts. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[grammar] ~89-~89: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...plied tokens is not enough to cover the withdraw gas fee to Polygon Amoy, so the transac...(PREPOSITION_VERB)
[uncategorized] ~89-~89: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...n Amoy, so the transaction reverts. The amount of tokens is also not sufficient to cov...(AMOUNTOF_TO_NUMBEROF)
123-128
: Enhance the multiple outgoing transactions section.The section about multiple outgoing transactions would benefit from more details:
Consider adding:
- A brief explanation of common use cases for multiple outgoing transactions
- Any limitations on the number of concurrent outgoing transactions
- Best practices for handling multiple outgoing transactions
🧰 Tools
🪛 LanguageTool
[typographical] ~125-~125: It appears that a comma is missing.
Context: ...n trigger more than one CCTXs. In this example a single function call on ZetaChain mak...(DURING_THAT_TIME_COMMA)
1-128
: Consider adding visual aids to enhance understanding.The documentation would benefit from:
- A sequence diagram showing the flow of incoming and outgoing transactions
- A flowchart depicting the decision process for transaction outcomes (success/abort/revert)
Would you like me to help create these diagrams using Mermaid syntax?
🧰 Tools
🪛 LanguageTool
[misspelling] ~23-~23: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ng), the first CCTX hash can be used as a inbound hash to get the second CCTX has...(EN_A_VS_AN)
[typographical] ~31-~31: It appears that a comma is missing.
Context: ...rom ZetaChain to Polygon Amoy. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[uncategorized] ~59-~59: Possible missing article found.
Context: ...Incoming Consider an example of making call from Ethereum Sepolia to a universal ap...(AI_HYDRA_LEO_MISSING_A)
[typographical] ~62-~62: It appears that a comma is missing.
Context: ...sal app contract on ZetaChain. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[uncategorized] ~78-~78: Possible missing article found.
Context: ... an inbound hash, the API responds with HTTP 404 response, because this CCTX does no...(AI_HYDRA_LEO_MISSING_AN)
[formatting] ~78-~78: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ... the API responds with HTTP 404 response, because this CCTX does not trigger another CCTX...(COMMA_BEFORE_BECAUSE)
[uncategorized] ~83-~83: Possible missing article found.
Context: ... & Abort Consider an example of making call from Ethereum Sepolia to a universal ap...(AI_HYDRA_LEO_MISSING_A)
[typographical] ~86-~86: It appears that a comma is missing.
Context: ...ct on ZetaChain, which aborts. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[grammar] ~89-~89: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...plied tokens is not enough to cover the withdraw gas fee to Polygon Amoy, so the transac...(PREPOSITION_VERB)
[uncategorized] ~89-~89: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...n Amoy, so the transaction reverts. The amount of tokens is also not sufficient to cov...(AMOUNTOF_TO_NUMBEROF)
[uncategorized] ~103-~103: Possible missing article found.
Context: ...Incoming & Revert An example of making call from Base Sepolia to a universal app co...(AI_HYDRA_LEO_MISSING_A)
[typographical] ~106-~106: It appears that a comma is missing.
Context: ...t on ZetaChain, which reverts. In this example a user calls EVM Gateway's `depositAndC...(DURING_THAT_TIME_COMMA)
[grammar] ~109-~109: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...plied tokens is not enough to cover the withdraw gas fee to Polygon Amoy, so the transac...(PREPOSITION_VERB)
[typographical] ~125-~125: It appears that a comma is missing.
Context: ...n trigger more than one CCTXs. In this example a single function call on ZetaChain mak...(DURING_THAT_TIME_COMMA)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/pages/developers/evm/_meta.json
(1 hunks)src/pages/developers/evm/cctx.mdx
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/evm/cctx.mdx
[misspelling] ~23-~23: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’.
Context: ...ng), the first CCTX hash can be used as a inbound hash to get the second CCTX has...
(EN_A_VS_AN)
[typographical] ~31-~31: It appears that a comma is missing.
Context: ...rom ZetaChain to Polygon Amoy. In this example a user calls EVM Gateway's `depositAndC...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~59-~59: Possible missing article found.
Context: ...Incoming Consider an example of making call from Ethereum Sepolia to a universal ap...
(AI_HYDRA_LEO_MISSING_A)
[typographical] ~62-~62: It appears that a comma is missing.
Context: ...sal app contract on ZetaChain. In this example a user calls EVM Gateway's `depositAndC...
(DURING_THAT_TIME_COMMA)
[uncategorized] ~78-~78: Possible missing article found.
Context: ... an inbound hash, the API responds with HTTP 404 response, because this CCTX does no...
(AI_HYDRA_LEO_MISSING_AN)
[formatting] ~78-~78: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause.
Context: ... the API responds with HTTP 404 response, because this CCTX does not trigger another CCTX...
(COMMA_BEFORE_BECAUSE)
[uncategorized] ~83-~83: Possible missing article found.
Context: ... & Abort Consider an example of making call from Ethereum Sepolia to a universal ap...
(AI_HYDRA_LEO_MISSING_A)
[typographical] ~86-~86: It appears that a comma is missing.
Context: ...ct on ZetaChain, which aborts. In this example a user calls EVM Gateway's `depositAndC...
(DURING_THAT_TIME_COMMA)
[grammar] ~89-~89: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...plied tokens is not enough to cover the withdraw gas fee to Polygon Amoy, so the transac...
(PREPOSITION_VERB)
[uncategorized] ~89-~89: ‘Amount of’ should usually only be used with uncountable or mass nouns. Consider using “number” if this is not the case.
Context: ...n Amoy, so the transaction reverts. The amount of tokens is also not sufficient to cov...
(AMOUNTOF_TO_NUMBEROF)
[uncategorized] ~103-~103: Possible missing article found.
Context: ...Incoming & Revert An example of making call from Base Sepolia to a universal app co...
(AI_HYDRA_LEO_MISSING_A)
[typographical] ~106-~106: It appears that a comma is missing.
Context: ...t on ZetaChain, which reverts. In this example a user calls EVM Gateway's `depositAndC...
(DURING_THAT_TIME_COMMA)
[grammar] ~109-~109: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...plied tokens is not enough to cover the withdraw gas fee to Polygon Amoy, so the transac...
(PREPOSITION_VERB)
[typographical] ~125-~125: It appears that a comma is missing.
Context: ...n trigger more than one CCTXs. In this example a single function call on ZetaChain mak...
(DURING_THAT_TIME_COMMA)
|
||
## Incoming & Outgoing | ||
|
||
Consider an example of making call from Ethereum Sepolia to a universal app |
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.
Consider an example of making call from Ethereum Sepolia to a universal app | |
Consider an example of making a call from Ethereum Sepolia to a universal app |
tokens for target ZRC-20 tokens, but the amount of supplied tokens is not enough | ||
to cover the withdraw gas fee to Polygon Amoy, so the transaction reverts. The | ||
amount of tokens is also not sufficient to cover a revert transaction to | ||
Ethereum Sepolia, so the transaction abort. |
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.
Ethereum Sepolia, so the transaction abort. | |
Ethereum Sepolia, so the transaction aborts. |
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.
Great to have this in the docs
This doc helps developers understand how CCTXs can be tracked.
Summary by CodeRabbit