In TypeScript, an aptos transaction payload is like this:
const payload = {
type: "entry_function_payload",
function: `xxx`,
type_arguments: [],
arguments: [str1, str2],
};
In order to call the below entry function from TypeScript:
public entry fun myfun(account: &signer, a: u64, b: u64, c: Option<address>)
I try to pass in a std::option::Option
argument. While serializing u64 is as simple as num_a.toString()
and num_b.toString()
, I haven't figured out how to pass in an std::option::Option
argument to transaction payload.
Any help?