专家问答
向Move社区的专家提问
帖子
85- 专家问答hohm40Feb 17, 2025
How to fix 'UnusedValueWithoutDrop' error in PTB function?
I'm trying to create a contract interaction function similar to a given transaction hash but face an error during execution. The error message is UnusedValueWithoutDrop { result_idx: 0, secondary_idx: 0 }. It appears in the dry run result of the PTB function. I suspect it might be due to an object not being properly handled by the end of the transaction. I attempted to use MoveCall, but I'm not sure if my approach is correct. Can someone advise me on correctly handling this issue?
- Move CLI
- Move
11 - 专家问答mssoni30Feb 17, 2025
How to resolve CommandArgumentError with tx failed issue?
I've been trying to execute a transaction using the CommandArgumentError { arg_idx: 1, kind: InvalidBCSBytes } error. Here's the snippet I used: const tx = new Transaction(); const [newCoin] = tx.splitCoins( tx.object(coinObjectId), [1000] ); tx.transferObjects([newCoin], tx.pure.string(wallet.address || "")); tx.setGasBudget(750000); const result = await wallet.signAndExecuteTransaction({ transaction: tx, }); I've tried using tx.pure.u64 but it didn't help. Any solutions?
- Move CLI
11 - 专家问答doodee37Feb 17, 2025
How to properly pass BCS serialized struct parameters in Sui?
I've been trying to pass BCS serialized struct parameters to a move module in the Sui blockchain, but I'm hitting an InvalidUsageOfPureArg error. Can Sui handle BCS serialized struct parameters directly, or do I need to create a struct object first and pass it to the move module? How should I structure my code to achieve this?
- Move CLI
12 - 专家问答mssoni30Feb 17, 2025
How to call a function from another Move contract?
I've deployed a contract with an address 0x3df... and a public function 'coll'. Now, I'm trying to write another contract that calls this 'coll' function, but I'm getting an error saying 'use 0x3df...::coll; use is invalid. Unbound module'. I've seen suggestions about using a dependencies file but I'm not sure how to implement this properly. What steps should I take to resolve the error and successfully call the function?
- Move CLI
- Move
12 - 专家问答Feb 14, 2025
How to call `public fun`s from Sui framework using CLI?
Hey folks, I'm trying to call public functions from the Sui framework using the Sui CLI. For instance, if someone transfers an object to me and I don't want it, how can I freeze it? I thought about using sui client call, but I'm having trouble with the module identifier. Is publishing a wrapper package the only way, or is there a CLI command I'm missing?
- Move CLI
- Move
02 - 专家问答farshad122Feb 13, 2025
How to handle function signature changes in SUI Move Package
I'm working on a SUI Move package and encountered an error when I tried to change a function signature. The error message is 'PackageUpgradeError { upgrade_error: IncompatibleUpgrade }'. How can I upgrade the package with the new function signature without causing errors?
- Move CLI
01 - 专家问答Feb 13, 2025
Can I assign a specific ID to a shared object in Move?
I'm trying to create a shared object within the init function of a Move module and want to assign it a specific predetermined ID like 0x123. Is this possible, or do I need to follow another approach?
- Move CLI
11 - 专家问答farshad122Feb 13, 2025
Why does sponsored transaction fail with JsonRpcError?
I've been working on creating a sponsored transaction. I first create and sign the transaction with the gas sponsor and then the sender. But when I send it to the blockchain, I get a JsonRpcError: Deserialization error. Oddly enough, if I sign it without a sponsor, it works fine. Can anyone help me figure out what's going wrong with the sponsored transaction setup?
- Move CLI
- Move
12 - 专家问答DRAMA35Feb 13, 2025
How to retrieve a smart contract address in code?
I'm working on integrating a smart contract in my project. I'm stuck on how to get the address of the smart contract directly in the code. I need this address to interact with the contract functions. Is there a way to retrieve it programmatically, or do I have to pass it as an argument each time?
- Move CLI
11 - 专家问答Caplec50Feb 13, 2025
How to get custom Sui token object ID for a specific account?
I'm trying to find out how to obtain a custom Sui token object ID for a specific account using the frontend. I'm planning to use the TypeScript SDK. Can anyone guide me on how to achieve this?
- Move CLI
11
- 174
- 162
- 160
- 134
- 130
- 122
- 110
- 110
- 106
- 100
- Move CLI
- Move
- Move Bug
- Move Module
- Smart Contract
- Move Script
- Move Prover
- Feature Request