NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.15k stars 1.37k forks source link

Add validation for positional parameter clashes in TaskManager #5335

Closed schaable closed 2 months ago

schaable commented 3 months ago

The TaskManager currently validates clashes of named parameter names against the global parameters when a task is added or overridden. However, positional parameter names should also be checked for clashes. The check should be added to the #validateClashesWithGlobalParams method, and the same error (HardhatError.ERRORS.TASK_DEFINITIONS.TASK_PARAMETER_ALREADY_DEFINED) should be thrown in case of a clash.