Skip to content

Conversation

@fadeev
Copy link
Member

@fadeev fadeev commented Mar 25, 2025

Summary by CodeRabbit

  • Documentation
    • Introduced a new tutorial guiding developers through cross-chain operations between ZetaChain and Sui, detailing the setup of a local development environment, deployment of a Sui smart contract, and execution of a combined token withdrawal and contract call operation.
    • Added a new entry for the tutorial titled "Sui Withdraw & Call" with a read time of 60 minutes and a description on asset withdrawal and contract interaction on Sui.

@vercel
Copy link

vercel bot commented Mar 25, 2025

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

Name Status Preview Updated (UTC)
docs-v2 ✅ Ready (Inspect) Visit Preview May 9, 2025 11:18am

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2025

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 @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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.

📥 Commits

Reviewing files that changed from the base of the PR and between 6c83224 and 055f45a.

📒 Files selected for processing (1)
  • src/pages/developers/tutorials/sui-withdraw-and-call.mdx (1 hunks)
📝 Walkthrough

Walkthrough

A 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 withdrawAndCall() method. The tutorial also explains the necessary setup, including the deployment of a Sui contract and environment configuration using tools such as Sui CLI, Foundry, and jq.

Changes

File(s) Summary
src/pages/developers/tutorials/sui-withdraw-and-call.mdx Added a new tutorial guiding users on cross-chain token withdrawal and Sui contract invocation.
src/pages/developers/tutorials/_meta.json Added new entry for the tutorial with title, read time, and description.

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
Loading

Possibly related PRs

  • Update Swap tutorial with better localnet support #490: The changes in the main PR introduce a new tutorial focused on the withdrawAndCall() method for cross-chain operations, while the retrieved PR updates the swapAndWithdraw function and related tutorials, indicating a direct connection through the shared functionality of withdrawing tokens across chains.
  • Hello and Echo Contracts #485: The changes in the main PR introduce a new tutorial that includes the withdrawAndCall() method, which is also present in the retrieved PR's Hello contract, indicating a direct code-level connection.
  • Solana withdraw and call #561: The changes in the main PR, which introduce a tutorial for interacting with ZetaChain from Sui, are related to the retrieved PR that also discusses a tutorial for using ZetaChain with Solana, as both involve cross-chain operations and tutorials for similar functionalities.

Suggested reviewers

  • hernan-clich

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@fadeev

This comment was marked as resolved.

@fadeev
Copy link
Member Author

fadeev commented Mar 25, 2025

Everything works:

~/github.com/lumtis/sui-zeta PUBLISHED=$(sui client publish --skip-dependency-verification --json) && echo $PUBLISHED

