Hello
When trying to execute a transaction defined through a programmable transaction block via the sui sdk it fails.
These are the steps to reproduce:
- first we check if the user already has a kiosk, if not we create one for him (KioskTransaction.create())
- then we call shareAndTransferCap and finalize the kiosk transaction.
- then we call the smart contract function (txb.moveCall) with arguments objectID, transferPolicy, kiosTx.getKiosk(), kioskTx.getKioskCap()
- then execute and sign transaction block
When executing this transaction it fails with the error message “CommandArgumentError { arg_idx: 2, kind: InvalidValueUsage } in command 3” Indicating that the kiosk argument is somehow wrong.
If we execute the function when already having a kiosk on the account it works. Only if no kiosk exists yet and we create it, the transaction fails, even though when printing the kiosk on the console they are the same.
Here is the transaction id of the failed transaction “H7zFzVvVuptDmSYdLmF5pjP5QBHJe1svMgNhp2NHpcoD”
Thanks you for your help!