I am going through a tutorial from 2017 that says it was updated in January of 2018. It says that currently you can not pass an array of strings directly to the constructor of a contract and that you have to use an array of something like byte32. Is that still the case?
If you can use an array of strings now and you have a link to an example page, then please share it.
Best Answer
You can actually use an array of byte32 as an argument to a solidity function as with this constructor function:
And this is how you can pass it using web3:
The point is convert the string array to byte32 array (the hex representation), and just pass it along. The only thing I did to get the hex representation is this :
If you have a byte32 return type in a solidity function, you can likewise use one of web3's utility function (web3.utils.bytesToHex('0xf2323de')) to convert it to a string value.