[Warning]: Dependency sources are no longer verified automatically during publication and upgrade, so the `--skip-dependency-verification` flag is no longer necessary.
[note] Dependencies on Bridge, DeepBook, MoveStdlib, Sui, and SuiSystem are automatically added, but this feature is disabled for your package because you have explicitly included dependencies on Sui. Consider removing these dependencies from Move.toml.
UPDATING GIT DEPENDENCY https://github.com/MystenLabs/sui.git
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING suizeta
Skipping dependency verification
{
  "digest": "JCF1ENqt9ZFW5T6wHszwsLhAUJfpLbEAyuw4tKJHVZWF",
  "transaction": {
    "data": {
      "messageVersion": "v1",
      "transaction": {
        "kind": "ProgrammableTransaction",
        "inputs": [
          {
            "type": "pure",
            "valueType": "address",
            "value": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
          }
        ],
        "transactions": [
          {
            "Publish": [
              "0x0000000000000000000000000000000000000000000000000000000000000001",
              "0x0000000000000000000000000000000000000000000000000000000000000002"
            ]
          },
          {
            "TransferObjects": [
              [
                {
                  "Result": 0
                }
              ],
              {
                "Input": 0
              }
            ]
          }
        ]
      },
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "gasData": {
        "payment": [
          {
            "objectId": "0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29",
            "version": 5,
            "digest": "zRvsdGgKYyojGyscC8jgT1ueKty1cSHgGrsihfq3M2P"
          }
        ],
        "owner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
        "price": "1000",
        "budget": "32270800"
      }
    },
    "txSignatures": [
      "AApVRCLlNtRB/Cezl7lOVbh9G+0bsh4yEfoFiMBOxhZCT2nEZNrT7iT5ObdwHy6McfgmDfT8rIIOLI1h+mhlMw/M02lZUHM9e9Dcq3XI3DyCqT0BEh03lBzARbwUhCV5Jg=="
    ]
  },
  "effects": {
    "messageVersion": "v1",
    "status": {
      "status": "success"
    },
    "executedEpoch": "942",
    "gasUsed": {
      "computationCost": "1000000",
      "storageCost": "30270800",
      "storageRebate": "978120",
      "nonRefundableStorageFee": "9880"
    },
    "modifiedAtVersions": [
      {
        "objectId": "0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29",
        "sequenceNumber": "5"
      }
    ],
    "transactionDigest": "JCF1ENqt9ZFW5T6wHszwsLhAUJfpLbEAyuw4tKJHVZWF",
    "created": [
      {
        "owner": {
          "Shared": {
            "initial_shared_version": 6
          }
        },
        "reference": {
          "objectId": "0x4d0167280213d11f480dd93585822416f361010dcbbd6a3bb5d64bfeeca05a23",
          "version": 6,
          "digest": "5ydEHfcaJfh95up7e1guHEdfAdJTXyzBeaRfokqVTmZ1"
        }
      },
      {
        "owner": {
          "Shared": {
            "initial_shared_version": 6
          }
        },
        "reference": {
          "objectId": "0x5a6dac6e40be71e447ff55df41e8c7dfcefcd04bbcf1f065292898a68151f635",
          "version": 6,
          "digest": "5g7eAe6VL6H5uKUNuuLt7oBMrfbTpKJN5XNGsYsfJWPS"
        }
      },
      {
        "owner": {
          "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
        },
        "reference": {
          "objectId": "0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17",
          "version": 6,
          "digest": "BkbPnP7ReBazCzNdMGowGJDCdxdfVpKNGGYEaxNDLWKF"
        }
      },
      {
        "owner": "Immutable",
        "reference": {
          "objectId": "0x9dcd70eeaf758244d2e0a689f81004f6c73ee8b79a7f65ed7874bb815bc094d6",
          "version": 6,
          "digest": "De7Bsz9jMaogWAA521Agk9jMGHKp6Qcgzh79kPqxWcEK"
        }
      },
      {
        "owner": {
          "Shared": {
            "initial_shared_version": 6
          }
        },
        "reference": {
          "objectId": "0xc4ac72261a45ddb58bbb5578e1f29c1e2707dd1aeffe637444f178f819d88c64",
          "version": 6,
          "digest": "7tf3sVV7aR5TLRWVDbFAjUZ1Fp5rkv36Nw8xVzpUUqCn"
        }
      },
      {
        "owner": {
          "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
        },
        "reference": {
          "objectId": "0xcd36c8d311a607a8616b8b54b9481702054db46244bdea779b138a0b14415b9c",
          "version": 6,
          "digest": "3MPH1ssimE6cQRob9jWuTfFDz9QfgQzjXXEyNsQB2JDD"
        }
      },
      {
        "owner": {
          "Shared": {
            "initial_shared_version": 6
          }
        },
        "reference": {
          "objectId": "0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0",
          "version": 6,
          "digest": "EXcj6zurkv5KuWnxBPJyRNHKEncrDjDJnoyQuQytmnet"
        }
      },
      {
        "owner": "Immutable",
        "reference": {
          "objectId": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af",
          "version": 1,
          "digest": "3xVZTYkrsb57gL2H2Gr4d8N2QqtikYSwFAT8igrF9XtN"
        }
      }
    ],
    "mutated": [
      {
        "owner": {
          "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
        },
        "reference": {
          "objectId": "0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29",
          "version": 6,
          "digest": "9Wo8kD5pL7YQ5vPXcWcPuLc1rAetwR7uwMNHpUTQBJwc"
        }
      }
    ],
    "gasObject": {
      "owner": {
        "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
      },
      "reference": {
        "objectId": "0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29",
        "version": 6,
        "digest": "9Wo8kD5pL7YQ5vPXcWcPuLc1rAetwR7uwMNHpUTQBJwc"
      }
    },
    "dependencies": [
      "CcwPk9RHtbftXtuSoxhCRqSQdB6HhxsQ2Gk4op65Me5F",
      "Esj3mSE9xcsvEQvyLXxfkVdgFKWAuaWXtGRVAEjCJDpb"
    ]
  },
  "events": [],
  "objectChanges": [
    {
      "type": "mutated",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
      },
      "objectType": "0x2::coin::Coin<0x2::sui::SUI>",
      "objectId": "0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29",
      "version": "6",
      "previousVersion": "5",
      "digest": "9Wo8kD5pL7YQ5vPXcWcPuLc1rAetwR7uwMNHpUTQBJwc"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "Shared": {
          "initial_shared_version": 6
        }
      },
      "objectType": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::cetusmock::Clock",
      "objectId": "0x4d0167280213d11f480dd93585822416f361010dcbbd6a3bb5d64bfeeca05a23",
      "version": "6",
      "digest": "5ydEHfcaJfh95up7e1guHEdfAdJTXyzBeaRfokqVTmZ1"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "Shared": {
          "initial_shared_version": 6
        }
      },
      "objectType": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::cetusmock::GlobalConfig",
      "objectId": "0x5a6dac6e40be71e447ff55df41e8c7dfcefcd04bbcf1f065292898a68151f635",
      "version": "6",
      "digest": "5g7eAe6VL6H5uKUNuuLt7oBMrfbTpKJN5XNGsYsfJWPS"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
      },
      "objectType": "0x2::coin::TreasuryCap<0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>",
      "objectId": "0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17",
      "version": "6",
      "digest": "BkbPnP7ReBazCzNdMGowGJDCdxdfVpKNGGYEaxNDLWKF"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": "Immutable",
      "objectType": "0x2::coin::CoinMetadata<0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>",
      "objectId": "0x9dcd70eeaf758244d2e0a689f81004f6c73ee8b79a7f65ed7874bb815bc094d6",
      "version": "6",
      "digest": "De7Bsz9jMaogWAA521Agk9jMGHKp6Qcgzh79kPqxWcEK"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "Shared": {
          "initial_shared_version": 6
        }
      },
      "objectType": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::cetusmock::Partner",
      "objectId": "0xc4ac72261a45ddb58bbb5578e1f29c1e2707dd1aeffe637444f178f819d88c64",
      "version": "6",
      "digest": "7tf3sVV7aR5TLRWVDbFAjUZ1Fp5rkv36Nw8xVzpUUqCn"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
      },
      "objectType": "0x2::package::UpgradeCap",
      "objectId": "0xcd36c8d311a607a8616b8b54b9481702054db46244bdea779b138a0b14415b9c",
      "version": "6",
      "digest": "3MPH1ssimE6cQRob9jWuTfFDz9QfgQzjXXEyNsQB2JDD"
    },
    {
      "type": "created",
      "sender": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3",
      "owner": {
        "Shared": {
          "initial_shared_version": 6
        }
      },
      "objectType": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::cetusmock::Pool<0x2::sui::SUI, 0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>",
      "objectId": "0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0",
      "version": "6",
      "digest": "EXcj6zurkv5KuWnxBPJyRNHKEncrDjDJnoyQuQytmnet"
    },
    {
      "type": "published",
      "packageId": "0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af",
      "version": "1",
      "digest": "3xVZTYkrsb57gL2H2Gr4d8N2QqtikYSwFAT8igrF9XtN",
      "modules": [
        "cetusmock",
        "token",
        "universal"
      ]
    }
  ],
  "balanceChanges": [
    {
      "owner": {
        "AddressOwner": "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3"
      },
      "coinType": "0x2::sui::SUI",
      "amount": "-30292680"
    }
  ],
  "timestampMs": "1742906133495",
  "confirmedLocalExecution": true,
  "checkpoint": "235701"
}
~/github.com/lumtis/sui-zeta PACKAGE=$(echo $PUBLISHED | jq -r '.objectChanges[] | select(.type == "published") | .packageId') && echo $PACKAGE

