Q: how to only run tests from a specific file
A: You can't filter tests by file directly, but you can filter by **module name** or **test name** using a string filter — since Move test names are fully qualified as `
::::
Q: wen object v2 will release on testnet and mainnet
A: Based on the knowledge sources, **Object Display V2** was introduced in **Sui v1.68**, which has already been released on **Mainnet** (v1.68.1 is confirmed as a Mainnet release at Protocol Version 118…
Q: Can you give me an example of how I can query balances with these new RPC?
USing https://suiscan.xyz/mainnet/tx/GxqDrsyQCoGEz8GAUURhdBw2xKg61fKhXmtAn73yGpHc as a reference
A: Here are practical examples for querying balances using the current RPC options:
## TypeScript SDK (gRPC Client)
```typescript
import { SuiGrpcClient } from '@mysten/sui/grpc';
const grpcClient = n…
Q: automated address management
A: ## Automated Address Management in Sui
Automated address management tracks your package's on-chain address (package ID) in the `Move.lock` file whenever you publish or upgrade a package — no manual r…
Q: 那是否可以通过`sui`命令行,下载这个object的内容,然后`sui move disassemble`来得到?如果可以,给我整个bash脚本.
A: 根据我所掌握的知识来源,`sui move disassemble` 确实是 Sui Move CLI 的一个子命令 [[Sui Move CLI](https://docs.sui.io/references/cli/move#commands)],但知识来源中**没有提供**关于如何:
1. 通过 `sui client object` 下载链上 package 的字节码内容
2. 将其转换…
Q: importExtension: "",
A: Câu hỏi của bạn chỉ chứa đoạn code `importExtension: "",` mà không có đủ ngữ cảnh để tôi hiểu bạn đang hỏi gì.
Bạn có thể cung cấp thêm thông tin không? Ví dụ:
- Đây là đoạn code từ file nào?
- Bạn đ…
Q: why to create balance manager
A: The `BalanceManager` is a core component of DeepBook V3. Here's why you need one:
- **Holds all your trading assets:** It's a shared object that holds all balances for different assets (base, quote, …
Q: Does Sui allow parallel execution of transactions that read from the same shared object with an immutable reference without going through consensus?
A:
Q: import httpx
import asyncio
from datetime import datetime
SUI_RPC = "https://fullnode.testnet.sui.io:443"
SUI_GRAPHQL = "https://graphql.testnet.sui.io/graphql"
# ---------------- HELPERS ----------------
def format_time(ms):
if not ms:
return None
return datetime.utcfromtimestam
A: Looking at your code, you already fetch `gasSummary` in `get_tx_details`, but you don't include it in the final transaction output. Here's the fully updated code with gas fee included for each transac…
Q: How does Sui handle randomness on chain and can smart contracts use VRF for lottery-style selection?
A:
Q: What liquid staking protocols and yield tokens exist on Sui and how do they work?
A:
Q: How does zkLogin work on Sui and what are its privacy and identity properties?
A:
Q: I had tokens I can't recover from sui
A: I'm sorry to hear about your situation. Here are some relevant points based on the available information:
## Common Reasons for Inaccessible Tokens on Sui
**1. Lost OAuth/zkLogin credentials**
If yo…
Q: i need numbers with sign, which type
A: Move on Sui **does not support signed integers**. All integer types in Move are **unsigned only**:
| Type | Value Range |
|------|-------------|
| `u8` | 0 to 2⁸ - 1 |
| `u16` | 0 to 2¹⁶ - 1 |
| `u32…
Q: How do I deploy to Sui?
A: Here's how to deploy (publish) a Move package to Sui:
## 1. Set Up the Sui CLI
If you haven't initialized the Sui CLI yet, run:
```bash
sui client
```
Follow the prompts to connect to a full node …
Q: What are object ownership types for Sui Move?
A: Sui Move supports the following object ownership types:
## 1. Address-Owned
An object owned by a specific 32-byte address (either an account address or an object ID). Only the owning address has excl…
Q: what's the equivalent of suix_getStakesByIds (from RPC), when using gRPC?
A: Based on the knowledge sources, `getStakesByIds` does **not** have a direct gRPC equivalent. It falls under the category of methods that require using **GraphQL** instead.
The recommended replacement…
Q: the sui stack
A: ## The Sui Stack
The Sui Stack is a fully integrated, modular technology stack designed for decentralized coordination, composable primitives, and high usability. Rather than requiring builders to st…
Q: ok i need to faucet for both for usdc and usdt for testnet
A: The knowledge sources I have access to only cover the **SUI token faucet** (for gas fees), not faucets specifically for USDC or USDT on Testnet.
## Getting Testnet SUI (for gas)
You can get Testnet …
Q: 那如果我自建一个fullnode。然后grpc连接这个fullnode然后simulate。也是在这个fullnode执行的么
A: 是的,如果你自建一个 Full Node 并通过 gRPC 连接它进行模拟,**模拟交易就在你自己的这个 Full Node 上本地执行**。
根据文档,要在自建 Full Node 上启用 gRPC 功能,需要在 `fullnode.yaml` 配置文件中开启 gRPC 索引:
```yaml
rpc:
enable-indexing: true
```
[[Full Node set…
Q: def _fetch_cids_from_sui(nft_ids: list[str], stdout):
"""Same as your original method (extracted)"""
try:
config = SuiConfig(rpc_url="https://fullnode.testnet.sui.io:443")
client = SyncClient(config)
object_ids = [ObjectID(nft_id) for nft_id in nft_ids]
resu
A: The knowledge sources provided do not contain information about the **pysui** Python SDK (`SuiConfig`, `SyncClient`, `GetMultipleObjects`, etc.), so I cannot provide specific guidance on fixing the py…
Q: How do I deploy to Sui?
A: Here's how to deploy (publish) a Move package to Sui:
## 1. Set Up the Sui CLI
If you haven't initialized the Sui CLI yet, run:
```bash
sui client
```
Follow the prompts to connect to a full node …
Q: what's the max object size
A: The maximum size of a Move object on Sui is **256 KB**. [[Object Size Limits](https://move-book.com/guides/building-against-limits/)]
This limit applies to the `contents` part of an object and is enf…
Q: so if I was storing a users hidden assets in a DB, would it be fine to just store the objectId or would i store it per network
A: Based on the previous answer, you should **store the object ID together with the network identifier** — not the object ID alone.
As established, the same object ID can exist on multiple Sui networks …
Q: Next.js app router dApp Kit QueryClientProvider WalletProvider QueryClient set no query client set legacy @mysten/dapp-kit-react
A:
Q: @mysten/dapp-kit QueryClientProvider No QueryClient set use QueryClientProvider provider order React Query WalletProvider
A:
Q: how can I measure parallelism in transaction execution?
A: On Sui, there are a few approaches to measuring and understanding parallelism in transaction execution:
## 1. Commands Per Second (CPS) vs TPS
Rather than relying solely on TPS, **CPS (Commands Per …
Q: hi
A: Hi there! How can I help you with Sui today? Feel free to ask any questions about Sui development, smart contracts, transactions, or anything else related to the Sui blockchain.
Q: addressBalance 是啥 和之前有什么不一样
A: ## Address Balance 是什么?
`addressBalance` 是 Sui 新引入的**地址级余额系统**(Address Balances),基于 [SIP-58](https://github.com/sui-foundation/sips/blob/main/sips/sip-58.md) 规范实现。
### 和之前的区别
**之前(旧模型):**
- Sui 的余额…
Q: Can SUI holders and stakers vote on revenue parameter changes?
A: Yes, SUI holders and stakers can participate in governance, though the mechanism differs depending on the context:
## Sui Network-Level Governance
SUI tokens play an important role in governance by …
Q: could you give me the flow when I build the front-end and contract in testnet of Sui environment. How I sync my wallet into the frontend, and do I need zkLogin for this step
A: ## Building a Sui Frontend + Contract on Testnet
Here's the general flow for connecting a frontend to a Move package on Sui Testnet:
---
### 1. Deploy Your Move Package
Before building the fronten…
Q: ZKLogin what is it ?
A: ## What is zkLogin?
zkLogin is a **Sui-native primitive** that enables you to send transactions from a Sui address using an OAuth credential (like Google or Facebook) **without publicly linking the t…
Q: is there something like coin::mint_for_testing for balance?
A: Yes! The equivalent for `Balance` is `balance::create_for_testing(value)`. Here's an example:
```move
use sui::balance;
use sui::sui::SUI;
#[test]
fun test_balance() {
// Create a balance dir…
Q: Cannot find name 's'. [2304]
2. Cannot find name 's'. [2304]
3. Unreachable code detected. [7027]
4. Unreachable code detected. [7027
A: 根據你上一則程式碼,這些錯誤來自這行:
```typescript
const dWalletCapId = /* 從 result.objectChanges 裡解析 */ '0x...';
```
這行裡的註解 `/* 從 result.objectChanges 裡解析 */` 是**佔位符**,你還沒有實際實作解析邏輯,TypeScript 可能因此產生語法或型別錯誤。
---
#…
Q: how staking logic works.
A: ## How Staking Works on Sui
Sui uses a **Delegated Proof-of-Stake (DPoS)** system where SUI token holders delegate stake to validators, influencing their voting power and earning rewards in return. […
Q: What are programmable transaction blocks (PTBs)?
A: ## Programmable Transaction Blocks (PTBs)
Programmable Transaction Blocks (PTBs) are the standard way all user transactions are executed on Sui. They are groups of commands that execute on inputs to …
Q: In the case of a closed-loop token: Who obtains the coin when converting from_coin, and where does the coin come from when calling to_coin? Does the type T of Token correspond to the coin type?
A: Great follow-up questions. Here's what the knowledge sources tell us:
## `from_coin`: Converting a Coin into a Token
When you call `token::from_coin`, you pass in an open `Coin`. The function:
1.…
Q: the limitation of borrow reads in option.move?
A: In Move's `std::option` module, the borrow-based read functions have a key limitation related to **abilities**:
### `borrow` and `borrow_mut`
```move
public fun borrow(t: &Option):…
Q: getDynamicField的作用?
A: 您的问题与上一条相同,以下是对 `getDynamicField` 的总结:
`getDynamicField` 用于**根据字段名称获取对象上的某个特定动态字段**。动态字段是可以在对象构建后动态添加或移除的字段,字段名可以是任意具有 `copy`、`drop`、`store` 能力的值。[[Dynamic Fields](https://docs.sui.io/guides/develope…
Q: what is pool ?
A: In the context of Sui staking, a **staking pool** is a core component of the DPoS system. Here's what it is:
## Staking Pool
A staking pool is embedded in each validator struct in the system state o…
Q: OKLink是不是只有前端可使用?
A: 根據知識來源,OKLink 的描述是:
> "Provide fundamental explorer and data APIs on Sui."
[[OKLink](https://www.oklink.com/sui)]
從描述來看,OKLink **有提供 API**(不只是前端瀏覽器),所以理論上可以透過後端調用。不過,知識來源中**沒有進一步說明** OKLink API 的具體…
Q: could you give me the flow of system when student pay fee for that teacher what front end ,backend , sui do?
A: Here's the end-to-end flow when a student pays a fee to a teacher on your platform, based on what the Sui Payment Kit and Sui transaction lifecycle support:
---
## Payment Flow: Student → Teacher Fe…
Q: could you give me API key for using your SUI MCP server
A: I'm sorry, but I'm not able to provide API keys — I'm an AI assistant designed to answer questions about Sui, and I don't have access to any API key management systems or the ability to generate crede…
Q: what is difference between split coin in TX1 and transfer it in TX2?
// apporach 1
const tx = new Transaction();
const [coin] = tx.splitCoins(tx.gas, [
tx.pure.u64(values.amount),
]);
tx.transferObjects([coin], tx.p
A: ## Key Difference: Same Transaction vs. Cross-Transaction Results
**Approach 1** is correct and will work. **Approach 2 is broken** and will fail.
### Why Approach 2 Fails
In Approach 2, `tx.splitC…
Q: So how back-end side, can store the user's wallet address to execute the contract. Do we need any security field when executing the contracts
A: Great question! Based on the knowledge sources available, there's a relevant pattern for how a backend can handle user wallet addresses and execute contracts securely — using **Enoki**, Mysten Labs' p…
Q: how do I get usd amounts of transactions
A: The knowledge sources do not contain enough information to answer a query about getting **USD amounts** of transactions on Sui. The available documentation covers:
- **Balance changes in native coin …
Q: You are using JSON-RPC in above case. how do we do it using GRPC?
A: You're right — the previous example used the legacy `quorum_driver_api()` which is JSON-RPC based. For gRPC in Rust, you would use the `transactionExecutionService` from the `SuiGrpcClient`. Based on …
Q: I have event_type and start_time and end_time and I want all the events for that event_type between that time using grpc. How can I do that?
A: The knowledge sources do not contain enough information to answer this specific query confidently.
The provided knowledge sources cover:
- Getting events for a **specific transaction digest** via gRP…
Q: 默认的 order 是不是descending?
A: 知识源中没有明确说明 `queryEvents` 的默认排序方向是 `ascending` 还是 `descending`。
我无法从现有知识源中确认这一点,建议你参考 [Sui TypeScript SDK 官方文档](https://sdk.mystenlabs.com/typedoc/modules/_mysten_sui.client.html) 或直接测试验证。
不过,从实践角度来看…
Q: get struct by id for test purpose
A: Based on the conversation history, you're asking how to retrieve a struct (object) by its ID in a test context in Sui Move.
## Getting a Struct by ID in Tests
In Sui Move tests, you use `test_scenar…
Q: Okay i am using json true but can i not be even more specific than that
A: Yes! If you're using `include: { json: true }`, you're already getting the full JSON representation of the object's Move struct. But if you want to be more specific about **which fields** are returned…
Q: How to define error codes so that they are more meaningful beyond just a number
A: In Move on Sui, there are two main approaches to make error codes more meaningful than plain numbers:
## 1. Named Error Constants (Classic Approach)
Define `const` values prefixed with `E` and a cam…
Q: what is the address of coin metadata object id of Sui coin in testnet
A: The knowledge sources do not explicitly provide the specific object ID of the `CoinMetadata` object for the native SUI coin on **testnet**.
What the knowledge sources do tell us is:
- The **`CoinReg…
Q: where is stated that nonce is againts replay attacks
A: Several places in the knowledge sources mention that nonces serve as protection against replay attacks in the context of Sui:
1. **Object versioning on Sui**: The object model documentation states th…
Q: is there anywhere in the doc the definition of ehpmeral key
A: Yes, the Sui documentation defines the **ephemeral key** in the zkLogin terminology section. Here is the definition:
> `(eph_sk, eph_pk)`: The private and public key pair used to produce ephemeral si…
Q: can you destroy the struct on limit == some(0)? public(package) fun set_limit_destroy_on_zero
(
claim_share_coins_cap: &mut ClaimShareCoinsCap,
limit: Option,
) {
if (limit == some(0))
claim_share_coins_cap.limit
A: Looking at your code, you want to destroy `ClaimShareCoinsCap` when `limit == some(0)`. However, your current function takes `claim_share_coins_cap` **by mutable reference** (`&mut`), which means you …
Q: Packages with old-style Move.toml files cannot depend on new-style packages. See https://docs.sui.io/references/package-managers/package-manager-migration for instructions.
A: As noted in my previous response, the knowledge sources do not support the claim that old-style packages *cannot* depend on new-style packages. The official migration guide explicitly states:
> "Alth…
Q: how can I create ascii string in sui move?
A: You can create an `std::ascii::String` in Sui Move in two ways:
### 1. `ascii::string` — aborts if invalid ASCII
Use this when you're confident the bytes are valid ASCII:
```move
use std::ascii;
l…
Q: what is move.lock?
A: `Move.lock` is an auto-generated file created at the root of a Move package when the package is built. Here's what you need to know about it:
## What it does
- **Pins dependencies**: It records the …
Q: move.lock
A: ## Move.lock in Sui
The `Move.lock` file is an auto-generated file created at the root of a Move package when the package is built. Here's what you need to know about it:
### What it does
- It **pi…
Q: hihi
A: Hi there! I'm here to help answer questions about Sui, the Layer 1 blockchain. Feel free to ask me anything about Sui — whether it's about development, tools, concepts, or getting started!
Q: sui-groups PermissionedGroup Move contract membership permissions actor pattern MystenLabs
A:
Q: Move.lock file should be committed to git and automated address management in Sui packages
A:
Q: Seal allowlist Move contract reference implementation seal_approve with shared object members
A:
Q: Sui Move error code naming conventions and object capability pattern
A:
Q: Move module conventions and best practices for Sui smart contracts
A:
Q: Seal SDK smart contract access policy pattern for encryption on Sui
A:
Q: it didnt work either. here is the nft in my wallet that formally listed with the personalkioskid, this is how suivision displayed it. "
objectId: "0xdb32e67974af86a75d454055ba368ce1444d5fdb6880a721a830ec380c4b29ee"
version: "838954782"
digest: "FNFZtgEnT8nKxCMHJfPfPvsU88Goh8e8rXpKyC5nNNDD"
type: "0
A: Looking at the SuiVision data, the key information is:
```
owner: {
ObjectOwner: "0x631b3c839cabe1e9fee4fa8b6dbcb445540553e951d3be5f83e392ecee17ee60"
}
```
That `ObjectOwner` value (`0x631b3c...`)…
Q: Maybe we are not on the same page:
For example:
Resolving type 0xAAA::module::MyStruct
→ fetch package at 0xAAA (or relocated storage_id)
→ MyStruct has a field of type 0xDEP::other::OtherType
--
In my case, is 0xDEP the original ID of the package?
A: Great clarification. You're asking about a different scenario: when you **inspect the type descriptor of a struct's field** (e.g., via the gRPC/GraphQL API or on-chain type reflection), what package I…
Q: fullnode url?
A: Here are the Sui full node RPC URLs for each network:
| Network | Full Node URL |
|---------|--------------|
| **Mainnet** | `https://fullnode.mainnet.sui.io:443` |
| **Testnet** | `https://fullnode.…
Q: For reference: coinsFieldMask = &fieldmaskpb.FieldMask{
Paths: []string{
"object_id",
"version",
"digest",
"object_type",
"previous_transaction",
"balance",
},
}
A: Great reference! That confirms the valid `read_mask` paths for coin objects. Here's the updated `grpcurl` command using those exact field paths:
```shell
grpcurl -d '{
"owner": "0xb40fa5e391458996a…
Q: why not use 100.do!?
A: Great point! You *can* use `100u8.do!` (or any uint's `.do!` macro) for a cleaner, more readable loop. However, there's a key limitation here: the `.do!` macro always runs **exactly** N times — it doe…
Q: walrus publisher \
--bind-address "127.0.0.1:31415" \
--sub-wallets-dir ~/.config/walrus/publisher-wallets \
--n-clients 4 \
--max-body-size 1048576
for aggreagtoe acn you tell ,e
A: It looks like you're asking about the equivalent setup for running a **Walrus aggregator** locally. Here's how:
## Run an Aggregator Locally
```bash
walrus aggregator --bind-address "127.0.0.1:31415…
Q: Που έχει πληροφορίες για το athens hub
A: Μπορείτε να βρείτε πληροφορίες για το **SuiHub Athens** στο επίσημο blog του Sui. [[SuiHub Athens](https://blog.sui.io/suihub-athens-opens/)]
Συγκεκριμένα, το άρθρο καλύπτει:
- **Τοποθεσία**: Στεγάζ…
Q: how to write sui move project
A: Here's how to create and write a Sui Move project:
## 1. Prerequisites
- Install the Sui CLI ([installation guide](https://docs.sui.io/guides/developer/getting-started/sui-install))
- Verify install…
Q: Πώς μπορώ να επικοινωνήσω
A: Με βάση τις διαθέσιμες πηγές, μπορείτε να επικοινωνήσετε με τον Kostas Chalkias μέσω του λογαριασμού του στο X (Twitter): **[@kostascrypto](https://x.com/kostascrypto)**. [[Builder FAQ](https://www.su…
Q: Θέλω να πάω στο hub στην Αθήνα
A: Μπορείς να παρακολουθείς τα νέα και τα events του **SuiHub Athens** και να βρεις ευκαιρίες να πας από τα επίσημα κανάλια του Sui:
- Το SuiHub Athens είναι φυσικός χώρος στην Αθήνα που φιλοξενεί works…
Q: is Address Balances fully supported on mainnet?
A: The knowledge sources do not explicitly state that **all** Address Balances features are fully supported on Mainnet.
What we can see:
- Address Balances are integrated into the standard balance APIs…
Q: Φτιάξε μου πάλι το μνμ για το πρότζεκτ για συνάντηση στο χαμπ
A: Δεν υπάρχει κάτι στα knowledge sources για συγκεκριμένο “χαμπ” ή το πρότζεκτ σου, οπότε δεν μπορώ να βασιστώ σε επίσημες λεπτομέρειες. Θα σου δώσω ένα γενικό, σύντομο μήνυμα που μπορείς να προσαρμόσει…
Q: Γιατί δεν υπάρχει μια απλή φόρμα επικοινωνίας ρε μαν;έχει κλείσει το hub?
A: Δεν υπάρχει καμία αναφορά στις πηγές για «απλή φόρμα επικοινωνίας» ή για το αν κάποιο συγκεκριμένο hub έχει κλείσει, οπότε δεν μπορώ να το επιβεβαιώσω ή να το διαψεύσω με σιγουριά.
Αυτό που προκύπτει…
Q: Μνμ για ντισκορντ
A: Σου γράφω ένα έτοιμο μήνυμα για να το στείλεις στο Discord, π.χ. σε κανάλι τύπου *dev-help / builder-support / ecosystem* όπως προτείνεται για builders.[[Builder support](https://www.sui.io/builder-su…
Q: How does the Kiosk system prevent a delist transaction from invalidating a PurchaseCap that was created in a concurrent purchase transaction? Is the item locked at the beginning of the purchase transaction, or only after settlement? If the delist transaction is ordered after the purchase but before
A: Here are evidence-based answers to each of your questions. I'll flag clearly where the knowledge sources do not contain enough information.
---
## 1. Kiosk: PurchaseCap vs. Delist Concurrency
The K…
Q: 目前有啥游戏
A: 根据现有知识来源,目前已上线或即将登陆 Sui 的游戏包括:
## 已上线游戏
- **XOCIETY** — POP 射击游戏,已在 Epic Games Store 上线 Early Access,支持 PC 和 SuiPlay0X1,集成 Walrus、zkLogin、动态 NFT 和闭环代币。[[XOCIETY Launch](https://blog.sui.io/xociety-e…
Q: how to generate sdk from contracts and where it should be placed? frontend or api or else?
A: You can generate a TypeScript SDK from your Move contracts using the `@mysten/codegen` tool, and then import that generated code wherever you build transactions (frontend, backend API, or a shared pac…
Q: Should the seal_config.yaml contain anything specific beyond the port?
A: The knowledge sources mention that the admin “specifies the `seal_config.yaml` with the published Seal policy package ID and Seal configurations,” but they do **not** show the actual contents or schem…
Q: PTB input object limit
A: The knowledge sources state that Sui enforces a **maximum number of input objects per transaction**, configured via the `ProtocolConfig` field:
- `max_input_objects`: “Maximum number of input objects…
Q: ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data │
├─────────────────────────────────────────────────────────────────────────
A: From the transaction output you posted:
- **PackageID** (from `Published Objects`):
`0x1e5aa02fef7a88717fff4f280e90ec056a6b51becb3f81f8fafff6d238eecf09`
- **REGISTRY_ID** (the shared `AgentRegist…
Q: how validator works at core level.
A: ## Validator Core Mechanics on Sui
### 1. Staking & Voting Power
Each validator maintains a **staking pool** that tracks delegated SUI and compounds rewards. Voting power is proportional to stake, b…
Q: where it does talk about validators
A: Here are the key places where Sui's documentation covers validators:
## Validator Guides & Operations
- **Becoming a validator**: How to set up, configure, and manage a Sui validator node, including…
Q: What is Mysticeti?
A: Mysticeti is the consensus protocol that powers the Sui blockchain. It is a high-throughput, Byzantine Fault Tolerant (BFT) protocol built on a **Directed Acyclic Graph (DAG)** structure. [[Sui Glossa…
Q: make me pls
A: Based on our conversation, it seems you want to publish your Move package to get a Package ID. Here are the exact commands to run, step by step:
### Step 1: Build
```bash
sui move build
```
### Step…
Q: if a package p1 has a buggy function and it was upgraded to p2 with correct fix. how can i disable the buggy function in p1?
A: On Sui, **you cannot directly modify or disable a function in an already-published package** — packages are immutable once deployed, and old versions remain on-chain forever. [[package overview](https…
Q: 啊 如果我沒有treasury cap 怎麼辦
A: 根據你的情境,如果你沒有 `TreasuryCap`,有以下幾種情況需要區分:
## 情況一:你的 SUIX 代幣是用 `coin::create_currency` 建立的
`TreasuryCap` 是在呼叫 `coin::create_currency` 時由合約發布者收到的。[[Coin Standard](https://github.com/MystenLabs/sui/blob/…
Q: where's an example of using nautilus with seal
A: The official example of using Nautilus with Seal is the **Seal-Nautilus pattern** for secure secret management in enclave applications. Here's a summary of where to find it and how it works:
## Sourc…
Q: Αρα αν έχεις latest SDK + coinWithBalance transfers + do not select coins manually no changes needed
A: Ναι, αυτό είναι σωστό. Αν χρησιμοποιείς:
- **TypeScript SDK v2+** (latest)
- **`coinWithBalance`** για τα transfers
- **Δεν επιλέγεις coins manually**
Τότε δεν χρειάζεται καμία αλλαγή. Το SDK αυτόμα…
Q: give me 1sui
A: I'm not able to send you SUI tokens directly, as I'm an AI assistant. However, here's how you can get free SUI tokens for development purposes:
## Getting Free SUI Tokens (Testnet/Devnet)
> **Note:*…
Q: 所谓的Coin可以“集成到应用中”,是什么意思?
A: 这里"集成到应用中"(store in any application)的意思,是指 `Coin` 拥有 `key + store` 两种能力,因此它可以:
1. **被包装(Wrapped)进其他对象**:即作为另一个 Move 对象的字段存储,例如放入一个共享的托管合约或流动性池对象中。
2. **作为动态字段(Dynamic Field)存储**:可以将 `Coin` 附加到…
Q: One more thing, the python script fetches data and a node sidecar uses suisql to write the data to walrus.
A: Thanks for the additional detail. I'll note this in the context of your plan, but I need to be transparent about what the knowledge sources actually cover.
The knowledge sources **do not mention SuiS…
Q: không có checksEnabled trong simulateTransaction
A: Vấn đề là bạn đang gọi `this.suiGrpcClient.simulateTransaction(...)` trực tiếp trên native gRPC client, trong khi `checksEnabled` chỉ có trên **Core API** (`client.core.simulateTransaction`). [[transa…
Q: how can I update a existing env's rpc-url using sui cli?
A: The knowledge sources do not explicitly mention a direct command to **update** an existing environment's RPC URL in place. However, based on the available documentation, the standard approach is to **…
Q: 一个对象必须先接收另一个对象,才能使用它。
先接收另外一个对象,怎么接收?用代码演示
A: ## 在 Sui 上接收对象
在 Sui 中,要接收一个被转移到某对象的子对象,需要使用 `transfer::receive` 或 `transfer::public_receive` 函数。[[Transfer to Object](https://docs.sui.io/guides/developer/objects/transfers/transfer-to-object#receiv…
Q: 并不是落后checkpoint,而是同步后和链上状态不一致,那么我觉得应该是某个接受的checkpoint数据有问题,那么怎么快速恢复呢
A: 你的判断很有道理——如果节点已经同步到最新 checkpoint,但本地状态与链上不一致,很可能是某个 checkpoint 数据在接收或执行时出现了问题,导致本地数据库处于不一致状态。
根据知识库中的信息,**最快的恢复方式仍然是从快照重建**,因为这可以绕过有问题的本地数据库状态,直接恢复到一个经过协议验证的干净状态。
## 推荐:使用 Formal Snapshot 恢复
Formal…
Q: TTO 支持以下类型的父对象有上面说的4种,那不支持的类型有哪些?
A: 根据知识来源,TTO 机制对父对象的限制如下:
**不支持作为父对象的类型:**
- **Immutable(不可变对象)**:不可变对象无法作为父对象接收子对象。即使你将一个对象转移给不可变对象的 ID,也**无法访问**该子对象。 [[Owner enum](https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/o…
Q: provide me the code snippet that declares an enum with some data inside an arm
A: Here's a code snippet declaring an enum with data inside its variants in Move on Sui:
```move
module a::m;
public enum Action has drop {
Stop,
Pause { duration: u32 },
MoveTo { x: u64, y…
Q: What is the exact request format for https://api-sui.cetus.zone/router/build_tx? Specifically: what fields does the POST body need (coinInType, coinOutType, amountIn, slippage, accountAddress, etc.), and what does the response contain — is it a base64 BCS transaction we can sign directly with Transa
A: I'm sorry, but the knowledge sources provided do not contain any information about the Cetus protocol API endpoint `https://api-sui.cetus.zone/router/build_tx`. This is a third-party service (Cetus is…
Q: refine this too "
const registerWithSuper = async (params: {
nftId: string;
superNodeId: string;
onStatus: (status: string) => void;
}) => {
const { nftId, superNodeId, onStatus } = params;
if (!account) {
onStatus('Please connect your wallet first');
return;
}
if (!userObjec
A: Here is the refined `registerWithSuper` function, applying the same dynamic field fix for `shard_participant_counts` as in the `register` function:
```ts
import { bcs } from "@mysten/sui/bcs";
import…
Q: How does the compiler works
A: ## How the Move Compiler Works on Sui
The Move compiler translates human-readable `.move` source files into bytecode that the Sui network can execute. Here's how the process works:
### Three-Layer A…
Q: What's SUI meaning
A: **SUI** has a few related meanings within the Sui ecosystem:
1. **The Native Token**: SUI is the native token of the Sui network. It serves four key purposes: [[Tokenomics Overview](https://docs.sui.…
Q: Walrus subsidies contract how to use
A:
Q: Walrus upload relay costs subsidies
A:
Q: Walrus publisher endpoints mainnet
A:
Q: Walrus SDK WASM dependencies Cloudflare Workers
A:
Q: Walrus publisher alternatives to nami.cloud
A:
Q: Yes. Here are the exact questions to ask:
---
**Question 1 — Honeypot detection (most important)**
> On Sui, is there a reliable way to simulate a token sell transaction without actually executing it, to detect if a token is a honeypot? Specifically: does the Sui RPC have a `dryRunTransactionBloc
A: I'll answer each question based on what the knowledge sources directly support, and clearly flag where the sources don't provide enough information.
---
## Question 1 — Honeypot Detection via Transa…
Q: hướng dẫn cách tích hợp và kết nối ví sui vào web của tôi
A: # Hướng dẫn tích hợp ví Sui vào ứng dụng web
## 1. Cài đặt
**Cho ứng dụng React:**
```bash
npm i @mysten/dapp-kit-react @mysten/sui
```
**Cho Vue hoặc các framework khác:**
```bash
npm i @mysten/da…
Q: the joined nft id in the userObect interface is for superNode users only. note the capy_type is the gate keepers of this game. I want to handle the capy-type separately. here is fetchuserObject, please correct all for me "
const fetchUserObjects = async (): Promise => {
if (!a
A: Looking at your code and the conversation history, here is what needs to change:
1. **Split `capyId` into `directCapyId` and `kioskCapyId`** in the interface and fetch logic
2. **Use `joinedNftId` (a…
Q: Walrus subsidies contract mainnet WAL token free storage how to use programmatically
A:
Q: Cloudflare Workers WASM WebAssembly support bundling esbuild
A:
Q: Do you know any sui node providers
A: Yes! Here are some Sui node/RPC providers you can use:
### Third-Party RPC Providers
- **Quicknode** – [quicknode.com](https://www.quicknode.com/)
- **Ankr** – Available for Sui infrastructure
- **Bl…
Q: How do I deploy to Sui?
A: Here's how to deploy (publish) a Move package to Sui:
## 1. Set Up the Sui CLI
If you haven't initialized the Sui CLI yet, run:
```bash
sui client
```
Follow the prompts to connect to a full node …
Q: sui_getTransactionBlock
A: The `sui_getTransactionBlock` is a JSON-RPC method used to fetch a transaction by its digest from a Sui full node.
## Usage
It is a **direct lookup** RPC call that doesn't depend on additional index…
Q: let user_接著寫下去,不要寫重複的東西
A: 以下是從斷點處接續的完整程式碼:
```move
let user_tokens: u64;
if (table::contains(&pad.priority_allocations, sender)) {
user_tokens = *table::borrow(&pad.priority_allocations, sender);
asse…
Q: brand kit
A: The Sui Brand Kit is available at **[https://live.standards.site/sui-media-kit](https://live.standards.site/sui-media-kit)**. [[Brand Kit](https://www.sui.io/launch-on-sui)]
It includes:
- **Officia…
Q: can an nft be object owned ?
A: Yes, an NFT (or any object with the `key` ability) can be object-owned on Sui. This is a supported ownership model where one object is transferred to another object's ID.
## How it works
You use the…
Q: can you explain the two different types of values in transactions? One in object changes and one in transferred
A: ## Two Types of Values in Sui Transactions
### 1. Inputs (Objects & Pure Values)
Transaction inputs are the values **provided to** a PTB. They come in two forms:
- **Pure arguments**: Simple scalar…
Q: khi kết nối có gọi api gì không
A: Khi người dùng nhấn kết nối ví, dApp Kit sẽ gọi các API/feature sau theo thứ tự:
## 1. Lấy danh sách ví đã cài
```js
import { getWallets } from '@mysten/wallet-standard';
const availableWallets = g…
Q: còn tôi muốn trên suiscan có được không
A: Rất tiếc, các tài liệu trong knowledge sources không đề cập đến việc tạo Balance Manager thông qua giao diện **Suiscan**. Các nguồn tài liệu hiện tại chỉ hướng dẫn cách tạo Balance Manager thông qua *…
Q: What is a skip list in move in sui?
A: Based on the knowledge sources, a **SkipList** in Move on Sui is a community-contributed data structure implementation — specifically, a skip linked list implemented in the Move language for Sui. It i…
Q: also the REGISTRY_OBJECT_ID
A: From the transaction output you shared, the **Registry Object ID** is found in the **Created Objects** section:
```
REGISTRY_ID=0x34231405ff87b7b25e9919bebf072e7aa0d61db8d89f20e5670e42faf09d53ef
```
…
Q: root@vmi3147298:~/node# ./sui-tool download-formal-snapshot --genesis genesis.blob --path db_new --no-sign-request --epoch 1085
Beginning formal snapshot restore to end of epoch 1085, network: Mainnet, verification mode: Normal
Beginning transaction digest backfill for epoch: 1085, backfilling from:
A: Le problème que tu rencontres est un **timeout réseau** lors du téléchargement de certains checkpoints depuis `https://checkpoints.mainnet.sui.io`. L'erreur est claire :
```
Failed to fetch checkpoin…
Q: index-DV7Wqba6.js:818 Skipping wallet initializer: "Error: Registration un-successful.".
s5 @ index-DV7Wqba6.js:818
await in s5
a5 @ index-DV7Wqba6.js:818
(anonymous) @ index-DV7Wqba6.js:1703
A: The knowledge sources do not contain enough information to answer this specific question about the `"Registration un-successful"` wallet initializer error you're seeing in your browser console.
This …
Q: for example, we have logic that limit the total items per address. One shared object to hold and monitor the items is need
A: Yes, this is a classic use case where a shared object is genuinely necessary — and it's also exactly where contention becomes a real concern.
## The Trade-off: Correctness vs. Throughput
Your requir…
Q: How do I deploy to Sui?
A: Here's how to deploy (publish) a Move package to Sui:
## 1. Set Up the Sui CLI
If you haven't initialized the Sui CLI yet, run:
```bash
sui client
```
Follow the prompts to connect to a full node …
Q: How to query events from a Sui smart contract using queryEvents with cursor-based pagination and event type filtering?
A:
Q: est-ce qu'on peut récupérer un epoch ?
A: Oui, il est tout à fait possible de récupérer des informations sur une epoch sur Sui via GraphQL.
## Récupérer la dernière epoch
```graphql
query {
epoch {
referenceGasPrice
}
}
```
[[lates…
Q: What fields are available on Sui GraphQL TransactionEffects, especially events, for reconstructing stream-like executed transactions at a checkpoint? Provide exact field names and nesting under checkpoint.transactions.
A:
Q: I mean my shared object is mutable can edit data inside if I shared in first command PTB can I call it in second command? or I need to execute new tx?
A: Based on the knowledge sources, here's the precise answer:
**You cannot use a shared object by value after calling `share_object` in the same PTB.** However, the question depends on *how* you're acce…
Q: what file should i change for editing the UI for my nft lauchpad
A: Based on the scaffolded project structure from `@mysten/create-dapp`, here are the key files you should edit for your NFT launchpad UI:
## Core Files to Edit
### `src/App.tsx`
The main layout file —…
Q: How does Object versions works? Can Objects can change between load time and execution time
A: ## How Object Versioning Works on Sui
### Core Versioning Mechanism
Every object on Sui is identified by a unique **(ID, version)** pair. When a transaction modifies an object, it writes the new con…
Q: How does Object versions works? Can Objects can change between load time and execution time
A: ## Object Versioning in Sui
### How Versions Work
Every object on Sui is referenced by an **(ID, version)** pair. Key properties:
- Each object has an **8-byte unsigned integer version** that monot…
Q: how do i read out the value and strategies of a wallet
A: ## Reading Wallet Balances and Strategies on Sui
### Reading Wallet Balances
You can query wallet balances using the Sui TypeScript SDK's core client methods:
**Get balance for a specific coin type…
Q: give me the typescript sdk for graphql
A: Here's how to use the Sui TypeScript SDK with GraphQL:
## Installation
```bash
npm install @mysten/sui
```
## Setting Up a GraphQL Client
```ts
import { SuiGraphQLClient } from '@mysten/sui/graphq…
Q: maximelavail@Maximes-MacBook-Pro ~ % grpcurl fullnode.mainnet.sui.io:443 sui.rpc.v2.LedgerService/GetServiceInfo
{
"chainId": "4btiuiMPvEENsttpZC7CZ53DruC3MAgfznDbASZ7DR6S",
"chain": "mainnet",
"epoch": "1086",
"checkpointHeight": "261102664",
"timestamp": "2026-04-03T14:55:32.074Z",
"lo
A: Oui, exactement ! En comparant les deux réponses, votre nœud n'est pas encore synchronisé :
| | Nœud public (mainnet) | Votre nœud |
|---|---|---|
| **Epoch** | 1086 | 1079 |
| **Checkpoint height** …
Q: Give me a prompt for using graphQL, installation, usage
A: Here's a complete guide to using the Sui GraphQL API.
## Installation
The GraphQL client is included in the `@mysten/sui` package. Install it with:
```bash
npm install @mysten/sui
```
## Setting U…
Q: Sorry, I mean maximum number of transactions can exist in a single checkpoit?
A: Based on the knowledge sources, the `ProtocolConfig` struct includes a `max_transactions_per_checkpoint` field, described as:
> "Max number of transactions per checkpoint. Note that this is a protoco…
Q: How can I modify the css style of React components ConnectButton and ConnectModal and also select the wallets to be listed on ConnectModel?
A: ## Styling and Configuring `ConnectButton` & `ConnectModal` in React
### CSS Styling
dApp Kit uses a theming system compatible with [shadcn/ui](https://ui.shadcn.com/docs/theming), based on CSS cust…
Q: Is localnet count as a node when running?
A: When you run a **Localnet**, it is indeed running an instance of the Sui network on your local computer — which includes nodes. Specifically, Localnet runs local validator and/or full nodes as part of…
Q: sui design risks for digital assets.
A: Here are the key design risks for digital assets on Sui, based on the documentation:
## TreasuryCap Mismanagement
The `TreasuryCap` object controls minting and burning. Critical risks include:
- **N…
Q: 如果 testnet grpc 掛了,我有什麼方法做處理,其他節點 grpc 有,但會有 壓縮問題 — accept_compressed(Zstd)
A: 根據知識來源,針對 testnet gRPC 掛掉的情況,有以下幾種處理方式:
## 官方建議的 Fallback 策略
### 1. 切換到 Archival Service
當 full node 無法回應時,可以改用 Archival Service 端點,它暴露相同的 `LedgerService` gRPC API:
- Testnet: `archive.testnet.sui…
Q: 我怎么获取都call哪些函数?
A: 根据知识来源,以下是获取交易中所有函数调用信息的方法:
## 方法一:使用 Replay 工具生成 Trace
```bash
sui replay --trace --digest <攻击TX摘要>
```
生成的 trace 文件包含了执行过程中所有 Move 指令和函数调用的详细信息,包括 PTB 命令(如 SplitCoins、MergeCoins、TransferObjects)和…
Q: 我想同时舰艇链上多个事件,升级2.x之后有没有什么方法能办到
A: 在 Sui SDK 2.x 升级之后,原来的 `queryEvents` JSON-RPC 方法需要迁移到 **GraphQL** 方式来查询事件。以下是同时监听多个链上事件的方法:
## 使用 `SuiGraphQLClient` 查询事件
首先设置 GraphQL 客户端:
```typescript
import { SuiGraphQLClient } from '@mysten/s…
Q: the sui fee is dominated in mist and cbtc in base "const SUI_FEE = 2000000000;
const CBTC_FEE = 10000;" correct?
A: Yes, that's correct!
- **`SUI_FEE = 2_000_000_000`** — This is 2 SUI expressed in MIST (the smallest unit of SUI), since `1 SUI = 1,000,000,000 MIST`. [[Module sui::sui](https://docs.sui.io/reference…
Q: where i can change ui for the front end
A: Based on your project setup, here are the places where you can change the UI:
---
## 1. `src/App.tsx` — Main Layout
This is the primary file for your app's UI structure. Change the layout, add/remov…
Q: is there no way to delegate the merge and split to wallets?
A: Based on the knowledge sources available, the TypeScript SDK itself handles this automatically — you don't need to delegate it to the wallet manually.
When you use `coinWithBalance`, the SDK resolves…
Q: Transaction Data │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0xf7c4f9a69c98f927cb2dd33c82688ec1647b467c40614f6ebb8bc49defdd6ef5
A: Your package was successfully published! Here's what to note from the output:
## Key IDs from Your Transaction
| What | ID |
|---|---|
| **Package ID** | `0xe7e8a6d3952083cbecc023b012de6210b2636f94d…
Q: czy 10^77 miesci sie w u256
A: Tak, 10^77 mieści się w typie `u256`.
Z dokumentacji wynika, że maksymalna wartość `u256` to 2^256 - 1, co wynosi: [[max_value u256](https://github.com/MystenLabs/sui/blob/main/external-crates/move/c…
Q: sui move build --lint --path math/fixed_point
Your active environment `local` is not present in `Move.toml`, so you cannot publish to `local`.
- If you want to create a temporary publication on `local` and record the addresses in an ephemeral file, use the `test-publish` command instead
A: The error is because your active CLI environment is `local`, which isn't defined in your `Move.toml`. For just building and testing (not publishing), you need to tell the CLI which environment's depen…
Q: Sui GraphQL MoveType layout query concrete type fields layout runtime parsing event type string without source code.
A:
Q: Sui normalized move module RPC getNormalizedMoveModule getNormalizedMoveStruct dynamic event BCS decoding from event type and on-chain package layout.
A:
Q: Sui BCS event deserialization normalized Move modules layout struct fields runtime decoding eventType string getNormalizedMoveModule or layout for Move struct.
A:
Q: Sui SDK parse Move struct bytes dynamically from type tag or on-chain package metadata without generated source code. Event contents bytes decoding strategy.
A:
Q: how can i deserialize contentJson in event?
Sample:
{
"packageId": "0x08d13929817c5f2ebff56c60432725f669b83ad496f955581c2d6c1118af8fac",
"_packageId": "packageId",
"module": "periphery_pool",
"_module": "module",
"sender": "0x0a
A: Looking at your sample, the `contents.value` field contains raw BCS-serialized bytes of the Move event struct. You need to define the matching struct layout and parse those bytes using the `@mysten/su…
Q: sui rust sdk
A: ## Sui Rust SDK
There are two Rust SDKs available for Sui:
### 1. Sui Rust SDK (`sui-rust-sdk`) — Recommended
The current Rust SDK supports **gRPC and GraphQL**. It does **not** support JSON RPC. [[…
Q: sui groups là gì?
A: **Sui Groups** là một thành phần trong **Messaging SDK** của Sui, cho phép quản lý các kênh giao tiếp nhóm trên blockchain.
## Sui Groups là gì?
Groups SDK chạy trên Sui và quản lý các chức năng sau…
Q: does anyone know if theres any UI we can check for what is the status of the sui bridge global limiter, ie how much is currently available on the bridge limits?
A: The knowledge sources don't explicitly mention a dedicated UI for checking the real-time status of the Sui Bridge global limiter (i.e., how much of the limit has been consumed vs. remains available).
…
Q: code ở trên thiếu truyền cursor
A: Đúng, đoạn code thiếu truyền `cursor` vào request. Đây là bản sửa:
```ts
async getAllBalances({ owner }: { owner: string }) {
let objCursor = undefined;
const balanceMap: Record =…
Q: so once I have published an object and I have it's address can I create a single URL to return the machine readable object?
A: Based on the knowledge sources provided, there isn't a single REST-style URL you can construct to return a machine-readable object directly. However, the closest options are:
**1. GraphQL endpoint (s…
Q: So which one does walrus use
A: The knowledge sources don't explicitly mention which model (coin objects vs. address balances) Walrus uses internally for its storage payments and WAL token transactions.
What the Walrus documentatio…
Q: non-defining modules can mint other's objects?
A: No. In Sui Move, non-defining modules **cannot** create (mint) objects of a type they don't define.
This is enforced by Move's **privileged struct operations** rule:
> Struct types can only be creat…
Q: 如果我没有源码呢
A: 如果没有源码,根据知识库中的信息,有以下几种方式可以获取或查看已部署合约的字节码:
### 方法一:通过 GraphQL API 获取链上字节码
可以使用 Sui GraphQL API 查询已发布包的模块字节码。`MoveModule` 类型提供了以下相关字段:[[MoveModule GraphQL](https://docs.sui.io/references/sui-api/sui-g…
Q: json rpc 升级grpc后。listOwnedObjects 不支持多type查询了
A: 是的,这是从 JSON-RPC 迁移到 gRPC 后的一个已知限制。
## 情况说明
**JSON-RPC 的 `getOwnedObjects`** 支持通过 `filter` 传入 `MatchAny` 来同时匹配多个 type,但 **gRPC 的 `listOwnedObjects`** 的 `object_type` 参数每次只支持单个类型过滤。[[gRPC State Servic…
Q: what is authorities_db
A: `authorities_db` is the primary database directory used by a Sui node (`sui-node`) to store all authority-related (validator/full node) data. By default, it is located at `/opt/sui/db/authorities_db` …
Q: note superNode is shard object created by user, wich other users joins which means it has details of the users that joined and the creation logic also, will the migration takes all the data to new version?
A: Great clarification. Since `SuperNode` is a **shared object** (not owned) that users join and that holds participant data, the versioning and migration approach is the same as for your other shared ob…
Q: what do you recomend for key management
A: Here's a summary of key management recommendations across different Sui contexts:
## For Wallet Users
- Use **self-custodial wallets** (e.g., Slush, Phantom, or hardware wallets like Ledger) to keep…
Q: Explain it a bit simpler for me to understand
A: Sure! Let me simplify the security risks that come with Sui's parallel design.
---
## 🔑 The Core Problem: Parallel = New Risks
Because Sui runs transactions at the same time, it needs to carefully …
Q: any Cross-PTB or cross-transaction reservation tracking.
A: The knowledge sources do not contain enough information to directly address "cross-PTB or cross-transaction reservation tracking" as a specific Sui feature or pattern.
However, based on what the know…
Q: Where in the official docs is the exact behavior of address balance accumulators (fundsInAddressBalance) and FundsWithdrawal documented, including signing vs execution vs settlement timing?
How does the 1024-command PTB limit interact with shared-object modules like the bridge and accumulator? Is th
A: Here is what the provided knowledge sources directly support for each of your questions:
---
### 1. Where are address balance accumulators and FundsWithdrawal documented?
The provided sources cover…
Q: So the DenyCapV2 is controlled by a single person?
A: Based on the knowledge sources, `DenyCapV2` is a single object with `key` and `store` abilities, meaning it is owned by one address at a time and is transferable. [[DenyCapV2 capability](https://docs.…
Q: I have a plain HTML website (no React, no npm, no bundler).
I want to detect ALL installed Sui wallets including Slush
browser extension using the Wallet Standard.
What is the exact CDN script URL I should load? And after
loading it, what exact JavaScript code do I call to get all
installed wa
A: ## Detecting Sui Wallets in Plain HTML/JS
### CDN Script URL
The knowledge sources do not provide a CDN URL for `@mysten/wallet-standard`. The documentation assumes a Node.js/npm/bundler environment…
Q: So sui is like a customer who owns a unique apple or bread it is unique with a code onky to that perso. A 1/1 they can go and stand in line whereever, only when the system notices that two different people stand in line with a same product and code it will pull them away to a seperate line where the
A: Your analogy is really good and you're on the right track! Let me refine it slightly to make it even more accurate:
**Your Sui part is spot on.** Every object has a unique ID, belongs to one owner, a…
Q: 我怎麼知道是少了哪個?
A: 根據現有的知識來源,並沒有直接說明如何在錯誤訊息中識別**具體是哪個依賴缺失**的方法。不過,以下是一些可以幫助你診斷的建議:
### 1. 使用 `--verify-compatibility` 旗標(本地模擬)
在 Sui 1.42 中新增了 `--verify-compatibility` 旗標,可以在本地模擬環境中執行升級相容性檢查,幫助你在不花費 SUI 的情況下提前發現錯誤。[[N…
Q: What are programmable transaction blocks (PTBs)?
A: ## Programmable Transaction Blocks (PTBs)
Programmable Transaction Blocks (PTBs) are the fundamental unit of user transactions on Sui. They consist of groups of commands that execute on inputs to def…
Q: When the sui move package is updated to next version, the old version stays there as well. What happens the storage, variables and funds to the previous version?
As the previous version is still accessible to users as well
A: Great question! Here's a clear breakdown of what happens when a Sui Move package is upgraded:
## Packages Are Immutable — Objects Are Not
When you upgrade a package, **the new version gets its own o…
Q: Can I get the digest of a package with Move on chain?
A: The knowledge sources mention the `ticket_digest` function in the `sui::package` module, which allows you to retrieve the digest from an `UpgradeTicket` on-chain:
```move
public fun ticket_digest(tic…
Q: 那可以不用 public share object?
A: 可以,你可以改用 `transfer::share_object`(不需要 `store`),但這樣就**不能在模組外部呼叫**,必須在定義 `Position` 的模組內提供一個 share function。
## 方案:用 `share_object`,不加 `store`
```move
// Position 只需要 key,不需要 store
public struct Posit…
Q: walrusClient.writeFiles() is the cleanest API for file uploads — a single call with just a few lines:
walrusClient.writeFiles({
deletable: true,
signer,
// ...
});, but i use enoki and i dont have signer
A: This is a real challenge when using Enoki, since Enoki abstracts away the keypair and doesn't expose a raw `Signer` object directly.
Based on the knowledge sources available, here are two approaches …
Q: 呼叫 share object 也要先拿到 share object 才行?還是只要知道 object id?
A: 這取決於你的情境:
## 建立(share)一個新物件
當你要**建立並分享**一個物件時,你需要先在同一筆交易中建立該物件,然後才能呼叫 `transfer::share_object`。也就是說,你必須持有該物件的值(by value),而不只是知道 object ID。
```move
public fun create_and_share(message: String, ctx: …
Q: who are Accumulator
A: Based on the knowledge sources, here is what the `sui::accumulator` module is about:
## `sui::accumulator` in Sui Move
The `sui::accumulator` module is a **Sui framework module** that provides infra…
Q: is there a blink for sui?
A: The knowledge sources provided don't contain any information about a "Blink" feature or equivalent on Sui.
For context, "Blinks" (Blockchain Links) are a concept popularized on Solana that allow bloc…
Q: I don't see the documentation related to kv_objects pipeline
A: You're right to notice that. The knowledge sources do not contain a dedicated documentation page or section specifically for the `kv_objects` pipeline configuration. Here's what the sources do tell us…
Q: localnet graphsql conection
A: To connect to a local Sui network via GraphQL, use the following URL: `http://127.0.0.1:9125/graphql`.
First, start your local network with GraphQL enabled:
```sh
sui start --force-regenesis --with-…
Q: Seal package ID for testnet ?
A: The Seal package ID for **Testnet** is:
`0x927a54e9ae803f82ebf480136a9bcfe45101ccbe28b13f433c89f5181069d682`
[[Key Servers](https://github.com/MystenLabs/sui-move-bootcamp/blob/main/K5/05_key_server…
Q: i've got blockpi grpc endpoint, how do i authenticate?
A: The knowledge sources do not contain specific information about authenticating with a BlockPI gRPC endpoint. The documentation covers:
- **Building gRPC clients** (TypeScript, Go, Python) that connec…
Q: error when I tried to publish: `Error executing transaction 'HL45jgjdvtn5Q8rrnQ7SUERtKHaqADNF9rqJzDgZkHLG': VMVerificationOrDeserializationError in command 0`
A: This is the same `VMVerificationOrDeserializationError in command 0` error we discussed previously, occurring during package publish. Here's a focused checklist to debug it:
### Common causes
| Erro…
Q: А как мне передать VecMap в параметры вызова из sdk?
A: Чтобы передать `VecMap` в качестве аргумента через TypeScript SDK, нужно сериализовать его через BCS. `VecMap` внутренне представлен как два вектора: `keys` и `values`.
Используйте `b…
Q: 我想用graphql的方式查询suiNS名字,该怎么查?
A: 根据知识库,使用 GraphQL 查询 SuiNS 名称有以下两种方式:
## 1. 地址 → 默认 SuiNS 名称
使用 `address` 查询的 `defaultSuinsName` 字段:
```typescript
import { SuiGraphQLClient } from '@mysten/sui/graphql';
import { graphql } from '@m…
Q: Can a single PTB containing multiple claim_token commands,
be use
A: Your query appears to be incomplete — it seems like it was cut off before finishing the question. Could you please complete your query? For example, are you asking something like:
> "Can a single PTB…
Q: here is world published.toml
# Generated by Move
# This file contains metadata about published versions of this package in different environments
# This file SHOULD be committed to source control
[published.testnet]
chain-id = "4c78adac"
published-at = "0x33226d2eedda428eb7e1a56faf525bd5300f9394a5d
A: Looking at the `World` package's `Published.toml`, the `testnet_utopia` environment has its own separate chain-ID entry (same chain ID `4c78adac` as testnet, but a distinct environment name). You need…
Q: Sui transaction deferral consensus handler randomness limit deferral rounds congestion control
A:
Q: So how can I open a slush wallet through another app in my mobile?
A: You can open Slush Wallet from another mobile app using **deep linking**. Slush supports two approaches:
## 1. Universal Links (Recommended)
Use `my.slush.app` HTTPS links — they work on iOS, Androi…
Q: sui client call 指令
A: ## `sui client call` 指令
`sui client call` 用於呼叫 Move 套件中的函數,是與 Sui 網路互動的核心指令之一。[[Sui Client CLI](https://github.com/MystenLabs/sui/blob/main/docs/content/references/cli/client.mdx)]
### 基本語法
```sh
s…
Q: sbt nft
A: ## Soulbound NFTs (SBTs) on Sui
A **Soulbound Token (SBT)** is a non-transferable NFT that is permanently bound to the account it was minted to. [[Soulbound NFT Example](https://docs.sui.io/guides/de…
Q: this is my move.toml
[package]
name = "alliance_protocol"
edition = "2024" # edition = "legacy" to use legacy (pre-2024) Move
# license = "" # e.g., "MIT", "GPL", "Apache 2.0"
# authors = ["..."] # e.g., ["Joe Smith (joesmith@noemail.com)", "John Snow (johnsnow@noemail.com)"]
A: Your `Move.toml` looks like a valid new-format (post-v1.63) manifest. Here are a few observations and suggestions:
### What looks good
- Using `edition = "2024"` is correct.
- The `[environments]` se…
Q: Окей, а через sdk? @mysten/sui?
A: Вот как вызвать `mint_gladiator` через `@mysten/sui` TypeScript SDK, используя PTB:
```typescript
import { Transaction } from "@mysten/sui/transactions";
import { SuiClient, getFullnodeUrl } from "@m…
Q: Напиши мне PTB что бы передать обьект адресу
A: Вот пример PTB для передачи объекта адресу с использованием TypeScript SDK:
```typescript
import { Transaction } from '@mysten/sui/transactions';
const tx = new Transaction();
// Передаём объект (с…
Q: What's ray math?
A: The knowledge sources do not contain enough information to answer a query about "ray math" in the context of Sui. The available documents cover topics like DeepBook Margin risk ratios, Move integer ar…
Q: INFO: Uvicorn running on http://127.0.0.1:8078 (Press CTRL+C to quit)
📡 Status (https://graphql.testnet.sui.io/graphql): 200
📄 Page fetched: 2 txs | hasNextPage: False
✅ Total digests fetched: 2
✅ Total unique digests: 2
📡 Status (https://graphql.testnet.sui.io/graphql): 200
❌ GraphQL Error (htt
A: The error is clear:
```
Unknown field "base64Sig" on type "UserSignature"
```
Looking at the actual `UserSignature` type in the Sui GraphQL schema, the correct fields are `signatureBytes` and `schem…
Q: public fun get_limit_file(): u64 {
FILE_LIMIT
}
how to read:
const tx = new Transaction()
tx.moveCall({
})
utilsSui.getSuiClient.simulateTransaction({
transaction: "",
});
return get_limit_file;
A: Looking at your code, you want to call a Move function `get_limit_file()` that returns a `u64`, simulate the transaction, and read the return value. Here's how to do it correctly using the Sui TypeScr…
Q: What is object display? why it's used?
A: ## Sui Object Display
**Object Display** is a standard on Sui that provides a way to render any on-chain object using a templating syntax. It renders Sui Move object values into human-readable string…
Q: testnet rpc nodes
A: Here are the Sui Testnet RPC endpoints:
- **Full node RPC URL:** `https://fullnode.testnet.sui.io:443` [[Sui Networks](https://docs.sui.io/concepts/sui-architecture/networks)]
This endpoint can be u…
Q: how to send sui from one address to another using sui client CLI
A: You can send SUI from one address to another using the `sui client pay-sui` command, which is the recommended approach as it handles gas automatically using the same input coin:
```sh
sui client pay-…
Q: Can a effect certificate used as a proof for the tx?
A: Yes, an effects certificate can be used as proof of a transaction on Sui. Here's what the documentation says:
- **An effects certificate guarantees transaction finality.** Once you or a full node obs…
Q: How to cli to create wallet and fund with devnet faucet
A: Here's how to create a wallet and fund it using the Sui CLI on Devnet:
## 1. Create a Wallet / Address
If you're running `sui client` for the first time, it will prompt you to configure everything a…
Q: SuiGraphQLClient url
A: Here are the GraphQL endpoint URLs for each Sui network when using `SuiGraphQLClient`:
| Network | URL |
|---------|-----|
| **Mainnet** | `https://sui-mainnet.mystenlabs.com/graphql` |
| **Testnet**…
Q: Is there any que on sui side when I bridge from ethereum
A: When you bridge from Ethereum to Sui, there isn't a traditional "queue" in the sense of a waiting line. Instead, the process follows a structured approval-then-claim flow:
### How it works (Ethereum …
Q: how do generate stealth addresses on sui for an account
A: The knowledge sources do not contain enough information to answer your query about generating stealth addresses on Sui. The documents cover standard Sui address creation (via `sui client new-address`)…
Q: How does the Sui Bridge, Wormhole Connect, Wormhole Portal Bridge, and ZetaChain, works? And the use of the 2 VM IN Available Commands
Command Description
tx.splitCoins(coin, amounts) Splits a coin into new coins of specified amounts
tx.mergeCoins(destinationCoin, sourceCoins) Merges multiple coins
A: ## Sui Bridging Options & PTB Commands
### 1. Sui Bridge (Native)
The native bridge is built into Sui's core architecture, operated and governed by Sui validators. It uses a **burn/mint model** on S…
Q: 迁移到v2的指南
A: # 迁移到 @mysten/sui v2.0 指南
以下是从 v1.x 迁移到 v2.0 的核心要点:
---
## 1. ESM 迁移
所有 `@mysten/*` 包现在**仅支持 ESM**。需在 `package.json` 中添加:
```json
{
"type": "module"
}
```
同时更新 `tsconfig.json`:
```json
{
"c…
Q: How can I remove sui cli which I had installed before so I can install it using suiup
A: The knowledge sources do not contain explicit instructions on how to **remove/uninstall** a previously installed Sui CLI binary. They only cover installation and upgrading methods.
However, here's wh…
Q: move.toml的作用是甚麼,為甚麼需要這個檔案
A: `Move.toml` 是 Move package 的**清單檔(manifest file)**,是每個 Move package 必須存在的核心設定檔。以下說明它的作用與必要性:
## Move.toml 的作用
### 1. 描述 Package 基本資訊
`[package]` 區段記錄 package 的元數據,這些資訊被編譯工具與版本管理使用:
- `name`:package …
Q: How do I deploy to Sui?
A: Here's how to deploy (publish) a Move package to Sui:
## 1. Set Up the Sui Client CLI
If you haven't initialized the CLI yet, run `sui client` in your terminal. Follow the prompts:
- Enter `y` to co…
Q: so in this error response, it means my signature is invalid or i have to update my sdk dependency
A: Looking at your error response again:
```json
{
"data": null,
"errors": [
{
"message": "Unknown field \"error\" on type \"ZkLoginVerifyResult\".",
"extensions": { "code": "GRAPHQL…
Q: which wallet does SUI uses?
A: Sui supports several wallet types and specific wallet products:
## Wallet Types on Sui
1. **Slush** – The official wallet built and maintained by Mysten Labs. Available as a Chrome browser extension…
Q: apply the it and return the full corrected function "entry fun register_capy(
registry: &mut Registry,
shard_pool: &mut ShardPool,
config: &Config,
capy: &suifrens::suifrens::SuiFren,
clock: &Clock,
ctx: &mut TxContext
) {
A: Here is the corrected `register_capy` function with the on-chain shard validation applied, based on the approach we agreed on:
```move
entry fun register_capy(
registry: &mut Registry,
shard_…
Q: can we use cli to bridge ?
A: Based on the knowledge sources available, there is no documentation about using the Sui CLI to directly initiate a bridge transfer (i.e., bridging tokens from Ethereum to Sui or vice versa via a CLI c…
Q: can i speak chinese, or english only
A: You can ask your questions in Chinese! I'm able to respond in the same language you use. Feel free to ask your Sui-related questions in Chinese or English — whichever you prefer.
Q: What are Sui Move events and how do I emit events in smart contracts?
A:
Q: Sui Move event system definition and examples with emission patterns
A:
Q: How to write unit tests for Sui Move modules and test best practices?
A:
Q: how do i set up monitoring for my validator and fullnode
A: ## Setting Up Monitoring for Your Sui Validator / Full Node
### Accessing Metrics
Sui nodes expose Prometheus metrics via a local HTTP endpoint at `localhost:9184/metrics` by default. [[Sui Node Mon…
Q: explain the hot potato pattern in sui move
A: ## The Hot Potato Pattern in Sui Move
A **hot potato** is a struct that has **no abilities** (`copy`, `drop`, `key`, or `store`). Because it lacks these abilities, it cannot be stored, copied, or dis…
Q: from the code above, if 50 years passed, will the u64 overflow?
A: Let me work through the math based on what the knowledge sources tell us about `u64` in Move on Sui.
## Checking for `u64` Overflow After 50 Years
From the knowledge sources, `u64` has a maximum val…
Q: Sui groth16 native verification cost BN254 pairing operations gas compared to other chains EVM
A: