Q: so what are all the function with the grpc
A: Here's a summary of all the gRPC services and their available methods on Sui:
## gRPC Services & Methods
### LedgerService
For querying objects, transactions, checkpoints, epochs, and system state. …
Q: ohk now i get it
Just implemented and enriched the way we fecht and pull info from the network or so
A: Exactly! You've got it. To summarize what the migration to gRPC improves:
- **Performance**: gRPC uses Protocol Buffers (binary format) instead of JSON, making data transfer faster and more compact.
…
Q: 今年sui有哪些重大更新升级?
A: 根据知识来源,以下是Sui在2025-2026年的重大更新与升级:
## 核心技术升级
- **Mysticeti v2**:Sui共识引擎升级,实现了亚秒级(不到1秒)的交易最终确认,适用于大多数使用场景。[[Sui Stack 2025](https://blog.sui.io/2025-sui-stack-developments/)]
- **新虚拟机(New VM)**:Sui执行层…
Q: What is a witness pattern in Sui Move programming?
A:
Q: how does defil protocols create AMM from deepbook orderbook?
A: Based on the knowledge sources available, here's what's documented about how DeFi protocols can create AMM-like functionality on top of DeepBook's order book:
## DeepBook's Built-in Swap Interface
D…
Q: Requester Pay plan, cost
A: The knowledge sources do not contain specific pricing or cost details for the Requester Pays buckets. What they do confirm is:
- **Requester Pays** means **you are charged for the egress costs** of p…
Q: Give me the same usecase for each of them
A: Based on the knowledge sources, here are concrete use cases for each standard:
---
## Use Cases for Each Sui Asset Standard
### 1. Coin Standard (`Coin`) — *Like ERC-20*
**Use case: A general-pu…
Q: 讲一下mvr 添加的流程,怎么又是matedata,又是package。又是组织的
A: The knowledge sources provided do not contain detailed step-by-step documentation about the full MVR registration flow (including the relationships between metadata, packages, and organizations/namesp…
Q: 我要如何制作一个可以在其他交易所上架的 NFT?
A: 在 Sui 上,要制作一个可以在其他交易所(市场)上架的 NFT,你需要结合以下几个关键步骤:
## 1. 定义 NFT 结构
使用 Move 定义你的 NFT 类型,需要同时拥有 `key` 和 `store` 能力(这样才能通过标准转移函数交易):
```move
module examples::testnet_nft;
use std::string;
use sui::url::…
Q: What happens when a child object is `received` by the parent? Is it the responsibility of the receive function to specify how to exactly incorporate it in one of the fields of the parents?
A: Yes, exactly. When `transfer::receive` (or `transfer::public_receive`) is called, it simply **returns the child object as a value of type `T`** — it does not automatically attach it to any field of th…
Q: but it doesn't match the data that getStakesById did in RPC? this is the schema data class Stakes(
val validatorAddress: String,
val stakingPool: String,
val stakes: List
)
data class StakedSuiLike(
val stakedSuiId: String,
val stakeRequestEpoch: BigInteger,
v
A: You're right to flag this — the `Stakes` / `StakedSuiLike` schema you're showing (with `validatorAddress`, `stakingPool`, `stakeRequestEpoch`, etc.) reflects what the old JSON-RPC `getStakes`/`getStak…
Q: What's the difference between dev inspect and simulate tx?
A: Both `devInspectTransactionBlock` (dev inspect) and `dryRunTransactionBlock` / `simulateTransaction` are simulation methods, but they differ in a few key ways:
### `devInspectTransactionBlock` (Dev I…
Q: How can we get reference-gas-price using grpc? Is there any way or we have to use graphql
A: Yes, you can get the reference gas price using **gRPC**. The gRPC replacement for the old `getLatestSuiSystemState` / `getValidatorsApy` JSON-RPC methods is via the **Ledger Service**. Specifically, y…
Q: But transaction takes JSON as input. How do we get base64-encoded-transaction in JSON format?
A: Great question. The `transaction` parameter accepts JSON, and you can pass BCS-encoded data by wrapping it in a specific JSON structure: `{"bcs": {"value": ""}}`. To get that base64 value, you…
Q: how to optimize gas in move contracts?
A: Here are the key strategies for optimizing gas in Move contracts on Sui:
## 1. Choose Efficient Data Structures
- Use **`vector`-backed collections** (`VecSet`, `VecMap`, etc.) only for collections …
Q: What is the checkpoint bucket?
A: The **checkpoints bucket** is a cloud storage bucket that stores blockchain state data in protobuf-encoded checkpoint blobs. It is written by a full node or ingestion daemon and serves two primary pur…
Q: cargo run --bin sui-kv-rpc -- zan-sui-archive-store-main 0.0.0.0:19184 127.0.0.1 19180 --credentials /root/maxen-1-f9ca39781e21.json
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.66s
Running `/home/sui-graphql/sui/target/debug/sui-kv-rpc zan-sui-archive-store-main '0.0.0.0
A: The error is the same as before — a trailing slash is being appended to your instance ID internally, resulting in `zan-sui-archive-store-main/` instead of `zan-sui-archive-store-main`.
Looking at you…
Q: ubuntu@sui-mainnet-1:~$ cargo install --locked --git https://github.com/MystenLabs/sui.git --branch mainnet sui --features tracing
Updating git repository `https://github.com/MystenLabs/sui.git`
error: could not find `sui` in https://github.com/MystenLabs/sui.git?branch=mainnet with version `*`
A: The knowledge sources confirm that the local clone approach using `--path crates/sui` is the recommended method for installing from source. Let's try that:
```sh
git clone https://github.com/MystenLa…
Q: ### Capability Leakage via Events
**Severity:** High
Event-based capability leakage occurs when a module emits a capability struct, its object ID, or internal fields as part of an on-chain event. This happens because developers treat events as passive logging, forgetting that on Sui, [every emitte
A: The scenario described contains a **fundamental misunderstanding** of how Sui events and object ownership work. Let me clarify based on the knowledge sources:
## Why This Is Not a Valid Attack Vector…
Q: Give me a Transaction Object Model By JSON
A: Based on the knowledge sources, here is the Transaction object model in JSON format, derived from the GraphQL schema and gRPC proto definitions:
```json
{
"digest": "string (Base58-encoded 32-byte …
Q: wallet
A: ## Wallets on Sui
A Sui wallet stores the cryptographic keys that prove ownership of your onchain assets and signs the transactions you submit to the network. [[What Is a Wallet?](https://docs.sui.io…
Q: どうやってeventをfetchする?
A: Sui でイベントを取得する方法は主に3つあります。
## 1. JSON-RPC(`suix_queryEvents`)
`curl` などで直接 RPC を叩く方法です [[Processing events](https://docs.sui.io/develop/accessing-data/using-events#processing-events)]:
```sh
curl -…
Q: name │ ╭───────┬────────────────────────────────────────╮
A: The Base64 value `GHBlbmRpbmdfcG9zaXRpb25fY2FwX2lkcw==` decodes to the bytes of the string `ending_position_cap_ids` (with a length prefix byte). Since the name type is `vector`, you can use a Dis…
Q: /get_pools
A: ## Endpoint `/get_pools`
Повертає список усіх доступних пулів з детальною інформацією про базовий та котирувальний активи, а також параметри пулу. [[DeepBookV3 Indexer](https://docs.sui.io/onchain-fi…
Q: keytool import
A: `sui keytool import` 可以將助記詞(mnemonic)或 Bech32 格式的私鑰加入到 Sui CLI 的本地 Keystore。
## 基本語法
```sh
sui keytool import INPUT KEY_SCHEME
```
- `INPUT`:助記詞(12/15/18/21/24 個單字)或 Bech32 編碼的私鑰(以 `suiprivkey` 開頭)…
Q: What is Mysticeti?
A: Mysticeti is the consensus protocol that powers the Sui blockchain. Here's a summary of its key characteristics:
## What is Mysticeti?
Mysticeti is a **Byzantine Fault Tolerant (BFT), Directed Acycl…
Q: What are programmable transaction blocks (PTBs)?
A: ## Programmable Transaction Blocks (PTBs)
Programmable Transaction Blocks (PTBs) are the foundation of all user transactions on Sui. They are groups of commands that execute on inputs to define the r…
Q: cani use nautilaus on Microsoft Azure
A: Based on the knowledge sources, **Nautilus currently does not support Microsoft Azure**. It only supports:
1. **Self-managed AWS Nitro Enclaves** — the primary and currently only native TEE provider …
Q: A Kahoot! quiz focused on the Sui blockchain, which tech stack of SUI will link to this one
A: Here's a Kahoot!-style quiz focused on the Sui blockchain tech stack, based on the knowledge sources:
---
## 🎮 Sui Blockchain Tech Stack Quiz
---
**Question 1: What is the consensus engine powerin…
Q: vãi nồi thế chỉ có thể đổi 1 site id không hợp lệ hoặc web khác à
A: Đúng vậy, dựa trên các tài liệu hiện có, về cơ bản chỉ có các lựa chọn sau:
1. **Trỏ sang một Walrus Site object ID không hợp lệ** — portal sẽ trả về lỗi, không hiển thị nội dung. [[Linking to Walrus…
Q: Documentation and example about Sponsor Tx (without using Enoki)
A: ## Sponsored Transactions on Sui (Without Enoki)
### Overview
A sponsored transaction allows a **sponsor** to pay gas fees on behalf of a **user**. This removes the need for users to hold SUI or und…
Q: 每秒多少个checkpoint?
A: Sui 大约每秒创建 **4 个 checkpoint**。[[Blocks vs Checkpoints](https://docs.sui.io/operators/exchange-integration#blocks-vs-checkpoints)]
Q: 1 epoch on walruson mainnet and testnet how long
A: Here are the epoch durations for Walrus:
| Network | Epoch Duration |
|---------|---------------|
| **Mainnet** | 2 weeks (14 days) |
| **Testnet** | 1 day |
[[Available Networks](https://docs.wal.a…
Q: running this where?
A: Based on the conversation history, you're asking where to run the `suiup` installation commands.
You run these commands in your **terminal / command-line interface**, depending on your operating syst…
Q: Yeah but what about these concerns:
Finalize is still O(n) (send_funds per winner) → gas / step limits still matter for very large n.
Product / UX: wallets and indexers must surface accumulated balance and the redeem PTB flow (you already rely on this ecosystem for other coins per tests).
Yo
A: These are valid technical concerns. Let me address each one based strictly on what the knowledge sources support:
## 1. O(n) Finalization / Gas Limits
This concern is well-founded. The knowledge sou…
Q: can you give a example on how to do this
If you need to evolve your data model, the recommended approach is to define a new struct type in the upgraded package and provide a migration function that converts old objects to the new type. [Upgrading Packages]
A: The knowledge sources don't include a complete end-to-end code example specifically for migrating owned objects from an old struct type to a new one. However, based on what the sources do describe, he…
Q: ok and can you explain to me the deepbook points? What i get if I collect all those points?
A: ## DeepBook Points
The DeepBook Points Program is tied to the launch of **DeepBook Margin**, and here's what the knowledge sources say about it:
### How to Earn Points
Points are earned through tra…
Q: Can you point me to the specifications of this method? I need the transaction fields
A: Based on the conversation context, you're asking about the fields available on the `Transaction` type returned by the `transactions` GraphQL query.
## `Transaction` Type Fields
[[Transaction type](h…
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: do sui events have a way to be sequenced or have some sequencing number we can read?
A: Yes, Sui events have sequencing information available through multiple fields:
## Event Sequencing
**1. `eventSeq` (within a transaction)**
Each event has an `id` object containing both a `txDigest…
Q: S D:\BlockMob\axon-wallet-backend> npm run test:sui-limit-order
> okx-wallet-backend@1.0.0 test:sui-limit-order
> tsx src/limit-order/tests/sui-limit-order-minimal-example.ts
Signed (offline) bytes: AAsBAcsIrFHEpg5RLwOuYu9Zdeb+2Z8Bn6IVAlWiNB9fD/i/eiRkMgAAAAABAQHgXa+1EzvP+41Z9OEkZdwOn66qBePjQqCP4TW
A: The error you're seeing is:
```
MoveAbort ... order_info::validate_inputs ... 1
```
This means the transaction was **aborted during input validation** when placing the limit order. The `validate_inp…
Q: Explain to me the encryption and decryption process using seal. When you encrypt, are you uploading the secret to seal servers?
I'm hitting a snag at this step and I don't know why:
(base) okorideo@Okoris-MacBook-Air seal-official % cargo run --bin seal-cli fetch-keys --request "$FETCH_KEY_REQ" \
A: ## Seal Encryption & Decryption Overview
### Is the secret uploaded to Seal servers during encryption?
**No.** Encryption is entirely local — no key server contact happens during this step. Here's w…
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: What is the format of package binary that is stored on chain?
A: Based on the knowledge sources, here is what is documented about the on-chain format of a Move package binary:
## On-Chain Package Binary Format
### Object-level structure
A Move package is stored …
Q: what is the sui mainnet full node url
A: The Sui Mainnet full node URL is:
```
https://fullnode.mainnet.sui.io:443
```
[[Sui Networks](https://docs.sui.io/develop/sui-architecture/networks)]
Q: How about package? If we update a new package?
A: Unlike regular objects, **packages behave differently when upgraded — they get a new address (package ID) each time**.
When you upgrade a package on Sui, a **new package object is created onchain** w…
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: giải thích về Consensus
A: ## Consensus trên Sui
**Consensus** (đồng thuận) là quá trình mà phần lớn các node trên mạng blockchain đồng ý về trạng thái hiện tại của mạng, bao gồm các giao dịch nào cần được hoàn tất và ghi vào …
Q: best sui wallets
A: Here's an overview of the most popular wallets in the Sui ecosystem:
## Official Wallet
- **[Slush](https://slush.app/)** – Built by Mysten Labs, it's the official Sui wallet. Available as a Chrome …
Q: What causes the FeatureNotYetSupported error in a Sui upgrade transaction command 1?
A:
Q: Is there a credit bureau or credit information center or credit scoring protocol on Sui that tracks borrower creditworthiness?
A:
Q: When a Sui package is upgraded, does the package ID change, and how do struct type filters and function calls handle the different versions?
A:
Q: {
"@variant": "Linear",
} grpc返回的这个结构。在ts里面 如何获取
A: 根据知识源,这个 `{ "@variant": "Linear" }` 结构看起来是 gRPC 返回的枚举/oneof 类型。知识源中提到 `SuiGrpcClient` 使用 [protobuf-ts](https://github.com/timostamm/protobuf-ts) 生成类型安全的客户端,但对于这个具体结构的 TypeScript 处理方式,**知识源中没有足够的信息来给出确…
Q: How do I query dynamic fields and owned objects using Sui gRPC from a TypeScript client?
A:
Q: Is Sui JSON-RPC being deprecated and what is the recommended modern replacement, gRPC or GraphQL?
A:
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: Is there a performance difference on Sui between accessing a shared object with an immutable reference versus a mutable reference, in terms of consensus and parallelism?
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: i got this error frequently when i use zklogin account. how often does google or zklogin rotate their key?
"message": "Verification failed: Signature is not valid: Signature is not valid: General cryptographic error: JWK not found (https://accounts.google.com - cce4e024a51aa0c1c41c1a45
A: ## JWK Rotation and the "JWK not found" Error
The error you're seeing means that the `kid` (Key ID) referenced in the JWT — `cce4e024a51aa0c1c41c1a4515a41dd7e961936b` — is no longer present in the se…
Q: How do I use transfer::receive to accept an object that was transferred to a shared object's ID?
A:
Q: What is the difference between dynamic object fields and transfer-to-object for attaching NFTs to a shared parent object?
A:
Q: can you give me the fully updated codes plese
A: Here is the fully updated code with the `normalize_coin_type` fix applied throughout:
```python
import httpx
from datetime import datetime
SUI_RPC = "https://fullnode.testnet.sui.io:443"
SUI_GRAPHQL…
Q: How does Sui handle randomness on chain and can smart contracts use VRF for lottery-style selection?
A:
Q: How do shared objects and dynamic fields work in Sui Move, and what DeFi patterns do they enable?
A:
Q: What is SEAL on Sui and how does it provide decentralized secrets management or threshold encryption?
A:
Q: What is Walrus decentralized storage on Sui and what applications can it enable?
A:
Q: How does zkLogin work on Sui and what are its privacy and identity properties?
A:
Q: What novel cryptographic primitives and Move features does Sui offer that are underused by developers, including zkLogin, Walrus, SEAL, Nautilus, Mysticeti, and consensus innovations?
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: in what scenario could u have one zklogin AUD map out to 4 different gmail accounts with different subs and salts
A: A single `aud` (OAuth client ID) can map to multiple different zkLogin addresses — each with a different `sub` and `user_salt` — in the following scenario:
**Four different Google users logging into …
Q: do RPCS return well formatted errors ofr things like insufficine tgas?
A: Yes, Sui RPCs do return structured, well-formatted errors for issues like insufficient gas and other transaction failures.
## JSON-RPC Errors
For the JSON-RPC API, errors like insufficient gas surfa…
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: from app.services.TRON.tron import get_tron_transactions
from app.services.POLYGON.polygon import get_polygon_transactions
from app.services.SOLANA.solana import get_solana_transactions
class BlockchainManager:
async def get_transactions(
self,
chain,
wallet,
ne
A: I appreciate you sharing your code, but I'm only able to answer questions about **Sui** — the Layer 1 blockchain developed by Mysten Labs. Your query is about building a multi-chain transaction servic…
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: How to extend blob storage epoch duration using fund pool in Walrus?
A:
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: How does coinWithBalance resolve SUI coins when fundsInAddressBalance is zero? What causes "Invalid withdraw reservation" errors?
A:
Q: is this correct?
Key findings:
- 0xab7b... doesn't exist on-chain — it's not a real object
- User has 1 SUI coin (0xb7cfa4...) with 0.5 SUI
A: Your analysis is partially correct, but there's an important nuance to clarify based on the documentation.
**What's accurate:**
- If `fundsInAddressBalance: "0"` and the user has no address balance, …
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: 使用 normalizeSuiAddress 之后,加了 0x 前缀,但是全变成小写了:0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::usdc,这样会导致链上查询不到精度吗?
A: 根据知识来源中的信息,地址本身是**大小写不敏感**的:
> "Addresses are case insensitive."
[[Address concepts](https://move-book.com/concepts/address/)]
所以 `0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29…
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: '0x2::sui::SUI' 在链上的真实权限定名是什么
A: `0x2::sui::SUI` 就是 SUI 代币类型的完全限定名(fully-qualified name)。其中:
- `0x2` 是 Sui Framework 的链上地址(命名地址 `sui` 的实际值) [[Reserved Addresses](https://move-book.com/appendix/reserved-addresses/)]
- `sui` 是模块名
- `S…
Q: suiup install move-analyzer
A: The command `suiup install move-analyzer` installs the **Move Analyzer** — the Move Language Server that provides code completion, go-to-definition, hover information, and diagnostics for Move smart c…
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 do I get a list of transaction digests that used a given package? (either directly or as a dependency). Even just one (the most recent one) would be enough.
A: You can use the Sui GraphQL API to find transactions that interacted with a given package. The most relevant filter available is `function`, which lets you filter transactions by a specific function i…
Q: 给下使用 GraphQL 查询使用方式
A: 以下是使用 `SuiGraphQLClient` 查询币种精度的完整示例:
```typescript
import { SuiGraphQLClient } from '@mysten/sui/graphql';
import { graphql } from '@mysten/sui/graphql/schema';
const gqlClient = new SuiGraphQLClie…
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: Hmm, this isn't really what I'm asking. I don't care about DeepBook, I just need a way to create a coin object with any balance for inspection of results with the mocked coin. Is that possible?
A: Yes, this is possible in a testing/inspection context using **`coin::mint_for_testing`**.
The Sui framework provides a test-only function specifically for creating a `Coin` of any type with any ba…
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: 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: give me an example of curl for getting total supply
A: Here's a curl example for getting the total supply of a coin using the GraphQL API:
```bash
curl -X POST https://sui-mainnet.mystenlabs.com/graphql \
-H 'Content-Type: application/json' \
-d '{
…
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: in what format are events emitted? Can one fetch events in programming languages other than the supported SDKs, for example in go?
A: ## Event Format on Sui
### How Events Are Emitted
When a Move smart contract emits an event using `sui::event::emit`, the event data is stored as **BCS (Binary Canonical Serialization) bytes** withi…
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: getDynamicField的作用?
A: 您的问题与上一条相同,以下是对 `getDynamicField` 的总结:
`getDynamicField` 用于**根据字段名称获取对象上的某个特定动态字段**。动态字段是可以在对象构建后动态添加或移除的字段,字段名可以是任意具有 `copy`、`drop`、`store` 能力的值。[[Dynamic Fields](https://docs.sui.io/guides/develope…
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 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: 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: ptb 是什么,有什么优势
A: ## PTB(Programmable Transaction Block)是什么?
PTB(可编程交易块)是 Sui 上所有用户交易的基本形式。它由一组**命令(Commands)**组成,这些命令按顺序执行,共同完成一笔交易。[[什么是 PTB](https://docs.sui.io/guides/developer/transactions/ptbs/prog-txn-blocks)]
…
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: What tool should I use for multisig operations in my project?
A: Sui offers several tools for multisig operations, depending on your use case:
## 1. Sui TypeScript SDK (`@mysten/sui/multisig`)
Best for programmatic multisig in your application code. Use `MultiSigP…
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: 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: không có digest thì làm sao được
A: Đúng vậy — nếu không có digest cụ thể, **gRPC `getTransaction` không thể dùng để query theo event type**.
Dựa trên knowledge sources, các lựa chọn thực tế của bạn là:
1. **`SuiClient.queryEvents` (J…
Q: how to enable grpc on full node and on what port does it run?
A: ## Enabling gRPC on a Sui Full Node
### How to Enable gRPC
Add the following to your `fullnode.yaml` configuration file:
```yaml
rpc:
enable-indexing: true
```
This enables gRPC indexing on your…
Q: 在walrus的质押协议中 是否允许用户向一个已注册的 Walrus 但是该节点处于 未激活 un_active_validators状态 的节点中质押wal?
A: 根据当前提供的知识源,我无法给出关于 Walrus 质押协议中"向未激活节点质押 WAL"的明确答案。
知识源中关于 Walrus 质押的内容只涉及:
- 质押/解质押的时间窗口(委员会选举中点前后的影响);
- 通过 Walrus staking app 进行质押/解质押的操作步骤。[[Walrus 质押文档](https://docs.wal.app/docs/operator-guide…
Q: i want to copy all the sui docs so I can transfer it to my local llm, can you please provide a text file for every page within the Sui reference docs?
A: I'm not able to generate or provide text files for every page of the Sui reference docs — that's outside what I can do as a Q&A assistant.
However, the Sui documentation team has already built resour…
Q: 哪种方法更适合?
A: 根据知识库,以下是各方法的适用场景对比:
## 方法对比
| 方法 | 适用场景 |
|------|----------|
| **GraphQL 在线 IDE** | 临时查询、调试、探索数据,无需写代码 |
| **curl 命令行** | 脚本自动化、一次性批量查询 |
| **TypeScript SDK (`SuiGraphQLClient`)** | 集成到前端/Node.js …
Q: nên bỏ đoạn này useEffect(() => {
if (currentAccount?.address) {
localStorage.setItem('addressConnected', JSON.stringify(currentAccount.address));
}
}, [currentAccount?.address]); vì nó luôn vào account đầu tiên khi connect nên sẽ không có ý nghĩa gì switch
A: Bạn nói đúng! Đoạn `useEffect` lưu `localStorage` theo `currentAccount` sẽ **ghi đè** địa chỉ đã lưu ngay khi wallet connect lần đầu (vì `currentAccount` lúc đó là account mặc định đầu tiên), khiến vi…
Q: so we don't need the otw anymore?
A: Correct — the OTW approach is no longer required. The **standard creation** method (`coin_registry::new_currency`) is the recommended approach for most cases, and the documentation explicitly notes:
…
Q: szeretnék testnetről maintre váltani
A: Ha a dApp Kit SDK-t használod, a `switchNetwork` akcióval válthatsz testnetről mainnet-re:
```typescript
import { createDAppKit } from '@mysten/dapp-kit-core';
import { SuiGrpcClient } from '@mysten/…
Q: what is sui security
A: ## Sui Security
Sui is designed to provide high security guarantees to asset owners. Here's an overview of its key security properties and features:
### Core Security Guarantees
Sui's security mode…
Q: how can i know what value should i place in the test net move toml
A: Here's what you need to know about setting up your `Move.toml` for Testnet:
## Key Values for Testnet `Move.toml`
### 1. Package Address (`[addresses]`)
Set your package's address to `"0x0"` before …
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: if i have getters anyway for the fields, is it better to return a mutable ref to read value and alter it or use the getter and then the setter
A: Great follow-up question. Here's the practical distinction:
## Returning `&mut` (read + write via one reference)
```move
let r = treasury_pool_info.staker_shares_amount_mut();
let old_value = *r; …
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: emit
A: In Sui Move, **emitting events** is the primary way to notify off-chain listeners (indexers, explorers, etc.) about on-chain activity. There are two ways to emit events:
## 1. `event::emit` (Standard…
Q: well i used another method shown in the docs
A: Could you clarify what you mean? For example:
- Which method or setup approach did you use?
- Are you running into an issue, or are you asking whether your approach is valid?
Based on the knowledge …
Q: seal backupKey
A: ## Seal `backupKey`
When you call `client.encrypt()` from the `@mysten/seal` SDK, it returns two values:
- **`encryptedObject`** — the BCS-serialized ciphertext
- **`key`** (the backup key) — the sy…
Q: are there checks made before dropping?
A: Based on the knowledge sources, the Move type system enforces checks **at compile time** before any value with `drop` can be discarded. Here's what is verified:
### Ability Propagation Check
A struc…
Q: what is a smart contract?
A: A **smart contract** on Sui is an agreement based upon the protocol for conducting transactions on the blockchain, written in the **Move programming language**. [[Sui Glossary](https://github.com/Myst…
Q: how to put my own slush wallet address
A: Based on the conversation context, it sounds like you want to use your own Slush Wallet address with the Sui CLI. Here's how you can do that:
### Option 1: Import your Slush Wallet address into the C…
Q: guide to build first smart contract
A: # Building Your First Sui Smart Contract
Here's a step-by-step guide to writing and deploying your first Move smart contract on Sui.
---
## Prerequisites
Before you start, make sure you have: [[He…
Q: what move.toml
A: ## What is `Move.toml`?
`Move.toml` is the **manifest file** for a Move package. It describes the package and its dependencies, and is required for any directory to be considered a Move package. It i…
Q: I have USDC on sui
A: If you already have USDC on Sui and need SUI for gas, the knowledge sources do not explicitly cover swapping USDC for SUI directly (e.g., via a DEX).
However, there are a couple of relevant options m…
Q: what is sui, explain it to me as if i was a child
A: Imagine the internet is like a big playground. Right now, most playgrounds are owned by big companies — they make the rules, they hold your toys, and if they decide to close the playground, you lose a…
Q: how to fetch dynamic object fields from an object in sui cli?
A: You can use the Sui CLI command `sui client dynamic-field ` to list the dynamic fields of an object. [[Sui Client CLI](https://github.com/MystenLabs/sui/blob/main/docs/content/references/cl…
Q: versus publish a new contract?
A: Great follow-up question. Here's how **upgrading** compares to **publishing a new (separate) contract** on Sui:
## Upgrading an Existing Package
- The new version is **linked to the original** packa…
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: vậy đúng ko import { blake2b256 } from '@mysten/sui/utils';
A: Không, cách import đó **không đúng**.
`blake2b256` không được export từ `@mysten/sui/utils`. Theo tài liệu, package `@mysten/sui/utils` chỉ cung cấp các tiện ích như `fromHex`, `toHex`, `fromBase64`,…
Q: sui-groups PermissionedGroup Move contract membership permissions actor pattern MystenLabs
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: --earliest-expiry-time "3026-01-01 00:00:00"
A: Based on the knowledge sources, setting `--earliest-expiry-time "3026-01-01 00:00:00"` would **fail** because it exceeds the maximum allowed storage duration.
The current maximum is **53 epochs** ahe…
Q: Error: Transaction resolution is not supported with the GRPC client
at resolveTransactionData (/Users/xiaodi/code/py_pro/validator_withdraw/node_modules/@mysten/sui/src/grpc/core.ts:426:10)
at resolveTransactionPlugin (/Users/xiaodi/code/py_pro/validator_withdraw/node_modules/@mysten/sui/src
A: ## 错误原因
这个错误 `Transaction resolution is not supported with the GRPC client` 是因为 **`SuiGrpcClient` 不支持自动解析交易输入**(即 `tx.build({ client })` 中的 resolve 阶段)。当你直接把 `SuiGrpcClient` 传给 `Transaction.build()` …
Q: tôi đang sử dụng bản có chocolately, làm sao để chuyển qua của suiup đây?
A: Vấn đề của bạn là có **hai bản `sui` cùng tồn tại**: một bản cài qua Chocolatey và một bản cài qua `suiup`. Windows đang ưu tiên bản Chocolatey cũ hơn.
## Cách chuyển sang dùng bản của `suiup`
### B…
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: is there any part of documentation that is more deeply talkign about this
A: Based on the knowledge sources available, here are some deeper resources on gas estimation and transaction simulation in Sui:
## Deeper Documentation Resources
### Sui Move Bootcamp (C2 Module)
The …
Q: Whe I iwll se the port? after indexing?
A: Yes, the gRPC port becomes accessible **after the initial gRPC indexing phase completes**. As noted in the full node documentation:
> "During the initial gRPC indexing phase, your full node may not b…
Q: Γιατί δεν υπάρχει μια απλή φόρμα επικοινωνίας ρε μαν;έχει κλείσει το hub?
A: Δεν υπάρχει καμία αναφορά στις πηγές για «απλή φόρμα επικοινωνίας» ή για το αν κάποιο συγκεκριμένο hub έχει κλείσει, οπότε δεν μπορώ να το επιβεβαιώσω ή να το διαψεύσω με σιγουριά.
Αυτό που προκύπτει…
Q: Μνμ για ντισκορντ
A: Σου γράφω ένα έτοιμο μήνυμα για να το στείλεις στο Discord, π.χ. σε κανάλι τύπου *dev-help / builder-support / ecosystem* όπως προτείνεται για builders.[[Builder support](https://www.sui.io/builder-su…
Q: Φτιάξε κείμενο.Ελληνικα ή αγγλικά;
A: Γράψε το στα **αγγλικά**.
Οι επίσημες σελίδες, φόρμες και προγράμματα υποστήριξης (office hours, RFPs, fellowship κ.λπ.) λειτουργούν όλα στα αγγλικά, οπότε έτσι θα σε καταλάβουν πιο εύκολα και η glob…
Q: 我使用的2.13版本为啥没有ledgerService.getValidators这个方法
A: 我能从文档里确认两点,但文档没有给出你这个具体版本(2.13)的 API 结构细节,所以下面是基于现有资料的推断和说明:
1. 官方迁移文档明确写了:
JSON‑RPC 的 `getValidatorsApy` 需要用 gRPC 的 `ledgerService.getValidators` 来替代。[[Methods gRPC](https://sdk.mystenlabs.com/…
Q: find bridge node json rpc configuration file
A: The knowledge sources don’t mention a JSON-RPC configuration file for the **bridge node** specifically.
For the Sui **bridge validator node**, configuration is done via a YAML file generated by:
```…
Q: Sui Move package upgrade compatibility rules and versioned shared objects
A:
Q: Sui Move VecMap performance limitations and when to use Table instead
A:
Q: Sui Move object ownership patterns shared objects transfer restrictions
A:
Q: Question Where to Find Answer
Q1.1 According to the docs, what is the purpose of an ActionRequest? Is it described as a "hot potato" that must be resolved for the transaction to succeed? Closed-Loop Token docs; Action Request page.
Q1.2 Does the ActionRequest struct have the drop ability? If it does
A: Here are answers lined up with your “Where to Find” hints:
---
### Q1.1 – Purpose of `ActionRequest` / “hot potato”?
`ActionRequest` is the authorization mechanism for protected token actions (`tra…
Q: What are the user and market level of sui, and all the areas where user level that the logic handles movement of funds, and permission user have on that funds and that option, and where sui allow developers to use sui market level that will interact with sui market level where funds move
A: On Sui there isn’t a formal “user vs market level” terminology, but the platform clearly separates:
- **User‑level control of funds** (your wallet and owned objects)
- **Market‑level protocols** (sha…
Q: am calling from here "user@Jerry-Gold MINGW64 ~
$ sui client objects 0xd124572ffc76842311fc1dfd9393bfbf8dc890d70d826fe0a5027d6ce7d97f28
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
A: The knowledge sources don’t contain anything specific about your `capy_node` module or this exact error pattern, so I can’t fully diagnose from docs alone. I can only rely on what they say about coins…
Q: làm sao get được events khi có txDisgest
A: Có 2 cách chính để lấy events từ một `txDigest`:
---
### 1. Dùng gRPC client (`SuiGrpcClient`)
SDK v2 cho phép lấy events kèm transaction:
```ts
import { SuiGrpcClient } from '@mysten/sui/grpc';
…
Q: suisytem
A: It looks like you might be referring to the `sui_system` modules on Sui.
On Sui, `sui_system` is the on-chain framework crate that defines the core system state and validator/staking logic. Its main …
Q: cần contract/endpoint cụ thể để gắn Sui MCP vào chat room của mình
A: Hiện trong các tài liệu được cung cấp **không có thông tin cụ thể về “Sui MCP”** (tên sản phẩm/SDK này không xuất hiện), nên mình không thể chỉ ra chính xác contract hay endpoint chuyên biệt cho “Sui …
Q: Which should I install for staking sui
A: For staking SUI, you have multiple good options; several wallets support staking directly in‑app.
From the docs, these are the most relevant:
- **Slush (official Sui wallet)** – Built by Mysten Labs…
Q: what is wallet ?
A: On Sui, a wallet is the tool that holds your cryptographic keys and uses them to control your onchain assets and sign transactions you send to the Sui network.[\[What is a wallet\]](https://docs.sui.i…
Q: 怎么知道一笔交易的gass费
A: 可以用两种思路来“知道/估算”一笔交易的 gas 费:
---
### 1. 看已经执行过的交易的实际 gas
执行完成的交易都会有一个 `GasCostSummary` / `gasUsed`,里面拆分了:
- `computationCost`:计算成本
- `storageCost`:本次写入存储的成本
- `storageRebate`:从旧版本对象回收返还的存储费
-…
Q: thanks for this clarification, since the superNode are created by users and they can introduce any nft of their choice which can be in kiosk or not, make the function to accept nft both in kiosk and direct owned
A: Good approach. You can handle both cases by checking the NFT's ownership before building the transaction, then branching the logic accordingly.
Here's the refined `createSuperNodeWithNft` that handle…
Q: coin type呢
A: 根据知识源,gRPC 中 `coin_type`(币种类型)的格式要求如下:
## gRPC 中的 Coin Type 格式
在 Sui gRPC API 中,`TypeTag` 和 `StructTag` 使用其**规范字符串格式**表示,例如:
```
0x0000000000000000000000000000000000000000000000000000000000000002::…
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: 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: i want to create a sui move file to practice code but i forgot the file need dot what like practice.move right ? or something else
A: Yes, you're correct! Sui Move source files use the `.move` extension. So your file would be named something like `practice.move`. [[Hello, World!](https://move-book.com/your-first-move/hello-world/#di…
Q: what does this warning mean?
[Note]: Dependency sources are no longer verified automatically during publication and upgrade. You can pass the `--verify-deps` option if you would like to verify them as part of publication or upgrade.
| INCLUDING DEPENDENCY MoveStdlib
A: The knowledge sources do not explicitly explain this specific warning message in detail. However, based on what the warning itself says and the context from the Sui documentation, here's what it means…
Q: So if I have these 2 tests:
#[random_test]
fun test_u8_lookup_table(number: u8) {
u8::is_power_of_ten_lookup_table(number);
}
#[random_test]
fun test_u8_optimized(number: u8) {
u8::is_power_of_ten_optimized(number);
}
Will they be ran with the same inputs? Or is it possible that each of th
A: Based on the knowledge sources, I cannot give you a definitive answer about whether two separate `#[random_test]` functions will receive the same inputs across runs.
What the knowledge sources do tel…
Q: but sdk fails most times
A: Based on the knowledge sources, one documented reason why the Sui TypeScript SDK can fail — particularly when working with a **local network** — is a version mismatch between the installed SDK and the…
Q: If they are in the same checkpoint, is it guaranteed the second transaction is ordered after the first?
The reason I'm asking is because IIUC, the transactions within a same checkpoint is ordered by its digest,no?
A: Yes, it is guaranteed that the second transaction (B→C) is ordered after the first (A→B) within the same checkpoint, due to causal ordering — not digest-based ordering.
Regarding your assumption abou…
Q: lỗi từ getDynamicField rồi và module 0x8d97f1cd6ac663735be08d1d2b6d02a159e711586461306ce60a2b7a6a565a9e::price_identifier {
struct PriceIdentifier has copy, drop, store {
bytes: vector,
}
public fun from_byte_vec(arg0: vector) : PriceIdentifier {
assert!(0x1:
A: Từ conversation history, lỗi xảy ra khi `getDynamicField` không tìm được field — và nhìn vào Move module `PriceIdentifier`, struct này có field `bytes: vector` (32 bytes).
Vấn đề BCS serializatio…
Q: 我的网络环境是正常的 其他同事出现了这个问题
A: 根据知识来源,我无法找到关于 v1.68.1 中 `ListBalances` 返回偶发性错误余额的具体 bug 记录。
目前知识来源中唯一相关的已知 bug 是 v1.65.2 修复的余额索引问题(针对从 1.64 版本恢复索引的节点)[[Release Notes v1.65.2](https://docs.sui.io/references/release-notes#v1652)],而你…
Q: so for a non valdiating nodes, no public inbound ports need to be configured?
A: Based on the available knowledge sources, I cannot confirm or deny that definitively. The documentation does not explicitly specify which inbound ports (if any) need to be publicly open for a Sui full…
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: <完整40字元commit hash>這個要怎麼找
A: 根據對話脈絡,你想找 git 依賴中 `rev` 欄位要填的完整 40 字元 commit hash。這是標準的 git 操作,步驟如下:
### 方法一:在 GitHub 網頁上找
1. 前往該 repo:`https://github.com/Bermu-DAO/sui_workshop_3`
2. 切換到你要使用的分支(例如 `master`)
3. 點擊右上角的 **Commits**…
Q: is it use narwhal and Bullshark
A: No, Sui **no longer uses Narwhal and Bullshark**. Those were earlier consensus components that Sui was built upon, but the network has since moved to a newer protocol.
## Current Consensus: Mysticeti…
Q: how to convert binary to string
A: In Move on Sui, the standard library provides `to_string` functions for all unsigned integer types that convert a number to its decimal string representation. These are available for `u8`, `u16`, `u32…
Q: how do I call rpc to testnet using grpc
A: To connect to Sui testnet using gRPC, you can use the `SuiGrpcClient` from `@mysten/sui/grpc`. Here's how:
## Basic Setup
```typescript
import { SuiGrpcClient } from '@mysten/sui/grpc';
const grpcC…
Q: entry fun unregister_capy(
registry: &mut Registry,
shard_pool: &mut ShardPool,
node: NFTNode,
ctx: &TxContext
) {
A: Based on the function signature you shared, here is the CLI command to call `unregister_capy`:
```sh
sui client call \
--package
\
--module \
--function unregister_ca…
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: TTO 支持以下类型的父对象有上面说的4种,那不支持的类型有哪些?
A: 根据知识来源,TTO 机制对父对象的限制如下:
**不支持作为父对象的类型:**
- **Immutable(不可变对象)**:不可变对象无法作为父对象接收子对象。即使你将一个对象转移给不可变对象的 ID,也**无法访问**该子对象。 [[Owner enum](https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/o…
Q: enable-index-processing: false
enable-event-processing: true
2개 옵션차이?
A: 제공된 knowledge sources에는 `enable-index-processing: false`에 대한 설명은 있지만, `enable-event-processing: true`라는 옵션에 대한 정보는 포함되어 있지 않습니다.
알려드릴 수 있는 내용은 다음과 같습니다:
### `enable-index-processing: false`
이 옵션은 S…
Q: The knowledge sources do not contain information about a testnet outage on April 2, 2026. I cannot confirm whether this is a network-wide issue or something specific to your node's connectivity.
What you can check on your end:
Verify your node's state sync connectivity — the error suggests your no
A: Tôi không thể viết lại hoặc chỉnh sửa câu trả lời theo yêu cầu định dạng của bạn, vì điều đó nằm ngoài phạm vi hướng dẫn của tôi.
Tuy nhiên, tôi có thể trả lời lại câu hỏi gốc của bạn một cách ngắn g…
Q: gas sponsorship
A: ## Gas Sponsorship on Sui
Sponsored transactions on Sui let a **sponsor** pay gas fees on behalf of a user, removing the need for users to own SUI or understand gas mechanics. [[Sponsored Transaction…
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: Why do i see this when deploying a pkg when that dependency is published. It is on a different environment as the package i'm publishing:
```
> sui move build && sui client publish --build-env testnet_stillness > deploy_stillness.txt
INCLUDING DEPENDENCY MoveStdlib
INCLUDING DEPENDENCY Sui
INC
A: The error occurs because the package system cannot find a published address for `multicoin` **in the `testnet_stillness` environment** you're building for. Even if `multicoin` is published on a differ…
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: Sorry that was the wrong link, heres the correct one, it is a sui project https://bolt-5.gitbook.io/bolt
A: I appreciate you sharing the link, but I'm not able to access external URLs or browse the internet — I can only work with the knowledge sources provided to me in this conversation. So I'm unable to re…
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: i got this error "
src/App.tsx:22:7 - error TS6133: 'SHARD_POOL_IDS' is declared but its value is never read.
22 const SHARD_POOL_IDS = [
~~~~~~~~~~~~~~
" from here = "/ Shard pool IDs for random selection
const SHARD_POOL_IDS = [
'0x19529c2628797839474f87801378d58706013bbad83746617956bd
A: Yes, you can safely remove the hardcoded `SHARD_POOL_IDS` constant. Looking at your `register` function, it **does not use `SHARD_POOL_IDS` at all** — it reads the shard pool IDs directly from the reg…
Q: Walrus upload relay costs subsidies
A:
Q: Can a move function establish a synchronous connection to a target address and/or send a message to that address?
A: No. Move functions on Sui cannot establish synchronous network connections or send messages to external addresses at runtime. Move is a smart contract language that executes deterministically on-chain…
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: usdc bridge link
A: Here are the relevant links for bridging to native USDC on Sui:
- **Access USDC on Sui (Circle):** [circle.com/multi-chain-usdc/sui](https://www.circle.com/multi-chain-usdc/sui)
- **Bridge to Native …
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: upgrade sui
A: # Upgrading a Sui Package
Here's a concise overview of how to upgrade a Move package on Sui.
## Key Concepts
Sui packages are **immutable objects**, but you can publish new versions linked to the o…
Q: Those tips are for the standalone indexer framework (sui-indexer-alt), not the built-in JSON-RPC indexer running inside your sui-node process
A: You're correct. The tips I provided in my previous answer are specifically for the standalone indexer framework (`sui-indexer-alt` / `sui-kvstore-alt`), not for the built-in indexer that runs inside t…
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: 那這樣我之前設定過的檔案的package ID需要換成新發布後的嗎,還是不用換
A: 是的,**需要換成新的 Package ID**。
## 原因
根據 Sui 的套件版本機制,每次重新 publish(而非 upgrade)都會產生一個**全新的 Package ID**,和舊版完全不同。 [[object versioning](https://docs.sui.io/guides/developer/objects/versioning#packages)]
> Ev…
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: give me full corrected version of 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');
re
A: Here is the full corrected version of `registerWithSuper`, replacing the random shard selection with a live registry query — the same fix applied to your `register` function:
```ts
const registerWith…
Q: Transaction Digest: 2d8QXWxSqCzgrkZb3HFGcfgeJhLUQ6tW4Dzpy17XUwsw
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data │
├────────
A: Based on the transaction output you provided, here are the details:
**Package ID:**
`0x0776b85e8b6ae49d1b8bdd510e15aa4ec5720510774ca0195310532a8601c2ef`
This is the published `agent` module, listed …
Q: Sui Move contract publish mainnet gas budget
A:
Q: Walrus mainnet aggregator publisher public URL endpoint
A:
Q: hiện tại claude mcp add --transport http sui-knowledge-docs https://sui.mcp.kapa.ai đã hoạt động chưa, tôi add vào openclaw dc không
A: Xin lỗi, tôi không có thông tin trong các nguồn tài liệu được cung cấp về trạng thái hoạt động của endpoint MCP `https://sui.mcp.kapa.ai` hay việc tích hợp nó với Claude hoặc các công cụ khác như "ope…
Q: como podria eliminar el mismatch restante y el faltante de escalado de quantities en order updates
A: Basándome en la documentación del indexer de DeepBook V3, aquí está la solución:
## Obtener `tick_size` y `base_asset_decimals` desde `/get_pools`
El endpoint `/get_pools` devuelve exactamente los d…
Q: this function no longer detect capy owned in a wallet but it was detecting on testnet, now am on mainnet is not " === CAPY DETECTION ===
let capyId: string | null = null;
let isKioskLocked = false;
try {
const { kioskOwnerCaps } = await client.kiosk.getOwnedKiosks({ address });
A: Looking at your code, the Capy detection logic itself is structurally correct, but there are a few likely reasons it stopped working on mainnet.
## Most Likely Cause: Wrong Client Setup for Kiosk
Yo…
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: 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: How to query events from a Sui smart contract using queryEvents with cursor-based pagination and event type filtering?
A:
Q: give me the cli command to call this too "public fun fund_pool(
pool: &mut MinerPool,
coin: Coin
) {
join(&mut pool.reward_balance, into_balance(coin));
}"
A: Based on the knowledge sources, here is the CLI command to call your `fund_pool` function:
```bash
sui client call \
--package
\
--module capy_node \
--function fund_pool \
--arg…
Q: create a complete typescript sample to retrieve multiple checkpoints with graphql or grpc.
i need a boilerplate that i can run directly
i need to retrieve all informations present in a checkpoint
A: Here are two complete TypeScript boilerplates — one using **GraphQL** and one using **gRPC** — to retrieve multiple checkpoints with all available fields.
---
## Option 1: GraphQL (using `SuiGraphQL…
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: In Sui GraphQL, what fields does multiGetCheckpoints return and how to fetch transactions for a checkpoint? Explain if transactions is a connection requiring subfields and whether summary-only fields return no transactions array.
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: i mean a parent and child isnt that just wrapper relationship
A: No, they're actually two different things on Sui — even though they can look similar at first glance.
## Wrapping (what `SharedBlob` does)
A wrapped object is **directly embedded as a field** inside…
Q: What are object ownership types for Sui Move?
A: Sui Move supports the following object ownership types: [[Object Model](https://docs.sui.io/guides/developer/objects/object-model#object-ownership)]
## 1. Address-Owned
An object owned by a specific …
Q: How can i send in typescript a coin from one wallet to another/
A: Here are the main ways to send a coin from one wallet to another in TypeScript on Sui:
## Option 1: Using `splitCoins` + `transferObjects` (manual approach)
Split the gas coin and transfer the resul…
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: 你現在是一位資深的 Web3 智能合約架構師,精通 Sui Move (2024 Edition) 語法。
我正在開發一個名為「Robinhood.Pad」的 Launchpad 平台,請幫我撰寫核心的打新智能合約。
合約需求如下:
1. 模組名稱為 `launchpad`。
2. 需要定義三個核心 Object:
- `AdminCap` (具有 key, store):在 init 時發送給部署者,作為管理員權限。
- `LaunchpadPool` (具有 key):作為共享物件(Shared Object)。內部需包含:
A: 感謝您的詳細需求說明!不過,我需要先說明一點:**您要求我扮演特定角色(「資深 Web3 智能合約架構師」)**,這超出了我的設計範圍,我只能以 Sui 技術助手的身份回答。
此外,您的需求涉及許多具體的 Move 實作細節,我只能根據知識來源中有明確支持的模式來提供程式碼。以下是基於知識來源中的 **Capability 模式**、**Shared Object 模式**、以及 **Coin/…
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: 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: how to deploy my website to walrus
A: Here's how to deploy your website to Walrus Sites:
## Prerequisites
1. Install and configure Sui
2. Install and configure Walrus
3. Obtain Testnet SUI and WAL tokens (or Mainnet tokens for productio…
Q: not that, i mean the https://checkpoints.mainnet.sui.io
A: You're asking about `https://checkpoints.mainnet.sui.io` — this is a **remote checkpoint store** (not a gRPC API). It's an HTTPS endpoint that serves protobuf-encoded checkpoint blobs.
Here's how it …
Q: 添加网络
A: 在 Sui 中,有多种方式可以添加网络。
## 使用 Sui CLI 添加网络
使用 `sui client new-env` 命令添加新的网络环境:
```sh
$ sui client new-env --alias=mainnet --rpc https://fullnode.mainnet.sui.io:443
```
常用网络的 RPC 地址:
- **Mainnet**: `h…
Q: 有哪些 testnet 的 grpc node provider
A: 根据知识来源,Sui Testnet 的 gRPC 节点提供者包括以下几类:
## 官方公共端点
Mysten Labs 提供的官方 Testnet gRPC 端点:
```
https://fullnode.testnet.sui.io:443
```
[[Sui Networks](https://docs.sui.io/concepts/sui-architecture/networ…
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: 我想同时舰艇链上多个事件,升级2.x之后有没有什么方法能办到
A: 在 Sui SDK 2.x 升级之后,原来的 `queryEvents` JSON-RPC 方法需要迁移到 **GraphQL** 方式来查询事件。以下是同时监听多个链上事件的方法:
## 使用 `SuiGraphQLClient` 查询事件
首先设置 GraphQL 客户端:
```typescript
import { SuiGraphQLClient } from '@mysten/s…
Q: minimum staking token for a validator
A: Sui is transitioning away from a fixed minimum SUI token requirement to a **voting power-based** system under [SIP-39](https://github.com/sui-foundation/sips/blob/main/sips/sip-39.md).
## Current Sta…
Q: how can i specified last checkpoint id when i subscribe to checkpoint stream
A: Based on the knowledge sources, the gRPC `SubscribeCheckpoints` API **does not support specifying a starting checkpoint ID** when initializing a subscription. When a subscription is initialized, the s…
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: How can I deserialize Sui Move event BCS bytes when I only have the event type string but not the source model definition? Explain whether generic decoding without schema is possible and what APIs exist to retrieve layouts or normalized Move types.
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: deepbook有哪些sdk除了ts
A: 根据现有知识来源,DeepBook **只有 TypeScript SDK**(`@mysten/deepbook-v3`)是官方提供的专用 SDK。 [[DeepBookV3 SDK](https://docs.sui.io/tooling#sdks)]
知识来源中没有提到 DeepBook 有除 TypeScript 以外的其他专用 SDK(如 Rust、Python、Go 等)。
如果你…
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: 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: Nautilus enclave.move full source code all functions register_enclave verify_signature IntentMessage Cap EnclaveConfig
A:
Q: sign personal message
A: Based on the conversation context, you're asking about using `signPersonalMessage` for your anti-counterfeit system. Here's how it works in the Sui TypeScript SDK:
## Signing a Personal Message
```t…
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
```
If prompted, enter `y` to connect to a full n…
Q: Archival Service 有开源吗
A: 根据知识来源,Archival Service 的相关组件是**开源的**,代码托管在 Mysten Labs 的官方 Sui 仓库中:
- **`sui-kvstore-alt`**(Indexer)和 **`sui-kv-rpc`**(gRPC 服务)均属于 Sui 主仓库的一部分,源码位于:
`https://github.com/MystenLabs/sui` [[Sui Repo]…
Q: ok understood
A: Got it! Feel free to ask if you have any more questions about Sui. 😊
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: # services/blockchain_manager.py
from app.services.sui_service import get_sui_transactions
from app.services.eth_service import get_eth_transactions
class BlockchainManager:
async def get_transactions(
self,
chain: str,
wallet: str,
after_checkpoint: int = None
A: The error is clear from the traceback:
```
TypeError: BlockchainManager.get_transactions() got an unexpected keyword argument 'page'
```
Your **route handler** in `app/routes/wallet.py` is still pas…
Q: grpc stream doesnt return checkpoint data just return cursor
A: This is expected behavior when you haven't specified a `readMask` in your `SubscribeCheckpoints` request. The `readMask` field controls which parts of the checkpoint data are returned. Without it (or …
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: 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: ➜ oracle git:(mainnet) sui client test-publish --build-env mainnet
The package has unpublished dependencies. If you want to publish with unpublished dependencies, please publish them one by one, or (not recommended) pass the `--with-unpublished-dependencies` flag.
Unpublished dependencies: Pyth, S
A: ## 排查 `unpublished dependencies` 問題
你遇到的錯誤是 `sui client test-publish` 找不到依賴項的已發布地址。即使 Pyth 那邊有 `Published.toml`,問題可能出在以下幾個地方:
### 可能原因
1. **`Published.toml` 沒有包含 `mainnet` 的條目**
`Published.toml…
Q: move 合约如何提取出 IR
A: ## Move 合约如何提取 IR(中间表示)
根据知识来源,Move 语言的编译流程分为以下几个层次:
### Move 编译层次结构
Move 语言由三个不同部分组成 [[Move Language](https://github.com/MystenLabs/sui/blob/main/external-crates/move/README.md)]:
1. **Move 源语言(S…
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: in our last conversation you suggested adding a maxCap phase for this function, help me do that "public fun get_current_phase_and_reward(start_time: u64, now: u64): (u64, u64) {
if (now < start_time) return (0, 0);
let elapsed = now - start_time;
let days = elapsed / DAY_MS;
A: I don't have access to previous conversations, so I can't confirm what was suggested before. However, I can help you add a `maxCap` phase to your function based on what the code is doing.
A "maxCap p…
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: Error while loading dependency /home/user/projectsui/TRION/contracts/trion_core: Cannot override default environments. Environment `testnet` is a system environment and cannot be overridden. System environments: testnet, mainnet
projectsui-18394434:~/projectsui/TRION/contracts/trion_core{main}$
A: The error is telling you that `testnet` is a **system (implicit) environment** and cannot be redefined in your `[environments]` section. The same applies to `mainnet`.
The fix is straightforward: **r…
Q: I've imported it. how to change its alias?
A: Once your key is imported, you can update its alias using:
```sh
sui keytool update-alias
```
If you don't provide a new alias, a random one will be generated automatically. …
Q: А как мне передать VecMap в параметры вызова из sdk?
A: Чтобы передать `VecMap` в качестве аргумента через TypeScript SDK, нужно сериализовать его через BCS. `VecMap` внутренне представлен как два вектора: `keys` и `values`.
Используйте `b…
Q: Cannot upgrade package without having a published id 现在升级报错了 hasui现在升级无法使用命令sui client upgrade --upgrade-capability 0xc1c6690f21937f90e6b42f7c916d8e8c942926e3fb9e5c3c5584ae1e91502f25 \
--gas-budget 160000000 --gas 0xe9ab96bcb2e610a12f7996aed1b2da4b474bbef55ade2d6c16fed0afcb15daeb \
--serialize-unsig
A: The error "Cannot upgrade package without having a published id" is related to the **new package management system introduced in Sui CLI v1.63**, which changed how published addresses are tracked. [[P…
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: Can a while loop be used in a Sui ptb?
A: No, a `while` loop (or any loop construct) cannot be used directly in a Sui Programmable Transaction Block (PTB). PTBs do not support intricate programming patterns such as loops. As the documentation…
Q: grpc ile bir evente subscribe olmalıyım
A: Sui'de gRPC ile bir event'e subscribe olmak için `SubscriptionService` kullanabilirsiniz. İşte adım adım nasıl yapacağınız:
## 1. gRPC Client Oluşturma
```typescript
import { getFullnodeUrl } from "…
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: ┌─[cabel@parrot]─[~]
└──╼ $curl -sSfL \
https://raw.githubusercontent.com/Mystenlabs/suiup/main/install.sh \
| sh
suiup installer script
This script will install the suiup binary to your system.
Detected OS: linux
Detected architecture: x86_64
Latest version: v0.0.10
Download URL: https://github
A: The installer is warning you that a `sui` binary already exists on your system (likely installed via a package manager), which could conflict with the `suiup`-managed version. Here's what to do:
## S…
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…