Move.

Post

Share your knowledge.

hohm.
Feb 17, 2025
Expert Q&A

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
1
1
Share
Comments
.

Answers

1
Ramirez.
Feb 17 2025, 15:38

This error typically occurs when there is an object being returned that wasn't properly handled by the end of the transaction. You can find guidance on handling options properly in transactions using MoveCall at this link: https://sdk.mystenlabs.com/typescript/transaction-building/basics#object-helpers

0
Comments
.

Do you know the answer?

Please log in and share it.

We use cookies to ensure you get the best experience on our website.
More info