I'm coding a contract factory that will generates a lot of contracts and each contract will receive the constructor below:
constructor(
string memory _name,
string memory _symbol,
string memory docHash
) ERC20(_name, _symbol) {
name = _name;
addHashes(docHash);
}
I will pass an parameter in constructor called "docHash" and it should be added in an array using a function that I already coded as "addHashes". However, each contract will receive a different quantity of hashes, It can be 1 hash, 2 hashes, 3 hashes or more and all hashes must be added in the array.
How can I code to constructor receive variable quantities of hashes?