Move.

Beitrag

Teile dein Wissen.

hohm.
Feb 17, 2025
Experten 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
2
1
Teilen
Kommentare
.

Antworten

1
Ramirez.
Feb 17 2025, 15:38

Dieser Fehler tritt normalerweise auf, wenn ein Objekt zurückgegeben wird, das am Ende der Transaktion nicht ordnungsgemäß behandelt wurde. Eine Anleitung zum korrekten Umgang mit Optionen bei Transaktionen mit MoveCall finden Sie unter diesem Link: https://sdk.mystenlabs.com/typescript/transaction-building/basics#object-helpers

1
Kommentare
.

Weißt du die Antwort?

Bitte melde dich an und teile sie.

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

270Beiträge616Antworten
Sui.X.Peera.

Verdiene deinen Anteil an 1000 Sui

Sammle Reputationspunkte und erhalte Belohnungen für deine Hilfe beim Wachstum der Sui-Community.