0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af
~/github.com/lumtis/sui-zeta TREASURY=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "0x2::coin::TreasuryCap<\($pkg)::token::TOKEN>") | .objectId') && echo $TREASURY

0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17
~/github.com/lumtis/sui-zeta POOL=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "\($pkg)::cetusmock::Pool<0x2::sui::SUI, \($pkg)::token::TOKEN>") | .objectId') && echo $POOL

0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0
~/github.com/lumtis/sui-zeta RECIPIENT=$(sui client active-address) && echo $RECIPIENT

0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3
~/github.com/lumtis/sui-zeta sui client call \
  --package "$PACKAGE" \
  --module token \
  --function mint \
  --args "$TREASURY" 1000000 "$RECIPIENT"
Transaction Digest: 3ZowDn3LuBsfV7oTDkiaBb8tqLwg7scSgRXCL4AJxkzY
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data                                                                                             │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                   │
│ Gas Owner: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                │
│ Gas Budget: 4342776 MIST                                                                                     │
│ Gas Price: 1000 MIST                                                                                         │
│ Gas Payment:                                                                                                 │
│  ┌──                                                                                                         │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                                    │
│  │ Version: 6                                                                                                │
│  │ Digest: 9Wo8kD5pL7YQ5vPXcWcPuLc1rAetwR7uwMNHpUTQBJwc                                                      │
│  └──                                                                                                         │
│                                                                                                              │
│ Transaction Kind: Programmable                                                                               │
│ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ Input Objects                                                                                            │ │
│ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ 0   Imm/Owned Object ID: 0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17              │ │
│ │ 1   Pure Arg: Type: u64, Value: "1000000"                                                                │ │
│ │ 2   Pure Arg: Type: address, Value: "0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3" │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭──────────────────────────────────────────────────────────────────────────────────╮                         │
│ │ Commands                                                                         │                         │
│ ├──────────────────────────────────────────────────────────────────────────────────┤                         │
│ │ 0  MoveCall:                                                                     │                         │
│ │  ┌                                                                               │                         │
│ │  │ Function:  mint                                                               │                         │
│ │  │ Module:    token                                                              │                         │
│ │  │ Package:   0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af │                         │
│ │  │ Arguments:                                                                    │                         │
│ │  │   Input  0                                                                    │                         │
│ │  │   Input  1                                                                    │                         │
│ │  │   Input  2                                                                    │                         │
│ │  └                                                                               │                         │
│ ╰──────────────────────────────────────────────────────────────────────────────────╯                         │
│                                                                                                              │
│ Signatures:                                                                                                  │
│    MX7DeM5DP7lsJig6rnlkEKMgGwSRfqrsWgwgj9bYtHsOGgv/77PPCScYMzV0H3GMPsziaU0QBSODlGH5dOIPCg==                  │
│                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Effects                                                                               │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Digest: 3ZowDn3LuBsfV7oTDkiaBb8tqLwg7scSgRXCL4AJxkzY                                              │
│ Status: Success                                                                                   │
│ Executed Epoch: 942                                                                               │
│                                                                                                   │
│ Created Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0xd6275f03e3b9cf386053b1d97240ff5d5d10d885bfca8523874ae56389db44b3                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 7                                                                                     │
│  │ Digest: FNUhXNCoaYgxy5EgyN9SEV84di3bZs2FonCgLjgbaKXS                                           │
│  └──                                                                                              │
│ Mutated Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 7                                                                                     │
│  │ Digest: 82K6QD2MCQSixG8SEmYWhcLEsMke1mF6ktsAtZNiLRh1                                           │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ ID: 0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 7                                                                                     │
│  │ Digest: EqaGqX2rAd3G9cCsxneNBrgg4jwkCzrCpsxu47ZLxf2k                                           │
│  └──                                                                                              │
│ Gas Object:                                                                                       │
│  ┌──                                                                                              │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 7                                                                                     │
│  │ Digest: 82K6QD2MCQSixG8SEmYWhcLEsMke1mF6ktsAtZNiLRh1                                           │
│  └──                                                                                              │
│ Gas Cost Summary:                                                                                 │
│    Storage Cost: 4043200 MIST                                                                     │
│    Computation Cost: 1000000 MIST                                                                 │
│    Storage Rebate: 2678544 MIST                                                                   │
│    Non-refundable Storage Fee: 27056 MIST                                                         │
│                                                                                                   │
│ Transaction Dependencies:                                                                         │
│    JCF1ENqt9ZFW5T6wHszwsLhAUJfpLbEAyuw4tKJHVZWF                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────╮
│ No transaction block events │
╰─────────────────────────────╯

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Object Changes                                                                                                           │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Created Objects:                                                                                                         │
│  ┌──                                                                                                                     │
│  │ ObjectID: 0xd6275f03e3b9cf386053b1d97240ff5d5d10d885bfca8523874ae56389db44b3                                          │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                            │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )                         │
│  │ ObjectType: 0x2::coin::Coin<0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>         │
│  │ Version: 7                                                                                                            │
│  │ Digest: FNUhXNCoaYgxy5EgyN9SEV84di3bZs2FonCgLjgbaKXS                                                                  │
│  └──                                                                                                                     │
│ Mutated Objects:                                                                                                         │
│  ┌──                                                                                                                     │
│  │ ObjectID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                                          │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                            │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )                         │
│  │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI>                                                                            │
│  │ Version: 7                                                                                                            │
│  │ Digest: 82K6QD2MCQSixG8SEmYWhcLEsMke1mF6ktsAtZNiLRh1                                                                  │
│  └──                                                                                                                     │
│  ┌──                                                                                                                     │
│  │ ObjectID: 0x7fd83656e6c3980040cfae62a78765803a548eefc37393f45e5d0e558f75de17                                          │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                            │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )                         │
│  │ ObjectType: 0x2::coin::TreasuryCap<0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>  │
│  │ Version: 7                                                                                                            │
│  │ Digest: EqaGqX2rAd3G9cCsxneNBrgg4jwkCzrCpsxu47ZLxf2k                                                                  │
│  └──                                                                                                                     │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Balance Changes                                                                                   │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ CoinType: 0x2::sui::SUI                                                                        │
│  │ Amount: -2364656                                                                               │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ CoinType: 0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN     │
│  │ Amount: 1000000                                                                                │
│  └──                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
~/github.com/lumtis/sui-zeta TOKEN=$(sui client objects --json | jq -r --arg pkg "$PACKAGE" '.[].data | select(.type == "0x2::coin::Coin<\($pkg)::token::TOKEN>") | .objectId') && echo $TOKEN

0xd6275f03e3b9cf386053b1d97240ff5d5d10d885bfca8523874ae56389db44b3
~/github.com/lumtis/sui-zeta sui client call \
  --package "$PACKAGE" \
  --module cetusmock \
  --function deposit \
  --type-args "0x2::sui::SUI" "$PACKAGE::token::TOKEN" \
  --args "$POOL" "$TOKEN"
Transaction Digest: GgiqBdCpmyYKuHEtuhHiVBsaYHJPipvNfuqzMJ5JifVd
╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data                                                                                │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                      │
│ Gas Owner: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                   │
│ Gas Budget: 2000000 MIST                                                                        │
│ Gas Price: 1000 MIST                                                                            │
│ Gas Payment:                                                                                    │
│  ┌──                                                                                            │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                       │
│  │ Version: 7                                                                                   │
│  │ Digest: 82K6QD2MCQSixG8SEmYWhcLEsMke1mF6ktsAtZNiLRh1                                         │
│  └──                                                                                            │
│                                                                                                 │
│ Transaction Kind: Programmable                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ Input Objects                                                                               │ │
│ ├─────────────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ 0   Shared Object    ID: 0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0 │ │
│ │ 1   Imm/Owned Object ID: 0xd6275f03e3b9cf386053b1d97240ff5d5d10d885bfca8523874ae56389db44b3 │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭───────────────────────────────────────────────────────────────────────────────────────╮       │
│ │ Commands                                                                              │       │
│ ├───────────────────────────────────────────────────────────────────────────────────────┤       │
│ │ 0  MoveCall:                                                                          │       │
│ │  ┌                                                                                    │       │
│ │  │ Function:  deposit                                                                 │       │
│ │  │ Module:    cetusmock                                                               │       │
│ │  │ Package:   0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af      │       │
│ │  │ Type Arguments:                                                                    │       │
│ │  │   0x2::sui::SUI                                                                    │       │
│ │  │   0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN │       │
│ │  │ Arguments:                                                                         │       │
│ │  │   Input  0                                                                         │       │
│ │  │   Input  1                                                                         │       │
│ │  └                                                                                    │       │
│ ╰───────────────────────────────────────────────────────────────────────────────────────╯       │
│                                                                                                 │
│ Signatures:                                                                                     │
│    2Sh3SfyA3cFr5ncnaMH3eD2jtBtw70GIpIsB2RTFg2uM78B67zPiiKTRCjEljctfw3aalX7yYVjxExNA6BZcAQ==     │
│                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Effects                                                                               │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Digest: GgiqBdCpmyYKuHEtuhHiVBsaYHJPipvNfuqzMJ5JifVd                                              │
│ Status: Success                                                                                   │
│ Executed Epoch: 942                                                                               │
│ Mutated Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 8                                                                                     │
│  │ Digest: 7ndHVvdnhy6gM2JzViXDCA8EQLoinbBhjvXhrcfDNDk6                                           │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ ID: 0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0                         │
│  │ Owner: Shared( 6 )                                                                             │
│  │ Version: 8                                                                                     │
│  │ Digest: 8Mdx8ciTyLhxz4cGrxJmynSQuSdoP7VkUYgauJVFmica                                           │
│  └──                                                                                              │
│ Shared Objects:                                                                                   │
│  ┌──                                                                                              │
│  │ ID: 0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0                         │
│  │ Version: 6                                                                                     │
│  │ Digest: EXcj6zurkv5KuWnxBPJyRNHKEncrDjDJnoyQuQytmnet                                           │
│  └──                                                                                              │
│ Deleted Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0xd6275f03e3b9cf386053b1d97240ff5d5d10d885bfca8523874ae56389db44b3                         │
│  │ Version: 8                                                                                     │
│  │ Digest: 7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz                                           │
│  └──                                                                                              │
│ Gas Object:                                                                                       │
│  ┌──                                                                                              │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 8                                                                                     │
│  │ Digest: 7ndHVvdnhy6gM2JzViXDCA8EQLoinbBhjvXhrcfDNDk6                                           │
│  └──                                                                                              │
│ Gas Cost Summary:                                                                                 │
│    Storage Cost: 3070400 MIST                                                                     │
│    Computation Cost: 1000000 MIST                                                                 │
│    Storage Rebate: 4363920 MIST                                                                   │
│    Non-refundable Storage Fee: 44080 MIST                                                         │
│                                                                                                   │
│ Transaction Dependencies:                                                                         │
│    3ZowDn3LuBsfV7oTDkiaBb8tqLwg7scSgRXCL4AJxkzY                                                   │
│    Esj3mSE9xcsvEQvyLXxfkVdgFKWAuaWXtGRVAEjCJDpb                                                   │
│    JCF1ENqt9ZFW5T6wHszwsLhAUJfpLbEAyuw4tKJHVZWF                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────╮
│ No transaction block events │
╰─────────────────────────────╯

╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Object Changes                                                                                                                                                                                       │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Mutated Objects:                                                                                                                                                                                     │
│  ┌──                                                                                                                                                                                                 │
│  │ ObjectID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                                                                                                                      │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                                                                                                        │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )                                                                                                     │
│  │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI>                                                                                                                                                        │
│  │ Version: 8                                                                                                                                                                                        │
│  │ Digest: 7ndHVvdnhy6gM2JzViXDCA8EQLoinbBhjvXhrcfDNDk6                                                                                                                                              │
│  └──                                                                                                                                                                                                 │
│  ┌──                                                                                                                                                                                                 │
│  │ ObjectID: 0xdb1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0                                                                                                                      │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                                                                                                        │
│  │ Owner: Shared( 6 )                                                                                                                                                                                │
│  │ ObjectType: 0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::cetusmock::Pool<0x2::sui::SUI, 0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN>  │
│  │ Version: 8                                                                                                                                                                                        │
│  │ Digest: 8Mdx8ciTyLhxz4cGrxJmynSQuSdoP7VkUYgauJVFmica                                                                                                                                              │
│  └──                                                                                                                                                                                                 │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Balance Changes                                                                                   │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ CoinType: 0x2::sui::SUI                                                                        │
│  │ Amount: 293520                                                                                 │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ CoinType: 0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN     │
│  │ Amount: -1000000                                                                               │
│  └──                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
~/github.com/lumtis/sui-zeta COIN=$(sui client gas --json | jq -r '.[0].gasCoinId') && echo $COIN

0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29
~/github.com/lumtis/sui-zeta sui client call \
  --package 0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2 \
  --module gateway \
  --function deposit \
  --type-args 0x2::sui::SUI \
  --args 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7 "$COIN" 0x4955a3F38ff86ae92A914445099caa8eA2B9bA32
