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: On-chain reputation system and identity score for DeFi lending on Sui
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: 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, I can see **two problems** that are still present:
1. **`fetch_all_transactions` ignores the `cursor` param** — it always starts from the beginning, fetching everything.
2. **`c…
Q: How does Sui handle randomness on chain and can smart contracts use VRF for lottery-style selection?
A:
Q: What is SEAL on Sui and how does it provide decentralized secrets management or threshold encryption?
A:
Q: How does coinWithBalance resolve SUI coins when fundsInAddressBalance is zero? What causes "Invalid withdraw reservation" errors?
A:
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: 使用 normalizeSuiAddress 之后,加了 0x 前缀,但是全变成小写了:0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29::usdc::usdc,这样会导致链上查询不到精度吗?
A: 根据知识来源中的信息,地址本身是**大小写不敏感**的:
> "Addresses are case insensitive."
[[Address concepts](https://move-book.com/concepts/address/)]
所以 `0xa1ec7fc00a6f40db9693ad1415d0c193ad3906494428cf252621037bd7117e29…
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: 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: 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: what about I will build the back-end, which will link to the database(for off-chain) and the contracts on Sui
A: Great approach! This is actually the **recommended architecture** for production Sui dApps — a hybrid system where your backend bridges offchain data (database) with onchain state (Sui contracts).
##…
Q: ptb 是什么,有什么优势
A: ## PTB(Programmable Transaction Block)是什么?
PTB(可编程交易块)是 Sui 上所有用户交易的基本形式。它由一组**命令(Commands)**组成,这些命令按顺序执行,共同完成一笔交易。[[什么是 PTB](https://docs.sui.io/guides/developer/transactions/ptbs/prog-txn-blocks)]
…
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: 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: gas cost = computation cost + storage cost − storage rebate
this equation, where it is
A: This equation represents the **net gas fees** formula on Sui. Specifically, it appears in the storage rebates section of Sui's gas fee documentation:
```
net_gas_fees = computation_gas_fee + storage_…
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: calc gas Budget by simulateTransaction
A: ## Estimating Gas Budget via Transaction Simulation
You can simulate a transaction before executing it to get accurate gas cost estimates without spending real SUI. There are several ways to do this:…
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: Security best practices
A: Here's a summary of security best practices across different areas of the Sui ecosystem:
---
## Network & Validator Security
Sui maintains all security properties as long as over 2/3 of validators …
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: 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: Που έχει πληροφορίες για το athens hub
A: Μπορείτε να βρείτε πληροφορίες για το **SuiHub Athens** στο επίσημο blog του Sui. [[SuiHub Athens](https://blog.sui.io/suihub-athens-opens/)]
Συγκεκριμένα, το άρθρο καλύπτει:
- **Τοποθεσία**: Στεγάζ…
Q: graphQl quert events 可以sort嗎?
A: 目前提供的文件裡,沒有提到 `events` 這個 GraphQL query 支援任何 `order` / `sort` 之類的參數,只列出了:
```graphql
events(
first: Int
after: String
last: Int
before: String
filter: EventFilter
): EventConnection
```
也…
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: Sui Move smart contract security best practices and common vulnerabilities
A:
Q: please make expected_income_for_referrers.length().do! ... instead of the while loop
A: You can use the `do!` macro on the length (a `u64`) and index into the vector. This avoids cloning and matches the “Loops → Macros” style.[[Loops–macros](https://move-book.com/guides/code-quality-chec…
Q: initial share version
A: The knowledge sources you provided don’t mention anything called an **“initial share version”** (or similar term) in the context of DeepBookV3 pools or Sui generally, so I can’t give a precise definit…
Q: db-path: /opt/sui/db/authorities_db
db-path: /opt/sui/db/consensus_db
command used
sui-tool download-formal-snapshot --latest --genesis "/opt/sui/config/genesis.blob" \
--network mainnet \
--path /opt/sui/db --num-parallel-downloads 50 --no-sign-request
error logs
ubuntu@sui-mainnet:
A: Your `db-path` is:
```text
db-path: /opt/sui/db/authorities_db
db-path: /opt/sui/db/consensus_db
```
but you restored the formal snapshot into:
```text
--path /opt/sui/db
```
For a validator, the …
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: 继续介绍Sui的Coin 和 Token的异同点。各自使用的场景?是否可以全部用Token来替代Coin?Coin除了SUI币,主网有没有其他的广泛使用的案例?
A: ## Sui 上的 `Coin` 与 `Token` 对比
### 核心异同点
| 对比维度 | `Coin` | `Token` |
|---|---|---|
| **Abilities** | `key + store` | 仅 `key` |
| **可包装(Wrappable)** | ✅ 支持 | ❌ 不支持 |
| **可自由转账** | ✅ 默认支持 |…
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: I would like to know what's the fastest way to build on DeepBook
A: The fastest way to build on DeepBook is to use the **DeepBookV3 TypeScript SDK** (`@mysten/deepbook-v3`), which abstracts away the complexity of transaction calls and building Programmable Transaction…
Q: Αρα αν έχεις latest SDK + coinWithBalance transfers + do not select coins manually no changes needed
A: Ναι, αυτό είναι σωστό. Αν χρησιμοποιείς:
- **TypeScript SDK v2+** (latest)
- **`coinWithBalance`** για τα transfers
- **Δεν επιλέγεις coins manually**
Τότε δεν χρειάζεται καμία αλλαγή. Το SDK αυτόμα…
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: 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: 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: 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: 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: 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: 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: Cloudflare Workers WASM WebAssembly support bundling esbuild
A:
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: 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 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: 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: 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: 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 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: 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: 如果 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: 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: can any node operator change the zklogin protocol config max epoch?
A: Based on the knowledge sources, the answer is **no** — individual node operators cannot unilaterally change the zkLogin protocol config `max_epoch` setting. Here's what the sources do and don't say:
…
Q: Sui normalized move module RPC getNormalizedMoveModule getNormalizedMoveStruct dynamic event BCS decoding from event type and on-chain package layout.
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: 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: 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: Error%20checking%20transaction%20input%20objects:%20Balance%20of%20gas%20object%204581376%20is%20lower%20than%20the%20needed%20amount:%208729100 帮翻译成string
A: 这个错误信息的中文翻译如下:
**"检查交易输入对象时出错:gas 对象的余额 4,581,376 低于所需金额:8,729,100。"**
即你用于支付手续费的 gas coin 余额不足,无法完成本次交易。解决方法是充值更多 SUI 到你的钱包,或在测试网通过水龙头获取测试币。 [[Common Errors](https://docs.sui.io/guides/developer/co…
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: 我现在使用的2.13.2版本的 @mysten/sui,我在比如OKX钱包中打开我的dapp页面做签名的时候,比如签名成功后,本来应该拿到交易哈希的,但是在这种钱包里打开做完签名会获取不到签名的结果,这是为什么?签名使用的signAndExecuteTransaction方法
A: ## 关于 `signAndExecuteTransaction` 获取不到结果的问题
根据知识库中的信息,这个问题很可能与**钱包兼容性**和**返回值处理方式**有关。
### 可能的原因
#### 1. 返回值是联合类型(Union Type),需要正确解包
在新版 SDK 中,`signAndExecuteTransaction` 的返回值是一个**判别联合类型**(discrim…
Q: # services/sui_service.py
import asyncio
import httpx
from datetime import datetime, timezone
from app.services.normalizer import normalize_sui_transaction
GRAPHQL_URLS = [
"https://graphql.testnet.sui.io/graphql",
"https://sui-testnet.mystenlabs.com/graphql",
]
# -----------------------
A: Looking at your code, here's a breakdown of how you're using the transaction digest and other Sui GraphQL concepts:
## ✅ Where You're Using the Digest
**1. Fetching transaction details** — You use t…
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: 不是某个地址的,而是在链上扫描
A: 根据现有的知识来源,我没有找到关于**全链扫描所有含 `Balance` 的 Object**(不限于某个地址)的直接 API 或方法。
知识来源中提供的查询方式均基于**特定地址**(owner)来获取其拥有的余额或对象,例如:
- `client.core.listBalances({ owner: '0xabc...' })` [[Core API](https://sdk.mys…
Q: want to know how to convert the funds in an address (`fundsInAddressBalance`) into a Coin object<0x2::sui::SUI>.
A: To convert funds held in an address balance (`fundsInAddressBalance`) into a `Coin<0x2::sui::SUI>` object, you use `tx.withdrawal()` combined with `0x2::coin::redeem_funds`.
## TypeScript SDK
Use `t…
Q: In the sui-rust-sdk, is there something similar to the keystore of the sui-sdk for loading keys and signing?
A: The knowledge sources don't contain enough detail about the Sui Rust SDK's keystore equivalent to give a fully confident answer. However, based on what is available, here's what the sources do show:
…
Q: 新版沒有addresses 那以前要用@fee_address 那種該怎麼辦。
A: 在新版套件管理系統中,`[addresses]` 區段已被移除。以前用 `@fee_address` 這類具名地址的方式,在新系統中需要改變做法。
根據文件說明,新系統的命名規則如下:
> **套件的名稱來自 `[package]` 區段或 `[dependencies]` 區段中給定的名稱**,而不再來自 `[addresses]` 區段。
[[Package Migration](htt…
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: 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: 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: 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: Transaction resolution failed: MoveAbort in 5th command, abort code: 0, in '0xeef9dd622a37cbb614f06faa83abfb870eebc50a4c997ba0d2d86171123c0a08::deposit::deposit' (line 24)
A: The error you're seeing is a **Move abort** that occurred in the 5th command of your transaction, specifically in the `deposit` function of module `0xeef9...::deposit` at line 24, with **abort code `0…
Q: but i have updated my package but my Published.toml is messed up
A: If your `Published.toml` has incorrect or inconsistent data after an upgrade, here are some things to consider based on the available documentation:
## If You're on the New Package System (Sui CLI v1…
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: Explain this party thing well I dont understand
A: ## Party Objects in Sui — Explained Simply
Think of a **Party object** as a special type of object ownership that sits between two existing types you may already know:
---
### The Two Existing Type…
Q: For Slush detection** — ask the Sui docs AI these exact questions:
```
1. How does Slush wallet register itself with the
Wallet Standard on a plain HTML website (no React,
no dApp kit)? What window event or global object
should I listen for?
2. What is the exact window object name or ev
A: Here's what the knowledge sources tell us about each of your questions:
---
## 1. Registering Slush Wallet with the Wallet Standard (no React/dApp Kit)
For the **Slush web wallet** specifically, yo…
Q: I have a Move package that I will publish on testnet simply with the cli, but will publish on mainnet with the help of the security team via their multisig process (I will provide them with the tx-bytes and they will execute them)
I would like to register that package on MVR. (both for testnet and
A: The knowledge sources provided don't contain enough detail about the MVR registration process itself (the specific steps, what capabilities are required, whether the `UpgradeCap` is needed for MVR reg…
Q: 我想用graphql的方式查询suiNS名字,该怎么查?
A: 根据知识库,使用 GraphQL 查询 SuiNS 名称有以下两种方式:
## 1. 地址 → 默认 SuiNS 名称
使用 `address` 查询的 `defaultSuinsName` 字段:
```typescript
import { SuiGraphQLClient } from '@mysten/sui/graphql';
import { graphql } from '@m…
Q: 你把上面转成TS的,给我描述一下prompt,我让其他AI工具给我生成
A: Here is a prompt you can give to another AI tool to generate the TypeScript code:
---
**Prompt:**
Write a TypeScript script using the `@mysten/sui` SDK to withdraw SUI from a Sui address balance (n…
Q: rpc
A: ## Sui RPC Overview
Sui provides multiple RPC interfaces for accessing blockchain data:
### Available Interfaces
1. **gRPC API** (recommended) — A high-performance, type-safe interface using Protoc…
Q: Pure PTB execution + bridge treasury interaction
A: ## PTB Execution & Bridge Treasury Interaction on Sui
### Programmable Transaction Block (PTB) Execution
A PTB is composed of two parts: **inputs** and **commands**. [[What is a PTB?](https://docs.s…
Q: bridge_seq_num (different BridgeMessageKey
A: ## `bridge_seq_num` in `BridgeMessageKey`
In Sui's native bridge, `BridgeMessageKey` is a struct used to uniquely identify a bridge message. It has three fields:
```move
public struct BridgeMessageK…
Q: 基本的なmoduleの分け方をおしえて
A: Sui の Move における基本的なモジュールの分け方について説明します。
## モジュールの基本原則
**1オブジェクト・1データ構造につき1モジュール**を設計の基本とします。バリアント構造体がある場合も、複雑さやバグを避けるために独自のモジュールを持つべきです。 [[Move Best Practices](https://docs.sui.io/guides/developer/mo…
Q: how to Use the Clock object (0x6) to monitor epoch changes
A: The `Clock` object at `0x6` provides the **current time in milliseconds**, but it does **not** directly expose epoch information. However, you can combine it with epoch data from `TxContext` to monito…
Q: Sui transaction deferral consensus handler randomness limit deferral rounds congestion control
A:
Q: sui graphql url
A: Here are the Sui GraphQL RPC endpoint URLs:
| Network | URL |
|---------|-----|
| **Mainnet** | `https://graphql.mainnet.sui.io/graphql` |
| **Testnet** | `https://graphql.testnet.sui.io/graphql` |
|…
Q: # sui client switch --env testnet
sui client publish --build-env testnet --gas-budget 200000000
Active environment switched to [testnet]
[NOTE] Updating dependencies for `testnet` environment because "./Move.toml" has been changed since the last update.
The package has unpublished dependencies. If y
A: The error persists, which suggests the `dep-replacements` configuration isn't being picked up correctly. Let me address your question about `--with-unpublished-dependencies` first, then help you fix t…
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: when i found that epoch cannot finalize due to unbounded randomness tx! is this a bug? how does epoch works
A: Based on the knowledge sources available, I can explain how epoch transitions work on Sui and address your concern.
## How Epoch Transitions Work
Epoch changes occur approximately every 24 hours. Th…
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 what i have
[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: Looking at your `Move.toml`, the structure looks mostly correct for the new-style format. However, there are a couple of things to address:
## Issues to Fix
### 1. The `rev = "main"` for your git de…
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: 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. If prompted, enter `y` to connect to …
Q: 现在sui的市值是多少
A: 非常抱歉,我的知识来源中没有包含 SUI 代币当前市值的实时数据。市值是动态变化的,需要查看实时数据。
建议您通过以下渠道查询 SUI 的最新市值:
- [CoinGecko](https://www.coingecko.com)
- [CoinMarketCap](https://www.coinmarketcap.com)
- [DefiLlama](https://defillama.co…
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: Can you explain what does the copy ability do?
A: ## The `copy` Ability in Sui Move
The `copy` ability allows values of a type to be **duplicated or copied**. Without it, Move types are linear by default — meaning they can only be moved, not copied.…
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: 我的 签名方法时这样的const { mutateAsync: signAndExecuteTransaction } = useMutation({
mutationFn: (tx: { transaction: Transaction }) =>
dAppKit.signAndExecuteTransaction(tx),
});,是2.6版本的,请问在调用签名时,我想知道balance变化,该怎么用?
A: 根据知识来源,您使用的是 `dAppKit.signAndExecuteTransaction`(dApp Kit Actions 方式),该方法的返回值结构如下:
```typescript
type TransactionResult =
| { $kind: 'Transaction'; Transaction: Transaction }
| { $kind: 'FailedTr…
Q: Archival Service 裡面查詢的到 events 嗎?
A: 根據現有的知識來源,Archival Service 主要支援以下資料的點查詢(point lookups):
- **交易(transactions)**
- **檢查點(checkpoints)**
- **物件(objects)**
- **Epoch 資料**
[[Archival Store concepts](https://github.com/MystenLabs/sui/bl…
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: explain the typed witness pattern
A: ## The Witness Pattern in Move (Sui)
The **witness pattern** is a way to prove a certain property at the type level by constructing a proof value. In Move on Sui, a module proves ownership of a type …
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 fast is a sui confirmation
A: Sui transaction confirmation speed depends on the type of transaction:
- **Owned object transactions** (no shared objects): Finality is reached in **under 0.5 seconds**. The sender receives a validat…
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. If prompted, enter `y` to connect to …
Q: Okay, I get it. I can only use address balances and my frontend and stuff. I could then create a P2B and convert them all within the same user experience. They won't know really what's going on. Will this increase scalability and speeds?
A: Yes, using a PTB (Programmable Transaction Block) on the frontend to handle the address balance conversion transparently to the user is a valid approach, and the knowledge sources do confirm scalabili…
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: what's a computation bucket?
A: Sui uses a **bucketing mechanism** to calculate computation gas costs. Rather than charging the exact number of computation units a transaction uses, Sui groups transactions into predefined ranges (bu…
Q: 怎样铸造一个nft 有模版吗
A: ## 在 Sui 上铸造 NFT
在 Sui 上,每个对象天生就是唯一的、不可替代的,因此创建 NFT 比其他区块链更直接。
### 基础 NFT 模版
Sui 提供了一个基础的 NFT 示例,定义了一个包含 `id`、`name`、`description` 和 `url` 字段的 `TestnetNFT` 结构体。任何人都可以调用 `mint_to_sender` 函数来铸造 NFT,该…
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: 我要mint一个nft 应该用哪个合约 有模版吗
A: 在 Sui 上 mint NFT,官方提供了一个标准的模版合约 `TestnetNFT`,非常适合入门使用。
## 标准 NFT 模版
NFT 结构体定义如下,包含 `id`、`name`、`description`、`url` 四个字段:
```move
public struct TestnetNFT has key, store {
id: UID,
name: Str…