hardhat-ignition
hardhat-ignition copied to clipboard
Check the order of parameters in the constructor of a contract when using buildModule.
Sometimes a contract has multiple parameters in its constructor. It's easy to accidentally swap the order of these parameters.
Does Hardhat Ignition currently offer the functionality to display parameter names, or both names and types?
If not, is it feasible to extract that information from the contract when using Hardhat Ignition?
Just to illustrate, in the example below, we might swap the 'name/symbol' or the 'owner/feeRecipient' parameters:
const FirstDeployModule = buildModule("FirstDeploy", (m) => {
const currency = m.contract("Currency", [
"Currency", // In this example we could have swapped the name with symbol
"CRNCY",
1000000,
m.getAccount(0), // Or swap the owner with the feeRecipient
m.getAccount(1),
]);
return { currency };
});