Transaction Digest: 4Jet5Z73NVHnepj8bd1D3uvU1pK9wK7qEVTjfaYAuSKt
╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data                                                                                │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                      │
│ Gas Owner: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                   │
│ Gas Budget: 2061560 MIST                                                                        │
│ Gas Price: 1000 MIST                                                                            │
│ Gas Payment:                                                                                    │
│  ┌──                                                                                            │
│  │ ID: 0xa54df2bde3999c32bd1e5103aad296c9ee241d067cf0d6d4f53e53716368ae5e                       │
│  │ Version: 4                                                                                   │
│  │ Digest: dGBvP1P1KvzmejmhAbwvC8v8pocutK3D6sBBXZE2pp9                                          │
│  └──                                                                                            │
│                                                                                                 │
│ Transaction Kind: Programmable                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ Input Objects                                                                               │ │
│ ├─────────────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ 0   Shared Object    ID: 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7 │ │
│ │ 1   Imm/Owned Object ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29 │ │
│ │ 2   Pure Arg: Type: 0x1::ascii::String, Value: "0x4955a3F38ff86ae92A914445099caa8eA2B9bA32" │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭──────────────────────────────────────────────────────────────────────────────────╮            │
│ │ Commands                                                                         │            │
│ ├──────────────────────────────────────────────────────────────────────────────────┤            │
│ │ 0  MoveCall:                                                                     │            │
│ │  ┌                                                                               │            │
│ │  │ Function:  deposit                                                            │            │
│ │  │ Module:    gateway                                                            │            │
│ │  │ Package:   0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2 │            │
│ │  │ Type Arguments:                                                               │            │
│ │  │   0x2::sui::SUI                                                               │            │
│ │  │ Arguments:                                                                    │            │
│ │  │   Input  0                                                                    │            │
│ │  │   Input  1                                                                    │            │
│ │  │   Input  2                                                                    │            │
│ │  └                                                                               │            │
│ ╰──────────────────────────────────────────────────────────────────────────────────╯            │
│                                                                                                 │
│ Signatures:                                                                                     │
│    mZm0GOaEWGdUTO/UH9z2nXIj1NE+gnna2x7J4byQnSEtcptuMZHN9N0V09vHWYJKPJmUwokk44X5EExJI0mIBw==     │
│                                                                                                 │
╰─────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Effects                                                                               │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Digest: 4Jet5Z73NVHnepj8bd1D3uvU1pK9wK7qEVTjfaYAuSKt                                              │
│ Status: Success                                                                                   │
│ Executed Epoch: 943                                                                               │
│ Mutated Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0x4a22690b3ac719403359a5e6c13bcc5927bda226b2036b487b34661cc1cda80b                         │
│  │ Owner: Object ID: ( 0x43a5ee1226cafb3aa5323af560b97a3271df7f4c31d417eb2303f06443f7d904 )       │
│  │ Version: 9                                                                                     │
│  │ Digest: 28Yzjux1AHsAjrG43heJc5vAM6tYPEFcthXNXvSoeCoU                                           │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ ID: 0xa54df2bde3999c32bd1e5103aad296c9ee241d067cf0d6d4f53e53716368ae5e                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 9                                                                                     │
│  │ Digest: J32xpBu6S6gkoDNGqFEuAmwoLZ4o8WR2QKy836fXaZ7                                            │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ ID: 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7                         │
│  │ Owner: Shared( 5 )                                                                             │
│  │ Version: 9                                                                                     │
│  │ Digest: BDTAFf8BqLrV1eqrw29qqUX3xV3epWpKHMN24dAWNzVC                                           │
│  └──                                                                                              │
│ Shared Objects:                                                                                   │
│  ┌──                                                                                              │
│  │ ID: 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7                         │
│  │ Version: 5                                                                                     │
│  │ Digest: 3UKD6Hdc2tKoiYFiPMKDMPpv6xLoNuJRGJSHmNSn1bjo                                           │
│  └──                                                                                              │
│ Deleted Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0x73cd1992fc9f31effb3803c91d5b1be2fe45b8bdc6c66a72939f1d825c09ea29                         │
│  │ Version: 9                                                                                     │
│  │ Digest: 7gyGAp71YXQRoxmFBaHxofQXAipvgHyBKPyxmdSJxyvz                                           │
│  └──                                                                                              │
│ Gas Object:                                                                                       │
│  ┌──                                                                                              │
│  │ ID: 0xa54df2bde3999c32bd1e5103aad296c9ee241d067cf0d6d4f53e53716368ae5e                         │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ Version: 9                                                                                     │
│  │ Digest: J32xpBu6S6gkoDNGqFEuAmwoLZ4o8WR2QKy836fXaZ7                                            │
│  └──                                                                                              │
│ Gas Cost Summary:                                                                                 │
│    Storage Cost: 6156000 MIST                                                                     │
│    Computation Cost: 1000000 MIST                                                                 │
│    Storage Rebate: 7072560 MIST                                                                   │
│    Non-refundable Storage Fee: 71440 MIST                                                         │
│                                                                                                   │
│ Transaction Dependencies:                                                                         │
│    9hd8BD6Zd5UmmJCabbakAQMr1EQvWGF4HszDqHLRJEvt                                                   │
│    CcwPk9RHtbftXtuSoxhCRqSQdB6HhxsQ2Gk4op65Me5F                                                   │
│    Esj3mSE9xcsvEQvyLXxfkVdgFKWAuaWXtGRVAEjCJDpb                                                   │
│    GgiqBdCpmyYKuHEtuhHiVBsaYHJPipvNfuqzMJ5JifVd                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Block Events                                                                                │
├─────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│  ┌──                                                                                                    │
│  │ EventID: 4Jet5Z73NVHnepj8bd1D3uvU1pK9wK7qEVTjfaYAuSKt:0                                              │
│  │ PackageID: 0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2                        │
│  │ Transaction Module: gateway                                                                          │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                           │
│  │ EventType: 0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2::gateway::DepositEvent │
│  │ ParsedJSON:                                                                                          │
│  │   ┌───────────┬────────────────────────────────────────────────────────────────────────────┐         │
│  │   │ amount    │ 199924263904                                                               │         │
│  │   ├───────────┼────────────────────────────────────────────────────────────────────────────┤         │
│  │   │ coin_type │ 0000000000000000000000000000000000000000000000000000000000000002::sui::SUI │         │
│  │   ├───────────┼────────────────────────────────────────────────────────────────────────────┤         │
│  │   │ receiver  │ 0x4955a3F38ff86ae92A914445099caa8eA2B9bA32                                 │         │
│  │   ├───────────┼────────────────────────────────────────────────────────────────────────────┤         │
│  │   │ sender    │ 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3         │         │
│  │   └───────────┴────────────────────────────────────────────────────────────────────────────┘         │
│  └──                                                                                                    │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Object Changes                                                                                                                                                   │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Mutated Objects:                                                                                                                                                 │
│  ┌──                                                                                                                                                             │
│  │ ObjectID: 0x4a22690b3ac719403359a5e6c13bcc5927bda226b2036b487b34661cc1cda80b                                                                                  │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                                                                    │
│  │ Owner: Object ID: ( 0x43a5ee1226cafb3aa5323af560b97a3271df7f4c31d417eb2303f06443f7d904 )                                                                      │
│  │ ObjectType: 0x2::dynamic_field::Field<0x1::ascii::String, 0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2::gateway::Vault<0x2::sui::SUI>>  │
│  │ Version: 9                                                                                                                                                    │
│  │ Digest: 28Yzjux1AHsAjrG43heJc5vAM6tYPEFcthXNXvSoeCoU                                                                                                          │
│  └──                                                                                                                                                             │
│  ┌──                                                                                                                                                             │
│  │ ObjectID: 0xa54df2bde3999c32bd1e5103aad296c9ee241d067cf0d6d4f53e53716368ae5e                                                                                  │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                                                                    │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )                                                                 │
│  │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI>                                                                                                                    │
│  │ Version: 9                                                                                                                                                    │
│  │ Digest: J32xpBu6S6gkoDNGqFEuAmwoLZ4o8WR2QKy836fXaZ7                                                                                                           │
│  └──                                                                                                                                                             │
│  ┌──                                                                                                                                                             │
│  │ ObjectID: 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7                                                                                  │
│  │ Sender: 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3                                                                                    │
│  │ Owner: Shared( 5 )                                                                                                                                            │
│  │ ObjectType: 0xa3ce10f68ed22d2cbbc31eaa709ee15e2e30348bfc6ff97b7d128d03b679c5c2::gateway::Gateway                                                              │
│  │ Version: 9                                                                                                                                                    │
│  │ Digest: BDTAFf8BqLrV1eqrw29qqUX3xV3epWpKHMN24dAWNzVC                                                                                                          │
│  └──                                                                                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Balance Changes                                                                                   │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3 )  │
│  │ CoinType: 0x2::sui::SUI                                                                        │
│  │ Amount: -199924347344                                                                          │
│  └──                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
~/github.com/lumtis/sui-zeta cast send 0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891 "approve(address,uint256)" 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 1000000000000000000000000 --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80


