sui icon indicating copy to clipboard operation
sui copied to clipboard

Where can I find in the docs of Rust Sdk how to add an argument with has type Option<ID>?

Open spielcrypto opened this issue 7 months ago • 3 comments

I'm using Rust SDK and I try to execute a contract however I have issues in order to add a Option<ID> argument, I try several ways with SuiJsonValue unsuccessfully however although the argument is optional it throws error showing that ObjectID needs to start with 0x , also I tried to add ObjectID::from_str("None").unwrap() but fails,

Here is an example of the code where I try to execute a transaction of my contract and here the contract function that I'm calling

spielcrypto avatar May 29 '25 14:05 spielcrypto

Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links!

github-actions[bot] avatar May 29 '25 14:05 github-actions[bot]

Ok, I was able to execute tx changing the code like this however the tx fail on chain as it is possible to see here

spielcrypto avatar May 29 '25 22:05 spielcrypto

In the end I change my contract in order to avoid to have the Option type, and works

spielcrypto avatar May 30 '25 18:05 spielcrypto