-
Notifications
You must be signed in to change notification settings - Fork 148
Sui withdraw and call example #591
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
Warning Rate limit exceeded@fadeev has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 19 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new tutorial file has been added to the repository. This document provides step-by-step instructions for executing cross-chain operations between ZetaChain and the Sui blockchain. Specifically, it details how to withdraw tokens on ZetaChain while simultaneously triggering a Sui contract via the Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant L as Local Environment
participant Z as ZetaChain
participant S as Sui Chain
participant C as Sui Contract
U->>L: Setup localnet with ZetaChain & Sui
L->>Z: Deploy and configure cross-chain settings
U->>Z: Initiate withdrawAndCall transaction
Z->>S: Forward tokens to Sui chain
S->>C: Trigger Sui contract via withdrawAndCall()
C-->>S: Execute contract logic (swap, transfers, etc.)
S-->>U: Return transaction confirmation
Possibly related PRs
Suggested reviewers
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. 🪧 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 (
|
This comment was marked as resolved.
This comment was marked as resolved.
|
Everything works: |
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
🧹 Nitpick comments (2)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (2)
1-4: Clarify the introductory paragraph and fix grammatical issues.
The opening block currently reads as two merged sentences:"Interacting with ZetaChain universal apps from the Sui blockchain includes the
This tutorial demonstrates how to withdraw tokens to Sui while calling a Sui..."This construction contains redundant determiners (e.g., "includes the This") and appears incomplete. Consider rephrasing for clarity. For example:
-Interacting with ZetaChain universal apps from the Sui blockchain includes the -This tutorial demonstrates how to withdraw tokens to Sui while calling a Sui -contract in the same transaction—enabling seamless cross-chain operations and -powerful DeFi flows. +Interacting with ZetaChain universal apps from the Sui blockchain: +This tutorial demonstrates how to perform token withdrawals to Sui while concurrently +calling a Sui contract. This integrated approach enables seamless cross-chain operations +and powerful DeFi flows.🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...(DT_DT)
125-129: Refine terminology for improved clarity.
In the heading and introductory text for the operation, the phrase "withdraw and call" is used where "withdraw" appears as a noun. To avoid grammatical ambiguity, consider replacing it with "withdrawal" when used as a noun. For instance, update to "Execute Withdrawal and Call" in the heading and rephrase the descriptive sentence accordingly—while keeping the function namewithdrawAndCallintact.-## Execute Withdraw and Call -Now you can execute the withdraw and call operation. This will withdraw tokens +## Execute Withdrawal and Call +Now you can execute the withdrawal and call operation. This will withdraw tokens🧰 Tools
🪛 LanguageTool
[grammar] ~127-~127: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...(PREPOSITION_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/sui-withdraw-and-call.mdx
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...
(DT_DT)
[grammar] ~127-~127: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...
(PREPOSITION_VERB)
[grammar] ~158-~158: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...,$CLOCK" "$MESSAGE") # Execute the withdraw and call cast send 0x5FC8d32690cc9...
(PREPOSITION_VERB)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
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
♻️ Duplicate comments (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (1)
161-169: 🛠️ Refactor suggestionSensitive Key Exposure
The command block includes a hardcoded private key, which poses a security risk if left in production examples. It is advisable to replace the hardcoded key with a placeholder such as<YOUR_PRIVATE_KEY>.- --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 + --private-key <YOUR_PRIVATE_KEY>
🧹 Nitpick comments (3)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (3)
1-5: Improve Introduction Clarity
The opening paragraph contains consecutive determiners ("includes the This tutorial...") which can disrupt readability. Consider rephrasing the sentence to eliminate redundancy. For example, you might revise it to:
"Interacting with ZetaChain universal apps from the Sui blockchain. This tutorial demonstrates how to withdraw tokens to Sui while calling a Sui contract in the same transaction—enabling seamless cross-chain operations and powerful DeFi flows."🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...(DT_DT)
125-129: Terminology Consistency Suggestion
In the section titled "## Prepare Withdraw and Call", the term "withdraw" is used as a noun. For improved grammatical clarity, consider using "withdrawal" (e.g., "Prepare Withdrawal and Call"), unless you are intentionally aligning with the function namewithdrawAndCall().🧰 Tools
🪛 LanguageTool
[grammar] ~127-~127: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...(PREPOSITION_VERB)
158-158: Heading Wording Note
The section header "## Execute the withdraw and call" similarly uses "withdraw" as a noun. For clarity, you might consider phrasing it as "## Execute Withdrawal and Call"—keeping in mind the need to maintain consistency with the method name if that is referenced elsewhere.🧰 Tools
🪛 LanguageTool
[grammar] ~158-~158: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...$CLOCK" "$MESSAGE")## Execute the withdraw and callcast send 0x5FC8d32690cc9...(PREPOSITION_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/pages/developers/tutorials/_meta.json(1 hunks)src/pages/developers/tutorials/sui-withdraw-and-call.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/sui-withdraw-and-call.mdx
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...
(DT_DT)
[grammar] ~127-~127: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...
(PREPOSITION_VERB)
[grammar] ~158-~158: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...$CLOCK" "$MESSAGE") ## Execute the withdraw and call cast send 0x5FC8d32690cc9...
(PREPOSITION_VERB)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: Analyze (javascript)
🔇 Additional comments (1)
src/pages/developers/tutorials/_meta.json (1)
27-31: Metadata Entry Addition Looks Solid
The newly added"sui-withdraw-and-call"entry is well-formatted and consistent with the existing tutorial metadata. The title, readTime, and description fields are clear and match the style of the other entries.
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
♻️ Duplicate comments (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (1)
172-180: Avoid Exposing Sensitive Key Material.
The final command includes a hardcoded private key on line 179. Hardcoding sensitive credentials poses a security risk—even in examples—and may lead to inadvertent misuse. Replace the actual key with a placeholder (e.g.,<YOUR_PRIVATE_KEY>) and include a disclaimer if needed.
🧹 Nitpick comments (4)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (4)
1-4: Refine the Introductory Section for Clarity.
The opening lines contain redundant determiners and an abrupt sentence break ("includes the This tutorial demonstrates…"). Consider rephrasing for a smoother introduction. For example:"Interacting with ZetaChain universal apps from the Sui blockchain: This tutorial explains how to withdraw tokens to Sui while calling a Sui contract in a single transaction—enabling seamless cross-chain operations and powerful DeFi flows."
🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...(DT_DT)
99-102: Correct Markdown Code Fence Closure in "Mint tokens to your address" Section.
The code block intended for minting tokens appears to be closed with two backticks on line 101 instead of the standard triple backticks. This may lead to rendering issues in the documentation. Please replace the closing "``" with "```".
123-134: Fix Markdown Code Fence for the Deposit Tokens Block.
The code block that deposits tokens into the pool terminates with four backticks ("````") on line 134. For consistency and proper markdown rendering, adjust this to the conventional triple backticks ("```").
169-169: Revise Header for Grammatical Accuracy.
The header "## Execute the withdraw and call" (line 169) uses "withdraw" as a noun, which can be confusing. Consider updating it to "## Execute the withdrawal and call" for improved grammatical clarity.🧰 Tools
🪛 LanguageTool
[grammar] ~169-~169: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD## Execute the withdraw and callcast send 0x5FC8d32690cc9...(PREPOSITION_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/sui-withdraw-and-call.mdx
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...
(DT_DT)
[grammar] ~169-~169: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD ## Execute the withdraw and call cast send 0x5FC8d32690cc9...
(PREPOSITION_VERB)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: Analyze (javascript)
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
♻️ Duplicate comments (2)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (2)
194-198:⚠️ Potential issueSensitive Key Exposure: Gateway Approval Command.
The command on line 197 includes a hardcoded private key. Exposing sensitive key material—even in a tutorial—is risky. It's advisable to replace the literal key with a placeholder (e.g.,<YOUR_PRIVATE_KEY>) and add a disclaimer that emphasizes the importance of using secure practices in production.
200-211:⚠️ Potential issueSensitive Key Exposure: WithdrawAndCall Command.
Similarly, the withdrawAndCall command in this block also contains a hardcoded private key (line 211). For security best practices, substitute the key with<YOUR_PRIVATE_KEY>to prevent accidental exposure of sensitive data.
🧹 Nitpick comments (3)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (3)
1-5: Clarify and Complete the Introductory Sentence.
The first few lines contain an incomplete sentence ("Interacting with ZetaChain universal apps from the Sui blockchain includes the") and a redundant determiner, which may confuse readers. Consider rephrasing it to something like:"Interacting with ZetaChain universal apps from the Sui blockchain: This tutorial demonstrates how to withdraw tokens to Sui while calling a Sui contract in a single transaction—enabling seamless cross-chain operations and powerful DeFi flows."
This will improve readability and conform to the grammar suggestion from the static analysis.🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...(DT_DT)
161-163: Refine Operation Terminology.
The phrase "withdraw and call operation" is used as a noun here. For enhanced clarity and grammatical correctness, consider renaming it to "withdrawal and call operation" so that the term functions properly as a noun phrase.🧰 Tools
🪛 LanguageTool
[grammar] ~161-~161: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...(PREPOSITION_VERB)
192-192: Improve Section Title for Consistency.
The section header "## Execute the withdraw and call" would read more clearly as "## Execute the Withdrawal and Call." This small change avoids the grammatical issue of using "withdraw" as a noun and aligns with a more conventional phrasing.🧰 Tools
🪛 LanguageTool
[grammar] ~192-~192: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD ``` ## Execute the withdraw and call Approve Gateway to spend ZRC-...(PREPOSITION_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/sui-withdraw-and-call.mdx
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...
(DT_DT)
[grammar] ~161-~161: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...
(PREPOSITION_VERB)
[grammar] ~192-~192: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD ``` ## Execute the withdraw and call Approve Gateway to spend ZRC-...
(PREPOSITION_VERB)
| Keep this terminal window open. You should see a table displaying the deployment | ||
| details, including Gateway module and object IDs. | ||
|
|
||
| ## Deploy a Contract on Sui |
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.
This should be moved to a bash script for ease of use. Too many manual pieces for end users
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.
Not sure about this. It can be automated for sure, but a user would not get to see the whole process. Just run this script and a list of things a script does.
| After deployment, you'll need to set up the pool by minting tokens and creating | ||
| the initial liquidity. | ||
|
|
||
| Get the treasury cap: |
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.
same here
| Get the required contract IDs: | ||
|
|
||
| ```bash | ||
| CONFIG=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "\($pkg)::cetusmock::GlobalConfig") | .objectId') && echo $CONFIG |
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.
And maybe this as well.
| @@ -0,0 +1,220 @@ | |||
| Interacting with ZetaChain universal apps from the Sui blockchain includes the | |||
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.
This sentence is incomplete.
| cd sui | ||
| ``` | ||
|
|
||
| ``` |
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.
We should probably use ```bash for all CLI snippets.
| ``` | ||
|
|
||
| ``` | ||
| PUBLISHED=$(sui client publish --skip-dependency-verification --json) |
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.
No clear explanation of what this is before it's used in multiple commands.
|
@hernan-clich can you please share the output of: Feel free to use a gist. |
|
The reason I'm asking is both treasury and pool addresses are empty. |
sui client publish --skip-dependency-verification --jsonResponse{
"digest": "EbZsC7deD7suRS6FbaeeZfJXrgKv363Yeg8nzSgxV3BB",
"transaction": {
"data": {
"messageVersion": "v1",
"transaction": {
"kind": "ProgrammableTransaction",
"inputs": [
{
"type": "pure",
"valueType": "address",
"value": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
}
],
"transactions": [
{
"Publish": [
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000000000000000000000000000002",
"0x88b2ed7cb67dc1fe6d9509b72b08e15bcefc09ca44a73952b886e0c047f08d35"
]
},
{
"TransferObjects": [
[
{
"Result": 0
}
],
{
"Input": 0
}
]
}
]
},
"sender": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e",
"gasData": {
"payment": [
{
"objectId": "0x014e6fb4913f9250aa0a08b2669fe7e38cdaa3dae8a995df042e56c4f621f664",
"version": 4,
"digest": "Dy8BUAyyNaxkGei9VArxpow9V4SggBCKKetPGGrVGg5y"
}
],
"owner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e",
"price": "1000",
"budget": "9934400"
}
},
"txSignatures": [
"ALy5I0K6gv3ONq9AjXSJ2IhQPTFJYHxMQwBLtsM31ItFQFH8lP8YPQsE2ktPRQb8fcdRI24O7JZVHyDjQaEitwTgK1Ttt9yHkfoouwhpSIqyR48hfEw+cMV3GXkuc9O+jg=="
]
},
"effects": {
"messageVersion": "v1",
"status": {
"status": "success"
},
"executedEpoch": "1",
"gasUsed": {
"computationCost": "1000000",
"storageCost": "7934400",
"storageRebate": "978120",
"nonRefundableStorageFee": "9880"
},
"modifiedAtVersions": [
{
"objectId": "0x014e6fb4913f9250aa0a08b2669fe7e38cdaa3dae8a995df042e56c4f621f664",
"sequenceNumber": "4"
}
],
"transactionDigest": "EbZsC7deD7suRS6FbaeeZfJXrgKv363Yeg8nzSgxV3BB",
"created": [
{
"owner": "Immutable",
"reference": {
"objectId": "0x2a1a78c7ba7dae5a2a2bf55602174c52e3bb50e113932aebe3da22af669012b7",
"version": 1,
"digest": "CV1YiKofxpkH8Vfu95i4eMhGhxcM5HTrYXomibg1ziSy"
}
},
{
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"reference": {
"objectId": "0xe4b41e2acb60059e63d84b7d1507422785725abffa4dc710d71bb73f23536a2e",
"version": 5,
"digest": "B3hQfGQ5NFq7Fjfa188DEkASU5J7pc6SK9RKEmW7kdEL"
}
}
],
"mutated": [
{
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"reference": {
"objectId": "0x014e6fb4913f9250aa0a08b2669fe7e38cdaa3dae8a995df042e56c4f621f664",
"version": 5,
"digest": "5H83kMMa2sYNfhMs8gcM1eNcWYQfYgZSaeJmZsLn5aLa"
}
}
],
"gasObject": {
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"reference": {
"objectId": "0x014e6fb4913f9250aa0a08b2669fe7e38cdaa3dae8a995df042e56c4f621f664",
"version": 5,
"digest": "5H83kMMa2sYNfhMs8gcM1eNcWYQfYgZSaeJmZsLn5aLa"
}
},
"dependencies": [
"3SZH5DQNCQzZnCYA3tUHJYeuSohfmPkZdgxUnUfZfr4Y",
"8SNYumLo21w7CqenAd7wS4Y3eeJDieDKJn6uouG5UAR2",
"9MjjLsiEzTuEE2KVMJEuXWw2DCYL7HUsCu8Qa2eRyPnX"
]
},
"events": [],
"objectChanges": [
{
"type": "mutated",
"sender": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e",
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"objectType": "0x2::coin::Coin<0x2::sui::SUI>",
"objectId": "0x014e6fb4913f9250aa0a08b2669fe7e38cdaa3dae8a995df042e56c4f621f664",
"version": "5",
"previousVersion": "4",
"digest": "5H83kMMa2sYNfhMs8gcM1eNcWYQfYgZSaeJmZsLn5aLa"
},
{
"type": "published",
"packageId": "0x2a1a78c7ba7dae5a2a2bf55602174c52e3bb50e113932aebe3da22af669012b7",
"version": "1",
"digest": "CV1YiKofxpkH8Vfu95i4eMhGhxcM5HTrYXomibg1ziSy",
"modules": [
"connected"
]
},
{
"type": "created",
"sender": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e",
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"objectType": "0x2::package::UpgradeCap",
"objectId": "0xe4b41e2acb60059e63d84b7d1507422785725abffa4dc710d71bb73f23536a2e",
"version": "5",
"digest": "B3hQfGQ5NFq7Fjfa188DEkASU5J7pc6SK9RKEmW7kdEL"
}
],
"balanceChanges": [
{
"owner": {
"AddressOwner": "0x7c797b4ba1e3255935c63793d98089d22d930a73ce6a8be9beebc18455deeb4e"
},
"coinType": "0x2::sui::SUI",
"amount": "-7956280"
}
],
"timestampMs": "1745247670294",
"confirmedLocalExecution": true,
"checkpoint": "264"
} |
|
@hernan-clich you're not using the Sui example from zeta-chain/example-contracts#254 My fault, this should have been merged already. |
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
♻️ Duplicate comments (2)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (2)
61-68: Use explicit language identifiers for CLI code fences.Plain fences (
```) prevent syntax highlighting and can confuse readers. Change them to:- ``` - sui move build --force - ``` + ```bash + sui move build --force + ```This applies to all bash snippets throughout the tutorial.
1-5:⚠️ Potential issueFix incomplete and redundant introduction sentence.
The opening sentence is cut off and contains duplicate determiners (“includes the This”). It should be rewritten as a single, flowing statement. For example:
- Interacting with ZetaChain universal apps from the Sui blockchain includes the - This tutorial demonstrates how to withdraw tokens to Sui while calling a Sui - contract in the same transaction—enabling seamless cross-chain operations and - powerful DeFi flows. + This guide demonstrates how to interact with ZetaChain universal apps from the Sui + blockchain by withdrawing tokens and invoking a Sui contract in the same transaction, + enabling seamless cross-chain operations and advanced DeFi flows.🧰 Tools
🪛 LanguageTool
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...(DT_DT)
🧹 Nitpick comments (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (1)
198-202: Refine heading for grammatical correctness.Since “withdraw” is a verb rather than a noun, tweak the section title. For instance:
- ## Execute the withdraw and call + ## Execute Withdraw & Call🧰 Tools
🪛 LanguageTool
[grammar] ~198-~198: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD ``` ## Execute the withdraw and call Approve Gateway to spend ZRC-...(PREPOSITION_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx(1 hunks)
🧰 Additional context used
🪛 LanguageTool
src/pages/developers/tutorials/sui-withdraw-and-call.mdx
[grammar] ~1-~1: Two determiners in a row. Choose either “the” or “This”.
Context: ...l apps from the Sui blockchain includes the This tutorial demonstrates how to withdraw t...
(DT_DT)
[grammar] ~167-~167: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...hdraw and Call Now you can execute the withdraw and call operation. This will withdraw ...
(PREPOSITION_VERB)
[grammar] ~198-~198: The word ‘withdraw’ is not a noun. Did you mean “withdrawal”?
Context: ...") && echo $PAYLOAD ``` ## Execute the withdraw and call Approve Gateway to spend ZRC-...
(PREPOSITION_VERB)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
|
Will come back to this one once zeta-chain/example-contracts#254 is merged. |
|
@fadeev I was able to complete almost the entire tutorial, but something's wrong in the final command. I can approve my tokens just fine with the
But can't complete the final withdraw and call.
Here's the output of echo $PACKAGE
0xda01f0df9dcd81b09b1d9a64a9059f5f650c35655bf6e42a5946fd3b83b9efa4
echo $PAYLOAD
0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000503078646130316630646639646364383162303962316439613634613930353966356636353063333536353562663665343261353934366664336238336239656661343a3a746f6b656e3a3a544f4b454e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042b8112c2098d0304ee5ca9543f7aa6dc3c2d7eb05c8f7a23c34e1a2c16e0d9b6f21b4df5af7e65d21149d437d222e7e26c002508249e97ed4e603140fde7b389bace482a5ca0fcaa2d3096ac16088a465351de383532a755d730676068abb8a95dd2f7ed5cb9f472aca7cd6bc18920e3dc50a9eebb7026ae5bf8d3abc87200d900000000000000000000000000000000000000000000000000000000000000207114e95a18a0ab5f4a5b0dcf6e6a6ed609d31eaef6850881c1b932216c8fb18d |
|
@fadeev I tried again but keep facing the same issue, one thing I noticed is that running the tutorial makes the
|
hernan-clich
left a comment
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.
Tested ACK





Summary by CodeRabbit