I wrote an action that has an optional parameter, as something like:
[[eosio::action]] void foo(..., const std::optional<name>& recipient);
Then in the generated .abi, it is represented as:
{"name": "recipient", "type": "name?"}
But I couldn't find a way to specify (or, not specify) the optional parameter for cleos. Itried without specifying the optional parameter, {..., "recipient": ""}
, etc., all in vain.
What should I do to specify an optional action parameter for cleos?