blockHash            0x722620999077d94707d695755d706f7f52e83767291499ca25f535ccaacb3f09
blockNumber          24
contractAddress      
cumulativeGasUsed    46279
effectiveGasPrice    9933963530
from                 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
gasUsed              46279
logs                 [{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x0000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707"],"data":"0x00000000000000000000000000000000000000000000d3c21bcecceda1000000","blockHash":"0x722620999077d94707d695755d706f7f52e83767291499ca25f535ccaacb3f09","blockNumber":"0x18","blockTimestamp":"0x67e2a362","transactionHash":"0x3942cdfedab6155bf0647d5451efa79ed512f23e9a1944c2b6984e72bd984645","transactionIndex":"0x0","logIndex":"0x0","removed":false}]
logsBloom            0x00000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000120000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000002000001000000000000000000010000000000000000000000000000000000000000000000000000000000000
root                 
status               1 (success)
transactionHash      0x3942cdfedab6155bf0647d5451efa79ed512f23e9a1944c2b6984e72bd984645
transactionIndex     0
type                 2
blobGasPrice         1
blobGasUsed          
authorizationList    
to                   0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891
~/github.com/lumtis/sui-zeta CONFIG=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "\($pkg)::cetusmock::GlobalConfig") | .objectId') && echo $CONFIG

0x5a6dac6e40be71e447ff55df41e8c7dfcefcd04bbcf1f065292898a68151f635
~/github.com/lumtis/sui-zeta CLOCK=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "\($pkg)::cetusmock::Clock") | .objectId') && echo $CLOCK

0x4d0167280213d11f480dd93585822416f361010dcbbd6a3bb5d64bfeeca05a23
~/github.com/lumtis/sui-zeta PARTNER=$(echo $PUBLISHED | jq -r --arg pkg "$PACKAGE" '.objectChanges[] | select(.type == "created" and .objectType == "\($pkg)::cetusmock::Partner") | .objectId') && echo $PARTNER

0xc4ac72261a45ddb58bbb5578e1f29c1e2707dd1aeffe637444f178f819d88c64
~/github.com/lumtis/sui-zeta MESSAGE=$RECIPIENT && echo $MESSAGE

0x6275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3
~/github.com/lumtis/sui-zeta TOKEN_TYPE=$(echo "$PACKAGE::token::TOKEN") && echo $TOKEN_TYPE

0xf3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af::token::TOKEN
~/github.com/lumtis/sui-zeta cd ../../zeta-chain/example-contracts/examples/call 
~/github.com/zeta-chain/example-contracts/examples/call PAYLOAD=$(npx ts-node sui/setup/encodeCallArgs.ts "$TOKEN_TYPE" "$CONFIG,$POOL,$PARTNER,$CLOCK" "$MESSAGE") && echo $PAYLOAD

0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000503078663335303062376539613366663337346163356631376332666635336534643339393830303461653535613731316337653339363630316539626538393661663a3a746f6b656e3a3a544f4b454e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045a6dac6e40be71e447ff55df41e8c7dfcefcd04bbcf1f065292898a68151f635db1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0c4ac72261a45ddb58bbb5578e1f29c1e2707dd1aeffe637444f178f819d88c644d0167280213d11f480dd93585822416f361010dcbbd6a3bb5d64bfeeca05a2300000000000000000000000000000000000000000000000000000000000000206275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3
~/github.com/zeta-chain/example-contracts/examples/call cast send 0x5FC8d32690cc91D4c39d9d3abcBD16989F875707 "withdrawAndCall(bytes,uint256,address,bytes,(uint256,bool),(address,bool,address,bytes,uint256))" \
  "$PACKAGE" \
  "1000000" \
  "0xd97B1de3619ed2c6BEb3860147E30cA8A7dC9891" \
  "$PAYLOAD" \
  "(10000,false)" \
  "(0xB0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48,true,0xC0b86991c6218b36c1d19D4a2e9Eb0cE3606eB49,0xdeadbeef,50000)" \
  --private-key ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

blockHash            0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3
blockNumber          25
contractAddress      
cumulativeGasUsed    105159
effectiveGasPrice    9924189558
from                 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
gasUsed              105159
logs                 [{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x000000000000000000000000735b14bb79463307aacbed86daf3322b1e6226ab"],"data":"0x0000000000000000000000000000000000000000000000000000000000002710","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x0","removed":false},{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x0000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707"],"data":"0x00000000000000000000000000000000000000000000d3c21bcecceda0ffd8f0","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x1","removed":false},{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x0000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707"],"data":"0x00000000000000000000000000000000000000000000000000000000000f4240","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x2","removed":false},{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x0000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707"],"data":"0x00000000000000000000000000000000000000000000d3c21bcecceda0f096b0","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x3","removed":false},{"address":"0xd97b1de3619ed2c6beb3860147e30ca8a7dc9891","topics":["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef","0x0000000000000000000000005fc8d32690cc91d4c39d9d3abcbd16989f875707","0x0000000000000000000000000000000000000000000000000000000000000000"],"data":"0x00000000000000000000000000000000000000000000000000000000000f4240","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x4","removed":false},{"address":"0x5fc8d32690cc91d4c39d9d3abcbd16989f875707","topics":["0xd90f94752d2b12f364f4a2237ebe1aff24ba6127585376bf4935f6a7be17dd2a","0x000000000000000000000000f39fd6e51aad88f6f4ce6ab8827279cfffb92266","0x0000000000000000000000000000000000000000000000000000000000000000"],"data":"0x0000000000000000000000000000000000000000000000000000000000000120000000000000000000000000d97b1de3619ed2c6beb3860147e30ca8a7dc989100000000000000000000000000000000000000000000000000000000000f42400000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000002710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003a00000000000000000000000000000000000000000000000000000000000000020f3500b7e9a3ff374ac5f17c2ff53e4d3998004ae55a711c7e396601e9be896af000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000503078663335303062376539613366663337346163356631376332666635336534643339393830303461653535613731316337653339363630316539626538393661663a3a746f6b656e3a3a544f4b454e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045a6dac6e40be71e447ff55df41e8c7dfcefcd04bbcf1f065292898a68151f635db1495eccace33d14228088b8c08e318e3f779c221b4d888a04d9e34d2e9dbf0c4ac72261a45ddb58bbb5578e1f29c1e2707dd1aeffe637444f178f819d88c644d0167280213d11f480dd93585822416f361010dcbbd6a3bb5d64bfeeca05a2300000000000000000000000000000000000000000000000000000000000000206275cce3c8480b15974d122d98e8f17b1cd5d591c07bc8ff1d7211bc1cfb4bd3000000000000000000000000b0b86991c6218b36c1d19d4a2e9eb0ce3606eb480000000000000000000000000000000000000000000000000000000000000001000000000000000000000000c0b86991c6218b36c1d19d4a2e9eb0ce3606eb4900000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000000000000000000000000000000000000000004deadbeef00000000000000000000000000000000000000000000000000000000","blockHash":"0xec92d8609c4645def3c0c0a3675ade1d5004e841f4ba78c21a6ac5159abb7fc3","blockNumber":"0x19","blockTimestamp":"0x67e2a381","transactionHash":"0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793","transactionIndex":"0x0","logIndex":"0x5","removed":false}]
logsBloom            0x000000000000000000000000080000000000000000000000000000000000000000000001000000000000000000000000c0000000000000000000000000600000000000000000000000000008000000000000000240000000000000000000000000000000020000000000000100800800000000000000000000000010000000000000800000000000000000000000000000000000000000000000400000000000120000000000000000000000000000000000000000000000000000000000000000000002000000200000000000000000000000002000001000000001000030000010000000000000000000000000000000000000000000000000000000000000
root                 
status               1 (success)
transactionHash      0x53bf6ce433457932e2ef70808cef860c6fb2e8a5db7e3896be7eea1648b91793
transactionIndex     0
type                 2
blobGasPrice         1
blobGasUsed          
authorizationList    
to                   0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
[ZetaChain]: Gateway: 'WithdrawnAndCalled' event emitted
[Sui]: Withdrawing 0.001 SUI tokens and calling contract from the Gateway to 0xe925d4059435083b70bc504ce912202214edd06f693bdc3f9573a996292780c7

