How to correctly pass string[] as argument to move call

I am new to sui. It seems like the latest version of typescript sdk does not allow directly passing array of string to the txn.pure() function. What would be the correct way to do it?

Error message:

Argument of type ‘string’ is not assignable to parameter of type ‘Uint8Array | SerializedBcs<any, any>’.

Edit: I think I am getting this error for the same reason of arguments not being transformed into BCS bytes properly.

Dry run failed, could not automatically determine a budget: CommandArgumentError { arg_idx: 1, kind: InvalidBCSBytes } in command 1 (code: -1)

1 Like

Correct way to do this is to pass each string as its own tx.pure.string(...) input, and then add a command to makeMoveVec with all of these inputs to get it as an array.