Move.

帖子

分享您的知识。

hohm.
Feb 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
2
1
分享
评论
.

答案

1
Ramirez.
Feb 17 2025, 15:38

当返回的对象在事务结束时未得到正确处理时,通常会发生此错误. 您可以通过以下链接找到有关使用 MoveCall 在交易中正确处理期权的指南:https://sdk.mystenlabs.com/typescript/transaction-building/basics#object-helpers

1
评论
.

你知道答案吗?

请登录并分享。

Move is an executable bytecode language used to implement custom transactions and smart contracts.

148帖子231答案
Sui.X.Peera.

赚取你的 1000 Sui 份额

获取声誉积分,并因帮助 Sui 社区成长而获得奖励。

奖励活动七月