@fadeev fadeev marked this pull request as ready for review April 9, 2025 13:17
@fadeev fadeev requested review from a team as code owners April 9, 2025 13:17
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 name withdrawAndCall intact.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7a0c695 and 7b4724f.

📒 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

@fadeev fadeev linked an issue Apr 9, 2025 that may be closed by this pull request
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (1)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (1)

161-169: 🛠️ Refactor suggestion

Sensitive 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 name withdrawAndCall().

🧰 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 call cast send 0x5FC8d32690cc9...

(PREPOSITION_VERB)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7b4724f and d3ddc71.

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ 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 call cast send 0x5FC8d32690cc9...

(PREPOSITION_VERB)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between d3ddc71 and 1d92d68.

📒 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)

@fadeev fadeev marked this pull request as ready for review April 9, 2025 13:58
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
src/pages/developers/tutorials/sui-withdraw-and-call.mdx (2)

194-198: ⚠️ Potential issue

Sensitive 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 issue

Sensitive 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

📥 Commits

Reviewing files that changed from the base of the PR and between 1d92d68 and 99928bf.

📒 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
Copy link
Contributor

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

Copy link
Member Author

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:
Copy link
Contributor

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
Copy link
Contributor

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.

@hernan-clich
Copy link
Member

I followed the tutorial step-by-step but keep encountering this error:

image

@@ -0,0 +1,220 @@
Interacting with ZetaChain universal apps from the Sui blockchain includes the
Copy link
Member

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

```
Copy link
Member

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)
Copy link
Member

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.

@fadeev
Copy link
Member Author

fadeev commented Apr 21, 2025

@hernan-clich can you please share the output of:

sui client publish --skip-dependency-verification --json

Feel free to use a gist.

@fadeev
Copy link
Member Author

fadeev commented Apr 21, 2025

The reason I'm asking is both treasury and pool addresses are empty.

@hernan-clich
Copy link
Member

hernan-clich commented Apr 21, 2025

sui client publish --skip-dependency-verification --json
Response
{
  "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"
}

@fadeev
Copy link
Member Author

fadeev commented Apr 21, 2025

@hernan-clich you're not using the Sui example from zeta-chain/example-contracts#254

My fault, this should have been merged already.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 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 issue

Fix 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

📥 Commits

Reviewing files that changed from the base of the PR and between 99928bf and 6c83224.

📒 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

@hernan-clich
Copy link
Member

Will come back to this one once zeta-chain/example-contracts#254 is merged.

@hernan-clich
Copy link
Member

hernan-clich commented Apr 24, 2025

@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 cast command.

image

But can't complete the final withdraw and call.

image

Here's the output of $PACKAGE and $PAYLOAD:

echo $PACKAGE
0xda01f0df9dcd81b09b1d9a64a9059f5f650c35655bf6e42a5946fd3b83b9efa4

echo $PAYLOAD
0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c00000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000503078646130316630646639646364383162303962316439613634613930353966356636353063333536353562663665343261353934366664336238336239656661343a3a746f6b656e3a3a544f4b454e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000042b8112c2098d0304ee5ca9543f7aa6dc3c2d7eb05c8f7a23c34e1a2c16e0d9b6f21b4df5af7e65d21149d437d222e7e26c002508249e97ed4e603140fde7b389bace482a5ca0fcaa2d3096ac16088a465351de383532a755d730676068abb8a95dd2f7ed5cb9f472aca7cd6bc18920e3dc50a9eebb7026ae5bf8d3abc87200d900000000000000000000000000000000000000000000000000000000000000207114e95a18a0ab5f4a5b0dcf6e6a6ed609d31eaef6850881c1b932216c8fb18d

@hernan-clich
Copy link
Member

@fadeev I tried again but keep facing the same issue, one thing I noticed is that running the tutorial makes the examples/call/sui/Move.lock file change.

image image

Copy link
Member

@hernan-clich hernan-clich left a comment

Choose a reason for hiding this comment

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

Tested ACK

@fadeev fadeev merged commit 059c9d0 into main May 9, 2025
7 checks passed
@fadeev fadeev deleted the sui-withdraw-and-call branch May 9, 2025 13:23
@coderabbitai coderabbitai bot mentioned this pull request Nov 21, 2025
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Sui examples

4 participants